diff --git a/bin/build-site.sh b/bin/build-site.sh index b77a18434..a9133c2b7 100755 --- a/bin/build-site.sh +++ b/bin/build-site.sh @@ -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.2.8 + TW5_BUILD_VERSION=v5.3.0 fi echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]" diff --git a/boot/boot.js b/boot/boot.js index 89fafce6a..d06ddb649 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -569,10 +569,32 @@ $tw.utils.getTypeEncoding = function(ext) { return typeInfo ? typeInfo.encoding : "utf8"; }; +var polyfill =[ + "// this polyfills the globalThis variable", + "// using the this variable on a getter ", + "// inserted into the prototype of globalThis", + "(function() {", + " if (typeof globalThis === 'object') return;", + " // node.green says this is available since 0.10.48", + " Object.prototype.__defineGetter__('__temp__', function() {", + " return this;", + " });", + " __temp__.globalThis = __temp__;", + " delete Object.prototype.__temp__;", + "}());" +].join("\n"); + +var globalCheck =[ + " if(Object.keys(globalThis).length){", + " console.log(Object.keys(globalThis));", + " throw \"Global assignment is not allowed within modules on node.\";", + " }" +].join('\n'); + /* Run code globally with specified context variables in scope */ -$tw.utils.evalGlobal = function(code,context,filename) { +$tw.utils.evalGlobal = function(code,context,filename,sandbox,allowGlobals) { var contextCopy = $tw.utils.extend(Object.create(null),context); // Get the context variables as a pair of arrays of names and values var contextNames = [], contextValues = []; @@ -581,25 +603,39 @@ $tw.utils.evalGlobal = function(code,context,filename) { contextValues.push(value); }); // Add the code prologue and epilogue - code = "(function(" + contextNames.join(",") + ") {(function(){\n" + code + "\n;})();\nreturn exports;\n})\n"; + code = [ + (!$tw.browser ? polyfill : ""), + "(function(" + contextNames.join(",") + ") {", + " (function(){\n" + code + "\n;})();", + (!$tw.browser && sandbox && !allowGlobals) ? globalCheck : "", + " return exports;\n", + "})" + ].join("\n"); + // Compile the code into a function var fn; if($tw.browser) { fn = window["eval"](code + "\n\n//# sourceURL=" + filename); } else { - fn = vm.runInThisContext(code,filename); + if(sandbox){ + fn = vm.runInContext(code,sandbox,filename) + } else { + fn = vm.runInThisContext(code,filename); + } } // Call the function and return the exports return fn.apply(null,contextValues); }; - +$tw.utils.sandbox = !$tw.browser ? vm.createContext({}) : undefined; /* Run code in a sandbox with only the specified context variables in scope */ -$tw.utils.evalSandboxed = $tw.browser ? $tw.utils.evalGlobal : function(code,context,filename) { - var sandbox = $tw.utils.extend(Object.create(null),context); - vm.runInNewContext(code,sandbox,filename); - return sandbox.exports; +$tw.utils.evalSandboxed = $tw.browser ? $tw.utils.evalGlobal : function(code,context,filename,allowGlobals) { + return $tw.utils.evalGlobal( + code,context,filename, + allowGlobals ? vm.createContext({}) : $tw.utils.sandbox, + allowGlobals + ); }; /* @@ -1920,7 +1956,7 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) { // Read the specification var filesInfo = $tw.utils.parseJSONSafe(fs.readFileSync(filepath + path.sep + "tiddlywiki.files","utf8")); // Helper to process a file - var processFile = function(filename,isTiddlerFile,fields,isEditableFile) { + var processFile = function(filename,isTiddlerFile,fields,isEditableFile,rootPath) { var extInfo = $tw.config.fileExtensionInfo[path.extname(filename)], type = (extInfo || {}).type || fields.type || "text/plain", typeInfo = $tw.config.contentTypeInfo[type] || {}, @@ -1941,6 +1977,12 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) { } else { var value = tiddler[name]; switch(fieldInfo.source) { + case "subdirectories": + value = path.relative(rootPath, filename).split('/').slice(0, -1); + break; + case "filepath": + value = path.relative(rootPath, filename); + break; case "filename": value = path.basename(filename); break; @@ -2023,7 +2065,7 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) { var thisPath = path.relative(filepath, files[t]), filename = path.basename(thisPath); if(filename !== "tiddlywiki.files" && !metaRegExp.test(filename) && fileRegExp.test(filename)) { - processFile(thisPath,dirSpec.isTiddlerFile,dirSpec.fields,dirSpec.isEditableFile); + processFile(thisPath,dirSpec.isTiddlerFile,dirSpec.fields,dirSpec.isEditableFile,dirSpec.path); } } } else { @@ -2408,7 +2450,7 @@ $tw.boot.initStartup = function(options) { $tw.utils.registerFileType("video/webm","base64",".webm"); $tw.utils.registerFileType("video/mp4","base64",".mp4"); $tw.utils.registerFileType("audio/mp3","base64",".mp3"); - $tw.utils.registerFileType("audio/mpeg","base64"); + $tw.utils.registerFileType("audio/mpeg","base64",[".mp3",".m2a",".mp2",".mpa",".mpg",".mpga"]); $tw.utils.registerFileType("text/markdown","utf8",[".md",".markdown"],{deserializerType:"text/x-markdown"}); $tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]); $tw.utils.registerFileType("application/enex+xml","utf8",".enex"); diff --git a/core/icon.tid b/core/icon.tid index b327440df..21246d176 100644 --- a/core/icon.tid +++ b/core/icon.tid @@ -1,4 +1,5 @@ title: $:/core/icon tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/add-comment.tid b/core/images/add-comment.tid index 178221806..a118506ed 100644 --- a/core/images/add-comment.tid +++ b/core/images/add-comment.tid @@ -1,4 +1,5 @@ title: $:/core/images/add-comment tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-add-comment tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/advanced-search-button.tid b/core/images/advanced-search-button.tid index 6fda3fe8b..8e5699c4d 100755 --- a/core/images/advanced-search-button.tid +++ b/core/images/advanced-search-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/advanced-search-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-advanced-search-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/auto-height.tid b/core/images/auto-height.tid index 78f95418b..76deecbad 100755 --- a/core/images/auto-height.tid +++ b/core/images/auto-height.tid @@ -1,4 +1,5 @@ title: $:/core/images/auto-height tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-auto-height tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/blank.tid b/core/images/blank.tid index 731b55a5a..565ef6bec 100755 --- a/core/images/blank.tid +++ b/core/images/blank.tid @@ -1,4 +1,5 @@ title: $:/core/images/blank tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-blank tc-image-button" viewBox="0 0 128 128"/> \ No newline at end of file diff --git a/core/images/bold.tid b/core/images/bold.tid index 67a00f894..d9259e4a1 100755 --- a/core/images/bold.tid +++ b/core/images/bold.tid @@ -1,4 +1,5 @@ title: $:/core/images/bold tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-bold tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/cancel-button.tid b/core/images/cancel-button.tid index c55620b06..3bb982bc1 100755 --- a/core/images/cancel-button.tid +++ b/core/images/cancel-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/cancel-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-cancel-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/chevron-down.tid b/core/images/chevron-down.tid index f1b363dfc..df28c87a4 100755 --- a/core/images/chevron-down.tid +++ b/core/images/chevron-down.tid @@ -1,4 +1,5 @@ title: $:/core/images/chevron-down tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-chevron-down tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/chevron-left.tid b/core/images/chevron-left.tid index e4c69d95a..b7f9ad7ae 100755 --- a/core/images/chevron-left.tid +++ b/core/images/chevron-left.tid @@ -1,4 +1,5 @@ title: $:/core/images/chevron-left tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-chevron-left tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/chevron-right.tid b/core/images/chevron-right.tid index 6ff5b6c0d..9ec7c96fe 100755 --- a/core/images/chevron-right.tid +++ b/core/images/chevron-right.tid @@ -1,4 +1,5 @@ title: $:/core/images/chevron-right tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-chevron-right tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/chevron-up.tid b/core/images/chevron-up.tid index 9acbdec40..45366f286 100755 --- a/core/images/chevron-up.tid +++ b/core/images/chevron-up.tid @@ -1,4 +1,5 @@ title: $:/core/images/chevron-up tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-chevron-up tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/clone-button.tid b/core/images/clone-button.tid index 9ff4903ad..cc0ed7595 100755 --- a/core/images/clone-button.tid +++ b/core/images/clone-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/clone-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-clone-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/close-all-button.tid b/core/images/close-all-button.tid index 3334c5dbc..02d25fa6f 100755 --- a/core/images/close-all-button.tid +++ b/core/images/close-all-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/close-all-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-close-all-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/close-button.tid b/core/images/close-button.tid index c462c9bac..a05669ccd 100755 --- a/core/images/close-button.tid +++ b/core/images/close-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/close-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-close-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/close-others-button.tid b/core/images/close-others-button.tid index 1cd54d797..6eb779018 100755 --- a/core/images/close-others-button.tid +++ b/core/images/close-others-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/close-others-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-close-others-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/copy-clipboard.tid b/core/images/copy-clipboard.tid index e4e55b6e9..d6514ad7c 100644 --- a/core/images/copy-clipboard.tid +++ b/core/images/copy-clipboard.tid @@ -1,4 +1,5 @@ title: $:/core/images/copy-clipboard tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-copy-clipboard tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/delete-button.tid b/core/images/delete-button.tid index e8c9b6108..99f83b3ba 100755 --- a/core/images/delete-button.tid +++ b/core/images/delete-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/delete-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-delete-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/done-button.tid b/core/images/done-button.tid index 265528d06..7672b7d27 100755 --- a/core/images/done-button.tid +++ b/core/images/done-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/done-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-done-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/down-arrow.tid b/core/images/down-arrow.tid index 4cac65a00..7f1273b2c 100755 --- a/core/images/down-arrow.tid +++ b/core/images/down-arrow.tid @@ -1,4 +1,5 @@ title: $:/core/images/down-arrow tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-down-arrow tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/download-button.tid b/core/images/download-button.tid index e3a549639..8b06356ab 100755 --- a/core/images/download-button.tid +++ b/core/images/download-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/download-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-download-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/edit-button.tid b/core/images/edit-button.tid index 190dffc41..e4644ef7c 100755 --- a/core/images/edit-button.tid +++ b/core/images/edit-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/edit-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-edit-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/erase.tid b/core/images/erase.tid index 22b31e7cc..6cc2011a9 100755 --- a/core/images/erase.tid +++ b/core/images/erase.tid @@ -1,4 +1,5 @@ title: $:/core/images/erase tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-erase tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/excise.tid b/core/images/excise.tid index e6c2c9404..fa351baff 100755 --- a/core/images/excise.tid +++ b/core/images/excise.tid @@ -1,4 +1,5 @@ title: $:/core/images/excise tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-excise tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/export-button.tid b/core/images/export-button.tid index eb3284c80..b9f0dca7f 100755 --- a/core/images/export-button.tid +++ b/core/images/export-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/export-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-export-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/file.tid b/core/images/file.tid index 67ebc22ac..682796fbf 100755 --- a/core/images/file.tid +++ b/core/images/file.tid @@ -1,4 +1,5 @@ title: $:/core/images/file tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-file tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/fixed-height.tid b/core/images/fixed-height.tid index c15162267..b2b5083b9 100755 --- a/core/images/fixed-height.tid +++ b/core/images/fixed-height.tid @@ -1,4 +1,5 @@ title: $:/core/images/fixed-height tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-fixed-height tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/fold-all-button.tid b/core/images/fold-all-button.tid index edff8b22b..260efe9b8 100755 --- a/core/images/fold-all-button.tid +++ b/core/images/fold-all-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/fold-all-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-fold-all tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/fold-button.tid b/core/images/fold-button.tid index f0b2b474d..cfc2291a5 100755 --- a/core/images/fold-button.tid +++ b/core/images/fold-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/fold-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-fold tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/fold-others-button.tid b/core/images/fold-others-button.tid index 5cb086f85..a5457c461 100755 --- a/core/images/fold-others-button.tid +++ b/core/images/fold-others-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/fold-others-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-fold-others tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/folder.tid b/core/images/folder.tid index 4b89418ff..8c5d7efb1 100755 --- a/core/images/folder.tid +++ b/core/images/folder.tid @@ -1,4 +1,5 @@ title: $:/core/images/folder tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-folder tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/full-screen-button.tid b/core/images/full-screen-button.tid index 8572ff646..7e20183b7 100755 --- a/core/images/full-screen-button.tid +++ b/core/images/full-screen-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/full-screen-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-full-screen-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/github.tid b/core/images/github.tid index 6389f5cdc..b82c54e72 100755 --- a/core/images/github.tid +++ b/core/images/github.tid @@ -1,4 +1,5 @@ title: $:/core/images/github tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-github tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/gitter.tid b/core/images/gitter.tid index 876fc3da1..4af54ddba 100644 --- a/core/images/gitter.tid +++ b/core/images/gitter.tid @@ -1,4 +1,5 @@ title: $:/core/images/gitter tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-gitter tc-image-button" viewBox="0 0 18 25"> \ No newline at end of file diff --git a/core/images/globe.tid b/core/images/globe.tid index 9448ed7a4..0e2c56b40 100755 --- a/core/images/globe.tid +++ b/core/images/globe.tid @@ -1,4 +1,5 @@ title: $:/core/images/globe tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-globe tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/heading-1.tid b/core/images/heading-1.tid index f8a98123b..d160284c9 100755 --- a/core/images/heading-1.tid +++ b/core/images/heading-1.tid @@ -1,4 +1,5 @@ title: $:/core/images/heading-1 tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-heading-1 tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/heading-2.tid b/core/images/heading-2.tid index ef0022cc6..8daad0f10 100755 --- a/core/images/heading-2.tid +++ b/core/images/heading-2.tid @@ -1,4 +1,5 @@ title: $:/core/images/heading-2 tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-heading-2 tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/heading-3.tid b/core/images/heading-3.tid index d706d067b..8a489e799 100755 --- a/core/images/heading-3.tid +++ b/core/images/heading-3.tid @@ -1,4 +1,5 @@ title: $:/core/images/heading-3 tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-heading-3 tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/heading-4.tid b/core/images/heading-4.tid index 16d4440db..5aee3f3f8 100755 --- a/core/images/heading-4.tid +++ b/core/images/heading-4.tid @@ -1,4 +1,5 @@ title: $:/core/images/heading-4 tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-heading-4 tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/heading-5.tid b/core/images/heading-5.tid index 8f34b7058..c9a54a335 100755 --- a/core/images/heading-5.tid +++ b/core/images/heading-5.tid @@ -1,4 +1,5 @@ title: $:/core/images/heading-5 tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-heading-5 tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/heading-6.tid b/core/images/heading-6.tid index b348c70af..1034e7116 100755 --- a/core/images/heading-6.tid +++ b/core/images/heading-6.tid @@ -1,4 +1,5 @@ title: $:/core/images/heading-6 tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-heading-6 tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/help.tid b/core/images/help.tid index 07167ae93..5c0cf13ab 100755 --- a/core/images/help.tid +++ b/core/images/help.tid @@ -1,4 +1,5 @@ title: $:/core/images/help tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-help tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/home-button.tid b/core/images/home-button.tid index 10c00626a..952ab9a60 100755 --- a/core/images/home-button.tid +++ b/core/images/home-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/home-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-home-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/import-button.tid b/core/images/import-button.tid index 6850513ef..a42c416e5 100755 --- a/core/images/import-button.tid +++ b/core/images/import-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/import-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-import-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/info-button.tid b/core/images/info-button.tid index 2679a135a..e8f8e98c4 100755 --- a/core/images/info-button.tid +++ b/core/images/info-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/info-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-info-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/italic.tid b/core/images/italic.tid index 06aada589..766d3707a 100755 --- a/core/images/italic.tid +++ b/core/images/italic.tid @@ -1,4 +1,5 @@ title: $:/core/images/italic tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-italic tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/layout-button.tid b/core/images/layout-button.tid index 19371cde1..a859edbc5 100755 --- a/core/images/layout-button.tid +++ b/core/images/layout-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/layout-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-layout-button tc-image-button" viewBox="0 0 24 24" stroke-width="1" stroke="none"> \ No newline at end of file diff --git a/core/images/left-arrow.tid b/core/images/left-arrow.tid index a418581cd..b64fc2ab6 100755 --- a/core/images/left-arrow.tid +++ b/core/images/left-arrow.tid @@ -3,4 +3,5 @@ modified: 20150315235324760 tags: $:/tags/Image title: $:/core/images/left-arrow - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-left-arrow tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/line-width.tid b/core/images/line-width.tid index f77763ce6..9cecc33cb 100755 --- a/core/images/line-width.tid +++ b/core/images/line-width.tid @@ -1,4 +1,5 @@ title: $:/core/images/line-width tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-line-width tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/link.tid b/core/images/link.tid index 395307c42..c1d134f7e 100644 --- a/core/images/link.tid +++ b/core/images/link.tid @@ -1,4 +1,5 @@ title: $:/core/images/link tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-link tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/linkify.tid b/core/images/linkify.tid index 40acdc19a..d616c2ac9 100644 --- a/core/images/linkify.tid +++ b/core/images/linkify.tid @@ -1,4 +1,5 @@ title: $:/core/images/linkify tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-linkify-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/list-bullet.tid b/core/images/list-bullet.tid index 322dd4ae6..065d96c4f 100755 --- a/core/images/list-bullet.tid +++ b/core/images/list-bullet.tid @@ -1,4 +1,5 @@ title: $:/core/images/list-bullet tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-list-bullet tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/list-number.tid b/core/images/list-number.tid index 161917823..b70d4db15 100755 --- a/core/images/list-number.tid +++ b/core/images/list-number.tid @@ -1,4 +1,5 @@ title: $:/core/images/list-number tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-list-number tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/list.tid b/core/images/list.tid index 22b784bfe..793b47957 100644 --- a/core/images/list.tid +++ b/core/images/list.tid @@ -1,4 +1,5 @@ title: $:/core/images/list tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-list tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/locked-padlock.tid b/core/images/locked-padlock.tid index 14d95560c..f6722cddd 100755 --- a/core/images/locked-padlock.tid +++ b/core/images/locked-padlock.tid @@ -1,4 +1,5 @@ title: $:/core/images/locked-padlock tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-locked-padlock tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/mail.tid b/core/images/mail.tid index cf0f4eab7..9d46d6eff 100755 --- a/core/images/mail.tid +++ b/core/images/mail.tid @@ -1,4 +1,5 @@ title: $:/core/images/mail tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-mail tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/mastodon.tid b/core/images/mastodon.tid index b27c751fd..a6b41d355 100644 --- a/core/images/mastodon.tid +++ b/core/images/mastodon.tid @@ -1,6 +1,7 @@ title: $:/core/images/mastodon tags: $:/tags/Image - +\parameters (size:"22pt") +> height=<> class="tc-image-mastodon tc-image-button" viewBox="0 0 128 128"> diff --git a/core/images/menu-button.tid b/core/images/menu-button.tid index 6d1872e4c..958721d31 100755 --- a/core/images/menu-button.tid +++ b/core/images/menu-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/menu-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-menu-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/minus-button.tid b/core/images/minus-button.tid index 7132ed3e9..40ee75a8e 100644 --- a/core/images/minus-button.tid +++ b/core/images/minus-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/minus-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-minus-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/mono-block.tid b/core/images/mono-block.tid index f8695302b..bf58400aa 100755 --- a/core/images/mono-block.tid +++ b/core/images/mono-block.tid @@ -1,4 +1,5 @@ title: $:/core/images/mono-block tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-mono-block tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/mono-line.tid b/core/images/mono-line.tid index 09cfe513e..1ab73b829 100755 --- a/core/images/mono-line.tid +++ b/core/images/mono-line.tid @@ -1,4 +1,5 @@ title: $:/core/images/mono-line tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-mono-line tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/new-button.tid b/core/images/new-button.tid index 6e592ada9..d4cfd34f6 100755 --- a/core/images/new-button.tid +++ b/core/images/new-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/new-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-new-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/new-here-button.tid b/core/images/new-here-button.tid index ab0f7a6f3..8e304f5e7 100755 --- a/core/images/new-here-button.tid +++ b/core/images/new-here-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/new-here-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-new-here-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/new-image-button.tid b/core/images/new-image-button.tid index 16b63c3c3..53b10d481 100755 --- a/core/images/new-image-button.tid +++ b/core/images/new-image-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/new-image-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-new-image-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/new-journal-button.tid b/core/images/new-journal-button.tid index fb67c8007..3b04d5786 100755 --- a/core/images/new-journal-button.tid +++ b/core/images/new-journal-button.tid @@ -1,4 +1,6 @@ title: $:/core/images/new-journal-button tags: $:/tags/Image -<> \ No newline at end of file +<$parameters size="22pt" day=<>> +> height=<> class="tc-image-new-journal-button tc-image-button" viewBox="0 0 128 128"><$text text=<>/> + \ No newline at end of file diff --git a/core/images/opacity.tid b/core/images/opacity.tid index e9a29aea2..0211644f9 100755 --- a/core/images/opacity.tid +++ b/core/images/opacity.tid @@ -1,4 +1,5 @@ title: $:/core/images/opacity tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-opacity tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/open-window.tid b/core/images/open-window.tid index 14b556484..d918b1fc8 100755 --- a/core/images/open-window.tid +++ b/core/images/open-window.tid @@ -1,4 +1,5 @@ title: $:/core/images/open-window tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-open-window tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/options-button.tid b/core/images/options-button.tid index bd0ffcb1a..18fbf8b00 100755 --- a/core/images/options-button.tid +++ b/core/images/options-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/options-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-options-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/paint.tid b/core/images/paint.tid index bb536b53a..660fda2bf 100755 --- a/core/images/paint.tid +++ b/core/images/paint.tid @@ -1,4 +1,5 @@ title: $:/core/images/paint tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-paint tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/palette.tid b/core/images/palette.tid index d605fd853..1c7903549 100755 --- a/core/images/palette.tid +++ b/core/images/palette.tid @@ -1,4 +1,5 @@ title: $:/core/images/palette tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-palette tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/permalink-button.tid b/core/images/permalink-button.tid index e8fd0aecd..f1cf38b41 100755 --- a/core/images/permalink-button.tid +++ b/core/images/permalink-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/permalink-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-permalink-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/permaview-button.tid b/core/images/permaview-button.tid index b2ad9a408..82e533475 100755 --- a/core/images/permaview-button.tid +++ b/core/images/permaview-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/permaview-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-permaview-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/picture.tid b/core/images/picture.tid index 7d035e2fc..2af427e2e 100755 --- a/core/images/picture.tid +++ b/core/images/picture.tid @@ -1,4 +1,5 @@ title: $:/core/images/picture tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-picture tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/plugin-generic-language.tid b/core/images/plugin-generic-language.tid index 5c777d98d..d663d1563 100755 --- a/core/images/plugin-generic-language.tid +++ b/core/images/plugin-generic-language.tid @@ -1,4 +1,5 @@ title: $:/core/images/plugin-generic-language tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> viewBox="0 0 128 128" class="tc-image-plugin-generic-language tc-image-button"> \ No newline at end of file diff --git a/core/images/plugin-generic-plugin.tid b/core/images/plugin-generic-plugin.tid index ab2e6670e..06073dd7c 100755 --- a/core/images/plugin-generic-plugin.tid +++ b/core/images/plugin-generic-plugin.tid @@ -1,4 +1,5 @@ title: $:/core/images/plugin-generic-plugin tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> viewBox="0 0 128 128" class="tc-image-plugin-generic-plugin tc-image-button"> \ No newline at end of file diff --git a/core/images/plugin-generic-theme.tid b/core/images/plugin-generic-theme.tid index 9ae3cd779..ab899b3e4 100755 --- a/core/images/plugin-generic-theme.tid +++ b/core/images/plugin-generic-theme.tid @@ -1,4 +1,5 @@ title: $:/core/images/plugin-generic-theme tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> viewBox="0 0 128 128" class="tc-image-plugin-generic-theme tc-image-button"> \ No newline at end of file diff --git a/core/images/plus-button.tid b/core/images/plus-button.tid index b001f3e2f..c9a696d43 100644 --- a/core/images/plus-button.tid +++ b/core/images/plus-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/plus-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-plus-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/preview-closed.tid b/core/images/preview-closed.tid index 5986d8966..cf17730d5 100755 --- a/core/images/preview-closed.tid +++ b/core/images/preview-closed.tid @@ -1,4 +1,5 @@ title: $:/core/images/preview-closed tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-preview-closed tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/preview-open.tid b/core/images/preview-open.tid index 4664990b4..cb30bf474 100755 --- a/core/images/preview-open.tid +++ b/core/images/preview-open.tid @@ -1,4 +1,5 @@ title: $:/core/images/preview-open tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-preview-open tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/print-button.tid b/core/images/print-button.tid index 55b33c896..12bffd41d 100644 --- a/core/images/print-button.tid +++ b/core/images/print-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/print-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-print-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/quote.tid b/core/images/quote.tid index 7134306a6..0c4fcf25a 100755 --- a/core/images/quote.tid +++ b/core/images/quote.tid @@ -1,4 +1,5 @@ title: $:/core/images/quote tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-quote tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/refresh-button.tid b/core/images/refresh-button.tid index 2422b0679..f8e3fc69e 100755 --- a/core/images/refresh-button.tid +++ b/core/images/refresh-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/refresh-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-refresh-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/right-arrow.tid b/core/images/right-arrow.tid index 42e7dea56..64f839b55 100755 --- a/core/images/right-arrow.tid +++ b/core/images/right-arrow.tid @@ -1,4 +1,5 @@ title: $:/core/images/right-arrow tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-right-arrow tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/rotate-left.tid b/core/images/rotate-left.tid index 188d3b45c..da6034b19 100644 --- a/core/images/rotate-left.tid +++ b/core/images/rotate-left.tid @@ -1,4 +1,5 @@ title: $:/core/images/rotate-left tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-rotate-left tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/save-button-dynamic.tid b/core/images/save-button-dynamic.tid index d0aa13f83..7a351d617 100644 --- a/core/images/save-button-dynamic.tid +++ b/core/images/save-button-dynamic.tid @@ -1,7 +1,8 @@ title: $:/core/images/save-button-dynamic tags: $:/tags/Image - +\parameters (size:"22pt") +> height=<> class="tc-image-save-button-dynamic tc-image-button" viewBox="0 0 128 128"> diff --git a/core/images/save-button.tid b/core/images/save-button.tid index a66756616..912ad248c 100755 --- a/core/images/save-button.tid +++ b/core/images/save-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/save-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-save-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/size.tid b/core/images/size.tid index db84ecf9b..ea9aa1094 100755 --- a/core/images/size.tid +++ b/core/images/size.tid @@ -1,4 +1,5 @@ title: $:/core/images/size tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-size tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/spiral.tid b/core/images/spiral.tid index ca4684cab..f3a5271ac 100755 --- a/core/images/spiral.tid +++ b/core/images/spiral.tid @@ -1,4 +1,5 @@ title: $:/core/images/spiral tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-spiral tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/stamp.tid b/core/images/stamp.tid index ba385aaae..8511a457f 100755 --- a/core/images/stamp.tid +++ b/core/images/stamp.tid @@ -1,4 +1,5 @@ title: $:/core/images/stamp tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-stamp tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/star-filled.tid b/core/images/star-filled.tid index 10b8f1c3d..262448d51 100755 --- a/core/images/star-filled.tid +++ b/core/images/star-filled.tid @@ -1,4 +1,5 @@ title: $:/core/images/star-filled tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-star-filled tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/storyview-classic.tid b/core/images/storyview-classic.tid index 86872817b..457434bc9 100755 --- a/core/images/storyview-classic.tid +++ b/core/images/storyview-classic.tid @@ -1,4 +1,5 @@ title: $:/core/images/storyview-classic tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-storyview-classic tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/storyview-pop.tid b/core/images/storyview-pop.tid index a610c89d5..a4a9fb9ee 100755 --- a/core/images/storyview-pop.tid +++ b/core/images/storyview-pop.tid @@ -1,4 +1,5 @@ title: $:/core/images/storyview-pop tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-storyview-pop tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/storyview-zoomin.tid b/core/images/storyview-zoomin.tid index 61b7ff273..725f36e71 100755 --- a/core/images/storyview-zoomin.tid +++ b/core/images/storyview-zoomin.tid @@ -1,4 +1,5 @@ title: $:/core/images/storyview-zoomin tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-storyview-zoomin tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/strikethrough.tid b/core/images/strikethrough.tid index 1f7a1c202..de4eefeec 100755 --- a/core/images/strikethrough.tid +++ b/core/images/strikethrough.tid @@ -1,4 +1,5 @@ title: $:/core/images/strikethrough tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-strikethrough tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/subscript.tid b/core/images/subscript.tid index 96548bdb5..76ec35399 100755 --- a/core/images/subscript.tid +++ b/core/images/subscript.tid @@ -1,4 +1,5 @@ title: $:/core/images/subscript tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-subscript tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/superscript.tid b/core/images/superscript.tid index 149e44893..ab0d0d1b2 100755 --- a/core/images/superscript.tid +++ b/core/images/superscript.tid @@ -1,4 +1,5 @@ title: $:/core/images/superscript tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-superscript tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/tag-button.tid b/core/images/tag-button.tid index 9f6cad8b4..ab407f780 100755 --- a/core/images/tag-button.tid +++ b/core/images/tag-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/tag-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-tag-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/theme-button.tid b/core/images/theme-button.tid index d80a0e82a..6b7aab2af 100755 --- a/core/images/theme-button.tid +++ b/core/images/theme-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/theme-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-theme-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/timestamp-off.tid b/core/images/timestamp-off.tid index 0d20f28d6..33e018f3a 100644 --- a/core/images/timestamp-off.tid +++ b/core/images/timestamp-off.tid @@ -1,4 +1,5 @@ title: $:/core/images/timestamp-off tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-timestamp-off tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/timestamp-on.tid b/core/images/timestamp-on.tid index 3a16df7eb..cad04aada 100644 --- a/core/images/timestamp-on.tid +++ b/core/images/timestamp-on.tid @@ -1,4 +1,5 @@ title: $:/core/images/timestamp-on tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-timestamp-on tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/tip.tid b/core/images/tip.tid index f8109ada4..025918306 100755 --- a/core/images/tip.tid +++ b/core/images/tip.tid @@ -1,4 +1,5 @@ title: $:/core/images/tip tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-tip tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/transcludify.tid b/core/images/transcludify.tid index 0579feb10..5102d1370 100644 --- a/core/images/transcludify.tid +++ b/core/images/transcludify.tid @@ -1,4 +1,5 @@ title: $:/core/images/transcludify tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-transcludify-button tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/twitter.tid b/core/images/twitter.tid index 28cfccdbd..e3ae13dc1 100755 --- a/core/images/twitter.tid +++ b/core/images/twitter.tid @@ -1,4 +1,5 @@ title: $:/core/images/twitter tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-twitter tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/underline.tid b/core/images/underline.tid index 768d2a199..341b27cfa 100755 --- a/core/images/underline.tid +++ b/core/images/underline.tid @@ -1,4 +1,5 @@ title: $:/core/images/underline tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-underline tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/unfold-all-button.tid b/core/images/unfold-all-button.tid index e496bdd89..e44000b18 100755 --- a/core/images/unfold-all-button.tid +++ b/core/images/unfold-all-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/unfold-all-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-unfold-all tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/unfold-button.tid b/core/images/unfold-button.tid index cfad70570..57f53fd6f 100755 --- a/core/images/unfold-button.tid +++ b/core/images/unfold-button.tid @@ -1,4 +1,5 @@ title: $:/core/images/unfold-button tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-unfold tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/unlocked-padlock.tid b/core/images/unlocked-padlock.tid index c5367c085..941f7bec5 100755 --- a/core/images/unlocked-padlock.tid +++ b/core/images/unlocked-padlock.tid @@ -1,4 +1,5 @@ title: $:/core/images/unlocked-padlock tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-unlocked-padlock tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/up-arrow.tid b/core/images/up-arrow.tid index a1bd132bf..4d157352b 100755 --- a/core/images/up-arrow.tid +++ b/core/images/up-arrow.tid @@ -3,4 +3,5 @@ modified: 20150316000831867 tags: $:/tags/Image title: $:/core/images/up-arrow - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-up-arrow tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/video.tid b/core/images/video.tid index 3bf0bb259..b4fef628d 100755 --- a/core/images/video.tid +++ b/core/images/video.tid @@ -1,4 +1,5 @@ title: $:/core/images/video tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-video tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/images/warning.tid b/core/images/warning.tid index 53bff59ec..1822da89f 100755 --- a/core/images/warning.tid +++ b/core/images/warning.tid @@ -1,4 +1,5 @@ title: $:/core/images/warning tags: $:/tags/Image - \ No newline at end of file +\parameters (size:"22pt") +> height=<> class="tc-image-warning tc-image-button" viewBox="0 0 128 128"> \ No newline at end of file diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 948890645..a4cf983b0 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -118,6 +118,8 @@ FramedEngine.prototype.copyStyles = function() { this.domNode.style.margin = "0"; // In Chrome setting -webkit-text-fill-color overrides the placeholder text colour this.domNode.style["-webkit-text-fill-color"] = "currentcolor"; + // Ensure we don't force text direction to LTR + this.domNode.style.removeProperty("direction"); }; /* diff --git a/core/modules/filters/format/timestamp.js b/core/modules/filters/format/timestamp.js new file mode 100644 index 000000000..d6f5afe30 --- /dev/null +++ b/core/modules/filters/format/timestamp.js @@ -0,0 +1,25 @@ +/*\ +title: $:/core/modules/filters/format/timestamp.js +type: application/javascript +module-type: formatfilteroperator +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +/* +Export our filter function +*/ +exports.timestamp = function(source,operand,options) { + var results = []; + source(function(tiddler,title) { + if (title.match(/^-?\d+$/)) { + var value = new Date(Number(title)); + results.push($tw.utils.formatDateString(value,operand || "[UTC]YYYY0MM0DD0hh0mm0ss0XXX")); + } + }); + return results; +}; +})(); \ No newline at end of file diff --git a/core/modules/startup/rootwidget.js b/core/modules/startup/rootwidget.js index a8ad5f8c6..1175f6f25 100644 --- a/core/modules/startup/rootwidget.js +++ b/core/modules/startup/rootwidget.js @@ -41,12 +41,8 @@ exports.startup = function() { $tw.rootWidget.addEventListener("tm-focus-selector",function(event) { var selector = event.param || "", element, - doc = event.event && event.event.target ? event.event.target.ownerDocument : document; - try { - element = doc.querySelector(selector); - } catch(e) { - console.log("Error in selector: ",selector) - } + baseElement = event.event && event.event.target ? event.event.target.ownerDocument : document; + element = $tw.utils.querySelectorSafe(selector,baseElement); if(element && element.focus) { element.focus(event.paramObject); } diff --git a/core/modules/storyviews/classic.js b/core/modules/storyviews/classic.js index c2848c435..f7f9ff66b 100644 --- a/core/modules/storyviews/classic.js +++ b/core/modules/storyviews/classic.js @@ -80,7 +80,7 @@ ClassicStoryView.prototype.remove = function(widget) { if(duration) { var targetElement = widget.findFirstDomNode(), removeElement = function() { - widget.removeChildDomNodes(); + widget.destroy(); }; // Abandon if the list entry isn't a DOM element (it might be a text node) if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) { @@ -112,7 +112,7 @@ ClassicStoryView.prototype.remove = function(widget) { {opacity: "0.0"} ]); } else { - widget.removeChildDomNodes(); + widget.destroy(); } }; diff --git a/core/modules/storyviews/pop.js b/core/modules/storyviews/pop.js index e2634e3d5..6d11ed37b 100644 --- a/core/modules/storyviews/pop.js +++ b/core/modules/storyviews/pop.js @@ -73,7 +73,7 @@ PopStoryView.prototype.remove = function(widget) { duration = $tw.utils.getAnimationDuration(), removeElement = function() { if(targetElement && targetElement.parentNode) { - widget.removeChildDomNodes(); + widget.destroy(); } }; // Abandon if the list entry isn't a DOM element (it might be a text node) diff --git a/core/modules/storyviews/zoomin.js b/core/modules/storyviews/zoomin.js index 6452e6225..880663a87 100644 --- a/core/modules/storyviews/zoomin.js +++ b/core/modules/storyviews/zoomin.js @@ -129,7 +129,7 @@ function findTitleDomNode(widget,targetClass) { targetClass = targetClass || "tc-title"; var domNode = widget.findFirstDomNode(); if(domNode && domNode.querySelector) { - return domNode.querySelector("." + targetClass); + return $tw.utils.querySelectorSafe("." + targetClass,domNode); } return null; } @@ -154,7 +154,7 @@ ZoominListView.prototype.remove = function(widget) { var targetElement = widget.findFirstDomNode(), duration = $tw.utils.getAnimationDuration(), removeElement = function() { - widget.removeChildDomNodes(); + widget.destroy(); }; // Abandon if the list entry isn't a DOM element (it might be a text node) if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) { diff --git a/core/modules/utils/dom/dom.js b/core/modules/utils/dom/dom.js index 6d8f2a76d..9c06fc8b0 100644 --- a/core/modules/utils/dom/dom.js +++ b/core/modules/utils/dom/dom.js @@ -365,5 +365,25 @@ exports.collectDOMVariables = function(selectedNode,domNode,event) { return variables; }; +/* +Make sure the CSS selector is not invalid +*/ +exports.querySelectorSafe = function(selector,baseElement) { + baseElement = baseElement || document; + try { + return baseElement.querySelector(selector); + } catch(e) { + console.log("Invalid selector: ",selector); + } +}; + +exports.querySelectorAllSafe = function(selector,baseElement) { + baseElement = baseElement || document; + try { + return baseElement.querySelectorAll(selector); + } catch(e) { + console.log("Invalid selector: ",selector); + } +}; })(); diff --git a/core/modules/utils/dom/dragndrop.js b/core/modules/utils/dom/dragndrop.js index 6c90ed1bb..0b5360216 100644 --- a/core/modules/utils/dom/dragndrop.js +++ b/core/modules/utils/dom/dragndrop.js @@ -159,7 +159,7 @@ exports.importDataTransfer = function(dataTransfer,fallbackTitle,callback) { if(!$tw.browser.isIE || importDataTypes[t].IECompatible) { // Get the data var dataType = importDataTypes[t]; - var data = dataTransfer.getData(dataType.type); + var data = dataTransfer.getData(dataType.type); // Import the tiddlers in the data if(data !== "" && data !== null) { if($tw.log.IMPORT) { @@ -173,6 +173,36 @@ exports.importDataTransfer = function(dataTransfer,fallbackTitle,callback) { } }; +exports.importPaste = function(item,fallbackTitle,callback) { + // Try each provided data type in turn + for(var t=0; t 0) { $tw.utils.each(this.domNodes,function(domNode) { domNode.parentNode.removeChild(domNode); }); this.domNodes = []; - } else { + return true; + } else if(recursive) { // Otherwise, ask the child widgets to delete their DOM nodes $tw.utils.each(this.children,function(childWidget) { - childWidget.removeChildDomNodes(); + childWidget.removeChildDomNodes(options); }); } + return false +}; + +/* +Inform widget subclass that extends this widget and children widgets of this widget. Let them know this widget tree is about to destroy, and dom nodes are being unmounted from the document. +*/ +Widget.prototype.destroy = function(options) { + // removeDom by default + var removeDom = (options && options.removeDom) || true; + if (removeDom) { + // prepare options for children, if we have removed the dom, child don't need to remove their dom + removeDom = !this.removeChildDomNodes(); + } + // nothing need to do, as dom is already removed in the removeChildDomNodes + // we just need to inform the children + $tw.utils.each(this.children,function(childWidget) { + childWidget.destroy({ removeDom: removeDom }); + }); }; /* diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 6ae16a2b4..8cb12cc39 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -1149,7 +1149,7 @@ exports.makeTranscludeWidget = function(title,options) { if(options.importVariables) { parseTreeImportVariables.attributes.filter.value = options.importVariables; } else if(options.importPageMacros) { - parseTreeImportVariables.attributes.filter.value = "[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]"; + parseTreeImportVariables.attributes.filter.value = this.getTiddlerText("$:/core/config/GlobalImportFilter"); } parseTreeDiv.tree[0].children.push(parseTreeImportVariables); parseTreeImportVariables.children.push(parseTreeTransclude); diff --git a/core/templates/exporters/StaticRiverContent.tid b/core/templates/exporters/StaticRiverContent.tid index 0b04549f9..3d42be807 100644 --- a/core/templates/exporters/StaticRiverContent.tid +++ b/core/templates/exporters/StaticRiverContent.tid @@ -3,5 +3,5 @@ title: $:/core/templates/exporters/StaticRiver/Content \define renderContent() {{{ $(exportFilter)$ ||$:/core/templates/static-tiddler}}} \end -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] <> diff --git a/core/templates/exporters/TidFile.tid b/core/templates/exporters/TidFile.tid index 1dbd3503b..7b0bb2d78 100644 --- a/core/templates/exporters/TidFile.tid +++ b/core/templates/exporters/TidFile.tid @@ -7,5 +7,5 @@ condition: [compare:lte[1]] \define renderContent() {{{ $(exportFilter)$ +[limit[1]] ||$:/core/templates/tid-tiddler}}} \end -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] <> \ No newline at end of file diff --git a/core/templates/external-js/save-all-external-js.tid b/core/templates/external-js/save-all-external-js.tid index 2616fed20..ff5bbc851 100644 --- a/core/templates/external-js/save-all-external-js.tid +++ b/core/templates/external-js/save-all-external-js.tid @@ -1,11 +1,14 @@ title: $:/core/save/all-external-js \whitespace trim -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] \define saveTiddlerFilter() [is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$ \end + + \define defaultCoreURL() %24%3A%2Fcore%2Ftemplates%2Ftiddlywiki5.js + <$let coreURL={{{ [[coreURL]is[variable]thenelse] }}}> {{$:/core/templates/tiddlywiki5-external-js.html}} diff --git a/core/templates/external-js/save-offline-external-js.tid b/core/templates/external-js/save-offline-external-js.tid index 01ae88aa0..564a34948 100644 --- a/core/templates/external-js/save-offline-external-js.tid +++ b/core/templates/external-js/save-offline-external-js.tid @@ -1,7 +1,7 @@ title: $:/core/save/offline-external-js \whitespace trim -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] \define saveTiddlerFilter() [is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$ \end diff --git a/core/templates/save-all.tid b/core/templates/save-all.tid index b298ad49f..d7473ba5b 100644 --- a/core/templates/save-all.tid +++ b/core/templates/save-all.tid @@ -1,6 +1,6 @@ title: $:/core/save/all -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] \define saveTiddlerFilter() [is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$ \end diff --git a/core/templates/server/static.tiddler.html.tid b/core/templates/server/static.tiddler.html.tid index 1a803bd86..a8409e50f 100644 --- a/core/templates/server/static.tiddler.html.tid +++ b/core/templates/server/static.tiddler.html.tid @@ -2,7 +2,7 @@ title: $:/core/templates/server/static.tiddler.html \whitespace trim \define tv-wikilink-template() $uri_encoded$ -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] diff --git a/core/templates/single.tiddler.window.tid b/core/templates/single.tiddler.window.tid index 0d14509e5..aa5175c01 100644 --- a/core/templates/single.tiddler.window.tid +++ b/core/templates/single.tiddler.window.tid @@ -4,7 +4,7 @@ title: $:/core/templates/single.tiddler.window \define containerClasses() tc-page-container tc-page-view-$(storyviewTitle)$ tc-language-$(languageTitle)$ \end -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] <$vars tv-config-toolbar-icons={{$:/config/Toolbar/Icons}} diff --git a/core/templates/static.tiddler.html.tid b/core/templates/static.tiddler.html.tid index a4537305a..f90818464 100644 --- a/core/templates/static.tiddler.html.tid +++ b/core/templates/static.tiddler.html.tid @@ -4,7 +4,7 @@ title: $:/core/templates/static.tiddler.html \define tv-config-toolbar-icons() no \define tv-config-toolbar-text() no \define tv-config-toolbar-class() tc-btn-invisible -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] ` diff --git a/core/ui/ControlPanel/Modals/AddPlugins.tid b/core/ui/ControlPanel/Modals/AddPlugins.tid index ce8612b72..56d3d5085 100644 --- a/core/ui/ControlPanel/Modals/AddPlugins.tid +++ b/core/ui/ControlPanel/Modals/AddPlugins.tid @@ -211,7 +211,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$ \end -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] \whitespace trim
diff --git a/core/ui/EditTemplate/Preview/output.tid b/core/ui/EditTemplate/Preview/output.tid index 4e5bf0e33..5c53d8c22 100644 --- a/core/ui/EditTemplate/Preview/output.tid +++ b/core/ui/EditTemplate/Preview/output.tid @@ -2,7 +2,7 @@ title: $:/core/ui/EditTemplate/body/preview/output tags: $:/tags/EditPreview caption: {{$:/language/EditTemplate/Body/Preview/Type/Output}} -\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]] [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!has[draft.of]] +\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View/Body]!is[draft]] <$set name="tv-tiddler-preview" value="yes"> <$transclude tiddler={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateBodyFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/body/default]] }}} /> diff --git a/core/ui/PageStylesheet.tid b/core/ui/PageStylesheet.tid index f7df349e9..0b32df5f8 100644 --- a/core/ui/PageStylesheet.tid +++ b/core/ui/PageStylesheet.tid @@ -1,6 +1,6 @@ title: $:/core/ui/PageStylesheet -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] \whitespace trim <$set name="currentTiddler" value={{$:/language}}> diff --git a/core/ui/PageTemplate.tid b/core/ui/PageTemplate.tid index 892e1b166..f0ab4852a 100644 --- a/core/ui/PageTemplate.tid +++ b/core/ui/PageTemplate.tid @@ -4,7 +4,7 @@ description: {{$:/language/PageTemplate/Description}} icon: $:/core/images/layout-button \whitespace trim -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] <$vars tv-config-toolbar-icons={{$:/config/Toolbar/Icons}} diff --git a/core/ui/StoryTiddlerTemplate.tid b/core/ui/StoryTiddlerTemplate.tid index 7379f00b1..7cc26a849 100644 --- a/core/ui/StoryTiddlerTemplate.tid +++ b/core/ui/StoryTiddlerTemplate.tid @@ -1,3 +1,3 @@ title: $:/core/ui/StoryTiddlerTemplate -<$transclude tiddler={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/StoryTiddlerTemplateFilter]!is[draft]get[text]] :and[!is[blank]else{$:/config/ui/ViewTemplate}] }}} /> +<$transclude tiddler={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/StoryTiddlerTemplateFilter]!is[draft]get[text]] :and[has[title]else[$:/core/ui/ViewTemplate]] }}} /> diff --git a/core/ui/ViewTemplate.tid b/core/ui/ViewTemplate.tid index f0aba9c97..dcba5c953 100644 --- a/core/ui/ViewTemplate.tid +++ b/core/ui/ViewTemplate.tid @@ -5,10 +5,10 @@ title: $:/core/ui/ViewTemplate $:/state/folded/$(currentTiddler)$ \end \define cancel-delete-tiddler-actions(message) <$action-sendmessage $message="tm-$message$-tiddler"/> -\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]] +\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View]!is[draft]] <$vars storyTiddler=<> tiddlerInfoState=<>>
> data-tags={{!!tags}} class={{{ [all[shadows+tiddlers]tag[$:/tags/ClassFilters/TiddlerTemplate]!is[draft]] :map:flat[subfilter{!!text}] tc-tiddler-frame tc-tiddler-view-frame [is[tiddler]then[tc-tiddler-exists]] [is[missing]!is[shadow]then[tc-tiddler-missing]] [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [is[shadow]is[tiddler]then[tc-tiddler-overridden-shadow]] [is[system]then[tc-tiddler-system]] [{!!class}] [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}} role="article"> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!is[draft]]" variable="listItem"> <$transclude tiddler=<>/>
diff --git a/core/ui/ViewTemplate/body.tid b/core/ui/ViewTemplate/body.tid index 86d83bf30..34e6aaa38 100644 --- a/core/ui/ViewTemplate/body.tid +++ b/core/ui/ViewTemplate/body.tid @@ -1,7 +1,7 @@ title: $:/core/ui/ViewTemplate/body tags: $:/tags/ViewTemplate -\import [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!has[draft.of]] +\import [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View/Body]!is[draft]] <$reveal tag="div" class="tc-tiddler-body" type="nomatch" stateTitle=<> text="hide" retain="yes" animate="yes"> diff --git a/core/wiki/config/GlobalImportFilter.tid b/core/wiki/config/GlobalImportFilter.tid new file mode 100644 index 000000000..4d07e3f37 --- /dev/null +++ b/core/wiki/config/GlobalImportFilter.tid @@ -0,0 +1,2 @@ +title: $:/core/config/GlobalImportFilter +text: [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global]!is[draft]] diff --git a/editions/dev/tiddlers/new/dragndropinterop.html b/editions/dev/tiddlers/new/dragndropinterop.html index ecd7aba12..ecadca603 100644 --- a/editions/dev/tiddlers/new/dragndropinterop.html +++ b/editions/dev/tiddlers/new/dragndropinterop.html @@ -15,6 +15,10 @@
Drag me to a TiddlyWiki window
+ + \ No newline at end of file diff --git a/editions/dynaviewdemo/tiddlers/ViewTemplate.tid b/editions/dynaviewdemo/tiddlers/ViewTemplate.tid index cbf6eca2a..91bcfae86 100644 --- a/editions/dynaviewdemo/tiddlers/ViewTemplate.tid +++ b/editions/dynaviewdemo/tiddlers/ViewTemplate.tid @@ -5,7 +5,7 @@ title: $:/core/ui/ViewTemplate $:/state/folded/$(currentTiddler)$ \end \define cancel-delete-tiddler-actions(message) <$action-sendmessage $message="tm-$message$-tiddler"/> -\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]] +\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View]!is[draft]] <$vars storyTiddler=<> tiddlerInfoState=<>>
> data-tags={{!!tags}} class={{{ tc-tiddler-frame tc-tiddler-view-frame [is[tiddler]then[tc-tiddler-exists]] [is[missing]!is[shadow]then[tc-tiddler-missing]] [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [is[shadow]is[tiddler]then[tc-tiddler-overridden-shadow]] [is[system]then[tc-tiddler-system]] [{!!class}] [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}}> <$set name="state" value={{{ [[$:/state/viewtemplate/visibility/]addsuffix] }}}> diff --git a/editions/fr-FR/tiddlers/ReadMe.tid b/editions/fr-FR/tiddlers/ReadMe.tid index b02b564cb..aedcfd423 100644 --- a/editions/fr-FR/tiddlers/ReadMe.tid +++ b/editions/fr-FR/tiddlers/ReadMe.tid @@ -5,7 +5,7 @@ type: text/vnd.tiddlywiki \define tv-wikilink-template() https://tiddlywiki.com/static/$uri_doubleencoded$.html -<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]"> +<$importvariables filter={{$:/core/config/GlobalImportFilter}}> Bienvenue sur <>, un carnet de notes personnel web et non-linéaire que tout le monde peut utiliser et conserver, sans dépendre d'une quelconque entreprise. diff --git a/editions/prerelease/tiddlers/Release 5.3.0.tid b/editions/prerelease/tiddlers/Release 5.3.0.tid index 63a57cd4d..4c9e9b916 100644 --- a/editions/prerelease/tiddlers/Release 5.3.0.tid +++ b/editions/prerelease/tiddlers/Release 5.3.0.tid @@ -1,19 +1,19 @@ caption: 5.3.0 -created: 20230419103154368 -modified: 20230419103154368 +created: 20230506164543446 +modified: 20230506164543446 tags: ReleaseNotes title: Release 5.3.0 type: text/vnd.tiddlywiki -//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/master...parameterised-transclusions]]// +//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.7...master]]// -! About v5.3.0 +! Overview of v5.3.0 -This pre-release introduces a number of significant improvements and new features related to some of TiddlyWiki's most fundamental components: macros, widgets, operators and transclusion. +This release introduces a number of significant improvements and new features related to some of TiddlyWiki's most fundamental components: macros, widgets, operators and transclusion. v5.3.0 also contains several other bug fixes and improvements. -! Introduction to v5.3.0 +! Introduction to Parameterised Transclusion, Procedures, Functions and Custom Widgets -The motivation of these changes is to fix one of ~TiddlyWiki 5's early design flaws: the reliance on macros using textual substitution as the primary way to modularise and reuse wikitext and filters. +<<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6666">> The motivation of these changes is to fix one of ~TiddlyWiki 5's early design flaws: the reliance on macros using textual substitution as the primary way to modularise and reuse wikitext and filters. Experience has shown that while macros are a good match for a small number of tasks, they are brittle and error prone for many common operations. See [[Macro Pitfalls]] for a discussion of the problems that accompany this approach. Over the years we have introduced mitigations for the worst problems but these have come at a cost of increased complexity. @@ -32,7 +32,8 @@ The new transclusion architecture is not by itself sufficient to enable us to fu ! Plugin Improvements -* +* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7260">> Dynannotate pugin to support three additional search modes +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7365">> problem with [[BrowserStorage Plugin]] unnecessarily saving shadow tiddlers ! Translation improvement @@ -54,30 +55,52 @@ Improvements to the following translations: ! Filter improvements -* +* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7292">> [[format Operator]] to support converting Unix timestamps to TiddlyWiki's native date format ! Hackability Improvements -* +* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7413">> [[Core Icons]] to allow the size to be controlled with a parameter +** <<.warning """This change can cause problems with non-standard usage of the core icons where the text is directly rendered instead of being transcluded""">> +* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7182">> new [[thisTiddler Variable]] that refers to the tiddler currently being rendered +* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7332">> [[Story Tiddler Template Cascade]] handling to fall back to the default template if the output of the cascade is not valid +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7378">> missing file extensions for "audio/mpeg" files ! Bug Fixes -* +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7215">> importing tiddlers by pasting tiddler data +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7400">> unneeded 14px bottom border for textareas with autoheight enabled +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7380">> crashes when using an invalid CSS selector for [[WidgetMessage: tm-focus-selector]] and [[WidgetMessage: tm-scroll]] +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7401">> bug whereby scrolling occurs if the linkcatcher widget triggers an action-navigate and the $scroll attribute is set to "no" +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7409">> problem switching between LTR and RTL text ! Developer Improvements -* +* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/6699">> support for a `destroy()` method for widgets, giving them a chance to dispose of any resources ! Node.js Improvements -* +* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7253">> support for `filepath` source attribute to [[tiddlywiki.files Files]] ! Performance Improvements -* +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/4624">> module execution to reuse the same sandbox, saving memory and improving performance + ! Acknowledgements [[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki: <<.contributors """ +Arlen22 +btheado +donmor +flibbles +GameDungeon +kookma +linonetwo +Marxsal +michsa +muzimuzhi +pmario +saqimtiaz +yaisog """>> diff --git a/editions/server-external-js/tiddlers/config/$__DefaultTiddlers.tid b/editions/server-external-js/tiddlers/config/$__DefaultTiddlers.tid new file mode 100644 index 000000000..a1f1a0a27 --- /dev/null +++ b/editions/server-external-js/tiddlers/config/$__DefaultTiddlers.tid @@ -0,0 +1,7 @@ +created: 20230314153132081 +modified: 20230314153243008 +title: $:/DefaultTiddlers +type: text/vnd.tiddlywiki + +GettingStarted +[[Using the external JavaScript template]] diff --git a/editions/server-external-js/tiddlers/config/$__config_SaveWikiButton_Filename.tid b/editions/server-external-js/tiddlers/config/$__config_SaveWikiButton_Filename.tid new file mode 100644 index 000000000..071c85fe9 --- /dev/null +++ b/editions/server-external-js/tiddlers/config/$__config_SaveWikiButton_Filename.tid @@ -0,0 +1,4 @@ +title: $:/config/SaveWikiButton/Filename +type: text/vnd.tiddlywiki + +external-<>.html \ No newline at end of file diff --git a/editions/server-external-js/tiddlers/external/tiddlywiki.files b/editions/server-external-js/tiddlers/external/tiddlywiki.files new file mode 100644 index 000000000..73474d2ce --- /dev/null +++ b/editions/server-external-js/tiddlers/external/tiddlywiki.files @@ -0,0 +1,8 @@ +{ + "tiddlers": [ + { + "file": "../../../tw5.com/tiddlers/webserver/Using the external JavaScript template.tid", + "isTiddlerFile": true + } + ] +} \ No newline at end of file diff --git a/editions/server-external-js/tiddlywiki.info b/editions/server-external-js/tiddlywiki.info index b8d4c37ee..cb02accd5 100644 --- a/editions/server-external-js/tiddlywiki.info +++ b/editions/server-external-js/tiddlywiki.info @@ -2,8 +2,7 @@ "description": "Client-server edition with external tiddlywiki.js", "plugins": [ "tiddlywiki/tiddlyweb", - "tiddlywiki/filesystem", - "tiddlywiki/highlight" + "tiddlywiki/filesystem" ], "themes": [ "tiddlywiki/vanilla", @@ -13,7 +12,7 @@ "listen": [ "--listen","root-tiddler=$:/core/save/all-external-js","use-browser-cache=yes"], "index": [ - "--render","$:/core/save/offline-external-js","index.html","text/plain", + "--render","$:/core/save/offline-external-js","[[external-]addsuffixaddsuffix[.html]]","text/plain", "--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffixaddsuffix[.js]]","text/plain"], "static": [ "--render","$:/core/templates/static.template.html","static.html","text/plain", diff --git a/editions/test/tiddlers/tests/data/this-tiddler/Simple.tid b/editions/test/tiddlers/tests/data/this-tiddler/Simple.tid new file mode 100644 index 000000000..4aad83c98 --- /dev/null +++ b/editions/test/tiddlers/tests/data/this-tiddler/Simple.tid @@ -0,0 +1,29 @@ +title: ThisTiddler/Simple +description: Simple usage of thisTiddler variable +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\whitespace trim +\import Macro +\define print-this-tiddler() +<$text text=<>/> +\end + +(<$text text=<>/>) + +(<>) + +(<>) + ++ +title: Macro + +\define imported-print-this-tiddler() +<$text text=<>/> +\end ++ +title: ExpectedResult + +

(Output)

(Output)

(Output)

\ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-filters.js b/editions/test/tiddlers/tests/test-filters.js index e00d0bf8d..49a790166 100644 --- a/editions/test/tiddlers/tests/test-filters.js +++ b/editions/test/tiddlers/tests/test-filters.js @@ -1060,6 +1060,9 @@ Tests the filtering mechanism. expect(wiki.filterTiddlers("[[Hello There]] [[GettingStarted]] +[format:titlelist[]]").join(" ")).toBe("[[Hello There]] GettingStarted"); expect(wiki.filterTiddlers("[title[Hello There]] +[format:titlelist[]]").join(" ")).toBe("[[Hello There]]"); expect(wiki.filterTiddlers("[title[HelloThere]] +[format:titlelist[]]").join(" ")).toBe("HelloThere"); + expect(wiki.filterTiddlers("0 +[format:timestamp[]]").join(",")).toBe("19700101000000000"); + expect(wiki.filterTiddlers("1603188514443 +[format:timestamp[]]").join(",")).toBe("20201020100834443"); + expect(wiki.filterTiddlers("void +[format:timestamp[]]").join(",")).toBe(""); }); it("should handle the deserializers operator", function() { diff --git a/editions/tw5.com/tiddlers/customising/Customising TiddlyWiki's user interface.tid b/editions/tw5.com/tiddlers/customising/Customising TiddlyWiki's user interface.tid index 78990f453..bf3357fae 100644 --- a/editions/tw5.com/tiddlers/customising/Customising TiddlyWiki's user interface.tid +++ b/editions/tw5.com/tiddlers/customising/Customising TiddlyWiki's user interface.tid @@ -45,7 +45,7 @@ Special tags assign special behaviour or appearance to all of the tiddlers to wh For example: -* $:/tags/Macro causes the macros defined in a tiddler to be available globally +* $:/tags/Global causes the definitions in a tiddler to be available globally * $:/tags/Stylesheet causes the tiddler to be interpreted as a CSS stylesheet * $:/tags/SideBar causes the tiddler to be displayed as a sidebar tab diff --git a/editions/tw5.com/tiddlers/demonstrations/ImageGallery Example.tid b/editions/tw5.com/tiddlers/demonstrations/ImageGallery Example.tid index c9df4ac0b..e702b16b7 100644 --- a/editions/tw5.com/tiddlers/demonstrations/ImageGallery Example.tid +++ b/editions/tw5.com/tiddlers/demonstrations/ImageGallery Example.tid @@ -1,6 +1,5 @@ created: 20140809113603449 modified: 20211022195248529 -tags: Learning title: ImageGallery Example type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/features/Core Icons.tid b/editions/tw5.com/tiddlers/features/Core Icons.tid new file mode 100644 index 000000000..9799f48d7 --- /dev/null +++ b/editions/tw5.com/tiddlers/features/Core Icons.tid @@ -0,0 +1,41 @@ +title: Core Icons +tags: Features +modified: 20230423103154329 +created: 20230423103154329 + + +!! Introduction + +TiddlyWiki includes over 100 custom vector icons. They feature in the user interface and are also available for authors to use in their own applications. See [[Icon Gallery]] for a complete listing. + +!! Usage + +The core icons are used by transcluding them. For example: + +<> + +The core icons are parameterised. The first parameter `size` specified the size at which the icon should be rendered: + +< +""">> + +Here is an example of dynamically resizing icons: + +< +<$text text={{{ [addsuffix[px]] }}} /> +<$transclude $tiddler="$:/core/icon" size=<>/> + +""">> + +Some icons take further parameters to customise how they are rendered. For example, the $:/core/images/new-journal-button icon takes an additional parameter `day` that specifies the day of the month that should be shown on the calendar. It defaults to the current date if not specified + +< +""">> + +The core icons are implemented as embedded [[SVG elements|Using SVG]], and not as full-blown SVG images. This means that they can be styled using CSS. For example, the CSS property `fill` can be used to change the colour of the icons. For example: + +<{{$:/core/images/opacity}} +""">> diff --git a/editions/tw5.com/tiddlers/features/StartupActions.tid b/editions/tw5.com/tiddlers/features/StartupActions.tid index 29edb8378..596b92564 100644 --- a/editions/tw5.com/tiddlers/features/StartupActions.tid +++ b/editions/tw5.com/tiddlers/features/StartupActions.tid @@ -36,7 +36,7 @@ The initial startup actions are useful for customising TiddlyWiki according to e Note that global macros are not available within initial startup action tiddlers by default. If you need to access them then you'll need to explicitly include them with an [[Pragma: \import]] at the top of the tiddler: ``` -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] ``` !! Post-Render Startup Actions diff --git a/editions/tw5.com/tiddlers/filters/examples/format Operator (Examples).tid b/editions/tw5.com/tiddlers/filters/examples/format Operator (Examples).tid index c1d79ea8c..b6ad505a1 100644 --- a/editions/tw5.com/tiddlers/filters/examples/format Operator (Examples).tid +++ b/editions/tw5.com/tiddlers/filters/examples/format Operator (Examples).tid @@ -1,5 +1,5 @@ created: 20201020102735123 -modified: 20220611104737314 +modified: 20230226135641976 tags: [[Operator Examples]] [[format Operator]] title: format Operator (Examples) type: text/vnd.tiddlywiki @@ -15,20 +15,23 @@ Created date with a format string supplied as operator parameter: Modified date shown as a relative date: <<.operator-example 3 "[[HelloThere]get[modified]format:relativedate[]]">> +Get the date and time exactly 24 hours (86,400,000 milliseconds) from now: +<<.operator-example 4 "[format:date[TIMESTAMP]add[86400000]format:timestamp[DDth mmm YYYY 0hh:0mm:0ss]]">> + A tiddler title with spaces formatted as a title list: -<<.operator-example 4 """[[Hello There]format:titlelist[]]""">> +<<.operator-example 5 """[[Hello There]format:titlelist[]]""">> All tiddler titles tagged with <> formatted as a title list: -<<.operator-example 5 """[tag[TableOfContents]format:titlelist[]]""">> +<<.operator-example 6 """[tag[TableOfContents]format:titlelist[]]""">> A JSON string formatted as JSON – note how the JSON string is normalised to remove the duplicated properties: -<<.operator-example 6 """[[{"one":"first","one":"another","two":"second"}]format:json[]]""">> +<<.operator-example 7 """[[{"one":"first","one":"another","two":"second"}]format:json[]]""">> <<.tip "To create a string to save a [[title list|Title List]] into a list field, use `format:titlelist[]` with the [[join operator|join Operator]]">> -<<.operator-example 6 """[tag[TableOfContents]format:titlelist[]join[ ]]""">> +<<.operator-example 8 """[tag[TableOfContents]format:titlelist[]join[ ]]""">> For example, to save titles tagged `TableOfContents` to the titles field of the tiddler [[format titlelist test]]: <$macrocall $name='wikitext-example-without-html' -src='<$button> test +src='<$button>Try it <$action-setfield $tiddler="format titlelist test" titles={{{ [tag[TableOfContents]format:titlelist[]join[ ]] }}}/> '/> diff --git a/editions/tw5.com/tiddlers/filters/format.tid b/editions/tw5.com/tiddlers/filters/format.tid index e5b12b134..d62a82169 100644 --- a/editions/tw5.com/tiddlers/filters/format.tid +++ b/editions/tw5.com/tiddlers/filters/format.tid @@ -20,8 +20,11 @@ The suffix <<.place B>> is one of the following supported string formats: |^`date` |The input string is interpreted as a UTC date and displayed according to the DateFormat specified in the optional operator operand. (Defaults to "YYYY MM DD 0hh:0mm") | |^`json` |<<.from-version "5.2.4">> The input string is interpreted as JSON and displayed with standard formatting. The optional operator operand specifies the number of spaces to use for indenting, or a string to use for indenting. Nothing is returned if the input string is not valid JSON | |^`relativedate` |The input string is interpreted as a UTC date and displayed as the interval from the present instant. Any operator parameters are ignored | +|^`timestamp` |<<.from-version "5.3.0">> The input string is interpreted as number of milliseconds since the [[ECMAScript epoch|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps]], 1 January 1970, and displayed according to the DateFormat specified in the optional operator operand. (Defaults to "[UTC]YYYY0MM0DD0hh0mm0ss0XXX") | |^`titlelist` |<<.from-version "5.2.0">> The input string wrapped in double square brackets if it contains a space. Appropriate for use in a [[title list|Title List]]. | +Invalid input strings are dropped by the <<.op format>> operator. + <<.warning """The [[Title List]] format cannot reliably represent items that contain certain specific character sequences such as `]] `. Thus it should not be used where there is a possibility of such sequences occurring.""">> <<.operator-examples "format">> diff --git a/editions/tw5.com/tiddlers/howtos/How to create keyboard shortcuts.tid b/editions/tw5.com/tiddlers/howtos/How to create keyboard shortcuts.tid index 16243cd54..a149b7539 100644 --- a/editions/tw5.com/tiddlers/howtos/How to create keyboard shortcuts.tid +++ b/editions/tw5.com/tiddlers/howtos/How to create keyboard shortcuts.tid @@ -77,11 +77,11 @@ In the [[Keyboard Shortcuts Tab|$:/core/ui/ControlPanel/KeyboardShortcuts]] the > If the tiddler has the tag <>, the field ''key'' with the [[Keyboard Shortcut Descriptor]] as its value and some actions in its text field, the actions will be triggered when the mechanism detects the configured key-combination
-<$macrocall $name=".tip" _="""''Macros'' defined ''outside'' a global keyboard-shortcut (through a tiddler tagged `$:/tags/Macro`) need to be ''imported'' in order to be accessible. +<$macrocall $name=".tip" _="""''Macros'' defined ''outside'' a global keyboard-shortcut (through a tiddler tagged `$:/tags/Global`) need to be ''imported'' in order to be accessible. The [[import pragma|Pragma]] can be used for that"""/>
-\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
+\import [subfilter{$:/core/config/GlobalImportFilter}]
 
If the tiddler that contains the macro definition is known and - for example - titled `my-macro-tiddler` diff --git a/editions/tw5.com/tiddlers/images/Icon Gallery.tid b/editions/tw5.com/tiddlers/images/Icon Gallery.tid index 9985cbc0f..acd710a05 100644 --- a/editions/tw5.com/tiddlers/images/Icon Gallery.tid +++ b/editions/tw5.com/tiddlers/images/Icon Gallery.tid @@ -1,6 +1,6 @@ created: 20211013132515594 modified: 20211018102307833 -tags: Learning +tags: Learning [[Core Icons]] title: Icon Gallery type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/images/Reddit Logo.tid b/editions/tw5.com/tiddlers/images/Reddit Logo.tid index 76bb6bf7c..f4153ebb0 100644 --- a/editions/tw5.com/tiddlers/images/Reddit Logo.tid +++ b/editions/tw5.com/tiddlers/images/Reddit Logo.tid @@ -1,6 +1,7 @@ title: Reddit Logo - +\parameters (size:"22pt") +> height=<> viewBox="0 0 20 20"> diff --git a/editions/tw5.com/tiddlers/nodejs/tiddlywiki.files_Files.tid b/editions/tw5.com/tiddlers/nodejs/tiddlywiki.files_Files.tid index 6086dfebc..87ddf9b40 100644 --- a/editions/tw5.com/tiddlers/nodejs/tiddlywiki.files_Files.tid +++ b/editions/tw5.com/tiddlers/nodejs/tiddlywiki.files_Files.tid @@ -29,6 +29,8 @@ Each field can be specified as either a ''string'' or ''array'' value to be assi ** //extname// the extension of the filename of the file containing the tiddler ** //created// the creation date/time of the file containing the tiddler ** //modified// the modification date/time of the file containing the tiddler +** <<.from-version "5.3.0">> //filepath// the path of the file containing the tiddler, relative to the ''path'' property of the directory (only usable in ''directories'' declarations) +** <<.from-version "5.3.0">> //subdirectories// an array of the subdirectories in the file's path relative, to the ''path'' property of the directory (only usable in ''directories'' declarations) * ''prefix'' - (optional) a string to be prepended to the value of the field * ''suffix'' - (optional) a string to be appended to the value of the field @@ -52,7 +54,7 @@ Directory specifications in the `directories` array may take the following forms ** ''filesRegExp'' - (optional) a [[regular expression|https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions]] that matches the filenames of the files that should be processed within the directory ** ''isTiddlerFile'' - (required) if `true`, the file will be treated as a [[tiddler file|TiddlerFiles]] and deserialised to extract the tiddlers. Otherwise, the raw content of the file is assigned to the `text` field without any parsing ** ''isEditableFile'' - <<.from-version "5.1.23">> (optional) if `true`, changes to the tiddler be saved back to the original file. The tiddler will be saved back to the original filepath as long as it does not generate a result from the $:/config/FileSystemPath filters, which will override the final filepath generated if a result is returned from a filter. -** ''searchSubdirectories'' - <<.from-version "5.1.23">> (optional) if `true`, all subdirectories of the //path// are searched recursively for files that match the (optional) //filesRegExp//. If no //filesRegExp// is provided, all files in all subdirectories of the //path// are loaded. Tiddler titles generated via a //source// attribute (see above) will only include the filename, not any of the subdirectories of the path. If this results in multiple files with loaded with the same tiddler title, then only the last file loaded under that tiddler title will be in memory. In order to prevent this, you must have multiple directory objects listed and customise the title field with a //prefix// or //suffix// alongside the //source// attribute. +** ''searchSubdirectories'' - <<.from-version "5.1.23">> (optional) if `true`, all subdirectories of the //path// are searched recursively for files that match the (optional) //filesRegExp//. If no //filesRegExp// is provided, all files in all subdirectories of the //path// are loaded. Tiddler titles generated via the //source// attribute //filename// (see above) will only include the filename, not any of the subdirectories of the path. If this results in multiple files with loaded with the same tiddler title, then only the last file loaded under that tiddler title will be in memory. In order to prevent this, you can use the //filepath// attribute instead of //filename//. Alternately, you can include multiple directory objects and customise the title field with a //prefix// or //suffix// alongside the //source// attribute. ** ''fields'' - (required) an object containing values that override or customise the fields provided in the tiddler file (see above) Fields can also be overridden for particular files by creating a file with the same name plus the suffix `.meta` -- see TiddlerFiles. @@ -95,6 +97,7 @@ This example retrieves all the files with the extension `.pdf` from a folder spe ] } ``` + !! Importing a folder of text files This example retrieves all the files with the extension `.txt` from a folder specified by a relative path. This folder is within the wiki's base directory, and the current config file is in a directory within the wiki's "tiddlers/" directory. So, in this case the path starts with "../../" to traverse upwards two directory levels, and then down into the "externalnotes/" directory. Each tiddler is set up with the following fields: @@ -130,4 +133,39 @@ This will load all text files in the `../../externalnotes/` directory into the w From the examples in [[Customising Tiddler File Naming]] we see that the final `[!tag[externalnote]addprefix[wiki/]]` filter in the $:/config/FileSystemPaths tiddler excludes all tiddlers tagged with `externalnotes` (that have not matched an earlier filter). These tiddlers have their filepath retrieved from the $:/config/OriginalTiddlerPaths generated upon boot startup. -Then, the `[tag[.txt]then[.txt]]` filter in the $:/config/FileSystemExtensions tiddler forces all these tiddlers to be saved back to disk as *.txt and accompanying *.txt.meta files (overriding the normal tiddler-type to file-type mapping). In this case, allowing the snippets of Tiddlywiki wikitext or markdown-text to be saved back to "text" *.txt files. \ No newline at end of file +Then, the `[tag[.txt]then[.txt]]` filter in the $:/config/FileSystemExtensions tiddler forces all these tiddlers to be saved back to disk as *.txt and accompanying *.txt.meta files (overriding the normal tiddler-type to file-type mapping). In this case, allowing the snippets of Tiddlywiki wikitext or markdown-text to be saved back to "text" *.txt files. + +!! Importing and auto-tagging images + +This example imports all the image files in the `files` directory and all its subdirectories as external-image tiddlers, and tags them based on their filepath. Each tiddler is set up with the following fields: + +* ''title'' - set to the URI decoded base filename of the text file +* ''created'' - set to the creation date/time of the text file +* ''modified'' - set to the modification date/time of the text file +* ''type'' - set to `image/jpeg`. There is currently no way to infer the correct ContentType of the image tiddler from the file, but `image/jpeg` tiddlers should render correctly even with png or gif images. As an alternative, you could create separate definitions for jpg, png, and gif files with the `image/jpeg`, `image/png`, and `image/gif` types respectively. +* ''tags'' - generated based on the path of the image relative to the parent directory (`files` in this case). Eg, images in `files/photos` will be tagged with `photos`, those in `files/photos/family` will be tagged with both `photos` and `family`, and those in the root `files` directory will have no tags. +* ''text'' - set to an empty string +* ''_canonical_uri'' - set to the full filepath of the image relative to the wiki root + + +``` +{ + "directories": [ + { + "path": "../../files/", + "filesRegExp": "^.*\\.(?:jpg|jpeg|png|gif)$", + "isTiddlerFile": false, + "searchSubdirectories": true, + "fields": { + "title": {"source": "basename-uri-decoded"}, + "created": {"source": "created"}, + "modified": {"source": "modified"}, + "type": "image/jpeg", + "tags": { "source": "subdirectories" }, + "text": "", + "_canonical_uri": { "source": "filepath", "prefix": "files/" } + } + } + ] +} +``` diff --git a/editions/tw5.com/tiddlers/pragmas/Pragma_ _import.tid b/editions/tw5.com/tiddlers/pragmas/Pragma_ _import.tid index 5971a5490..121ba8525 100644 --- a/editions/tw5.com/tiddlers/pragmas/Pragma_ _import.tid +++ b/editions/tw5.com/tiddlers/pragmas/Pragma_ _import.tid @@ -13,5 +13,5 @@ The ''\import'' [[pragma|Pragmas]] is used to import definitions from other tidd For example: ``` -\import [all[shadows+tiddlers]tag[$:/tags/Macro]] +\import [all[shadows+tiddlers]tag[$:/tags/Global]] ``` diff --git a/editions/tw5.com/tiddlers/procedures/Procedure Calls.tid b/editions/tw5.com/tiddlers/procedures/Procedure Calls.tid index d66d8f274..0078d5396 100644 --- a/editions/tw5.com/tiddlers/procedures/Procedure Calls.tid +++ b/editions/tw5.com/tiddlers/procedures/Procedure Calls.tid @@ -1,4 +1,4 @@ -caption: Macro Calls +caption: Procedure Calls created: 20221007130006705 modified: 20230419103154329 tags: WikiText Procedures @@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki !! Introduction -This tiddler describes the different ways in which [[macros|Procedures]] can be called. +This tiddler describes the different ways in which [[procedure|Procedures]] can be called. !! Procedure Call Transclusion Shortcut diff --git a/editions/tw5.com/tiddlers/procedures/Procedure Definitions.tid b/editions/tw5.com/tiddlers/procedures/Procedure Definitions.tid index e108f219d..4eb1f17ff 100644 --- a/editions/tw5.com/tiddlers/procedures/Procedure Definitions.tid +++ b/editions/tw5.com/tiddlers/procedures/Procedure Definitions.tid @@ -34,10 +34,10 @@ Procedures are implemented as a special kind of [[variable|Variables]] and so in The [[Pragma: \import]] or <<.wlink ImportVariablesWidget>> widget can be used to copy procedure definitions from another tiddler. -!! `$:/tags/Macro` Tag +!! `$:/tags/Global` Tag -Global procedures can be defined using the [[SystemTag: $:/tags/Macro]]. +Global procedures can be defined using the [[SystemTag: $:/tags/Global]]. -The tag [[SystemTag: $:/tags/Macro/View]] is used to define procedures that should only be available within the main view template and the preview panel. +The tag [[SystemTag: $:/tags/Global/View]] is used to define procedures that should only be available within the main view template and the preview panel. -The tag [[SystemTag: $:/tags/Macro/View/Body]] is used to define procedures that should only be available within the main view template body and the preview panel. +The tag [[SystemTag: $:/tags/Global/View/Body]] is used to define procedures that should only be available within the main view template body and the preview panel. diff --git a/editions/tw5.com/tiddlers/readme/ReadMe.tid b/editions/tw5.com/tiddlers/readme/ReadMe.tid index 615b3ab68..2fbf83eab 100644 --- a/editions/tw5.com/tiddlers/readme/ReadMe.tid +++ b/editions/tw5.com/tiddlers/readme/ReadMe.tid @@ -4,7 +4,7 @@ title: ReadMe type: text/vnd.tiddlywiki \define tv-wikilink-template() https://tiddlywiki.com/static/$uri_doubleencoded$.html -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] Welcome to TiddlyWiki, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation. diff --git a/editions/tw5.com/tiddlers/system/$__SplashScreen.tid b/editions/tw5.com/tiddlers/system/$__SplashScreen.tid index 7d632140f..a4301de46 100644 --- a/editions/tw5.com/tiddlers/system/$__SplashScreen.tid +++ b/editions/tw5.com/tiddlers/system/$__SplashScreen.tid @@ -4,7 +4,14 @@ tags: $:/tags/RawMarkupWikified/TopBody title: $:/SplashScreen type: text/vnd.tiddlywiki -\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] +\import [subfilter{$:/core/config/GlobalImportFilter}] + +\procedure show-icon(title) +<$wikify name="icon" text={{{ [addprefix[{{]addsuffix[}}]] }}} output="html"> +<$text text=<>/> + +\end + \rules only filteredtranscludeinline transcludeinline macrocallinline