Skip to content

Commit

Permalink
Merge branch 'master' into tag-indexer-perf-7455
Browse files Browse the repository at this point in the history
  • Loading branch information
pmario committed Mar 22, 2024
2 parents 3c51440 + 31ec1bd commit d99b4b1
Show file tree
Hide file tree
Showing 490 changed files with 8,099 additions and 1,894 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ node_modules/
/test-results/
/playwright-report/
/playwright/.cache/
$__StoryList.tid
24 changes: 23 additions & 1 deletion bin/build-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Default to the current version number for building the plugin library

if [ -z "$TW5_BUILD_VERSION" ]; then
TW5_BUILD_VERSION=v5.3.2
TW5_BUILD_VERSION=v5.3.3
fi

echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
Expand Down Expand Up @@ -156,6 +156,28 @@ node $TW5_BUILD_TIDDLYWIKI \
--build index favicon static \
|| exit 1

# /tour.html tour edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/tour \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all tour.html text/plain \
|| exit 1

# /dev/index.html Developer docs
# /dev/favicon.ico Favicon for dev site
# /dev/static.html Static rendering of default tiddlers
# /dev/alltiddlers.html Static rendering of all tiddlers
# /dev/static/* Static single tiddlers
# /dev/static/static.css Static stylesheet
node $TW5_BUILD_TIDDLYWIKI \
./editions/dev \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/dev \
--build index favicon static \
|| exit 1

# /share.html Custom edition for sharing via the URL
node $TW5_BUILD_TIDDLYWIKI \
./editions/share \
Expand Down
40 changes: 36 additions & 4 deletions boot/boot.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/copyright.tid
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: text/plain
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)

Copyright (c) 2004-2007, Jeremy Ruston
Copyright (c) 2007-2023, UnaMesa Association
Copyright (c) 2007-2024, UnaMesa Association
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
7 changes: 7 additions & 0 deletions core/images/default-layout.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: $:/core/images/default-layout
tags: $:/tags/Image

\parameters (size:"22pt")
<svg width=<<size>> height=<<size>> class="tc-image-default-layout tc-image-button" viewBox="0 0 128 128">
<path d="M71.93 72A8.07 8.07 0 0 1 80 80.07v7.86A8.071 8.071 0 0 1 71.93 96H8.07A8.067 8.067 0 0 1 0 87.93v-7.86A8.072 8.072 0 0 1 8.07 72h63.86Zm0 32a8.07 8.07 0 0 1 8.07 8.07v7.86a8.071 8.071 0 0 1-8.07 8.07H8.07A8.067 8.067 0 0 1 0 119.93v-7.86A8.072 8.072 0 0 1 8.07 104h63.86Zm0-104A8.068 8.068 0 0 1 80 8.07v47.86A8.073 8.073 0 0 1 71.93 64H8.07A8.07 8.07 0 0 1 0 55.93V8.07A8.072 8.072 0 0 1 8.07 0h63.86Zm48 0c2.14 0 4.193.85 5.706 2.364A8.067 8.067 0 0 1 128 8.07v111.86c0 2.14-.85 4.193-2.364 5.706A8.067 8.067 0 0 1 119.93 128H96.07c-2.14 0-4.193-.85-5.706-2.364A8.067 8.067 0 0 1 88 119.93V8.07c0-2.14.85-4.193 2.364-5.706A8.067 8.067 0 0 1 96.07 0h23.86ZM116 24h-16a3.995 3.995 0 0 0-2.828 1.172 3.995 3.995 0 0 0 0 5.656A3.995 3.995 0 0 0 100 32h16a3.995 3.995 0 0 0 2.828-1.172 3.995 3.995 0 0 0 0-5.656A3.995 3.995 0 0 0 116 24Z"/>
</svg>
1 change: 1 addition & 0 deletions core/language/en-GB/Buttons.multids
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Encryption/ClearPassword/Caption: clear password
Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption
Encryption/SetPassword/Caption: set password
Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption
EmergencyDownload/Caption: download tiddlers as json
ExportPage/Caption: export all
ExportPage/Hint: Export all tiddlers
ExportTiddler/Caption: export tiddler
Expand Down
2 changes: 1 addition & 1 deletion core/language/en-GB/Docs/ModuleTypes.multids
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ config: Data to be inserted into `$tw.config`.
filteroperator: Individual filter operator methods.
global: Global data to be inserted into `$tw`.
info: Publishes system information via the [[$:/temp/info-plugin]] pseudo-plugin.
isfilteroperator: Operands for the ''is'' filter operator.
isfilteroperator: Parameters for the ''is'' filter operator.
library: Generic module type for general purpose JavaScript modules.
macro: JavaScript macro definitions.
parser: Parsers for different content types.
Expand Down
1 change: 1 addition & 0 deletions core/language/en-GB/Fields.multids
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ _canonical_uri: The full URI of an external image tiddler
author: Name of the author of a plugin
bag: The name of the bag from which a tiddler came
caption: The text to be displayed on a tab or button
class: The CSS class applied to a tiddler when rendering it - see [[Custom styles by user-class]]. Also used for [[Modals]]
code-body: The view template will display the tiddler as code if set to ''yes''
color: The CSS color value associated with a tiddler
component: The name of the component responsible for an [[alert tiddler|AlertMechanism]]
Expand Down
2 changes: 1 addition & 1 deletion core/language/en-GB/Misc.multids
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Error/DeserializeOperator/UnknownDeserializer: Filter Error: Unknown deserialize
Error/Filter: Filter error
Error/FilterSyntax: Syntax error in filter expression
Error/FilterRunPrefix: Filter Error: Unknown prefix for filter run
Error/IsFilterOperator: Filter Error: Unknown operand for the 'is' filter operator
Error/IsFilterOperator: Filter Error: Unknown parameter for the 'is' filter operator
Error/FormatFilterOperator: Filter Error: Unknown suffix for the 'format' filter operator
Error/LoadingPluginLibrary: Error loading plugin library
Error/NetworkErrorAlert: `<h2>''Network Error''</h2>It looks like the connection to the server has been lost. This may indicate a problem with your network connection. Please attempt to restore network connectivity before continuing.<br><br>''Any unsaved changes will be automatically synchronised when connectivity is restored''.`
Expand Down
2 changes: 1 addition & 1 deletion core/modules/commands/listen.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports.info = {
name: "listen",
synchronous: true,
namedParameterMode: true,
mandatoryParameters: [],
mandatoryParameters: []
};

var Command = function(params,commander,callback) {
Expand Down
2 changes: 1 addition & 1 deletion core/modules/commands/savetiddlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Command.prototype.execute = function() {
type = tiddler.fields.type || "text/vnd.tiddlywiki",
contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"},
filename = path.resolve(pathname,$tw.utils.encodeURIComponentExtended(title));
fs.writeFileSync(filename,tiddler.fields.text,contentTypeInfo.encoding);
fs.writeFileSync(filename,tiddler.fields.text || "",contentTypeInfo.encoding);
});
return null;
};
Expand Down
26 changes: 26 additions & 0 deletions core/modules/filters/backtranscludes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*\
title: $:/core/modules/filters/backtranscludes.js
type: application/javascript
module-type: filteroperator
Filter operator for returning all the backtranscludes from a tiddler
\*/
(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

/*
Export our filter function
*/
exports.backtranscludes = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
$tw.utils.pushTop(results,options.wiki.getTiddlerBacktranscludes(title));
});
return results;
};

})();
7 changes: 2 additions & 5 deletions core/modules/filters/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ Filter operators for cryptography, using the Stanford JavaScript library

exports.sha256 = function(source,operator,options) {
var results = [],
length = parseInt(operator.operand,10) || 20,
sha256 = function(text) {
return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(text)).substr(0,length);
};
length = parseInt(operator.operand,10) || 20;
source(function(tiddler,title) {
results.push(sha256(title));
results.push($tw.utils.sha256(title,{length: length}));
});
return results;
};
Expand Down
5 changes: 4 additions & 1 deletion core/modules/filters/json-ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ function setDataItem(data,indexes,value) {
lastIndex = $tw.utils.parseInt(lastIndex);
if(lastIndex < 0) { lastIndex = lastIndex + current.length };
}
current[lastIndex] = value;
// Only set indexes on objects and arrays
if(typeof current === "object") {
current[lastIndex] = value;
}
return data;
}

Expand Down
26 changes: 26 additions & 0 deletions core/modules/filters/transcludes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*\
title: $:/core/modules/filters/transcludes.js
type: application/javascript
module-type: filteroperator
Filter operator for returning all the transcludes from a tiddler
\*/
(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

/*
Export our filter function
*/
exports.transcludes = function(source,operator,options) {
var results = new $tw.utils.LinkedList();
source(function(tiddler,title) {
results.pushTop(options.wiki.getTiddlerTranscludes(title));
});
return results.toArray();
};

})();
Loading

0 comments on commit d99b4b1

Please sign in to comment.