diff --git a/.gitignore b/.gitignore index 0ab5b300f..412759161 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ node_modules/ /test-results/ /playwright-report/ /playwright/.cache/ +$__StoryList.tid diff --git a/bin/build-site.sh b/bin/build-site.sh index 5b36de4e1..a2193953d 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.3.2 + TW5_BUILD_VERSION=v5.3.3 fi echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]" @@ -156,6 +156,28 @@ node $TW5_BUILD_TIDDLYWIKI \ --build index favicon static \ || exit 1 +# /tour.html tour edition +node $TW5_BUILD_TIDDLYWIKI \ + ./editions/tour \ + --verbose \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all tour.html text/plain \ + || exit 1 + +# /dev/index.html Developer docs +# /dev/favicon.ico Favicon for dev site +# /dev/static.html Static rendering of default tiddlers +# /dev/alltiddlers.html Static rendering of all tiddlers +# /dev/static/* Static single tiddlers +# /dev/static/static.css Static stylesheet +node $TW5_BUILD_TIDDLYWIKI \ + ./editions/dev \ + --verbose \ + --load $TW5_BUILD_OUTPUT/build.tid \ + --output $TW5_BUILD_OUTPUT/dev \ + --build index favicon static \ + || exit 1 + # /share.html Custom edition for sharing via the URL node $TW5_BUILD_TIDDLYWIKI \ ./editions/share \ diff --git a/boot/boot.js b/boot/boot.js index 1468e00b6..d993499b6 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -177,6 +177,7 @@ document: defaults to current document eventListeners: array of event listeners (this option won't work until $tw.utils.addEventListeners() has been loaded) */ $tw.utils.domMaker = function(tag,options) { + var options = options || {}; var doc = options.document || document; var element = doc.createElementNS(options.namespace || "http://www.w3.org/1999/xhtml",tag); if(options["class"]) { @@ -218,9 +219,34 @@ $tw.utils.error = function(err) { heading = dm("h1",{text: errHeading}), prompt = dm("div",{text: promptMsg, "class": "tc-error-prompt"}), message = dm("div",{text: err, "class":"tc-error-message"}), - button = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}), - form = dm("form",{children: [heading,prompt,message,button], "class": "tc-error-form"}); + closeButton = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}), + downloadButton = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "download tiddlers" : $tw.language.getString("Buttons/EmergencyDownload/Caption") )})], "class": "tc-error-prompt"}), + form = dm("form",{children: [heading,prompt,downloadButton,message,closeButton], "class": "tc-error-form"}); document.body.insertBefore(form,document.body.firstChild); + downloadButton.addEventListener("click",function(event) { + if($tw && $tw.wiki) { + var tiddlers = []; + $tw.wiki.each(function(tiddler,title) { + tiddlers.push(tiddler.fields); + }); + var link = dm("a"), + text = JSON.stringify(tiddlers); + if(Blob !== undefined) { + var blob = new Blob([text], {type: "text/html"}); + link.setAttribute("href", URL.createObjectURL(blob)); + } else { + link.setAttribute("href","data:text/html," + encodeURIComponent(text)); + } + link.setAttribute("download","emergency-tiddlers-" + (new Date()) + ".json"); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } else { + alert("Emergency tiddler download is not available"); + } + event.preventDefault(); + return false; + },true); form.addEventListener("submit",function(event) { document.body.removeChild(form); event.preventDefault(); @@ -786,6 +812,7 @@ $tw.utils.Crypto = function() { } return outputText; }; + $tw.sjcl = sjcl; this.setPassword = function(newPassword) { currentPassword = newPassword; this.updateCryptoStateTiddler(); @@ -1967,10 +1994,10 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) { var value = tiddler[name]; switch(fieldInfo.source) { case "subdirectories": - value = path.relative(rootPath, filename).split('/').slice(0, -1); + value = path.relative(rootPath, filename).split(path.sep).slice(0, -1); break; case "filepath": - value = path.relative(rootPath, filename); + value = path.relative(rootPath, filename).split(path.sep).join('/'); break; case "filename": value = path.basename(filename); @@ -2438,6 +2465,7 @@ $tw.boot.initStartup = function(options) { $tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]}); $tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]}); + $tw.utils.registerFileType("application/wasm","base64",".wasm"); $tw.utils.registerFileType("application/font-woff","base64",".woff"); $tw.utils.registerFileType("application/x-font-ttf","base64",".woff"); $tw.utils.registerFileType("application/font-woff2","base64",".woff2"); @@ -2452,8 +2480,12 @@ $tw.boot.initStartup = function(options) { $tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]); $tw.utils.registerFileType("application/enex+xml","utf8",".enex"); $tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.wordprocessingml.document","base64",".docx"); + $tw.utils.registerFileType("application/msword","base64",".doc"); $tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","base64",".xlsx"); + $tw.utils.registerFileType("application/excel","base64",".xls"); + $tw.utils.registerFileType("application/vnd.ms-excel","base64",".xls"); $tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.presentationml.presentation","base64",".pptx"); + $tw.utils.registerFileType("application/mspowerpoint","base64",".ppt"); $tw.utils.registerFileType("text/x-bibtex","utf8",".bib",{deserializerType:"application/x-bibtex"}); $tw.utils.registerFileType("application/x-bibtex","utf8",".bib"); $tw.utils.registerFileType("application/epub+zip","base64",".epub"); diff --git a/core/copyright.tid b/core/copyright.tid index ce0d6b02f..3f52380cc 100644 --- a/core/copyright.tid +++ b/core/copyright.tid @@ -4,7 +4,7 @@ type: text/plain TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com) Copyright (c) 2004-2007, Jeremy Ruston -Copyright (c) 2007-2023, UnaMesa Association +Copyright (c) 2007-2024, UnaMesa Association All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/images/default-layout.tid b/core/images/default-layout.tid new file mode 100644 index 000000000..4e5295d76 --- /dev/null +++ b/core/images/default-layout.tid @@ -0,0 +1,7 @@ +title: $:/core/images/default-layout +tags: $:/tags/Image + +\parameters (size:"22pt") +> height=<> class="tc-image-default-layout tc-image-button" viewBox="0 0 128 128"> + + \ No newline at end of file diff --git a/core/language/en-GB/Buttons.multids b/core/language/en-GB/Buttons.multids index fa769d117..3ee898b4f 100644 --- a/core/language/en-GB/Buttons.multids +++ b/core/language/en-GB/Buttons.multids @@ -28,6 +28,7 @@ Encryption/ClearPassword/Caption: clear password Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption Encryption/SetPassword/Caption: set password Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption +EmergencyDownload/Caption: download tiddlers as json ExportPage/Caption: export all ExportPage/Hint: Export all tiddlers ExportTiddler/Caption: export tiddler diff --git a/core/language/en-GB/Docs/ModuleTypes.multids b/core/language/en-GB/Docs/ModuleTypes.multids index 9a03d8887..5d5902c76 100644 --- a/core/language/en-GB/Docs/ModuleTypes.multids +++ b/core/language/en-GB/Docs/ModuleTypes.multids @@ -9,7 +9,7 @@ config: Data to be inserted into `$tw.config`. filteroperator: Individual filter operator methods. global: Global data to be inserted into `$tw`. info: Publishes system information via the [[$:/temp/info-plugin]] pseudo-plugin. -isfilteroperator: Operands for the ''is'' filter operator. +isfilteroperator: Parameters for the ''is'' filter operator. library: Generic module type for general purpose JavaScript modules. macro: JavaScript macro definitions. parser: Parsers for different content types. diff --git a/core/language/en-GB/Fields.multids b/core/language/en-GB/Fields.multids index 1330e60a0..68804f082 100644 --- a/core/language/en-GB/Fields.multids +++ b/core/language/en-GB/Fields.multids @@ -4,6 +4,7 @@ _canonical_uri: The full URI of an external image tiddler author: Name of the author of a plugin bag: The name of the bag from which a tiddler came caption: The text to be displayed on a tab or button +class: The CSS class applied to a tiddler when rendering it - see [[Custom styles by user-class]]. Also used for [[Modals]] code-body: The view template will display the tiddler as code if set to ''yes'' color: The CSS color value associated with a tiddler component: The name of the component responsible for an [[alert tiddler|AlertMechanism]] diff --git a/core/language/en-GB/Misc.multids b/core/language/en-GB/Misc.multids index 2c10d1acb..b5e6e2374 100644 --- a/core/language/en-GB/Misc.multids +++ b/core/language/en-GB/Misc.multids @@ -30,7 +30,7 @@ Error/DeserializeOperator/UnknownDeserializer: Filter Error: Unknown deserialize Error/Filter: Filter error Error/FilterSyntax: Syntax error in filter expression Error/FilterRunPrefix: Filter Error: Unknown prefix for filter run -Error/IsFilterOperator: Filter Error: Unknown operand for the 'is' filter operator +Error/IsFilterOperator: Filter Error: Unknown parameter for the 'is' filter operator Error/FormatFilterOperator: Filter Error: Unknown suffix for the 'format' filter operator Error/LoadingPluginLibrary: Error loading plugin library Error/NetworkErrorAlert: `

''Network Error''

It looks like the connection to the server has been lost. This may indicate a problem with your network connection. Please attempt to restore network connectivity before continuing.

''Any unsaved changes will be automatically synchronised when connectivity is restored''.` diff --git a/core/modules/commands/listen.js b/core/modules/commands/listen.js index 3c5f6a63a..ca6e6e076 100644 --- a/core/modules/commands/listen.js +++ b/core/modules/commands/listen.js @@ -18,7 +18,7 @@ exports.info = { name: "listen", synchronous: true, namedParameterMode: true, - mandatoryParameters: [], + mandatoryParameters: [] }; var Command = function(params,commander,callback) { diff --git a/core/modules/commands/save.js b/core/modules/commands/save.js index 9769cec69..3cb7ef08c 100644 --- a/core/modules/commands/save.js +++ b/core/modules/commands/save.js @@ -43,7 +43,9 @@ Saves individual tiddlers in their raw text or binary format to the specified fi directory: path.resolve(self.commander.outputPath), pathFilters: [filenameFilter], wiki: wiki, - fileInfo: {} + fileInfo: { + overwrite: true + } }); if(self.commander.verbose) { console.log("Saving \"" + title + "\" to \"" + fileInfo.filepath + "\""); diff --git a/core/modules/commands/savewikifolder.js b/core/modules/commands/savewikifolder.js index c0fccd775..461ff6f04 100644 --- a/core/modules/commands/savewikifolder.js +++ b/core/modules/commands/savewikifolder.js @@ -176,7 +176,10 @@ WikiFolderMaker.prototype.saveCustomPlugin = function(pluginTiddler) { this.saveJSONFile(directory + path.sep + "plugin.info",pluginInfo); self.log("Writing " + directory + path.sep + "plugin.info: " + JSON.stringify(pluginInfo,null,$tw.config.preferences.jsonSpaces)); var pluginTiddlers = $tw.utils.parseJSONSafe(pluginTiddler.fields.text).tiddlers; // A hashmap of tiddlers in the plugin - $tw.utils.each(pluginTiddlers,function(tiddler) { + $tw.utils.each(pluginTiddlers,function(tiddler,title) { + if(!tiddler.title) { + tiddler.title = title; + } self.saveTiddler(directory,new $tw.Tiddler(tiddler)); }); }; diff --git a/core/modules/filters/backtranscludes.js b/core/modules/filters/backtranscludes.js new file mode 100644 index 000000000..7d4215073 --- /dev/null +++ b/core/modules/filters/backtranscludes.js @@ -0,0 +1,26 @@ +/*\ +title: $:/core/modules/filters/backtranscludes.js +type: application/javascript +module-type: filteroperator + +Filter operator for returning all the backtranscludes from a tiddler + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +/* +Export our filter function +*/ +exports.backtranscludes = function(source,operator,options) { + var results = []; + source(function(tiddler,title) { + $tw.utils.pushTop(results,options.wiki.getTiddlerBacktranscludes(title)); + }); + return results; +}; + +})(); diff --git a/core/modules/filters/crypto.js b/core/modules/filters/crypto.js index 24f1a0df9..cfb524d06 100644 --- a/core/modules/filters/crypto.js +++ b/core/modules/filters/crypto.js @@ -14,12 +14,9 @@ Filter operators for cryptography, using the Stanford JavaScript library exports.sha256 = function(source,operator,options) { var results = [], - length = parseInt(operator.operand,10) || 20, - sha256 = function(text) { - return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(text)).substr(0,length); - }; + length = parseInt(operator.operand,10) || 20; source(function(tiddler,title) { - results.push(sha256(title)); + results.push($tw.utils.sha256(title,{length: length})); }); return results; }; diff --git a/core/modules/filters/transcludes.js b/core/modules/filters/transcludes.js new file mode 100644 index 000000000..bd618296b --- /dev/null +++ b/core/modules/filters/transcludes.js @@ -0,0 +1,26 @@ +/*\ +title: $:/core/modules/filters/transcludes.js +type: application/javascript +module-type: filteroperator + +Filter operator for returning all the transcludes from a tiddler + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +/* +Export our filter function +*/ +exports.transcludes = function(source,operator,options) { + var results = new $tw.utils.LinkedList(); + source(function(tiddler,title) { + results.pushTop(options.wiki.getTiddlerTranscludes(title)); + }); + return results.toArray(); +}; + +})(); diff --git a/core/modules/filters/x-listops.js b/core/modules/filters/x-listops.js index 760f581a1..ae17297a5 100644 --- a/core/modules/filters/x-listops.js +++ b/core/modules/filters/x-listops.js @@ -202,7 +202,7 @@ Extended filter operators to manipulate the current list. } if(resultsIndex !== -1) { i = i + step; - nextOperandIndex = (i < opLength ? i : i - opLength); + nextOperandIndex = (i < opLength ? i : i % opLength); if(operands.length > 1) { results.splice(resultsIndex,1,operands[nextOperandIndex]); } else { diff --git a/core/modules/indexers/back-indexer.js b/core/modules/indexers/back-indexer.js new file mode 100644 index 000000000..609d62bfc --- /dev/null +++ b/core/modules/indexers/back-indexer.js @@ -0,0 +1,119 @@ +/*\ +title: $:/core/modules/indexers/back-indexer.js +type: application/javascript +module-type: indexer + +By parsing the tiddler text, indexes the tiddlers' back links, back transclusions, block level back links. + +\*/ +function BackIndexer(wiki) { + this.wiki = wiki; +} + +BackIndexer.prototype.init = function() { + this.subIndexers = { + link: new BackSubIndexer(this,"extractLinks"), + transclude: new BackSubIndexer(this,"extractTranscludes"), + }; +}; + +BackIndexer.prototype.rebuild = function() { + $tw.utils.each(this.subIndexers,function(subIndexer) { + subIndexer.rebuild(); + }); +}; + +BackIndexer.prototype.update = function(updateDescriptor) { + $tw.utils.each(this.subIndexers,function(subIndexer) { + subIndexer.update(updateDescriptor); + }); +}; +function BackSubIndexer(indexer,extractor) { + this.wiki = indexer.wiki; + this.indexer = indexer; + this.extractor = extractor; + /** + * { + * [target title, e.g. tiddler title being linked to]: + * { + * [source title, e.g. tiddler title that has link syntax in its text]: true + * } + * } + */ + this.index = null; +} + +BackSubIndexer.prototype.init = function() { + // lazy init until first lookup + this.index = null; +} + +BackSubIndexer.prototype._init = function() { + this.index = Object.create(null); + var self = this; + this.wiki.forEachTiddler(function(sourceTitle,tiddler) { + var newTargets = self._getTarget(tiddler); + $tw.utils.each(newTargets, function(target) { + if(!self.index[target]) { + self.index[target] = Object.create(null); + } + self.index[target][sourceTitle] = true; + }); + }); +} + +BackSubIndexer.prototype.rebuild = function() { + this.index = null; +} + +/* +* Get things that is being referenced in the text, e.g. tiddler names in the link syntax. +*/ +BackSubIndexer.prototype._getTarget = function(tiddler) { + var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {}); + if(parser) { + return this.wiki[this.extractor](parser.tree); + } + return []; +} + +BackSubIndexer.prototype.update = function(updateDescriptor) { + // lazy init/update until first lookup + if(!this.index) { + return; + } + var newTargets = [], + oldTargets = [], + self = this; + if(updateDescriptor.old.exists) { + oldTargets = this._getTarget(updateDescriptor.old.tiddler); + } + if(updateDescriptor.new.exists) { + newTargets = this._getTarget(updateDescriptor.new.tiddler); + } + + $tw.utils.each(oldTargets,function(target) { + if(self.index[target]) { + delete self.index[target][updateDescriptor.old.tiddler.fields.title]; + } + }); + $tw.utils.each(newTargets,function(target) { + if(!self.index[target]) { + self.index[target] = Object.create(null); + } + self.index[target][updateDescriptor.new.tiddler.fields.title] = true; + }); +} + +BackSubIndexer.prototype.lookup = function(title) { + if(!this.index) { + this._init(); + } + if(this.index[title]) { + return Object.keys(this.index[title]); + } else { + return []; + } +} + +exports.BackIndexer = BackIndexer; diff --git a/core/modules/indexers/backlinks-index.js b/core/modules/indexers/backlinks-index.js deleted file mode 100644 index 5902e2829..000000000 --- a/core/modules/indexers/backlinks-index.js +++ /dev/null @@ -1,86 +0,0 @@ -/*\ -title: $:/core/modules/indexers/backlinks-indexer.js -type: application/javascript -module-type: indexer - -Indexes the tiddlers' backlinks - -\*/ -(function(){ - -/*jslint node: true, browser: true */ -/*global modules: false */ -"use strict"; - - -function BacklinksIndexer(wiki) { - this.wiki = wiki; -} - -BacklinksIndexer.prototype.init = function() { - this.index = null; -} - -BacklinksIndexer.prototype.rebuild = function() { - this.index = null; -} - -BacklinksIndexer.prototype._getLinks = function(tiddler) { - var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {}); - if(parser) { - return this.wiki.extractLinks(parser.tree); - } - return []; -} - -BacklinksIndexer.prototype.update = function(updateDescriptor) { - if(!this.index) { - return; - } - var newLinks = [], - oldLinks = [], - self = this; - if(updateDescriptor.old.exists) { - oldLinks = this._getLinks(updateDescriptor.old.tiddler); - } - if(updateDescriptor.new.exists) { - newLinks = this._getLinks(updateDescriptor.new.tiddler); - } - - $tw.utils.each(oldLinks,function(link) { - if(self.index[link]) { - delete self.index[link][updateDescriptor.old.tiddler.fields.title]; - } - }); - $tw.utils.each(newLinks,function(link) { - if(!self.index[link]) { - self.index[link] = Object.create(null); - } - self.index[link][updateDescriptor.new.tiddler.fields.title] = true; - }); -} - -BacklinksIndexer.prototype.lookup = function(title) { - if(!this.index) { - this.index = Object.create(null); - var self = this; - this.wiki.forEachTiddler(function(title,tiddler) { - var links = self._getLinks(tiddler); - $tw.utils.each(links, function(link) { - if(!self.index[link]) { - self.index[link] = Object.create(null); - } - self.index[link][title] = true; - }); - }); - } - if(this.index[title]) { - return Object.keys(this.index[title]); - } else { - return []; - } -} - -exports.BacklinksIndexer = BacklinksIndexer; - -})(); diff --git a/core/modules/macros/csvtiddlers.js b/core/modules/macros/csvtiddlers.js index 7b34ce04d..a492fd81c 100644 --- a/core/modules/macros/csvtiddlers.js +++ b/core/modules/macros/csvtiddlers.js @@ -35,9 +35,11 @@ exports.run = function(filter,format) { // Collect all the fields for(t=0;t"); + srcDocument.write(""); srcDocument.close(); srcDocument.title = windowTitle; srcWindow.addEventListener("beforeunload",function(event) { diff --git a/core/modules/syncer.js b/core/modules/syncer.js index 9769d9674..f7627e1ac 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -635,7 +635,7 @@ SyncFromServerTask.prototype.run = function(callback) { callback(null); }; if(this.syncer.syncadaptor.getUpdatedTiddlers) { - this.syncer.syncadaptor.getUpdatedTiddlers(self,function(err,updates) { + this.syncer.syncadaptor.getUpdatedTiddlers(self.syncer,function(err,updates) { if(err) { self.syncer.displayError($tw.language.getString("Error/RetrievingSkinny"),err); return callback(err); diff --git a/core/modules/utils/dom/http.js b/core/modules/utils/dom/http.js index 27c3e65d6..ddb1e17c4 100644 --- a/core/modules/utils/dom/http.js +++ b/core/modules/utils/dom/http.js @@ -283,13 +283,13 @@ exports.httpRequest = function(options) { // Set up the state change handler request.onreadystatechange = function() { if(this.readyState === 4) { - if(this.status === 200 || this.status === 201 || this.status === 204) { + if(this.status >= 200 && this.status < 300) { // Success! options.callback(null,this[returnProp],this); return; } // Something went wrong - options.callback($tw.language.getString("Error/XMLHttpRequest") + ": " + this.status,null,this); + options.callback($tw.language.getString("Error/XMLHttpRequest") + ": " + this.status,this[returnProp],this); } }; // Handle progress diff --git a/core/modules/utils/filesystem.js b/core/modules/utils/filesystem.js index 1ba34323e..5319e0481 100644 --- a/core/modules/utils/filesystem.js +++ b/core/modules/utils/filesystem.js @@ -316,11 +316,13 @@ Options include: pathFilters: optional array of filters to be used to generate the base path wiki: optional wiki for evaluating the pathFilters fileInfo: an existing fileInfo object to check against + fileInfo.overwrite: if true, turns off filename clash numbers (defaults to false) */ exports.generateTiddlerFilepath = function(title,options) { var directory = options.directory || "", extension = options.extension || "", originalpath = (options.fileInfo && options.fileInfo.originalpath) ? options.fileInfo.originalpath : "", + overwrite = options.fileInfo && options.fileInfo.overwrite || false, filepath; // Check if any of the pathFilters applies if(options.pathFilters && options.wiki) { @@ -381,19 +383,20 @@ exports.generateTiddlerFilepath = function(title,options) { filepath += char.charCodeAt(0).toString(); }); } - // Add a uniquifier if the file already exists - var fullPath, oldPath = (options.fileInfo) ? options.fileInfo.filepath : undefined, + // Add a uniquifier if the file already exists (default) + var fullPath = path.resolve(directory, filepath + extension); + if (!overwrite) { + var oldPath = (options.fileInfo) ? options.fileInfo.filepath : undefined, count = 0; - do { - fullPath = path.resolve(directory,filepath + (count ? "_" + count : "") + extension); - if(oldPath && oldPath == fullPath) { - break; - } - count++; - } while(fs.existsSync(fullPath)); + do { + fullPath = path.resolve(directory,filepath + (count ? "_" + count : "") + extension); + if(oldPath && oldPath == fullPath) break; + count++; + } while(fs.existsSync(fullPath)); + } // If the last write failed with an error, or if path does not start with: // the resolved options.directory, the resolved wikiPath directory, the wikiTiddlersPath directory, - // or the 'originalpath' directory, then $tw.utils.encodeURIComponentExtended() and resolve to tiddler directory. + // or the 'originalpath' directory, then $tw.utils.encodeURIComponentExtended() and resolve to options.directory. var writePath = $tw.hooks.invokeHook("th-make-tiddler-path",fullPath,fullPath), encode = (options.fileInfo || {writeError: false}).writeError == true; if(!encode) { diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index 9fffb1714..42b3bd05c 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -819,6 +819,15 @@ exports.hashString = function(str) { },0); }; +/* +Cryptographic hash function as used by sha256 filter operator +options.length .. number of characters returned defaults to 64 +*/ +exports.sha256 = function(str, options) { + options = options || {} + return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(str)).substr(0,options.length || 64); +} + /* Base64 utility functions that work in either browser or Node.js */ @@ -922,7 +931,7 @@ IE does not have sign function */ exports.sign = Math.sign || function(x) { x = +x; // convert to a number - if (x === 0 || isNaN(x)) { + if(x === 0 || isNaN(x)) { return x; } return x > 0 ? 1 : -1; @@ -935,7 +944,7 @@ exports.strEndsWith = function(str,ending,position) { if(str.endsWith) { return str.endsWith(ending,position); } else { - if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > str.length) { + if(typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > str.length) { position = str.length; } position -= ending.length; diff --git a/core/modules/widgets/action-deletefield.js b/core/modules/widgets/action-deletefield.js index 54068471e..00f06562d 100644 --- a/core/modules/widgets/action-deletefield.js +++ b/core/modules/widgets/action-deletefield.js @@ -37,6 +37,7 @@ Compute the internal state of the widget DeleteFieldWidget.prototype.execute = function() { this.actionTiddler = this.getAttribute("$tiddler",this.getVariable("currentTiddler")); this.actionField = this.getAttribute("$field",null); + this.actionTimestamp = this.getAttribute("$timestamp","yes") === "yes"; }; /* @@ -69,11 +70,15 @@ DeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) { $tw.utils.each(this.attributes,function(attribute,name) { if(name.charAt(0) !== "$" && name !== "title") { removeFields[name] = undefined; - hasChanged = true; + if(name in tiddler.fields) { + hasChanged = true; + } } }); if(hasChanged) { - this.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,removeFields,this.wiki.getModificationFields())); + var creationFields = this.actionTimestamp ? this.wiki.getCreationFields() : {}; + var modificationFields = this.actionTimestamp ? this.wiki.getModificationFields() : {}; + this.wiki.addTiddler(new $tw.Tiddler(creationFields,tiddler,removeFields,modificationFields)); } } return true; // Action was invoked diff --git a/core/modules/widgets/draggable.js b/core/modules/widgets/draggable.js index 22fdc37e9..97e795ae4 100644 --- a/core/modules/widgets/draggable.js +++ b/core/modules/widgets/draggable.js @@ -119,7 +119,7 @@ DraggableWidget.prototype.refresh = function(changedTiddlers) { return true; } else { if(changedAttributes["class"]) { - this.assignDomNodeClasses(); + this.updateDomNodeClasses(); } this.assignAttributes(this.domNodes[0],{ changedAttributes: changedAttributes, @@ -132,4 +132,4 @@ DraggableWidget.prototype.refresh = function(changedTiddlers) { exports.draggable = DraggableWidget; -})(); \ No newline at end of file +})(); diff --git a/core/modules/widgets/edit.js b/core/modules/widgets/edit.js index e7bd49b93..eb7758e90 100644 --- a/core/modules/widgets/edit.js +++ b/core/modules/widgets/edit.js @@ -90,7 +90,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of EditWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); // Refresh if an attribute has changed, or the type associated with the target tiddler has changed - if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (changedTiddlers[this.editTitle] && this.getEditorType() !== this.editorType)) { + if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (this.getEditorType() !== this.editorType)) { this.refreshSelf(); return true; } else { diff --git a/core/modules/widgets/importvariables.js b/core/modules/widgets/importvariables.js index a8bb483b6..3e1ac3fc6 100644 --- a/core/modules/widgets/importvariables.js +++ b/core/modules/widgets/importvariables.js @@ -49,7 +49,7 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) { this.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this); // Accumulate the <$set> widgets from each tiddler $tw.utils.each(this.tiddlerList,function(title) { - var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true, configTrimWhiteSpace:true}); + var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true, configTrimWhiteSpace:false}); if(parser) { var parseTreeNode = parser.tree[0]; while(parseTreeNode && ["setvariable","set","parameters"].indexOf(parseTreeNode.type) !== -1) { diff --git a/core/modules/widgets/link.js b/core/modules/widgets/link.js index 0d89ee22d..f02a7cae2 100755 --- a/core/modules/widgets/link.js +++ b/core/modules/widgets/link.js @@ -217,7 +217,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ LinkWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if($tw.utils.count(changedAttributes) > 0) { + if($tw.utils.count(changedAttributes) > 0 || changedTiddlers[this.to]) { this.refreshSelf(); return true; } diff --git a/core/modules/widgets/list.js b/core/modules/widgets/list.js index 78976f69a..d4ad41995 100755 --- a/core/modules/widgets/list.js +++ b/core/modules/widgets/list.js @@ -109,6 +109,7 @@ ListWidget.prototype.findExplicitTemplates = function() { this.explicitJoinTemplate = null; this.hasTemplateInBody = false; var searchChildren = function(childNodes) { + var foundInlineTemplate = false; $tw.utils.each(childNodes,function(node) { if(node.type === "list-template") { self.explicitListTemplate = node.children; @@ -118,12 +119,14 @@ ListWidget.prototype.findExplicitTemplates = function() { self.explicitJoinTemplate = node.children; } else if(node.type === "element" && node.tag === "p") { searchChildren(node.children); + foundInlineTemplate = true; } else { - self.hasTemplateInBody = true; + foundInlineTemplate = true; } }); + return foundInlineTemplate; }; - searchChildren(this.parseTreeNode.children); + this.hasTemplateInBody = searchChildren(this.parseTreeNode.children); } ListWidget.prototype.getTiddlerList = function() { diff --git a/core/modules/widgets/select.js b/core/modules/widgets/select.js index f1ea3b331..2940e3be0 100644 --- a/core/modules/widgets/select.js +++ b/core/modules/widgets/select.js @@ -43,7 +43,7 @@ SelectWidget.prototype.render = function(parent,nextSibling) { //Create element var domNode = this.document.createElement("select"); if(this.selectClass) { - domNode.classname = this.selectClass; + domNode.className = this.selectClass; } // Assign data- attributes this.assignAttributes(domNode,{ @@ -62,8 +62,8 @@ SelectWidget.prototype.render = function(parent,nextSibling) { if(this.selectTooltip) { domNode.setAttribute("title",this.selectTooltip); } - this.renderChildren(domNode,nextSibling); this.parentDomNode.insertBefore(domNode,nextSibling); + this.renderChildren(domNode,null); this.domNodes.push(domNode); this.setSelectValue(); if(this.selectFocus == "yes") { diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index 7672c8b63..69f63a684 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -153,7 +153,7 @@ Widget.prototype.getVariableInfo = function(name,options) { } else if(variable.isFunctionDefinition) { // Function evaluations params = self.resolveVariableParameters(variable.params,actualParams); - var variables = Object.create(null); + var variables = options.variables || Object.create(null); // Apply default parameter values $tw.utils.each(variable.params,function(param,index) { if(param["default"]) { diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 430c46466..96e40a708 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -534,8 +534,8 @@ Return an array of tiddler titles that link to the specified tiddler */ exports.getTiddlerBacklinks = function(targetTitle) { var self = this, - backlinksIndexer = this.getIndexer("BacklinksIndexer"), - backlinks = backlinksIndexer && backlinksIndexer.lookup(targetTitle); + backIndexer = this.getIndexer("BackIndexer"), + backlinks = backIndexer && backIndexer.subIndexers.link.lookup(targetTitle); if(!backlinks) { backlinks = []; @@ -549,6 +549,68 @@ exports.getTiddlerBacklinks = function(targetTitle) { return backlinks; }; + +/* +Return an array of tiddler titles that are directly transcluded within the given parse tree + */ +exports.extractTranscludes = function(parseTreeRoot) { + // Count up the transcludes + var transcludes = [], + checkParseTree = function(parseTree, parentNode) { + for(var t=0; t diff --git a/core/templates/external-js/save-offline-external-js.tid b/core/templates/external-js/save-offline-external-js.tid index 564a34948..70cb8bbc0 100644 --- a/core/templates/external-js/save-offline-external-js.tid +++ b/core/templates/external-js/save-offline-external-js.tid @@ -3,7 +3,7 @@ title: $:/core/save/offline-external-js \whitespace trim \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)$ +[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/plugins/tiddlywiki/filesystem]] -[[$:/plugins/tiddlywiki/tiddlyweb]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$ \end \define defaultCoreURL() tiddlywikicore-$(version)$.js <$let coreURL={{{ [[coreURL]is[variable]thenelse] }}}> diff --git a/core/templates/html-json-skinny-tiddler.tid b/core/templates/html-json-skinny-tiddler.tid index 6f5b7ff35..6402bcee5 100644 --- a/core/templates/html-json-skinny-tiddler.tid +++ b/core/templates/html-json-skinny-tiddler.tid @@ -1,3 +1,3 @@ title: $:/core/templates/html-json-skinny-tiddler -<$jsontiddler tiddler=<> exclude="text" escapeUnsafeScriptChars="yes"/> +<$text text=<>/><$jsontiddler tiddler=<> exclude="text" escapeUnsafeScriptChars="yes"/> diff --git a/core/templates/save-all.tid b/core/templates/save-all.tid index d7473ba5b..a316d1954 100644 --- a/core/templates/save-all.tid +++ b/core/templates/save-all.tid @@ -2,6 +2,6 @@ title: $:/core/save/all \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)$ +[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$ \end {{$:/core/templates/tiddlywiki5.html}} diff --git a/core/templates/save-empty.tid b/core/templates/save-empty.tid index 6f0da4822..0b1c33b59 100644 --- a/core/templates/save-empty.tid +++ b/core/templates/save-empty.tid @@ -1,6 +1,6 @@ title: $:/core/save/empty \define saveTiddlerFilter() -[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] +[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] \end {{$:/core/templates/tiddlywiki5.html}} diff --git a/core/templates/save-lazy-all.tid b/core/templates/save-lazy-all.tid index a4b5cd6e9..da4353fba 100644 --- a/core/templates/save-lazy-all.tid +++ b/core/templates/save-lazy-all.tid @@ -1,7 +1,7 @@ title: $:/core/save/lazy-all \define saveTiddlerFilter() -[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] [is[tiddler]type[application/javascript]] +[sort[title]] +[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] [is[tiddler]type[application/javascript]] +[sort[title]] \end \define skinnySaveTiddlerFilter() [!is[system]] -[type[application/javascript]] diff --git a/core/templates/save-lazy-images.tid b/core/templates/save-lazy-images.tid index 0a4a84295..b23b348f0 100644 --- a/core/templates/save-lazy-images.tid +++ b/core/templates/save-lazy-images.tid @@ -1,7 +1,7 @@ title: $:/core/save/lazy-images \define saveTiddlerFilter() -[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]] +[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]] \end \define skinnySaveTiddlerFilter() [!is[system]is[image]] diff --git a/core/templates/store.area.template.html.tid b/core/templates/store.area.template.html.tid index b148a2ff3..2dc115266 100644 --- a/core/templates/store.area.template.html.tid +++ b/core/templates/store.area.template.html.tid @@ -9,9 +9,7 @@ title: $:/core/templates/store.area.template.html <$let newline={{{ [charcode[10]] }}} join=`,$(newline)$`> <$text text=<>/> <$list filter=<> join=<> template="$:/core/templates/html-json-tiddler"/> - <$vars numTiddlers={{{ [subfiltercount[]] }}}> - <$list filter={{{ [] }}} join=<> template="$:/core/templates/html-json-skinny-tiddler"/> - + <$list filter="[subfilter]" template="$:/core/templates/html-json-skinny-tiddler"/> <$text text=<>/> `]` @@ -22,8 +20,8 @@ title: $:/core/templates/store.area.template.html <$reveal type="nomatch" state="$:/isEncrypted" text="yes"> `` diff --git a/core/ui/AdvancedSearch/Filter.tid b/core/ui/AdvancedSearch/Filter.tid index c5a460f28..5b82f9b32 100644 --- a/core/ui/AdvancedSearch/Filter.tid +++ b/core/ui/AdvancedSearch/Filter.tid @@ -40,10 +40,8 @@ caption: {{$:/language/Search/Filter/Caption}} <$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/> \end - \whitespace trim <> - - <$reveal state="$:/temp/advancedsearch" type="nomatch" text=""> <$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>">
-<> +

<>

<$list filter={{$:/temp/advancedsearch}}> addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}> <$transclude tiddler="$:/core/ui/ListItemTemplate"/> diff --git a/core/ui/AdvancedSearch/Standard.tid b/core/ui/AdvancedSearch/Standard.tid index 0690130e4..e6ed18a7a 100644 --- a/core/ui/AdvancedSearch/Standard.tid +++ b/core/ui/AdvancedSearch/Standard.tid @@ -54,17 +54,18 @@ caption: {{$:/language/Search/Standard/Caption}} variable="listItem"> <$vars userInput={{{ [[$:/temp/advancedsearch]get[text]] }}} - configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}} + configTiddler={{{ [[$:/state/advancedsearch/standard/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}} searchListState="$:/temp/advancedsearch/selected-item"> -<$list - filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]" - emptyMessage="<$list filter='[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]'><$transclude/>"> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]"> <$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" default={{$:/config/SearchResults/Default}} actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<>/>" explicitState="$:/state/tab/search-results/advancedsearch" /> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]] :else[[]]"> +<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"><$transclude mode="block"/> + diff --git a/core/ui/ControlPanel/Saving/DownloadSaver.tid b/core/ui/ControlPanel/Saving/DownloadSaver.tid index 42e4dc3a9..be658a1ff 100644 --- a/core/ui/ControlPanel/Saving/DownloadSaver.tid +++ b/core/ui/ControlPanel/Saving/DownloadSaver.tid @@ -2,10 +2,19 @@ title: $:/core/ui/ControlPanel/Saving/DownloadSaver tags: $:/tags/ControlPanel/Saving caption: {{$:/language/ControlPanel/Saving/DownloadSaver/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Saving/DownloadSaver/ +
>> + <> -!! <$link to="$:/config/DownloadSaver/AutoSave"><> +!!.tc-control-panel-accent <$link to="$:/config/DownloadSaver/AutoSave"><> -<$checkbox tiddler="$:/config/DownloadSaver/AutoSave" field="text" checked="yes" unchecked="no" default="no"> <> +<$checkbox tiddler="$:/config/DownloadSaver/AutoSave" + field="text" checked="yes" unchecked="no" default="no" + class="tc-control-panel-item" +> + <> + +
\ No newline at end of file diff --git a/core/ui/ControlPanel/Saving/General.tid b/core/ui/ControlPanel/Saving/General.tid index d1b096281..38c3f34fb 100644 --- a/core/ui/ControlPanel/Saving/General.tid +++ b/core/ui/ControlPanel/Saving/General.tid @@ -3,14 +3,22 @@ tags: $:/tags/ControlPanel/Saving caption: {{$:/language/ControlPanel/Saving/General/Caption}} list-before: +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/ +
>> + {{$:/language/ControlPanel/Saving/General/Hint}} -!! <$link to="$:/config/AutoSave"><> +!!.tc-control-panel-accent <$link to="$:/config/AutoSave"><> <> -<$radio tiddler="$:/config/AutoSave" value="yes"> <> +<$radio tiddler="$:/config/AutoSave" value="yes"> + <> + -<$radio tiddler="$:/config/AutoSave" value="no"> <> +<$radio tiddler="$:/config/AutoSave" value="no"> + <> + +
\ No newline at end of file diff --git a/core/ui/ControlPanel/Settings/CamelCase.tid b/core/ui/ControlPanel/Settings/CamelCase.tid index 36377bb85..3feace84b 100644 --- a/core/ui/ControlPanel/Settings/CamelCase.tid +++ b/core/ui/ControlPanel/Settings/CamelCase.tid @@ -2,7 +2,16 @@ title: $:/core/ui/ControlPanel/Settings/CamelCase tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/CamelCase/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/CamelCase/ + <> -<$checkbox tiddler="$:/config/WikiParserRules/Inline/wikilink" field="text" checked="enable" unchecked="disable" default="enable"> <$link to="$:/config/WikiParserRules/Inline/wikilink"><> +<$checkbox tiddler="$:/config/WikiParserRules/Inline/wikilink" + field="text" checked="enable" unchecked="disable" default="enable" + class="tc-control-panel-item" +> + <$link to="$:/config/WikiParserRules/Inline/wikilink" class="tc-tiny-gap-left"> + <> + + diff --git a/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab.tid b/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab.tid index 47f277bd4..c3ad60aac 100644 --- a/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab.tid +++ b/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab.tid @@ -2,13 +2,18 @@ caption: {{$:/language/ControlPanel/Settings/DefaultMoreSidebarTab/Caption}} tags: $:/tags/ControlPanel/Settings title: $:/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab -\define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/ \whitespace trim +\define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/ -<$link to="$:/config/DefaultMoreSidebarTab"><> +<$link to="$:/config/DefaultMoreSidebarTab" class="tc-control-panel-item"> + <> + -<$select tiddler="$:/config/DefaultMoreSidebarTab"> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]"> - - +<$select tiddler="$:/config/DefaultMoreSidebarTab" class="tc-select"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]"> + + diff --git a/core/ui/ControlPanel/Settings/DefaultSidebarTab.tid b/core/ui/ControlPanel/Settings/DefaultSidebarTab.tid index acd3421c7..1f4c5fc7b 100644 --- a/core/ui/ControlPanel/Settings/DefaultSidebarTab.tid +++ b/core/ui/ControlPanel/Settings/DefaultSidebarTab.tid @@ -5,10 +5,16 @@ title: $:/core/ui/ControlPanel/Settings/DefaultSidebarTab \define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/ \whitespace trim -<$link to="$:/config/DefaultSidebarTab"><> +<$link to="$:/config/DefaultSidebarTab" class="tc-control-panel-item"> + <> + -<$select tiddler="$:/config/DefaultSidebarTab"> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]"> - - +<$select tiddler="$:/config/DefaultSidebarTab" class="tc-select"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]"> + + diff --git a/core/ui/ControlPanel/Settings/EditorToolbar.tid b/core/ui/ControlPanel/Settings/EditorToolbar.tid index aa142bf62..ad7384568 100644 --- a/core/ui/ControlPanel/Settings/EditorToolbar.tid +++ b/core/ui/ControlPanel/Settings/EditorToolbar.tid @@ -2,8 +2,15 @@ title: $:/core/ui/ControlPanel/Settings/EditorToolbar tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/EditorToolbar/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/EditorToolbar/ <> -<$checkbox tiddler="$:/config/TextEditor/EnableToolbar" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/TextEditor/EnableToolbar"><> - +<$checkbox tiddler="$:/config/TextEditor/EnableToolbar" + field="text" checked="yes" unchecked="no" default="yes" + class="tc-control-panel-item" +> + <$link to="$:/config/TextEditor/EnableToolbar" class="tc-tiny-gap-left"> + <> + + diff --git a/core/ui/ControlPanel/Settings/InfoPanelMode.tid b/core/ui/ControlPanel/Settings/InfoPanelMode.tid index 371b6d61b..e539b8f82 100644 --- a/core/ui/ControlPanel/Settings/InfoPanelMode.tid +++ b/core/ui/ControlPanel/Settings/InfoPanelMode.tid @@ -2,9 +2,17 @@ title: $:/core/ui/ControlPanel/Settings/InfoPanelMode tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/InfoPanelMode/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/InfoPanelMode/ -<$link to="$:/config/TiddlerInfo/Mode"><> -<$radio tiddler="$:/config/TiddlerInfo/Mode" value="popup"> <> +<$link to="$:/config/TiddlerInfo/Mode" class="tc-control-panel-item"> + <> + -<$radio tiddler="$:/config/TiddlerInfo/Mode" value="sticky"> <> +<$radio tiddler="$:/config/TiddlerInfo/Mode" value="popup"> + <> + + +<$radio tiddler="$:/config/TiddlerInfo/Mode" value="sticky"> + <> + diff --git a/core/ui/ControlPanel/Settings/LinkToBehaviour.tid b/core/ui/ControlPanel/Settings/LinkToBehaviour.tid index 92d46601e..dc98b1ae6 100644 --- a/core/ui/ControlPanel/Settings/LinkToBehaviour.tid +++ b/core/ui/ControlPanel/Settings/LinkToBehaviour.tid @@ -2,21 +2,25 @@ title: $:/core/ui/ControlPanel/Settings/LinkToBehaviour tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}} -\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/ \whitespace trim +\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/ -<$link to="$:/config/Navigation/openLinkFromInsideRiver"><> +<$link to="$:/config/Navigation/openLinkFromInsideRiver" class="tc-control-panel-item"> + <> + -<$select tiddler="$:/config/Navigation/openLinkFromInsideRiver"> - - - - +<$select tiddler="$:/config/Navigation/openLinkFromInsideRiver" class="tc-select"> + + + + -<$link to="$:/config/Navigation/openLinkFromOutsideRiver"><> +<$link to="$:/config/Navigation/openLinkFromOutsideRiver" class="tc-control-panel-item"> + <> + -<$select tiddler="$:/config/Navigation/openLinkFromOutsideRiver"> - - +<$select tiddler="$:/config/Navigation/openLinkFromOutsideRiver" class="tc-select"> + + diff --git a/core/ui/ControlPanel/Settings/MissingLinks.tid b/core/ui/ControlPanel/Settings/MissingLinks.tid index 4a7ba5f2e..e0149c9a1 100644 --- a/core/ui/ControlPanel/Settings/MissingLinks.tid +++ b/core/ui/ControlPanel/Settings/MissingLinks.tid @@ -2,8 +2,12 @@ title: $:/core/ui/ControlPanel/Settings/MissingLinks tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/MissingLinks/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/MissingLinks/ <> -<$checkbox tiddler="$:/config/MissingLinks" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/MissingLinks"><> - +<$checkbox tiddler="$:/config/MissingLinks" field="text" checked="yes" unchecked="no" default="yes"> + <$link to="$:/config/MissingLinks" class="tc-control-panel-item"> + <> + + diff --git a/core/ui/ControlPanel/Settings/NavigationAddressBar.tid b/core/ui/ControlPanel/Settings/NavigationAddressBar.tid index 4a123ba99..f35f8a1f1 100644 --- a/core/ui/ControlPanel/Settings/NavigationAddressBar.tid +++ b/core/ui/ControlPanel/Settings/NavigationAddressBar.tid @@ -2,12 +2,21 @@ title: $:/core/ui/ControlPanel/Settings/NavigationAddressBar tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/NavigationAddressBar/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/NavigationAddressBar/ -<$link to="$:/config/Navigation/UpdateAddressBar"><> +<$link to="$:/config/Navigation/UpdateAddressBar" class="tc-control-panel-item"> + <> + -<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permaview"> <> +<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permaview"> + <> + -<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permalink"> <> +<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permalink"> + <> + -<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="no"> <> +<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="no"> + <> + diff --git a/core/ui/ControlPanel/Settings/NavigationHistory.tid b/core/ui/ControlPanel/Settings/NavigationHistory.tid index af63de1ee..bd118a103 100644 --- a/core/ui/ControlPanel/Settings/NavigationHistory.tid +++ b/core/ui/ControlPanel/Settings/NavigationHistory.tid @@ -2,9 +2,17 @@ title: $:/core/ui/ControlPanel/Settings/NavigationHistory tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/NavigationHistory/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/NavigationHistory/ -<$link to="$:/config/Navigation/UpdateHistory"><> -<$radio tiddler="$:/config/Navigation/UpdateHistory" value="yes"> <> +<$link to="$:/config/Navigation/UpdateHistory" class="tc-control-panel-item"> + <> + -<$radio tiddler="$:/config/Navigation/UpdateHistory" value="no"> <> +<$radio tiddler="$:/config/Navigation/UpdateHistory" value="yes"> + <> + + +<$radio tiddler="$:/config/Navigation/UpdateHistory" value="no"> + <> + diff --git a/core/ui/ControlPanel/Settings/NavigationPermalinkviewMode.tid b/core/ui/ControlPanel/Settings/NavigationPermalinkviewMode.tid index 5a496d5e1..6c15936e7 100644 --- a/core/ui/ControlPanel/Settings/NavigationPermalinkviewMode.tid +++ b/core/ui/ControlPanel/Settings/NavigationPermalinkviewMode.tid @@ -2,9 +2,24 @@ title: $:/core/ui/ControlPanel/Settings/NavigationPermalinkviewMode tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/NavigationPermalinkviewMode/ <> -<$checkbox tiddler="$:/config/Navigation/Permalinkview/CopyToClipboard" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Navigation/Permalinkview/CopyToClipboard"><> +<$checkbox tiddler="$:/config/Navigation/Permalinkview/CopyToClipboard" + field="text" checked="yes" unchecked="no" default="yes" + class="tc-control-panel-item" +> + <$link to="$:/config/Navigation/Permalinkview/CopyToClipboard" class="tc-tiny-gap-left"> + <> + + -<$checkbox tiddler="$:/config/Navigation/Permalinkview/UpdateAddressBar" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Navigation/Permalinkview/UpdateAddressBar"><> +<$checkbox tiddler="$:/config/Navigation/Permalinkview/UpdateAddressBar" + field="text" checked="yes" unchecked="no" default="yes" + class="tc-control-panel-item" +> + <$link to="$:/config/Navigation/Permalinkview/UpdateAddressBar" class="tc-tiny-gap-left"> + <> + + diff --git a/core/ui/ControlPanel/Settings/PerformanceInstrumentation.tid b/core/ui/ControlPanel/Settings/PerformanceInstrumentation.tid index b3d1d9763..1ea9061ae 100644 --- a/core/ui/ControlPanel/Settings/PerformanceInstrumentation.tid +++ b/core/ui/ControlPanel/Settings/PerformanceInstrumentation.tid @@ -2,7 +2,15 @@ title: $:/core/ui/ControlPanel/Settings/PerformanceInstrumentation tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/PerformanceInstrumentation/ <> -<$checkbox tiddler="$:/config/Performance/Instrumentation" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Performance/Instrumentation"><> +<$checkbox tiddler="$:/config/Performance/Instrumentation" + field="text" checked="yes" unchecked="no" default="no" + class="tc-control-panel-item" +> + <$link to="$:/config/Performance/Instrumentation" class="tc-tiny-gap-left"> + <> + + diff --git a/core/ui/ControlPanel/Settings/TitleLinks.tid b/core/ui/ControlPanel/Settings/TitleLinks.tid index c1acdc7bd..1620dfe39 100644 --- a/core/ui/ControlPanel/Settings/TitleLinks.tid +++ b/core/ui/ControlPanel/Settings/TitleLinks.tid @@ -2,9 +2,17 @@ title: $:/core/ui/ControlPanel/Settings/TitleLinks tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/TitleLinks/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/TitleLinks/ -<$link to="$:/config/Tiddlers/TitleLinks"><> -<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="yes"> <> +<$link to="$:/config/Tiddlers/TitleLinks" class="tc-control-panel-item"> + <> + -<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="no"> <> +<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="yes"> + <> + + +<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="no"> + <> + diff --git a/core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid b/core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid index a25b2a39e..c02d653d7 100644 --- a/core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid +++ b/core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid @@ -2,12 +2,15 @@ title: $:/core/ui/ControlPanel/Settings/ToolbarButtonStyle tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}} -\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/ \whitespace trim -<$link to="$:/config/Toolbar/ButtonClass"><> +\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/ -<$select tiddler="$:/config/Toolbar/ButtonClass"> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/ToolbarButtonStyle]]"> - - +<$link to="$:/config/Toolbar/ButtonClass" class="tc-control-panel-item"> + <> + + +<$select tiddler="$:/config/Toolbar/ButtonClass" class="tc-select"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/ToolbarButtonStyle]]"> + + diff --git a/core/ui/ControlPanel/Settings/ToolbarButtons.tid b/core/ui/ControlPanel/Settings/ToolbarButtons.tid index 00bdb191e..d76394ee8 100644 --- a/core/ui/ControlPanel/Settings/ToolbarButtons.tid +++ b/core/ui/ControlPanel/Settings/ToolbarButtons.tid @@ -2,9 +2,24 @@ title: $:/core/ui/ControlPanel/Settings/ToolbarButtons tags: $:/tags/ControlPanel/Settings caption: {{$:/language/ControlPanel/Settings/ToolbarButtons/Caption}} +\whitespace trim \define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtons/ <> -<$checkbox tiddler="$:/config/Toolbar/Icons" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Toolbar/Icons"><> +<$checkbox tiddler="$:/config/Toolbar/Icons" + field="text" checked="yes" unchecked="no" default="yes" + class="tc-control-panel-item" +> + <$link to="$:/config/Toolbar/Icons" class="tc-tiny-gap-left"> + <> + + -<$checkbox tiddler="$:/config/Toolbar/Text" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Toolbar/Text"><> +<$checkbox tiddler="$:/config/Toolbar/Text" + field="text" checked="yes" unchecked="no" default="no" + class="tc-control-panel-item" +> + <$link to="$:/config/Toolbar/Text" class="tc-tiny-gap-left"> + <> + + diff --git a/core/ui/ControlPanel/TiddlyWiki.tid b/core/ui/ControlPanel/TiddlyWiki.tid index 40be32139..ca3c88831 100644 --- a/core/ui/ControlPanel/TiddlyWiki.tid +++ b/core/ui/ControlPanel/TiddlyWiki.tid @@ -9,9 +9,9 @@ list-before: <$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]"> -
+
> style="border-top:1px solid #eee;"> -!! <$link><$transclude field="caption"/> +!!.tc-control-panel-accent <$link><$transclude field="caption"/> <$transclude/> diff --git a/core/ui/EditTemplate/body/default.tid b/core/ui/EditTemplate/body/default.tid index 31322f7fa..d004032f1 100644 --- a/core/ui/EditTemplate/body/default.tid +++ b/core/ui/EditTemplate/body/default.tid @@ -1,7 +1,7 @@ title: $:/core/ui/EditTemplate/body/default \function edit-preview-state() -[{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[] +[get[text]] :else[[no]] +[{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[] +[get[text]] :else[[no]] \end \define config-visibility-title() @@ -14,15 +14,17 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$ \whitespace trim <$let + qualified-preview-state=<> + editPreviewStateTiddler={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[] }}} importTitle=<> importState=<> > <$dropzone importTitle=<> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<> >
-
+
match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}> <$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/> -<$list filter="[function[edit-preview-state]match[yes]]" variable="ignore"> +<$list filter="[get[text]match[yes]]" variable="ignore">
diff --git a/core/ui/EditTemplate/controls.tid b/core/ui/EditTemplate/controls.tid index 3e94d371d..e97cedd78 100644 --- a/core/ui/EditTemplate/controls.tid +++ b/core/ui/EditTemplate/controls.tid @@ -1,12 +1,18 @@ title: $:/core/ui/EditTemplate/controls tags: $:/tags/EditTemplate -\define config-title() -$:/config/EditToolbarButtons/Visibility/$(listItem)$ -\end +\define config-title() $:/config/EditToolbarButtons/Visibility/$(listItem)$ \whitespace trim
-<$view field="title"/> -<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$let tv-config-toolbar-class={{{ [enlist] [encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]]}}}><$reveal type="nomatch" state=<> text="hide"><$transclude tiddler=<>/> -
+ <$view field="title"/> + + <$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"> + <$let tv-config-toolbar-class={{{ [enlist] [encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]] }}}> + <$reveal type="nomatch" state=<> text="hide"> + <$transclude $tiddler=<>/> + + + + +
diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid index 5084478b4..c8d4131fe 100644 --- a/core/ui/EditTemplate/tags.tid +++ b/core/ui/EditTemplate/tags.tid @@ -3,39 +3,63 @@ tags: $:/tags/EditTemplate \whitespace trim -\define lingo-base() $:/language/EditTemplate/ +\procedure lingo-base() $:/language/EditTemplate/ -\define tag-styles() -background-color:$(backgroundColor)$; -fill:$(foregroundColor)$; -color:$(foregroundColor)$; +\procedure tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags") +<$wikify name="foregroundColor" + text="""<$macrocall $name="contrastcolour" + target=<> + fallbackTarget=<> + colourA=<> + colourB=<>/> + """ +> + <$let backgroundColor=<> > + > + style.color=<> + style.fill=<> + style.background-color=<> + > + <$transclude tiddler=<>/> + <$view field="title" format="text"/> + <$button class="tc-btn-invisible tc-remove-tag-button" + style.fill=<> + > + <$action-listops $tiddler=<> $field=<> $subfilter="-[{!!title}]"/> + {{$:/core/images/close-button}} + + + + \end -\define tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags") -\whitespace trim -<$vars foregroundColor=<> backgroundColor="""$colour$"""> -> class="tc-tag-label tc-tag-list-item tc-small-gap-right" data-tag-title=<>> -<$transclude tiddler="""$icon$"""/><$view field="title" format="text"/> -<$button class="tc-btn-invisible tc-remove-tag-button" style=<>><$action-listops $tiddler=<> $field=<<__tagField__>> $subfilter="-[{!!title}]"/>{{$:/core/images/close-button}} - - +\procedure tag-body(colour,palette,icon,tagField:"tags") +<$macrocall $name="tag-body-inner" + colour=`$(colour)$` + colourA={{{ [getindex[foreground]] }}} + colourB={{{ [getindex[background]] }}} + fallbackTarget={{{ [getindex[tag-background]] }}} + icon=<> + tagField=<> +/> \end -\define tag-body(colour,palette,icon,tagField:"tags") -<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} icon="""$icon$""" tagField=<<__tagField__>>/> -\end - -\define edit-tags-template(tagField:"tags") -\whitespace trim +\procedure edit-tags-template(tagField:"tags")
-<$list filter="[list[!!$tagField$]sort[title]]" storyview="pop"> -<$macrocall $name="tag-body" colour={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} palette={{$:/palette}} icon={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} tagField=<<__tagField__>>/> - -<$vars tabIndex={{$:/config/EditTabIndex}} cancelPopups="yes"> -<$macrocall $name="tag-picker" tagField=<<__tagField__>>/> - + <$list filter="[getenlist-input[]sort[title]]" storyview="pop"> + <$macrocall $name="tag-body" + colour={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} + palette={{$:/palette}} + icon={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} + tagField=<> + /> + + <$let tabIndex={{$:/config/EditTabIndex}} cancelPopups="yes"> + <$macrocall $name="tag-picker" tagField=<>/> +
\end -<$set name="saveTiddler" value=<>> -<$macrocall $name="edit-tags-template" tagField=<>/> - +<$let saveTiddler=<>> + <$macrocall $name="edit-tags-template" tagField=<>/> + diff --git a/core/ui/EditorToolbar/preview.tid b/core/ui/EditorToolbar/preview.tid index 3c8cef505..d5c63eb5f 100644 --- a/core/ui/EditorToolbar/preview.tid +++ b/core/ui/EditorToolbar/preview.tid @@ -9,17 +9,8 @@ button-classes: tc-text-editor-toolbar-item-start-group shortcuts: ((preview)) \whitespace trim -<$let - edit-preview-state={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[] }}} -> -<$reveal state=<> type="match" text="yes" tag="span"> -{{$:/core/images/preview-open}} -<$action-setfield $tiddler=<> $value="no"/> + + <$transclude $tiddler={{{ [match[yes]then[$:/core/images/preview-open]else[$:/core/images/preview-closed]] }}} /> + +<$action-setfield $tiddler=<> $value={{{ [get[text]toggle[yes],[no]] }}} /> <$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/> - -<$reveal state=<> type="nomatch" text="yes" tag="span"> -{{$:/core/images/preview-closed}} -<$action-setfield $tiddler=<> $value="yes"/> -<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/> - - diff --git a/core/ui/KeyboardShortcuts/refresh.tid b/core/ui/KeyboardShortcuts/refresh.tid new file mode 100644 index 000000000..6776c9d73 --- /dev/null +++ b/core/ui/KeyboardShortcuts/refresh.tid @@ -0,0 +1,5 @@ +title: $:/core/ui/KeyboardShortcuts/refresh +tags: $:/tags/KeyboardShortcut +key: ((refresh)) + +<$action-sendmessage $message="tm-browser-refresh"/> diff --git a/core/ui/PageControls.tid b/core/ui/PageControls.tid index 93a7bc224..833b4cbcb 100644 --- a/core/ui/PageControls.tid +++ b/core/ui/PageControls.tid @@ -1,17 +1,14 @@ title: $:/core/ui/PageTemplate/pagecontrols \whitespace trim -\define config-title() -$:/config/PageControlButtons/Visibility/$(listItem)$ -\end +\function config-title() [[$:/config/PageControlButtons/Visibility/$(listItem)$]substitute[]] +
-<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> -<$set name="hidden" value=<>> -<$list filter="[!text[hide]]" storyview="pop" variable="ignore"> -<$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"> -<$transclude tiddler=<> mode="inline"/> - - - - -
+ <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> + <$list filter="[!text[hide]]" storyview="pop" variable="ignore"> + <$let tv-config-toolbar-class={{{ [enlist] [encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]] }}}> + <$transclude $tiddler=<> $mode="inline"/> + + + +
\ No newline at end of file diff --git a/core/ui/PageControls/more-page-actions.tid b/core/ui/PageControls/more-page-actions.tid index b52f99ec9..3acaef2b6 100644 --- a/core/ui/PageControls/more-page-actions.tid +++ b/core/ui/PageControls/more-page-actions.tid @@ -4,48 +4,41 @@ caption: {{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}} description: {{$:/language/Buttons/More/Hint}} \whitespace trim -\define config-title() -$:/config/PageControlButtons/Visibility/$(listItem)$ -\end -<$button popup=<> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<> selectedClass="tc-selected"> -<$list filter="[match[yes]]"> -{{$:/core/images/down-arrow}} - -<$list filter="[match[yes]]"> - -<$text text={{$:/language/Buttons/More/Caption}}/> - - -<$reveal state=<> type="popup" position="below" animate="yes"> - -
- -<$set name="tv-config-toolbar-icons" value="yes"> - -<$set name="tv-config-toolbar-text" value="yes"> - -<$set name="tv-config-toolbar-class" value="tc-btn-invisible"> - -<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" variable="listItem"> - -<$reveal type="match" state=<> text="hide"> - -<$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"> - -<$transclude tiddler=<> mode="inline"/> - - - - - - - - - - - - - -
+\define config-title() $:/config/PageControlButtons/Visibility/$(listItem)$ +<$button popup=<> + tooltip={{$:/language/Buttons/More/Hint}} + aria-label={{$:/language/Buttons/More/Caption}} + class=<> + selectedClass="tc-selected" +> + <$list filter="[match[yes]]"> + {{$:/core/images/down-arrow}} + + <$list filter="[match[yes]]"> + + <$text text={{$:/language/Buttons/More/Caption}}/> + + + +<$reveal state=<> type="popup" position="below" animate="yes"> +
+ <$set name="tv-config-toolbar-icons" value="yes"> + <$set name="tv-config-toolbar-text" value="yes"> + <$set name="tv-config-toolbar-class" value="tc-btn-invisible"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" + variable="listItem" + > + <$reveal type="match" state=<> text="hide"> + <$set name="tv-config-toolbar-class" + filter="[] [encodeuricomponent[]addprefix[tc-btn-]]" + > + <$transclude tiddler=<> mode="inline"/> + + + + + + +
\ No newline at end of file diff --git a/core/ui/PageTemplate.tid b/core/ui/PageTemplate.tid index 20891e35d..7e78f1e20 100644 --- a/core/ui/PageTemplate.tid +++ b/core/ui/PageTemplate.tid @@ -1,7 +1,7 @@ title: $:/core/ui/PageTemplate name: {{$:/language/PageTemplate/Name}} description: {{$:/language/PageTemplate/Description}} -icon: $:/core/images/layout-button +icon: $:/core/images/default-layout code-body: yes \whitespace trim diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index 98695f6bf..225ea4351 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -2,31 +2,38 @@ title: $:/core/ui/ViewTemplate/title tags: $:/tags/ViewTemplate \whitespace trim -\define title-styles() -fill:$(foregroundColor)$; -\end +\define title-styles() fill:$(foregroundColor)$; +
-
- -<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]" storyview="pop" variable="listItem"><$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"><$transclude tiddler=<>/> - -<$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}> -<$link> -<$list filter="[] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] +[!is[blank]]" variable="ignore"> -<$let foregroundColor={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}> ->> -{{||$:/core/ui/TiddlerIcon}} - - - -<$transclude tiddler={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/title/default]] }}} /> - - -
- -<$reveal type="nomatch" text="" default="" state=<> class="tc-tiddler-info tc-popup-handle" animate="yes" retain="yes"> - -<$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfoSegment]!has[draft.of]] [[$:/core/ui/TiddlerInfo]]" variable="listItem"><$transclude tiddler=<> mode="block"/> - - +
+ + <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]" + storyview="pop" + variable="listItem" + > + <$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"> + <$transclude tiddler=<>/> + + + + <$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}> + <$link> + <$list filter="[] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] +[!is[blank]]" + variable="ignore" + > + <$let foregroundColor={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}> + >> + {{||$:/core/ui/TiddlerIcon}} + + + + <$transclude tiddler={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/title/default]] }}} /> + + +
+ <$reveal tag="div" type="nomatch" text="" default="" state=<> class="tc-tiddler-info tc-popup-handle" animate="yes" retain="yes"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfoSegment]!has[draft.of]] [[$:/core/ui/TiddlerInfo]]" variable="listItem"> + <$transclude tiddler=<> mode="block"/> + +
diff --git a/core/ui/ViewToolbar/more-tiddler-actions.tid b/core/ui/ViewToolbar/more-tiddler-actions.tid index 6b24db362..e7e75a79b 100644 --- a/core/ui/ViewToolbar/more-tiddler-actions.tid +++ b/core/ui/ViewToolbar/more-tiddler-actions.tid @@ -4,49 +4,41 @@ caption: {{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}} description: {{$:/language/Buttons/More/Hint}} \whitespace trim -\define config-title() -$:/config/ViewToolbarButtons/Visibility/$(listItem)$ -\end -<$button popup=<> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<> selectedClass="tc-selected"> -<$list filter="[match[yes]]"> -{{$:/core/images/down-arrow}} - -<$list filter="[match[yes]]"> - -<$text text={{$:/language/Buttons/More/Caption}}/> - - +\define config-title() $:/config/ViewToolbarButtons/Visibility/$(listItem)$ + +<$button popup=<> + tooltip={{$:/language/Buttons/More/Hint}} + aria-label={{$:/language/Buttons/More/Caption}} + class=<> + selectedClass="tc-selected" +> + <$list filter="[match[yes]]"> + {{$:/core/images/down-arrow}} + + <$list filter="[match[yes]]"> + + <$text text={{$:/language/Buttons/More/Caption}}/> + + <$reveal state=<> type="popup" position="belowleft" animate="yes"> - -
- -<$set name="tv-config-toolbar-icons" value="yes"> - -<$set name="tv-config-toolbar-text" value="yes"> - -<$set name="tv-config-toolbar-class" value="tc-btn-invisible"> - -<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" variable="listItem"> - -<$reveal type="match" state=<> text="hide"> - -<$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"> - -<$transclude tiddler=<> mode="inline"/> - - - - - - - - - - - - - -
- +
+ <$set name="tv-config-toolbar-icons" value="yes"> + <$set name="tv-config-toolbar-text" value="yes"> + <$set name="tv-config-toolbar-class" value="tc-btn-invisible"> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" + variable="listItem" + > + <$reveal type="match" state=<> text="hide"> + <$set name="tv-config-toolbar-class" + filter="[] [encodeuricomponent[]addprefix[tc-btn-]]" + > + <$transclude tiddler=<> mode="inline"/> + + + + + + +
\ No newline at end of file diff --git a/core/wiki/config/OfficialPluginLibrary.tid b/core/wiki/config/OfficialPluginLibrary.tid index c753568bc..286384cd1 100644 --- a/core/wiki/config/OfficialPluginLibrary.tid +++ b/core/wiki/config/OfficialPluginLibrary.tid @@ -1,6 +1,6 @@ title: $:/config/OfficialPluginLibrary tags: $:/tags/PluginLibrary -url: https://tiddlywiki.com/library/v5.3.2/index.html +url: https://tiddlywiki.com/library/v5.3.3/index.html caption: {{$:/language/OfficialPluginLibrary}} {{$:/language/OfficialPluginLibrary/Hint}} diff --git a/core/wiki/config/ShortcutInfo.multids b/core/wiki/config/ShortcutInfo.multids index 1f903dcad..bebd02dea 100644 --- a/core/wiki/config/ShortcutInfo.multids +++ b/core/wiki/config/ShortcutInfo.multids @@ -35,6 +35,7 @@ new-tiddler: {{$:/language/Buttons/NewTiddler/Hint}} picture: {{$:/language/Buttons/Picture/Hint}} preview: {{$:/language/Buttons/Preview/Hint}} quote: {{$:/language/Buttons/Quote/Hint}} +refresh: {{$:/language/Buttons/Refresh/Hint}} save-tiddler: {{$:/language/Buttons/Save/Hint}} save-wiki: {{$:/language/Buttons/SaveWiki/Hint}} sidebar-search: {{$:/language/Buttons/SidebarSearch/Hint}} diff --git a/core/wiki/config/shortcuts/shortcuts-mac.multids b/core/wiki/config/shortcuts/shortcuts-mac.multids index fc3fc060f..bc7e50fda 100644 --- a/core/wiki/config/shortcuts/shortcuts-mac.multids +++ b/core/wiki/config/shortcuts/shortcuts-mac.multids @@ -6,4 +6,5 @@ underline: meta-U new-image: ctrl-I new-journal: ctrl-J new-tiddler: ctrl-N +refresh: meta-R save-wiki: meta-S diff --git a/core/wiki/config/shortcuts/shortcuts-not-mac.multids b/core/wiki/config/shortcuts/shortcuts-not-mac.multids index a50563f2d..272169552 100644 --- a/core/wiki/config/shortcuts/shortcuts-not-mac.multids +++ b/core/wiki/config/shortcuts/shortcuts-not-mac.multids @@ -6,3 +6,4 @@ underline: ctrl-U new-image: alt-I new-journal: alt-J new-tiddler: alt-N +refresh: ctrl-R diff --git a/core/wiki/macros/CSS.tid b/core/wiki/macros/CSS.tid index 9e6239e90..2aca2c363 100644 --- a/core/wiki/macros/CSS.tid +++ b/core/wiki/macros/CSS.tid @@ -1,76 +1,69 @@ title: $:/core/macros/CSS -tags: $:/tags/Macro +tags: $:/tags/Macro $:/tags/Global -\define colour(name) -<$transclude tiddler={{$:/palette}} index="$name$"><$transclude tiddler="$:/palettes/Vanilla" index="$name$"><$transclude tiddler="$:/config/DefaultColourMappings/$name$"/> +\procedure colour(name) +\whitespace trim +<$transclude $tiddler={{$:/palette}} $index=`$(name)$`> + <$transclude $tiddler="$:/palettes/Vanilla" $index=`$(name)$`> + <$transclude $tiddler=`$:/config/DefaultColourMappings/$(name)$`/> + + \end -\define color(name) -<> +\procedure color(name) +<$macrocall $name=colour name=`$(name)$`/> \end -\define box-shadow(shadow) -`` - -webkit-box-shadow: $shadow$; - -moz-box-shadow: $shadow$; - box-shadow: $shadow$; -`` +\function box-shadow(shadow) +[[ -webkit-box-shadow: $(shadow)$; + -moz-box-shadow: $(shadow)$; + box-shadow: $(shadow)$;]substitute[]] \end -\define filter(filter) -`` - -webkit-filter: $filter$; - -moz-filter: $filter$; - filter: $filter$; -`` +\function filter(filter) +[[ -webkit-filter: $(filter)$; + -moz-filter: $(filter)$; + filter: $(filter)$;]substitute[]] \end -\define transition(transition) -`` - -webkit-transition: $transition$; - -moz-transition: $transition$; - transition: $transition$; -`` +\function transition(transition) +[[ -webkit-transition: $(transition)$; + -moz-transition: $(transition)$; + transition: $(transition)$;]substitute[]] \end -\define transform-origin(origin) -`` - -webkit-transform-origin: $origin$; - -moz-transform-origin: $origin$; - transform-origin: $origin$; -`` +\function transform-origin(origin) +[[ -webkit-transform-origin: $(origin)$; + -moz-transform-origin: $(origin)$; + transform-origin: $(origin)$;]substitute[]] \end -\define background-linear-gradient(gradient) -`` -background-image: linear-gradient($gradient$); -background-image: -o-linear-gradient($gradient$); -background-image: -moz-linear-gradient($gradient$); -background-image: -webkit-linear-gradient($gradient$); -background-image: -ms-linear-gradient($gradient$); -`` +\function background-linear-gradient(gradient) +[[ background-image: linear-gradient($(gradient)$); + background-image: -o-linear-gradient($(gradient)$); + background-image: -moz-linear-gradient($(gradient)$); + background-image: -webkit-linear-gradient($(gradient)$); + background-image: -ms-linear-gradient($(gradient)$);]substitute[]] \end -\define column-count(columns) -`` --moz-column-count: $columns$; --webkit-column-count: $columns$; -column-count: $columns$; -`` +\function column-count(columns) +[[-moz-column-count: $(columns)$; + -webkit-column-count: $(columns)$; + column-count: $(columns)$;]substitute[]] \end -\define datauri(title) -<$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}} _canonical_uri={{$title$!!_canonical_uri}}/> +\procedure datauri(title) +<$macrocall $name="makedatauri" type={{{ [get[type]] }}} text={{{ [<title>get[text]] }}} _canonical_uri={{{ [<title>get[_canonical_uri]] }}}/> \end -\define if-sidebar(text) -<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes">$text$</$reveal> +\procedure if-sidebar(text) +<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes"><<text>></$reveal> \end -\define if-no-sidebar(text) -<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">$text$</$reveal> +\procedure if-no-sidebar(text) +<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes"><<text>></$reveal> \end -\define if-background-attachment(text) -<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text="">$text$</$reveal> +\procedure if-background-attachment(text) +<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text=""><<text>></$reveal> \end diff --git a/core/wiki/macros/copy-to-clipboard.tid b/core/wiki/macros/copy-to-clipboard.tid index 910e955a9..c0d177d7e 100644 --- a/core/wiki/macros/copy-to-clipboard.tid +++ b/core/wiki/macros/copy-to-clipboard.tid @@ -1,20 +1,26 @@ title: $:/core/macros/copy-to-clipboard -tags: $:/tags/Macro +tags: $:/tags/Macro $:/tags/Global -\define copy-to-clipboard(src,class:"tc-btn-invisible",style) \whitespace trim -<$button class=<<__class__>> style=<<__style__>> message="tm-copy-to-clipboard" param=<<__src__>> tooltip={{$:/language/Buttons/CopyToClipboard/Hint}}> -{{$:/core/images/copy-clipboard}} - -<$text text={{$:/language/Buttons/CopyToClipboard/Caption}}/> + +\procedure copy-to-clipboard(src,class:"tc-btn-invisible",style) +<$button message="tm-copy-to-clipboard" + param=<<src>> + class=<<class>> + style=<<style>> + tooltip={{$:/language/Buttons/CopyToClipboard/Hint}} +> + {{$:/core/images/copy-clipboard}} + <span class="tc-tiny-gap-left"> + <$text text={{$:/language/Buttons/CopyToClipboard/Caption}}/> + </span> </$button> \end -\define copy-to-clipboard-above-right(src,class:"tc-btn-invisible",style) -\whitespace trim +\procedure copy-to-clipboard-above-right(src,class:"tc-btn-invisible",style) <div style="position: relative;"> -<div style="position: absolute; bottom: 0; right: 0;"> -<$macrocall $name="copy-to-clipboard" src=<<__src__>> class=<<__class__>> style=<<__style__>>/> -</div> + <div style="position: absolute; bottom: 0; right: 0;"> + <$macrocall $name="copy-to-clipboard" src=<<src>> class=<<class>> style=<<style>>/> + </div> </div> \end diff --git a/core/wiki/macros/diff.tid b/core/wiki/macros/diff.tid index 36564d084..ed7ebfcf9 100644 --- a/core/wiki/macros/diff.tid +++ b/core/wiki/macros/diff.tid @@ -1,37 +1,37 @@ title: $:/core/macros/diff -tags: $:/tags/Macro +tags: $:/tags/Macro $:/tags/Global -\define compareTiddlerText(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle) \whitespace trim -<$set name="source" tiddler=<<__sourceTiddlerTitle__>> subtiddler=<<__sourceSubTiddlerTitle__>>> -<$set name="dest" tiddler=<<__destTiddlerTitle__>> subtiddler=<<__destSubTiddlerTitle__>>> -<$diff-text source=<<source>> dest=<<dest>>/> -</$set> + +\procedure compareTiddlerText(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle) +<$set name="source" tiddler=<<sourceTiddlerTitle>> subtiddler=<<sourceSubTiddlerTitle>>> + <$set name="dest" tiddler=<<destTiddlerTitle>> subtiddler=<<destSubTiddlerTitle>>> + <$diff-text source=<<source>> dest=<<dest>>/> + </$set> </$set> \end -\define compareTiddlers(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle,exclude) -\whitespace trim +\procedure compareTiddlers(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle,exclude) <table class="tc-diff-tiddlers"> -<tbody> -<$set name="sourceFields" filter="[<__sourceTiddlerTitle__>fields[]sort[]]"> -<$set name="destFields" filter="[<__destSubTiddlerTitle__>subtiddlerfields<__destTiddlerTitle__>sort[]]"> -<$list filter="[enlist<sourceFields>] [enlist<destFields>] -[enlist<__exclude__>] +[sort[]]" variable="fieldName"> -<tr> -<th> -<$text text=<<fieldName>>/> -</th> -<td> -<$set name="source" tiddler=<<__sourceTiddlerTitle__>> subtiddler=<<__sourceSubTiddlerTitle__>> field=<<fieldName>>> -<$set name="dest" tiddler=<<__destTiddlerTitle__>> subtiddler=<<__destSubTiddlerTitle__>> field=<<fieldName>>> -<$diff-text source=<<source>> dest=<<dest>>> </$diff-text> -</$set> -</$set> -</td> -</tr> -</$list> -</$set> -</$set> -</tbody> + <tbody> + <$set name="sourceFields" filter="[<sourceTiddlerTitle>fields[]sort[]]"> + <$set name="destFields" filter="[<destSubTiddlerTitle>subtiddlerfields<destTiddlerTitle>sort[]]"> + <$list filter="[enlist<sourceFields>] [enlist<destFields>] -[enlist<exclude>] +[sort[]]" variable="fieldName"> + <tr> + <th> + <$text text=<<fieldName>>/> + </th> + <td> + <$set name="source" tiddler=<<sourceTiddlerTitle>> subtiddler=<<sourceSubTiddlerTitle>> field=<<fieldName>>> + <$set name="dest" tiddler=<<destTiddlerTitle>> subtiddler=<<destSubTiddlerTitle>> field=<<fieldName>>> + <$diff-text source=<<source>> dest=<<dest>>> </$diff-text> + </$set> + </$set> + </td> + </tr> + </$list> + </$set> + </$set> + </tbody> </table> \end diff --git a/core/wiki/macros/tag-picker.tid b/core/wiki/macros/tag-picker.tid index ede53ec26..4618285be 100644 --- a/core/wiki/macros/tag-picker.tid +++ b/core/wiki/macros/tag-picker.tid @@ -1,177 +1,182 @@ title: $:/core/macros/tag-picker -tags: $:/tags/Macro -first-search-filter: [tags[]!is[system]search:title<userInput>sort[]] -second-search-filter: [tags[]is[system]search:title<userInput>sort[]] +tags: tags: $:/tags/Macro $:/tags/Global +first-search-filter: [subfilter<tagListFilter>!is[system]search:title<userInput>sort[]] +second-search-filter: [subfilter<tagListFilter>is[system]search:title<userInput>sort[]] -\define get-tagpicker-focus-selector() [data-tiddler-title="$(currentTiddlerCSSEscaped)$"] .tc-add-tag-name input +<!-- first-search-filter and second-search-filter fields are not used here in the code, but they are defined as parameters for keyboard-driven-input macro --> -\define delete-tag-state-tiddlers() <$action-deletetiddler $filter="[<newTagNameTiddler>] [<storeTitle>] [<tagSelectionState>]"/> - -\define add-tag-actions(actions,tagField:"tags") \whitespace trim -<$set name="tag" value={{{ [<__tiddler__>get[text]] }}}> - <$list - filter="[<saveTiddler>!contains:$tagField$<tag>!match[]]" - variable="ignore" - emptyMessage="<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter='-[<tag>]'/>" - > - <$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/> - <$transclude $variable="__actions__"/> - </$list> -</$set> -<<delete-tag-state-tiddlers>> -<$action-setfield $tiddler=<<refreshTitle>> text="yes"/> + +<!-- tf.tagpicker-dropdown-id is needed if several tap-pickers are shown in one tiddler --> +\function tf.tagpicker-dropdown-id() + [<qualify $:/state/popup/tags-auto-complete>] + [[$(saveTiddler)$-[$(tagField)$-$(tagListFilter)$]substitute[]sha256[]] +[join[/]] \end -\define clear-tags-actions-inner() -\whitespace trim -<$list - filter="[<storeTitle>has[text]] [<newTagNameTiddler>has[text]]" - variable="ignore" - emptyMessage="<<cancel-delete-tiddler-actions 'cancel'>>" -> +\function tf.tagpicker-dropdown-class() [<tf.tagpicker-dropdown-id>sha256[]addprefix[tc-]] +\function tf.get-tagpicker-focus-selector() [<tf.tagpicker-dropdown-class>addprefix[.]] .tc-popup-handle +[join[ ]] + +<!-- clean up temporary tiddlers, so the next "pick" starts with a clean input --> +<!-- This could probably be optimized / removed if we would use different temp-tiddlers + (future improvement because keeping track is comlex for humans) +--> +\procedure delete-tag-state-tiddlers() +<$action-deletetiddler $filter="[<newTagNameTiddler>] [<storeTitle>] [<tagSelectionState>]"/> +\end + +<!-- trigger __toggle tag__ by keyboard --> +\procedure add-tag-actions() +<$let tag=<<_tf.getTag>> > + <$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter='+[toggle<tag>trim[]]'/> + <% if [<tag>] :intersection[<saveTiddler>get<tagField>enlist-input[]] %> + <!-- tag has been removed - do nothing --> + <% else %> + <<actions>> + <% endif %> <<delete-tag-state-tiddlers>> -</$list> + <$action-setfield $tiddler=<<refreshTitle>> text="yes"/> +</$let> +\end +<!-- <$action-log /> --> + +<!-- ESC key removes the text from the input +The second ESC tries to close the "draft tiddler" +--> +\procedure clear-tags-actions-inner() +<% if [<storeTitle>has[text]] ~[<newTagNameTiddler>has[text]] %> + <<delete-tag-state-tiddlers>> +<% else %> + <<cancel-delete-tiddler-actions "cancel">> +<% endif %> \end -\define clear-tags-actions() -\whitespace trim -<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}> - <$list filter="[<newTagNameTiddler>get[text]!match<userInput>]" emptyMessage="<<clear-tags-actions-inner>>"> - <$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/> +<!-- triggered by keyboard only --> +\procedure clear-tags-actions() +<$let userInput=<<_tf.getUserInput>> > + <!-- this list __cannot__ be transformed to conditional IF. The list variable is used! --> + <$list filter="[<newTagNameTiddler>get[text]!match<userInput>]" > + <$list-empty> + <<clear-tags-actions-inner>> + </$list-empty> + <$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/> + <$action-setfield $tiddler=<<refreshTitle>> text="yes"/> </$list> -</$set> +</$let> \end -\define tag-picker-inner(actions,tagField:"tags") -\whitespace trim -<$vars - newTagNameInputTiddlerQualified=<<qualify "$:/temp/NewTagName/input">> - newTagNameSelectionTiddlerQualified=<<qualify "$:/temp/NewTagName/selected-item">> - fallbackTarget={{$(palette)$##tag-background}} - colourA={{$(palette)$##foreground}} - colourB={{$(palette)$##background}} -> - <$vars - storeTitle={{{ [<newTagNameInputTiddler>!match[]] ~[<newTagNameInputTiddlerQualified>] }}} - tagSelectionState={{{ [<newTagNameSelectionTiddler>!match[]] ~[<newTagNameSelectionTiddlerQualified>] }}} +<!-- similar to add-tag-actions __but__ add-only --> +\procedure add-button-actions() +<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="[<tag>trim[]]"/> +<<actions>> +<<delete-tag-state-tiddlers>> +<$action-sendmessage $message="tm-focus-selector" $param=<<tf.get-tagpicker-focus-selector>>/> +\end +<!-- <$action-log /> --> + +<!-- create dropdown list --> +\procedure tag-picker-listTags(filter, suffix) +<$let userInput=<<_tf.getUserInput>> > + <$list filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]" + emptyMessage="<div class='tc-search-results'>{{$:/language/Search/Search/TooShort}}</div>" variable="listItem" > - <$vars - refreshTitle=<<qualify "$:/temp/NewTagName/refresh">> - nonSystemTagsFilter="[tags[]!is[system]search:title<userInput>sort[]]" - systemTagsFilter="[tags[]is[system]search:title<userInput>sort[]]" + <$list filter=<<filter>> variable="tag"> + <!-- The buttonClasses filter is used to define tc-tag-button-selected state --> + <!-- tf.get-tagpicker-focus-selector has to be resolved for $:/core/ui/TagPickerTagTemplate, + othwerwise qualify in tf.tagpicker-dropdown-id causes problems --> + <$let currentTiddler=<<tag>> + button-classes=`tc-btn-invisible ${[<tag>addsuffix<suffix>] -[<tagSelectionState>get[text]] :then[[]] ~tc-tag-button-selected }$` + get-tagpicker-focus-selector=`${[<tf.get-tagpicker-focus-selector>]}$` + > + {{||$:/core/ui/TagPickerTagTemplate}} + </$let> + </$list> + </$list> +</$let> +\end + +<!-- tag-picker-inner is the main function --> +\procedure tag-picker-inner() +<div class={{{ [[tc-edit-add-tag]] [<tf.tagpicker-dropdown-class>] +[join[ ]] }}}> + <div class="tc-edit-add-tag-ui"> + <span class="tc-add-tag-name tc-small-gap-right"> + <$macrocall $name="keyboard-driven-input" + tiddler=<<newTagNameTiddler>> + storeTitle=<<storeTitle>> + refreshTitle=<<refreshTitle>> + selectionStateTitle=<<tagSelectionState>> + inputAcceptActions=<<add-tag-actions>> + inputCancelActions=<<clear-tags-actions>> + tag="input" + placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} + focusPopup=<<tf.tagpicker-dropdown-id>> + class="tc-edit-texteditor tc-popup-handle" + tabindex=<<tabIndex>> + focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}} + filterMinLength={{$:/config/Tags/MinLength}} + cancelPopups=<<cancelPopups>> + configTiddlerFilter="[[$:/core/macros/tag-picker]]" + /> + </span> + <$button popup=<<tf.tagpicker-dropdown-id>> class="tc-btn-invisible tc-btn-dropdown" + tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}} > - <div class="tc-edit-add-tag"> - <div> - <span class="tc-add-tag-name tc-small-gap-right"> - <$macrocall - $name="keyboard-driven-input" - tiddler=<<newTagNameTiddler>> - storeTitle=<<storeTitle>> - refreshTitle=<<refreshTitle>> - selectionStateTitle=<<tagSelectionState>> - inputAcceptActions="<$macrocall $name='add-tag-actions' actions=<<__actions__>> tagField=<<__tagField__>>/>" - inputCancelActions=<<clear-tags-actions>> - tag="input" - placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} - focusPopup=<<qualify "$:/state/popup/tags-auto-complete">> - class="tc-edit-texteditor tc-popup-handle" - tabindex=<<tabIndex>> - focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}} - filterMinLength={{$:/config/Tags/MinLength}} - cancelPopups=<<cancelPopups>> - configTiddlerFilter="[[$:/core/macros/tag-picker]]" - /> - </span> - <$button popup=<<qualify "$:/state/popup/tags-auto-complete">> - class="tc-btn-invisible tc-btn-dropdown" - tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} - aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}} - > - {{$:/core/images/down-arrow}} - </$button> - <$reveal state=<<storeTitle>> type="nomatch" text=""> - <$button class="tc-btn-invisible tc-small-gap tc-btn-dropdown" - tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} - aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}} - > - {{$:/core/images/close-button}}<<delete-tag-state-tiddlers>> - </$button> - </$reveal> - <span class="tc-add-tag-button tc-small-gap-left"> - <$set name="tag" value={{{ [<newTagNameTiddler>get[text]] }}}> - <$button set=<<newTagNameTiddler>> setTo="" class=""> - <$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/> - <$transclude $variable="__actions__"/> - <$set name="currentTiddlerCSSEscaped" value={{{ [<saveTiddler>escapecss[]] }}}> - <<delete-tag-state-tiddlers>><$action-sendmessage $message="tm-focus-selector" $param=<<get-tagpicker-focus-selector>>/> - </$set> - {{$:/language/EditTemplate/Tags/Add/Button}} - </$button> - </$set> - </span> - </div> - <div class="tc-block-dropdown-wrapper"> - <$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default=""> - <div class="tc-block-dropdown tc-block-tags-dropdown"> - <$set name="userInput" value={{{ [<storeTitle>get[text]] }}}> - <$list - filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]" - emptyMessage="<div class='tc-search-results' - > - {{$:/language/Search/Search/TooShort}}</div>" variable="listItem"> - <$list filter=<<nonSystemTagsFilter>> variable="tag"> - <$list - filter="[<tag>addsuffix[-primaryList]] -[<tagSelectionState>get[text]]" - emptyMessage="<$vars button-classes='tc-btn-invisible tc-tag-button-selected' actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>" - > - <$vars button-classes="tc-btn-invisible" - actions=<<__actions__>> - tagField=<<__tagField__>> - currentTiddler=<<tag>> - > - {{||$:/core/ui/TagPickerTagTemplate}} - </$vars> - </$list> - </$list> - </$list> - <hr> - <$list filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="<div class='tc-search-results'> - {{$:/language/Search/Search/TooShort}}</div>" variable="listItem"> - <$list filter=<<systemTagsFilter>> variable="tag"> - <$list filter="[<tag>addsuffix[-secondaryList]] -[<tagSelectionState>get[text]]" - emptyMessage="<$vars button-classes='tc-btn-invisible tc-tag-button-selected' actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>" - > - <$vars button-classes="tc-btn-invisible" - actions=<<__actions__>> - tagField=<<__tagField__>> - currentTiddler=<<tag>> - > - {{||$:/core/ui/TagPickerTagTemplate}} - </$vars> - </$list> - </$list> - </$list> - </$set> - </div> - </$reveal> - </div> + {{$:/core/images/down-arrow}} + </$button> + <% if [<storeTitle>has[text]] %> + <$button actions=<<delete-tag-state-tiddlers>> class="tc-btn-invisible tc-small-gap tc-btn-dropdown" + tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}} + > + {{$:/core/images/close-button}} + </$button> + <% endif %> + <span class="tc-add-tag-button tc-small-gap-left"> + <$let tag=<<_tf.getTag>>> + <$button set=<<newTagNameTiddler>> actions=<<add-button-actions>> > + {{$:/language/EditTemplate/Tags/Add/Button}} + </$button> + </$let> + </span> + </div> + <div class="tc-block-dropdown-wrapper"> + <% if [<tf.tagpicker-dropdown-id>has[text]] %> + <div class="tc-block-dropdown tc-block-tags-dropdown"> + <$macrocall $name="tag-picker-listTags" filter=<<nonSystemTagsFilter>> suffix="-primaryList" /> + <hr> + <$macrocall $name="tag-picker-listTags" filter=<<systemTagsFilter>> suffix="-secondaryList" /> </div> - </$vars> - </$vars> -</$vars> + <% endif %> + </div> +</div> \end -\define tag-picker(actions,tagField:"tags") -\whitespace trim -<$vars saveTiddler=<<currentTiddler>> palette={{$:/palette}}> - <$list - filter="[<newTagNameTiddler>match[]]" - emptyMessage="<$macrocall $name='tag-picker-inner' actions=<<__actions__>> tagField=<<__tagField__>>/>" - > - <$set name="newTagNameTiddler" value=<<qualify "$:/temp/NewTagName">>> - <$macrocall $name="tag-picker-inner" actions=<<__actions__>> tagField=<<__tagField__>>/> - </$set> - </$list> -</$vars> -\end +<!-- prepare all variables for tag-picker keyboard handling --> +\procedure tag-picker(actions, tagField:"tags", tiddler, tagListFilter:"[tags[]]") + +\function _tf.getUserInput() [<storeTitle>get[text]] +\function _tf.getTag() [<newTagNameTiddler>get[text]] + +<!-- keep those variables because they may "blead" into macros using old syntax --> +<$let + palette={{$:/palette}} + colourA={{{ [<palette>getindex[foreground]] }}} + colourB={{{ [<palette>getindex[background]] }}} + fallbackTarget={{{ [<palette>getindex[tag-background]] }}} + + saveTiddler={{{ [<tiddler>is[blank]then<currentTiddler>else<tiddler>] }}} + + newTagNameTiddler={{{ [[$:/temp/NewTagName]] [<tagField>!match[tags]] +[join[/]] [<qualify>] +[join[]] }}} + storeTitle={{{ [[$:/temp/NewTagName/input]] [<tagField>!match[tags]] +[join[/]] [<qualify>] +[join[]] }}} + + newTagNameSelectionTiddlerQualified=<<qualify "$:/temp/NewTagName/selected-item">> + tagSelectionState={{{ [<newTagNameSelectionTiddler>!match[]] ~[<newTagNameSelectionTiddlerQualified>] }}} + + refreshTitle=<<qualify "$:/temp/NewTagName/refresh">> + + nonSystemTagsFilter="[subfilter<tagListFilter>!is[system]search:title<userInput>sort[]]" + systemTagsFilter="[subfilter<tagListFilter>is[system]search:title<userInput>sort[]]" + + cancelPopups="yes" +> + <$macrocall $name="tag-picker-inner"/> +</$let> +\end \ No newline at end of file diff --git a/core/wiki/macros/tag.tid b/core/wiki/macros/tag.tid index 0dfe8e52a..eedbd0c4c 100644 --- a/core/wiki/macros/tag.tid +++ b/core/wiki/macros/tag.tid @@ -21,7 +21,9 @@ color:$(foregroundColor)$; > <<__actions__>> <$transclude tiddler=<<__icon__>>/> - <$view tiddler=<<__tag__>> field="title" format="text" /> + <span class={{{ [<__tag__>is[missing]then[tc-tag-missing]else[tc-tag-exists]] }}}> + <$view tiddler=<<__tag__>> field="title" format="text" /> + </span> </$element-tag$> </$let> \end diff --git a/editions/dev/tiddlers/HelloThere.tid b/editions/dev/tiddlers/HelloThere.tid index e3b8979a8..bae281fb9 100644 --- a/editions/dev/tiddlers/HelloThere.tid +++ b/editions/dev/tiddlers/HelloThere.tid @@ -16,6 +16,7 @@ Welcome to the developer documentation for TiddlyWiki (https://tiddlywiki.com/). ** [[Adding Babel Polyfill to TiddlyWiki]] ** [[TiddlyWiki Drag and Drop Interoperability]] ** [[Javascript Widget Tutorial]] +** [[Using TiddlyWiki as a library in another Node.js application]] * The original developer documentation from https://tiddlywiki.com: ** [[TiddlyWiki for Developers]] ** [[TiddlyWiki Coding Style Guidelines]] diff --git a/editions/dev/tiddlers/javascript-widget-tutorial/Javascript Widget Tutorial.tid b/editions/dev/tiddlers/javascript-widget-tutorial/Javascript Widget Tutorial.tid index f6ee01182..3a5d18ed4 100644 --- a/editions/dev/tiddlers/javascript-widget-tutorial/Javascript Widget Tutorial.tid +++ b/editions/dev/tiddlers/javascript-widget-tutorial/Javascript Widget Tutorial.tid @@ -1,5 +1,5 @@ created: 20190202035524804 -modified: 20221029161501848 +modified: 20240302110658300 tags: title: Javascript Widget Tutorial type: text/vnd.tiddlywiki @@ -9,21 +9,23 @@ This tutorial provides step-by-step, interactive examples of how to write code f Intended audience: -# Those who know tiddlywiki well and know programming and javascript and want to write their own widget. I don't make any effort to explain javascript here. For that you will need other resources. +# Those who know tiddlywiki well and know programming and javascript and want to write their own widget. # Those who know tiddlywiki well and don't know javascript, but want to understand more about how tiddlywiki works. You should be able to skim through and interact with the demos and learn something. -!The tutorial -*[[Undefined widget tutorial]] -*[[Do nothing widget tutorial]] -*[[Hello World widget tutorial]] -*[[Widget refresh tutorial part I]] -*[[Widget refresh tutorial part II]] -*[[Widget refresh tutorial part III]] -*[[Widget attributes tutorial part I]] -*[[Widget attributes tutorial part II]] -*[[Child widgets tutorial]] +We don't make any effort to explain javascript here. For that you will need other resources, like [[MDN|https://developer.mozilla.org/en-US/docs/Web/JavaScript]]. -! Notes +!! The tutorial +* [[Undefined widget tutorial]] +* [[Do nothing widget tutorial]] +* [[Hello World widget tutorial]] +* [[Widget refresh tutorial part I]] +* [[Widget refresh tutorial part II]] +* [[Widget refresh tutorial part III]] +* [[Widget attributes tutorial part I]] +* [[Widget attributes tutorial part II]] +* [[Child widgets tutorial]] + +!! Notes tiddlywiki doesn't support dynamically reloading javascript. If you change a javascript tiddler, then you need to save and reload the wiki before the changes will take affect. @@ -31,7 +33,11 @@ To avoid the need for such reloads, the excellent [[innerwiki plugin|https://tid Without the need for reloads, a tiddlywiki instance with the [[innerwiki plugin|https://tiddlywiki.com/prerelease/plugins/tiddlywiki/innerwiki/]] installed works great as a playground for interacting with tiddlywiki javascript. -! Other documentation on writing TW widgets +!! Other documentation on writing TW widgets -*WidgetModules -*[[Widgets]] \ No newline at end of file +* WidgetModules +* [[Widgets]] + +!! Full API doc + +[[Github Pages of TW5-Typed|https://tiddly-gittly.github.io/TW5-Typed/api/classes/modules_widgets.widget]] diff --git a/editions/dev/tiddlers/new/Using ES2016 for Writing Plugins.tid b/editions/dev/tiddlers/new/Using ES2016 for Writing Plugins.tid index f89a90f8f..ab447bc2e 100644 --- a/editions/dev/tiddlers/new/Using ES2016 for Writing Plugins.tid +++ b/editions/dev/tiddlers/new/Using ES2016 for Writing Plugins.tid @@ -1,5 +1,5 @@ -modified: 20160305222940000 created: 20160111034749658 +modified: 20240302110735646 title: Using ES2016 for Writing Plugins type: text/vnd.tiddlywiki @@ -7,7 +7,15 @@ With the advent of ES2015 (also known as ES6) and the availability of [[Babel.js Please understand how the PluginMechanism works since this is all about writing a plugin using Babel to compile the output that will be included in the final TiddlyWiki (for example [[TiddlyWiki on Node.js]]). -!! Installing and Configuring Babel +!! Use a framework + +It is recommended to use develop toolkit managed by community. For example, + +# [[Modern.TiddlyDev|https://tiddly-gittly.github.io/Modern.TiddlyDev/]] + +They are known as "~JavaScript Meta-Framework". With them, you can start developing in a few minutes, without hours of configuration and debugging the build steps. + +!! Installing and Configuring Babel by yourself You can install Babel using @@ -33,7 +41,9 @@ Inside your plugin project edit the file `.babelrc` and enter the following: <<.tip "I found it easier to manage my plugins as if they were ''npm'' modules complete with a `package.json` that compiles the output via `npm run build`. See [[npm-scripts documentation|https://docs.npmjs.com/misc/scripts]] for details.">> -!! Compiling the Output +Another benefit of using such a "Meta-Framework" is that you can easily maintain your configuration, you will find it difficult to upgrade those config files after several months. + +!!! Compiling the Output Pick a folder to store the ES2015 JavaScript and a folder to output the TiddlyWiki ready JavaScript. In this example I will use `src` and `lib` respectively. With Babel installed and working I can compile all the JavaScript in the `src` folder to the `lib` folder by running this command: @@ -43,7 +53,7 @@ $ babel src -d lib <<.warning "Babel will //not// copy over non-JavaScript files. It is up to the developer to include all the supporting files themselves. Babel only converts the ~JavaScript files (ending in `.js`) from the `src` folder to the `lib` folder.">> -!! Imports and Exports +!!! Imports and Exports In a plugin written pre-ES2015 one would `require` a module through TiddlyWiki like so: @@ -71,7 +81,7 @@ export { MyWidget as mywidget }; It is important to understand that in ES2016 the ''default'' export is not supported in TiddlyWiki. This is mostly because the core code expects specific properties to be attached to the `exports` variable. Bable's `export` conversion plays well with this //except// with the default export. -!! Classes +!!! Classes In the example of a widget ES2016 plays well with class inheritance. To contrast the typical Widget definition would look something like this: @@ -104,7 +114,7 @@ class NameWidget extends Widget { } ``` -!!! Non Class Modules +!!!! Non Class Modules For non class modules you can use the `export` keyword. Here is a simple [[Startup Module|ModuleType]]: @@ -122,11 +132,11 @@ export const params = {}; export function run() {…} ``` -!! Polyfills +!!! Polyfills ES2015 comes with some features that are part of the JavaScript core objects. These are not supported by all browsers. To use these features in [[most browsers|BrowserCompatibility]] you will need a <<.def "polyfill">>. Babel has a polyfill package that you can include. See [[Adding Babel Polyfill to TiddlyWiki]] for how to accomplish this. -!! Example +!!! Example Here is an example ES2015 plugin/widget that will show the time and update it: diff --git a/editions/dev/tiddlers/new/Using TiddlyWiki as a library.tid b/editions/dev/tiddlers/new/Using TiddlyWiki as a library.tid new file mode 100644 index 000000000..983b7b7fd --- /dev/null +++ b/editions/dev/tiddlers/new/Using TiddlyWiki as a library.tid @@ -0,0 +1,5 @@ +title: Using TiddlyWiki as a library in another Node.js application + +Node.js applications can include TiddlyWiki as a library so that they can use wikitext rendering. + +See the demo at https://github.com/Jermolene/TiddlyWiki5DemoApp \ No newline at end of file diff --git a/editions/dev/tiddlers/system/$__themes_tiddlywiki_vanilla_options_sidebarlayout.tid b/editions/dev/tiddlers/system/$__themes_tiddlywiki_vanilla_options_sidebarlayout.tid new file mode 100644 index 000000000..2f4dcb4e0 --- /dev/null +++ b/editions/dev/tiddlers/system/$__themes_tiddlywiki_vanilla_options_sidebarlayout.tid @@ -0,0 +1,6 @@ +created: 20240311150859344 +modified: 20240311150859344 +title: $:/themes/tiddlywiki/vanilla/options/sidebarlayout +type: text/vnd.tiddlywiki + +fluid-fixed \ No newline at end of file diff --git a/editions/es-ES/tiddlers/$__StoryList.tid b/editions/es-ES/tiddlers/$__StoryList.tid deleted file mode 100644 index 523878d1e..000000000 --- a/editions/es-ES/tiddlers/$__StoryList.tid +++ /dev/null @@ -1,6 +0,0 @@ -created: 20160511060801385 -list: Reference JSONTiddlers -modified: 20160511060801385 -title: $:/StoryList -type: text/vnd.tiddlywiki - diff --git a/editions/full/tiddlywiki.info b/editions/full/tiddlywiki.info index e5dc0b0f9..130d61dfe 100644 --- a/editions/full/tiddlywiki.info +++ b/editions/full/tiddlywiki.info @@ -47,6 +47,7 @@ "it-IT", "ja-JP", "ko-KR", + "mk-MK", "nl-NL", "pa-IN", "pt-PT", diff --git a/editions/introduction/tiddlers/slides/CecilyMap.tid b/editions/introduction/tiddlers/slides/CecilyMap.tid index 01e969cad..3318198f0 100644 --- a/editions/introduction/tiddlers/slides/CecilyMap.tid +++ b/editions/introduction/tiddlers/slides/CecilyMap.tid @@ -4,17 +4,17 @@ type: application/json { "newTiddlerPosition": {"x": 360,"y": 100}, "positions": { - " ": {"x": 30,"y": 17,"w": 140,"h": 140, "r": -2}, - "Tiddlers": {"x": 60,"y": 15,"w": 140,"h": 140, "r": 10}, - "Links": {"x": 90,"y": 13,"w": 140,"h": 140, "r": -7}, - "Formatting": {"x": 120,"y": 18,"w": 140,"h": 140, "r": 5}, - "Images": {"x": 150,"y": 12,"w": 140,"h": 140, "r": -11}, - "Audio": {"x": 180,"y": 14,"w": 140,"h": 140, "r": 16}, - "Tags": {"x": 210,"y": 15,"w": 140,"h": 140, "r": 20}, - "Transclusion": {"x": 240,"y": 16,"w": 140,"h": 140, "r": -4}, - "Lists": {"x": 275,"y": 13,"w": 140,"h": 140, "r": 6}, - "Customisation": {"x": 310,"y": 19,"w": 140,"h": 140, "r": -5}, - "Plugins": {"x": 350,"y": 12,"w": 140,"h": 140, "r": 10}, - "Translations": {"x": 390,"y": 15,"w": 140,"h": 140, "r": 8} + " ": {"x": 30,"y": 17,"w": 120,"h": 120, "r": -2}, + "Tiddlers": {"x": 60,"y": 15,"w": 120,"h": 120, "r": 10}, + "Links": {"x": 90,"y": 13,"w": 120,"h": 120, "r": -7}, + "Formatting": {"x": 120,"y": 18,"w": 120,"h": 120, "r": 5}, + "Images": {"x": 150,"y": 12,"w": 120,"h": 120, "r": -11}, + "Audio": {"x": 180,"y": 14,"w": 120,"h": 120, "r": 16}, + "Tags": {"x": 210,"y": 15,"w": 120,"h": 120, "r": 20}, + "Transclusion": {"x": 240,"y": 16,"w": 120,"h": 120, "r": -4}, + "Lists": {"x": 275,"y": 13,"w": 120,"h": 120, "r": 6}, + "Customisation": {"x": 310,"y": 19,"w": 120,"h": 120, "r": -5}, + "Plugins": {"x": 350,"y": 12,"w": 120,"h": 120, "r": 10}, + "Translations": {"x": 390,"y": 15,"w": 120,"h": 120, "r": 8} } } \ No newline at end of file diff --git a/editions/introduction/tiddlers/slides/blank.json b/editions/introduction/tiddlers/slides/blank.json index 6d507401f..e523d48d4 100644 --- a/editions/introduction/tiddlers/slides/blank.json +++ b/editions/introduction/tiddlers/slides/blank.json @@ -1,3 +1,3 @@ [ -{"title": " ", "text": "TiddlyWiki"} +{"title": " ", "text": "[[TiddlyWiki]]"} ] diff --git a/editions/prerelease/tiddlers/Release 5.3.4.tid b/editions/prerelease/tiddlers/Release 5.3.4.tid new file mode 100644 index 000000000..638afaaa2 --- /dev/null +++ b/editions/prerelease/tiddlers/Release 5.3.4.tid @@ -0,0 +1,118 @@ +caption: 5.3.4 +created: 20231223102229103 +modified: 20231223102229103 +tags: ReleaseNotes +title: Release 5.3.4 +type: text/vnd.tiddlywiki +description: Under development + +//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.3...master]]// + +! Major Improvements + +<<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7734">> several new features that together allow interactive learning tours to be created and presented in TiddlyWiki. + +The demo TiddlyWiki interactive tour can be seen at https://tiddlywiki.com/prerelease/tour + +The new features include: + +* The new Tour Plugin itself +* The new Confetti Plugin that allows animated bursts of confetti to be displayed +* Improvements to the Dynannotate Plugin to add the ability to highlight screen elements using an animated spotlight effect + +! Translation improvements + +Improvements to the following translations: + +* Chinese +* Macedonian +* Polish + +! Plugin Improvements + +* + +! Widget Improvements + +* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/8115">> ''$timestamp'' attribute to ActionDeleteFieldWidget + +! Filter Improvements + +* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7966">> new [[backtranscludes Operator]] + +! Usability Improvements + +* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/issues/8121">> new keyboard shortcut for refreshing the page + +! Hackability Improvements + +* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7966">> button to the JavaScript error popup allowing tiddlers to be saved to a local JSON file +* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/issues/8120">> to latest version of modern-normalize 2.0.0 + +! Bug Fixes + +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7933">> TiddlyWikiClassic build process +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7935">> LinkWidget not refreshing when the `to` attribute changes +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/3460">> parsing bug with empty procedures/macros +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7907">> functions to use variables set by filter runs +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7943">> edit widget not refreshing when the editor type changes +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7922">> editor preview width +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/9bf3c0602d4fd3fe5ac7411db697b51f87a79056">> [[WidgetMessage: tm-http-request]] not returning data in the event of an error +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/8150">> [[WidgetMessage: tm-http-request]] incorrectly interpreting 2XX status codes +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7949">> processing of path separators in `tiddlywiki.files` files on Windows +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7975">> incorrect state reference in advanced search +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7985">> clipping of popups in preview pane +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/8039">> JavaScript error when attempting to export missing tiddlers to a CSV file +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7909">> imported procedures defaulting to `\whitespace trim` +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/801ed0ea1164aab4f88547322f9d73704388143f">> crash with [[cycle Operator]] if the the step size is larger than the number of operands +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/8095">> proper DOCTYPE for the open window template +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7945">> theme font size settings to open in new window CSS + +! Node.js Improvements + +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/8141">> usage of "Cache-Control" header +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7878">> SaveCommand not overwriting files when required + +! Performance Improvements + +* + +! Developer Improvements + +* + +! Infrastructure Improvements + +* + +! 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 """ +andjar +AnthonyMuscio +bimlas +BramChen +btheado +BurningTreeC +catter-fly +eschlon +etardiff +flibbles +FSpark +hoelzro +jinix6 +joshuafontany +linonetwo +mateuszwilczek +mklauber +oeyoews +pmario +PotOfCoffee2Go +rmunn +saqimtiaz +sarna +Telumire +yaisog +""">> diff --git a/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid b/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid index dfd8a6153..d5cdcec63 100644 --- a/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid +++ b/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid @@ -1,6 +1,6 @@ title: $:/config/OfficialPluginLibrary tags: $:/tags/PluginLibrary -url: https://tiddlywiki.com/prerelease/library/v5.3.2/index.html +url: https://tiddlywiki.com/prerelease/library/v5.3.3/index.html caption: {{$:/language/OfficialPluginLibrary}} (Prerelease) The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team. diff --git a/editions/prerelease/tiddlers/system/configPerformanceInstrumentation.tid b/editions/prerelease/tiddlers/system/configPerformanceInstrumentation.tid new file mode 100644 index 000000000..e4220f287 --- /dev/null +++ b/editions/prerelease/tiddlers/system/configPerformanceInstrumentation.tid @@ -0,0 +1,2 @@ +title: $:/config/Performance/Instrumentation +text: yes diff --git a/editions/prerelease/tiddlywiki.info b/editions/prerelease/tiddlywiki.info index 0fe662e1e..6710c831a 100644 --- a/editions/prerelease/tiddlywiki.info +++ b/editions/prerelease/tiddlywiki.info @@ -15,7 +15,10 @@ "tiddlywiki/codemirror", "tiddlywiki/menubar", "tiddlywiki/jszip", - "tiddlywiki/innerwiki" + "tiddlywiki/innerwiki", + "tiddlywiki/confetti", + "tiddlywiki/dynannotate", + "tiddlywiki/tour" ], "themes": [ "tiddlywiki/vanilla", diff --git a/editions/test/tiddlers/tests/data/functions/FunctionFilterrunVariables.tid b/editions/test/tiddlers/tests/data/functions/FunctionFilterrunVariables.tid new file mode 100644 index 000000000..5226e9f05 --- /dev/null +++ b/editions/test/tiddlers/tests/data/functions/FunctionFilterrunVariables.tid @@ -0,0 +1,24 @@ +title: Functions/FunctionFilterrunVariables +description: Functions in filter runs that set variables +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Idiosyncrasy +caption: Idiosyncrasy Caption Field + ++ +title: Output + +\whitespace trim +\procedure demo-subfilter() [<currentTiddler>] +\function .demo-function() [<currentTiddler>] + +<$let currentTiddler="Idiosyncrasy"> +<$text text={{{ [<currentTiddler>get[caption]!is[blank]else<currentTiddler>] :map[subfilter<demo-subfilter>] }}}/>, +<$text text={{{ [<currentTiddler>get[caption]!is[blank]else<currentTiddler>] :map[.demo-function[]] }}}/> +</$let> + ++ +title: ExpectedResult + +<p>Idiosyncrasy Caption Field,Idiosyncrasy Caption Field</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/functions/FunctionFilterrunVariables2.tid b/editions/test/tiddlers/tests/data/functions/FunctionFilterrunVariables2.tid new file mode 100644 index 000000000..07b8c412a --- /dev/null +++ b/editions/test/tiddlers/tests/data/functions/FunctionFilterrunVariables2.tid @@ -0,0 +1,20 @@ +title: Functions/FunctionFilterrunVariables2 +description: Functions in filter runs that set variables +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Apple +cost: 5 + ++ +title: Output + +\whitespace trim +\function .doublecost() [<currentTiddler>get[cost]multiply[2]] + +<$text text={{{ [[Apple]] :map[.doublecost[]] }}}/> + ++ +title: ExpectedResult + +10 \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets2.tid b/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets2.tid index 23fa58c57..b3ef64d7d 100644 --- a/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets2.tid +++ b/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets2.tid @@ -12,6 +12,7 @@ title: Output + title: Definitions +\whitespace trim <$set name="one" value="elephant"> <$set name="two" value="giraffe"> </$set> diff --git a/editions/test/tiddlers/tests/data/importvariables/WithSetWidgetsAndMacros.tid b/editions/test/tiddlers/tests/data/importvariables/WithSetWidgetsAndMacros.tid index eaa81f38c..282896c88 100644 --- a/editions/test/tiddlers/tests/data/importvariables/WithSetWidgetsAndMacros.tid +++ b/editions/test/tiddlers/tests/data/importvariables/WithSetWidgetsAndMacros.tid @@ -14,6 +14,7 @@ title: Output + title: Definitions +\whitespace trim \define name() Bugs Bunny \procedure address() Bunny Hill diff --git a/editions/test/tiddlers/tests/data/list-widget/WithEmptyParagraphTemplate.tid b/editions/test/tiddlers/tests/data/list-widget/WithEmptyParagraphTemplate.tid new file mode 100644 index 000000000..7730f525a --- /dev/null +++ b/editions/test/tiddlers/tests/data/list-widget/WithEmptyParagraphTemplate.tid @@ -0,0 +1,13 @@ +title: ListWidget/WithEmptyParagraphTemplate +description: List widget with an empty paragraph as inline template +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + ++ +title: Output + +<$list filter="1"><p/></$list> ++ +title: ExpectedResult + +<p><p></p></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/EndInBody.tid b/editions/test/tiddlers/tests/data/macros/EndInBody.tid new file mode 100644 index 000000000..e93a0917d --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/EndInBody.tid @@ -0,0 +1,16 @@ +title: Macros/EndInBody +description: \end line starting with non-whitespace is part of macro body +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\define hello() + hello \end +\end + +Out: <<hello>> ++ +title: ExpectedResult + +<p>Out: hello \end</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/IndentedEnd.tid b/editions/test/tiddlers/tests/data/macros/IndentedEnd.tid new file mode 100644 index 000000000..97f2c4197 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/IndentedEnd.tid @@ -0,0 +1,16 @@ +title: Macros/IndentedEnd +description: \end line starting with whitespace ends a macro body +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\define hello() + hello \end + \end + +Out: <<hello>> ++ +title: ExpectedResult + +<p>Out: hello \end</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/MismatchedNamedEnd.tid b/editions/test/tiddlers/tests/data/macros/MismatchedNamedEnd.tid new file mode 100644 index 000000000..b66821753 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/MismatchedNamedEnd.tid @@ -0,0 +1,16 @@ +title: Macros/MismatchedNamedEnd +description: Mismatched named end is part of the body +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\define hello() + \end goodbye +\end + +Out: <<hello>> ++ +title: ExpectedResult + +<p>Out: \end goodbye</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/WhitespaceOnlyWithEnd.tid b/editions/test/tiddlers/tests/data/macros/WhitespaceOnlyWithEnd.tid new file mode 100644 index 000000000..6998672ba --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/WhitespaceOnlyWithEnd.tid @@ -0,0 +1,18 @@ +title: Macros/WhitespaceOnlyWithEnd +description: The /end should be detected when macro definition contains only whitespace +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\define max() +\end +Nothing +\end + +Out: <<max>> ++ +title: ExpectedResult + +<p>Nothing +\end</p><p>Out: </p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/WhitespaceOnlyWithEnd2.tid b/editions/test/tiddlers/tests/data/macros/WhitespaceOnlyWithEnd2.tid new file mode 100644 index 000000000..60db278d6 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/WhitespaceOnlyWithEnd2.tid @@ -0,0 +1,15 @@ +title: Macros/WhitespaceOnlyWithEnd2 +description: Line with \end can start with whitespace +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\define empty() + \end + +Out: <<empty>> ++ +title: ExpectedResult + +<p>Out: </p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/NestedMacros-indented.tid b/editions/test/tiddlers/tests/data/macros/nested-macros/NestedMacros-indented.tid similarity index 100% rename from editions/test/tiddlers/tests/data/macros/NestedMacros-indented.tid rename to editions/test/tiddlers/tests/data/macros/nested-macros/NestedMacros-indented.tid diff --git a/editions/test/tiddlers/tests/data/macros/NestedMacros-indented2.tid b/editions/test/tiddlers/tests/data/macros/nested-macros/NestedMacros-indented2.tid similarity index 100% rename from editions/test/tiddlers/tests/data/macros/NestedMacros-indented2.tid rename to editions/test/tiddlers/tests/data/macros/nested-macros/NestedMacros-indented2.tid diff --git a/editions/test/tiddlers/tests/data/macros/NestedMacros.tid b/editions/test/tiddlers/tests/data/macros/nested-macros/NestedMacros.tid similarity index 100% rename from editions/test/tiddlers/tests/data/macros/NestedMacros.tid rename to editions/test/tiddlers/tests/data/macros/nested-macros/NestedMacros.tid diff --git a/editions/test/tiddlers/tests/data/macros/TrailingNewlines.tid b/editions/test/tiddlers/tests/data/macros/trailing-newlines/TrailingNewlines.tid similarity index 100% rename from editions/test/tiddlers/tests/data/macros/TrailingNewlines.tid rename to editions/test/tiddlers/tests/data/macros/trailing-newlines/TrailingNewlines.tid diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-draft-exists.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-draft-exists.tid new file mode 100644 index 000000000..10cff1ef9 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-draft-exists.tid @@ -0,0 +1,27 @@ +title: Macros/unusedtitle/basic-draft-exists +description: test <<unusedtitle>> with basic macro parameters but they are empty +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Draft of 'test' +draft.of: test +draft.title: test + ++ +title: Draft of 'asdf 0' +draft.of: asdf 0 +draft.title: asdf 0 + ++ +title: Output + +<!-- hanled in wiki.js --> +<<unusedtitle baseName:"test">> + +<!-- handled in unusedtitle.js --> +<<unusedtitle baseName:"asdf" separator:" " template:"$basename$$separator$$count:1$">> + ++ +title: ExpectedResult + +<p>test 1</p><p>asdf 1</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty-tiddler-exists.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty-tiddler-exists.tid new file mode 100644 index 000000000..7cf80fd20 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty-tiddler-exists.tid @@ -0,0 +1,23 @@ +title: Macros/unusedtitle/basic-params-empty-tiddler-exists +description: test <<unusedtitle>> with basic macro parameters but they are empty +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: New Tiddler + ++ +title: Output + +<!-- hanled in wiki.js --> +<<unusedtitle separator:"">> + +<!-- handled in unusedtitle.js --> +<<unusedtitle baseName:"">> + +<!-- handled in wiki.js --> +<<unusedtitle template:"">> + ++ +title: ExpectedResult + +<p>New Tiddler 1</p><p>New Tiddler 1</p><p>New Tiddler 1</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty.tid new file mode 100644 index 000000000..990f88623 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-empty.tid @@ -0,0 +1,20 @@ +title: Macros/unusedtitle/basic-params-empty +description: test <<unusedtitle>> with basic macro parameters but they are empty +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<!-- hanled in wiki.js --> +<<unusedtitle separator:"">> + +<!-- handled in unusedtitle.js --> +<<unusedtitle baseName:"">> + +<!-- handled in wiki.js --> +<<unusedtitle template:"">> + ++ +title: ExpectedResult + +<p>New Tiddler</p><p>New Tiddler</p><p>New Tiddler</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-tiddlers-exist.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-tiddlers-exist.tid new file mode 100644 index 000000000..a01f1262d --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params-tiddlers-exist.tid @@ -0,0 +1,28 @@ +title: Macros/unusedtitle/basic-params-tiddlers-exist +description: test <<unusedtitle>> with basic macro parameters, where new-name tiddlers already exist +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: New Tiddler + ++ +title: anotherBase + ++ +title: About + ++ +title: Output + +<<unusedtitle>> + +<<unusedtitle separator:"-">> + +<<unusedtitle baseName:"anotherBase">> + +<<unusedtitle baseName:"About" separator:"-">> + ++ +title: ExpectedResult + +<p>New Tiddler 1</p><p>New Tiddler-1</p><p>anotherBase 1</p><p>About-1</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params.tid new file mode 100644 index 000000000..5e1ae482d --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/basic-params.tid @@ -0,0 +1,20 @@ +title: Macros/unusedtitle/basic-params +description: test <<unusedtitle>> with basic macro parameters +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<<unusedtitle>> + +<!-- EDGECASE: separator is ignored if tiddler title does not exist --> +<<unusedtitle separator:"-">> + +<<unusedtitle baseName:"anotherBase">> + +<<unusedtitle baseName:"About" separator:"-">> + ++ +title: ExpectedResult + +<p>New Tiddler</p><p>New Tiddler</p><p>anotherBase</p><p>About</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params-tiddler-exist.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params-tiddler-exist.tid new file mode 100644 index 000000000..66ff810b1 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params-tiddler-exist.tid @@ -0,0 +1,50 @@ +title: Macros/unusedtitle/template-empty-params-tiddler-exist +description: test <<unusedtitle>> with templates where parameters are empty +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: New Tiddler + ++ +title: xxx + ++ +title: 00-New Tiddler + ++ +title: 0000 asdf + ++ +title: 0001 asdf + ++ +title: 0000 abc + ++ +title: Output + +<!-- empty template - no template handling at all --> +<<unusedtitle template:"">> + +<!-- + uses basename AND separator if tiddler exists + because it uses default naming build rules - no template handling +--> +<<unusedtitle template:"" separator:"-y-" baseName:"xxx">> + +<<unusedtitle baseName:"" template:"$count:2$-$basename$">> + +<!-- + EDGECASE: if separator is empty it will be initialized with a single space " " + to have the same rules for templates and default title creation +--> +<<unusedtitle baseName:"asdf" separator:"" template:"$count:4$$separator$$basename$">> + +<!-- separator = " " --> +<<unusedtitle baseName:"abc" separator:" " template:"$count:4$$separator$$basename$">> + + ++ +title: ExpectedResult + +<p>New Tiddler 1</p><p>xxx-y-1</p><p>01-New Tiddler</p><p>0002 asdf</p><p>0001 abc</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params.tid new file mode 100644 index 000000000..bdde68a98 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/template-empty-params.tid @@ -0,0 +1,24 @@ +title: Macros/unusedtitle/template-empty-params +description: test <<unusedtitle>> with templates where parameters are empty +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<!-- empty template --> +<<unusedtitle template:"">> + +<!-- + uses basename but ignores separator, + because it uses default naming build rules -- no template handling is active +--> +<<unusedtitle template:"" separator:"-x-" baseName:"xxx">> + +<<unusedtitle baseName:"" template:"$count:2$-$basename$">> + +<<unusedtitle baseName:"asdf" separator:"" template:"$count:4$$separator$$basename$">> + ++ +title: ExpectedResult + +<p>New Tiddler</p><p>xxx</p><p>00-New Tiddler</p><p>0000 asdf</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/macros/unusedtitle/template.tid b/editions/test/tiddlers/tests/data/macros/unusedtitle/template.tid new file mode 100644 index 000000000..66bd0f763 --- /dev/null +++ b/editions/test/tiddlers/tests/data/macros/unusedtitle/template.tid @@ -0,0 +1,28 @@ +title: Macros/unusedtitle/template +description: test <<unusedtitle>> with templates +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<!-- empty template - standard rules are used --> +<<unusedtitle template:"">> + +<<unusedtitle template:"count-missing">> + +<<unusedtitle template:"$count:2$-new">> + +<!-- template is handled using $tw.utils.formatTitleString --> +<<unusedtitle baseName:"base" template:"$count:2$-$basename$">> + +<<unusedtitle baseName:"" template:"$count:2$-$basename$">> + +<!-- UPPERCASES are intentional in template strings. They should be case-insensistive --> +<<unusedtitle baseName:"asdf" separator:"-" template:"$coUNT:2$$sepaRATor$$baseName$">> + +<<unusedtitle baseName:"asdf" separator:"" template:"$count:2$$separator$$basename$">> + ++ +title: ExpectedResult + +<p>New Tiddler</p><p>count-missing</p><p>00-new</p><p>00-base</p><p>00-New Tiddler</p><p>00-asdf</p><p>00 asdf</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/pragmas/WhitespaceAfterPragma.tid b/editions/test/tiddlers/tests/data/pragmas/WhitespaceAfterPragma.tid new file mode 100644 index 000000000..34b7b12ff --- /dev/null +++ b/editions/test/tiddlers/tests/data/pragmas/WhitespaceAfterPragma.tid @@ -0,0 +1,64 @@ +title: Pragmas/WhitespaceAfterPragma +description: parsermode pragma +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<$wikify name="parsetree" text={{Text}} mode="inline" output="parsetree"> +<$text text=<<parsetree>>/> +</$wikify> ++ +title: Text + +\procedure this-is-a-definition() Something + + + + +Now! + ++ +title: ExpectedResult + +<p> +[ + { + "type": "set", + "attributes": { + "name": { + "name": "name", + "type": "string", + "value": "this-is-a-definition" + }, + "value": { + "name": "value", + "type": "string", + "value": "Something" + } + }, + "children": [ + { + "type": "text", + "text": "Now!\n", + "start": 48, + "end": 53 + } + ], + "params": [], + "orderedAttributes": [ + { + "name": "name", + "type": "string", + "value": "this-is-a-definition" + }, + { + "name": "value", + "type": "string", + "value": "Something" + } + ], + "isProcedureDefinition": true + } +] +</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/pragmas/WhitespaceNoPragma.tid b/editions/test/tiddlers/tests/data/pragmas/WhitespaceNoPragma.tid new file mode 100644 index 000000000..2a7041750 --- /dev/null +++ b/editions/test/tiddlers/tests/data/pragmas/WhitespaceNoPragma.tid @@ -0,0 +1,32 @@ +title: Pragmas/WhitespaceNoPragma +description: parsermode pragma +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +<$wikify name="parsetree" text={{Text}} mode="inline" output="parsetree"> +<$text text=<<parsetree>>/> +</$wikify> ++ +title: Text + + + + + +Now! + ++ +title: ExpectedResult + +<p> +[ + { + "type": "text", + "text": "\n\n\n\nNow!\n", + "start": 0, + "end": 9 + } +] +</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/procedures/EndInBody.tid b/editions/test/tiddlers/tests/data/procedures/EndInBody.tid new file mode 100644 index 000000000..3aa13fad5 --- /dev/null +++ b/editions/test/tiddlers/tests/data/procedures/EndInBody.tid @@ -0,0 +1,16 @@ +title: Procedures/EndInBody +description: \end line starting with non-whitespace is part of procedure body +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\procedure hello() + hello \end +\end + +Out: <<hello>> ++ +title: ExpectedResult + +<p>Out: hello \end</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/procedures/IndentedEnd.tid b/editions/test/tiddlers/tests/data/procedures/IndentedEnd.tid new file mode 100644 index 000000000..664be3446 --- /dev/null +++ b/editions/test/tiddlers/tests/data/procedures/IndentedEnd.tid @@ -0,0 +1,16 @@ +title: Procedures/IndentedEnd +description: \end line starting with whitespace ends a procedure body +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\procedure hello() + hello \end + \end + +Out: <<hello>> ++ +title: ExpectedResult + +<p>Out: hello \end</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/procedures/MismatchedNamedEnd.tid b/editions/test/tiddlers/tests/data/procedures/MismatchedNamedEnd.tid new file mode 100644 index 000000000..0b5385c6e --- /dev/null +++ b/editions/test/tiddlers/tests/data/procedures/MismatchedNamedEnd.tid @@ -0,0 +1,16 @@ +title: Procedures/MismatchedNamedEnd +description: Mismatched named end is part of the body +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\procedure hello() + \end goodbye +\end + +Out: <<hello>> ++ +title: ExpectedResult + +<p>Out: \end goodbye</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/procedures/WhitespaceOnlyWithEnd.tid b/editions/test/tiddlers/tests/data/procedures/WhitespaceOnlyWithEnd.tid new file mode 100644 index 000000000..51f0b87df --- /dev/null +++ b/editions/test/tiddlers/tests/data/procedures/WhitespaceOnlyWithEnd.tid @@ -0,0 +1,18 @@ +title: Procedures/WhitespaceOnlyWithEnd +description: The /end should be detected when procedure definition contains only whitespace +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\procedure max() +\end +Nothing +\end + +Out: <<max>> ++ +title: ExpectedResult + +<p>Nothing +\end</p><p>Out: </p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/procedures/WhitespaceOnlyWithEnd2.tid b/editions/test/tiddlers/tests/data/procedures/WhitespaceOnlyWithEnd2.tid new file mode 100644 index 000000000..54d3ebbf6 --- /dev/null +++ b/editions/test/tiddlers/tests/data/procedures/WhitespaceOnlyWithEnd2.tid @@ -0,0 +1,15 @@ +title: Procedures/WhitespaceOnlyWithEnd2 +description: Line with \end can start with whitespace +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\procedure empty() + \end + +Out: <<empty>> ++ +title: ExpectedResult + +<p>Out: </p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace2.tid b/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace2.tid new file mode 100644 index 000000000..e6cd673bc --- /dev/null +++ b/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace2.tid @@ -0,0 +1,25 @@ +title: Transclude/Procedures/Whitespace2 +description: Procedures should inherit whitespace settings from definition site +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\procedure testproc() +This is a sentence +\end + +\define testmacro() +This is a sentence +\end +This is a sentence +[<<testproc>>] +[<<testmacro>>] + ++ +title: ExpectedResult + +<p>This is a sentence +[This is a sentence ] +[This is a sentence ] +</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace3.tid b/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace3.tid new file mode 100644 index 000000000..b043bceda --- /dev/null +++ b/editions/test/tiddlers/tests/data/transclude/Procedures-Whitespace3.tid @@ -0,0 +1,30 @@ +title: Transclude/Procedures/Whitespace3 +description: Procedures should inherit whitespace settings from definition site +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\import Definitions + +This is a sentence +[<<testproc>>] +[<<testmacro>>] + ++ +title: Definitions + +\procedure testproc() +This is a sentence +\end + +\define testmacro() +This is a sentence +\end ++ +title: ExpectedResult + +<p>This is a sentence +[This is a sentence ] +[This is a sentence ] +</p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/widgets/DataAttributes/SelectWidget-DataAttributes.tid b/editions/test/tiddlers/tests/data/widgets/DataAttributes/SelectWidget-DataAttributes.tid index de2c9995e..e2006312b 100644 --- a/editions/test/tiddlers/tests/data/widgets/DataAttributes/SelectWidget-DataAttributes.tid +++ b/editions/test/tiddlers/tests/data/widgets/DataAttributes/SelectWidget-DataAttributes.tid @@ -6,7 +6,7 @@ tags: [[$:/tags/wiki-test-spec]] title: Output \whitespace trim -<$select tiddler='New Tiddler' field='text' default='Choose a new text' data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}} onclick="clicked"> +<$select tiddler='New Tiddler' class="myclass" field='text' default='Choose a new text' data-title={{Temp}} style.color={{{ [[Temp]get[color]] }}} onclick="clicked"> <option disabled>Choose a new text</option> <option>A Tale of Two Cities</option> <option>A New Kind of Science</option> @@ -24,4 +24,4 @@ Title1 + title: ExpectedResult -<p><select data-title="Title2" value="Choose a new text" style="color:red;"><option disabled="true">Choose a new text</option><option>A Tale of Two Cities</option><option>A New Kind of Science</option><option>The Dice Man</option></select></p> \ No newline at end of file +<p><select class="myclass" data-title="Title2" value="Choose a new text" style="color:red;"><option disabled="true">Choose a new text</option><option>A Tale of Two Cities</option><option>A New Kind of Science</option><option>The Dice Man</option></select></p> \ No newline at end of file diff --git a/editions/test/tiddlers/tests/test-action-deletefield.js b/editions/test/tiddlers/tests/test-action-deletefield.js new file mode 100644 index 000000000..876f44d8e --- /dev/null +++ b/editions/test/tiddlers/tests/test-action-deletefield.js @@ -0,0 +1,176 @@ +/*\ +title: test-action-deletefield.js +type: application/javascript +tags: [[$:/tags/test-spec]] + +Tests <$action-deletefield />. + +\*/ +(function(){ + +/* jslint node: true, browser: true */ +/* eslint-env node, browser, jasmine */ +/* eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/ +/* global $tw, require */ +"use strict"; + +describe("<$action-deletefield /> tests", function() { + +const TEST_TIDDLER_TITLE = "TargetTiddler"; +const TEST_TIDDLER_MODIFIED = "20240313114828368"; + +function setupWiki(condition, targetField, wikiOptions) { + // Create a wiki + var wiki = new $tw.Wiki({}); + var tiddlers = [{ + title: "Root", + text: "Some dummy content" + }]; + var tiddler; + if(condition.targetTiddlerExists) { + var fields = { + title: TEST_TIDDLER_TITLE, + }; + if(condition.modifiedFieldExists) { + fields.modified = TEST_TIDDLER_MODIFIED; + } + if(condition.targetFieldExists) { + fields[targetField] = "some text"; + } + var tiddler = new $tw.Tiddler(fields); + tiddlers.push(tiddler); + } + wiki.addTiddlers(tiddlers); + wiki.addIndexersToWiki(); + var widgetNode = wiki.makeTranscludeWidget("Root",{document: $tw.fakeDocument, parseAsInline: true}); + var container = $tw.fakeDocument.createElement("div"); + widgetNode.render(container,null); + return { + wiki: wiki, + widgetNode: widgetNode, + contaienr: container, + tiddler: tiddler, + }; +} + +function generateTestConditions() { + var conditions = []; + + $tw.utils.each([true, false], function(tiddlerArgumentIsPresent) { + $tw.utils.each([true, false], function(targetTiddlerExists) { + $tw.utils.each([true, false], function(targetFieldExists) { + $tw.utils.each([true, false], function(fieldArgumentIsUsed) { + $tw.utils.each([true, false], function(modifiedFieldExists) { + $tw.utils.each(["", "yes", "no"], function(timestampArgument) { + conditions.push({ + tiddlerArgumentIsPresent: tiddlerArgumentIsPresent, + targetTiddlerExists: targetTiddlerExists, + targetFieldExists: targetFieldExists, + fieldArgumentIsUsed: fieldArgumentIsUsed, + modifiedFieldExists: modifiedFieldExists, + timestampArgument: timestampArgument, + }); + }); + }); + }); + }); + }); + }); + + return conditions; +} + +function generateActionWikitext(condition, targetField) { + var actionPieces = [ + "<$action-deletefield", + (condition.tiddlerArgumentIsPresent ? "$tiddler='" + TEST_TIDDLER_TITLE + "'" : ""), + (condition.fieldArgumentIsUsed ? "$field='" + targetField + "'" : targetField), + (condition.timestampArgument !== "" ? "$timestamp='" + condition.timestampArgument + "'" : ""), + "/>", + ]; + + return actionPieces.join(" "); +} + +function generateTestContext(action, tiddler) { + var expectationContext = "action: " + action + "\ntiddler:\n\n"; + if(tiddler) { + expectationContext += tiddler.getFieldStringBlock({exclude: ["text"]}); + if(tiddler.text) { + expectationContext += "\n\n" + tiddler.text; + } + expectationContext += "\n\n"; + } else { + expectationContext += "null"; + } + + return expectationContext; +} + +it("should correctly delete fields", function() { + var fields = ['caption', 'description', 'text']; + + var conditions = generateTestConditions(); + + $tw.utils.each(conditions, function(condition) { + $tw.utils.each(fields, function(field) { + var info = setupWiki(condition, field); + var originalTiddler = info.tiddler; + + var invokeActions = function(actions) { + info.widgetNode.invokeActionString(actions,info.widgetNode,null,{ + currentTiddler: TEST_TIDDLER_TITLE, + }); + }; + + var action = generateActionWikitext(condition,field); + + invokeActions(action); + + var testContext = generateTestContext(action,originalTiddler); + + var tiddler = info.wiki.getTiddler(TEST_TIDDLER_TITLE); + if(originalTiddler) { + // assert that the tiddler doesn't have the target field anymore + expect(tiddler.hasField(field)).withContext(testContext).toBeFalsy(); + + var targetFieldWasPresent = originalTiddler.hasField(field); + var updateTimestamps = condition.timestampArgument !== "no"; + + // "created" should exist if it did beforehand, or if the tiddler changed and we asked the widget to update timestamps + var createdFieldShouldExist = originalTiddler.hasField("created") || (targetFieldWasPresent && updateTimestamps); + + // "created" should change only if it didn't exist beforehand and the tiddler changed and we asked the widget to update timestamps + var createdFieldShouldChange = !originalTiddler.hasField("created") && (targetFieldWasPresent && updateTimestamps); + + // "modified" should exist if it did beforehand, or if the tiddler changed and we asked the widget to update timestamps + var modifiedFieldShouldExist = originalTiddler.hasField("modified") || (targetFieldWasPresent && updateTimestamps); + + // "modified" should change if the tiddler changed and we asked the widget to update timestamps + var modifiedFieldShouldChange = targetFieldWasPresent && updateTimestamps; + + expect(tiddler.hasField("created")).withContext(testContext).toBe(createdFieldShouldExist); + expect(tiddler.hasField("modified")).withContext(testContext).toBe(modifiedFieldShouldExist); + + if(createdFieldShouldChange) { + expect(tiddler.fields.created).withContext(testContext).not.toEqual(originalTiddler.fields.created); + } else { + expect(tiddler.fields.created).withContext(testContext).toEqual(originalTiddler.fields.created); + } + + if(modifiedFieldShouldChange) { + expect(tiddler.fields.modified).withContext(testContext).not.toEqual(originalTiddler.fields.modified); + } else { + expect(tiddler.fields.modified).withContext(testContext).toEqual(originalTiddler.fields.modified); + } + } else { + // assert that the tiddler didn't get created if it didn't exist already + expect(tiddler).withContext(testContext).toBeUndefined(); + } + }); + }); +}); + +}); + +})(); diff --git a/editions/test/tiddlers/tests/test-backtranscludes.js b/editions/test/tiddlers/tests/test-backtranscludes.js new file mode 100644 index 000000000..8ef997566 --- /dev/null +++ b/editions/test/tiddlers/tests/test-backtranscludes.js @@ -0,0 +1,148 @@ +/*\ +title: test-backtranscludes.js +type: application/javascript +tags: $:/tags/test-spec + +Tests the backtranscludes mechanism. + +\*/ +(function(){ +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +describe('Backtranscludes tests', function() { + describe('a tiddler with no transcludes to it', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestIncoming', + text: ''}); + + it('should have no backtranscludes', function() { + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe(''); + }); + }); + + describe('A tiddler added to the wiki with a transclude to it', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestIncoming', + text: 'something'}); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: 'A transclude to {{TestIncoming}}'}); + + it('should have a backtransclude', function() { + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + }); + }); + + describe('A tiddler transclude with template will still use the tiddler as result.', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestIncoming', + text: 'something'}); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: 'A transclude to {{TestIncoming||$:/core/ui/TagTemplate}}'}); + + it('should have a backtransclude', function() { + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + }); + }); + + describe('A tiddler that has a transclude added to it later', function() { + it('should have an additional backtransclude', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestIncoming', + text: ''}); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: 'A transclude to {{TestIncoming}}'}); + + wiki.addTiddler({ + title: 'TestOutgoing2', + text: 'Nothing yet!'}); + + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + + wiki.addTiddler({ + title: 'TestOutgoing2', + text: 'Updated with transclude to {{TestIncoming}}'}); + + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing,TestOutgoing2'); + }); + }); + + describe('A tiddler that has a transclude remove from it later', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestIncoming', + text: ''}); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: 'A transclude to {{TestIncoming}}'}); + + it('should have one fewer backtransclude', function() { + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: 'No transclude to ~TestIncoming'}); + + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe(''); + }); + }); + + describe('A tiddler transcludeing to another that gets renamed', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestIncoming', + text: ''}); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: 'A transclude to {{TestIncoming}}'}); + + it('should have its name changed in the backtranscludes', function() { + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + + wiki.renameTiddler('TestOutgoing', 'TestExtroverted'); + + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestExtroverted'); + }); + }); + + describe('A tiddler transcludeing to another that gets deleted', function() { + var wiki = new $tw.Wiki(); + + wiki.addTiddler({ + title: 'TestIncoming', + text: ''}); + + wiki.addTiddler({ + title: 'TestOutgoing', + text: 'A transclude to {{TestIncoming}}'}); + + it('should be removed from backtranscludes', function() { + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing'); + + wiki.deleteTiddler('TestOutgoing'); + + expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe(''); + }); + }); +}); + +})(); diff --git a/editions/tour/tiddlers/Solar System/Asteroid (253) Mathilde Image.png b/editions/tour/tiddlers/Solar System/Asteroid (253) Mathilde Image.png new file mode 100644 index 000000000..29a70a1c3 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Asteroid (253) Mathilde Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Asteroid (253) Mathilde Image.png.meta b/editions/tour/tiddlers/Solar System/Asteroid (253) Mathilde Image.png.meta new file mode 100644 index 000000000..b374371bf --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Asteroid (253) Mathilde Image.png.meta @@ -0,0 +1,3 @@ +title: Asteroid (253) Mathilde Image +type: image/png +tags: Image diff --git a/editions/tour/tiddlers/Solar System/Asteroid.tid b/editions/tour/tiddlers/Solar System/Asteroid.tid new file mode 100644 index 000000000..e1b3a0f29 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Asteroid.tid @@ -0,0 +1,17 @@ +created: 20230720112554020 +modified: 20230720112827830 +title: Asteroid +type: text/vnd.tiddlywiki +tags: [[Solar System]] + +[img class=hero-image [Asteroid (253) Mathilde Image]] + +An asteroid is a space rock. It is a small object in the [[Solar System]] that travels around the [[Sun]]. It is like a [[planet|Planet]] but smaller. They range from very small (smaller than a car) to 600 miles (1000 km) across. A few asteroids have asteroid moons. + +The name "asteroid" means "like a star" in the ancient Greek language. Asteroids may look like small stars in the sky, but they really do move around the [[Sun]], while stars only seem to move because the [[Earth]] spins. Like [[planets|Planet]], asteroids do not make their own light. Because of this, some people think "asteroids" is not a good name, and think that the name "planetoid" ("like a planet") would be a better name. + +Giuseppe Piazzi found the first asteroid, in 1801. He called it Ceres, and it is the biggest object in the asteroid belt. Others, like Juno, Pallas, and Vesta were found later. In the 1850s so many had been found, that they were numbered by a Minor planet designation starting with 1 Ceres. Today, astronomers using computerized telescopes find thousands of asteroids every month. Asteroid impact prediction is one of the purposes. + +Asteroids are the leftover rock and other material from the formation of the [[Solar System]]. These rocks were too small to come together to make a [[planet|Planet]]. Some are made of carbon or metal. Depending on what's on the surface, they are classified into various asteroid spectral types including Type M (metal), Type S (stone), and Type C (carbon). + +Most asteroids in our [[Solar System]] are in the asteroid belt between [[Mars]] and [[Jupiter]]. Many are not in the main asteroid belt. The ones that come close to [[Earth]] are called Near-Earth asteroids. Many scientists think asteroids striking the [[Earth]] killed off all the dinosaurs and caused some of the other extinction events. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Comet Image.png b/editions/tour/tiddlers/Solar System/Comet Image.png new file mode 100644 index 000000000..5223b95e3 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Comet Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Comet Image.png.meta b/editions/tour/tiddlers/Solar System/Comet Image.png.meta new file mode 100644 index 000000000..8972522f3 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Comet Image.png.meta @@ -0,0 +1,3 @@ +title: Comet Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Comet.tid b/editions/tour/tiddlers/Solar System/Comet.tid new file mode 100644 index 000000000..1555b6c90 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Comet.tid @@ -0,0 +1,15 @@ +created: 20230720113501352 +modified: 20230720113633994 +title: Comet +type: text/vnd.tiddlywiki +tags: [[Solar System]] + +[img class=hero-image [Comet Image]] + +A comet is a ball of mostly ice that moves around in outer space. Comets are often described as "dirty snowballs". They are very different from [[asteroids|Asteroid]]. The orbital inclinations of comets are usually high and not near the ecliptic where most [[solar system|Solar System]] objects are found. Most of them are long-period comets and come from the [[Kuiper belt]]. That is very far away from the [[Sun]], but some of them also come near enough to [[Earth]] for us to see at night. + +They have long "tails", because the [[Sun]] melts the ice. A comet's tail does not trail behind it, but points directly away from the [[Sun]], because it is blown by the solar wind. The hard centre of the comet is the nucleus. It is one of the blackest things (lowest albedo) in the [[solar system|Solar System]]. When light shone on the nucleus of Halley's Comet, the comet reflected only 4% of the light back to us. + +Periodic comets visit again and again. Non-periodic or single-apparition comets visit only once. + +Comets sometimes break up, as Comet Biela did in the 19th century. Comet Shoemaker-Levy 9 broke up, and the pieces hit [[Jupiter]] in 1994. Some comets orbit (go around) together in groups. Astronomers think these comets are broken pieces that used to be one object. diff --git a/editions/tour/tiddlers/Solar System/Earth Image.png b/editions/tour/tiddlers/Solar System/Earth Image.png new file mode 100644 index 000000000..d2584076c Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Earth Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Earth Image.png.meta b/editions/tour/tiddlers/Solar System/Earth Image.png.meta new file mode 100644 index 000000000..e699640b6 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Earth Image.png.meta @@ -0,0 +1,3 @@ +title: Earth Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Earth's Moon Image.png b/editions/tour/tiddlers/Solar System/Earth's Moon Image.png new file mode 100644 index 000000000..f33afc953 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Earth's Moon Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Earth's Moon Image.png.meta b/editions/tour/tiddlers/Solar System/Earth's Moon Image.png.meta new file mode 100644 index 000000000..855226d8f --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Earth's Moon Image.png.meta @@ -0,0 +1,3 @@ +title: Earth's Moon Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Earth's Moon.tid b/editions/tour/tiddlers/Solar System/Earth's Moon.tid new file mode 100644 index 000000000..6ef234fb0 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Earth's Moon.tid @@ -0,0 +1,10 @@ +created: 20230720105302348 +modified: 20230720105451528 +title: Earth's Moon +type: text/vnd.tiddlywiki + +[img class=hero-image [Earth's Moon Image]] + +The Moon is [[Earth]]'s only natural satellite. We usually see it in the night sky and also during the day. Some other planets also have moons or natural satellites. + +Our moon is about one-fourth of the width of the [[Earth]]. Because it is far away it looks small, about half a degree wide. The gravity on the moon is one-sixth of the [[Earth]]'s gravity. It means that something will be one-sixth as heavy on the Moon than on [[Earth]]. The Moon is a rocky and dusty place. It moves slowly away from the [[Earth]] at a rate of 3.8 cm per year, due to the effect of tidal dissipation. diff --git a/editions/tour/tiddlers/Solar System/Earth.tid b/editions/tour/tiddlers/Solar System/Earth.tid new file mode 100644 index 000000000..1c467fb9d --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Earth.tid @@ -0,0 +1,21 @@ +created: 20230720102439731 +modified: 20230720105223869 +title: Earth +type: text/vnd.tiddlywiki +tags: Planet [[Rocky]] + +[img class=hero-image [Earth Image]] + +Earth is the third planet from the [[Sun]] in the [[Solar System]]. It is the only planet known to have life on it. The Earth formed about 4.5 billion years ago. It is one of four rocky planets on the inner side of the [[Solar System]]. The other three are [[Mercury]], [[Venus]], and [[Mars]]. + +The large mass of the [[Sun]] keeps the Earth in orbit through the force of gravity. Earth also turns around in space, so that different parts face the Sun at different times. Earth goes around the [[Sun]] once (one year) for every 365​1⁄4 times it turns around (one day). + +Earth is the only planet in the [[Solar System]] that has a large amount of liquid water on its surface. About 74% of the surface of Earth is covered by liquid or frozen water. Because of this, people sometimes call it the blue planet. + +Because of its water, Earth is home to millions of species of plants and animals which need water to survive. The things that live on Earth have changed its surface greatly. For example, early cyanobacteria changed the air and gave it oxygen. The living part of Earth's surface is called the "biosphere". + +Earth is one of the eight planets in the [[Solar System]]. There are also thousands of small bodies which move around the [[Sun]]. The [[Solar System]] is moving through the Orion Arm of the [[Milky Way]] galaxy, and will be for about the next 10,000 years. + +Earth is about 150,000,000 kilometres or 93,000,000 miles away from the [[Sun]] (this distance is called an "Astronomical Unit"). It moves on its orbit at an average speed of about 30 km/s (19 mi/s). Earth turns all the way around about 365​1⁄4 times in the time it takes for Earth to go all the way around the [[Sun]]. To make up this extra bit of a day every year, an additional day is used every four years. This is named a "leap year". + +The [[Moon|Earth's Moon]] goes around Earth at an average distance of 400,000 kilometres or 250,000 miles. It is locked to Earth, so that it always has the same half facing Earth; the other half is called the "dark side of the moon". It takes about 27​1⁄3 days for the [[Moon|Earth's Moon]] to go all the way around Earth, but because Earth is moving around the [[Sun]] at the same time, it takes about 29​1⁄2 days for the [[Moon|Earth's Moon]] to go from dark to bright to dark again. This is where the word "month" came from, even though most months now have 30 or 31 days. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Jupiter Image.png b/editions/tour/tiddlers/Solar System/Jupiter Image.png new file mode 100644 index 000000000..933f1c115 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Jupiter Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Jupiter Image.png.meta b/editions/tour/tiddlers/Solar System/Jupiter Image.png.meta new file mode 100644 index 000000000..472a37e54 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Jupiter Image.png.meta @@ -0,0 +1,3 @@ +title: Jupiter Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Jupiter.tid b/editions/tour/tiddlers/Solar System/Jupiter.tid new file mode 100644 index 000000000..54ef1904c --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Jupiter.tid @@ -0,0 +1,15 @@ +created: 20230720103949854 +modified: 20230720104126047 +title: Jupiter +type: text/vnd.tiddlywiki +tags: Planet [[Gas Giant]] + +[img class=hero-image [Jupiter Image]] + +Jupiter is the largest planet in the [[Solar System]]. It is the fifth planet from the [[Sun]]. Jupiter is a gas giant because it is so large, and made mostly of gas. The other gas giants in the Solar System are [[Saturn]], [[Uranus]], and [[Neptune]]. + +Jupiter's mass is about 318 times the mass of [[Earth]]. This is more than twice the mass of all the other planets in the [[Solar System]] put together. + +Jupiter can be seen even without using a telescope. It is the third brightest object in the night sky. Only the [[Earth's Moon]] and [[Venus]] are brighter. The ancient Romans named the planet after their King of the Gods, Jupiter (Latin: Iuppiter). + +Jupiter has 95 known moons. About 75 of them are very small—less than five kilometres wide. The four largest moons of Jupiter are Io, Europa, Ganymede, and Callisto. They are called the Galilean moons because Galileo Galilei discovered them. Ganymede is the largest moon in the Solar System. Its diameter is larger than that of the planet [[Mercury]]. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Kuiper belt.tid b/editions/tour/tiddlers/Solar System/Kuiper belt.tid new file mode 100644 index 000000000..578fa81a0 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Kuiper belt.tid @@ -0,0 +1,12 @@ +created: 20230720113703253 +modified: 20230720113733279 +title: Kuiper belt +type: text/vnd.tiddlywiki + +The Kuiper belt is an area of the [[Solar System]] beyond the orbit of [[Neptune]] (at 30 astronomical units) to 50 AU from the [[Sun]]. + +The objects within the Kuiper Belt together with the members of the scattered disk beyond, are together called trans-Neptunian. + +Many objects such as dwarf planets in the Kuiper belt are much bigger than the ones in the asteroid belt and are round. At least some Kuiper belt objects are icebound. + +The first objects in the Kuiper belt to be found were [[Pluto]] and Charon (moon) but the belt was only identified and named in 1992 when more Kuiper belt objects (KBOs) were found. A few thousand have since been discovered and more than 70,000 KBOs over 100 km (62 mi) in diameter are thought to exist. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Mars Image.png b/editions/tour/tiddlers/Solar System/Mars Image.png new file mode 100644 index 000000000..32ffaa966 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Mars Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Mars Image.png.meta b/editions/tour/tiddlers/Solar System/Mars Image.png.meta new file mode 100644 index 000000000..bdd350430 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Mars Image.png.meta @@ -0,0 +1,5 @@ +created: 20230720103818354 +modified: 20230720103822277 +title: Mars Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Mars.tid b/editions/tour/tiddlers/Solar System/Mars.tid new file mode 100644 index 000000000..34ab6d138 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Mars.tid @@ -0,0 +1,11 @@ +created: 20230720103800905 +modified: 20230720103915592 +title: Mars +type: text/vnd.tiddlywiki +tags: Planet [[Rocky]] + +[img class=hero-image [Mars Image]] + +Mars is the fourth planet from the [[Sun]] in the [[Solar System]] and the second-smallest planet. Mars is a terrestrial planet with polar ice caps of frozen water and carbon dioxide. It has the largest volcano in the [[Solar System]], and some very large impact craters. Mars is named after the mythological Roman god of war because it appears of red color. + +Space probes such as the Viking program landers are the main tools for the exploration of Mars. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Mercury Image.png b/editions/tour/tiddlers/Solar System/Mercury Image.png new file mode 100644 index 000000000..7d92260b5 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Mercury Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Mercury Image.png.meta b/editions/tour/tiddlers/Solar System/Mercury Image.png.meta new file mode 100644 index 000000000..3ff1fd022 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Mercury Image.png.meta @@ -0,0 +1,3 @@ +title: Mercury Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Mercury.tid b/editions/tour/tiddlers/Solar System/Mercury.tid new file mode 100644 index 000000000..2df1fc653 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Mercury.tid @@ -0,0 +1,21 @@ +created: 20230720101415532 +modified: 20230720101809366 +title: Mercury +type: text/vnd.tiddlywiki +tags: Planet [[Rocky]] + +[img class=hero-image [Mercury Image]] + +Mercury is the smallest planet in the [[Solar System]]. It is the closest planet to the [[Sun]]. It makes one trip around the Sun once every 87.969 days. + +Mercury is bright when we can see it from [[Earth]]. It has an apparent magnitude ranging from −2.0 to 5.5. It cannot be seen easily because it is usually too close to the [[Sun]]. Because of this, Mercury can only be seen in the morning or evening twilight or when there is a solar eclipse. + +Less is known about Mercury than about other planets of our [[Solar System]]. Even with telescopes only a small, bright crescent can be seen. It is also hard to put a satellite in orbit around it. Two spacecraft have visited Mercury. The first one was Mariner 10. It only made a map of about 45% of the Mercury's surface from 1974 to 1975. The second is the MESSENGER spacecraft, which finished mapping Mercury in March 2013. + +Mercury looks like [[Earth's Moon]]. It has many craters and smooth plains. It has no moons and little atmosphere as we know it. However, Mercury does have an extremely thin atmosphere, known as an exosphere. Mercury has a large iron core. Because of this Mercury has a magnetic field about 1% as strong as that of the Earth. It is a very dense planet because its core is large. + +Temperature at the surface can be anywhere from about 90 to 700 K (−183 °C to 427 °C, −297 °F to 801 °F), with the subsolar point being the hottest and the bottoms of craters near the poles being the coldest. + +Known sightings of Mercury date back to at least the first millennium BC. Before the 4th century BC, Greek astronomers thought that Mercury was two different objects: The one that they were only able at sunrise, they called Apollo; the other one that they were only able to see at sunset, they called Hermes. The English name for the planet is from the Romans, who named it after the Roman god Mercury. The symbol for Mercury is based on Hermes' staff. + +Even though Mercury is the closest planet to the [[Sun]], it is not the hottest. This is because it has no greenhouse effect. The heat that the [[Sun]] gives it, quickly escapes into space. The hottest planet is [[Venus]]. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Milky Way Image.png b/editions/tour/tiddlers/Solar System/Milky Way Image.png new file mode 100644 index 000000000..a408977b1 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Milky Way Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Milky Way Image.png.meta b/editions/tour/tiddlers/Solar System/Milky Way Image.png.meta new file mode 100644 index 000000000..ba0727bb8 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Milky Way Image.png.meta @@ -0,0 +1,5 @@ +created: 20230720095228607 +modified: 20230720095237609 +title: Milky Way Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Milky Way.tid b/editions/tour/tiddlers/Solar System/Milky Way.tid new file mode 100644 index 000000000..353611a9d --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Milky Way.tid @@ -0,0 +1,14 @@ +created: 20230720095039202 +modified: 20230720095530636 +title: Milky Way +type: text/vnd.tiddlywiki + +[img class=hero-image [Milky Way Image]] + +The Milky Way is our home galaxy. It contains around 400 billion stars, including our [[Sun]]. + +The Milky Way has a diameter of about 170,000 or 200,000 light years, and is a barred spiral galaxy. The idea that the Milky Way is made of stars goes back to the Ancient Greek philosopher Democritus. + +The Milky Way has three main parts: a disk, where the [[Solar System]] is, a bulge at the core, and an outer halo all around it. Although the word "disk" suggests it is flat, the Milky Way is actually not quite flat. It is slightly warped and twisted. + +This galaxy belongs to the Local Group of three large galaxies and over 50 smaller galaxies. The Milky Way is one of the largest galaxies in the group, second to the Andromeda Galaxy. Its closest neighbour is the Canis Major Dwarf Galaxy, which is about 25,000 light years away from the Earth. The Andromeda Galaxy is moving towards the Milky Way Galaxy, and will collide with it in about 3.75 billion years. The Andromeda Galaxy moves with a speed of about 1,800 kilometres per minute. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Moon.tid b/editions/tour/tiddlers/Solar System/Moon.tid new file mode 100644 index 000000000..84dc3e8be --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Moon.tid @@ -0,0 +1,9 @@ +created: 20230720113324534 +modified: 20230720113416564 +title: Moon +type: text/vnd.tiddlywiki +tags: [[Solar System]] + +Bodies which orbit [[planets|Planet]] are called moons. They vary in size. The [[Earth]] has only one moon. Some other planets have many moons, and some have none. When people write just "the moon", they are usually talking about the moon of the Earth. [[Earth's Moon]] is written with a capital letter, Moon. The Latin word for the moon is luna, which is why the adjective used to talk about the moon is "lunar". For example, lunar eclipse. + +Anything that goes around a planet is called a satellite. Moons are natural satellites. People also use rockets to send machines into orbit around the Earth. These machines are called artificial (man-made) satellites. diff --git a/editions/tour/tiddlers/Solar System/Neptune Image.png b/editions/tour/tiddlers/Solar System/Neptune Image.png new file mode 100644 index 000000000..de2fc62a5 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Neptune Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Neptune Image.png.meta b/editions/tour/tiddlers/Solar System/Neptune Image.png.meta new file mode 100644 index 000000000..85d72346a --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Neptune Image.png.meta @@ -0,0 +1,3 @@ +title: Neptune Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Neptune.tid b/editions/tour/tiddlers/Solar System/Neptune.tid new file mode 100644 index 000000000..f6aa264ab --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Neptune.tid @@ -0,0 +1,19 @@ +created: 20230720104752241 +modified: 20230720104941305 +title: Neptune +type: text/vnd.tiddlywiki +tags: Planet [[Gas Giant]] + +[img class=hero-image [Neptune Image]] + +Neptune is the eighth and farthest planet from the [[Sun]] in the [[Solar System]]. It is an ice giant. It is the fourth-largest planet in the system. Neptune has five rings. These rings are hard to see from the [[Earth]]. + +Neptune's mass is 17 times [[Earth]]'s mass and a little bit more than [[Uranus]]' mass. Neptune is denser and smaller than [[Uranus]]. Its greater mass makes its gravity make its atmosphere smaller and denser. + +It was named after the Roman god of the sea, Neptune. Neptune's astronomical symbol is ♆, the trident of the god Neptune. + +Neptune's atmosphere is mostly hydrogen and helium. It also contains small amounts of methane which makes the planet appear blue. Neptune's blue color is much darker than the color of [[Uranus]]. Neptune also has the strongest winds of any planet in the [[Solar System]], as high as 2,100 km/h or 1,300 mph. + +Urbain Le Verrier and John Couch Adams were the astronomers who discovered Neptune. Neptune was not discovered using a telescope. It was the first planet to be discovered using mathematics. In 1821, astronomers saw that [[Uranus]]' orbit was different from what they expected. Another nearby planet's mass was changing [[Uranus]]' orbit. They found Neptune was the cause. + +Voyager 2 visited Neptune on 25 August 1989. It was the only spacecraft to visit the planet. Neptune used to have a huge storm known as the "Great Dark Spot". Voyager 2 discovered the spot in 1989. The dark spot was not seen in 1994, but new spots were found since then. It is not known why the dark spot disappeared. Visits by other space probes have been planned. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Planet Image.png b/editions/tour/tiddlers/Solar System/Planet Image.png new file mode 100644 index 000000000..48f0f247d Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Planet Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Planet Image.png.meta b/editions/tour/tiddlers/Solar System/Planet Image.png.meta new file mode 100644 index 000000000..edb449743 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Planet Image.png.meta @@ -0,0 +1,3 @@ +title: Planet Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Planet.tid b/editions/tour/tiddlers/Solar System/Planet.tid new file mode 100644 index 000000000..b6fd010a3 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Planet.tid @@ -0,0 +1,17 @@ +created: 20230720112945287 +modified: 20230720113139369 +title: Planet +type: text/vnd.tiddlywiki +tags: [[Solar System]] + +[img class=hero-image [Planet Image]] + +A planet is a large object such as [[Venus]] or [[Earth]] that orbits a star. Planets are smaller than stars, and they do not make light. [[Jupiter]] is the biggest planet in the [[Solar System]], while the smallest planet in the [[Solar System]] is [[Mercury]]. + +Planets are shaped like a slightly squashed ball (called a spheroid). Objects that orbit planets are called satellites. A star and everything which orbits it are called a star system. + +There are eight planets in the [[Solar System]]. [[Pluto]] used to be called a planet, but in August 2006, the International Astronomical Union decided it was a dwarf planet instead. There are four more known dwarf planets in the [[Solar System]], Ceres, Makemake, Eris and Haumea. + +The name "planet" is from the Greek word πλανήτης (planetes), meaning "wanderers", or "things that move". Until the 1990s, people only knew the planets in the [[Solar System]]. + +4,905 extrasolar planets (exoplanets) have been discovered in 3,629 planetary systems (January 2022 data). The count includes 808 multi-planetary systems. Known exoplanets range in size from gas giants about twice as large as Jupiter down to just over the size of the [[Moon|Earth's Moon]]. About 100 of these planets are roughly the size as [[Earth]]. Nine of these orbit in the habitable zone of their star. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Pluto Image.png b/editions/tour/tiddlers/Solar System/Pluto Image.png new file mode 100644 index 000000000..826869ba4 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Pluto Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Pluto Image.png.meta b/editions/tour/tiddlers/Solar System/Pluto Image.png.meta new file mode 100644 index 000000000..8bb04416f --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Pluto Image.png.meta @@ -0,0 +1,3 @@ +title: Pluto Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Pluto.tid b/editions/tour/tiddlers/Solar System/Pluto.tid new file mode 100644 index 000000000..f8968bf03 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Pluto.tid @@ -0,0 +1,12 @@ +created: 20230720113803689 +modified: 20230720114100139 +title: Pluto +type: text/vnd.tiddlywiki + +[img class=hero-image [Pluto Image]] + +Pluto is a dwarf [[planet|Planet]] in the [[Solar System]]. Its formal name is 134340 Pluto, and its planetary symbol ⯓ or ♇. Pluto is the ninth largest body that moves around the [[Sun]]. Upon first being discovered, Pluto was considered a planet but was reclassified to a dwarf planet in 2006. It is the largest body in the [[Kuiper belt]]. + +Like other members of the [[Kuiper belt]], Pluto is mainly made of rock and ice. It is quite small. It is about a fifth (⅕) of the weight of the [[Earth's Moon]]. It is only a third (⅓) of its volume. Pluto is very far from the [[Sun]], so its temperature is very low. The average temperature on Pluto is -226 to -240 degrees Celsius. It has an odd orbit and this orbit is very sloped. It takes Pluto to 30 to 49 AU (4.4–7.4 billion km) from the [[Sun]]. This causes Pluto to sometimes go closer to the Sun than [[Neptune]]. + +Since it was discovered in 1930, Pluto was thought to be the [[Solar System]]'s ninth planet. In the late 1970s, the minor planet 2060 Chiron was found and people learned that Pluto had a small size. Later, in the early 21st century, the scattered disc object Eris and other objects like Pluto were discovered. Eris was initially believed to be 27% larger than Pluto, but was later found to be slightly smaller. On August 24, 2006, the International Astronomical Union (IAU) gave a definition to the word "planet" for the first time. By this definition, Pluto was not a planet anymore. It became a "dwarf planet" along with Eris and Ceres. After this, Pluto was put on the list of minor planets and was downgraded in 2006 by astronomer Michael E Brown. It was given the number 134340. Some scientists still think that Pluto should be classified as a planet. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Saturn Image.png b/editions/tour/tiddlers/Solar System/Saturn Image.png new file mode 100644 index 000000000..e2a73acd2 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Saturn Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Saturn Image.png.meta b/editions/tour/tiddlers/Solar System/Saturn Image.png.meta new file mode 100644 index 000000000..42f23a6b3 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Saturn Image.png.meta @@ -0,0 +1,3 @@ +title: Saturn Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Saturn.tid b/editions/tour/tiddlers/Solar System/Saturn.tid new file mode 100644 index 000000000..cbd0848ea --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Saturn.tid @@ -0,0 +1,17 @@ +created: 20230720104344173 +modified: 20230720104515376 +title: Saturn +type: text/vnd.tiddlywiki +tags: Planet [[Gas Giant]] + +[img class=hero-image [Saturn Image]] + +Saturn is the sixth planet from the [[Sun]] in the [[Solar System]]. + +Saturn is one of the four gas giant planets in the [[Solar System]], together with [[Jupiter]], [[Uranus]], and [[Neptune]]. It is the second largest planet in the [[Solar System]] ([[Jupiter]] is larger). + +Saturn was named after the Roman god Saturnus. He was considered to be the same as the Greek god Kronos. Saturn's symbol is ♄ which is the symbol of Saturnus' sickle. + +Inside Saturn is probably a core of iron, nickel, silicon and oxygen compounds, surrounded by a deep layer of metallic hydrogen, then a layer of liquid hydrogen and liquid helium and finally, an outer gaseous layer. + +Saturn has 145 known moons orbiting the planet. The largest moon is Titan. Titan is larger in volume than the planet [[Mercury]]. Titan is the second-largest moon in the [[Solar System]]. The largest moon is a moon of [[Jupiter]], Ganymede. There are also many rings around Saturn. These rings are made of ice with some rocks and dust. Some people think that that the rings were made by a moon impact or other event. Saturn is about 1,433,000,000 km (870,000,000 mi) on average from the [[Sun]]. Saturn takes 29.6 Earth years to move around the [[Sun]]. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Solar System Image.png b/editions/tour/tiddlers/Solar System/Solar System Image.png new file mode 100644 index 000000000..2cd156daf Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Solar System Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Solar System Image.png.meta b/editions/tour/tiddlers/Solar System/Solar System Image.png.meta new file mode 100644 index 000000000..7f9210e9f --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Solar System Image.png.meta @@ -0,0 +1,3 @@ +title: Solar System Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Solar System.tid b/editions/tour/tiddlers/Solar System/Solar System.tid new file mode 100644 index 000000000..9a73fe9ee --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Solar System.tid @@ -0,0 +1,18 @@ +created: 20230720093645837 +modified: 20230720112852404 +title: Solar System +type: text/vnd.tiddlywiki + +[img class=hero-image [Solar System Image]] + +The Solar System is the [[Sun]] and all the objects that orbit around it. The Sun is orbited by [[planets|Planet]], [[asteroids|Asteroid]], [[comets|Comet]] and other things. + +The Solar System is about 4.568 billion years old. The Sun formed by gravity in a large molecular cloud. It is mainly hydrogen, which it converts into helium through nuclear fusion. The planets are in a flattened orbiting disk. This disk was left over from the cloud that formed the Sun. Eventually, the gas and dust of the disk came together into planets. It is thought that almost all stars and their planets form this way. + +The Sun is a star. It makes up 99.9% of the Solar System's mass. This means that it has strong gravity. The other objects are pulled into orbit around the Sun. The Sun is mostly made out of hydrogen, and some helium and higher elements. All heavier elements, called metals in astronomy, account for less than 2% of the Sun's mass. Oxygen is about 1% of the Sun's mass. Iron (0.2%) is the most plentiful of the other elements. + +There are eight planets in the Solar System. From closest to farthest from the Sun, they are: [[Mercury]], [[Venus]], [[Earth]], [[Mars]], [[Jupiter]], [[Saturn]], [[Uranus]] and [[Neptune]]. The first four planets are called terrestrial planets. They are mostly made of rock and metal, and they are mostly solid. The last four planets are called gas giants. This is because they are much larger than other planets and are mostly made of gas. + +Six of the planets, and the six largest dwarf planets, are orbited by [[moons|Moon]]. There are more than 200 moons in the Solar System. [[Mercury]] and [[Venus]] have no moons, and [[Jupiter]] and [[Saturn]] have the largest number of moons. The largest moon is [[Ganymede]] which is a moon of [[Jupiter]]. [[Titan]] is one of [[Saturn]]’s moons. It is the only moon in the Solar System to have an atmosphere, which is mainly composed of nitrogen. + +The Solar System also contains other things. There are [[asteroid belts|Asteroid]], mostly between [[Mars]] and [[Jupiter]]. Further out than [[Neptune]], there is the [[Kuiper belt]] and the scattered disc. These areas have dwarf planets, including [[Pluto]], Makemake, Haumea, Ceres and Eris. There are thousands of very small objects in these areas. There are also [[comets|Comet]], centaurs, and interplanetary dust. diff --git a/editions/tour/tiddlers/Solar System/Sun Image.png b/editions/tour/tiddlers/Solar System/Sun Image.png new file mode 100644 index 000000000..66da3a30a Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Sun Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Sun Image.png.meta b/editions/tour/tiddlers/Solar System/Sun Image.png.meta new file mode 100644 index 000000000..0f4c217b0 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Sun Image.png.meta @@ -0,0 +1,5 @@ +created: 20230720095341229 +modified: 20230720095343728 +type: image/png +title: Sun Image +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Sun.tid b/editions/tour/tiddlers/Solar System/Sun.tid new file mode 100644 index 000000000..16996c886 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Sun.tid @@ -0,0 +1,17 @@ +created: 20230720094834001 +modified: 20230720095518349 +title: Sun +type: text/vnd.tiddlywiki +tags: [[Solar System]] + +[img class=hero-image [Sun Image]] + +The Sun, also known as Sol, is a star at the center of our [[solar system|Solar System]]. It is a yellow star that gives off different types of energy such as infrared energy (heat), ultraviolet light, radio waves and light. It also gives off a stream of particles, which reaches [[Earth]] as "solar wind". The source of all this energy is nuclear fusion. Nuclear fusion is the reaction in the star which turns hydrogen into helium and makes huge amounts of energy. It is a nearly perfect ball of hot plasma. + +The Sun is a star like many others in our [[Milky Way]] galaxy. The Sun is a type of star called a G-type main-sequence star based on its spectral class. + +The Sun has existed for a little over 4.5 billion years. It is going to continue for at least as long again. + +The Sun is about a hundred times as wide as the Earth. It has a mass of 1.9891×1030 kg. This is 333,000 times the mass of the [[Earth]]. 1.3 million [[Earths|Earth]] can fit inside the Sun. The Sun fuses about 600 million tons of hydrogen into helium every second. + +The Sun is the main source of energy for the [[Earth]]. This energy is made deep inside the Sun in a process called nuclear fusion. Four hydrogen atoms are fused together to make one helium atom. Some of the leftover matter turns into energy. This is the same way energy is released in a hydrogen bomb. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Uranus Image.png b/editions/tour/tiddlers/Solar System/Uranus Image.png new file mode 100644 index 000000000..717c12fe9 Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Uranus Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Uranus Image.png.meta b/editions/tour/tiddlers/Solar System/Uranus Image.png.meta new file mode 100644 index 000000000..412b2588a --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Uranus Image.png.meta @@ -0,0 +1,3 @@ +title: Uranus Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Uranus.tid b/editions/tour/tiddlers/Solar System/Uranus.tid new file mode 100644 index 000000000..273021788 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Uranus.tid @@ -0,0 +1,19 @@ +created: 20230720104606510 +modified: 20230720104721998 +title: Uranus +type: text/vnd.tiddlywiki +tags: Planet [[Gas Giant]] + +[img class=hero-image [Uranus Image]] + +Uranus is the seventh planet from the [[Sun]] in our [[Solar System]]. Like [[Neptune]], it is an ice giant. It is the third largest planet in the solar system. + +The planet is made of ice, gases and liquid metal. Its atmosphere contains hydrogen (1H), helium (2He) and methane. The temperature on Uranus is −197 °C (−322.6 °F; 76.1 K) near the top of its atmosphere, but its small solid core (about 55% the mass of [[Earth]]) is probably about 4,730 °C (8,540 °F; 5,000 K). + +The planet is tilted on its axis so much that it is sideways. It has five big moons, many small ones, and a small system of 13 planetary rings. + +The distance between Uranus and the [[Sun]] is about 2.8 billion km. Uranus completes its orbit around the [[Sun]] in 84 earth years. It completes a spin around its axis in 17 hours and 14 minutes. This means there are about 43,000 Uranian days in one Uranian year. + +Uranus was discovered in 1781. This planet can be seen with the naked eye under perfect conditions. John Flamsteed saw it decades earlier but mistook it for a star (34 Tauri). + +Uranus is named after Uranus, the Greek name of the Sumerian god Anu, who was a god of the sky. \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Venus Image.png b/editions/tour/tiddlers/Solar System/Venus Image.png new file mode 100644 index 000000000..665bb18db Binary files /dev/null and b/editions/tour/tiddlers/Solar System/Venus Image.png differ diff --git a/editions/tour/tiddlers/Solar System/Venus Image.png.meta b/editions/tour/tiddlers/Solar System/Venus Image.png.meta new file mode 100644 index 000000000..fc1bd8938 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Venus Image.png.meta @@ -0,0 +1,3 @@ +title: Venus Image +type: image/png +tags: Image \ No newline at end of file diff --git a/editions/tour/tiddlers/Solar System/Venus.tid b/editions/tour/tiddlers/Solar System/Venus.tid new file mode 100644 index 000000000..33a2c1b72 --- /dev/null +++ b/editions/tour/tiddlers/Solar System/Venus.tid @@ -0,0 +1,17 @@ +created: 20230720101839792 +modified: 20230720104223481 +title: Venus +type: text/vnd.tiddlywiki +tags: Planet [[Rocky]] + +[img class=hero-image [Venus Image]] + +Venus is the second planet from the [[Sun]]. Venus is the only planet in the [[Solar System]] that has a day longer than a year. The year length of Venus is 225 [[Earth]] days. The day length of Venus is 243 [[Earth]] days. + +Venus is a terrestrial planet because it has a solid, rocky surface like other planets in the inner [[Solar System]]. Astronomers have known Venus for thousands of years. The ancient Romans named it after their goddess Venus, goddess of love and beauty. + +Venus is the brightest thing in the night sky except for the Moon. It is sometimes called the morning star or the evening star as at some elongations it is easily seen just before the sun comes up in the morning. At other times, it can be seen just after the sun goes down in the evening. Venus comes closer to the [[Earth]] than any other planet does. + +Venus is sometimes called the sister planet of L as they are quite similar in size and gravity. In other ways the planets are very different. Venus' atmosphere (air) is mostly carbon dioxide with clouds of sulphuric acid. Sulphuric acid is a chemical that is poisonous to life. For this it is sometimes known as the Earth's "evil twin". + +The thick atmosphere makes it hard to see the surface. Until the late twentieth century many thought there might be life there. The pressure on Venus' surface is 92 times that of [[Earth]]. Venus is one of only 2 planets in the [[Solar System]] (the other being [[Mercury]]) that has no moons. Venus spins very slowly on its axis and it spins in the opposite direction to the other planets. \ No newline at end of file diff --git a/editions/tour/tiddlers/System/$__themes_tiddlywiki_vanilla_options_sidebarlayout.tid b/editions/tour/tiddlers/System/$__themes_tiddlywiki_vanilla_options_sidebarlayout.tid new file mode 100644 index 000000000..9fbacf686 --- /dev/null +++ b/editions/tour/tiddlers/System/$__themes_tiddlywiki_vanilla_options_sidebarlayout.tid @@ -0,0 +1,4 @@ +title: $:/themes/tiddlywiki/vanilla/options/sidebarlayout +type: text/vnd.tiddlywiki + +fluid-fixed \ No newline at end of file diff --git a/editions/tour/tiddlers/System/DefaultTiddlers.tid b/editions/tour/tiddlers/System/DefaultTiddlers.tid new file mode 100644 index 000000000..932e7d52c --- /dev/null +++ b/editions/tour/tiddlers/System/DefaultTiddlers.tid @@ -0,0 +1,4 @@ +title: $:/DefaultTiddlers + +[[HelloThere]] +[[Solar System]] diff --git a/editions/tour/tiddlers/System/HelloThere.tid b/editions/tour/tiddlers/System/HelloThere.tid new file mode 100644 index 000000000..c66875f68 --- /dev/null +++ b/editions/tour/tiddlers/System/HelloThere.tid @@ -0,0 +1,5 @@ +title: HelloThere + +Welcome to this TiddlyWiki about the [[Solar System]]. + +With many thanks to the [[Simple English Wikipedia|https://simple.wikipedia.org/]], the original source of this material. diff --git a/editions/tour/tiddlers/System/SiteSubtitle.tid b/editions/tour/tiddlers/System/SiteSubtitle.tid new file mode 100644 index 000000000..77b568672 --- /dev/null +++ b/editions/tour/tiddlers/System/SiteSubtitle.tid @@ -0,0 +1,2 @@ +title: $:/SiteSubitle +text: An Interactive Guide \ No newline at end of file diff --git a/editions/tour/tiddlers/System/SiteTitle.tid b/editions/tour/tiddlers/System/SiteTitle.tid new file mode 100644 index 000000000..a719f77f6 --- /dev/null +++ b/editions/tour/tiddlers/System/SiteTitle.tid @@ -0,0 +1,2 @@ +title: $:/SiteTitle +text: ~TiddlyWiki Tour \ No newline at end of file diff --git a/editions/tour/tiddlers/System/configAutoStartTour.tid b/editions/tour/tiddlers/System/configAutoStartTour.tid new file mode 100644 index 000000000..6bafd6d58 --- /dev/null +++ b/editions/tour/tiddlers/System/configAutoStartTour.tid @@ -0,0 +1,2 @@ +title: $:/config/AutoStartTour +text: yes diff --git a/editions/tour/tiddlers/System/styles.tid b/editions/tour/tiddlers/System/styles.tid new file mode 100644 index 000000000..04e9b94d2 --- /dev/null +++ b/editions/tour/tiddlers/System/styles.tid @@ -0,0 +1,9 @@ +title: $:/demoshow/styles +tags: [[$:/tags/Stylesheet]] + +\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline + +.hero-image { +max-width: 300px; +max-height: 300px; +} \ No newline at end of file diff --git a/editions/tour/tiddlywiki.info b/editions/tour/tiddlywiki.info new file mode 100644 index 000000000..1c6ce20dc --- /dev/null +++ b/editions/tour/tiddlywiki.info @@ -0,0 +1,16 @@ +{ + "description": "A step by step introduction to TiddlyWiki", + "plugins": [ + "tiddlywiki/tour", + "tiddlywiki/confetti", + "tiddlywiki/dynannotate" + ], + "themes": [ + "tiddlywiki/vanilla", + "tiddlywiki/snowwhite" + ], + "build": { + "index": [ + "--rendertiddler","$:/core/save/all","index.html","text/plain"] + } +} diff --git a/editions/translators/tiddlywiki.info b/editions/translators/tiddlywiki.info index b2cc4f7ba..087a6a1f1 100644 --- a/editions/translators/tiddlywiki.info +++ b/editions/translators/tiddlywiki.info @@ -22,6 +22,7 @@ "it-IT", "ja-JP", "ko-KR", + "mk-MK", "nl-NL", "pa-IN", "pl-PL", diff --git a/editions/tw.org/tiddlers/$__StoryList.tid b/editions/tw.org/tiddlers/$__StoryList.tid deleted file mode 100644 index 55e7524f2..000000000 --- a/editions/tw.org/tiddlers/$__StoryList.tid +++ /dev/null @@ -1,3 +0,0 @@ -list: HelloThere -title: $:/StoryList -type: text/vnd.tiddlywiki \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/$__StoryList.tid b/editions/tw5.com/tiddlers/$__StoryList.tid deleted file mode 100644 index 37ea75152..000000000 --- a/editions/tw5.com/tiddlers/$__StoryList.tid +++ /dev/null @@ -1,5 +0,0 @@ -created: 20220728145919904 -list: Brackets Base64 HelloThere GettingStarted Community -modified: 20220728145919904 -title: $:/StoryList -type: text/vnd.tiddlywiki \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/TiddlyWiki Docs PR Maker.tid b/editions/tw5.com/tiddlers/TiddlyWiki Docs PR Maker.tid new file mode 100644 index 000000000..dd32a653b --- /dev/null +++ b/editions/tw5.com/tiddlers/TiddlyWiki Docs PR Maker.tid @@ -0,0 +1,12 @@ +created: 20240313100515958 +modified: 20240313103959789 +tags: Editions +title: TiddlyWiki Docs PR Maker + +''~TiddlyWiki Docs PR Maker'' is a special edition of tiddlywiki.com designed to help you contribute to and improve the documentation made by [[@saqimtiaz|https://github.com/saqimtiaz/]]. + +https://saqimtiaz.github.io/tw5-docs-pr-maker/ + +All changes made to the documentation can be very easily submitted to GitHub -- the pull request will be automatically made, hence the "PR Maker" name of the edition. + +You will need to create a free ~GitHub account and sign the [[Contributor License Agreement]] before using the Docs PR Maker. You can find more details about contributing to the documentation [[here|Improving TiddlyWiki Documentation]]. diff --git a/editions/tw5.com/tiddlers/about/Developers.tid b/editions/tw5.com/tiddlers/about/Developers.tid index 9b24b0c36..51c123ee7 100644 --- a/editions/tw5.com/tiddlers/about/Developers.tid +++ b/editions/tw5.com/tiddlers/about/Developers.tid @@ -8,6 +8,7 @@ There are several resources for developers to learn more about TiddlyWiki and to * [[tiddlywiki.com/dev|https://tiddlywiki.com/dev]] is the official developer documentation * Get involved in the [[development on GitHub|https://github.com/Jermolene/TiddlyWiki5]] +** [img[https://repobeats.axiom.co/api/embed/5a3bb51fd1ebe84a2da5548f78d2d74e456cebf3.svg]] ** [[Discussions|https://github.com/Jermolene/TiddlyWiki5/discussions]] are for Q&A and open-ended discussion ** [[Issues|https://github.com/Jermolene/TiddlyWiki5/issues]] are for raising bug reports and proposing specific, actionable new ideas * The older ~TiddlyWikiDev Google Group is now closed in favour of [[GitHub Discussions|https://github.com/Jermolene/TiddlyWiki5/discussions]] but remains a useful archive: https://groups.google.com/group/TiddlyWikiDev diff --git a/editions/tw5.com/tiddlers/community/Improving TiddlyWiki Documentation.tid b/editions/tw5.com/tiddlers/community/Improving TiddlyWiki Documentation.tid index 3e73d8705..363934f54 100644 --- a/editions/tw5.com/tiddlers/community/Improving TiddlyWiki Documentation.tid +++ b/editions/tw5.com/tiddlers/community/Improving TiddlyWiki Documentation.tid @@ -1,5 +1,5 @@ created: 20140820151051019 -modified: 20190115165616599 +modified: 20240313114828368 tags: Community title: Improving TiddlyWiki Documentation type: text/vnd.tiddlywiki @@ -8,9 +8,29 @@ Anyone can submit improvements to the TiddlyWiki documentation that appears on h <<.warning """If you already know GitHub, note that documentation updates must be directed to the `tiddlywiki-com` branch""">> +! Before you start editing + # Read and observe the [[Documentation Style Guide]] # Create an account on https://github.com if you don't already have one # If you haven't done so already, sign the [[Contributor License Agreement]] as described in [[Signing the Contributor License Agreement]] + +! Editing and submitting your edits + +You can choose to edit the documentation using the [[TiddlyWiki Docs PR Maker]] or directly in ~GitHub. The first method is especially recommended for users not familiar with ~GitHub. + +!! Using [[Docs PR Maker|TiddlyWiki Docs PR Maker]] edition + +# Go to https://saqimtiaz.github.io/tw5-docs-pr-maker/ or click the link displayed in the ribbon underneath the title when editing a tiddler on tiddlywiki.com +# Go through the quick introduction where you will need to provide your ~GitHub username and a ~GitHub access token (you will be guided in creating one) +# Edit or create tiddlers to update the documentation, the wiki will keep track of all changes +# Click the "Submit updates" button and check if all the tiddlers that you edited are included in the submission; if not, drag them into the box +# Provide a concise title and description of your changes (see the rules about titling pull requests in [[contribution guidelines|Contributing]]) +# Submit your changes: +** "Save as draft" will create a //draft// pull request, this is useful if you don't want the changes to be merged //yet//, because you want to work on it later or discuss it first +** "Submit documentation update" will create a pull request, which will be immediately available for review and merging + +!! Using ~GitHub + # On https://tiddlywiki.com, click "edit" on the tiddler you want to improve # You should see a pink banner with the text: //Can you help us improve this documentation? Find out how to edit this tiddler on ~GitHub// # Click on the external link ...''this tiddler on ~GitHub'' diff --git a/editions/tw5.com/tiddlers/community/plugins/Disqus comments plugin by bimlas.tid b/editions/tw5.com/tiddlers/community/plugins/Disqus comments plugin by bimlas.tid index 873398fbf..2e2362c61 100644 --- a/editions/tw5.com/tiddlers/community/plugins/Disqus comments plugin by bimlas.tid +++ b/editions/tw5.com/tiddlers/community/plugins/Disqus comments plugin by bimlas.tid @@ -3,7 +3,7 @@ modified: 20210106151027439 tags: [[Community Plugins]] title: Disqus comments plugin by bimlas type: text/vnd.tiddlywiki -url: https://bimlas.gitlab.io/tw5-disqus/ +url: https://bimlas.github.io/tw5-disqus/ Use this plugin to give your visitors the opportunity to comment on your tiddlers without changing the wiki itself. diff --git a/editions/tw5.com/tiddlers/community/plugins/Kin filter operator by bimlas.tid b/editions/tw5.com/tiddlers/community/plugins/Kin filter operator by bimlas.tid index 9d924d540..8bb2ed457 100644 --- a/editions/tw5.com/tiddlers/community/plugins/Kin filter operator by bimlas.tid +++ b/editions/tw5.com/tiddlers/community/plugins/Kin filter operator by bimlas.tid @@ -3,7 +3,7 @@ modified: 20210106151027488 tags: [[Community Plugins]] title: Kin filter operator by bimlas type: text/vnd.tiddlywiki -url: https://bimlas.gitlab.io/tw5-kin-filter/ +url: https://bimlas.github.io/tw5-kin-filter/ The purpose of the kin operator with examples: diff --git a/editions/tw5.com/tiddlers/community/plugins/Locator plugin by bimlas.tid b/editions/tw5.com/tiddlers/community/plugins/Locator plugin by bimlas.tid index 93b8aa4a7..b8ef9d9bf 100644 --- a/editions/tw5.com/tiddlers/community/plugins/Locator plugin by bimlas.tid +++ b/editions/tw5.com/tiddlers/community/plugins/Locator plugin by bimlas.tid @@ -3,7 +3,7 @@ modified: 20210106151027508 tags: [[Community Plugins]] title: Locator plugin by bimlas type: text/vnd.tiddlywiki -url: https://bimlas.gitlab.io/tw5-locator/ +url: https://bimlas.github.io/tw5-locator/ For those who use many tags or store many different topics in a common wiki the Locator plugin is a table of contents widget and an enhanced search engine that gives you the opportunity to filter results by related tags. Unlike table of contents, standard search and list of tags, this plugin offers these features in an organic, collaborative way. diff --git a/editions/tw5.com/tiddlers/community/themes/Notebook theme by Nicolas Petton.tid b/editions/tw5.com/tiddlers/community/themes/Notebook theme by Nicolas Petton.tid index c31316239..4f86181d3 100644 --- a/editions/tw5.com/tiddlers/community/themes/Notebook theme by Nicolas Petton.tid +++ b/editions/tw5.com/tiddlers/community/themes/Notebook theme by Nicolas Petton.tid @@ -1,9 +1,9 @@ created: 20210101154635213 -modified: 20210110210929321 +modified: 20240131143350890 tags: [[Community Themes]] title: "Notebook theme" by Nicolas Petton type: text/vnd.tiddlywiki -url: https://nicolas.petton.fr/tw/notebook.html +url: https://saqimtiaz.github.io/sq-tw/notebook.html Notebook is a clean, uncluttered theme for ~TiddlyWiki. diff --git a/editions/tw5.com/tiddlers/concepts/Bags and Recipes.tid b/editions/tw5.com/tiddlers/concepts/Bags and Recipes.tid new file mode 100644 index 000000000..19c4f6149 --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/Bags and Recipes.tid @@ -0,0 +1,42 @@ +created: 20240309135835396 +modified: 20240309142156125 +tags: Concepts +title: Bags and Recipes +type: text/vnd.tiddlywiki + +The bags and recipes model is a reference architecture for how tiddlers can be shared between multiple wikis. It was first introduced by TiddlyWeb in 2008. + +The principles of bags and recipes can be simply stated: + +# Tiddlers are stored in named "bags" +# Bags have access controls that determines which users can read or write to them +# Recipes are named lists of bags, ordered from lowest priority to highest +# The tiddlers within a recipe are accumulated in turn from each bag in the recipe in order of increasing priority. Thus, if there are multiple tiddlers with the same title in different bags then the one from the highest priority bag will be used as the recipe tiddler +# Wikis are composed by splicing the tiddlers from the corresponding recipe into the standard TW5 HTML template + +A very simple example of the recipe/bag model might be for a single user who maintains the following bags: + +* ''recipes'' - tiddlers related to cooking recipes +* ''work'' - tiddlers related to work +* ''app'' - common tiddlers for customising TiddlyWiki + +Those bags would be used with the following recipes: + +* ''recipes'' --> recipes, app - wiki for working with recipes, with common custom components +* ''work'' --> work, app - wiki for working with work, with common custom components +* ''app'' --> app - wiki for maintaining custom components + +All of this will work dynamically, so changes to the app bag will instantly ripple into the affected hosted wikis. + +A more complex example might be for a teacher working with a group of students: + +* ''student-{name}'' bag for each students work +* ''teacher-course'' bag for the coursework, editable by the teacher +* ''teacher-tools'' bag for custom tools used by the teacher + +Those bags would be exposed through the following hosted wikis: + +* ''student-{name}'' hosted wiki for each students work, including the coursework material +* ''teacher-course'' hosted wiki for the coursework, editable by the teacher +* ''teacher'' hosted wiki for the teacher, bringing together all the bags, giving them an overview of all the students work + diff --git a/editions/tw5.com/tiddlers/concepts/Filters.tid b/editions/tw5.com/tiddlers/concepts/Filters.tid index b9fec39fc..3e7c0bd6a 100644 --- a/editions/tw5.com/tiddlers/concepts/Filters.tid +++ b/editions/tw5.com/tiddlers/concepts/Filters.tid @@ -1,7 +1,7 @@ created: 20130827080000000 list: [[Introduction to filter notation]] [[Filter Syntax]] -modified: 20220316145511797 -tags: Reference Concepts +modified: 20230710074511095 +tags: Reference Concepts TableOfContents title: Filters type: text/vnd.tiddlywiki @@ -15,7 +15,7 @@ You can think of TiddlyWiki as a database in which the records are tiddlers. A d A <<.def filter>> is a concise notation for selecting a particular [[set of tiddlers|Title Selection]], known as its <<.def "output">>. Whenever ~TiddlyWiki encounters a filter, it calculates the output. Further work can then be done with just those tiddlers, such as [[counting|CountWidget]] or [[listing|ListWidget]] them. -The following example passes a filter to the <<.mlink list-links>> macro to display a list of all tiddlers whose titles are <<.olink2 tagged tag>> with the word <<.word Filters>>: +The following example passes a filter to the <<.mlink list-links>> macro. It displays a list of all tiddlers using the <<.olink2 tag tag>> <<.word Filters>>: <<wikitext-example-without-html """<<list-links "[tag[Filters]]">>""" >> diff --git a/editions/tw5.com/tiddlers/concepts/Macros.tid b/editions/tw5.com/tiddlers/concepts/Macros.tid index 8377046f6..884551996 100644 --- a/editions/tw5.com/tiddlers/concepts/Macros.tid +++ b/editions/tw5.com/tiddlers/concepts/Macros.tid @@ -1,9 +1,15 @@ created: 20140211171341271 -modified: 20230419103154328 +modified: 20230922094937115 tags: Concepts Reference title: Macros type: text/vnd.tiddlywiki +!! Important + +<<.from-version "5.3.0">> Macros have been [[superseded|Macro Pitfalls]] by [[Procedures]], [[Functions]] and [[Custom Widgets]] which together provide more robust and flexible ways to encapsulate and re-use code. + +For text substitutions it is now recommended to use: [[Substituted Attribute Values]], [[substitute Operator]] and [[Transclusion and Substitution]] + !! Introduction A <<.def macro>> is a named snippet of text. They are typically defined with the [[Pragma: \define]]: @@ -26,8 +32,6 @@ The parameters that are specified in the macro call are substituted for special * `$parameter-name$` is replaced with the value of the named parameter * `$(variable-name)$` is replaced with the value of the named [[variable|Variables]]). -<<.from-version "5.3.0">> Macros have been [[superseded|Macro Pitfalls]] by [[Procedures]], [[Custom Widgets]] and [[Functions]] which together provide more robust and flexible ways to encapsulate and re-use code. It is now recommended to only use macros when textual substitution is specifically required. - !! How Macros Work Macros are implemented as a special kind of [[variable|Variables]]. The only thing that distinguishes them from ordinary variables is the way that the parameters are handled. diff --git a/editions/tw5.com/tiddlers/concepts/Temporary Tiddlers.tid b/editions/tw5.com/tiddlers/concepts/Temporary Tiddlers.tid new file mode 100644 index 000000000..c138bf8a3 --- /dev/null +++ b/editions/tw5.com/tiddlers/concepts/Temporary Tiddlers.tid @@ -0,0 +1,8 @@ +created: 20240202112358997 +modified: 20240202120248326 +tags: Concepts +title: Temporary Tiddlers + +Temporary tiddlers are tiddlers that will be discarded when TiddlyWiki is saved. Under default configuration of the SavingMechanism (more specifically, the filter in [[$:/core/save/all]]), these are tiddlers prefixed with `$:/temp/`. This prefix makes them SystemTiddlers as well. + +One example usage of temporary tiddlers is storing the search queries. The query typed in the [[$:/AdvancedSearch]] is stored in [[$:/temp/advancedsearch]]. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/concepts/TextReference.tid b/editions/tw5.com/tiddlers/concepts/TextReference.tid index 474149b88..cf2341a97 100644 --- a/editions/tw5.com/tiddlers/concepts/TextReference.tid +++ b/editions/tw5.com/tiddlers/concepts/TextReference.tid @@ -1,5 +1,5 @@ created: 20130827075900000 -modified: 20161216173541948 +modified: 20230321130421587 tags: Concepts title: TextReference type: text/vnd.tiddlywiki @@ -27,7 +27,7 @@ Text references can be used in several places: * As [[indirect parameters|Filter Parameter]] within [[Filters]] (eg, `<$list filter="[tag{MyTag!!name}]"/>`) * As [[indirect attributes|HTML in WikiText]] of an element or widget (eg, `<$widget attrib={{Title!!description}}/>`) -* As the operand of a shortcut transclusion (eg, `{{MyTiddler!!title}}`) +* As the parameter of a shortcut transclusion (eg, `{{MyTiddler!!title}}`) * As the `state` attribute of the RevealWidget and the LinkCatcherWidget <$macrocall $name=".tip" _="""Note the distinction between a text reference such as `foo!!bar` and a transclusion of a text reference such as `{{foo!!bar}}`"""/> diff --git a/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid b/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid index 0f9b830a7..049782a42 100644 --- a/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid +++ b/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid @@ -1,11 +1,11 @@ created: 20130825213300000 -modified: 20220109101407050 +modified: 20240416103247799 tags: Concepts title: TiddlerFields type: text/vnd.tiddlywiki \define lingo-base() $:/language/Docs/Fields/ -~TiddlerFields are name:value pairs that make up a [[tiddler|Tiddlers]]. Field names must be lowercase letters, digits or the characters `-` (dash), `_` (underscore) and `.` (period). +~TiddlerFields are name:value pairs that make up a [[tiddler|Tiddlers]]. Field names may contain any combination of characters (prior to [[v5.2.0|Release 5.2.0]], fields were constrained to be lowercase letters, digits or the characters `-` (dash), `_` (underscore) and `.` (period)). The standard fields are: @@ -24,7 +24,7 @@ The standard fields are: Other fields used by the core are: |!Field Name |!Description | -|`class` |<<lingo class>> | +|`class` |<<.from-version "5.1.16">> <<lingo class>> | |`code-body` |<<.from-version "5.2.1">> <<lingo code-body>> | |`color` |<<lingo color>> | |`description` |<<lingo description>> | diff --git a/editions/tw5.com/tiddlers/concepts/Title List.tid b/editions/tw5.com/tiddlers/concepts/Title List.tid index a49a665ad..67bb4e339 100644 --- a/editions/tw5.com/tiddlers/concepts/Title List.tid +++ b/editions/tw5.com/tiddlers/concepts/Title List.tid @@ -1,5 +1,5 @@ created: 20150117152418000 -modified: 20220523075540462 +modified: 20231019155036098 tags: Concepts title: Title List type: text/vnd.tiddlywiki @@ -15,3 +15,7 @@ Title lists are used in various places, including PermaLinks and the ListField. They are in fact the simplest case of a [[filter|Filters]], and are thus a way of expressing a [[selection of titles|Title Selection]]. <<.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.""">> + +See also: + +* The [[format Operator]] with the 'titlelist' suffix conditionally wraps double square brackets around a string if it contains whitespace diff --git a/editions/tw5.com/tiddlers/definitions/Legacy.tid b/editions/tw5.com/tiddlers/definitions/Legacy.tid new file mode 100644 index 000000000..325f9e809 --- /dev/null +++ b/editions/tw5.com/tiddlers/definitions/Legacy.tid @@ -0,0 +1,9 @@ +created: 20230319131443509 +modified: 20230319132235520 +tags: Definitions +title: Legacy +type: text/vnd.tiddlywiki + +>Legacy code is old computer source code that is no longer supported on the standard hardware and environments, and is a codebase that is in some respect obsolete or supporting something obsolete. Legacy code may be written in programming languages, use frameworks and external libraries, or use architecture and patterns that are no longer considered modern, increasing the mental burden and ramp-up time for software engineers who work on the codebase. +> +>https://en.wikipedia.org/wiki/Legacy_system \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/definitions/TiddlyWeb.tid b/editions/tw5.com/tiddlers/definitions/TiddlyWeb.tid index 02a335d7f..c3bae2b8a 100644 --- a/editions/tw5.com/tiddlers/definitions/TiddlyWeb.tid +++ b/editions/tw5.com/tiddlers/definitions/TiddlyWeb.tid @@ -2,8 +2,9 @@ created: 201308300841 modified: 20170127221451610 tags: Definitions title: TiddlyWeb +type: text/vnd.tiddlywiki -TiddlyWeb is a reference implementation for an interface to put [[Tiddlers]] on the web. +TiddlyWeb is a reference implementation for an interface to put [[Tiddlers]] on the web using the [[Bags and Recipes]] model. It was created by a team led by Chris Dent at [[Osmosoft]] under [[BT]] from 2008 to 2012. @@ -16,5 +17,3 @@ Other implementations of the API include: * [[TiddlyWiki App Engine Server|https://github.com/rsc/tiddly]], a 300-line Go implementation from Russ Cox * [[TiddlyWiki 5 server module|https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/commands/server.js]], the bare-bones subset of the API implemented in TiddlyWiki version 5 for Node.js * [[tiddly-wiki-server|https://github.com/nathanielknight/tiddly-wiki-server]], an implementation based on Rust and SQLite - -As of early 2017, none is currently as complete as TiddlyWeb itself. diff --git a/editions/tw5.com/tiddlers/definitions/TiddlyWebAdaptor.tid b/editions/tw5.com/tiddlers/definitions/TiddlyWebAdaptor.tid new file mode 100644 index 000000000..74043c438 --- /dev/null +++ b/editions/tw5.com/tiddlers/definitions/TiddlyWebAdaptor.tid @@ -0,0 +1,9 @@ +created: 20240309100338678 +modified: 20240309135821423 +tags: Definitions +title: TiddlyWebAdaptor +type: text/vnd.tiddlywiki + +TiddlyWebAdaptor is a component of [[TiddlyWiki on Node.js]]. It provides the means to synchronise changes to tiddlers from the browser to a server, and from the server to the browser. It can be found in the plugin [[$:/plugins/tiddlywiki/tiddlyweb]]. + +TiddlyWebAdaptor was designed to be compatible both with TiddlyWeb and with TiddlyWiki's own built-in server mechanism. The [[Bags and Recipes]] model is fully supported by [[TiddlyWeb]], but TiddlyWiki's built-in server only supports a simplified model with a single bag and a single recipe. diff --git a/editions/tw5.com/tiddlers/filters/Conditional Operators.tid b/editions/tw5.com/tiddlers/filters/Conditional Operators.tid index 6d21e0864..a8dc5a1b2 100644 --- a/editions/tw5.com/tiddlers/filters/Conditional Operators.tid +++ b/editions/tw5.com/tiddlers/filters/Conditional Operators.tid @@ -1,10 +1,10 @@ created: 20190802113703788 -modified: 20230501175143648 +modified: 20230711082337975 tags: Filters title: Conditional Operators type: text/vnd.tiddlywiki -<<.from-version "5.1.20">>The conditional filter operators allow for ''if-then-else'' logic to be expressed within filters. +<<.from-version "5.1.20">> The conditional filter operators allow ''if-then-else'' logic to be expressed within filters. The foundation is the convention that an empty list can be used to represent the Boolean value <<.value false>> and a list with at one (or more) entries to represent <<.value true>>. @@ -25,6 +25,8 @@ The <<.olink else>> operator can be used to apply a defaults for missing values. <<.operator-example 2 "[[HelloThere]get[custom-field]else[default-value]]">> -! Filter Run Prefixes +''Filter Run Prefixes'' -The [[:then|:then Filter Run Prefix]] and [[:else|:else Filter Run Prefix]] filter run prefixes serve a similar purpose as the conditional operators. Refer to their documentation for more information. \ No newline at end of file +The [[:then|Then Filter Run Prefix]] and [[:else|Else Filter Run Prefix]] named filter run prefixes serve a similar purpose as the conditional operators. + +Also see: [[Named Filter Run Prefix]] diff --git a/editions/tw5.com/tiddlers/filters/Filter Operators.tid b/editions/tw5.com/tiddlers/filters/Filter Operators.tid index 0738c7103..35d80607f 100644 --- a/editions/tw5.com/tiddlers/filters/Filter Operators.tid +++ b/editions/tw5.com/tiddlers/filters/Filter Operators.tid @@ -1,5 +1,6 @@ +breadcrumbs: [[Filter Step]] created: 20140410103123179 -modified: 20211217141224284 +modified: 20230410114132501 tags: Filters title: Filter Operators type: text/vnd.tiddlywiki @@ -18,13 +19,19 @@ type: text/vnd.tiddlywiki <tr class="doc-table-subheading"><th colspan="5" align="center">$_$</th></tr> \end -A <<.def "filter operator">> is a predefined keyword attached to an individual [[step|Filter Step]] of a [[filter|Filters]]. It defines the particular action of that step. +A <<.def "filter operator">> is a predefined keyword attached to an individual step of a [[filter|Filters]]. It defines the particular action of that step. -''Important:'' Each first [[step|Filter Step]] of a [[filter run|Filter Run]] not given any input titles receives the output of <$link to="all Operator">[all[tiddlers]]</$link> as its input. +''Important:'' In general, each first [[filter step|Filter Step]] of a [[filter run|Filter Run]] not given any input titles receives the output of <$link to="all Operator">[all[tiddlers]]</$link> as its input. -The following table lists all core operators, the most common ones marked ✓. The `!` column indicates whether an operator allows ''negation'' using the <$link to="Filter Step"><code>!</code> prefix</$link>. For specifics as to each operator's negated output please refer to its documentation. -Most steps process the [[selection of titles|Title Selection]] that are supplied as their input, but a few [[construct an entirely new selection|Selection Constructors]] instead, as indicated by the last column. A `C?` indicates it might construct a new selection, depending on usage. For specifics as to each operator's selection creation please refer to its documentation. +''Table legend:'' + +|tc-table-no-border tc-first-col-min-width|k +|^ ✓|^... |,Used to mark the most common ones | +|^ `!`|^... |,The column indicates whether an operator allows ''negation'' using the <$link to="Filter Step"><code>!</code> prefix</$link>.<br>For specifics as to each operator's negated output please refer to its documentation | +|^ `C`|^... |,Most steps process the [[selection of titles|Title Selection]] that are supplied as their input, but a few [[construct an entirely new selection|Selection Constructors]] instead, as indicated by the last column.<br>A `C?` indicates it might construct a new selection, depending on usage. For specifics as to each operator's selection creation please refer to its documentation | + +The following table lists all core operators: <table> <tr> @@ -49,6 +56,6 @@ Most steps process the [[selection of titles|Title Selection]] that are supplied <<.operator-rows "[tag[Filter Operators]!tag[Order Operators]!tag[Mathematics Operators]!tag[String Operators]!tag[Tag Operators]tag[Special Operators]sort[]]">> </table> -A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameter]]. +A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameter]]. For the exact rules, see [[Filter Syntax]]. \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/Mathematics Operators.tid b/editions/tw5.com/tiddlers/filters/Mathematics Operators.tid index 94f89a267..4c0160b90 100644 --- a/editions/tw5.com/tiddlers/filters/Mathematics Operators.tid +++ b/editions/tw5.com/tiddlers/filters/Mathematics Operators.tid @@ -1,5 +1,5 @@ created: 20190206140446821 -modified: 20220330133748666 +modified: 20230321133008898 tags: Filters title: Mathematics Operators type: text/vnd.tiddlywiki @@ -22,7 +22,7 @@ The mathematics operators take three different forms: ** <<.inline-operator-example "=1 =2 =3 =4 +[negate[]]">> ** <<.inline-operator-example "=1.2 =2.4 =3.6 =4.8 +[trunc[]]">> ** <<.inline-operator-example "=1.2 =2.4 =3.6 =4.8 +[round[]]">> -* ''Binary operators'' apply an operation and operand to each number in the input list (e.g. add, multiply, remainder) +* ''Binary operators'' apply an operation and parameter to each number in the input list (e.g. add, multiply, remainder) ** <<.inline-operator-example "=1 =2 =3 =4 +[add[3]]">> ** <<.inline-operator-example "=1 =2 =3 =4 +[multiply[8]]">> * ''Reducing operators'' apply an operation to all of the numbers in the input list, returning a single result (e.g. sum, product) diff --git a/editions/tw5.com/tiddlers/filters/add.tid b/editions/tw5.com/tiddlers/filters/add.tid index 3bed37537..e808ced7c 100644 --- a/editions/tw5.com/tiddlers/filters/add.tid +++ b/editions/tw5.com/tiddlers/filters/add.tid @@ -1,11 +1,11 @@ caption: add created: 20190206140446821 -modified: 20190611125053329 +modified: 20230321130647487 op-input: a [[selection of titles|Title Selection]] op-output: the input as numbers, but with <<.place N>> added to each one op-parameter: a number op-parameter-name: N -op-purpose: treating each input title as a number, add to each the numeric value of the operand +op-purpose: treating each input title as a number, add to each the numeric value of the parameter tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] title: add Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/all.tid b/editions/tw5.com/tiddlers/filters/all.tid index 21b65e651..5d65ca6ab 100644 --- a/editions/tw5.com/tiddlers/filters/all.tid +++ b/editions/tw5.com/tiddlers/filters/all.tid @@ -1,6 +1,6 @@ caption: all created: 20140410103123179 -modified: 20211217135719266 +modified: 20230321131457669 op-input: ignored, unless the parameter is empty op-output: the titles that belong to all the specified categories op-parameter: zero or more categories @@ -9,10 +9,14 @@ tags: [[Filter Operators]] [[Common Operators]] [[Selection Constructors]] [[Sel title: all Operator type: text/vnd.tiddlywiki -The parameter specifies zero or more fundamental categories using the following syntax: +The parameter specifies zero or more fundamental categories using the following [[filter step|Filter Step]] syntax: <$railroad text=""" -[{: ("current" | "missing" |: "orphans" | "shadows" | "tags" | "tiddlers" ) +"+" }] +\start none +\end none +<-"all"-> ( "[" | "<" | "{" ) + [{: ("current" | "missing" |: "orphans" | "shadows" | "tags" | "tiddlers" ) +"+" }] + ( "]" | ">" | "}" ) """/> |!Category |!Members |!Sorted | @@ -25,7 +29,7 @@ The parameter specifies zero or more fundamental categories using the following If the parameter specifies more than one category, they are processed from left to right. The overall output is initially empty, and each category's output is [[dominantly appended|Dominant Append]] to it in turn. Unrecognised categories contribute nothing to the output. -As a special case, if the parameter is empty, the output is simply a copy of the input. This can be useful when the parameter is [[soft|Filter Parameter]]. +As a special case, if the parameter is empty, the output is simply a copy of the input. This can be useful when the parameter is a [[soft parameter|Filter Parameter]]. The <<.olink is>> operator is similar, but its scope is restricted to its input. diff --git a/editions/tw5.com/tiddlers/filters/append.tid b/editions/tw5.com/tiddlers/filters/append.tid index 881dfc257..840206aae 100644 --- a/editions/tw5.com/tiddlers/filters/append.tid +++ b/editions/tw5.com/tiddlers/filters/append.tid @@ -1,9 +1,9 @@ caption: append created: 20151017145358368 -modified: 20151108051540981 +modified: 20230321131631510 op-input: a list of items -op-neg-output: a list with items appended from the tail of the operand array -op-output: a list with items appended from the head of the operand array +op-neg-output: a list with items appended from the tail of the parameter array +op-output: a list with items appended from the head of the parameter array op-parameter: the array of items to be appended to the tail of the list op-parameter-name: list op-purpose: append a range of items from an array to the list diff --git a/editions/tw5.com/tiddlers/filters/backtranscludes.tid b/editions/tw5.com/tiddlers/filters/backtranscludes.tid new file mode 100644 index 000000000..91a00f5f4 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/backtranscludes.tid @@ -0,0 +1,13 @@ +created: 20211002204500000 +tags: [[Filter Operators]] +title: backtranscludes Operator +type: text/vnd.tiddlywiki +caption: backtranscludes +op-purpose: find the titles that transcludes to each input title +op-input: a [[selection of titles|Title Selection]] +op-parameter: none +op-output: any non-[[system|SystemTiddlers]] titles that contain [[transclusion|Transclusion]] to the input titles + +Each input title is processed in turn. The corresponding tiddler's list of backtranscludes is generated, sorted alphabetically by title, and then [[dominantly appended|Dominant Append]] to the operator's overall output. + +<<.operator-examples "backtranscludes">> diff --git a/editions/tw5.com/tiddlers/filters/charcode.tid b/editions/tw5.com/tiddlers/filters/charcode.tid index 3cb82bc68..2b64536b0 100644 --- a/editions/tw5.com/tiddlers/filters/charcode.tid +++ b/editions/tw5.com/tiddlers/filters/charcode.tid @@ -2,7 +2,7 @@ caption: charcode created: 20210622214425635 modified: 20210622214425635 op-input: ignored -op-output: a string formed from concatenating the characters specified by the numeric codes given in the operand(s) +op-output: a string formed from concatenating the characters specified by the numeric codes given in the parameter(s) op-parameter: numeric character code op-parameter-name: C op-purpose: generates string characters from their numeric character codes @@ -12,6 +12,6 @@ type: text/vnd.tiddlywiki <<.from-version "5.2.0">> -This operator returns a string formed from concatenating the characters specified by the numeric codes given in one or more operands. It is useful for generating special characters such as tab (`charcode[9]`) or new line (`charcode[13],[10]`). +This operator returns a string formed from concatenating the characters specified by the numeric codes given in one or more parameters. It is useful for generating special characters such as tab (`charcode[9]`) or new line (`charcode[13],[10]`). <<.operator-examples "charcode">> diff --git a/editions/tw5.com/tiddlers/filters/compare Operator.tid b/editions/tw5.com/tiddlers/filters/compare Operator.tid index 95bdce2a9..debf09ead 100644 --- a/editions/tw5.com/tiddlers/filters/compare Operator.tid +++ b/editions/tw5.com/tiddlers/filters/compare Operator.tid @@ -4,7 +4,7 @@ tags: [[Filter Operators]] [[Mathematics Operators]] [[String Operators]] [[Nega title: compare Operator type: text/vnd.tiddlywiki caption: compare -op-purpose: filter the input by comparing each item against the operand +op-purpose: filter the input by comparing each item against the parameter op-input: a [[selection of titles|Title Selection]] op-suffix: the <<.op compare>> operator uses a rich suffix, see below for details op-parameter: the value to compare @@ -16,7 +16,7 @@ op-neg-output: those input titles <<.em not>> matching the specified comparison The <<.op compare>> operator uses an extended syntax to specify all the options: ``` -[compare:<type>:<mode>[<operand>]] +[compare:<type>:<mode>[<parameter>]] ``` The ''type'' can be: diff --git a/editions/tw5.com/tiddlers/filters/cycle Operator.tid b/editions/tw5.com/tiddlers/filters/cycle Operator.tid index f54316f29..7cf76c28d 100644 --- a/editions/tw5.com/tiddlers/filters/cycle Operator.tid +++ b/editions/tw5.com/tiddlers/filters/cycle Operator.tid @@ -4,7 +4,7 @@ modified: 20201118192136472 op-input: a list of items op-output: the input list with the titles specified in the parameter toggled in a cyclical manner op-parameter: the <<.op cycle>> operator accepts 1 or 2 parameters, see below for details -op-purpose: toggle in the input, the titles specified in the first operand in a cyclical manner +op-purpose: toggle the titles specified in the first parameter in a cyclical manner tags: [[Filter Operators]] [[Listops Operators]] [[Order Operators]] title: cycle Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/divide Operator.tid b/editions/tw5.com/tiddlers/filters/divide Operator.tid index 9218c9a99..b8b357861 100644 --- a/editions/tw5.com/tiddlers/filters/divide Operator.tid +++ b/editions/tw5.com/tiddlers/filters/divide Operator.tid @@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]] op-output: the input as numbers, but with each one divided by <<.place N>> op-parameter: a number op-parameter-name: N -op-purpose: treating each input title as a number, divide them by the numeric value of the operand +op-purpose: treating each input title as a number, divide it by the numeric value of the parameter tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] title: divide Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/enlist Operator.tid b/editions/tw5.com/tiddlers/filters/enlist Operator.tid index e45e97c2a..a23a30e64 100644 --- a/editions/tw5.com/tiddlers/filters/enlist Operator.tid +++ b/editions/tw5.com/tiddlers/filters/enlist Operator.tid @@ -7,14 +7,14 @@ op-neg-output: those input titles that are <<.em not>> listed in <<.place L>> op-output: the titles stored as a [[title list|Title List]] at <<.place L>> op-parameter: a [[title list|Title List]] op-parameter-name: L -op-purpose: select titles from the operand interpreted as a [[title list|Title List]] +op-purpose: select titles from the parameter interpreted as a [[title list|Title List]] op-suffix: <<.from-version "5.1.20">> `dedupe` (the default) to remove duplicates, `raw` to leave duplicates untouched op-suffix-name: D tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]] title: enlist Operator type: text/vnd.tiddlywiki -<<.tip """Literal filter operands cannot contain square brackets but you can work around the issue by using a variable. ''Learn more at:'' [[SetWidget]] documentation under the heading "Filtered List Variable Assignment" """>> +<<.tip """Literal filter parameters cannot contain square brackets but you can work around the issue by using a variable. ''Learn more at:'' [[SetWidget]] documentation under the heading "Filtered List Variable Assignment" """>> ``` <$set name="myList" value="first [[second with a space]] third"> diff --git a/editions/tw5.com/tiddlers/filters/enlist-input Operator.tid b/editions/tw5.com/tiddlers/filters/enlist-input Operator.tid index 386723b51..aa35f8f1c 100644 --- a/editions/tw5.com/tiddlers/filters/enlist-input Operator.tid +++ b/editions/tw5.com/tiddlers/filters/enlist-input Operator.tid @@ -12,7 +12,7 @@ type: text/vnd.tiddlywiki <<.from-version "5.1.23">> -<<.tip " Compare with [[enlist|enlist Operator]] operator that interprets its operand as a title list">> +<<.tip " Compare with [[enlist|enlist Operator]] operator that interprets its parameter as a title list">> ``` <$vars days={{{ [[Days of the Week]get[list]] }}}> diff --git a/editions/tw5.com/tiddlers/filters/examples/backtransclude.tid b/editions/tw5.com/tiddlers/filters/examples/backtransclude.tid new file mode 100644 index 000000000..e70648576 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/backtransclude.tid @@ -0,0 +1,7 @@ +tags: [[backtranscludes Operator]] [[Operator Examples]] +title: backtranscludes Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[Motovun Jack.jpg]backtranscludes[]]">> + +<<.operator-example 2 "[[Transclusion]backtranscludes[]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/jsonstringify Operator (Examples).tid b/editions/tw5.com/tiddlers/filters/examples/jsonstringify Operator (Examples).tid new file mode 100644 index 000000000..39113ea38 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/jsonstringify Operator (Examples).tid @@ -0,0 +1,11 @@ +created: 20230922121858167 +modified: 20230922122333325 +tags: [[Operator Examples]] [[jsonstringify Operator]] +title: jsonstringify Operator (Examples) +type: text/vnd.tiddlywiki + +Compare the encoding of quotes and control characters in the first example with the analogue [[example for the stringify operator|stringify Operator (Examples)]]. +<<.operator-example 1 """[[Backslash \, double quote ", single quote ', tab , line feed +]] +[jsonstringify[]]""">> +<<.operator-example 2 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 without suffix]] +[jsonstringify[]]""">> +<<.operator-example 3 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 with rawunicode suffix]] +[jsonstringify:rawunicode[]]""">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/examples/prepend.tid b/editions/tw5.com/tiddlers/filters/examples/prepend.tid index 0c66d1002..57f73fc6f 100644 --- a/editions/tw5.com/tiddlers/filters/examples/prepend.tid +++ b/editions/tw5.com/tiddlers/filters/examples/prepend.tid @@ -1,5 +1,5 @@ created: 20151017151508135 -modified: 20151108051743531 +modified: 20230321130446467 tags: [[Operator Examples]] [[prepend Operator]] title: prepend Operator (Examples) type: text/vnd.tiddlywiki @@ -10,6 +10,6 @@ The operator may be used to prepend a number of items to the list. <<.operator-example 1 "[list[Days of the Week]prepend[Yesterday Today Tomorrow]]">> -The operand may list only items without spaces -- to include items with spaces, use a reference to an array e.g. prepend the last three short days of the week to the list +The parameter may list only items without spaces -- to include items with spaces, use a reference to an array, e.g. prepend the last three short days of the week to the list <<.operator-example 2 "[list[Days of the Week]!prepend:3{Days of the Week!!short}]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/sha256 Operator (Examples).tid b/editions/tw5.com/tiddlers/filters/examples/sha256 Operator (Examples).tid new file mode 100644 index 000000000..98a2576c4 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/sha256 Operator (Examples).tid @@ -0,0 +1,9 @@ +created: 20240308122813807 +modified: 20240308122916812 +tags: [[Operator Examples]] [[sha256 Operator]] +title: sha256 Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[test]sha256[]]">> + +<<.operator-example 2 "[[test]sha256[64]]">> diff --git a/editions/tw5.com/tiddlers/filters/examples/stringify_Operator_(Examples).tid b/editions/tw5.com/tiddlers/filters/examples/stringify_Operator_(Examples).tid index cc5a51429..4b67993b0 100644 --- a/editions/tw5.com/tiddlers/filters/examples/stringify_Operator_(Examples).tid +++ b/editions/tw5.com/tiddlers/filters/examples/stringify_Operator_(Examples).tid @@ -1,9 +1,11 @@ created: 20161017154944352 -modified: 20230919124059118 +modified: 20230922122319674 tags: [[Operator Examples]] [[stringify Operator]] title: stringify Operator (Examples) type: text/vnd.tiddlywiki -<<.operator-example 1 """[[Title with "double quotes" and single ' and \backslash]] +[stringify[]]""">> +Compare the encoding of quotes and control characters in the first example with the analogue [[example for the jsonstringify operator|jsonstringify Operator (Examples)]]. +<<.operator-example 1 """[[Backslash \, double quote ", single quote ', tab , line feed +]] +[stringify[]]""">> <<.operator-example 2 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 without suffix]] +[stringify[]]""">> <<.operator-example 3 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 with rawunicode suffix]] +[stringify:rawunicode[]]""">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/examples/subfilter Operator (Examples).tid b/editions/tw5.com/tiddlers/filters/examples/subfilter Operator (Examples).tid index eac8828a3..2ebe37db2 100644 --- a/editions/tw5.com/tiddlers/filters/examples/subfilter Operator (Examples).tid +++ b/editions/tw5.com/tiddlers/filters/examples/subfilter Operator (Examples).tid @@ -9,7 +9,7 @@ type: text/vnd.tiddlywiki ''<$text text=<<__name__>>/>'': <code><$text text={{{ [<__name__>getvariable[]] }}}/></code> \end -Literal filter operands can be used, but such cases are better rewritten without using <<.op subfilter>>: +Literal filter parameters can be used, but such cases are better rewritten without using <<.op subfilter>>: <<.operator-example 1 "[subfilter[one two three]addsuffix[!]]" "same as `one two three +[addsuffix[!]]`">> The <<.op subfilter>> operator can be used to dynamically define parts of a [[filter run|Filter Run]]. This is useful for sharing a common pieces of a filter across multiple filters. diff --git a/editions/tw5.com/tiddlers/filters/examples/transclude.tid b/editions/tw5.com/tiddlers/filters/examples/transclude.tid new file mode 100644 index 000000000..eefea2a57 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/examples/transclude.tid @@ -0,0 +1,5 @@ +tags: [[transcludes Operator]] [[Operator Examples]] +title: transcludes Operator (Examples) +type: text/vnd.tiddlywiki + +<<.operator-example 1 "[[Images in WikiText]transcludes[]]">> diff --git a/editions/tw5.com/tiddlers/filters/field.tid b/editions/tw5.com/tiddlers/filters/field.tid index 901f22feb..4f2f243e9 100644 --- a/editions/tw5.com/tiddlers/filters/field.tid +++ b/editions/tw5.com/tiddlers/filters/field.tid @@ -1,23 +1,23 @@ +caption: field created: 20140410103123179 -modified: 20150203184718000 +modified: 20230316111901766 +op-input: a [[selection of titles|Title Selection]] +op-neg-output: those input tiddlers in which field <<.place F>> does <<.em not>> have the value <<.place S>> +op-output: those input tiddlers in which field <<.place F>> has the value <<.place S>> +op-parameter: a possible value of field <<.place F>> +op-parameter-name: S +op-purpose: filter the input by field +op-suffix: the name of a [[field|TiddlerFields]] +op-suffix-name: F tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]] [[Negatable Operators]] title: field Operator type: text/vnd.tiddlywiki -caption: field -op-purpose: filter the input by field -op-input: a [[selection of titles|Title Selection]] -op-suffix: the name of a [[field|TiddlerFields]] -op-suffix-name: F -op-parameter: a possible value of field <<.place F>> -op-parameter-name: S -op-output: those input tiddlers in which field <<.place F>> has the value <<.place S>> -op-neg-output: those input tiddlers in which field <<.place F>> does <<.em not>> have the value <<.place S>> If <<.place S>> is empty, <<.op field>> will match both of the following: * tiddlers that don't contain field <<.place F>> * tiddlers in which field <<.place F>> exists but has an empty value -The syntax of a [[filter step|Filter Step]] treats any unrecognised [[filter operator|Filter Operators]] as if it was the suffix to the <<.op field>> operator. See the <<.operator-examples "field" "examples">>. +The syntax of a [[filter step|Filter Step]] treats any unrecognised [[filter operator|Filter Operators]] as if it was the suffix to the <<.op field>> operator. <<.operator-examples "field">> diff --git a/editions/tw5.com/tiddlers/filters/format.tid b/editions/tw5.com/tiddlers/filters/format.tid index d62a82169..7d650ed0a 100644 --- a/editions/tw5.com/tiddlers/filters/format.tid +++ b/editions/tw5.com/tiddlers/filters/format.tid @@ -1,6 +1,6 @@ caption: format created: 20201020100834443 -modified: 20220611104737314 +modified: 20230321132245053 op-input: a [[selection of titles|Title Selection]] op-output: input strings formatted according to the specified suffix <<.place B>> op-parameter: optional format string for the formats @@ -16,11 +16,11 @@ type: text/vnd.tiddlywiki The suffix <<.place B>> is one of the following supported string formats: -|!Format |!Description | -|^`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") | +|Format |Description |h +|^`date` |The input string is interpreted as a UTC date and displayed according to the DateFormat specified in the optional parameter <<.place C>>. (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 parameter <<.place C>> 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 <<.place C>> 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 parameter. (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. diff --git a/editions/tw5.com/tiddlers/filters/jsonextract.tid b/editions/tw5.com/tiddlers/filters/jsonextract.tid index 27724205f..a899ac6e6 100644 --- a/editions/tw5.com/tiddlers/filters/jsonextract.tid +++ b/editions/tw5.com/tiddlers/filters/jsonextract.tid @@ -43,7 +43,7 @@ Properties within a JSON object are identified by a sequence of indexes. In the The following examples assume that this JSON data is contained in a variable called `jsondata`. -The <<.op jsonextract>> operator uses multiple operands to specify the indexes of the property to retrieve. Values are returned as literal JSON strings: +The <<.op jsonextract>> operator uses multiple parameters to specify the indexes of the property to retrieve. Values are returned as literal JSON strings: ``` [<jsondata>jsonextract[a]] --> "one" @@ -67,7 +67,7 @@ Indexes can be dynamically composed from variables and transclusions: [<jsondata>jsonextract<variable>,{!!field},[0]] ``` -A subtlety is that the special case of a single blank operand is used to identify the root object. Thus: +A subtlety is that the special case of a single blank parameter is used to identify the root object. Thus: ``` [<jsondata>jsonextract[]] --> {"a":"one","b":"","c":"three","d":{"e":"four","f":["five","six",true,false,null],"g":{"x":"max","y":"may","z":"maize"}}} diff --git a/editions/tw5.com/tiddlers/filters/jsonget.tid b/editions/tw5.com/tiddlers/filters/jsonget.tid index c50cbd6f2..b1db4e308 100644 --- a/editions/tw5.com/tiddlers/filters/jsonget.tid +++ b/editions/tw5.com/tiddlers/filters/jsonget.tid @@ -43,7 +43,7 @@ Properties within a JSON object are identified by a sequence of indexes. In the The following examples assume that this JSON data is contained in a variable called `jsondata`. -The <<.op jsonget>> operator uses multiple operands to specify the indexes of the property to retrieve: +The <<.op jsonget>> operator uses multiple parameters to specify the indexes of the property to retrieve: ``` [<jsondata>jsonget[a]] --> "one" @@ -94,7 +94,7 @@ If the object or array contains nested child objects or arrays then the values a [<jsondata>jsonget[d]] --> "four","five","six","true","false","null","max","may","maize" ``` -A subtlety is that the special case of a single blank operand is used to identify the root object. Thus: +A subtlety is that the special case of a single blank parameter is used to identify the root object. Thus: ``` [<jsondata>jsonindexes[]] --> "a", "b", "c", "d" diff --git a/editions/tw5.com/tiddlers/filters/jsonindexes.tid b/editions/tw5.com/tiddlers/filters/jsonindexes.tid index 605936a2f..3b9962b5f 100644 --- a/editions/tw5.com/tiddlers/filters/jsonindexes.tid +++ b/editions/tw5.com/tiddlers/filters/jsonindexes.tid @@ -43,7 +43,7 @@ Properties within a JSON object are identified by a sequence of indexes. In the The following examples assume that this JSON data is contained in a variable called `jsondata`. -The <<.op jsonindexes>> operator uses multiple operands to specify the indexes of the property to retrieve: +The <<.op jsonindexes>> operator uses multiple parameters to specify the indexes of the property to retrieve: ``` [<jsondata>jsonindexes[d],[f]] --> "0", "1", "2", "3", "4" @@ -58,7 +58,7 @@ Indexes can be dynamically composed from variables and transclusions: Retrieving the indexes of JSON properties that are not objects or arrays will return nothing. -A subtlety is that the special case of a single blank operand is used to identify the root object. Thus: +A subtlety is that the special case of a single blank parameter is used to identify the root object. Thus: ``` [<jsondata>jsonindexes[]] --> "a", "b", "c", "d" diff --git a/editions/tw5.com/tiddlers/filters/jsonstringify Operator.tid b/editions/tw5.com/tiddlers/filters/jsonstringify Operator.tid index 748a851bb..edd48432a 100644 --- a/editions/tw5.com/tiddlers/filters/jsonstringify Operator.tid +++ b/editions/tw5.com/tiddlers/filters/jsonstringify Operator.tid @@ -1,12 +1,35 @@ caption: jsonstringify created: 20171029155051467 from-version: 5.1.14 -modified: 20230919124826880 +modified: 20230922121404577 +op-input: a [[selection of titles|Title Selection]] +op-output: the input with JSON string encodings applied op-parameter: op-parameter-name: -op-purpose: deprecated, use <<.olink stringify>> instead +op-purpose: apply JSON string encoding to a string, see also the similar <<.olink stringify>> +op-suffix: <<.from-version "5.1.23">> optionally, the keyword `rawunicode` op-suffix-name: R tags: [[Filter Operators]] [[String Operators]] title: jsonstringify Operator type: text/vnd.tiddlywiki +The following substitutions are made: + +|!Character |!Replacement |!Condition | +|`\` |`\\` |Always | +|`"` |`\"` |Always | +|Carriage return (0x0d) |`\r` |Always | +|Line feed (0x0a) |`\n` |Always | +|Backspace (0x08) |`\b` |Always | +|Form field (0x0c) |`\f` |Always | +|Tab (0x09) |`\t` |Always| +|Characters from 0x00 to 0x1f, except listed above |`\u####` where #### is four hex digits |Always | +|Characters from from 0x80 to 0xffff|`\u####` where #### is four hex digits |If `rawunicode` suffix is not present (default) | +|Characters from 0x80 to 0xffff|<<.from-version "5.1.23">> Unchanged |If `rawunicode` suffix is present | + +<<.from-version "5.1.23">> If the suffix `rawunicode` is present, Unicode characters above 0x80 (such as ß, ä, ñ or 🎄) will be passed through unchanged. Without the suffix, they will be substituted with `\u` codes, which was the default behavior before 5.1.23. Characters outside the Basic Multilingual Plane, such as 🎄 and other emojis, will be encoded as a UTF-16 surrogate pair, i.e. with two `\u` sequences. + +<<.note """Mind the differences compared to <<.olink stringify>> in encoding of single quotes and control characters (0x00 to 0x1f). +""">> + +<<.operator-examples "jsonstringify">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/jsontype.tid b/editions/tw5.com/tiddlers/filters/jsontype.tid index 6bff01914..d4561f0f5 100644 --- a/editions/tw5.com/tiddlers/filters/jsontype.tid +++ b/editions/tw5.com/tiddlers/filters/jsontype.tid @@ -52,7 +52,7 @@ Properties within a JSON object are identified by a sequence of indexes. In the The following examples assume that this JSON data is contained in a variable called `jsondata`. -The <<.op jsontype>> operator uses multiple operands to specify the indexes of the property whose type is to be retrieved: +The <<.op jsontype>> operator uses multiple parameters to specify the indexes of the property whose type is to be retrieved: ``` [<jsondata>jsontype[a]] --> "string" @@ -75,7 +75,7 @@ Indexes can be dynamically composed from variables and transclusions: [<jsondata>jsontype<variable>,{!!field},[0]] ``` -A subtlety is that the special case of a single blank operand is used to identify the root object. Thus: +A subtlety is that the special case of a single blank parameter is used to identify the root object. Thus: ``` [<jsondata>jsontype[]] --> "object" diff --git a/editions/tw5.com/tiddlers/filters/log Operator.tid b/editions/tw5.com/tiddlers/filters/log Operator.tid index bfca18853..bea10c539 100644 --- a/editions/tw5.com/tiddlers/filters/log Operator.tid +++ b/editions/tw5.com/tiddlers/filters/log Operator.tid @@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]] op-output: the logarithm of each input title as numbers, with base <<.place N>> if specified otherwise base `e` op-parameter: a number op-parameter-name: N -op-purpose: treating each input title as a number, return its logarithm with base equal to the numeric value of the operand if specified, otherwise base `e` +op-purpose: treating each input title as a number, return its logarithm with base equal to the numeric value of the parameter if specified, otherwise base `e` tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] title: log Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/match Operator.tid b/editions/tw5.com/tiddlers/filters/match Operator.tid index 6e9997d3f..46b6e04f3 100644 --- a/editions/tw5.com/tiddlers/filters/match Operator.tid +++ b/editions/tw5.com/tiddlers/filters/match Operator.tid @@ -1,11 +1,11 @@ caption: match created: 20190731080209404 -modified: 20190731081047732 +modified: 20230711082432865 op-input: a [[selection of titles|Title Selection]] -op-neg-output: each item in the input list that does not match the operand string -op-output: each item in the input list that matches the operand string (potentially including duplicates) +op-neg-output: each item in the input list that does not match the parameter string +op-output: each item in the input list that matches the parameter string (potentially including duplicates) op-parameter: the string to be matched -op-purpose: returns each item in the list that matches the operand string +op-purpose: returns each item in the list that matches the parameter string op-suffix: the <<.op match>> operator uses a rich suffix, see below for details tags: [[Filter Operators]] title: match Operator @@ -16,11 +16,10 @@ type: text/vnd.tiddlywiki The <<.op match>> operator uses an extended syntax that permits multiple flags to be passed: ``` -[match:<flag list>[<operand>]] +[match:<flag list>[<parameter>]] ``` * ''flag list'': a comma delimited list of flags -* ''operand'': filter operand The available flags are: diff --git a/editions/tw5.com/tiddlers/filters/max Operator.tid b/editions/tw5.com/tiddlers/filters/max Operator.tid index 837c456ce..5d92b44cf 100644 --- a/editions/tw5.com/tiddlers/filters/max Operator.tid +++ b/editions/tw5.com/tiddlers/filters/max Operator.tid @@ -1,11 +1,11 @@ caption: max created: 20190611130631390 -modified: 20190611131047026 +modified: 20230321133057297 op-input: a [[selection of titles|Title Selection]] op-output: the input as numbers, with any that are less than <<.place N>> being replaced by <<.place N>> op-parameter: a number op-parameter-name: N -op-purpose: treating each input title as a number, take the maximum of its value and the numeric value of the operand +op-purpose: treating each input title as a number, take the maximum of its value and the numeric value of the parameter tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] title: max Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/min Operator.tid b/editions/tw5.com/tiddlers/filters/min Operator.tid index 097cf376e..f9c569a3b 100644 --- a/editions/tw5.com/tiddlers/filters/min Operator.tid +++ b/editions/tw5.com/tiddlers/filters/min Operator.tid @@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]] op-output: the input as numbers, with any that are greater than <<.place N>> being replaced by <<.place N>> op-parameter: a number op-parameter-name: N -op-purpose: treating each input title as a number, take the minimum of its value and the numeric value of the operand +op-purpose: treating each input title as a number, take the minimum of its value and the numeric value of the parameter tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] title: min Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/moduleproperty Operator.tid b/editions/tw5.com/tiddlers/filters/moduleproperty Operator.tid index 2ee4071d6..a62ddf4a5 100644 --- a/editions/tw5.com/tiddlers/filters/moduleproperty Operator.tid +++ b/editions/tw5.com/tiddlers/filters/moduleproperty Operator.tid @@ -2,7 +2,7 @@ caption: modulesproperty created: 20210919201126246 modified: 20210919201347702 op-input: a [[selection|Title Selection]] of modules -op-output: the value of the module property as specified in the operand +op-output: the value of the module property as specified in the parameter op-parameter: module property to retrieve op-purpose: retrieve a module property tags: [[Filter Operators]] [[Special Operators]] diff --git a/editions/tw5.com/tiddlers/filters/modules.tid b/editions/tw5.com/tiddlers/filters/modules.tid index fdc7f5cbe..3b42bc5d7 100644 --- a/editions/tw5.com/tiddlers/filters/modules.tid +++ b/editions/tw5.com/tiddlers/filters/modules.tid @@ -9,6 +9,6 @@ tags: [[Filter Operators]] [[Special Operators]] title: modules Operator type: text/vnd.tiddlywiki -<<.from-version "5.2.0">>The <<.op modules>> filter allows two optional operands. When both are specified, it returns the modules with the module property specified in the first operand which has the value in the second operand. +<<.from-version "5.2.0">>The <<.op modules>> filter allows two optional parameters. When both are specified, it returns the modules with the module property specified in the first parameter which has the value in the second parameter. <<.operator-examples "modules">> diff --git a/editions/tw5.com/tiddlers/filters/multiply Operator.tid b/editions/tw5.com/tiddlers/filters/multiply Operator.tid index 6eb92b7ad..bc91f9f27 100644 --- a/editions/tw5.com/tiddlers/filters/multiply Operator.tid +++ b/editions/tw5.com/tiddlers/filters/multiply Operator.tid @@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]] op-output: the input as numbers, but with each one multiplied by <<.place N>> op-parameter: a number op-parameter-name: N -op-purpose: treating each input title as a number, multiply it by the numeric value of the operand +op-purpose: treating each input title as a number, multiply it by the numeric value of the parameter tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] title: multiply Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/power Operator.tid b/editions/tw5.com/tiddlers/filters/power Operator.tid index d4afb67ce..2611049dc 100644 --- a/editions/tw5.com/tiddlers/filters/power Operator.tid +++ b/editions/tw5.com/tiddlers/filters/power Operator.tid @@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]] op-output: the input as numbers, but with each one raised to the power of <<.place N>> op-parameter: a number op-parameter-name: N -op-purpose: treating each input title as a number, raise it to the power of the numeric value of the operand +op-purpose: treating each input title as a number, raise it to the power of the numeric value of the parameter tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] title: power Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/prefix.tid b/editions/tw5.com/tiddlers/filters/prefix.tid index b96cdc599..6e2633f2d 100644 --- a/editions/tw5.com/tiddlers/filters/prefix.tid +++ b/editions/tw5.com/tiddlers/filters/prefix.tid @@ -1,27 +1,26 @@ +caption: prefix created: 20140410103123179 -modified: 20220218023400000 +modified: 20230711082821266 +op-input: a [[selection of titles|Title Selection]] +op-neg-output: those input tiddlers that do <<.em not>> start with <<.place S>> +op-output: those input titles that start with <<.place S>> +op-parameter: a string of characters +op-parameter-name: S +op-purpose: filter the input titles by how they start +op-suffix: the <<.op prefix>> operator uses a rich suffix, see below for details tags: [[Filter Operators]] [[String Operators]] [[Negatable Operators]] title: prefix Operator type: text/vnd.tiddlywiki -caption: prefix -op-purpose: filter the input titles by how they start -op-input: a [[selection of titles|Title Selection]] -op-parameter: a string of characters -op-parameter-name: S -op-output: those input titles that start with <<.place S>> -op-neg-output: those input tiddlers that do <<.em not>> start with <<.place S>> -op-suffix: the <<.op prefix>> operator uses a rich suffix, see below for details <<.from-version "5.2.2">> The <<.op prefix>> operator uses an extended syntax that permits multiple flags to be passed: ``` -[prefix:<flag list>[<operand>]] +[prefix:<flag list>[<parameter>] ``` * ''flag list'': a comma delimited list of flags -* ''operand'': filter operand The available flags are: diff --git a/editions/tw5.com/tiddlers/filters/prepend.tid b/editions/tw5.com/tiddlers/filters/prepend.tid index 5f6cc102d..bd16c78d9 100644 --- a/editions/tw5.com/tiddlers/filters/prepend.tid +++ b/editions/tw5.com/tiddlers/filters/prepend.tid @@ -2,8 +2,8 @@ caption: prepend created: 20151017145439292 modified: 20151108051701587 op-input: a list of items -op-neg-output: a list with items prepended from the tail of the operand array -op-output: a list with items prepended from the head of the operand array +op-neg-output: a list with items prepended from the tail of the parameter array +op-output: a list with items prepended from the head of the parameter array op-parameter: the array of items to be prepended to the head of the list op-parameter-name: list op-purpose: prepend a range of items from an array to the list diff --git a/editions/tw5.com/tiddlers/filters/range.tid b/editions/tw5.com/tiddlers/filters/range.tid index 12813a5b9..48dfa2366 100644 --- a/editions/tw5.com/tiddlers/filters/range.tid +++ b/editions/tw5.com/tiddlers/filters/range.tid @@ -1,15 +1,15 @@ +caption: range created: 20171221184734665 -modified: 20210907170339891 +modified: 20230321133838310 +op-input: ignored +op-neg-output: a series of evenly spaced numbers ranging from `<begin>` to `<end>` in reverse order +op-output: a series of evenly spaced numbers ranging from `<begin>` to `<end>` +op-parameter: a range specification, like `[1],[5]` +op-parameter-name: N +op-purpose: generate a range of numbers tags: [[Filter Operators]] [[Negatable Operators]] [[Selection Constructors]] title: range Operator type: text/vnd.tiddlywiki -caption: range -op-purpose: generate a range of numbers -op-input: ignored -op-parameter: a range specification, like `[1],[5]` -op-parameter-name: N -op-output: a series of evenly spaced numbers ranging from `<begin>` to `<end>` -op-neg-output: a series of evenly spaced numbers ranging from `<begin>` to `<end>` in reverse order \define range_example(range) ``` @@ -21,7 +21,7 @@ op-neg-output: a series of evenly spaced numbers ranging from `<begin>` to `<end The `range` operator produces a list of numbers counting up or down. It is useful for counting and numbering. -<<.from-version "5.2.0">> The range operator has been updated to use multiple operands to specify its parameters. Prior to this version, the range operator only had one operand, with the three parts delimited by `,`, `;` or `:`. +<<.from-version "5.2.0">> The range operator has been updated to use multiple parameters. Prior to this version, the range operator only had one parameter, with the three parts delimited by `,`, `;` or `:`. ``` [range[<begin>]] @@ -29,7 +29,7 @@ The `range` operator produces a list of numbers counting up or down. It is usef [range[<begin>],[<end>],[<step>]] ``` -The behaviour depends on the number of operands: +The behaviour depends on the number of parameters: |Parameter |Output |h |`<end>` |Whole numbers up to `<end>` | @@ -47,7 +47,7 @@ Each part must be a number, and works as follows: ** Cannot be zero. ** We always count from `<begin>` toward `<end>`, whether `<step>` is positive or negative. -The number of decimal points in the output is fixed, and based on the operand with the //most// decimal points. +The number of decimal points in the output is fixed, and based on the parameter with the //most// decimal points. To prevent the browser from freezing, `range` is currently limited to 10,000 values. diff --git a/editions/tw5.com/tiddlers/filters/reduce.tid b/editions/tw5.com/tiddlers/filters/reduce.tid index 66b62a8b0..06c28825c 100644 --- a/editions/tw5.com/tiddlers/filters/reduce.tid +++ b/editions/tw5.com/tiddlers/filters/reduce.tid @@ -1,6 +1,6 @@ caption: reduce created: 20201004154131193 -modified: 20210522162536854 +modified: 20230321133918020 op-input: a [[selection of titles|Title Selection]] passed as input to the filter op-output: the final result of running the subfilter <<.place S>> op-parameter: a [[filter expression|Filter Expression]]. Optional second parameter for initial value for accumulator @@ -25,7 +25,7 @@ The following variables are available within the subfilter: If the <<.op reduce>> operator receives no input, its output will be empty. The [[else Operator]] can be useful in such cases. -<<.tip "Literal filter operands cannot contain square brackets but you can work around the issue by using a variable:">> +<<.tip "Literal filter parameters cannot contain square brackets but you can work around the issue by using a variable:">> ``` <$set name="sum-input" value="[add<accumulator>]"> diff --git a/editions/tw5.com/tiddlers/filters/remainder Operator.tid b/editions/tw5.com/tiddlers/filters/remainder Operator.tid index ede8b314c..40ca29b9a 100644 --- a/editions/tw5.com/tiddlers/filters/remainder Operator.tid +++ b/editions/tw5.com/tiddlers/filters/remainder Operator.tid @@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]] op-output: the input as numbers, but with each replaced by the remainder when dividing it by <<.place N>> op-parameter: a number op-parameter-name: N -op-purpose: treating each input title as a number, return the remainder when divided by the numeric value of the operand +op-purpose: treating each input title as a number, return the remainder when divided by the numeric value of the parameter tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] title: remainder Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/remove.tid b/editions/tw5.com/tiddlers/filters/remove.tid index ed41c3db4..8c0b5afa3 100644 --- a/editions/tw5.com/tiddlers/filters/remove.tid +++ b/editions/tw5.com/tiddlers/filters/remove.tid @@ -2,12 +2,12 @@ caption: remove created: 20151017144531676 modified: 20170125200005000 op-input: a list of items -op-neg-output: items removed from current list that appear at the tail of the operand array -op-output: items removed from current list that appear at the head of the operand array +op-neg-output: items removed from current list that appear at the tail of the parameter array +op-output: items removed from current list that appear at the head of the parameter array op-parameter: an array of items to remove op-parameter-name: array op-prefix: causes N items from the end of the array to be removed -op-purpose: remove a list of titles specified in the operand from the input +op-purpose: remove a list of titles specified in the parameter from the input op-suffix: an integer N, defaulting to all tags: [[Filter Operators]] [[Order Operators]] [[Listops Operators]] title: remove Operator diff --git a/editions/tw5.com/tiddlers/filters/removeprefix.tid b/editions/tw5.com/tiddlers/filters/removeprefix.tid index 0b6156052..9fc2fd399 100644 --- a/editions/tw5.com/tiddlers/filters/removeprefix.tid +++ b/editions/tw5.com/tiddlers/filters/removeprefix.tid @@ -1,15 +1,15 @@ +caption: removeprefix created: 20140410103123179 -modified: 20220218023400000 +modified: 20230711082842515 +op-input: a [[selection of titles|Title Selection]] +op-output: those input titles that start with <<.place S>>, but with those characters discarded +op-parameter: a string of characters +op-parameter-name: S +op-purpose: filter the input titles by how they start, deleting that prefix +op-suffix: the <<.op removeprefix>> operator uses a rich suffix, see below for details tags: [[Filter Operators]] [[String Operators]] title: removeprefix Operator type: text/vnd.tiddlywiki -caption: removeprefix -op-purpose: filter the input titles by how they start, deleting that prefix -op-input: a [[selection of titles|Title Selection]] -op-parameter: a string of characters -op-parameter-name: S -op-output: those input titles that start with <<.place S>>, but with those characters discarded -op-suffix: the <<.op removeprefix>> operator uses a rich suffix, see below for details <<.tip " This filters out input titles that do not start with S. For removing S without filtering out input titles that don't start with S, see [[trim|trim Operator]].">> @@ -18,11 +18,10 @@ op-suffix: the <<.op removeprefix>> operator uses a rich suffix, see below for d The <<.op removeprefix>> operator uses an extended syntax that permits multiple flags to be passed: ``` -[removeprefix:<flag list>[<operand>]] +[removeprefix:<flag list>[<parameter>]] ``` * ''flag list'': a comma delimited list of flags -* ''operand'': filter operand The available flags are: diff --git a/editions/tw5.com/tiddlers/filters/removesuffix.tid b/editions/tw5.com/tiddlers/filters/removesuffix.tid index 4a1812ae0..bde911d06 100644 --- a/editions/tw5.com/tiddlers/filters/removesuffix.tid +++ b/editions/tw5.com/tiddlers/filters/removesuffix.tid @@ -1,15 +1,15 @@ +caption: removesuffix created: 20140828133830424 -modified: 20220218023400000 +modified: 20230711082859816 +op-input: a [[selection of titles|Title Selection]] +op-output: those input titles that end with <<.place S>>, but with those characters discarded +op-parameter: a string of characters +op-parameter-name: S +op-purpose: filter the input titles by how they end, deleting that suffix +op-suffix: the <<.op removesuffix>> operator uses a rich suffix, see below for details tags: [[Filter Operators]] [[String Operators]] title: removesuffix Operator type: text/vnd.tiddlywiki -caption: removesuffix -op-purpose: filter the input titles by how they end, deleting that suffix -op-input: a [[selection of titles|Title Selection]] -op-parameter: a string of characters -op-parameter-name: S -op-output: those input titles that end with <<.place S>>, but with those characters discarded -op-suffix: the <<.op removesuffix>> operator uses a rich suffix, see below for details <<.tip " This filters out input titles that do not end with S. For removing S without filtering out input titles that don't end with S, see [[trim|trim Operator]].">> @@ -18,11 +18,10 @@ op-suffix: the <<.op removesuffix>> operator uses a rich suffix, see below for d The <<.op removesuffix>> operator uses an extended syntax that permits multiple flags to be passed: ``` -[removesuffix:<flag list>[<operand>]] +[removesuffix:<flag list>[<parameter>]] ``` * ''flag list'': a comma delimited list of flags -* ''operand'': filter operand The available flags are: diff --git a/editions/tw5.com/tiddlers/filters/search.tid b/editions/tw5.com/tiddlers/filters/search.tid index 6a6438b9f..79d323a93 100644 --- a/editions/tw5.com/tiddlers/filters/search.tid +++ b/editions/tw5.com/tiddlers/filters/search.tid @@ -1,6 +1,6 @@ caption: search created: 20140410103123179 -modified: 20211129120739275 +modified: 20230711084359603 op-input: a [[selection of titles|Title Selection]] op-neg-output: those input tiddlers in which <<.em not>> all of the search terms can be found op-output: those input tiddlers in which <<.em all>> of the search terms can be found in the value of field <<.place F>> @@ -16,7 +16,7 @@ type: text/vnd.tiddlywiki The <<.op search>> operator uses an extended syntax that permits multiple fields and flags to be passed: ``` -[search:<field list>:<flag list>[<operand>]] +[search:<field list>:<flag list>[<parameter>]] ``` * ''field list'': a comma delimited list of field names to restrict the search @@ -24,7 +24,7 @@ The <<.op search>> operator uses an extended syntax that permits multiple fields ** an asterisk `*` instead of the field list causes the search to be performed across all fields available on each tiddler ** preceding the list with a minus sign `-` reverses the order so that the search is performed on all fields except the listed fields * ''flag list'': a comma delimited list of flags (defaults to `words` if blank) -* ''operand'': filter operand +* ''parameter'': filter parameter This example searches the fields <<.field title>> and <<.field caption>> for a case-sensitive match for the literal string <<.op-word "The first">>: diff --git a/editions/tw5.com/tiddlers/filters/sortby.tid b/editions/tw5.com/tiddlers/filters/sortby.tid index d6555ae4d..773c6a598 100644 --- a/editions/tw5.com/tiddlers/filters/sortby.tid +++ b/editions/tw5.com/tiddlers/filters/sortby.tid @@ -5,7 +5,7 @@ op-input: a list of items op-output: all items sorted by lookup list op-parameter: a list specifying the order in which to sort the current list op-parameter-name: order -op-purpose: sort the current list in the order of the list referenced in the operand +op-purpose: sort the current list in the order of the list referenced in the parameter tags: [[Filter Operators]] [[Order Operators]] [[Listops Operators]] title: sortby Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/stringify_Operator.tid b/editions/tw5.com/tiddlers/filters/stringify_Operator.tid index 73dabb1c2..6178517f7 100644 --- a/editions/tw5.com/tiddlers/filters/stringify_Operator.tid +++ b/editions/tw5.com/tiddlers/filters/stringify_Operator.tid @@ -1,12 +1,12 @@ caption: stringify created: 20161017153038029 from-version: 5.1.14 -modified: 20230919130847809 +modified: 20230922121406947 op-input: a [[selection of titles|Title Selection]] op-output: the input with ~JavaScript string encodings applied op-parameter: op-parameter-name: -op-purpose: apply ~JavaScript string encoding to a string +op-purpose: apply ~JavaScript string encoding to a string, see also the similar <<.olink jsonstringify>> op-suffix: <<.from-version "5.1.23">> optionally, the keyword `rawunicode` op-suffix-name: R tags: [[Filter Operators]] [[String Operators]] @@ -18,19 +18,16 @@ The following substitutions are made: |!Character |!Replacement |!Condition | |`\` |`\\` |Always | |`"` |`\"` |Always | -|Carriage return (0x0d) |`\r` |Always | +|`'` |`\'` |Always | |Line feed (0x0a) |`\n` |Always | -|Backspace (0x08) |`\b` |Always | -|Form field (0x0c) |`\f` |Always | -|Tab (0x09) |`\t` |Always | -|Characters from 0x00 to 0x1f |`\x##` where ## is two hex digits |Always | +|Carriage return (0x0d) |`\r` |Always | +|Characters from 0x00 to 0x1f, except listed above |`\x##` where ## is two hex digits |Always | |Characters from 0x80 to 0xffff|`\u####` where #### is four hex digits |If `rawunicode` suffix is not present (default) | |Characters from 0x80 to 0xffff|<<.from-version "5.1.23">> Unchanged |If `rawunicode` suffix is present | -<<.from-version "5.1.23">> If the suffix `rawunicode` is present, Unicode characters above 0x80 (such as ß, ä, ñ or 🎄) will be passed through unchanged. Without the suffix, they will be substituted with `\u` codes, which was the default behavior before 5.1.23. +<<.from-version "5.1.23">> If the suffix `rawunicode` is present, Unicode characters above 0x80 (such as ß, ä, ñ or 🎄) will be passed through unchanged. Without the suffix, they will be substituted with `\u` codes, which was the default behavior before 5.1.23. Characters outside the Basic Multilingual Plane, such as 🎄 and other emojis, will be encoded as a UTF-16 surrogate pair, i.e. with two `\u` sequences. -<<.note """Characters outside the Basic Multilingual Plane, such as 🎄 and other emojis, will be encoded as a UTF-16 surrogate pair, i.e. with two `\u` sequences.""">> - -<<.olink jsonstringify>> is considered deprecated, as it duplicates the functionality of <<.op stringify>>. +<<.note """Mind the differences compared to <<.olink jsonstringify>> in encoding of single quotes and control characters (0x00 to 0x1f). +""">> <<.operator-examples "stringify">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/subfilter Operator.tid b/editions/tw5.com/tiddlers/filters/subfilter Operator.tid index aaf7b731c..096560ae2 100644 --- a/editions/tw5.com/tiddlers/filters/subfilter Operator.tid +++ b/editions/tw5.com/tiddlers/filters/subfilter Operator.tid @@ -7,14 +7,14 @@ op-neg-output: those input titles that are <<.em not>> returned from the subfilt op-output: the [[selection of titles|Title Selection]] returned from the subfilter <<.place S>> op-parameter: a [[filter expression|Filter Expression]] op-parameter-name: S -op-purpose: select titles from the operand interpreted as a [[filter expression|Filter Expression]] +op-purpose: select titles from the parameter interpreted as a [[filter expression|Filter Expression]] tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]] [[Selection Constructors: Conditional]] title: subfilter Operator type: text/vnd.tiddlywiki <<.from-version "5.1.18">> Note that the <<.op subfilter>> operator was introduced in version 5.1.18 and is not available in earlier versions. -<<.tip " Literal filter operands cannot contain square brackets but you can work around the issue by using a variable:">> +<<.tip " Literal filter parameters cannot contain square brackets but you can work around the issue by using a variable:">> ``` <$set name="myFilter" value="[tag[one]]"> @@ -24,6 +24,6 @@ type: text/vnd.tiddlywiki <<.tip "Compare with the similar [[filter|filter Operator]] operator which runs a subfilter against each title, returning those titles that return a non-empty list (and discards the results of the subfilter)">> -The <<.op subfilter>> operator will act as a [[constructor|Selection Constructors]] whenever the filter defined by its operand is a [[constructor|Selection Constructors]]. Otherwise, it will act as a [[modifier|Selection Constructors]]. +The <<.op subfilter>> operator will act as a [[constructor|Selection Constructors]] whenever the filter defined by its parameter is a [[constructor|Selection Constructors]]. Otherwise, it will act as a [[modifier|Selection Constructors]]. <<.operator-examples "subfilter">> diff --git a/editions/tw5.com/tiddlers/filters/subtract Operator.tid b/editions/tw5.com/tiddlers/filters/subtract Operator.tid index c386b90ff..30bd28fa2 100644 --- a/editions/tw5.com/tiddlers/filters/subtract Operator.tid +++ b/editions/tw5.com/tiddlers/filters/subtract Operator.tid @@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]] op-output: the input as numbers, but with <<.place N>> subtracted from each one op-parameter: a number op-parameter-name: N -op-purpose: treating each input title as a number, subtract from each the numeric value of the operand +op-purpose: treating each input title as a number, subtract from each the numeric value of the parameter tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] title: subtract Operator type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/suffix.tid b/editions/tw5.com/tiddlers/filters/suffix.tid index 1c1a7bb9b..a7ff4eabb 100644 --- a/editions/tw5.com/tiddlers/filters/suffix.tid +++ b/editions/tw5.com/tiddlers/filters/suffix.tid @@ -1,27 +1,26 @@ +caption: suffix created: 20140828133830424 -modified: 20220218023400000 +modified: 20230711083049169 +op-input: a [[selection of titles|Title Selection]] +op-neg-output: those input tiddlers that do <<.em not>> end with <<.place S>> +op-output: those input titles that end with <<.place S>> +op-parameter: a string of characters +op-parameter-name: S +op-purpose: filter the input titles by how they end +op-suffix: the <<.op suffix>> operator uses a rich suffix, see below for details tags: [[Filter Operators]] [[String Operators]] [[Negatable Operators]] title: suffix Operator type: text/vnd.tiddlywiki -caption: suffix -op-purpose: filter the input titles by how they end -op-input: a [[selection of titles|Title Selection]] -op-parameter: a string of characters -op-parameter-name: S -op-output: those input titles that end with <<.place S>> -op-neg-output: those input tiddlers that do <<.em not>> end with <<.place S>> -op-suffix: the <<.op suffix>> operator uses a rich suffix, see below for details <<.from-version "5.2.2">> The <<.op suffix>> operator uses an extended syntax that permits multiple flags to be passed: ``` -[suffix:<flag list>[<operand>]] +[suffix:<flag list>[<parameter>]] ``` * ''flag list'': a comma delimited list of flags -* ''operand'': filter operand The available flags are: diff --git a/editions/tw5.com/tiddlers/filters/syntax/All Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/All Filter Run Prefix.tid new file mode 100644 index 000000000..b1f123f82 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/All Filter Run Prefix.tid @@ -0,0 +1,18 @@ +created: 20230316150731234 +from-version: 5.1.23 +modified: 20230711084644541 +rp-input: all titles from previous filter runs +rp-output: output titles are appended to the output of previous filter runs without de-duplication. +rp-purpose: union of sets without de-duplication +tags: [[Named Filter Run Prefix]] +title: All Filter Run Prefix +type: text/vnd.tiddlywiki + +<$railroad text=""" +\start none +\end none +( ":all" | - ) +[[run|"Filter Run"]] +"""/> + +This prefix has an optional [[shortcut syntax|Shortcut Filter Run Prefix]] symbol `=run` \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid new file mode 100644 index 000000000..ee76ed636 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid @@ -0,0 +1,18 @@ +created: 20230318142752854 +from-version: 5.1.23 +modified: 20230711084712170 +op-purpose: accumulation of filter steps +rp-input: the filter output of all previous runs so far +rp-output: output titles replace the output of previous filter runs +tags: [[Named Filter Run Prefix]] +title: And Filter Run Prefix +type: text/vnd.tiddlywiki + +<$railroad text=""" +\start none +\end none +( ":and" | - ) +[[run|"Filter Run"]] +"""/> + +This prefix has an optional [[shortcut syntax|Shortcut Filter Run Prefix]] symbol `+run` \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix (Examples).tid b/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix (Examples).tid index d64ef3a5e..ef8ca679c 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix (Examples).tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix (Examples).tid @@ -2,8 +2,8 @@ created: 20211130114857532 filter1: [prefix[ca]then[ca]] filter2: [suffix[at]then[at]] filter3: other -modified: 20211204010918504 -tags: [[Filter Run Prefix Examples]] [[Filter Syntax]] [[Cascade Filter Run Prefix]] +modified: 20230305125250563 +tags: [[Cascade Filter Run Prefix]] title: Cascade Filter Run Prefix (Examples) type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid index 3e6f48cb0..72d66c463 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid @@ -1,20 +1,25 @@ created: 20211130114043280 -modified: 20211130121544118 -tags: [[Filter Syntax]] [[Filter Run Prefix]] +from-version: 5.2.1 +modified: 20230710073343947 +rp-input: the filter output of all previous runs so far +rp-output: the input titles as modified by the filters returned by this filter run +rp-purpose: modify input titles by successively evaluating a list of filters and applying the first result +tags: [[Named Filter Run Prefix]] title: Cascade Filter Run Prefix type: text/vnd.tiddlywiki -<<.from-version "5.2.1">> - -|''purpose'' |modify input titles by evaluating in turn a list of filters - as returned by the filter expression for this run - for each input title. | -|''input'' |all titles from previous filter runs | -|''output''|the input titles as modified by the filters returned by this filter run | +<$railroad text=""" +\start none +\end none +( ":cascade" | - ) +[[run|"Filter Run"]] +"""/> The [[filter expression|Filter Expression]] for this [[filter run|Filter Run]] is evaluated to return a list of filters. Each input title is then evaluated against each of the filters in turn, and the input title is replaced with the first result of the first filter that returns a non-empty list. If none of the filters return a result for an input title, it is replaced with an empty string. The following variables are available within the filter run: * <<.var currentTiddler>> - the input title -* <<.var ..currentTiddler>> - the value of the variable `currentTiddler` outside the filter run. +* <<.var ..currentTiddler>> - the value of the variable <<.var currentTiddler>> outside the filter run. -[[Examples|Cascade Filter Run Prefix (Examples)]] +[[Cascade Filter Run Prefix (Examples)]] diff --git a/editions/tw5.com/tiddlers/filters/syntax/Else Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Else Filter Run Prefix.tid new file mode 100644 index 000000000..dee5fc7be --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/Else Filter Run Prefix.tid @@ -0,0 +1,18 @@ +created: 20230318142408662 +from-version: 5.1.23 +modified: 20230322140756821 +rp-input: all titles from previous filter runs +rp-output: if the filter output so far is an empty list then the output titles of the run are [[dominantly appended|Dominant Append]] to the filter's output.<br>if the filter output so far is not an empty list then the run is ignored. +rp-purpose: the filter run is only evaluated if the filter output of all previous runs so far is an empty list +tags: [[Named Filter Run Prefix]] +title: Else Filter Run Prefix +type: text/vnd.tiddlywiki + +<$railroad text=""" +\start none +\end none +( ":else" | - ) +[[run|"Filter Run"]] +"""/> + +This prefix has a [[Shortcut Filter Run Prefix]] symbol `~run` \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/syntax/Except Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Except Filter Run Prefix.tid new file mode 100644 index 000000000..aa28c7f8f --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/Except Filter Run Prefix.tid @@ -0,0 +1,18 @@ +created: 20230318142056008 +from-version: 5.1.23 +modified: 20230322140643066 +rp-input: all titles from previous filter runs +rp-output: output titles are removed from the filter's output (if such tiddlers exist) +rp-purpose: if output titles of this filter run are contained in the output of previous filter runs, they are removed, and otherwise ignored +tags: [[Named Filter Run Prefix]] +title: Except Filter Run Prefix +type: text/vnd.tiddlywiki + +<$railroad text=""" +\start none +\end none +( ":except" | - ) +[[run|"Filter Run"]] +"""/> + +This prefix has a [[Shortcut Filter Run Prefix]] symbol `-run` \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/syntax/Filter Expression.tid b/editions/tw5.com/tiddlers/filters/syntax/Filter Expression.tid index 8521859ac..739be62bf 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Filter Expression.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Filter Expression.tid @@ -1,73 +1,21 @@ created: 20150124182421000 -modified: 20211129014550442 +modified: 20230710074507466 tags: [[Filter Syntax]] title: Filter Expression type: text/vnd.tiddlywiki +A <<.def "filter expression">> is the outermost level of the [[filter syntax|Filter Syntax]]. It consists of [[filter runs|Filter Run]] with optional [[filter run prefixes|Filter Run Prefix]]. Multiple filter runs are separated by [[whitespace|Filter Whitespace]]. + <$railroad text=""" -[{: - [: [[whitespace|"Filter Whitespace"]] ] - ("+"|"~"|:-|"-"|"="|":"[[named-prefix|"Named Filter Run Prefix"]]) +{ ( + - | + : [[<"prefix">|"Filter Run Prefix"]] + ) [[run|"Filter Run"]] -}] + + [[whitespace|"Filter Whitespace"]] +} """/> -A <<.def "filter expression">> is the outermost level of the [[filter syntax|Filter Syntax]]. It consists of one or more [[runs|Filter Run]]. +<<.tip """If the diagram has a single start and end line, as shown above, it means there is more info in the linked level above. The breadcrumbs can be used to navigate""">> -If a run has: - -* no prefix, its output titles are [[dominantly appended|Dominant Append]] to the filter's output -* the prefix `=`, output titles are appended to the filter's output without de-duplication. <<.from-version "5.1.20">> -* the prefix `-`, output titles are <<.em removed>> from the filter's output (if such tiddlers exist) -* the prefix `+`, it receives the filter output so far as its input; its output then <<.em "replaces">> all filter output so far and forms the input for the next run -* the prefix `~`, if the filter output so far is an empty list then the output titles of the run are [[dominantly appended|Dominant Append]] to the filter's output. If the filter output so far is not an empty list then the run is ignored. <<.from-version "5.1.18">> -* named prefixes for filter runs are available. <<.from-version "5.1.23">> -* named prefix `:filter`, it receives the filter output so far as its input. The next run is evaluated for each title of the input, removing every input title for which the output is an empty list. <<.from-version "5.1.23">> -** See [[Filter Filter Run Prefix]]. -* named prefix `:intersection` replaces all filter output so far with titles that are present in the output of this run, as well as the output from previous runs. Forms the input for the next run. <<.from-version "5.1.23">> -** See [[Intersection Filter Run Prefix]]. -* named prefix `:reduce` replaces all filter output so far with a single item by repeatedly applying a formula to each input title. A typical use is to add up the values in a given field of each input title. <<.from-version "5.1.23">> -** See [[Reduce Filter Run Prefix]]. -* named prefix `:sort` sorts all filter output so far by applying this run to each input title and sorting according to that output. <<.from-version "5.2.0">> -** See [[Sort Filter Run Prefix]]. -* named prefix `:map` transforms all filter output so far by applying this run to each input title and replacing the input title with the output of this run for that title. -** See [[Map Filter Run Prefix]]. <<.from-version "5.2.0">> - - -<<.tip "Compare named filter run prefix `:filter` with [[filter Operator]] which applies a subfilter to every input title, removing the titles that return an empty result from the subfilter">> - -<<.tip "Compare named filter run prefix `:reduce` with [[reduce Operator]] which is used to used to flatten a list of items down to a single item by repeatedly applying a subfilter.">> - -<<.tip """Within the filter runs prefixed with `:reduce`, `:sort`, `:map` and `:filter`, the "currentTiddler" variable is set to the title of the tiddler being processed. The value of currentTiddler outside the subfilter is available in the variable "..currentTiddler".<<.from-version "5.2.0">>""" >> - -In technical / logical terms: - -|!Run |!Equivalent named prefix |!Interpretation |!Output | -|`run` |`:or[run]` |de-duplicated union of sets |... OR run | -|`=run` |`:all[run]` |union of sets without de-duplication |... OR run | -|`+run` |`:and[run]` |accumulation of filter steps |... AND run | -|`-run` |`:except[run]` |difference of sets |... AND NOT run | -|`~run` |`:else[run]` |else |... ELSE run | -||`:intersection`|intersection of sets|| - -For the difference between `+` and `:intersection`, see [[Intersection Filter Run Prefix (Examples)]]. - -The input of a run is normally a list of all the non-[[shadow|ShadowTiddlers]] tiddler titles in the wiki (in no particular order). But the `+` prefix can change this: - -|Prefix|Input|h -|`-`, `~`, `=`, `:intersection` or none| <$link to="all Operator">`[all[]]`</$link> tiddler titles, unless otherwise determined by the first [[filter operator|Filter Operators]]| -|`+`, `:filter`, `:reduce`,`:sort`|the filter output of all previous runs so far| - -Precisely because of varying inputs, be aware that both prefixes `-` and `+` do not behave inverse to one another! - -For example, in both of the following, `$:/baz` will only be removed if it actually exists: - -* <$link to="is Operator"> `foo bar $:/baz -[is[system]]`</$link> -* <$link to="prefix Operator">`foo bar $:/baz -[prefix[$:/]]`</$link> - -To understand why, consider the input for both final runs with their `-` prefix. - -In order to remove `$:/baz` in any case, existing or not, simply use the `+` prefix with [[negated filter operators|Filter Operators]]: - -* <$link to="is Operator">`foo bar $:/baz +[!is[system]]`</$link> -* <$link to="prefix Operator">`foo bar $:/baz +[!prefix[$:/]]`</$link> +<<.tip """If the diagram has no start and no end, as used in lower levels, it means that higher level syntax elements have been removed, to increase readability and simplicity. The breadcrumbs can be used to navigate""">> diff --git a/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix (Examples).tid b/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix (Examples).tid index dd1e98e63..2e3272ff9 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix (Examples).tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix (Examples).tid @@ -1,6 +1,6 @@ created: 20211129022707404 -modified: 20211204154839890 -tags: [[Filter Syntax]] [[Filter Run Prefix Examples]] [[Filter Filter Run Prefix]] +modified: 20230305125338118 +tags: [[Filter Filter Run Prefix]] title: Filter Filter Run Prefix (Examples) type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix.tid index f8eb66847..88eaedc42 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Filter Filter Run Prefix.tid @@ -1,27 +1,32 @@ created: 20211129022455873 -modified: 20211129022550425 -tags: [[Filter Syntax]] [[Filter Run Prefix]] +from-version: 5.1.23 +modified: 20230710073334078 +rp-input: the filter output of all previous runs so far +rp-output: the input titles for which the filter run is not empty +rp-purpose: remove every input title for which the filter run output is an empty list +tags: [[Named Filter Run Prefix]] title: Filter Filter Run Prefix type: text/vnd.tiddlywiki -<<.from-version "5.1.23">> - -|''purpose'' |remove every input title for which the filter run output is an empty list | -|''input'' |all titles from previous filter runs | -|''output''|the input titles for which the filter run is not empty | +<$railroad text=""" +\start none +\end none +( ":filter" | - ) +[[run|"Filter Run"]] +"""/> It receives the filter output so far as its input. The next run is evaluated for each title of the input, removing every input title for which the output is an empty list. -Note that within the filter run, the "currentTiddler" variable is set to the title of the tiddler being processed. This permits filter runs like `:filter[{!!price}multiply{!!cost}compare:integer:gteq[5]]` to be used for computation. The value of currentTiddler outside the run is available in the variable "..currentTiddler". +Note that within the filter run, the <<.var currentTiddler>> variable is set to the title of the tiddler being processed. This permits filter runs like `:filter[{!!price}multiply{!!cost}compare:integer:gteq[5]]` to be used for computation. The value of currentTiddler outside the run is available in the variable <<.var ..currentTiddler>>. The following variables are available within the filter run: -* ''currentTiddler'' - the input title -* ''..currentTiddler'' - the value of the variable `currentTiddler` outside the filter run. -* ''index'' - <<.from-version "5.2.1">> the numeric index of the current list item (with zero being the first item in the list). -* ''revIndex'' - <<.from-version "5.2.1">> the reverse numeric index of the current list item (with zero being the last item in the list). -* ''length'' - <<.from-version "5.2.1">> the total length of the input list. +* <<.var currentTiddler>> - the input title +* <<.var ..currentTiddler>> - the value of the variable `currentTiddler` outside the filter run. +* <<.var index>> - <<.from-version "5.2.1">> the numeric index of the current list item (with zero being the first item in the list). +* <<.var revIndex>> - <<.from-version "5.2.1">> the reverse numeric index of the current list item (with zero being the last item in the list). +* <<.var length>> - <<.from-version "5.2.1">> the total length of the input list. <<.tip "Compare named filter run prefix `:filter` with [[filter Operator]] which applies a subfilter to every input title, removing the titles that return an empty result from the subfilter">> -[[Examples|Filter Filter Run Prefix (Examples)]] +[[Filter Filter Run Prefix (Examples)]] diff --git a/editions/tw5.com/tiddlers/filters/syntax/Filter Parameter.tid b/editions/tw5.com/tiddlers/filters/syntax/Filter Parameter.tid index d394f1900..9334fd069 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Filter Parameter.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Filter Parameter.tid @@ -1,15 +1,17 @@ created: 20150220152540000 -modified: 20210629215024053 -tags: [[Filter Syntax]] +modified: 20230710074423650 +tags: [[Filter Step]] title: Filter Parameter type: text/vnd.tiddlywiki <$railroad text=""" -( "[" [:{/"anything but ]"/}] "]" +\start none +\end none +( "[" [: <-"hard"-> /"anything but ]"/] "]" | - "{" [:{/"anything but }"/}] "}" + "{" [: <-"indirect"-> /"anything but }"/] "}" | - "<" [:{/"anything but >"/}] ">" + "<" [: <-"variable"-> /"anything but >"/] ">" ) """/> @@ -24,9 +26,11 @@ The parameter to a [[filter operator|Filter Operators]] can be: :: The parameter is the text indicated by the [[text reference|TextReference]] whose name appears between the curly brackets, i.e. a [[field|TiddlerFields]] of a specified tiddler, or the value of a property of a specified [[data tiddler|DataTiddlers]]. : <<.def variable>> :: `<like this>` -:: The parameter is the current value of the [[variable|Variables]] whose name appears between the angle brackets. Macro parameters are <<.em not>> supported up to and including ~TiddlyWiki v5.1.23. +:: The parameter is the current value of the [[variable|Variables]] whose name appears between the angle brackets. Macro parameters are <<.em not>> supported up to v5.2.0 ::<<.from-version "5.2.0">> Literal macro parameters are supported. For example: `[<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>]`. -<<.from-version "5.1.23">> Filter operators support multiple parameters which are separated by a ` , ` character. +--- + +<<.from-version "5.1.23">> [[Filter Step]]s support multiple parameters which are separated by a `,` character. For example: `[param1],[param2]` or `<param1>,{param2}` diff --git a/editions/tw5.com/tiddlers/filters/syntax/Filter Run Prefix (Examples).tid b/editions/tw5.com/tiddlers/filters/syntax/Filter Run Prefix (Examples).tid index dc39c948d..ddbb94c5c 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Filter Run Prefix (Examples).tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Filter Run Prefix (Examples).tid @@ -1,6 +1,6 @@ created: 20201117073343969 -modified: 20211129032537195 -tags: [[Filter Syntax]] [[Filter Run Prefix Examples]] +modified: 20230315152812472 +tags: title: Filter Run Prefix (Examples) type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/syntax/Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Filter Run Prefix.tid new file mode 100644 index 000000000..4387ba9cb --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/Filter Run Prefix.tid @@ -0,0 +1,18 @@ +created: 20230305130600148 +modified: 20230711090913687 +tags: [[Filter Expression]] +title: Filter Run Prefix +type: text/vnd.tiddlywiki + +There are 2 types of filter run prefixes that are interchangeable. Named prefixes and shortcut prefixes. + +<$railroad text=""" +\start none +\end none +( + - | +: [[<":named prefix"> /"starting with v5.1.23"/ |"Named Filter Run Prefix"]] | + [[<"shortcut prefix"> /"prior to v5.1.23"/ |"Shortcut Filter Run Prefix"]] +) +[[run|"Filter Run"]] +"""/> diff --git a/editions/tw5.com/tiddlers/filters/syntax/Filter Run.tid b/editions/tw5.com/tiddlers/filters/syntax/Filter Run.tid index e3843b492..c5e9c8a34 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Filter Run.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Filter Run.tid @@ -1,11 +1,13 @@ created: 20150124182117000 -modified: 20150129133716000 -tags: [[Filter Syntax]] +modified: 20230710074357002 +tags: [[Filter Expression]] title: Filter Run type: text/vnd.tiddlywiki <$railroad text=""" -( "[" { [[step|"Filter Step"]] } "]" +\start none +\end none +( "[" { [[<"Filter Step">|"Filter Step"]] } "]" | [:{/"anything but [ ] or whitespace"/}] | @@ -19,7 +21,6 @@ A <<.def run>> consists of [[steps|Filter Step]], and it outputs a [[selection|T The steps are processed from left to right. The input to the first step is same as the input to the run. For each subsequent step, the input is the output of the previous step. -{{Selection Constructors}} The lower three options in the diagram match syntax like `HelloThere`, `"HelloThere"`, `'HelloThere'` and `"Filter Operators"`. They are short for `[title[...]]`. diff --git a/editions/tw5.com/tiddlers/filters/syntax/Filter Step.tid b/editions/tw5.com/tiddlers/filters/syntax/Filter Step.tid index b569ec4d6..73b58524a 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Filter Step.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Filter Step.tid @@ -1,23 +1,35 @@ created: 20150124182127000 -modified: 20201103111044922 -tags: [[Filter Syntax]] +modified: 20230710074414361 +tags: [[Filter Run]] title: Filter Step type: text/vnd.tiddlywiki +A <<.def "filter step">> represents a single operation within a <<.def "filter run">>. + +In programming terms, it is akin to a function call to which the step's input is passed as a parameter. A step's output is a [[title selection|Title Selection]] that contributes to a [[filter run|Filter Run]] and hence to the entire [[filter expression|Filter Expression]] that contains it. + <$railroad text=""" +\start none +\end none [:"!"] -[: [[operator|"Filter Operators"]] [:":" suffix] ] -[[parameter|"Filter Parameter"]] +( / "if omitted, defaults to: title" /|: +( - | :[[operator|"Filter Operators"]] ) +{ [:":" [[suffix|"Filter Operators"]] ] } ) +{ [[parameter|"Filter Parameter"]] + "," } """/> -A <<.def step>> represents a single operation within a [[filter|Filter Syntax]]. +The step's <<.def operator>> is drawn from a list of predefined keywoards which are known as [[filter operators|Filter Operators]]. -In programming terms, it is akin to a function call to which [[the step's input|Filter Run]] is passed as an implicit parameter. A step's output is a [[selection|Title Selection]] that contributes to a [[run|Filter Run]] and hence to the entire [[filter expression|Filter Expression]] that contains it. - -The step's <<.def operator>> is drawn from a list of [[predefined keywords|Filter Operators]], which can be extended by plugins. Any unrecognised operator is treated as if it was the suffix to the <<.olink field>> operator. If a step's operator is omitted altogether, it defaults to `title`. +Many steps require an explicit <<.def parameter>>, that further defines what the step is to do. The <<.def suffix>> is additional text, often the name of a [[field|TiddlerFields]], that extends the meaning of certain operators. -Many steps require an explicit <<.def parameter>> value, also known as an <<.def operand>>, that further defines what the step is to do. +If a step's <<.def operator>> and <<.def suffix>> are //omitted// altogether, it defaults to the [[title|title Operator]] operator. -<<.from-version "5.1.23">> Some steps accept multiple parameters which are separated by a ` , ` character. +<<.from-version "5.1.23">> Some steps accept multiple <<.def parameter>>s which are separated by a `,` character. + +Any unrecognised operator is treated as if it was the suffix to the <<.olink field>> operator. + +Filter operators can be extended by plugins. + +{{Selection Constructors}} diff --git a/editions/tw5.com/tiddlers/filters/syntax/Filter Syntax.tid b/editions/tw5.com/tiddlers/filters/syntax/Filter Syntax.tid index 0190aabab..58a03aa20 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Filter Syntax.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Filter Syntax.tid @@ -1,18 +1,24 @@ created: 20140210141217955 -modified: 20150124184229000 +list: [[Filter Expression]] [[Filter Run]] [[Filter Step]] [[Filter Parameter]] [[Filter Whitespace]] +modified: 20230710074340943 tags: Filters title: Filter Syntax type: text/vnd.tiddlywiki -list: [[Filter Expression]] [[Filter Run]] [[Filter Step]] [[Filter Parameter]] [[Filter Whitespace]] <<.preamble """[[Filters]] follow a grammar that is presented here, using [[railroad diagrams|Railroad Diagrams]], for those who find formal syntax descriptions helpful. However, you can [[learn to write filters|Introduction to filter notation]] without needing to understand this group of tiddlers.""">> -A <<.def filter>> is a pipeline for transforming an <<.def input>> into an <<.def output>>. Both the input and the output are [[ordered sets of titles|Title Selection]] of things like tiddlers and fields. +A <<.def filter>> is a pipeline for transforming an <<.def input>> into an <<.def output>>. Both the input and the output are [[ordered sets of titles|Title Selection]] of tiddlers and fields. -Filters are [[expressions|Filter Expression]] constructed from smaller building blocks, called [[runs|Filter Run]] and [[steps|Filter Step]], each of which also transforms an input to an output. +Filters are ''expressions'' constructed from smaller building blocks, called ''runs'', which are built using ''steps''. Eeach of which also transforms an input to an output. A filter starts with an empty output. Its runs are processed from left to right, progressively modifying the output. -Here are details of the various building blocks involved: +The "Filter Syntax" description starts with: -<<list-links "[tag[Filter Syntax]]">> +<$railroad text=""" +\start double +\end double +[[<"Filter Expression">|"Filter Expression"]] +"""/> + +<<.tip "The railroad boxes as the one above can be used to navigate">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/syntax/Filter Whitespace.tid b/editions/tw5.com/tiddlers/filters/syntax/Filter Whitespace.tid index f31422b3d..f33092e9c 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Filter Whitespace.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Filter Whitespace.tid @@ -1,11 +1,13 @@ created: 20150124182304000 -modified: 20150125105243000 -tags: [[Filter Syntax]] +modified: 20230710074447240 +tags: [[Filter Expression]] title: Filter Whitespace type: text/vnd.tiddlywiki <$railroad text=""" +\start none +\end none {( "space" | "tab" | "linefeed" | "return" | "vertical tab" | "formfeed" )} """/> -Whitespace characters can appear between each [[run|Filter Run]] of a [[filter expression|Filter Expression]]. +Whitespace characters can appear between each run of a [[filter expression|Filter Expression]]. diff --git a/editions/tw5.com/tiddlers/filters/syntax/Interchangeable Filter Run Prefixes.tid b/editions/tw5.com/tiddlers/filters/syntax/Interchangeable Filter Run Prefixes.tid new file mode 100644 index 000000000..0313f543a --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/Interchangeable Filter Run Prefixes.tid @@ -0,0 +1,44 @@ +created: 20230316151518640 +modified: 20230327130626715 +tags: [[Filter Run Prefix]] +title: Interchangeable Filter Run Prefixes +type: text/vnd.tiddlywiki + +!! Interchangeable Filter Run Prefixes + +In technical / logical terms: + +|!Run |!Equivalent named prefix |!Interpretation |!Output | +|`[run]` |`:or[run]` |de-duplicated union of sets |... OR run | +|`+[run]` |`:and[run]` |accumulation of filter steps |... AND run | +|`-[run]` |`:except[run]` |difference of sets |... AND NOT run | +|`~[run]` |`:else[run]` |else |... ELSE run | +|`=[run]` |`:all[run]` |union of sets without de-duplication |... OR run | + +The input of a run is normally a list of all the non-[[shadow|ShadowTiddlers]] tiddler titles in the wiki (in no particular order).<br>But the `+` prefix can change this: + +|Prefix|Input|h +|`-`, `~`, `=`, `:intersection` or none| <$link to="all Operator">`[all[]]`</$link> tiddler titles, unless otherwise determined by the first [[filter operator|Filter Operators]]| +|`+`, `:filter`, `:map`, `:reduce`,`:sort` |the filter output of all previous runs so far| + +Precisely because of varying inputs, be aware that both prefixes `-` and `+` do not behave inverse to one another! + +For example, in both of the following, `$:/baz` will only be removed if it actually exists: + +* <$link to="is Operator"> `foo bar $:/baz -[is[system]]`</$link> +* <$link to="prefix Operator">`foo bar $:/baz -[prefix[$:/]]`</$link> + +To understand why, consider the input for both final runs with their `-` prefix. + +In order to remove `$:/baz` in any case, existing or not, simply use the `+` prefix with [[negated filter operators|Filter Operators]]: + +* <$link to="is Operator">`foo bar $:/baz +[!is[system]]`</$link> +* <$link to="prefix Operator">`foo bar $:/baz +[!prefix[$:/]]`</$link> + +!! Difference between + and intersection + +For the difference between `+` and `:intersection`, see [[Intersection Filter Run Prefix (Examples)]]. + +!! For Developers + +To create a new filter run prefix, create a [[Javascript module|Modules]] with a [[module-type|ModuleType]] of `filterrunprefix`. diff --git a/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix (Examples).tid b/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix (Examples).tid index d074eb247..fa9bba322 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix (Examples).tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix (Examples).tid @@ -1,6 +1,6 @@ created: 20211128212902292 -modified: 20211128233320674 -tags: [[Filter Syntax]] [[Filter Run Prefix Examples]] [[Intersection Filter Run Prefix]] +modified: 20230305125354209 +tags: [[Intersection Filter Run Prefix]] title: Intersection Filter Run Prefix (Examples) type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix.tid index 2fc8dd40f..2f2f718b3 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Intersection Filter Run Prefix.tid @@ -1,15 +1,20 @@ created: 20211128212902292 -modified: 20211128212904721 -tags: [[Filter Syntax]] [[Filter Run Prefix]] +from-version: 5.1.23 +modified: 20230710073322863 +rp-input: all titles from previous filter runs +rp-output: the titles that are present in both the result of this filter run and the output from previous runs +rp-purpose: find the intersection of titles from previous runs with titles in this filter +tags: [[Named Filter Run Prefix]] title: Intersection Filter Run Prefix type: text/vnd.tiddlywiki -<<.from-version "5.1.23">> - -|''purpose'' |find the intersection of titles from previous runs with titles in this filter run | -|''input'' |all titles from previous filter runs | -|''output''|the titles that are present in both the result of this filter run and the output from previous runs | +<$railroad text=""" +\start none +\end none +( ":intersection" | - ) +[[run|"Filter Run"]] +"""/> The filter output from previous runs is set aside. The `:intersection` filter run is started with all tiddler titles as input. Once this latest filter run has completed, the latest output is compared to the set-aside output. A new output is produced that contains only titles that appeared in both the set-aside output and the latest output. -[[Examples|Intersection Filter Run Prefix (Examples)]] +[[Intersection Filter Run Prefix (Examples)]] diff --git a/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix (Examples).tid b/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix (Examples).tid index 8d5631983..bd8152ce8 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix (Examples).tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix (Examples).tid @@ -1,6 +1,6 @@ created: 20210618134753828 -modified: 20220724162340642 -tags: [[Filter Syntax]] [[Filter Run Prefix Examples]] [[Map Filter Run Prefix]] +modified: 20230305125405422 +tags: [[Map Filter Run Prefix]] title: Map Filter Run Prefix (Examples) type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix.tid index ad36fcade..c4f8b437a 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Map Filter Run Prefix.tid @@ -1,28 +1,33 @@ created: 20210618133745003 -modified: 20220720190146771 -tags: [[Filter Syntax]] [[Filter Run Prefix]] +from-version: 5.2.0 +modified: 20240312202834547 +rp-input: the filter output of all previous runs so far +rp-output: the input titles as modified by the result of this filter run +rp-purpose: modify input titles by the result of evaluating this filter run for each item +rp-suffix: <<.from-version "5.2.3">> <<.value flat>> to return all results from the filter run, or omit (default) to return only the first result +tags: [[Named Filter Run Prefix]] title: Map Filter Run Prefix type: text/vnd.tiddlywiki -<<.from-version "5.2.0">> - -|''purpose'' |modify input titles by the result of evaluating this filter run for each item | -|''input'' |all titles from previous filter runs | -|''suffix''|<<.from-version "5.2.3">> `flat` to return all results from the filter run, If omitted (default), only the first result is returned.| -|''output''|the input titles as modified by the result of this filter run | +<$railroad text=""" +\start none +\end none +( ":map" (: ":flat" | - ) | - ) +[[run|"Filter Run"]] +"""/> Each input title from previous runs is passed to this run in turn. The filter run transforms the input titles and the output of this run replaces the input title. For example, the filter run `[get[caption]else{!!title}]` replaces each input title with its caption field, unless the field does not exist in which case the title is preserved. -Note that within the filter run, the "currentTiddler" variable is set to the title of the tiddler being processed. This permits filter runs like `:map[{!!price}multiply{!!cost}]` to be used for computation. The value of currentTiddler outside the run is available in the variable "..currentTiddler". +Note that within the filter run, the <<.var currentTiddler>> variable is set to the title of the tiddler being processed. This permits filter runs like `:map[{!!price}multiply{!!cost}]` to be used for computation. The following variables are available within the filter run: -* ''currentTiddler'' - the input title -* ''..currentTiddler'' - the value of the variable `currentTiddler` outside the filter run. -* ''index'' - <<.from-version "5.2.1">> the numeric index of the current list item (with zero being the first item in the list). -* ''revIndex'' - <<.from-version "5.2.1">> the reverse numeric index of the current list item (with zero being the last item in the list). -* ''length'' - <<.from-version "5.2.1">> the total length of the input list. +* <<.var currentTiddler>> - the input title +* <<.var ..currentTiddler>> - the value of the variable `currentTiddler` outside the filter run. +* <<.var index>> - <<.from-version "5.2.1">> the numeric index of the current list item (with zero being the first item in the list). +* <<.var revIndex>> - <<.from-version "5.2.1">> the reverse numeric index of the current list item (with zero being the last item in the list). +* <<.var length>> - <<.from-version "5.2.1">> the total length of the input list. -Filter runs used with the `:map` prefix should return at least the same number of items that they are passed. Any missing entries will be treated as an empty string. In particular, when retrieving the value of a field with the [[get Operator]] it is helpful to guard against a missing field value using the [[else Operator]]. For example `[get[myfield]else[default-value]...`. +Filter runs used with the `:map` prefix should return at least the same number of items that they are passed. Input titles for which the filter run returns no output are replaced by an empty string. In particular, when retrieving the value of a field with the [[get Operator]] it is helpful to guard against a missing field value using the [[else Operator]]. For example `[get[myfield]else[default-value]...`. -[[Examples|Map Filter Run Prefix (Examples)]] \ No newline at end of file +[[Map Filter Run Prefix (Examples)]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/syntax/Named Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Named Filter Run Prefix.tid index 72a4bec8d..ed389b987 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Named Filter Run Prefix.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Named Filter Run Prefix.tid @@ -1,10 +1,36 @@ created: 20201214044413473 -modified: 20211118025845599 -tags: [[Filter Syntax]] +modified: 20230711090833212 +tags: [[Filter Run Prefix]] title: Named Filter Run Prefix +type: text/vnd.tiddlywiki -<$set name="prefixlist" filter="""[all[shadows+tiddlers]has[module-type]module-type[filterrunprefix]trim:prefix[$:/core/modules/filterrunprefixes/]trim:suffix[.js]addprefix["]addsuffix["]join[|]addprefix[(]addsuffix[)]]"""> -<$railroad text=<<prefixlist>>/> -</$set> +In <<.from-version "5.1.23">> the named filter run prefixes where implemented. `:cascade`, `:map` and `:sort` have been added later as shown in the diagrams. -A named filter run prefix can precede any [[run|Filter Run]] of a [[filter expression|Filter Expression]] in place of a single-character prefix (`+`, `-` and so on). To create a new filter run prefix, create a [[Javascript module|Modules]] with a [[module-type|ModuleType]] of `filterrunprefix`. +A named filter run prefix can precede any [[run|Filter Run]] of a [[filter expression|Filter Expression]] in place of a [[shortcut run prefix|Shortcut Filter Run Prefix]]. + +<$railroad text=""" +\start none +\end none +( +[[<":all"> |"All Filter Run Prefix"]] | +[[<":and"> |"And Filter Run Prefix"]] | +[[<":cascade"> /"v5.2.1"/ |"Cascade Filter Run Prefix"]] | +[[<":else"> |"Else Filter Run Prefix"]] | +[[<":except"> |"Except Filter Run Prefix"]] | +[[<":filter"> |"Filter Filter Run Prefix"]] | +[[<":intersection"> |"Intersection Filter Run Prefix"]] | +[[<":map"> /"v5.2.0"/ |"Map Filter Run Prefix"]] | +[[<":or"> |"Or Filter Run Prefix"]] | +[[<":reduce"> |"Reduce Filter Run Prefix"]] | +[[<":sort"> /"v5.2.0"/ |"Sort Filter Run Prefix"]] | +[[<":then"> /"v5.3.0"/ |"Then Filter Run Prefix"]]) [[run|"Filter Run"]] +"""/> + + +<<.tip "Compare named filter run prefix `:filter` with [[filter Operator]] which applies a subfilter to every input title, removing the titles that return an empty result from the subfilter">> + +<<.tip "Compare named filter run prefix `:reduce` with [[reduce Operator]] which is used to used to flatten a list of items down to a single item by repeatedly applying a subfilter">> + +<<.tip """Within the filter runs prefixed with `:reduce`, `:sort`, `:map` and `:filter`, the <<.var currentTiddler>> variable is set to the title of the tiddler being processed.<br>The value of currentTiddler outside the subfilter is available in the variable <<.var "..currentTiddler">> <<.from-version "5.2.0">>""" >> + +Also see: [[Interchangeable Filter Run Prefixes]] diff --git a/editions/tw5.com/tiddlers/filters/syntax/Or Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Or Filter Run Prefix.tid new file mode 100644 index 000000000..4cb9a94ec --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/Or Filter Run Prefix.tid @@ -0,0 +1,18 @@ +created: 20230318135743766 +from-version: 5.1.23 +modified: 20230322140708372 +rp-input: all titles from previous filter runs +rp-output: output titles are [[dominantly appended|Dominant Append]] to the output of previous filter runs +rp-purpose: de-duplicated union of tiddler sets +tags: [[Named Filter Run Prefix]] +title: Or Filter Run Prefix +type: text/vnd.tiddlywiki + +<$railroad text=""" +\start none +\end none +( ":or" | - ) +[[run|"Filter Run Prefix"]] +"""/> + +The :or prefix is equivalent to using no prefix at all. See `run` at [[Shortcut Filter Run Prefix]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix (Examples).tid b/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix (Examples).tid index c88472216..bb17b9c8e 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix (Examples).tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix (Examples).tid @@ -1,6 +1,6 @@ created: 20211124151912931 -modified: 20211124160747921 -tags: [[Filter Syntax]] [[Reduce Filter Run Prefix]] [[Filter Run Prefix Examples]] +modified: 20230305125430544 +tags: [[Reduce Filter Run Prefix]] title: Reduce Filter Run Prefix (Examples) type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix.tid index 3a9fd8a82..6799d8e05 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Reduce Filter Run Prefix.tid @@ -1,25 +1,34 @@ created: 20211124151912931 -modified: 20211124170117511 -tags: [[Filter Syntax]] [[Filter Run Prefix]] +from-version: 5.1.23 +modified: 20230710073305239 +rp-input: the filter output of all previous runs so far +rp-output: the accumulated single item +rp-purpose: replaces all filter output so far with a single item by repeatedly applying a filter run to each input title +tags: [[Named Filter Run Prefix]] title: Reduce Filter Run Prefix type: text/vnd.tiddlywiki -<<.from-version "5.1.23">> -|''purpose'' |replaces all filter output so far with a single item by repeatedly applying a filter run to each input title | -|''input'' |all titles from previous filter runs | -|''output''|the accumulated single item | +<$railroad text=""" +\start none +\end none +( ":reduce" | - ) +[[run|"Filter Run"]] +"""/> -Each input title from previous runs is passed to this run in turn. The result of each previous call to this run is made available in the next call via the variable named "accumulator". The result of the last call to this run is returned as the output. A typical use is to add up the values in a given field of each input title. + +Each input title from previous runs is passed to this run in turn. The result of each previous call to this run is made available in the next call via the variable named <<.var accumulator>>. The result of the last call to this run is returned as the output. A typical use is to add up the values in a given field of each input title. + +Replaces all filter output so far with a single item by repeatedly applying a formula, as described above, to each input title. The following variables are available within the filter run: -* ''accumulator'' - the result of the previous filter run -* ''currentTiddler'' - the input title -* ''..currentTiddler'' - the value of the variable `currentTiddler` outside the filter run. <<.from-version "5.2.0">> -* ''index'' - the numeric index of the current list item (with zero being the first item in the list) -* ''revIndex'' - the reverse numeric index of the current list item (with zero being the last item in the list) -* ''length'' - the total length of the input list +* <<.var accumulator>> - the result of the previous filter run +* <<.var currentTiddler>> - the input title +* <<.var ..currentTiddler>> - the value of the variable `currentTiddler` outside the filter run. <<.from-version "5.2.0">> +* <<.var index>> - the numeric index of the current list item (with zero being the first item in the list) +* <<.var revIndex>> - the reverse numeric index of the current list item (with zero being the last item in the list) +* <<.var length>> - the total length of the input list <<.tip "Compare named filter run prefix `:reduce` with [[reduce Operator]] which is used to flatten a list of items down to a single item by repeatedly applying a subfilter.">> @@ -35,4 +44,4 @@ is equivalent to: [tag[shopping]reduce<num-items>] ``` -[[Examples|Reduce Filter Run Prefix (Examples)]] \ No newline at end of file +[[Reduce Filter Run Prefix (Examples)]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/syntax/Shortcut Filter Run Prefixes.tid b/editions/tw5.com/tiddlers/filters/syntax/Shortcut Filter Run Prefixes.tid new file mode 100644 index 000000000..fa8bc26e1 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/syntax/Shortcut Filter Run Prefixes.tid @@ -0,0 +1,29 @@ +created: 20230305131705188 +modified: 20230710074438655 +tags: [[Filter Run Prefix]] +title: Shortcut Filter Run Prefix +type: text/vnd.tiddlywiki + +Shortcut prefixes are commonly used by advanced users because they are fast to type but they are harder to read by less experienced users. That's why [[named prefixes|Named Filter Run Prefix]] have been created, which are more verbose. Shortcut and named filter run prefixes are interchangeable as shown in the table below. + +<$railroad text=""" +\start none +\end none +(-|:"+"|"-"|"~"|"=") +[[run|"Filter Run"]] +"""/> + +If a run has: + +* no prefix, its output titles are [[dominantly appended|Dominant Append]] to the filter's output + +* the prefix `+`, it receives the filter output so far as its input; its output then <<.em "replaces">> all filter output so far and forms the input for the next run + +* the prefix `-`, output titles are <<.em removed>> from the filter's output (if such tiddlers exist) + +* the prefix `~`, if the filter output so far is an empty list then the output titles of the run are [[dominantly appended|Dominant Append]] to the filter's output. If the filter output so far is not an empty list then the run is ignored. <<.from-version "5.1.18">> + +* the prefix `=`, output titles are appended to the filter's output without de-duplication. <<.from-version "5.1.20">> + + +{{Interchangeable Filter Run Prefixes}} \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix (Examples).tid b/editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix (Examples).tid index 73c95643e..16b9c9711 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix (Examples).tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix (Examples).tid @@ -1,6 +1,6 @@ created: 20210428074912172 -modified: 20210428085746041 -tags: [[Filter Syntax]] [[Sort Filter Run Prefix]] [[Filter Run Prefix Examples]] +modified: 20230315165343329 +tags: [[Sort Filter Run Prefix]] title: Sort Filter Run Prefix (Examples) type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid index ec5e032dd..e17b88356 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid @@ -1,19 +1,26 @@ created: 20210428083929749 -modified: 20210522162628946 -tags: [[Filter Syntax]] [[Filter Run Prefix]] +from-version: 5.2.0 +modified: 20240312203002082 +rp-input: the filter output of all previous runs so far +rp-output: output titles replace the output of previous filter runs +rp-purpose: sort the input titles by the result of evaluating this filter run for each item +rp-suffix: the <<.op :sort>> filter run prefix uses a rich suffix, see below for details +tags: [[Named Filter Run Prefix]] title: Sort Filter Run Prefix type: text/vnd.tiddlywiki -<<.from-version "5.2.0">> - -|''purpose'' |sort the input titles by the result of evaluating this filter run for each item | -|''input'' |all titles from previous filter runs | -|''suffix'' |the `:sort` filter run prefix uses a rich suffix, see below for details | -|''output''|the sorted result of previous filter runs | +<$railroad text=""" +\start none +\end none +( ( ":sort" ) +( : ":string" | ":alphanumeric" | ":number" | ":integer" | ":version" | ":date" ) +( : ":casesensitive" /"required for string and alphanumeric"/ | ":caseinsensitive" /"required for string and alphanumeric"/ | ":reverse" /"optional"/ | - ) | - ) +[[run|"Filter Run"]] +"""/> Each input title from previous runs is passed to this run in turn. The filter run transforms the input titles into the form needed for sorting. For example, the filter run `[length[]]` transforms each input title in to the number representing its length, and thus sorts the input titles according to their length. -Note that within the filter run, the "currentTiddler" variable is set to the title of the tiddler being processed. This permits filter runs like `:sort:number[{!!value}divide{!!cost}]` to be used for computation. The value of currentTiddler outside the run is available in the variable "..currentTiddler". +Note that within the filter run, the <<.var currentTiddler>> variable is set to the title of the tiddler being processed. This permits filter runs like `:sort:number[{!!value}divide{!!cost}]` to be used for computation. The value of <<.var currentTiddler>> outside the run is available in the variable <<.var "..currentTiddler">>. The `:sort` filter run prefix uses an extended syntax that allows for multiple suffixes, some of which are required: diff --git a/editions/tw5.com/tiddlers/filters/syntax/then Filter Run Prefix.tid b/editions/tw5.com/tiddlers/filters/syntax/then Filter Run Prefix.tid index 2584bd65b..b74000b5a 100644 --- a/editions/tw5.com/tiddlers/filters/syntax/then Filter Run Prefix.tid +++ b/editions/tw5.com/tiddlers/filters/syntax/then Filter Run Prefix.tid @@ -1,45 +1,14 @@ created: 20210618133745003 from-version: 5.3.0 -modified: 20230506172920710 +modified: 20230710074225410 rp-input: <<.olink all>> tiddler titles rp-output: the output of this filter run replaces the output of previous runs unless it is an empty list (see below) rp-purpose: replace any input to this filter run with its output, only evaluating the run when there is any input search: -tags: [[Filter Run Prefix]] [[Filter Syntax]] +tags: [[Named Filter Run Prefix]] title: Then Filter Run Prefix type: text/vnd.tiddlywiki -\define .op-row() -<$macrocall $name=".if" - cond="""$(op-body)$""" - then="""<tr><th align="left">$(op-head)$</th><td><<.op-place>>$(op-body)$</td></tr>""" - else=""/> -\end - -<$list filter="[all[current]has[from-version]]" variable="listItem"> - <$macrocall $name=".from-version" version={{!!from-version}}/> -</$list> -<$let op-head="" op-body="" op-name=""> - <table class="doc-table"> - <!-- purpose --> - <$let op-head="purpose" op-body={{!!rp-purpose}}> - <<.op-row>> - </$let> - <!-- input --> - <$let op-head="[[input|Filter Expression]]" op-body={{!!rp-input}}> - <<.op-row>> - </$let> - <!-- suffix --> - <$let op-head="suffix" op-body={{!!rp-suffix}} op-name={{!!rp-suffix-name}}> - <<.op-row>> - </$let> - <!-- output --> - <$let op-head="output" op-body={{!!rp-output}}> - <<.op-row>> - </$let> - </table> -</$let> - <$railroad text=""" \start none \end none @@ -47,8 +16,6 @@ type: text/vnd.tiddlywiki [[run|"Filter Run"]] """/> -!Introduction - The <<.op :then>> filter run prefix is used to replace the result of all previous filter runs with its output. If the result of all previous runs is an empty list, the <<.op :then>> prefixed filter run is not evaluated. @@ -67,5 +34,5 @@ The major difference between the <<.op then>> operator and a <<.op :then>> prefi |^<<.operator-example m1-1 "[tag[WikiText]] :then[[true]]">>|^<<.operator-example m1-2 "[tag[WikiText]then[true]]">><p>To make them equivalent, additional filter steps may be added:</p> <<.operator-example m1-3 "[tag[WikiText]count[]compare:number:gt[0]then[true]]">>| -! [[Examples|Then Filter Run Prefix (Examples)]] +[[Then Filter Run Prefix (Examples)]] diff --git a/editions/tw5.com/tiddlers/filters/toggle Operator.tid b/editions/tw5.com/tiddlers/filters/toggle Operator.tid index 13e971990..10fbadf2c 100644 --- a/editions/tw5.com/tiddlers/filters/toggle Operator.tid +++ b/editions/tw5.com/tiddlers/filters/toggle Operator.tid @@ -4,7 +4,7 @@ modified: 20201118192155504 op-input: a list of items op-output: the input list with the title specified in the parameter toggled op-parameter: the <<.op toggle>> operator accepts 1 or more parameters, see below for details -op-purpose: toggle the title specified in the operand in the input +op-purpose: toggle the title specified in the parameter in the input tags: [[Filter Operators]] [[Listops Operators]] [[Order Operators]] title: toggle Operator type: text/vnd.tiddlywiki @@ -19,7 +19,7 @@ The <<.op toggle>> operator requires at least one parameter and can accept addit * ''title1'' : a title to toggle in the input list. If it is already present, it is removed. Otherwise, it is added. * ''title2'': (optional). When the second parameter is provided, the operator toggles between the two values in the input list. If neither is present, the first parameter takes precedence is added to the list. -With more than two parameters, the <<.op toggle>> behaves similar to the [[cycle|cycle Operator]] and can be used to cycle through a list of values. Note that all operands should be unique. +With more than two parameters, the <<.op toggle>> behaves similar to the [[cycle|cycle Operator]] and can be used to cycle through a list of values. Note that all parameters should be unique. <$macrocall $name=".tip" _="While the <<.op cycle>> operator interprets its first parameter as a list of titles to cycle through and offers similar functionality, the <<.op toggle>> operator accepts an unlimited number of distinct parameters."/> diff --git a/editions/tw5.com/tiddlers/filters/transcludes.tid b/editions/tw5.com/tiddlers/filters/transcludes.tid new file mode 100644 index 000000000..29b90eb54 --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/transcludes.tid @@ -0,0 +1,13 @@ +created: 20211002204500000 +tags: [[Filter Operators]] [[Common Operators]] +title: transcludes Operator +type: text/vnd.tiddlywiki +caption: transcludes +op-purpose: find the titles linked to by each input title +op-input: a [[selection of titles|Title Selection]] +op-parameter: none +op-output: the titles to which the input tiddlers [[transcludes|Transclusion]] + +Each input title is processed in turn. The corresponding tiddler's list of transcludes is generated, in the order in which they appear in the tiddler's text, and [[dominantly appended|Dominant Append]] to the operator's overall output. + +<<.operator-examples "transcludes">> diff --git a/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Firefox.tid b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Firefox.tid index dbec1fb07..0d580f689 100644 --- a/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Firefox.tid +++ b/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Firefox.tid @@ -1,10 +1,11 @@ caption: Firefox created: 20140811170425199 -modified: 20211114031651878 +modified: 20230803213024843 tags: GettingStarted title: GettingStarted - Firefox type: text/vnd.tiddlywiki -Firefox provides the best user experience for using TiddlyWiki with the TiddlyFox browser extension. +Firefox provides the best user experience for using TiddlyWiki with the following browser extensions: +<<list-links filter:"[tag[Firefox]delivery[Browser Extension]] -[[Saving with TiddlyFox]]">> -{{Saving with TiddlyFox}} +{{Saving with FireFox}} diff --git a/editions/tw5.com/tiddlers/hellothere/HelloThere.tid b/editions/tw5.com/tiddlers/hellothere/HelloThere.tid index 08904b2a7..937db8f06 100644 --- a/editions/tw5.com/tiddlers/hellothere/HelloThere.tid +++ b/editions/tw5.com/tiddlers/hellothere/HelloThere.tid @@ -1,6 +1,6 @@ created: 20130822170200000 list: [[A Gentle Guide to TiddlyWiki]] [[Discover TiddlyWiki]] [[Some of the things you can do with TiddlyWiki]] [[Ten reasons to switch to TiddlyWiki]] Examples [[What happened to the original TiddlyWiki?]] -modified: 20230820112855583 +modified: 20231223102201587 tags: TableOfContents title: HelloThere type: text/vnd.tiddlywiki @@ -40,7 +40,7 @@ TiddlyWiki lets you choose where to keep your data, guaranteeing that in the dec </div> <div class="tc-cards tc-small"> <$link to="中文社区 - Chinese Community" class="tc-btn-big-green tc-card"> -中文社区 - Chinese Community +中文社区<br/>Chinese Community </$link> </div> diff --git a/editions/tw5.com/tiddlers/howtos/Concatenating text and variables using macro substitution.tid b/editions/tw5.com/tiddlers/howtos/Concatenating text and variables using macro substitution.tid index 77090609a..933e1e80e 100644 --- a/editions/tw5.com/tiddlers/howtos/Concatenating text and variables using macro substitution.tid +++ b/editions/tw5.com/tiddlers/howtos/Concatenating text and variables using macro substitution.tid @@ -4,10 +4,16 @@ tags: Learning title: Concatenating text and variables using macro substitution type: text/vnd.tiddlywiki +!! Important + <<.from-version "5.3.0">> It is recommended to use [[substituted attributes|Substituted Attribute Values]] or the [[substitute filter operator|substitute Operator]] to concatenate text and variables. It's a frequent use case in ~TiddlyWiki that you will want to put the results of variables together with various bits of strings of text. This process in some programming languages is often referred to as "concatenating" text. +--- + +!! What is Wrong + You might, for instance want to set up a template for your customer database, where links will automatically refer to additional contact information about your customer. Inside your tiddler, you might try something like this: <<.bad-example "`[[Additional Info|<<currentTiddler>>-Contact]]`">> diff --git a/editions/tw5.com/tiddlers/howtos/Constructing JSON tiddlers.tid b/editions/tw5.com/tiddlers/howtos/Constructing JSON tiddlers.tid index ff4c7927c..93d78ac16 100644 --- a/editions/tw5.com/tiddlers/howtos/Constructing JSON tiddlers.tid +++ b/editions/tw5.com/tiddlers/howtos/Constructing JSON tiddlers.tid @@ -1,5 +1,5 @@ created: 20220427174702859 -modified: 20230809113620964 +modified: 20230922122551197 tags: [[JSON in TiddlyWiki]] Learning title: Constructing JSON tiddlers @@ -13,4 +13,4 @@ At a high level, we have several ways to generate JSON data in TiddlyWiki's own * [[jsontiddler Macro]] * [[jsontiddlers Macro]] -When constructing JSON data manually, the [[stringify Operator]] is needed to ensure that any special characters are properly escaped. +When constructing JSON data manually, the [[jsonstringify Operator]] is needed to ensure that any special characters are properly escaped. diff --git a/editions/tw5.com/tiddlers/images/New Release Banner.png b/editions/tw5.com/tiddlers/images/New Release Banner.png index daa1db094..6577e8923 100644 Binary files a/editions/tw5.com/tiddlers/images/New Release Banner.png and b/editions/tw5.com/tiddlers/images/New Release Banner.png differ diff --git a/editions/tw5.com/tiddlers/macros/CoreMacros.tid b/editions/tw5.com/tiddlers/macros/CoreMacros.tid index 56d43bd2f..01879e3ac 100644 --- a/editions/tw5.com/tiddlers/macros/CoreMacros.tid +++ b/editions/tw5.com/tiddlers/macros/CoreMacros.tid @@ -5,4 +5,4 @@ type: text/vnd.tiddlywiki The following [[macros|Macros]] are built into ~TiddlyWiki's core: -<<list-links "[tag[Core Macros]]">> +<<list-links "[tag[Core Macros]]" class:"multi-columns">> diff --git a/editions/tw5.com/tiddlers/macros/TagMacro.tid b/editions/tw5.com/tiddlers/macros/TagMacro.tid index eda75dcb9..f90eb44b7 100644 --- a/editions/tw5.com/tiddlers/macros/TagMacro.tid +++ b/editions/tw5.com/tiddlers/macros/TagMacro.tid @@ -1,6 +1,6 @@ caption: tag created: 20141206130540337 -modified: 20230725201240201 +modified: 20240228131301798 tags: Macros [[Core Macros]] title: tag Macro type: text/vnd.tiddlywiki @@ -11,7 +11,35 @@ The <<.def tag>> [[macro|Macros]] generates a tag pill for a specified tag. Clic !! Parameters -;tag +; tag : The title of the tag, defaulting to the [[current tiddler|Current Tiddler]] +!! CSS classes + +<<.from-version "v5.3.4">> + +; `tc-tag-missing` +: This class is defined if a tag does ''not exist'' as a tiddler. + +; `tc-tag-exists` +: This class is defined if a tag does exist as a tiddler + +!!! Defining the class + +To define the `tc-tag-missing` class a stylesheet tiddler needs to be created. The default font-style for missing tiddler links is //italic//, so it's used for the example code below. Eg: + +''title:'' `myTagsStylesheet`<br> +''tag:'' `$:/tags/Stylesheet` + +<<copy-to-clipboard-above-right src:""" +.tc-tag-missing { + font-style: italic; +} +""">> +``` +.tc-tag-missing { + font-style: italic; +} +``` + <<.macro-examples "tag">> diff --git a/editions/tw5.com/tiddlers/macros/examples/tag.tid b/editions/tw5.com/tiddlers/macros/examples/tag.tid index 103a5eab7..fbbeffb8e 100644 --- a/editions/tw5.com/tiddlers/macros/examples/tag.tid +++ b/editions/tw5.com/tiddlers/macros/examples/tag.tid @@ -1,5 +1,5 @@ created: 20150221211317000 -modified: 20230725203751870 +modified: 20240228131331605 tags: [[tag Macro]] [[Macro Examples]] title: tag Macro (Examples) type: text/vnd.tiddlywiki @@ -7,22 +7,26 @@ type: text/vnd.tiddlywiki <$macrocall $name=".example" n="1" eg="""<<tag>>"""/> <$macrocall $name=".example" n="2" eg="""<<tag Concepts>>"""/> +The Following tag can be shown with a font-style: //italic// if the corresponding stylesheet exists. See: [[tag Macro]] + +<$macrocall $name=".example" n="3" eg="""<<tag "Does not exist">>"""/> + If a [[list widget|ListWidget]] generates multiple tag macros for the same tag, clicking any of them opens dropdowns on all of them, as in the example below. This is usually unwanted. -<$macrocall $name=".example" n="3" eg="""<$list filter="[tag[HelloThere]]"> +<$macrocall $name=".example" n="4" eg="""<$list filter="[tag[HelloThere]]"> * <$link/> is tagged with: <$list filter="[<currentTiddler>tags[]]"> <<tag>> </$list> </$list>"""/> Adding the `counter="transclusion"` attribute to the list widget that generates multiple identical tag macros causes each of them to be identified as a unique one. Clicking on any of them opens only a single dropdown. -<$macrocall $name=".example" n="4" eg="""<$list filter="[tag[HelloThere]]" counter="transclusion"> +<$macrocall $name=".example" n="5" eg="""<$list filter="[tag[HelloThere]]" counter="transclusion"> * <$link/> is tagged with: <$list filter="[<currentTiddler>tags[]]"> <<tag>> </$list> </$list>"""/> A slightly more performant option is to use the `variable="transclusion"` attribute in the list widget. In this case, the variable `<<transclusion>>` has to be used inside the list widget instead of the `<<currentTiddler>>` . -<$macrocall $name=".example" n="5" eg="""<$list filter="[tag[HelloThere]]" variable="transclusion"> +<$macrocall $name=".example" n="6" eg="""<$list filter="[tag[HelloThere]]" variable="transclusion"> * <$link to=<<transclusion>>/> is tagged with: <$list filter="[<transclusion>tags[]]"> <<tag>> </$list> diff --git a/editions/tw5.com/tiddlers/macros/import/tags-of-current-tiddler.tid b/editions/tw5.com/tiddlers/macros/import/tags-of-current-tiddler.tid index 860ad33db..da7214b0c 100644 --- a/editions/tw5.com/tiddlers/macros/import/tags-of-current-tiddler.tid +++ b/editions/tw5.com/tiddlers/macros/import/tags-of-current-tiddler.tid @@ -1,6 +1,7 @@ code-body: yes created: 20150221145803000 +modified: 20240310124126491 title: $:/editions/tw5.com/macro-examples/tags-of-current-tiddler type: text/vnd.tiddlywiki -\define tags-of-current-tiddler() {{!!tags}} +\procedure tags-of-current-tiddler() {{!!tags}} diff --git a/editions/tw5.com/tiddlers/macros/import/tv-get-export-image-link.tid b/editions/tw5.com/tiddlers/macros/import/tv-get-export-image-link.tid index 56a3b9dd7..ebf879fa9 100644 --- a/editions/tw5.com/tiddlers/macros/import/tv-get-export-image-link.tid +++ b/editions/tw5.com/tiddlers/macros/import/tv-get-export-image-link.tid @@ -1,6 +1,7 @@ +code-body: yes created: 20150228123855000 -modified: 20150228123921000 +modified: 20240310133309881 title: $:/editions/tw5.com/macro-examples/tv-get-export-image-link type: text/vnd.tiddlywiki -\define tv-get-export-image-link(src) https://www.tiddlywiki.com/$src$ +\function tv-get-export-image-link(src) [[https://www.tiddlywiki.com/$(src)$]substitute[]] diff --git a/editions/tw5.com/tiddlers/macros/import/tv-wikilink-tooltip.tid b/editions/tw5.com/tiddlers/macros/import/tv-wikilink-tooltip.tid index 9687f4b15..e4884c95d 100644 --- a/editions/tw5.com/tiddlers/macros/import/tv-wikilink-tooltip.tid +++ b/editions/tw5.com/tiddlers/macros/import/tv-wikilink-tooltip.tid @@ -1,8 +1,9 @@ code-body: yes created: 20150228120252000 +modified: 20240310124217005 title: $:/editions/tw5.com/macro-examples/tv-wikilink-tooltip type: text/vnd.tiddlywiki -\define tv-wikilink-tooltip() +\procedure tv-wikilink-tooltip() <$transclude field="tooltip">(<$transclude field="caption"/>)</$transclude> \end diff --git a/editions/tw5.com/tiddlers/macros/syntax/Macro Call Syntax.tid b/editions/tw5.com/tiddlers/macros/syntax/Macro Call Syntax.tid index 846200cc9..f070bbeac 100644 --- a/editions/tw5.com/tiddlers/macros/syntax/Macro Call Syntax.tid +++ b/editions/tw5.com/tiddlers/macros/syntax/Macro Call Syntax.tid @@ -1,9 +1,13 @@ created: 20150221105732000 modified: 20150221222352000 -tags: [[Macro Syntax]] +tags: [[Macro Syntax]] $:/deprecated title: Macro Call Syntax type: text/vnd.tiddlywiki +<<.deprecated-since "5.3.0" "Procedure Call Syntax">> + +---------- + <<.preamble """What follows is a formal presentation of the syntax of the WikiText syntax for macro calls, using [[railroad diagrams|Railroad Diagrams]]. A [[simpler overview|Macro Calls in WikiText]] is also available.""">> <$railroad text=""" diff --git a/editions/tw5.com/tiddlers/macros/syntax/Macro Definition Syntax.tid b/editions/tw5.com/tiddlers/macros/syntax/Macro Definition Syntax.tid index 81877b3a5..ecc389d54 100644 --- a/editions/tw5.com/tiddlers/macros/syntax/Macro Definition Syntax.tid +++ b/editions/tw5.com/tiddlers/macros/syntax/Macro Definition Syntax.tid @@ -1,9 +1,13 @@ created: 20150220200255000 modified: 20150221222349000 -tags: [[Macro Syntax]] +tags: [[Macro Syntax]] $:/deprecated title: Macro Definition Syntax type: text/vnd.tiddlywiki +<<.deprecated-since "5.3.0" "Procedure Definition Syntax">> + +---------- + <<.preamble """What follows is a formal presentation of the syntax of the `\define` pragma, using [[railroad diagrams|Railroad Diagrams]]. A [[simpler overview|Macro Definitions in WikiText]] is also available.""">> <$railroad text=""" diff --git a/editions/tw5.com/tiddlers/macros/syntax/Procedure Call Syntax.tid b/editions/tw5.com/tiddlers/macros/syntax/Procedure Call Syntax.tid new file mode 100644 index 000000000..c7ab07644 --- /dev/null +++ b/editions/tw5.com/tiddlers/macros/syntax/Procedure Call Syntax.tid @@ -0,0 +1,33 @@ +created: 20240310165023000 +modified: 20240310172648116 +tags: [[Procedure Syntax]] +title: Procedure Call Syntax +type: text/vnd.tiddlywiki + +<<.preamble """What follows is a formal presentation of the syntax of the WikiText syntax for procedure calls, using [[railroad diagrams|Railroad Diagrams]].""">> + +!! procedure-name + +<$railroad text=""" +"<<" [[ procedure-name |Procedures]] [: [[whitespace|"Filter Whitespace"]] [:{param-value}] ]">>" +"""/> + +* The [[procedure's|Procedures]] <<.place procedure-name>> is a sequence of non-whitespace characters other than `(` or `>`. + +* <<.place whitespace>> denotes a sequence of [[whitespace characters|Filter Whitespace]]. + +!!! param-value + +Each ''individual'' <<.place param-value>> has the following syntax: + +<$railroad text=""" +\start none +\end none +[: param-name [:[[whitespace|"Filter Whitespace"]]] ":" [:[[whitespace|"Filter Whitespace"]]] ] value [: [[whitespace|"Filter Whitespace"]] ] +"""/> + +* The <<.place param-name>> is a sequence of letters (`A`--`Z`, `a`--`z`), digits (`0`--`9`), hyphens (`-`) and underscores (`_`). + +* The <<.place value>> is specified as follows: + +<$railroad text={{$:/editions/tw5.com/railroad/macro-parameter-value}}/> diff --git a/editions/tw5.com/tiddlers/macros/syntax/Procedure Definition Syntax.tid b/editions/tw5.com/tiddlers/macros/syntax/Procedure Definition Syntax.tid new file mode 100644 index 000000000..7a621ee59 --- /dev/null +++ b/editions/tw5.com/tiddlers/macros/syntax/Procedure Definition Syntax.tid @@ -0,0 +1,93 @@ +created: 20240310165023000 +modified: 20240310175033730 +tags: [[Procedure Syntax]] +title: Procedure Definition Syntax +type: text/vnd.tiddlywiki + +<<.preamble """What follows is a formal presentation of the syntax of the [[Pragma: \procedure]], using [[railroad diagrams|Railroad Diagrams]]. """>> + +! \procedure + +There are 2 types of procedure definitions + +* Single line definitions +* Multi line definitions + +!! Single Line + +Single line definitions should only be used for very short bodies, where the procedure name, params and the body fit into 1 line terminated with a line-feed. + +<$railroad text=""" +"\procedure" +[[<"space">|"Filter Whitespace"]] +"procedure-name" +<"(params)"> +[:[[<"space">|"Filter Whitespace"]]] +"body" +"lf" +"""/> + +!! Multi Line + +The majority of procedure definitions will have a body, that spans over several lines of wikitext. Those procedure definitions are terminated using the "\end" pragma + +<$railroad text=""" +"\procedure" +[[<"space">|"Filter Whitespace"]] +"procedure-name" +<"(params)"> +[:[[<"space">|"Filter Whitespace"]]] +body +"\end" +"""/> + +The [[procedure-name|Procedures]] is a sequence of non-whitespace characters other than `(` or `>`. + + +* <<.place procedure-name>> is a sequence of letters (`A`--`Z`, `a`--`z`), digits (`0`--`9`), hyphens (`-`) and underscores (`_`) +* <<.place body>> is wikitext including [[nested procedures|Pragma: \procedure]] +* <<.place space>> denotes a sequence of [[whitespace characters|Filter Whitespace]] + +!! params + +The parameter declaration list <<.place (params)>> has the following syntax: + +<$railroad text=""" +\start none +\end none +"(" [:"sep"] [:{ parameter "sep" }] ")" +"""/> + +* <<.place sep>> is any sequence of characters that does not match a <<.place param-name>>. <br>Among other things, this includes commas, spaces and linefeeds. + + +Each ''individual'' <<.place parameter>> has the following syntax: + +<$railroad text=""" +\start none +\end none +"param-name" [: [:[[<"space">|"Filter Whitespace"]]] ":" [:[[<"space">|"Filter Whitespace"]]] default ] +"""/> + +* <<.place param-name>> is a sequence of letters (`A`--`Z`, `a`--`z`), digits (`0`--`9`), hyphens (`-`) and underscores (`_`). + +* <<.place default>> is an optional value of a parameter is specified as follows: + +<$railroad text={{$:/editions/tw5.com/railroad/macro-parameter-value}}/> + +!! body + +The <<.place body>> of the definition has the following syntax: + +<$railroad text=""" +\start none +\end none +{[[<"wikitext">|WikiText]] "lf"} +"""/> + +* <<.place wikitext>> is any sequence of characters that doesn't terminate the macro definition. +** If [[nested procedures|Pragma: \procedure]] are used they need to be at the start of the wikitext. There are the same rules as if the wikitext would be in a tiddler. +** Pragmas need to be before standard wikitext. + +* <<.place lf>> denotes a linefeed. + diff --git a/editions/tw5.com/tiddlers/macros/syntax/Procedure Syntax.tid b/editions/tw5.com/tiddlers/macros/syntax/Procedure Syntax.tid new file mode 100644 index 000000000..2ef519fcc --- /dev/null +++ b/editions/tw5.com/tiddlers/macros/syntax/Procedure Syntax.tid @@ -0,0 +1,11 @@ +created: 20240310165023000 +modified: 20240310173318213 +tags: Procedures +title: Procedure Syntax +type: text/vnd.tiddlywiki + +Plain text description can be found at [[Procedures]] + +<<list-links filter:"[tag[Procedure Syntax]]">> + +<<.tip "The railroad boxes in the linked tiddlers can be used to navigate.">> diff --git a/editions/tw5.com/tiddlers/macros/tag-picker_Macro.tid b/editions/tw5.com/tiddlers/macros/tag-picker_Macro.tid index bd67256c9..612b9365a 100644 --- a/editions/tw5.com/tiddlers/macros/tag-picker_Macro.tid +++ b/editions/tw5.com/tiddlers/macros/tag-picker_Macro.tid @@ -1,6 +1,6 @@ caption: tag-picker created: 20161128191316701 -modified: 20161128191435641 +modified: 20230616114543787 tags: Macros [[Core Macros]] title: tag-picker Macro type: text/vnd.tiddlywiki @@ -9,9 +9,17 @@ The <<.def tag-picker>> [[macro|Macros]] generates a combination of a text box a !! Parameters -;actions -: Action widgets to be triggered when the pill is clicked. Within the text, the variable ''tag'' contains the title of the selected tag. -;tagField -: <<.from-version 5.1.23>> The ''field'' that gets updated with the selected tag. Defaults to ''tags''. +; actions +: Action widgets to be triggered when the pill is clicked. Within the text, the variable <<.var tag>> contains the title of the selected tag. + +; tagField +: <<.from-version 5.1.23>> The specified ''field'' that gets updated with the selected tag. Defaults to `tags`. + +; tiddler +: <<.from-version 5.3.4>> Defines the target tiddler, which should be manipulated. Defaults to: <<.var currentTiddler>>. + +; tagListFilter +: <<.from-version 5.3.4>> This parameter defaults to: `[tags[]]` which creates a list of all existing tags. If the tag list should come from a different source the filter should look similar to eg: `[<listSource>get[field-name]enlist-input[]]`. + <<.macro-examples "tag-picker">> diff --git a/editions/tw5.com/tiddlers/mechanisms/RefreshThrottling.tid b/editions/tw5.com/tiddlers/mechanisms/RefreshThrottling.tid index 344cd0ee7..5ae3d9645 100644 --- a/editions/tw5.com/tiddlers/mechanisms/RefreshThrottling.tid +++ b/editions/tw5.com/tiddlers/mechanisms/RefreshThrottling.tid @@ -12,6 +12,6 @@ The rules governing refresh throttling are: ** Has the field `draft.of` ** Has the field `throttle.refresh` ** Has a title prefixed with `$:/temp/volatile/` -* If the refresh cycle is to be throttled, a timer is set for the internal specified in [[$:/config/Drafts/TypingTimeout|Hidden Setting: Typing Refresh Delay]] (cancelling any preciously set timer) +* If the refresh cycle is to be throttled, a timer is set for the internal specified in [[$:/config/Drafts/TypingTimeout|Hidden Setting: Typing Refresh Delay]] (cancelling any previously set timer) ** When the timer fires, the refresh cycle is triggered, passing the aggregated titles of all the deferred refresh cycles diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-delete-tiddler.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-delete-tiddler.tid index 879faaa10..b3d95e7e5 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-delete-tiddler.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-delete-tiddler.tid @@ -11,4 +11,6 @@ The `tm-delete-tiddler` message deletes the specified tiddler and removes it fro |param |Title of the tiddler that is to be deleted | |tiddlerTitle |Fallback title that is used if ''param'' isn't specified (automatically set by the ButtonWidget) | -The delete tiddler message is usually generated with the ButtonWidget and is handled by the NavigatorWidget. \ No newline at end of file +The delete tiddler message is usually generated with the ButtonWidget and is handled by the NavigatorWidget. + +Use the [[ActionDeleteTiddlerWidget]] to delete a named tiddler without getting the "Do you wish to delete the tiddler" prompt. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Basic Authentication.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Basic Authentication.tid new file mode 100644 index 000000000..e16428d4a --- /dev/null +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Basic Authentication.tid @@ -0,0 +1,34 @@ +title: WidgetMessage: tm-http-request Example - Basic Authentication +tags: $:/tags/Global + + +!! HTTP Basic Authentication + +[[HTTP Basic Authentication|https://en.wikipedia.org/wiki/Basic_access_authentication]] is a simple scheme for HTTP clients pass a username and password to an HTTP server. + +The credentials are passed via the "Authorization" header as the string "Basic " (note the space) followed by the base64-encoded username and password joined with a colon. + +Here is a simple, illustrative example: + +``` +\procedure get-tiddler-list-from-tiddlywiki-server(url,username,password) + \procedure completion-get-json() + \import [subfilter{$:/core/config/GlobalImportFilter}] + <$action-log msg="In completion-get-json"/> + <$action-log/> + \end completion-get-json + <$action-sendmessage + $message="tm-http-request" + url=<<url>> + method="GET" + header-Authorization={{{ [<username>addsuffix[:]addsuffix<password>encodebase64[]addprefix[Basic ]] }}} + oncompletion=<<completion-get-json>> + /> +\end get-tiddler-list-from-tiddlywiki-server + +<$button> +<<get-tiddler-list-from-tiddlywiki-server url:"http://127.0.0.1:8080" username:"Joe" password:"Bloggs">> +Download +</$button> +``` + diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Random Dog.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Random Dog.tid index 958c31bae..892b4926f 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Random Dog.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Random Dog.tid @@ -1,5 +1,5 @@ title: WidgetMessage: tm-http-request Example - Random Dog -tags: $:/tags/Global +tags: $:/tags/Macro $:/tags/Global \procedure download-dog(url) diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Zotero.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Zotero.tid index c26eb9895..78a3a0651 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Zotero.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Zotero.tid @@ -1,5 +1,5 @@ title: WidgetMessage: tm-http-request Example - Zotero -tags: $:/tags/Global +tags: $:/tags/Macro $:/tags/Global \procedure select-zotero-group() Specify the Zotero group ID to import diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid index e370ad72c..d2dd6eed7 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid @@ -51,3 +51,4 @@ Note that the state tiddler $:/state/http-requests contains a number representin * [[Zotero's|https://www.zotero.org/]] API for retrieving reference items: [[WidgetMessage: tm-http-request Example - Zotero]] * [[Random Dog's|https://random.dog/]] API for retrieving random pictures of dogs showing how to retrieve binary data: [[WidgetMessage: tm-http-request Example - Random Dog]] +* Example of using HTTP Basic Authentication: [[WidgetMessage: tm-http-request Example - Basic Authentication]] diff --git a/editions/tw5.com/tiddlers/nodejs/Naming of System Tiddlers.tid b/editions/tw5.com/tiddlers/nodejs/Naming of System Tiddlers.tid index f677c6cee..ff1a79c78 100644 --- a/editions/tw5.com/tiddlers/nodejs/Naming of System Tiddlers.tid +++ b/editions/tw5.com/tiddlers/nodejs/Naming of System Tiddlers.tid @@ -1,5 +1,5 @@ created: 20140112190154121 -modified: 20140912142655205 +modified: 20240202121048363 tags: SystemTiddlers title: Naming of System Tiddlers type: text/vnd.tiddlywiki @@ -17,11 +17,11 @@ The system tiddlers provided as part of the core are named according to the foll |`$:/core/wiki/*` |lowercase |Metadata about the entire wiki | |`$:/docs/*` |lowercase |Documentation tiddlers | |`$:/messages/*` |~CamelCase |System messages | -|`$:/plugins/*` |lowercase |Plugin tiddlers, and plugin content | +|`$:/plugins/*` |lowercase |[[Plugin|Plugins]] tiddlers, and plugin content | |`$:/snippets/*` |//inconsistent// |Reusable snippets (will be replaced by macros) | -|`$:/state/*` |lowercase |User interface state tiddlers | +|`$:/state/*` |lowercase |User interface state tiddlers (see StateMechanism) | |`$:/tags/*` |~CamelCase |User interface configuration tags | -|`$:/temp/*` |lowercase |Temporary tiddlers that shouldn't be saved | +|`$:/temp/*` |lowercase |[[Temporary tiddlers|Temporary Tiddlers]] that shouldn't be saved | |`$:/themes/*` |lowercase |Theme plugins | In the format column: diff --git a/editions/tw5.com/tiddlers/pragmas/Pragma_ _define.tid b/editions/tw5.com/tiddlers/pragmas/Pragma_ _define.tid index 6058b7905..883f1e450 100644 --- a/editions/tw5.com/tiddlers/pragmas/Pragma_ _define.tid +++ b/editions/tw5.com/tiddlers/pragmas/Pragma_ _define.tid @@ -1,5 +1,5 @@ created: 20220917112233317 -modified: 20230419103154328 +modified: 20231217185535715 tags: Pragmas title: Pragma: \define type: text/vnd.tiddlywiki @@ -48,4 +48,6 @@ $caption$ <<special-button>> """>> +<<.warning """If macros are nested, textual substitution will only occur for the outermost macro. Thi is because by the time the inner macros are processed all the substitutions will have already occurred""">> + A more formal [[presentation|Macro Definition Syntax]] of this syntax is also available. diff --git a/editions/tw5.com/tiddlers/procedures/Procedures.tid b/editions/tw5.com/tiddlers/procedures/Procedures.tid index 15b422647..8c80e61f5 100644 --- a/editions/tw5.com/tiddlers/procedures/Procedures.tid +++ b/editions/tw5.com/tiddlers/procedures/Procedures.tid @@ -1,5 +1,5 @@ created: 20221007124007426 -modified: 20230419103154329 +modified: 20240310173130052 tags: Concepts Reference title: Procedures type: text/vnd.tiddlywiki @@ -18,11 +18,13 @@ The name wrapped in double angled [[brackets|Brackets]] is used a shorthand way ``` <<my-procedure>> -<<my-procedure "The parameter">> +<<my-procedure parameter:"The parameter">> ``` The parameters that are specified in the procedure call are made available as variables. +<<.tip """If a procedure has more than 1 parameter, it is highly encouraged to use "named parameters", as shown in the second example above. Even if it is more to type, it will pay off in the long run.""">> + !! How Procedures Work Procedures are implemented as a special kind of [[variable|Variables]]. The only thing that distinguishes them from ordinary variables is the way that the parameters are handled. @@ -32,4 +34,4 @@ Procedures are implemented as a special kind of [[variable|Variables]]. The only * [[Procedure Definitions]] describes how to create procedures * [[Procedure Calls]] describes how to use procedures * [[Procedure Parameter Handling]] describes how procedure parameters work - +* [[Procedure Syntax]] is a formal syntax description using railroad diagrams diff --git a/editions/tw5.com/tiddlers/releasenotes/BetaReleases.tid b/editions/tw5.com/tiddlers/releasenotes/BetaReleases.tid index c7c815ec9..aa16ab7b2 100644 --- a/editions/tw5.com/tiddlers/releasenotes/BetaReleases.tid +++ b/editions/tw5.com/tiddlers/releasenotes/BetaReleases.tid @@ -1,9 +1,9 @@ created: 20131109105400007 -modified: 20211117230125737 +modified: 20231220113054682 tags: Releases BetaReleaseNotes title: BetaReleases type: text/vnd.tiddlywiki Here are the details of the beta releases of TiddlyWiki5. See [[TiddlyWiki5 Versioning]] for details of how releases are named. -<<tabs "[tag[BetaReleaseNotes]!sort[created]]" "Release 5.0.18-beta" "$:/state/tab2" "tc-vertical" "ReleaseTemplate">> +<<tabs "[tag[BetaReleaseNotes]!sort[created]] -[<currentTiddler>]" "Release 5.0.18-beta" "$:/state/tab2" "tc-vertical" "ReleaseTemplate">> diff --git a/editions/prerelease/tiddlers/Release 5.3.2.tid b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid similarity index 94% rename from editions/prerelease/tiddlers/Release 5.3.2.tid rename to editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid index 4c7bc8874..e2f3637cb 100644 --- a/editions/prerelease/tiddlers/Release 5.3.2.tid +++ b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid @@ -1,13 +1,19 @@ caption: 5.3.2 -created: 20231016122502955 -modified: 20231016122502955 +created: 20231213080637781 +modified: 20231213080637781 +released: 20231213080637781 tags: ReleaseNotes title: Release 5.3.2 type: text/vnd.tiddlywiki description: Under development -//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.1...master]]// +//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.1...v5.3.2]]// +<<.banner-credits + credit:"""Congratulations to [[catter-fly|https://talk.tiddlywiki.org/u/catter-fly]] for their winning design for the banner for this release (here is the [[competition thread|https://talk.tiddlywiki.org/t/banner-image-competition-for-v5-3-2/8569]]). +""" + url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/51862f812851afda0ed3540f8463f51def0d4f9a/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png" +>> ! Major Improvements !! Conditional Shortcut Syntax @@ -113,7 +119,6 @@ Improvements to the following translations: ! Bug Fixes -* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7665">> `{{}}` generating a recursion error * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7758">> ordering of Vanilla stylesheets * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/fa9bfa07a095548eb2f8339b0b1b816d2e6794ef">> missing closing tag in tag-pill-inner macro * <<.link-badge-removed "https://github.com/Jermolene/TiddlyWiki5/issues/7732">> invalid "type" attribute from textarea elements generated by the EditTextWidget diff --git a/editions/tw5.com/tiddlers/releasenotes/Release 5.3.3.tid b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.3.tid new file mode 100644 index 000000000..b6d1cc451 --- /dev/null +++ b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.3.tid @@ -0,0 +1,30 @@ +caption: 5.3.3 +created: 20231223102201587 +modified: 20231223102201587 +released: 20231223102201587 +tags: ReleaseNotes +title: Release 5.3.3 +type: text/vnd.tiddlywiki +description: Under development + +//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.2...v5.3.3]]// + +<<.banner-credits + credit:"""Congratulations to [[catter-fly|https://talk.tiddlywiki.org/u/catter-fly]] for their winning design for the banner for this release (here is the [[competition thread|https://talk.tiddlywiki.org/t/banner-image-competition-for-v5-3-2/8569]]). +""" + url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/5cb31b7adb0a6b226c0c215ddbed62e297ce89e1/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png" +>> + +This is a bug fix release to address a number of bugs that were introduced with [[Release 5.3.2]]. + +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7903">> handling of a list widget with an empty paragraph as inline template +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7900">> broken per-tiddler previews +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7897">> missing comma before skinny tiddlers in JSON store area +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7895">> handling of whitespace immediately after pragmas +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7905">> SelectWidget handling of classes and rendering typo + +Since v5.3.3 replaces v5.3.2 after only a couple of weeks, here is the release note for v5.3.2. + +! Release Note for v5.3.2 + +{{Release 5.3.2}} \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/releasenotes/alpha/AlphaReleases.tid b/editions/tw5.com/tiddlers/releasenotes/alpha/AlphaReleases.tid index 4e2a6a451..0797ad7e0 100644 --- a/editions/tw5.com/tiddlers/releasenotes/alpha/AlphaReleases.tid +++ b/editions/tw5.com/tiddlers/releasenotes/alpha/AlphaReleases.tid @@ -1,9 +1,9 @@ created: 20131109105400007 -modified: 20211117225858830 +modified: 20231220113044942 tags: Releases AlphaReleaseNotes title: AlphaReleases type: text/vnd.tiddlywiki Here are the details of the alpha releases of TiddlyWiki5. See [[TiddlyWiki5 Versioning]] for details of how releases are named. -<<tabs "[tag[AlphaReleaseNotes]!sort[created]]" "Release 5.0.1-alpha" "$:/state/tab2" "tc-vertical" "ReleaseTemplate">> +<<tabs "[tag[AlphaReleaseNotes]!sort[created]] -[<currentTiddler>]" "Release 5.0.1-alpha" "$:/state/tab2" "tc-vertical" "ReleaseTemplate">> diff --git a/editions/tw5.com/tiddlers/saving/Saving with FireFox.tid b/editions/tw5.com/tiddlers/saving/Saving with FireFox.tid new file mode 100644 index 000000000..b64f695c4 --- /dev/null +++ b/editions/tw5.com/tiddlers/saving/Saving with FireFox.tid @@ -0,0 +1,17 @@ +caption: Saving with FireFox +created: 20230803205140949 +modified: 20230803213246739 +tags: Saving Firefox +title: Saving with FireFox + +# Restart [[Firefox]] +# [[Download]] an empty TiddlyWiki by clicking this button: +#> {{$:/editions/tw5.com/snippets/download-empty-button}} +# Locate the file you just downloaded +#* You may rename it, but be sure to keep the `.html` or `.htm` extension +# Open the file in [[Firefox]] + +# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button +# Save your changes by clicking the <<.icon $:/core/images/save-button-dynamic>> ''save changes'' button in the sidebar +#* Look for the yellow notification ''Saved wiki'' at the top right of the window +# Refresh the browser window to verify that your changes have been saved correctly diff --git a/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox.tid b/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox.tid index e944ea19e..86c6a35b5 100644 --- a/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox.tid +++ b/editions/tw5.com/tiddlers/saving/Saving with TiddlyFox.tid @@ -5,26 +5,9 @@ created: 20131221085742684 delivery: Browser Extension description: Browser extension for older versions of Firefox method: save -modified: 20200507105421421 +modified: 20230806001436106 tags: Saving Firefox title: Saving with TiddlyFox type: text/vnd.tiddlywiki -If you're using [[Firefox for Android]], see the instructions for [[Saving with TiddlyFox on Android]]. - -# Ensure you have a version of Firefox before version 57. ~TiddlyFox will not work with Firefox 57 and on. For Firefox 57 and on, consider using the following instead: <<list-links filter:"[tag[Firefox]delivery[Browser Extension]] -[[Saving with TiddlyFox]]">> -# Install the latest release of the TiddlyFox extension from: -#* https://addons.mozilla.org/en-GB/firefox/addon/tiddlyfox/ -# Restart [[Firefox]] -# [[Download]] an empty TiddlyWiki by clicking this button: -#> {{$:/editions/tw5.com/snippets/download-empty-button}} -# Locate the file you just downloaded -#* You may rename it, but be sure to keep the `.html` or `.htm` extension -# Open the file in [[Firefox]] -#* If you are using TiddlyFox v1.x.x, you will need to click ''OK'' in response to the prompt from TiddlyFox that asks whether to enable saving for this file -#* If you are using TiddlyFox v2.x.x you will need to click on the icon of a kitten standing on a blue globe to activate saving. There is no prompt in v2.0.1. -#** For TiddlyFox v2.0.1, you can not be using Private Browsing mode nor can you be using "Never Remember History". -# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button -# Save your changes by clicking the <<.icon $:/core/images/save-button-dynamic>> ''save changes'' button in the sidebar -#* Look for the yellow notification ''Saved wiki'' at the top right of the window -# Refresh the browser window to verify that your changes have been saved correctly +<<.deprecated-since "FireFox 57" "Saving with FireFox">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid b/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid index ac5d4ea19..3c0a113e7 100644 --- a/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid +++ b/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid @@ -1,174 +1,199 @@ created: 20150110182600000 -modified: 20230325161424684 +modified: 20240224170607731 tags: [[Improving TiddlyWiki Documentation]] title: Documentation Macros type: text/vnd.tiddlywiki The following macros are used throughout ~TiddlyWiki's documentation. Their names start with a dot to keep them out of the way of names that a user might try experimenting with. -!General +! General -|!Macro |!Used for |!Example | -|.def |the defining instance of a term |<<.def widget>> | -|.em |minor emphasis within a sentence |<<.em not>> | -|.place |a placeholder for the user to fill in |<<.place tagname>> | -|.strong |major emphasis within a tiddler |<<.strong Important!>> | -|.word |a mention of an ordinary word or phrase |<<.word "hello world">> | -|.icon |an icon, sized to match the surrounding text |<<.icon "$:/core/images/globe">> | +|Macro |Used for |Example |Rendered|h +|.def |the defining instance of a term |`<<.def widget>>` |<<.def widget>> | +|.em |minor emphasis within a sentence |`<<.em not>>` |<<.em not>> | +|.place |a placeholder for the user to fill in |`<<.place tagname>>` |<<.place tagname>> | +|.strong |major emphasis within a tiddler |`<<.strong Important!>>` |<<.strong Important!>> | +|.word |a mention of an ordinary word or phrase |`<<.word "hello world">>` |<<.word "hello world">> | +|.icon |an icon, sized to match the surrounding text |`<<.icon "$:/core/images/globe">>` |<<.icon "$:/core/images/globe">> | -!Advice +! Textboxes -|!Macro |!Used for |!Example | -|^.tip |^hints and tips |<<.tip "Turn your screen on, otherwise<br>you won't be able to see much.">> | -|^.warning |^warning advice |<<.warning "Make a backup of your file<br>before you upgrade.">> | +!! Textbox Parameters -!Blocks -|!Macro |!Used for | -|.preamble |an introductory sentence that stands apart from the rest of the tiddler | +; text +: Text to be shown in the box -!Tiddlers and fields +; title +: A title shown as an HTML STRONG element -|!Macro |!Used for |!Example | -|.tid |a tiddler title |<<.tid Example>> | -|.tag |a tag |<<.tag Example>> | -|.field |a field name |<<.field example>> | -|.value |a field value |<<.value "example value">> | -|.op |a filter operator |<<.op backlinks>> | -|.var |a variable or macro name |<<.var currentTiddler>> | -|.wid |a widget name |<<.wid list>> | -|.attr |an attribute name |<<.attr filter>> | -|.param |a macro parameter name |<<.param text>> | -|.tiddler-fields |a list of tiddler fields |<<.tiddler-fields "Monday">> | +; icon +: Core icons can be found at [[Icon Gallery]] + +; class +: An optional custom class can be added to the text block. It will overwrite the defaults. To keep the defaults, ''add them'' to the custom class settings. +: ''.note''-macro defaults to `doc-note` +: ''.tip''-macro defaults to `doc-tip` +: ''.warning''-macro defaults to `doc-warning` + +!! Textbox Examples + +|Macro |Used for |Example |Renderd |h +|^.infoBox |^Text-box with an icon |`<<.infoBox text:"A generic ...">>` |<<.infoBox "A generic text box, with an optional title and a custom icon">> | +|^.note|^Infos with a title |`<<.note text:"Some text ...">>` |<<.note "Some text in a box with a title by default">> | +|^.tip |^hints and tips |`<<.tip text:"Eg: Turn ...">>` |<<.tip "Eg: Turn your screen on, otherwise<br>you won't be able to see much.">> | +|^.warning |^warning advice |`<<.warning text:"Eg: Make a backup ...">>` |<<.warning "Eg: Make a backup of your file<br>before you upgrade.">> | -!Links -|!Macro |!Used for |!Example | -|.link |a link containing WikiText |<<.link "^^an^^ ~~example~~" Example>> | -|.clink |a code link |<<.clink `<$list>` ListWidget>> | -|.dlink |a link on a defining instance of a term |<<.dlink widget Widgets>> | -|.dlink-ex |an external link on a defining instance of a term |<<.dlink-ex Example "http://example.com/">> | -|.flink |a link to a field |<<.flink ListField>> | -|.mlink |a link to a macro |<<.mlink qualify>> | -|.mlink2 |a link to a macro, with specified target |<<.mlink2 foo "Examples of Macros">> | -|.olink |a link to an operator |<<.olink prefix>> | -|.olink2 |a link to an operator, with specified target |<<.olink2 foo prefix>> | -|.vlink |a link to a variable |<<.vlink currentTiddler>> | -|.vlink2 |a link to a variable, with specified target |<<.vlink2 foo "Examples of Variables">> | -|.wlink |a link to a widget |<<.wlink ButtonWidget>> | -|.wlink2 |a link to a widget, with specified text |<<.wlink2 foo ButtonWidget>> | +! Blocks -!Tabs -|!Macro |!Used for |!Example | +|Macro |Example |Used for |h +|.preamble |`<<.preamble "your text comes here">>` |<<.preamble "an introductory sentence that stands apart from the rest of the tiddler">> | + +! Tiddlers and Fields + +|Macro |Used for |Example |Rendered |h +|.tid |a tiddler title |`<<.tid Example>>` |<<.tid Example>> | +|.tag |a tag |`<<.tag Example>>` |<<.tag Example>> | +|.field |a field name |`<<.field example>>` |<<.field example>> | +|.value |a field value |`<<.value "example value">>` |<<.value "example value">> | +|.op |a filter operator |`<<.op backlinks>>` |<<.op backlinks>> | +|.var |a variable or macro name |`<<.var currentTiddler>>` |<<.var currentTiddler>> | +|.wid |a widget name |`<<.wid list>>` |<<.wid list>> | +|.attr |an attribute name |`<<.attr filter>>` |<<.attr filter>> | +|.param |a macro parameter name |`<<.param text>>` |<<.param text>> | +|.tiddler-fields |a list of tiddler fields |`<<.tiddler-fields "Monday">>` |<<.tiddler-fields "Monday">> | + +! Links + +|!Macro |Used for |Example |Renderd |h +|.link |link containing WikiText |`<<.link "^^an^^ ~~example~~" Example>>` |<<.link "^^an^^ ~~example~~" Example>> | +|.clink |code link |``<<.clink `<$list>` ListWidget>>`` |<<.clink `<$list>` ListWidget>> | +|.dlink |definition link for a instance of a term |`<<.dlink widget Widgets>>` |<<.dlink widget Widgets>> | +|.dlink-ex |external link to a defining instance of a term |`<<.dlink-ex Example "http://example.com/">>` |<<.dlink-ex Example "http://example.com/">> | +|.flink |field link |`<<.flink ListField>>` |<<.flink ListField>> | +|.mlink |macro link |`<<.mlink qualify>>` |<<.mlink qualify>> | +|.mlink2 |macro link with a specified target |`<<.mlink2 foo "Examples of Macros">>` |<<.mlink2 foo "Examples of Macros">> | +|.olink |operator link |`<<.olink prefix>>` |<<.olink prefix>> | +|.olink2 |operator link with specified target |`<<.olink2 foo prefix>>` |<<.olink2 foo prefix>> | +|.vlink |variable link |`<<.vlink currentTiddler>>` |<<.vlink currentTiddler>> | +|.vlink2 |variable link with specified target |`<<.vlink2 foo "Examples of Variables">>` |<<.vlink2 foo "Examples of Variables">> | +|.wlink |widget link |`<<.wlink ButtonWidget>>` |<<.wlink ButtonWidget>> | +|.wlink2 |widget link with specified text |`<<.wlink2 foo ButtonWidget>>` |<<.wlink2 foo ButtonWidget>> | + +! Keyboard Shortcuts + +|Macro |Used for |Example |Rendered |h +|.key |a key on the keyboard |`<<.key Escape>>` |<<.key Escape>> | +|.keys |a key combination |`<<.keys Ctrl+Enter>>` |<<.keys Ctrl+Enter>> | + +! Doc-Tabs + +See: [[CheckboxWidget]] + +|Macro |Used for |Example |h |.doc-tabs |showing a tab set in a documentation tiddler | -- | |.doc-tab-link |button to activate a tab | -- | |.widget-attr-link |button with a widget attribute name to activate a tab | -- | +! Sidebar Tabs -!User interface +|Macro |Used for |Example |Rendered |h +|.sidebar-tab |the name of a sidebar tab |`<<.sidebar-tab More>>` |<<.sidebar-tab More>> | +|.more-tab |the name of a subtab of the More tab |`<<.more-tab Shadows>>` |<<.more-tab Shadows>> | +|.info-tab |the name of a tiddler info tab |`<<.info-tab Fields>>` |<<.info-tab Fields>> | +|.controlpanel-tab |the name of a Control Panel tab |`<<.controlpanel-tab Settings>>` |<<.controlpanel-tab Settings>> | +|.advancedsearch-tab |the name of an Advanced Search tab |`<<.advancedsearch-tab Filter>>` |<<.advancedsearch-tab Filter>> | +|.toc-tab |name of the tw5.com TOC tab |`<<.toc-tab>>` |<<.toc-tab>> | +|.example-tab |an example tab name |`<<.example-tab "Notes">>` |<<.example-tab "Notes">> | -|!Macro |!Used for |!Example | -|.key |a key on the keyboard |<<.key Escape>> | -|.keycombo |a key combination |<<.keycombo Ctrl Enter>> | +!! Parameters for .sidebar-tab -!Tabs +|Open |`<<.sidebar-tab Open>>` |<<.sidebar-tab Open>> | +|Recent |`<<.sidebar-tab Recent>>` |<<.sidebar-tab Recent>> | +|Tools |`<<.sidebar-tab Tools>>` |<<.sidebar-tab Tools>> | +|More |`<<.sidebar-tab More>>` |<<.sidebar-tab More>> | -|!Macro |!Used for |!Example | -|.sidebar-tab |the name of a sidebar tab |<<.sidebar-tab More>> | -|.more-tab |the name of a subtab of the More tab |<<.more-tab Shadows>> | -|.info-tab |the name of a tiddler info tab |<<.info-tab Fields>> | -|.controlpanel-tab |the name of a Control Panel tab |<<.controlpanel-tab Settings>> | -|.advancedsearch-tab |the name of an Advanced Search tab |<<.advancedsearch-tab Filter>> | -|.toc-tab |name of the tw5.com TOC tab |<<.toc-tab>> | -|.example-tab |an example tab name |<<.example-tab "Notes">> | +!! Parameters for .more-tab -!!Parameters for .sidebar-tab +|All |`<<.more-tab All>>` |<<.more-tab All>> | +|Recent |`<<.more-tab Recent>>` |<<.more-tab Recent>> | +|Tags |`<<.more-tab Tags>>` |<<.more-tab Tags>> | +|Missing |`<<.more-tab Missing>>` |<<.more-tab Missing>> | +|Drafts |`<<.more-tab Drafts>>` |<<.more-tab Drafts>> | +|Orphans |`<<.more-tab Orphans>>` |<<.more-tab Orphans>> | +|Types |`<<.more-tab Types>>` |<<.more-tab Types>> | +|System |`<<.more-tab System>>` |<<.more-tab System>> | +|Shadows |`<<.more-tab Shadows>>` |<<.more-tab Shadows>> | -|Open |<<.sidebar-tab Open>> | -|Recent |<<.sidebar-tab Recent>> | -|Tools |<<.sidebar-tab Tools>> | -|More |<<.sidebar-tab More>> | +!! Parameters for .info-tab -!!Parameters for .more-tab +|Tools |`<<.info-tab Tools>>` |<<.info-tab Tools>> | +|References |`<<.info-tab References>>` |<<.info-tab References>> | +|Tagging |`<<.info-tab Tagging>>` |<<.info-tab Tagging>> | +|List |`<<.info-tab List>>` |<<.info-tab List>> | +|Listed |`<<.info-tab Listed>>` |<<.info-tab Listed>> | +|Fields |`<<.info-tab Fields>>` |<<.info-tab Fields>> | +|Advanced |`<<.info-tab Advanced>>` |<<.info-tab Advanced>> | -|All |<<.more-tab All>> | -|Recent |<<.more-tab Recent>> | -|Tags |<<.more-tab Tags>> | -|Missing |<<.more-tab Missing>> | -|Drafts |<<.more-tab Drafts>> | -|Orphans |<<.more-tab Orphans>> | -|Types |<<.more-tab Types>> | -|System |<<.more-tab System>> | -|Shadows |<<.more-tab Shadows>> | +!! Parameters for .controlpanel-tab -!!Parameters for .info-tab +|Info |`<<.controlpanel-tab Info>>` |<<.controlpanel-tab Info>> | +|Appearance |`<<.controlpanel-tab Appearance>>` |<<.controlpanel-tab Appearance>> | +|Settings |`<<.controlpanel-tab Settings>>` |<<.controlpanel-tab Settings>> | +|Saving |`<<.controlpanel-tab Saving>>` |<<.controlpanel-tab Saving>> | +|Plugins |`<<.controlpanel-tab Plugins>>` |<<.controlpanel-tab Plugins>> | -|Tools |<<.info-tab Tools>> | -|References |<<.info-tab References>> | -|Tagging |<<.info-tab Tagging>> | -|List |<<.info-tab List>> | -|Listed |<<.info-tab Listed>> | -|Fields |<<.info-tab Fields>> | -|Advanced |<<.info-tab Advanced>> | +!! Parameters for .advancedsearch-tab -!!Parameters for .controlpanel-tab +|Standard |`<<.advancedsearch-tab Standard>>` |<<.advancedsearch-tab Standard>> | +|System |`<<.advancedsearch-tab System>>` |<<.advancedsearch-tab System>> | +|Shadows |`<<.advancedsearch-tab Shadows>>` |<<.advancedsearch-tab Shadows>> | +|Filter |`<<.advancedsearch-tab Filter>>` |<<.advancedsearch-tab Filter>> | -|Info |<<.controlpanel-tab Info>> | -|Appearance |<<.controlpanel-tab Appearance>> | -|Settings |<<.controlpanel-tab Settings>> | -|Saving |<<.controlpanel-tab Saving>> | -|Plugins |<<.controlpanel-tab Plugins>> | +! Buttons -!!Parameters for .advancedsearch-tab +|Macro |Used for |Example |Rendered |h +|.button |a standard button name and icon |`<<.button "new-tiddler">>` |<<.button "new-tiddler">> | -|Standard |<<.advancedsearch-tab Standard>> | -|System |<<.advancedsearch-tab System>> | -|Shadows |<<.advancedsearch-tab Shadows>> | -|Filter |<<.advancedsearch-tab Filter>> | +!! Parameters for .button -!Buttons +!!! Tiddler toolbar -|!Macro |!Used for |!Example | -|.button |a standard button name and icon |<<.button "new-tiddler">> | +|clone |`<<.button "clone">>` |<<.button "clone">> | +|close |`<<.button "close">>` |<<.button "close">> | +|close-others |`<<.button "close-others">>` |<<.button "close-others">> | +|edit |`<<.button "edit">>` |<<.button "edit">> | +|export-tiddler |`<<.button "export-tiddler">>` |<<.button "export-tiddler">> | +|info |`<<.button "info">>` |<<.button "info">> | +|more-tiddler-actions |`<<.button "more-tiddler-actions">>` |<<.button "more-tiddler-actions">> | +|new-here |`<<.button "new-here">>` |<<.button "new-here">> | +|new-journal-here |`<<.button "new-journal-here">>` |<<.button "new-journal-here">> | +|permalink |`<<.button "permalink">>` |<<.button "permalink">> | -!!Parameters for .button +!!! Edit-mode toolbar -!!!Tiddler toolbar +|cancel |`<<.button "cancel">>` |<<.button "cancel">> | +|delete |`<<.button "delete">>` |<<.button "delete">> | +|save |`<<.button "save">>` |<<.button "save">> | -|clone |<<.button "clone">> | -|close |<<.button "close">> | -|close-others |<<.button "close-others">> | -|edit |<<.button "edit">> | -|export-tiddler |<<.button "export-tiddler">> | -|info |<<.button "info">> | -|more-tiddler-actions |<<.button "more-tiddler-actions">> | -|new-here |<<.button "new-here">> | -|new-journal-here |<<.button "new-journal-here">> | -|permalink |<<.button "permalink">> | +!!! Page toolbar -!!!Edit-mode toolbar - -|cancel |<<.button "cancel">> | -|delete |<<.button "delete">> | -|save |<<.button "save">> | - -!!!Page toolbar - -|advanced-search |<<.button "advanced-search">> | -|close-all |<<.button "close-all">> | -|control-panel |<<.button "control-panel">> | -|encryption |<<.button "encryption">> | -|export-page |<<.button "export-page">> | -|full-screen |<<.button "full-screen">> | -|home |<<.button "home">> | -|import |<<.button "import">> | -|language |<<.button "language">> | -|more-page-actions |<<.button "more-page-actions">> | -|new-journal |<<.button "new-journal">> | -|new-tiddler |<<.button "new-tiddler">> | -|permaview |<<.button "permaview">> | -|refresh |<<.button "refresh">> | -|save-wiki |<<.button "save-wiki">> | -|storyview |<<.button "storyview">> | -|tag-manager |<<.button "tag-manager">> | -|theme |<<.button "theme">> | +|advanced-search |`<<.button "advanced-search">>` |<<.button "advanced-search">> | +|close-all |`<<.button "close-all">>` |<<.button "close-all">> | +|control-panel |`<<.button "control-panel">>` |<<.button "control-panel">> | +|encryption |`<<.button "encryption">>` |<<.button "encryption">> | +|export-page |`<<.button "export-page">>` |<<.button "export-page">> | +|full-screen |`<<.button "full-screen">>` |<<.button "full-screen">> | +|home |`<<.button "home">>` |<<.button "home">> | +|import |`<<.button "import">>` |<<.button "import">> | +|language |`<<.button "language">>` |<<.button "language">> | +|more-page-actions |`<<.button "more-page-actions">>` |<<.button "more-page-actions">> | +|new-journal |`<<.button "new-journal">>` |<<.button "new-journal">> | +|new-tiddler |`<<.button "new-tiddler">>` |<<.button "new-tiddler">> | +|permaview |`<<.button "permaview">>` |<<.button "permaview">> | +|refresh |`<<.button "refresh">>` |<<.button "refresh">> | +|save-wiki |`<<.button "save-wiki">>` |<<.button "save-wiki">> | +|storyview |`<<.button "storyview">>` |<<.button "storyview">> | +|tag-manager |`<<.button "tag-manager">>` |<<.button "tag-manager">> | +|theme |`<<.button "theme">>` |<<.button "theme">> | diff --git a/editions/tw5.com/tiddlers/system/ContributionBanner.tid b/editions/tw5.com/tiddlers/system/ContributionBanner.tid index 0cd359079..d955f92d3 100644 --- a/editions/tw5.com/tiddlers/system/ContributionBanner.tid +++ b/editions/tw5.com/tiddlers/system/ContributionBanner.tid @@ -1,6 +1,8 @@ -title: $:/ContributionBanner -tags: $:/tags/EditTemplate +created: 20240313115309914 list-after: $:/core/ui/EditTemplate/title +modified: 20240313115810689 +tags: $:/tags/EditTemplate +title: $:/ContributionBanner \define base-github() https://github.com/Jermolene/TiddlyWiki5/edit/tiddlywiki-com/editions/tw5.com/tiddlers/ @@ -10,7 +12,9 @@ https://github.com/Jermolene/TiddlyWiki5/edit/tiddlywiki-com/editions/tw5.com/ti <$list filter="[[$:/config/OriginalTiddlerPaths]getindex<draft-of>]" variable="target" > <div class="tc-improvement-banner"> {{$:/core/images/star-filled}} Can you help us improve this documentation? [[Find out how|Improving TiddlyWiki Documentation]] to -<a href={{{ [<target>addprefix<base-github>] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer">edit this tiddler on ~GitHub</a> +<a href={{{ [<draft-of>encodeuricomponent[]addprefix[https://saqimtiaz.github.io/tw5-docs-pr-maker/#]] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer">edit this tiddler in Docs PR Maker</a> +or +<a href={{{ [<target>addprefix<base-github>] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer">edit it directly on ~GitHub</a> </div> </$list> </$set> diff --git a/editions/tw5.com/tiddlers/system/Deprecated.tid b/editions/tw5.com/tiddlers/system/Deprecated.tid index 9d85bd185..5a7b501e7 100644 --- a/editions/tw5.com/tiddlers/system/Deprecated.tid +++ b/editions/tw5.com/tiddlers/system/Deprecated.tid @@ -1,8 +1,12 @@ created: 20170126143833588 -modified: 20220704174221300 +modified: 20240310123352998 title: $:/deprecated type: text/vnd.tiddlywiki Deprecated features of TiddlyWiki are those that have been superseded by newer, improved ways of doing the same thing. Deprecated features will still work, but are not recommended for new content. + +''Tiddlers tagged'' $:/deprecated: + +<<list-links filter:"[tag[$:/deprecated]]">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/system/Deprecated_-_What_does_it_mean.tid b/editions/tw5.com/tiddlers/system/Deprecated_-_What_does_it_mean.tid index 98fbf6bb0..891e00bca 100644 --- a/editions/tw5.com/tiddlers/system/Deprecated_-_What_does_it_mean.tid +++ b/editions/tw5.com/tiddlers/system/Deprecated_-_What_does_it_mean.tid @@ -7,6 +7,3 @@ type: text/vnd.tiddlywiki Deprecated features are marked with a special warning button. See: [[How to apply custom styles by tag]] for an example. -''Tiddlers tagged `$:/deprecated`'' - -><<list-links "[tag[$:/deprecated]]">> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/system/Sources.tid b/editions/tw5.com/tiddlers/system/Sources.tid index c251f7a4f..086df3077 100644 --- a/editions/tw5.com/tiddlers/system/Sources.tid +++ b/editions/tw5.com/tiddlers/system/Sources.tid @@ -1,27 +1,47 @@ -title: $:/editions/tw5.com/TiddlerInfo/Sources -tags: $:/tags/TiddlerInfo caption: Sources +code-body: yes +created: 20240313090915565 +modified: 20240313115026563 +tags: $:/tags/TiddlerInfo +title: $:/editions/tw5.com/TiddlerInfo/Sources -\define static-link-base() -https://tiddlywiki.com/static/$(title)$.html +\function static-link-base() [[https://tiddlywiki.com/static/$(title)$.html]substitute[]] + +\function github-link-base() +[[https://github.com/Jermolene/TiddlyWiki5/blob/tiddlywiki-com/editions/tw5.com/tiddlers/$(title)$]substitute[]] \end -\define make-static-link() +\procedure make-static-link() +\whitespace trim <$set name="title" filter="[<currentTiddler>encodeuricomponent[]encodeuricomponent[]]" select="0"> -<a href=<<static-link-base>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$text text=<<static-link-base>>/></a> + <a href=<<static-link-base>> + class="tc-tiddlylink-external" + target="_blank" + rel="noopener noreferrer" + > + <$text text=<<static-link-base>>/> + </a> </$set> \end -\define github-link-base() -https://github.com/Jermolene/TiddlyWiki5/blob/tiddlywiki-com/editions/tw5.com/tiddlers/$(title)$ +\procedure make-github-link() +<$set name="title" value={{{ [[$:/config/OriginalTiddlerPaths]getindex<currentTiddler>] }}}> + <$set name="title" filter="[<title>encodeuricomponent[]]" select="0"> + <a href=<<github-link-base>> + class="tc-tiddlylink-external" + target="_blank" + rel="noopener noreferrer" + >Link to "<$text text=<<currentTiddler>>/>" on github.com</a> + </$set> +</$set> \end -\define make-github-link() -<$set name="title" value={{$:/config/OriginalTiddlerPaths##$(currentTiddler)$}}> -<$set name="title" filter="[<title>encodeuricomponent[]]" select="0"> -<a href=<<github-link-base>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$text text=<<github-link-base>>/></a> -</$set> -</$set> +\procedure make-pr-maker-link() +<a href={{{ [<currentTiddler>encodeuricomponent[]addprefix[https://saqimtiaz.github.io/tw5-docs-pr-maker/#]] }}} + class="tc-tiddlylink-external" + target="_blank" + rel="noopener noreferrer" +>Link to "<$text text=<<currentTiddler>>/>" in Docs PR Maker edition</a> \end <$list filter="[all[current]!is[system]!is[shadow]]"> @@ -30,8 +50,9 @@ A static HTML representation of this tiddler is available at the URL: * <<make-static-link>> -Help us to improve the documentation by sending a ~GitHub pull request for this tiddler: +Help us to [[improve the documentation|Improving TiddlyWiki Documentation]] by suggesting changes to this tiddler using the [[TiddlyWiki Docs PR Maker]] or directly on ~GitHub. +* <<make-pr-maker-link>> * <<make-github-link>> </$list> diff --git a/editions/tw5.com/tiddlers/system/TableOfContents.tid b/editions/tw5.com/tiddlers/system/TableOfContents.tid index aada8d741..d22420a9f 100644 --- a/editions/tw5.com/tiddlers/system/TableOfContents.tid +++ b/editions/tw5.com/tiddlers/system/TableOfContents.tid @@ -1,8 +1,8 @@ caption: {{$:/language/SideBar/Contents/Caption}} created: 20140809114010378 -list: HelloThere Learning [[Working with TiddlyWiki]] [[Customise TiddlyWiki]] Features Languages Editions Plugins Platforms Reference Community About +list: HelloThere Learning [[Working with TiddlyWiki]] [[Customise TiddlyWiki]] Features Filters Languages Editions Plugins Platforms Reference Community About list-after: $:/core/ui/SideBar/Open -modified: 20150414070242411 +modified: 20230322150307580 tags: $:/tags/SideBar title: TableOfContents type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/system/doc-macros.tid b/editions/tw5.com/tiddlers/system/doc-macros.tid index e4a425f9a..d0574fe5f 100644 --- a/editions/tw5.com/tiddlers/system/doc-macros.tid +++ b/editions/tw5.com/tiddlers/system/doc-macros.tid @@ -1,81 +1,100 @@ +code-body: yes created: 20150117152607000 -modified: 20230325141733992 +modified: 20240317091700545 tags: $:/tags/Macro title: $:/editions/tw5.com/doc-macros type: text/vnd.tiddlywiki -\define .concat(1,2,3,4,5) $1$$2$$3$$4$$5$ +\whitespace trim -\define .def(_) <dfn class="doc-def">$_$</dfn> -\define .em(_) <em class="doc-em">$_$</em> -\define .strong(_) <strong class="doc-strong">$_$</strong> -\define .place(_) <code class="doc-place">$_$</code> -\define .word(_) "$_$" +\function .concat(1,2,3,4,5) [[$(1)$$(2)$$(3)$$(4)$$(5)$]substitute[]] +\function .word(_) [["]] [<_>] =[["]] +[join[]] -\define .preamble(_) :.doc-preamble $_$ -\define .note(_) -@@.doc-note -;Note -: $_$ -@@ +\procedure .def(_) <dfn class="doc-def"><<_>></dfn> +\procedure .em(_) <em class="doc-em"><<_>></em> +\procedure .strong(_) <strong class="doc-strong"><<_>></strong> +\procedure .place(_) <code class="doc-place"><<_>></code> +\procedure .preamble(_) <dl><dd class="doc-preamble"><<_>></dd></dl> + +\procedure .tid(_) <code class="doc-tiddler"><<_>></code> +\procedure .tag(_) <code class="doc-tag"><<_>></code> +\procedure .field(_) <code class="doc-field"><<_>></code> +\procedure .value(_) <code class="doc-value"><<_>></code> +\procedure .op(_) <code class="doc-operator"><<_>></code> +\procedure .var(_) <code class="doc-var"><<_>></code> +\procedure .wid(_) <code class="doc-widget"><$macrocall $name=".concat" 1="$" 2=<<_>>/></code> +\procedure .attr(_) <code class="doc-attr"><<_>></code> +\procedure .param(_) <code class="doc-param"><<_>></code> + +\procedure .tiddler-fields(tiddler) +<$tiddler tiddler=<<tiddler>>> + <div class="doc-tiddler-fields"> + <h2> + <$link> + <span class="tc-tiddler-title-icon">{{||$:/core/ui/TiddlerIcon}}</span><$text text=<<currentTiddler>>/> + </$link> + </h2> + <table class="tc-view-field-table"> + <tbody> + <$list filter="[all[current]fields[]sort[title]] -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/> + </tbody> + </table> + </div> +</$tiddler> \end -\define .tid(_) <code class="doc-tiddler">$_$</code> -\define .tag(_) <code class="doc-tag">$_$</code> -\define .field(_) <code class="doc-field">$_$</code> -\define .value(_) <code class="doc-value">$_$</code> -\define .op(_) <code class="doc-operator">$_$</code> -\define .var(_) <code class="doc-var">$_$</code> -\define .wid(_) <code class="doc-widget">$$_$</code> -\define .attr(_) <code class="doc-attr">$_$</code> -\define .param(_) <code class="doc-param">$_$</code> +\function .mtitle(_) [<_>] Macro +[join[ ]] +\function .otitle(_) [<_>] Operator +[join[ ]] +\function .vtitle(_) [<_>] Variable +[join[ ]] -\define .mtitle(_) $_$ Macro -\define .otitle(_) $_$ Operator -\define .vtitle(_) $_$ Variable +\procedure .link(_,to) <$link to=<<to>> ><<_>></$link> +\procedure .clink(_,to) <span class="doc-clink"><$link to=<<to>>><<_>></$link></span> -\define .link(_,to) <$link to="$to$">$_$</$link> -\define .clink(_,to) <span class="doc-clink"><<.link """$_$""" "$to$">></span> -\define .dlink(_,to) <$macrocall $name=".link" _=<<.def "$_$">> to="$to$">/> -\define .dlink-ex(_,to) <a href="$to$" class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><<.def "$_$">></a> -\define .flink(to) <$macrocall $name=".link" _=<<.field {{$to$!!caption}}>> to="$to$"/> -\define .mlink(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to=<<.mtitle "$_$">>/> -\define .mlink2(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to="$to$"/> -\define .olink(_) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$_$">>/> -\define .olink2(_,to) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$to$">>/> -\define .vlink(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to=<<.vtitle "$_$">>/> -\define .vlink2(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to="$to$"/> -\define .wlink(to) <$macrocall $name=".link" _=<<.wid {{$to$!!caption}}>> to="$to$"/> -\define .wlink2(_,to) <$macrocall $name=".link" _="$_$" to="$to$"/> +\procedure .dlink(_,to) <$link to=<<to>>><$macrocall $name=".def" _=<<_>>/></$link> -\define .key(_) <span class="doc-key">$_$</span> -\define .combokey(_) <$macrocall $name=".if" cond="$_$" then=<<.key '$_$'>>/> -\define .keycombo(1,2,3,4) <<.combokey "$1$">><<.if "$2$" +>><<.combokey "$2$">><<.if "$3$" +>><<.combokey "$3$">><<.if "$4$" +>><<.combokey "$4$">> +\procedure .dlink-ex(_,to) <a href=<<to>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$macrocall $name=".def" _=<<_>>/></a> +\procedure .flink(to) <$macrocall $name=".link" _=`<<.field {{$(to)$!!caption}}>>` to=<<to>>/> -\define .tab(_) <span class="doc-tab">{{$_$!!caption}}</span> -\define .sidebar-tab(_) <<.tab "$:/core/ui/SideBar/$_$">> -\define .more-tab(_) <<.tab "$:/core/ui/MoreSideBar/$_$">> -\define .info-tab(_) <<.tab "$:/core/ui/TiddlerInfo/$_$">> -\define .controlpanel-tab(_) <<.tab "$:/core/ui/ControlPanel/$_$">> -\define .advancedsearch-tab(_) <<.tab "$:/core/ui/AdvancedSearch/$_$">> -\define .toc-tab() <<.tab "TableOfContents">> -\define .example-tab(_) <span class="doc-tab">$_$</span> +\procedure .mlink(_) <$link to={{{ [.mtitle<_>] }}}><$macrocall $name=".var" _=<<_>>/> </$link> +\procedure .mlink2(_,to) <$link to=<<to>>><$macrocall $name=".var" _=<<_>>/> </$link> -\define .doc-tabs() +\procedure .olink(_) <$link to={{{ [.otitle<_>] }}}><$macrocall $name=".op" _=<<_>>/> </$link> +\procedure .olink2(_,to) <$link to={{{ [.otitle<to>] }}}><$macrocall $name=".op" _=<<_>>/> </$link> + +\procedure .vlink(_) <$link to={{{ [.vtitle<_>] }}}><$macrocall $name=".var" _=<<_>>/> </$link> +\procedure .vlink2(_,to) <$link to=<<to>>><$macrocall $name=".var" _=<<_>>/></$link> + +\procedure .wlink(to) <$link to=<<to>> > <$macrocall $name=".wid" _={{{ [<to>get[caption]] }}}> </$link> +\procedure .wlink2(_,to) <$link to=<<to>> ><<_>></$link> + +\procedure .key(_) <span class="doc-key"><<_>></span> +\procedure .keys(_) <span class="doc-key"><<_>></span> + +\procedure .tab(_) <span class="doc-tab"><$transclude $tiddler=<<_>> $field=caption ><<_>></$transclude></span> +\procedure .sidebar-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/SideBar/$(_)$`/> +\procedure .more-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/MoreSideBar/$(_)$`/> +\procedure .info-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/TiddlerInfo/$(_)$`/> +\procedure .controlpanel-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/ControlPanel/$(_)$`/> +\procedure .advancedsearch-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/AdvancedSearch/$(_)$`/> +\procedure .toc-tab() <$macrocall $name=".tab" _="TableOfContents"/> +\procedure .example-tab(_) <span class="doc-tab"><<_>></span> + +\procedure .doc-tabs() <$macrocall $name="tabs" - tabsList="[tag<currentTiddler>description[tab]]" - default={{{ [tag<currentTiddler>first[]] }}} - explicitState={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}} - class={{{ [[doc-tabs]] [<currentTiddler>encodeuricomponent[]escapecss[]addprefix[doc-tabs-]] +[join[ ]] }}} /> + tabsList="[tag<currentTiddler>description[tab]]" + default={{{ [tag<currentTiddler>first[]] }}} + explicitState={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}} + class={{{ [[doc-tabs]] [<currentTiddler>encodeuricomponent[]escapecss[]addprefix[doc-tabs-]] +[join[ ]] }}} /> \end -\define .doc-tab-link(text, target, tooltip:"", class:"") + +\procedure .doc-tab-link(text, target, tooltip:"", class:"") <!-- figure out where the addressed doc-tabs are --> <$tiddler tiddler={{{ [<currentTiddler>search:text[.doc-tabs]] :else[<currentTiddler>tags[]search:text[.doc-tabs]first[]] :else[<currentTiddler>] }}} > -<$button class={{{ [[tc-btn-invisible tc-tiddlylink]] [<__class__>] +[join[ ]] }}} - set={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}} - setTo=<<__target__>> - tooltip=<<__tooltip__>>> - <<__text__>> +<$button class={{{ [[tc-btn-invisible tc-tiddlylink]] [<class>] +[join[ ]] }}} + set={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}} + setTo=<<target>> + tooltip=<<tooltip>>> + <<text>> <!-- if tiddler with tabs is open, scroll to tabs, otherwise open that tiddler (relevant from within tab subtiddlers) --> <$list filter="[[$:/StoryList]contains<currentTiddler>]" variable="ignore" emptyMessage="<$action-navigate />"> <$action-sendmessage $message="tm-scroll" selector={{{ [<currentTiddler>encodeuricomponent[]addprefix[.doc-tabs-]] }}} /> @@ -84,136 +103,128 @@ type: text/vnd.tiddlywiki </$button> </$tiddler> \end -\define .widget-attr-link(text, target) + +\procedure .widget-attr-link(text, target) <$macrocall $name=".doc-tab-link" - text={{{ [[<code class="doc-attr">]] [<__text__>] [[</code>]] +[join[]] }}} - class="doc-tab-link" - target=<<__target__>> - tooltip={{{ [[Show more information about the ']] [<__text__>] [[' attribute]] +[join[]] }}} /> + text={{{ [[<code class="doc-attr">]] [<text>] [[</code>]] +[join[]] }}} + class="doc-tab-link" + target=<<target>> + tooltip={{{ [[Show more information about the ']] [<text>] [[' attribute]] +[join[]] }}} /> \end -\define .button(_) <span class="doc-button">{{$:/core/ui/Buttons/$_$!!caption}}</span> +\procedure .button(_) <span class="doc-button"><$transclude $tiddler=`$:/core/ui/Buttons/$(_)$` $field="caption" ><<_>></$transclude></span> -\define .icon(_) <span class="doc-icon">{{$_$}}</span> +\procedure .icon(_) <span class="doc-icon"><$transclude $tiddler=<<_>>/></span> -\define .tip(_) <div class="doc-icon-block"><div class="doc-block-icon">{{$:/core/images/tip}}</div> $_$</div> -\define .warning(_) <div class="doc-icon-block"><div class="doc-block-icon">{{$:/core/images/warning}}</div> $_$</div> +\procedure .infoBox(text:"", title, icon:"$:/core/images/info-button", class, iconSize:"1.4rem") +\function _f.tipClass() [[doc-icon-block]] [<class>!is[blank]then<class>] +[join[ ]] +<div class=<<_f.tipClass>>> + <%if [<title>!is[blank]] %><div>''<<title>>''</div><% endif %> + <div class="doc-block-icon"><$transclude $tiddler=<<icon>> size=<<iconSize>>/></div> + <<text>> +</div> +\end -\define .state-prefix() $:/state/editions/tw5.com/ +\procedure .note(_:"", title:"Note", icon:"$:/core/images/info-button", class:"doc-note", iconSize:"22pt") +<$macrocall $name=".infoBox" text=<<_>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/> +\end -\define .lorem() +\procedure .tip(_:"", title:"Tip" , icon:"$:/core/images/tip", class:"doc-tip", iconSize:"22pt") +<$macrocall $name=".infoBox" text=<<_>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/> +\end + +\procedure .warning(_:"", title:"Warning", icon:"$:/core/images/warning", class:"doc-warning", iconSize:"22pt") +<$macrocall $name=".infoBox" text=<<_>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/> +\end + +\procedure .state-prefix() $:/state/editions/tw5.com/ + +\procedure .lorem() Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \end -\define .toc-lorem() +\procedure .toc-lorem() This is an example tiddler. See [[Table-of-Contents Macros (Examples)]]. <<.lorem>> \end -\define .example(n,eg,egvar:NO-SUCH-VAR) +\procedure .example(n,eg,egvar) +<$let eg={{{ [<egvar>!is[blank]getvariable[]] :else[<eg>] }}}> <div class="doc-example"> -<$reveal default="$egvar$" type="match" text="NO-SUCH-VAR"> - <$macrocall $name="copy-to-clipboard-above-right" src="""$eg$"""/> - <$codeblock code="""$eg$"""/> -</$reveal> -<$reveal default="$egvar$" type="nomatch" text="NO-SUCH-VAR"> - <!-- allow an example to contain """ --> - <$macrocall $name="copy-to-clipboard-above-right" src=<<$egvar$>>/> - <$codeblock code=<<$egvar$>>/> -</$reveal> -<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state"> -<$reveal state=<<.state>> type="nomatch" text="show"> - <dl> - <dd><$button set=<<.state>> setTo="show">Try it</$button></dd> - </dl> -</$reveal> -<$reveal state=<<.state>> type="match" text="show"> - <dl> - <dd><$button set=<<.state>> setTo="">Hide</$button></dd> - </dl> - <blockquote class="doc-example-result"> - <$reveal default="$egvar$" type="match" text="NO-SUCH-VAR"> - -$$$text/vnd.tiddlywiki -$eg$ -$$$ - - </$reveal> - <$reveal default="$egvar$" type="nomatch" text="NO-SUCH-VAR"> - <<$egvar$>> - </$reveal> - </blockquote> -</$reveal> -</$list> + <$macrocall $name="copy-to-clipboard-above-right" src=<<eg>>/> + <$codeblock code=<<eg>>/> + <$list filter=`[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$(n)$]]` variable=".state"> + <$reveal state=<<.state>> type="nomatch" text="show"> + <dl> + <dd><$button set=<<.state>> setTo="show">Try it</$button></dd> + </dl> + </$reveal> + <$reveal state=<<.state>> type="match" text="show"> + <dl> + <dd><$button set=<<.state>> setTo="">Hide</$button></dd> + </dl> + <blockquote class="doc-example-result"> + <$transclude $variable="eg" $mode="block"/> + </blockquote> + </$reveal> + </$list> +</div> +</$let> \end -\define .bad-example(eg) +\procedure .bad-example(eg) <table class="doc-bad-example"> -<tbody> -<tr class="evenRow"> -<td><span style="font-size:1.5em;">⚠</span> Warning:<br> Don't do it this way!</td> -<td> - -$eg$ -</td> -</tr> -</tbody> + <tbody> + <tr class="evenRow"> + <td> + <span class="tc-small-gap-right" style="font-size:1.5em;">⚠</span> + Warning:<br> Don't do it this way! + </td> + <td> + <$transclude $variable="eg" $mode="block"/> + </td> + </tr> + </tbody> </table> \end -\define .link-badge(text,link,colour) -<a href=<<__link__>> class="doc-link-badge" style="background-color:$colour$;" target="_blank" rel="noopener noreferrer"><$text text=<<__text__>>/></a> +\procedure .link-badge(text,link,colour) +<a href=<<link>> class="doc-link-badge" style.background-color=<<colour>> target="_blank" rel="noopener noreferrer"> + <$text text=<<text>>/> +</a> \end +<!-- TODO use $:/palette colour settings --> +\procedure .link-badge-added(link,colour:#ffe246) <$macrocall $name=".link-badge" text="added" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-addendum(link,colour:#fcc84a) <$macrocall $name=".link-badge" text="addendum" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-extended(link,colour:#f9a344) <$macrocall $name=".link-badge" text="extended" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-fixed(link,colour:#ffa86d) <$macrocall $name=".link-badge" text="fixed" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-here(link,colour:#d88e63) <$macrocall $name=".link-badge" text="here" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-hide(link,colour:#9d959f) <$macrocall $name=".link-badge" text="hide" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-improved(link,colour:#7593c7) <$macrocall $name=".link-badge" text="improved" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-modified(link,colour:#7f99c9) <$macrocall $name=".link-badge" text="modified" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-removed(link,colour:#a9aabc) <$macrocall $name=".link-badge" text="removed" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-renamed(link,colour:#b4b995) <$macrocall $name=".link-badge" text="renamed" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-updated(link,colour:#91ba66) <$macrocall $name=".link-badge" text="updated" link=<<link>> colour=<<colour>>/> -\define .link-badge-added(link,colour:#ffe246) <<.link-badge "added" """$link$""" """$colour$""">> -\define .link-badge-addendum(link,colour:#fcc84a) <<.link-badge "addendum" """$link$""" """$colour$""">> -\define .link-badge-extended(link,colour:#f9a344) <<.link-badge "extended" """$link$""" """$colour$""">> -\define .link-badge-fixed(link,colour:#ffa86d) <<.link-badge "fixed" """$link$""" """$colour$""">> -\define .link-badge-here(link,colour:#d88e63) <<.link-badge "here" """$link$""" """$colour$""">> -\define .link-badge-hide(link,colour:#9d959f) <<.link-badge "hide" """$link$""" """$colour$""">> -\define .link-badge-improved(link,colour:#7593c7) <<.link-badge "improved" """$link$""" """$colour$""">> -\define .link-badge-modified(link,colour:#7f99c9) <<.link-badge "modified" """$link$""" """$colour$""">> -\define .link-badge-removed(link,colour:#a9aabc) <<.link-badge "removed" """$link$""" """$colour$""">> -\define .link-badge-renamed(link,colour:#b4b995) <<.link-badge "renamed" """$link$""" """$colour$""">> -\define .link-badge-updated(link,colour:#91ba66) <<.link-badge "updated" """$link$""" """$colour$""">> - -\define .tiddler-fields(tiddler) -<$tiddler tiddler=<<__tiddler__>>> -<div class="doc-tiddler-fields"> -<h2> -<$link> -<span class="tc-tiddler-title-icon">{{||$:/core/ui/TiddlerIcon}}</span><$text text=<<currentTiddler>>/> -</$link> -</h2> -<table class="tc-view-field-table"> -<tbody> -<$list filter="[all[current]fields[]sort[title]] -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/> -</tbody> -</table> -</div> -</$tiddler> +\procedure .banner-credits(credit,url) +<img src=<<url>> width="140" style="float:left;margin-right:0.5em;"/> +<<credit>> +<div style="clear:both;"/> \end -\define .banner-credits(credit,url) -<img src=<<__url__>> width="140" style="float:left;margin-right:0.5em;"/> - -$credit$ - -<div style="clear:both;"> - -</div> -\end - -\define .contributors(usernames) +\procedure .contributors(usernames) <ol class="doc-github-contributors"> -<$list filter="[enlist<__usernames__>sort[]]" variable="username"> -<li> -<a href={{{ [[https://github.com/]addsuffix<username>] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><img src={{{ [[https://github.com/]addsuffix<username>addsuffix[.png?size=64]] }}} width="64" height="64"/><span class="doc-github-contributor-username">@<$text text=<<username>>/></span></a> -</li> -</$list> + <$list filter="[enlist<usernames>sort[]]" variable="username"> + <li> + <a href={{{ [[https://github.com/]addsuffix<username>] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"> + <img src={{{ [[https://github.com/]addsuffix<username>addsuffix[.png?size=64]] }}} width="64" height="64"/> + <span class="doc-github-contributor-username"> + @<$text text=<<username>>/> + </span> + </a> + </li> + </$list> </ol> \end - -<pre><$view field="text"/></pre> diff --git a/editions/tw5.com/tiddlers/system/doc-styles.tid b/editions/tw5.com/tiddlers/system/doc-styles.tid index 9ae22868f..2bd2f9ed3 100644 --- a/editions/tw5.com/tiddlers/system/doc-styles.tid +++ b/editions/tw5.com/tiddlers/system/doc-styles.tid @@ -1,5 +1,6 @@ +code-body: yes created: 20150117152612000 -modified: 20230325101137075 +modified: 20240223123123497 tags: $:/tags/Stylesheet title: $:/editions/tw5.com/doc-styles type: text/vnd.tiddlywiki @@ -31,6 +32,7 @@ type: text/vnd.tiddlywiki color: <<color very-muted-foreground>>; font-style: normal; font-weight: bold; + padding: 0; } .doc-button, @@ -85,7 +87,6 @@ td svg { .doc-preamble { border: 2px solid <<colour code-border>>; color: <<colour very-muted-foreground>>; - font-size: 90%; margin-left: 0; padding: 0.5em 0.7em; } @@ -112,7 +113,7 @@ td svg { } .doc-example input[type=search] { - width: 95%; + width: 95%; } .doc-example pre:first-child { margin-top: 0; @@ -138,7 +139,7 @@ td svg { } .doc-bad-example code, .doc-bad-example pre, table.doc-bad-example { - background-color:#ffff80; + background-color:#ffff80; } .doc-table th, .doc-table tr { @@ -164,35 +165,58 @@ tr.doc-table-subheading { } .doc-icon-block { - border-left: 2px solid <<colour code-border>>; - margin-left: 3em; + border-left: 4px solid <<colour blockquote-bar>>; + margin: 15px 0 15px 3em; padding-left: 0.6em; position: relative; } + .doc-block-icon { position: absolute; left: -3em; top: 0.2em; } + +.doc-icon-block.doc-note { + border-left: 4px solid <<colour blockquote-bar>>; + background: <<colour blockquote-bar>>11; +} + +.doc-icon-block.doc-tip { + border-left: 4px solid <<colour primary>>; + background: <<colour primary>>11; +} + +.doc-icon-block.doc-warning { + border-left: 4px solid <<colour alert-highlight>>; + background: <<colour alert-highlight>>11; +} + .doc-block-icon .tc-image-tip { fill: <<colour primary>>; } + .doc-block-icon .tc-image-warning { fill: <<colour alert-highlight>>; } -a.doc-from-version.tc-tiddlylink { - display: inline-block; - border-radius: 1em; - background: <<colour muted-foreground>>; - color: <<colour background>>; - fill: <<colour background>>; - padding: 0 0.4em; - font-size: 0.7em; - text-transform: uppercase; +a.doc-from-version { + background-color: <<colour muted-foreground>>; + color: <$wikify name="background" text="<<colour muted-foreground>>" mode="inline"><$transclude $variable="contrastcolour" target=<<background>> colourA="#000000" colourB="#ffffff" /></$wikify>; + padding: 3px; + border-radius: 4px; font-weight: bold; - line-height: 1.5; - vertical-align: text-bottom; + font-size: 0.75em; +} + +a.doc-from-version.doc-from-version-new { + background-color: <<colour highlight-background>>; + color: <<colour highlight-foreground>>; +} + +a.doc-from-version svg { + fill: currentColor; + vertical-align: sub; } a.doc-deprecated-version.tc-tiddlylink { @@ -241,7 +265,6 @@ a.doc-deprecated-version.tc-tiddlylink { height: 1em; } - .doc-tiddler-fields table, .doc-tiddler-fields h2 { margin: 0.5em 0; @@ -294,13 +317,13 @@ ol.doc-github-contributors li { color: #666; } .doc-tabs.tc-tab-buttons button { - font-size: 1rem; - padding: 0.5em; + font-size: 1rem; + padding: 0.5em; } .doc-tabs button .doc-attr { - background-color: unset; - color: #666; + background-color: unset; + color: #666; } .doc-tab-link .doc-attr { - color: unset; + color: unset; } diff --git a/editions/tw5.com/tiddlers/system/download-empty.tid b/editions/tw5.com/tiddlers/system/download-empty.tid index 055fa2022..f49b9b794 100644 --- a/editions/tw5.com/tiddlers/system/download-empty.tid +++ b/editions/tw5.com/tiddlers/system/download-empty.tid @@ -1,10 +1,10 @@ title: $:/editions/tw5.com/download-empty code-body: yes -\define saveTiddlerFilter() +\procedure saveTiddlerFilter() [[$:/core]] [[$:/isEncrypted]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] \end -\define savingEmpty() -yes -\end + +\procedure savingEmpty() yes + {{$:/core/templates/tiddlywiki5.html}} diff --git a/editions/tw5.com/tiddlers/system/filter-run-template.tid b/editions/tw5.com/tiddlers/system/filter-run-template.tid new file mode 100644 index 000000000..73b4a2510 --- /dev/null +++ b/editions/tw5.com/tiddlers/system/filter-run-template.tid @@ -0,0 +1,50 @@ +code-body: yes +created: 20230316112235083 +list-before: $:/core/ui/ViewTemplate/body +modified: 20240229161432000 +tags: $:/tags/ViewTemplate +title: $:/editions/tw5.com/filter-run-template +type: text/vnd.tiddlywiki + +\whitespace trim + +\procedure .op-place() +<% if [<op-name>!is[blank]] %> + <$macrocall $name=".place" _=<<op-name>> /><span class="tc-tiny-gap">=</span> +<% endif %> +\end + +\procedure .op-row() +<% if [<op-body>!is[blank]] %> + <tr> + <th align="left"><<op-head>></th> + <td><<.op-place>><<op-body>></td> + </tr> +<% endif %> +\end + +<$list filter="[all[current]tag[Named Filter Run Prefix]]"> + <$let op-head="" op-body="" op-name=""> + <table class="doc-table"> + <!-- purpose --> + <$let op-head="purpose" op-body={{!!rp-purpose}}> + <<.op-row>> + </$let> + <!-- input --> + <$let op-head="[[input|Filter Expression]]" op-body={{!!rp-input}}> + <<.op-row>> + </$let> + <!-- suffix --> + <$let op-head="[[suffix|Filter Run Prefix]]" op-body={{!!rp-suffix}} op-name={{!!rp-suffix-name}}> + <<.op-row>> + </$let> + <!-- output --> + <$let op-head="output" op-body={{!!rp-output}}> + <<.op-row>> + </$let> + </table> + <$list filter="[all[current]has[from-version]]" variable="listItem"> + <$macrocall $name=".from-version" version={{!!from-version}}/> + </$list> + </$let> +</$list> diff --git a/editions/tw5.com/tiddlers/system/operator-macros.tid b/editions/tw5.com/tiddlers/system/operator-macros.tid index afa0593b1..2b19d56db 100644 --- a/editions/tw5.com/tiddlers/system/operator-macros.tid +++ b/editions/tw5.com/tiddlers/system/operator-macros.tid @@ -1,52 +1,66 @@ created: 20150117152607000 -modified: 20230617183916622 +modified: 20240229132501000 tags: $:/tags/Macro +code-body: yes title: $:/editions/tw5.com/operator-macros -\define .operator-examples(op,text:"Examples") <$link to="$op$ Operator (Examples)">$text$</$link> + +\whitespace trim + +\procedure .operator-examples(op,text:"Examples") <$link to=`$(op)$ Operator (Examples)`><<text>></$link> \procedure .operator-example-tryit-actions() <$action-setfield $tiddler=<<.state>> text="show" filter=<<eg>>/> + \procedure .operator-example(n,eg,ie) <div class="doc-example"> -<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix<n>]" variable=".state"> -<$reveal state=<<.state>> type="nomatch" text="show"> - <code><$text text=<<eg>>/></code> - <$macrocall $name=".if" cond=<<ie>> then={{{[[<dd>→ ]addsuffix<ie>addsuffix[</dd>]]}}}/> - <dl> - <dd><$button actions=<<.operator-example-tryit-actions>>>Try it</$button></dd> - </dl> -</$reveal> -<$reveal state=<<.state>> type="match" text="show"> - <$edit-text tiddler=<<.state>> field="filter" tag="input" type=search focus="true"/> - <dl> - <dd> - <$button set=<<.state>> setTo="">Hide</$button> - <$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<<eg>>> - <$button actions=<<.operator-example-tryit-actions>>>Reset</$button> - </$reveal> - </dd> - </dl> - <blockquote class="doc-example-result"> - <ul><$list filter={{{[<.state>get[filter]]}}} emptyMessage="(empty)"> - <li><$link><$view field="title"/></$link></li> - </$list></ul> - </blockquote> -</$reveal> -</$list> + <$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix<n>]" variable=".state"> + <$reveal state=<<.state>> type="nomatch" text="show"> + <code><$text text=<<eg>>/></code> + <% if [<ie>!is[blank]] %> + <dd>→ <<ie>></dd> + <% endif %> + <dl> + <dd><$button actions=<<.operator-example-tryit-actions>>>Try it</$button></dd> + </dl> + </$reveal> + <$reveal state=<<.state>> type="match" text="show"> + <$edit-text tiddler=<<.state>> field="filter" tag="input" type=search focus="true"/> + <dl> + <dd> + <$button set=<<.state>> setTo="">Hide</$button> + <$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<<eg>>> + <$button actions=<<.operator-example-tryit-actions>>>Reset</$button> + </$reveal> + </dd> + </dl> + <blockquote class="doc-example-result"> + <ul> + <$list filter={{{[<.state>get[filter]]}}} emptyMessage="(empty)"> + <li><$link><$view field="title"/></$link></li> + </$list> + </ul> + </blockquote> + </$reveal> + </$list> +</div> \end -\define .inline-operator-example(eg) -<code><$text text=<<__eg__>>/></code> evaluates to <$list filter=<<__eg__>> emptyMessage="(empty)"> <code><$text text=<<currentTiddler>>/></code> </$list> +\procedure .inline-operator-example(eg) +<code> + <$text text=<<eg>>/> +</code> +<span class="tc-tiny-gap">evaluates to</span> +<$list filter=<<eg>> emptyMessage="(empty)"> + <code class="tc-tiny-gap-left"><$text text=<<currentTiddler>>/></code> +</$list> \end \define .this-is-operator-example() This example tiddler is used to illustrate some of the [[Filter Operators]]. \define .using-days-of-week() These examples make use of the [[Days of the Week]] tiddler. \define .s-matching-is-case-sensitive() In looking for matches for <<.place S>>, capital and lowercase letters are treated as different. -\define .node-only-operator() +\procedure .node-only-operator() <$macrocall $name=".note" _="This operator is <<.em not>> available when ~TiddlyWiki is running in a web browser."/> \end - -<pre><$view field="text"/></pre> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/system/operator-template.tid b/editions/tw5.com/tiddlers/system/operator-template.tid index 4d7abc334..f4f3e08ef 100644 --- a/editions/tw5.com/tiddlers/system/operator-template.tid +++ b/editions/tw5.com/tiddlers/system/operator-template.tid @@ -1,83 +1,64 @@ created: 20150203173506000 +modified: 20240229155612000 list-before: $:/core/ui/ViewTemplate/body -modified: 20230602181119360 tags: $:/tags/ViewTemplate +code-body: yes title: $:/editions/tw5.com/operator-template -\define .op-place() -<$macrocall $name=".if" - cond="""$(op-name)$""" - then="<<.place '$(op-name)$'>> = " - else=""/> +\whitespace trim + +\procedure .op-place() +<% if [<op-name>!is[blank]] %> + <$macrocall $name=".place" _=<<op-name>> /><span class="tc-tiny-gap">=</span> +<% endif %> \end -\define .op-row() -<$macrocall $name=".if" - cond="""$(op-body)$""" - then="""<tr><th align="left">$(op-head)$</th><td><<.op-place>>$(op-body)$</td></tr>""" - else=""/> +\procedure .op-row() +<% if [<op-body>!is[blank]] %> + <tr> + <th align="left"><<op-head>></th><td><<.op-place>><<op-body>></td> + </tr> +<% endif %> \end -<$set name="op-head" value=""> -<$set name="op-body" value=""> -<$set name="op-name" value=""> <$list filter="[all[current]tag[Filter Operators]]"> -<table class="doc-table before-tiddler-body"> -<!-- --> -<$set name="op-head" value="purpose"> -<$set name="op-body" value={{!!op-purpose}}> -<<.op-row>> -</$set> -</$set> -<!-- --> -<$set name="op-head" value="[[input|Filter Syntax]]"> -<$set name="op-body" value={{!!op-input}}> -<<.op-row>> -</$set> -</$set> -<!-- --> -<$set name="op-head" value="`!` input"> -<$set name="op-body" value={{!!op-neg-input}}> -<<.op-row>> -</$set> -</$set> -<!-- --> -<$set name="op-head" value="[[suffix|Filter Step]]"> -<$set name="op-body" value={{!!op-suffix}}> -<$set name="op-name" value={{!!op-suffix-name}}> -<<.op-row>> -</$set> -</$set> -</$set> -<!-- --> -<$set name="op-head" value="[[parameter|Filter Parameter]]"> -<$set name="op-body" value={{!!op-parameter}}> -<$set name="op-name" value={{!!op-parameter-name}}> -<<.op-row>> -</$set> -</$set> -</$set> -<!-- --> -<$set name="op-head" value="output"> -<$set name="op-body" value={{!!op-output}}> -<<.op-row>> -</$set> -</$set> -<!-- --> -<$set name="op-head" value="`!` output"> -<$set name="op-body" value={{!!op-neg-output}}> -<<.op-row>> -</$set> -</$set> -<!-- --> -</table> + <$let op-head="" op-body="" op-name=""> + <table class="doc-table before-tiddler-body"> + <!-- purpose --> + <$let op-head="purpose" op-body={{!!op-purpose}}> + <<.op-row>> + </$let> + <!-- input --> + <$let op-head="[[input|Filter Syntax]]" op-body={{!!op-input}}> + <<.op-row>> + </$let> + <!-- input negated --> + <$let op-head="`!` input" op-body={{!!op-neg-input}}> + <<.op-row>> + </$let> + <!-- suffix --> + <$let op-head="[[suffix|Filter Step]]" op-body={{!!op-suffix}} op-name={{!!op-suffix-name}}> + <<.op-row>> + </$let> + <!-- parameter --> + <$let op-head="[[parameter|Filter Parameter]]" op-body={{!!op-parameter}} op-name={{!!op-parameter-name}}> + <<.op-row>> + </$let> + <!-- output --> + <$let op-head="output" op-body={{!!op-output}}> + <<.op-row>> + </$let> + <!-- output negated --> + <$let op-head="`!` output" op-body={{!!op-neg-output}}> + <<.op-row>> + </$let> + </table> + <p> + [[Learn more about how to use Filters|Filters]] + </p> -<p>[[Learn more about how to use Filters|Filters]]</p> - -<$list filter="[all[current]has[from-version]]" variable="listItem"> -<p><$macrocall $name=".from-version" version={{!!from-version}}/></p> + <$list filter="[all[current]has[from-version]]" variable="listItem"> + <$macrocall $name=".from-version" version={{!!from-version}}/> + </$list> + </$let> </$list> -</$list> -</$set> -</$set> -</$set> diff --git a/editions/tw5.com/tiddlers/system/tw5.com-styles.tid b/editions/tw5.com/tiddlers/system/tw5.com-styles.tid index a0c9083af..dd60694f4 100644 --- a/editions/tw5.com/tiddlers/system/tw5.com-styles.tid +++ b/editions/tw5.com/tiddlers/system/tw5.com-styles.tid @@ -148,6 +148,7 @@ type: text/vnd.tiddlywiki } .tc-cards.tc-small { + text-align: center; font-size: 0.7em; } diff --git a/editions/tw5.com/tiddlers/system/variable-macros.tid b/editions/tw5.com/tiddlers/system/variable-macros.tid index 313f065af..2abc5d083 100644 --- a/editions/tw5.com/tiddlers/system/variable-macros.tid +++ b/editions/tw5.com/tiddlers/system/variable-macros.tid @@ -1,21 +1,26 @@ created: 20150228114241000 modified: 20220227210136243 tags: $:/tags/Macro +code-body: yes title: $:/editions/tw5.com/variable-macros -\define .variable-examples(v,text:"Examples") <$link to="$v$ Variable (Examples)">$text$</$link> -\define .macro-examples(m,text:"Examples") <$link to="$m$ Macro (Examples)">$text$</$link> -\define .widget-examples(w,text:"Examples") <$link to="$w$ Widget (Examples)">$text$</$link> +\procedure .variable-examples(v,text:"Examples") <$link to=`$(v)$ Variable (Examples)`><<text>></$link> +\procedure .macro-examples(m,text:"Examples") <$link to=`$(m)$ Macro (Examples)`><<text>></$link> +\procedure .widget-examples(w,text:"Examples") <$link to=`$(w)$ Widget (Examples)`><<text>></$link> -\define .js-macro-link(_) [[$_$|https://tiddlywiki.com/dev/index.html#JavaScript%20Macros]] - -\define .this-is-static-link-variable() <<.tip "This variable has no useful effect when ~TiddlyWiki is running in a browser, as the `href` attribute is ignored there -- links between tiddlers are performed by JavaScript instead. The variable comes into play when one is using the [[Node.js configuration|TiddlyWiki on Node.js]] to [[generate a static version|RenderTiddlersCommand]] of a wiki.">> - -\define .this-is-toolbar-config-variable(configTiddler) - -It can be set to <<.value yes>> or <<.value no>> prior to transcluding such a button. - -The standard page template sets it to the value found in [[$configTiddler$]], with the result that this becomes the default for the whole page. The user can adjust this default by using a tickbox on the <<.controlpanel-tab Settings>> tab of the [[Control Panel|$:/ControlPanel]]. +\procedure .js-macro-link(_) +<a href="https://tiddlywiki.com/dev/index.html#JavaScript%20Macros" + class="tc-tiddlylink-external" + target="_blank" + rel="noopener noreferrer" +><$text text=<<_>>/></a> \end -<pre><$view field="text"/></pre> \ No newline at end of file +\procedure .this-is-static-link-variable() <<.note "This variable has no useful effect when ~TiddlyWiki is running in a browser, as the `href` attribute is ignored there -- links between tiddlers are performed by JavaScript instead. The variable comes into play when one is using the [[Node.js configuration|TiddlyWiki on Node.js]] to [[generate a static version|RenderTiddlersCommand]] of a wiki.">> + +\procedure .this-is-toolbar-config-variable(configTiddler) +\whitespace notrim +It can be set to <<.value yes>> or <<.value no>> prior to transcluding such a button. + +The standard page template sets it to the value found in <$link to=<<configTiddler>>><<configTiddler>></$link>, with the result that this becomes the default for the whole page. The user can adjust this default by using a tickbox on the <<.controlpanel-tab Settings>> tab of the [[Control Panel|$:/ControlPanel]]. +\end diff --git a/editions/tw5.com/tiddlers/system/version-macros.tid b/editions/tw5.com/tiddlers/system/version-macros.tid index 0fb7dcf12..55ef03687 100644 --- a/editions/tw5.com/tiddlers/system/version-macros.tid +++ b/editions/tw5.com/tiddlers/system/version-macros.tid @@ -1,14 +1,38 @@ code-body: yes created: 20161008085627406 -modified: 20221007122259593 +modified: 20240229155633000 tags: $:/tags/Macro title: $:/editions/tw5.com/version-macros type: text/vnd.tiddlywiki -\define .from-version(version) -<$link to={{{ [<__version__>addprefix[Release ]] }}} class="doc-from-version">{{$:/core/images/warning}} New in: <$text text=<<__version__>>/></$link> +\whitespace trim + +\function tf.from-version-reference() 5.3.0 + +\procedure .from-version-template(class, text) +<$link to={{{ [<version>addprefix[Release ]] }}} class=<<class>> > + <span class="tc-tiny-gap-right"> + {{$:/core/images/info-button}} + </span> + <<text>><<version>> +</$link> \end -\define .deprecated-since(version, superseded:"TODO-Link") -<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Deprecated since: <$text text=<<__version__>>/></$link> (see <$link to=<<__superseded__>>><$text text=<<__superseded__>>/></$link>) +\procedure .from-version(version) +<% if [<version>compare:version:gteq<tf.from-version-reference>] %> + <<.from-version-template "doc-from-version doc-from-version-new" "New in v">> +<% else %> + <<.from-version-template "doc-from-version" "Introduced in v">> +<% endif %> +\end + +\procedure .deprecated-since(version, superseded:"TODO-Link") +<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible"> + {{$:/core/images/warning}} + <span class="tc-tiny-gap">Deprecated since:</span> + <$text text=<<version>>/> +</$link> +<span class="tc-tiny-gap-left"> + (see <$link class="tc-tiny-gap-left" to=<<superseded>>><$text text=<<superseded>>/></$link>) +</span> \end diff --git a/editions/tw5.com/tiddlers/system/wikitext-macros.tid b/editions/tw5.com/tiddlers/system/wikitext-macros.tid index 7db97bf50..c09b0d8fe 100644 --- a/editions/tw5.com/tiddlers/system/wikitext-macros.tid +++ b/editions/tw5.com/tiddlers/system/wikitext-macros.tid @@ -1,104 +1,96 @@ code-body: yes created: 20150117184156000 -modified: 20220617122915793 +modified: 20240315144208842 tags: $:/tags/Macro title: $:/editions/tw5.com/wikitext-macros type: text/vnd.tiddlywiki -\define activatePluginTab() +\whitespace trim + +\procedure activatePluginTab() <$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Plugins"/> <$action-navigate $to="$:/ControlPanel"/> \end -\define activateTiddlerWindow() -<$action-sendmessage $message="tm-open-window" - $param=<<currentTiddler>> windowTitle="Side by Side View" - width="800" height="600" /> +\procedure activateTiddlerWindow() +<$action-sendmessage $message="tm-open-window" $param=<<currentTiddler>> windowTitle="Side by Side View" width="800" height="600" /> \end -\define controlPanel-plugin-link() +\procedure controlPanel-plugin-link() <$button actions=<<activatePluginTab>> class="tc-btn-invisible tc-tiddlylink"> -{{$:/core/images/options-button}} ~ControlPanel + {{$:/core/images/options-button}} ~ControlPanel </$button> \end -\define open-tiddler-in-window() +\procedure open-tiddler-in-window() +\whitespace notrim <$button actions=<<activateTiddlerWindow>> class="tc-btn-invisible tc-tiddlylink"> -open ''this'' tiddler in a new window + open ''this'' tiddler in a new window </$button> \end -\define activateEditionWindow(url) -<$action-sendmessage $message="tm-open-external-window" - $param="""$url$""" windowName="_edition" - windowFeatures="width=800 height=600" /> +\procedure activateEditionWindow(url) +<$action-sendmessage $message="tm-open-external-window" $param=<<url>> windowName="_edition" windowFeatures="width=800 height=600" /> \end -\define open-external-window(url) -<$button actions=<<activateEditionWindow """$url$""">> class="tc-btn-invisible tc-tiddlylink"> -open the ''example edition'' in a new window +\procedure open-external-window(url) +\whitespace notrim +<$button actions=<<activateEditionWindow <<url>> class="tc-btn-invisible tc-tiddlylink"> + open the ''example edition'' in a new window </$button> \end -\define wikitext-example(src) +\procedure wikitext-example(src) <div class="doc-example"> - -<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/> - -<$codeblock code=<<__src__>>/> - -That renders as: - -<$macrocall $name="__src__"/> - -... and the underlying HTML is: - -<$wikify name="html" text=<<__src__>> output="html"> -<$codeblock code=<<html>>/> -</$wikify> + <$macrocall $name="copy-to-clipboard-above-right" src=<<src>>/> + <$codeblock code=<<src>>/> + <p> + That renders as: + </p> + <$transclude $variable="src" $mode="block"/> + <p> + ... and the underlying HTML is: + </p> + <$wikify name="html" text=<<src>> output="html"> + <$codeblock code=<<html>>/> + </$wikify> </div> \end -\define wikitext-example-without-html(src) +\procedure wikitext-example-without-html(src) <div class="doc-example"> - -<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/> - -<$codeblock code=<<__src__>>/> - -That renders as: - -<$macrocall $name="__src__"/> - + <$macrocall $name="copy-to-clipboard-above-right" src=<<src>>/> + <$codeblock code=<<src>>/> + <p> + That renders as: + </p> + <$transclude $variable="src" $mode="block"/> </div> \end -\define wikitext-example-table-header() <thead><tr><th/><th>wiki text</th><th>renders as</th></tr></thead> +\procedure wikitext-example-table-header() <thead><tr><th/><th>wiki text</th><th>renders as</th></tr></thead> -\define wikitext-example-table-row(id, code) - <tr> -<th><<__id__>></th><td><$codeblock code=<<__code__>>/></td><td> - -<<__code__>> -</td> +\procedure wikitext-example-table-row(id, code) +<tr> + <th><<id>></th> + <td><$codeblock code=<<code>>/></td> + <td><<code>></td> </tr> \end -\define tw-code(tiddler) +\procedure tw-code(tiddler) <$codeblock language={{$tiddler$!!type}} code={{$tiddler$}}/> \end -\define tw-code-link(tiddler) +\procedure tw-code-link(tiddler) [[$tiddler$]]: - <<tw-code $tiddler$>> \end -\define flex-card(class,bordercolor:"",backgroundcolor:"",textcolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description",linkField:"link") -\whitespace trim -<$link class={{{ [<__class__>addprefix[tc-card ]] }}} to={{{ [<currentTiddler>get<__linkField__>else<currentTiddler>] }}}> - <div class="tc-card-accent" style.borderTop={{{ [<__bordercolor__>!is[blank]addprefix[5px solid ]] }}} style.background={{!!background}} style.backgroundColor=<<__backgroundcolor__>> style.color=<<__textcolor__>> style.fill=<<__textcolor__>>> +\procedure flex-card(class,bordercolor:"",backgroundcolor:"",textcolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description",linkField:"link") +<$link class={{{ [<class>addprefix[tc-card ]] }}} to={{{ [<currentTiddler>get<linkField>else<currentTiddler>] }}}> + <div class="tc-card-accent" style.borderTop={{{ [<bordercolor>!is[blank]addprefix[5px solid ]] }}} style.background={{!!background}} style.backgroundColor=<<backgroundcolor>> style.color=<<textcolor>> style.fill=<<textcolor>>> <$list filter="[<currentTiddler>has[ribbon-text]]" variable="ignore"> <div class="tc-card-ribbon-wrapper"> <div class="tc-card-ribbon" style.backgroundColor={{{ [<currentTiddler>get[ribbon-color]else[red]] }}}> @@ -108,21 +100,21 @@ That renders as: </div> </div> </$list> - <$list filter="[<currentTiddler>has<__imageField__>]" variable="ignore"> + <$list filter="[<currentTiddler>has<imageField>]" variable="ignore"> <div class="tc-card-image"> - <$image source={{{ [<currentTiddler>get<__imageField__>] }}}/> + <$image source={{{ [<currentTiddler>get<imageField>] }}}/> </div> </$list> - <div class="tc-card-title"><$transclude field=<<__captionField__>>><$view field="title"/></$transclude></div> - <$list filter="[<__subtitle__>!is[blank]]" variable="ignore"> + <div class="tc-card-title"><$transclude field=<<captionField>>><$view field="title"/></$transclude></div> + <$list filter="[<subtitle>!is[blank]]" variable="ignore"> <div class="tc-card-subtitle"> - <$text text=<<__subtitle__>>/> + <$text text=<<subtitle>>/> </div> </$list> <div class="tc-card-icon"><$transclude tiddler={{!!icon}}/></div> <div class="tc-card-body-wrapper"> <div class="tc-card-body"> - <$transclude field=<<__descriptionField__>> mode="block"/> + <$transclude field=<<descriptionField>> mode="block"/> </div> <div class="tc-card-body-clear"> </div> diff --git a/editions/tw5.com/tiddlers/tag-picker Macro (Examples).tid b/editions/tw5.com/tiddlers/tag-picker Macro (Examples).tid new file mode 100644 index 000000000..1fc150dcc --- /dev/null +++ b/editions/tw5.com/tiddlers/tag-picker Macro (Examples).tid @@ -0,0 +1,69 @@ +created: 20230616104546608 +modified: 20240214174032498 +tags: [[tag-picker Macro]] [[Macro Examples]] +title: tag-picker Macro (Examples) +type: text/vnd.tiddlywiki + +<<.warning """The first example will set the tag of the <<.tid currentTiddler>> so you should copy / paste it to a new tiddler for testing. Otherwise you'll change "this tiddler" """>> + +<$macrocall $name=".example" n="1" +eg="""Use all existing tags and set the ''tags'' field here: <<tag-picker>> +"""/> + +---- + +<$let transclusion=test> + +<<.tip """The following examples use a temporary tiddler: $:/temp/test/tag-picker. So this tiddler will not be changed """>> + + +<$macrocall $name=".example" n="2" +eg="""$:/temp/test/tag-picker ''tags'': <$text text={{{ [[$:/temp/test/tag-picker]get[tags]enlist-input[]join[, ]else[n/a]] }}}/> + +Use all existing tags and set the $:/temp/test/tag-picker ''tags'' field: <<tag-picker tiddler:"$:/temp/test/tag-picker">> +"""/> + +---- + +<<.tip """Use the following example to populate the $:/temp/test/tag-picker ''foo''-field, which are needed by some examples below """>> + +<$macrocall $name=".example" n="3" +eg="""$:/temp/test/tag-picker ''foo'': <$text text={{{ [[$:/temp/test/tag-picker]get[foo]enlist-input[]join[, ]else[n/a]] }}}/> + +Use all existing tags and set the $:/temp/test/tag-picker ''foo'' field: <<tag-picker tagField:"foo" tiddler:"$:/temp/test/tag-picker">> +"""/> + +---- + +<<.tip """The following example expects some values in the "foo" field of the tiddler $:/temp/test/tag-picker, which can be created by the example above.""">> + +<$macrocall $name=".example" n="4" eg="""\procedure listSource() $:/temp/test/tag-picker + +$:/temp/test/tag-picker foo: <$text text={{{ [[$:/temp/test/tag-picker]get[foo]enlist-input[]join[, ]else[n/a]] }}}/><br> +$:/temp/test/tag-picker bar: <$text text={{{ [[$:/temp/test/tag-picker]get[bar]enlist-input[]join[, ]else[n/a]] }}}/> + +Use $:/temp/test/tag-picker ''foo'' field as source and set ''bar'': <<tag-picker tagField:"bar" tagListFilter:"[<listSource>get[foo]enlist-input[]]" tiddler:"$:/temp/test/tag-picker">> +"""/> + +---- + +<<.tip """The following example expects some values in the "foo" field of the tiddler $:/temp/test/tag-picker, which can be created by the example above.<br> +It will also add completely new tags to the bar-field and the source tiddlers foo-field. New tags can be entered by typing into the tag-name input +""">> + +<$macrocall $name=".example" n="5" eg=""" +\procedure listSource() $:/temp/test/tag-picker +\procedure listSourceField() foo + +\procedure addNewTagToSource() + <$action-listops $tiddler=<<listSource>> $field=<<listSourceField>> $subfilter='[<listSource>get<listSourceField>enlist-input[]] [<tag>trim[]]'/> +\end + +$:/temp/test/tag-picker foo: <$text text={{{ [[$:/temp/test/tag-picker]get[foo]enlist-input[]join[, ]else[n/a]] }}}/><br> +$:/temp/test/tag-picker ''bar'': <$text text={{{ [[$:/temp/test/tag-picker]get[bar]enlist-input[]join[, ]else[n/a]] }}}/> + +Use $:/temp/test/tag-picker ''foo'' field as source and set ''bar'': <$macrocall $name="tag-picker" tagField="bar" tagListFilter="[<listSource>get<listSourceField>enlist-input[]]" tiddler="$:/temp/test/tag-picker" actions=<<addNewTagToSource>>/> + +"""/> + +</$let> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/variables/Variables.tid b/editions/tw5.com/tiddlers/variables/Variables.tid index 65ad96b31..116f3c9a0 100644 --- a/editions/tw5.com/tiddlers/variables/Variables.tid +++ b/editions/tw5.com/tiddlers/variables/Variables.tid @@ -6,11 +6,12 @@ type: text/vnd.tiddlywiki !! Introduction -A <<.def variable>> is a snippet of text that can be accessed by name. The text is referred to as the variable's <<.def value>>. +* A <<.def variable>> is a ''snippet of text'' that can be accessed by name. +* The text is referred to as the variable's <<.def value>>. -Variables are defined by [[widgets|Widgets]]. Several core widgets define variables, the most common being the <<.wlink SetWidget>>, <<.wlink LetWidget>> and <<.wlink ListWidget>> widgets. +Variables are defined by [[widgets|Widgets]]. Several core widgets define variables, the most common being the <<.wlink LetWidget>>, <<.wlink SetWidget>> and <<.wlink ListWidget>> widgets. -The values of variables are available to descendant widgets, including transcluded content. For example, within each tiddler in the main story river the variable "currentTiddler" is set to the title of the tiddler. +The values of variables are available to descendant widgets, including transcluded content. For example, within each tiddler in the main story river the variable <<.var currentTiddler>> is set to the title of the tiddler. Variables can also be overwritten by descendent widgets defining variables of the same name, thus binding a different snippet to that name for the scope of the children of the widget. diff --git a/editions/tw5.com/tiddlers/variables/examples/tv-get-export-image-link.tid b/editions/tw5.com/tiddlers/variables/examples/tv-get-export-image-link.tid index 36e151b44..2cafd8f08 100644 --- a/editions/tw5.com/tiddlers/variables/examples/tv-get-export-image-link.tid +++ b/editions/tw5.com/tiddlers/variables/examples/tv-get-export-image-link.tid @@ -1,11 +1,17 @@ created: 20150228124038000 +modified: 20240310134432122 tags: [[tv-get-export-image-link Variable]] [[Variable Examples]] title: tv-get-export-image-link Variable (Examples) type: text/vnd.tiddlywiki -This example fetches [[the TiddlyWiki icon|https://www.tiddlywiki.com/favicon.ico]]: +This example fetches [[the TiddlyWiki icon|https://www.tiddlywiki.com/favicon.ico]] <$importvariables filter="$:/editions/tw5.com/macro-examples/tv-get-export-image-link"> <$codeblock code={{$:/editions/tw5.com/macro-examples/tv-get-export-image-link}}/> <$macrocall $name=".example" n="1" eg="""[img[favicon.ico]]"""/> </$importvariables> + +Also see: + +* [[substitute Operator]] +* [[Substituted Attribute Values]] diff --git a/editions/tw5.com/tiddlers/variables/tv-filter-export-link Variable.tid b/editions/tw5.com/tiddlers/variables/tv-filter-export-link Variable.tid index f9800b43f..7f3f06c4d 100644 --- a/editions/tw5.com/tiddlers/variables/tv-filter-export-link Variable.tid +++ b/editions/tw5.com/tiddlers/variables/tv-filter-export-link Variable.tid @@ -7,8 +7,6 @@ type: text/vnd.tiddlywiki <<.from-version "5.1.15">> The <<.def tv-filter-export-link>> [[variable|Variables]] controls the value of the `href` attribute on the HTML `a` element generated by the <<.wlink LinkWidget>> widget. If defined, it takes precedence over the [[tv-wikilink-template Variable]]. -<<.this-is-static-link-variable>> - The variable is treated as a filter that is given the target tiddler title as input. The filter is evaluated and the first result is used as the `href` attribute. For example: @@ -18,3 +16,5 @@ For example: ``` See also the <<.vlink tv-get-export-link>> variable, which dominates over this one. + +<<.this-is-static-link-variable>> diff --git a/editions/tw5.com/tiddlers/variables/tv-get-export-image-link.tid b/editions/tw5.com/tiddlers/variables/tv-get-export-image-link.tid index 84837b907..cb7f38e47 100644 --- a/editions/tw5.com/tiddlers/variables/tv-get-export-image-link.tid +++ b/editions/tw5.com/tiddlers/variables/tv-get-export-image-link.tid @@ -1,13 +1,13 @@ -created: 20150228122257000 -modified: 20150228130940000 -title: tv-get-export-image-link Variable -tags: Variables [[Core Variables]] [[Configuration Variables]] -type: text/vnd.tiddlywiki caption: tv-get-export-image-link +created: 20150228122257000 +modified: 20240310133708578 +tags: Variables [[Core Variables]] [[Configuration Variables]] +title: tv-get-export-image-link Variable +type: text/vnd.tiddlywiki The <<.def tv-get-export-image-link>> [[variable|Variables]] controls the value of the `src` attribute on the HTML `img` element generated by the <<.wlink ImageWidget>> widget when the value of its `source` attribute is not the title of a tiddler. -The variable should be a [[macro|Macros]] with the following parameter: +The variable should be a [[function|Functions]] with the following parameter: ;src : The value of the `source` attribute -- equivalent to the image name specified in <$link to="Images in WikiText">the shorthand syntax</$link> `[img[source]]` diff --git a/editions/tw5.com/tiddlers/variables/tv-get-export-link.tid b/editions/tw5.com/tiddlers/variables/tv-get-export-link.tid index 890cf265c..d632aab18 100644 --- a/editions/tw5.com/tiddlers/variables/tv-get-export-link.tid +++ b/editions/tw5.com/tiddlers/variables/tv-get-export-link.tid @@ -1,17 +1,17 @@ +caption: tv-get-export-link created: 20150228114004000 modified: 20150228130943000 -title: tv-get-export-link Variable tags: Variables [[Core Variables]] [[Configuration Variables]] +title: tv-get-export-link Variable type: text/vnd.tiddlywiki -caption: tv-get-export-link The <<.def tv-get-export-link>> [[variable|Variables]] controls the value of the `href` attribute on the HTML `a` element generated by the <<.wlink LinkWidget>> widget. -<<.this-is-static-link-variable>> - The variable should be a [[macro|Macros]] with the following parameter: ;to : The title of the target tiddler of the link, with no escaping See also <<.vlink tv-wikilink-template>>. If both that variable and this one exist, this one dominates. + +<<.this-is-static-link-variable>> diff --git a/editions/tw5.com/tiddlers/variables/tv-wikilink-template.tid b/editions/tw5.com/tiddlers/variables/tv-wikilink-template.tid index 6fdac1410..acb005eec 100644 --- a/editions/tw5.com/tiddlers/variables/tv-wikilink-template.tid +++ b/editions/tw5.com/tiddlers/variables/tv-wikilink-template.tid @@ -7,8 +7,6 @@ type: text/vnd.tiddlywiki The <<.def tv-wikilink-template>> [[variable|Variables]] controls the value of the `href` attribute on the HTML `a` element generated by the <<.wlink LinkWidget>> widget. The <<.vlink tv-filter-export-link>>, if defined, it takes precedence over the <<.vlink tv-wikilink-template>> variable. -<<.this-is-static-link-variable>> - The variable is treated as if it was a [[macro|Macros]] with the following parameters: ;uri_encoded @@ -21,3 +19,5 @@ The variable is treated as if it was a [[macro|Macros]] with the following param The variable defaults to `#$uri_encoded$`. See also the <<.vlink tv-get-export-link>> variable, which dominates over this one. + +<<.this-is-static-link-variable>> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/webserver/Using the external JavaScript template.tid b/editions/tw5.com/tiddlers/webserver/Using the external JavaScript template.tid index 75b5f1484..75d38cc29 100644 --- a/editions/tw5.com/tiddlers/webserver/Using the external JavaScript template.tid +++ b/editions/tw5.com/tiddlers/webserver/Using the external JavaScript template.tid @@ -1,5 +1,5 @@ created: 20180905075846391 -modified: 20230319130830880 +modified: 20240413045138914 tags: [[WebServer Guides]] title: Using the external JavaScript template type: text/vnd.tiddlywiki @@ -20,7 +20,7 @@ The remaining inefficiency when working in the client server configuration is th ! Using the external ~JavaScript template with the client-server configuration -The mechanism is activated by setting the [[root-tiddler|WebServer Parameter: root-tiddler]] parameter to `$:/core/save/all-external-js`. This template externalises ~TiddlyWiki's core ~JavaScript into a separate file. For example, the following command will start your server with caching enabled. It will transfer the wiki with two GET requests, and the core can be cached by the browser. +The mechanism is activated by setting the [[root-tiddler|WebServer Parameter: root-tiddler]] parameter to `$:/core/save/all-external-js`. This template externalises ~TiddlyWiki's core ~JavaScript into a separate file. For example, the following command will [[start your server with caching enabled|WebServer Parameter: use-browser-cache]]. It will transfer the wiki with two GET requests, and the core can be cached by the browser. ``` tiddlywiki YOUR_WIKI_FOLDER --listen 'root-tiddler=$:/core/save/all-external-js' use-browser-cache=yes diff --git a/editions/tw5.com/tiddlers/webserver/Using the integrated static file server.tid b/editions/tw5.com/tiddlers/webserver/Using the integrated static file server.tid index 515730a3b..91544551e 100644 --- a/editions/tw5.com/tiddlers/webserver/Using the integrated static file server.tid +++ b/editions/tw5.com/tiddlers/webserver/Using the integrated static file server.tid @@ -1,5 +1,5 @@ created: 20180703095630828 -modified: 20180703100445719 +modified: 20240413045124764 tags: [[WebServer Guides]] title: Using the integrated static file server type: text/vnd.tiddlywiki @@ -13,4 +13,19 @@ Static files can be referenced directly: * `[ext[./files/a-big-document.pdf]]` - to make a link to a PDF * `[img[./files/a-big-image.png]]` - to embed an image -Alternatively, the ''_canonical_uri'' field can be used to reference the files as [[external tiddlers|ExternalImages]]. \ No newline at end of file +Alternatively, the ''_canonical_uri'' field can be used to reference the files as [[external tiddlers|ExternalImages]]. + +If [[WebServer Parameter: use-browser-cache]] is used, these files will be cached by the client's browser to save on bandwidth. In this case, the `cache busting strategy` can be used to make sure the client always has the latest updated files. + + +<<< +https://javascript.plainenglish.io/what-is-cache-busting-55366b3ac022 + +!! Cache Busting + +There are a couple different ways of changing the names of files so that they will load when they change. One way is to use version numbers and have them somewhere in the file name when loading. You could have a subdirectory for every version, `v1/index.js` `v2/index.css` . You could also have the version in queries in the URLs, `index.js?v1` , `index.css?v2` . + +Another way is to change the name of the file, `index.v1.js` , `index.v2.css` . These ways are not as manageable because this can become very hard once you have a ton of files that are being changed. + +A more popular and manageable way is to keep hashes inside the file names. Hashes, if you don’t know, are fixed length character representations of any content and they are irreversible, meaning you can get the hash from the file but you can’t get the file from the hash. Hashes are perfect for this, because when a file changes its hash will change, so if we keep the hash inside the filename `index.[someHashHere].js` browsers will detect it and load it instead of an old file. +<<< diff --git a/editions/tw5.com/tiddlers/webserver/WebServer Parameter_ use-browse-cache.tid b/editions/tw5.com/tiddlers/webserver/WebServer Parameter_ use-browse-cache.tid new file mode 100644 index 000000000..2d0693aa2 --- /dev/null +++ b/editions/tw5.com/tiddlers/webserver/WebServer Parameter_ use-browse-cache.tid @@ -0,0 +1,25 @@ +caption: use-browse-cache +created: 20240413042652008 +modified: 20240413050841387 +tags: [[WebServer Parameters]] +title: WebServer Parameter: use-browser-cache +type: text/vnd.tiddlywiki + +The [[web server configuration parameter|WebServer Parameters]] ''use-browser-cache=yes'' activates 200 OK browser caching via the `Cache-Control` header and a smart a Etag header: + +* The server javascript creates an MD5 `hash` object. +* Adds the data of the current `request:response` (for example: json text or an image binary) to the hash object. +* Adds the current `headers` of the response to the hash object. +* If the response data has an `encoding` value, adds the encoding to the hash object. +* Calculates the final MD5 hash string as a `contentDigest` javascript variable, and saves it as an `Etag: "<<contentDigest>>"` header. + +If the incoming request contains a header named `if-none-match`, then the server will check the generated Etag against all values. + +If any `if-none-match` value DOES match the current Etag, the server will send a `304 NOT MODIFIED` response with the current response headers, instead of the data with a `200 OK` response. + +This saves bandwidth, as the client can be sure they have already received the exact data and has it in their current cache. + +If ''use-browser-cache=no'' (or any other value including null), then the server will return a `Cache-Control: no-store` header by default. + +If any customer server route module defines custom `Cache-Control` header behavior, then the server will pass that header through instead of the default. + diff --git a/editions/tw5.com/tiddlers/webserver/WebServer.tid b/editions/tw5.com/tiddlers/webserver/WebServer.tid index c1ab5ae2a..afa3fe749 100644 --- a/editions/tw5.com/tiddlers/webserver/WebServer.tid +++ b/editions/tw5.com/tiddlers/webserver/WebServer.tid @@ -1,5 +1,5 @@ created: 20180626150526207 -modified: 20181216181934282 +modified: 20240413043741157 tags: ListenCommand ServerCommand Features title: WebServer type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/widgets/ActionDeleteFieldWidget.tid b/editions/tw5.com/tiddlers/widgets/ActionDeleteFieldWidget.tid index 2855804fd..5b797232b 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionDeleteFieldWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionDeleteFieldWidget.tid @@ -16,6 +16,7 @@ The ''action-deletefield'' widget is invisible. Any content within it is ignored |!Attribute |!Description | |$tiddler |The title of the tiddler whose fields are to be modified (if not provided defaults to the [[current tiddler|Current Tiddler]]) | |$field |Optional name of a field to delete | +|$timestamp |<<.from-version "5.3.4">> Specifies whether the timestamp(s) of the target tiddler will be updated (''modified'' and ''modifier'', plus ''created'' and ''creator'' for newly created tiddlers). Can be "yes" (the default) or "no" | |//{any attributes not starting with $}// |Each attribute name specifies a field to be deleted. The attribute value is ignored and need not be specified | ! Examples diff --git a/editions/tw5.com/tiddlers/widgets/GenesisWidget.tid b/editions/tw5.com/tiddlers/widgets/GenesisWidget.tid index 695345251..7379ef3c4 100644 --- a/editions/tw5.com/tiddlers/widgets/GenesisWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/GenesisWidget.tid @@ -1,6 +1,6 @@ caption: genesis created: 20221101100729587 -modified: 20230115101800345 +modified: 20231214093716044 tags: Widgets title: GenesisWidget type: text/vnd.tiddlywiki @@ -15,6 +15,7 @@ The content of the <<.wid genesis>> widget is used as the content of the dynamic |!Attribute |!Description | |$type |The type of widget or element to create (an initial `$` indicates a widget, otherwise an HTML element will be created) | +|$remappable |Set to "no" to prevent the generated widget from being affected by any custom widget overrides. Needed when invoking the original widget within a custom widget definition | |$names |An optional filter evaluating to the names of a list of attributes to be applied to the widget | |$values |An optional filter evaluating to the values corresponding to the list of names specified in <<.attr $names>> | |$mode |An optional override of the parsing mode. May be "inline" or "block" | diff --git a/editions/tw5.com/tiddlers/widgets/ImageWidget.tid b/editions/tw5.com/tiddlers/widgets/ImageWidget.tid index 0f4bd9012..105a71311 100644 --- a/editions/tw5.com/tiddlers/widgets/ImageWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ImageWidget.tid @@ -25,6 +25,38 @@ Any content of the `<$image>` widget is ignored. The width and the height can be specified as pixel values (eg "23" or "23px") or percentages (eg "23%"). They are both optional; if not provided the browser will use CSS rules to size the image. +! Responsive images and `<map>` + +[[Image maps area|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area]] coordinates are numbers of CSS pixels, therefore they do not scale. If you want to use responsive images, you can use a `svg` and `foreignObject`: + +<svg viewBox="0 0 330 333" xmlns="http://www.w3.org/2000/svg" width="50%"> +<foreignObject width="100%" height="100%"> +[img[Tiddler Fishes.svg]] +</foreignObject> +<g transform="translate(-216 -290)" > +<a href="#:[[Orange fish]]"> +<title>Orange fish + + + +Cyan fish + + + +Purple fish + + + +Green fish + + + +Blue fish + + + + + ! Image Status Classes <> The following CSS classes are automatically added to the `` element to indicate the status of the image. Note that only one of these classes will be added at the same time. diff --git a/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid b/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid index 6c52f0025..ddf95d5cf 100644 --- a/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid @@ -60,6 +60,16 @@ This wiki text shows how to display a list within the scrollable widget: Set current scroll position to 100,100 +<$button> +<$action-setfield $tiddler="$:/my-scroll-position" scroll-top={{{ [{$:/my-scroll-position!!scroll-top}subtract[10]] }}}/> +Scroll up by 10 pixels + + +<$button> +<$action-setfield $tiddler="$:/my-scroll-position" scroll-top={{{ [{$:/my-scroll-position!!scroll-top}add[10]] }}}/> +Scroll down by 10 pixels + + < <$list filter='[tag[Reference]]'> diff --git a/editions/tw5.com/tiddlers/widgets/SetWidget.tid b/editions/tw5.com/tiddlers/widgets/SetWidget.tid index fe05e8faa..f5b0786f3 100644 --- a/editions/tw5.com/tiddlers/widgets/SetWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/SetWidget.tid @@ -1,6 +1,6 @@ caption: set created: 20131115182700000 -modified: 20220523075522407 +modified: 20230720174707977 tags: Widgets title: SetWidget type: text/vnd.tiddlywiki @@ -120,3 +120,19 @@ src='<$set name="myTiddler" value="HelloThere"> '/> <<< + +!! Using the Set Widget to Create Global Variables + +There are times when it makes sense to use the features of the [[SetWidget]] rather than procedures or functions to create global variables. This can be accomplished by placing the set variable widget in a tiddler that is tagged [[$:/tags/Global|SystemTag: $:/tags/Global]]. If multiple variables are required, the set variable widget can be nested as shown here: + +<<< +
+ +``` +<$set name="myGlobalVariable" value="I am global"> + <$set name="myOtherGlobalVariable" value="I am also a global variable."> + + +``` +
+<<< diff --git a/editions/tw5.com/tiddlers/widgets/Widgets.tid b/editions/tw5.com/tiddlers/widgets/Widgets.tid index 5b682766f..66793f47d 100644 --- a/editions/tw5.com/tiddlers/widgets/Widgets.tid +++ b/editions/tw5.com/tiddlers/widgets/Widgets.tid @@ -1,14 +1,14 @@ created: 20140908130500000 -modified: 20150219182745000 +modified: 20240326164134356 tags: Concepts Reference title: Widgets type: text/vnd.tiddlywiki ~TiddlyWiki's display is driven by an underlying collection of <<.def widgets>>. These are organised into a tree structure: each widget has a parent widget and zero or more child widgets. -~TiddlyWiki generates this <<.def "widget tree">> by parsing the WikiText of tiddlers. Each component of the WikiText syntax, including even the trivial case of ordinary text, generates a corresponding widget. The widget tree is an intermediate representation that is subsequently rendered into the actual display. +~TiddlyWiki generates this <<.def "widget tree">> by parsing the ~WikiText of tiddlers. Each component of the ~WikiText syntax, including even the trivial case of ordinary text, generates a corresponding widget. The widget tree is an intermediate representation that is subsequently rendered into the actual display. -Widgets are analogous to elements in an HTML document. Indeed, HTML tags in WikiText generate dedicated <<.def "element widgets">>. +Widgets are analogous to elements in an HTML document. Indeed, HTML tags in ~WikiText generate dedicated <<.def "element widgets">>. Each class of widget contributes a specific ability to the overall functionality, such as the ability to <<.wlink2 "display an image" ImageWidget>> or <<.wlink2 "a button" ButtonWidget>>, to <<.wlink2 "call a macro" MacroCallWidget>> or <<.wlink2 "transclude text from elsewhere" TranscludeWidget>>, or to [[mark a piece of text as a heading|HTML in WikiText]]. @@ -16,4 +16,4 @@ The more specialised widgets use a general-purpose [[widget syntax|Widgets in Wi The following classes of widget are built into the core: -<> +<> diff --git a/editions/tw5.com/tiddlers/Tables in WikiText CSS Utility Classes.tid b/editions/tw5.com/tiddlers/wikitext/Tables in WikiText CSS Utility Classes.tid similarity index 100% rename from editions/tw5.com/tiddlers/Tables in WikiText CSS Utility Classes.tid rename to editions/tw5.com/tiddlers/wikitext/Tables in WikiText CSS Utility Classes.tid diff --git a/editions/tw5.com/tiddlers/wikitext/Transclusion and Substitution.tid b/editions/tw5.com/tiddlers/wikitext/Transclusion and Substitution.tid index 8d0a52cdc..b63d9a0a0 100644 --- a/editions/tw5.com/tiddlers/wikitext/Transclusion and Substitution.tid +++ b/editions/tw5.com/tiddlers/wikitext/Transclusion and Substitution.tid @@ -1,5 +1,5 @@ created: 20141018090608643 -modified: 20230419103154329 +modified: 20231030124224424 tags: WikiText title: Transclusion and Substitution type: text/vnd.tiddlywiki @@ -27,7 +27,7 @@ As described in [[HTML in WikiText]], you can also transclude tiddler field valu <$text text={{MyTiddler}}/> ``` -As described in [[Introduction to filter notation]], you can also transclude tiddler field values as filter operands. For example: +As described in [[Introduction to filter notation]], you can also transclude tiddler field values using the [[filter syntax|Filter Syntax]]. For example: ``` {{{ [tag{TiddlerContainingMyTag}] }}} @@ -47,7 +47,7 @@ As described in [[HTML in WikiText]], you can also transclude a variable as the <$text text=<>/> ``` -As described in [[Introduction to filter notation]], you can also transclude a variable as the value of a filter operand. For example: +As described in [[Introduction to filter notation]], you can also transclude a variable as the value of a filter parameter using the [[filter syntax|Filter Syntax]]. For example: ``` {{{ [tag] }}} @@ -55,6 +55,6 @@ As described in [[Introduction to filter notation]], you can also transclude a v ! Textual Substitution -Textual substitution occurs when the value of a macro/variable is used. It is described in [[Macros]]. +Textual substitution occurs when the value of a macro/variable is used. It is described in [[Substituted Attribute Values]] and [[substitute Operator]] -The key difference between substitution and transclusion is that substitution occurs before WikiText parsing. This means that you can use substitution to build WikiText constructions. Transclusions are processed independently, and cannot be combined with adjacent text to define WikiText constructions. +The key difference between substitution and transclusion is that substitution occurs before WikiText parsing. This means that you can use substitution to build ~WikiText constructions. Transclusions are processed independently, and cannot be combined with adjacent text to define ~WikiText constructions. diff --git a/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid index 838cd0ade..29f8bf9f1 100644 --- a/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid +++ b/editions/tw5.com/tiddlers/wikitext/Transclusion in WikiText.tid @@ -1,6 +1,6 @@ caption: Transclusion created: 20131205160146648 -modified: 20220122193352028 +modified: 20240102070417483 tags: WikiText title: Transclusion in WikiText type: text/vnd.tiddlywiki @@ -26,23 +26,44 @@ You can also use a TextReference instead of a tiddler title: !! Filtered Transclusion -A similar syntax can be used to transclude a list of tiddlers matching a specified [[filter|Filters]]: +A similar syntax can be used to generate or transclude a list of tiddlers matching a specified [[filter|Filters]]: ``` {{{ [tag[mechanism]] }}} -{{{ [tag[mechanism]] ||TemplateTitle}}} +{{{ [tag[mechanism]]||TemplateTitle }}} ``` -! Generated Widgets +In contrast to [[Filtered Attribute Values]], all items matching the filter are transcluded and not only the first. -The WikiText transclusion syntax generates a TiddlerWidget wrapped around a TranscludeWidget. For example, `{{MyTiddler||MyTemplate!!myField}}` generates the following pair of widgets: +!! Generated Widgets + +The WikiText transclusion syntax generates a TiddlerWidget wrapped around a TranscludeWidget. For example, `{{MyTiddler||TemplateTitle}}` generates the following pair of widgets: ``` <$tiddler tiddler="MyTiddler"> -<$transclude $tiddler="MyTemplate" $field="myField"/> + <$transclude $tiddler="TemplateTitle"/> ``` +The filtered transclusion syntax `{{{ [tag[mechanism]] }}}` generates the following widgets + +``` +<$list filter="[tag[mechanism]]"> + <$link /> + +``` +or, when used with a template, `{{{ [tag[mechanism]]||TemplateTitle }}}` expands to + +``` +<$list filter="[tag[mechanism]]"> + <$transclude tiddler="TemplateTitle" /> + +``` + +<<.tip "Install the //Internals// plugin to enable the display of the generated widget tree in the preview pane of the editor">> + +--- + See also: * [[Transclusion Basic Usage]] diff --git a/editions/tw5.com/tiddlywiki.info b/editions/tw5.com/tiddlywiki.info index 87cb4d889..3cf9fbdbd 100644 --- a/editions/tw5.com/tiddlywiki.info +++ b/editions/tw5.com/tiddlywiki.info @@ -7,8 +7,11 @@ "tiddlywiki/evernote", "tiddlywiki/internals", "tiddlywiki/menubar", - "tiddlywiki/qrcode", - "tiddlywiki/innerwiki" + "tiddlywiki/innerwiki", + "tiddlywiki/confetti", + "tiddlywiki/dynannotate", + "tiddlywiki/tour", + "tiddlywiki/qrcode" ], "themes": [ "tiddlywiki/vanilla", @@ -57,8 +60,8 @@ "--render","$:/core/save/offline-external-js","[[external-]addsuffixaddsuffix[.html]]","text/plain", "--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffixaddsuffix[.js]]","text/plain"], "archive":[ - "--render","$:/core/save/all","[[archive/TiddlyWiki-]addsuffixaddsuffix[.html]]","text/plain", - "--render","$:/editions/tw5.com/download-empty","[[archive/Empty-TiddlyWiki-]addsuffixaddsuffix[.html]]","text/plain", + "--render","$:/core/save/all","[[archive/full/TiddlyWiki-]addsuffixaddsuffix[.html]]","text/plain", + "--render","$:/editions/tw5.com/download-empty","[[archive/empty/Empty-TiddlyWiki-]addsuffixaddsuffix[.html]]","text/plain", "--render","[[TiddlyWiki Archive]]","archive/index.html","text/plain","$:/core/templates/static.tiddler.html", "--render","$:/core/templates/static.template.css","archive/static.css","text/plain"] }, diff --git a/languages/mk-MK/Buttons.multids b/languages/mk-MK/Buttons.multids new file mode 100644 index 000000000..a0374dc3a --- /dev/null +++ b/languages/mk-MK/Buttons.multids @@ -0,0 +1,195 @@ +title: $:/language/Buttons/ + +AdvancedSearch/Caption: напредно пребарување +AdvancedSearch/Hint: Напредно пребарување +Bold/Caption: здебелен +Bold/Hint: Здебелен формат на селекција +Cancel/Caption: откажи +Cancel/Hint: Отстрани ги промените +Clear/Caption: исчисти +Clear/Hint: Исчисти ја сликата во еднобојна позадина +Clone/Caption: клонирај +Clone/Hint: Клонирај го овој запис +Close/Caption: затвори +Close/Hint: Затвори запис +CloseAll/Caption: затвори ги сите +CloseAll/Hint: Затвори ги сите записи +CloseOthers/Caption: затвори ги другите +CloseOthers/Hint: Затвори ги сите други записи +ControlPanel/Caption: контролен панел +ControlPanel/Hint: Отвори контролен панел +CopyToClipboard/Caption: копирај до клипборд +CopyToClipboard/Hint: Копирај го овој текст до клипборд +Delete/Caption: избриши +Delete/Hint: Избриши запис +DeleteTiddlers/Caption: избриши записи +DeleteTiddlers/Hint: Избриши записи +Edit/Caption: промени +Edit/Hint: Промени запис +EditorHeight/Caption: димензија на уредник +EditorHeight/Caption/Auto: Автоматски приспособи ја димензијата за да одговара на содржината +EditorHeight/Caption/Fixed: Фиксирана димензија: +EditorHeight/Hint: Одбери димензија за уредникот на текст +Encryption/Caption: шифрирање +Encryption/ClearPassword/Caption: избриши лозинка +Encryption/ClearPassword/Hint: Избриши ја лозинката и зачувај ја оваа википедија без шифрирање +Encryption/Hint: Постави или избриши лозинка за меморирање на оваа википедија +Encryption/SetPassword/Caption: постави лозинка +Encryption/SetPassword/Hint: Постави лозинка за меморирање на оваа википедија со шифрирање +Excise/Caption: проектирај +Excise/Caption/Excise: Изврши проекција +Excise/Caption/MacroName: Име на макро: +Excise/Caption/NewTitle: Наслов на новиот запис: +Excise/Caption/Replace: Карактеристика на проектираниот текст: +Excise/Caption/Replace/Link: линк +Excise/Caption/Replace/Macro: макро +Excise/Caption/Replace/Transclusion: огледало +Excise/Caption/Tag: Означи го новиот запис со насловот од овој запис +Excise/Caption/TiddlerExists: Предупредување: записот веќе постои +Excise/Hint: Проектирај селектиран текст во нов запис +ExportPage/Caption: експортирај сè +ExportPage/Hint: Експортирај ги сите записи +ExportTiddler/Caption: експортирај +ExportTiddler/Hint: Експортирај го овој запис +ExportTiddlers/Caption: експортирај записи +ExportTiddlers/Hint: Експортирај записи +Fold/Caption: превиткај запис +Fold/FoldBar/Caption: превиткана хоризонтала +Fold/FoldBar/Hint: Дополнителна хоризонтала за превиткување и одвиткување на записи +Fold/Hint: Превиткај ја содржината на овој запис +FoldAll/Caption: превиткај ги сите +FoldAll/Hint: Превиткај ги содржините на сите отворени записи +FoldOthers/Caption: превиткај ги другите +FoldOthers/Hint: Превиткај ги содржините на другите отворени записи +FullScreen/Caption: цел-екран +FullScreen/Hint: Вклучи или исклучи режим за цел-екран +Heading1/Caption: наслов 1 +Heading1/Hint: Формат за наслов 1 +Heading2/Caption: наслов 2 +Heading2/Hint: Формат за наслов 2 +Heading3/Caption: наслов 3 +Heading3/Hint: Формат за наслов 3 +Heading4/Caption: наслов 4 +Heading4/Hint: Формат за наслов 4 +Heading5/Caption: наслов 5 +Heading5/Hint: Формат за наслов 5 +Heading6/Caption: наслов 6 +Heading6/Hint: Формат за наслов 6 +Help/Caption: помош +Help/Hint: Прикажи го помошниот панел +HideSideBar/Caption: скриј странично мени +HideSideBar/Hint: Сокри го страничното мени +Home/Caption: почетна +Home/Hint: Отвори ги почетните записи +Import/Caption: импортирај +Import/Hint: Импортирај различни фајлови (текст, слика, ТидлиВики...) +Info/Caption: инфо +Info/Hint: Прикажи повеќе информации за овој запис +Italic/Caption: закосен +Italic/Hint: Закосен формат на селекција +Language/Caption: јазик +Language/Hint: Одбери јазик за интерфејс +LayoutSwitcher/Caption: распоред +LayoutSwitcher/Hint: Отвори го менувачот за распоред +LineWidth/Caption: дебелина +LineWidth/Hint: Дебелина на четка +Link/Caption: линк +Link/Hint: Креирај линк до друг запис +Linkify/Caption: вики-линк +Linkify/Hint: Квадратни загради на селекција +ListBullet/Caption: листа со точки +ListBullet/Hint: Листа со точки +ListNumber/Caption: нумерирана листа +ListNumber/Hint: Нумерирана листа +Manager/Caption: менаџер на записи +Manager/Hint: Отвори го менаџерот на записи +MonoBlock/Caption: еднопростран блок +MonoBlock/Hint: Еднопростран блок +MonoLine/Caption: еднопространи +MonoLine/Hint: Еднопространи карактери +More/Caption: повеќе +More/Hint: Повеќе опции +NetworkActivity/Caption: мрежна активност +NetworkActivity/Hint: Исклучи ги сите мрежни активности +NewHere/Caption: нов запис оттука +NewHere/Hint: Креирај нов запис означен со овој запис +NewImage/Caption: нова слика +NewImage/Hint: Креирај нова слика +NewJournal/Caption: ново во дневник +NewJournal/Hint: Креирај нов запис во дневникот +NewJournalHere/Caption: ново во дневник оттука +NewJournalHere/Hint: Креирај нов запис во дневникот означен со овој запис +NewMarkdown/Caption: нов Markdown запис +NewMarkdown/Hint: Креирај нов Markdown запис +NewTiddler/Caption: нов запис +NewTiddler/Hint: Креирај нов запис +Opacity/Caption: видливост +Opacity/Hint: Видливост на боја +OpenWindow/Caption: отвори во нов прозорец +OpenWindow/Hint: Отвори го записот во нов прозорец +Paint/Caption: палета на бои +Paint/Hint: Одбери боја за цртање +Palette/Caption: палета +Palette/Hint: Одбери палета со бои +Permalink/Caption: директен линк +Permalink/Hint: Копирај ја адресата за директен линк до овој запис +Permaview/Caption: директен приказ +Permaview/Hint: Копирај ја адресата за директен приказ до сите отворени записи +Picture/Caption: слика +Picture/Hint: Вметни слика +Preview/Caption: преглед +Preview/Hint: Прикажи рендер во уредникот +PreviewType/Caption: видови на приказ +PreviewType/Hint: Одбери приказ +Print/Caption: принт +Print/Hint: Испринтај ги отворените записи +Quote/Caption: цитат +Quote/Hint: Цитат +Refresh/Caption: освежи +Refresh/Hint: Целосно освежување на отворената википедија +RotateLeft/Caption: ротирај лево +RotateLeft/Hint: Ротирај ја сликата за 90 степени +Save/Caption: во ред +Save/Hint: Зачувај ги промените +SaveWiki/Caption: зачувај +SaveWiki/Hint: Зачувај ги промените +ShowSideBar/Caption: прикажи странично мени +ShowSideBar/Hint: Прикажи го страничното мени +SidebarSearch/Hint: Избери го полето за пребарување во страничното мени +Size/Caption: димензии на слика +Size/Caption/Height: Висина: +Size/Caption/Resize: Постави димензија +Size/Caption/Width: Должина: +Size/Hint: Промени димензија на слика +Stamp/Caption: печат +Stamp/Caption/New: Додади свој фрагмент +Stamp/Hint: Вметни конфигуриран фрагмент +Stamp/New/Text: Запишете го тука текстот на фрагментот. Не заборавајте да додадете име (caption) подолу. +Stamp/New/Title: Име што ќе биде прикажано во листата на фрагменти +StoryView/Caption: преглед +StoryView/Hint: Одбери визуелен преглед +Strikethrough/Caption: прешкртано +Strikethrough/Hint: Прешкртан формат на селекција +Subscript/Caption: долна-зона +Subscript/Hint: Форматирај текст во долна зона +Superscript/Caption: горна-зона +Superscript/Hint: Форматирај текст во горна зона +TagManager/Caption: менаџер на ознаки +TagManager/Hint: Отвори го менаџерот на ознаки +Theme/Caption: тема +Theme/Hint: Одбери визуелна тема +Timestamp/Caption: време +Timestamp/Hint: Калкулирај го времето додека записите претрпуваат промени +Timestamp/Off/Caption: исклучено време +Timestamp/Off/Hint: Не го ажурирај времето додека записите претрпуваат промени +Timestamp/On/Caption: вклучено време +Timestamp/On/Hint: Ажурирај го времето додека записите претрпуваат промени +ToggleSidebar/Hint: Вклучи / Исклучи видливост на страничното мени +Transcludify/Caption: проекција +Transcludify/Hint: Заокружувачки загради на селекција +Underline/Caption: подвлечено +Underline/Hint: Подвлечен формат на селекција +Unfold/Caption: одвиткај запис +Unfold/Hint: Одвиткај ја содржината на овој запис +UnfoldAll/Caption: одвиткај ги сите +UnfoldAll/Hint: Одвиткај ги содржините на сите затворени записи diff --git a/languages/mk-MK/ControlPanel.multids b/languages/mk-MK/ControlPanel.multids new file mode 100644 index 000000000..d0a0ae096 --- /dev/null +++ b/languages/mk-MK/ControlPanel.multids @@ -0,0 +1,231 @@ +title: $:/language/ControlPanel/ + +Advanced/Caption: Напредно +Advanced/Hint: Системски податоци за вашето ТидлиВики +Appearance/Caption: Изглед +Appearance/Hint: Различни начини за конфигурирање на изгледот +Basics/AnimDuration/Prompt: Времетраење на анимација +Basics/AutoFocus/Prompt: Поле на фокус за нови записи +Basics/Caption: Основно +Basics/DefaultTiddlers/BottomHint: Користете [[двојни квадратни загради]] за наслови со повеќе зборови за да направите линкови кога ќе ги запишете. Или можете да изберете {{запомни ги отворените записи||$:/snippets/retain-story-ordering-button}} доколку преферирате при секое вклучување на вашето ТидлиВики да ги видите веднаш оние записи кои сте ги отвориле претходно. +Basics/DefaultTiddlers/Prompt: Почетни записи +Basics/DefaultTiddlers/TopHint: Одберете кои записи ќе бидат секогаш отворени +Basics/Language/Prompt: Одберете јазик: +Basics/NewJournal/Tags/Prompt: Ознаки за нови записи во дневникот +Basics/NewJournal/Text/Prompt: Содржина за нови записи во дневникот +Basics/NewJournal/Title/Prompt: Наслов за нови записи во дневникот +Basics/NewTiddler/Tags/Prompt: Ознаки за нови записи +Basics/NewTiddler/Title/Prompt: Наслов за нови записи +Basics/OverriddenShadowTiddlers/Prompt: Променливи сенки +Basics/RemoveTags: Ажурирај во моменталниот формат +Basics/RemoveTags/Hint: Ажурирај ги ознаките во најновиот формат +Basics/ShadowTiddlers/Prompt: Сенки +Basics/Subtitle/Prompt: Поднаслов +Basics/SystemTiddlers/Prompt: Системски +Basics/Tags/Prompt: Ознаки +Basics/Tiddlers/Prompt: Записи +Basics/Title/Prompt: Наслов на вашето ТидлиВики +Basics/Username/Prompt: Име за потпис при уредување +Basics/Version/Prompt: ТидлиВики верзија +Cascades/Caption: Каскади +Cascades/Hint: Овие глобални правила се користат за динамичко избирање на шаблони (templates). Каскадите служат како механизам за конструкција и приспособување на самиот интерфејс на ТидлиВики. +Cascades/TagPrompt: Филтери за ознаки <$macrocall $name="tag" tag=<>/> +EditorTypes/Caption: Формати +EditorTypes/Editor/Caption: Формат +EditorTypes/Hint: Овие записи одредуваат кој __формат__ се користи за специфичен __вид__ на запис. +EditorTypes/Type/Caption: Вид +EditTemplateBody/Caption: Содржина +EditTemplateBody/Hint: Овие правила се користат од основниот уредувач за да може динамички да се одреди шаблон за содржината на еден запис. +FieldEditor/Caption: Поле +FieldEditor/Hint: Овие правила се користат за динамичко одбирање на шаблон за рендерирање на поле на запис врз основа на неговото име. Се користи во самиот шаблон за уредување. +Info/Caption: Инфо +Info/Hint: Информации за вашето ТидлиВики +KeyboardShortcuts/Add/Caption: додади +KeyboardShortcuts/Add/Prompt: Напиши комбинација тука +KeyboardShortcuts/Caption: Тастатура +KeyboardShortcuts/Hint: Управување со кратенки за тастатура +KeyboardShortcuts/NoShortcuts/Caption: Нема доделена кратенка за тастатура +KeyboardShortcuts/Platform/All: За сите платформи +KeyboardShortcuts/Platform/Linux: Линукс +KeyboardShortcuts/Platform/Mac: Мекинтош +KeyboardShortcuts/Platform/NonLinux: Платформи кои не се Линукс +KeyboardShortcuts/Platform/NonMac: Платформи кои не се Мекинтош +KeyboardShortcuts/Platform/NonWindows: Платформи кои не се Виндовс +KeyboardShortcuts/Platform/Windows: Виндовс +KeyboardShortcuts/Remove/Hint: избриши кратенка за тастатура +LayoutSwitcher/Caption: Распоред +LoadedModules/Caption: Модули +LoadedModules/Hint: Ова се вчитаните модули за запис кои водат кон своите извори. Доколку кликнете на некој од нив ќе го видите модулот. На сите модули запишани со закосен формат им недостасува извор, обично бидејќи тие биле поставувани додека сè уште траел процесот на подигање на вашето ТидлиВики. +Palette/Caption: Палета +Palette/Editor/Clone/Caption: клонирај +Palette/Editor/Clone/Prompt: Препорачливо е најпрвин да ја клонирате оваа палета пред да ја уредувате. +Palette/Editor/Delete/Hint: избришете го ова од моменталната палета +Palette/Editor/Names/External/Show: Прикажи ги имињата на бои кои не се дел од оваа палета +Palette/Editor/Prompt: Уредување +Palette/Editor/Prompt/Modified: Оваа палета е модифицирана +Palette/Editor/Reset/Caption: ресетирај +Palette/HideEditor/Caption: сокри го уредникот +Palette/Prompt: Моментална палета: +Palette/ShowEditor/Caption: прикажи го уредникот +Parsing/Block/Caption: Правила за блокирачки режим +Parsing/Caption: Правила +Parsing/Hint: Тука можете глобално да вклучите или исклучите правила за ''анализаторот''. За да можат записите да бидат прикажани, [[анализаторот|https://tiddlywiki.com/static/WikiText%2520Parser%2520Modes.html]] ги чита и интерпретира правилата. Постојат три вида на режим во кој анализаторот функционира: прагмантен, внатрешен и блокирачки.
Не заборавајте, за промената што тука ќе ја направите да има ефект треба да кликнете на //Зачувај ги промените// (црвеното копче во страничното мени). Исклучувањето на одредени правила за анализаторот можат да предизвикаат не коректно однесување на <$text text="ТидлиВики"/>. Користете [[безбеден режим|https://tiddlywiki.com/#SafeMode]] за да ги вратите нормалните операции. +Parsing/Inline/Caption: Правила за внатрешен режим +Parsing/Pragma/Caption: Правила за прагмантен режим +Plugins/Add/Caption: Превземете повеќе плагени +Plugins/Add/Hint: Инсталирајте плагени од официјалната библиотека +Plugins/AlreadyInstalled/Hint: Овој плаген е веќе инсталиран со верзија <$text text=<>/> +Plugins/AlsoRequires: Зависи од: +Plugins/Caption: Плагени +Plugins/ClosePluginLibrary: Затвори ја библиотеката +Plugins/Disable/Caption: исклучи +Plugins/Disable/Hint: Исклучи го овој плаген откако следен пат ќе се освежи википедијата +Plugins/Disabled/Status: (исклучено) +Plugins/Downgrade/Caption: врати верзија +Plugins/Empty/Hint: Ништо +Plugins/Enable/Caption: вклучи +Plugins/Enable/Hint: Вклучи го овој плаген откако следен пат ќе се освежи википедијата +Plugins/Install/Caption: инсталирај +Plugins/Installed/Hint: Инсталирани плагени: +Plugins/Languages/Caption: Јазици +Plugins/Languages/Hint: Плагени за јазични пакети +Plugins/NoInfoFound/Hint: Не ''"<$text text=<>/>"'' пронајдено +Plugins/NotInstalled/Hint: Овој плаген не е инсталиран +Plugins/OpenPluginLibrary: Отвори ја библиотеката +Plugins/Plugins/Caption: Плагени +Plugins/Plugins/Hint: Плагени +Plugins/PluginWillRequireReload: (освежи ја википедијата) +Plugins/Reinstall/Caption: реинсталирај +Plugins/SubPluginPrompt: Го има со <> под-плагени +Plugins/Themes/Caption: Теми +Plugins/Themes/Hint: Плагени за теми +Plugins/Update/Caption: ажурирај +Plugins/Updates/Caption: Ажурирања +Plugins/Updates/Hint: Достапни ажурирања за инсталираните плагени +Plugins/Updates/UpdateAll/Caption: Ажурирај <> плагени +Saving/Caption: Меморирање +Saving/DownloadSaver/AutoSave/Description: Дозволи автоматско меморирање за превземање од серверот +Saving/DownloadSaver/AutoSave/Hint: Дозволи Автоматско Меморирање за Превземање од Серверот +Saving/DownloadSaver/Caption: Сервер за превземање +Saving/DownloadSaver/Hint: Овие опции важат за HTML5 компатибилен сервер за превземање +Saving/General/Caption: Генерално +Saving/General/Hint: Овие опции важат за сите вклучени сервери +Saving/GitService/Branch: Таргетирај бранша за меморирање +Saving/GitService/CommitMessage: Зачувано од ТидлиВики +Saving/GitService/Description: Овие опции важат само при меморирање од <> +Saving/GitService/Filename: Име на таргетиран фајл (пр. `индекс.html`) +Saving/GitService/Gitea/Caption: Gitea Сервер +Saving/GitService/Gitea/Password: Токен за личен пристап за API (преку веб-интерфејсот на Gitea: `Settings | Applications | Generate New Token`) +Saving/GitService/GitHub/Caption: ~GitHub Сервер +Saving/GitService/GitHub/Password: Лозинка, OAUTH токен или токен за личен пристап (прочитајте ја [[оваа објава на GitHub|https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line]] за повеќе информации) +Saving/GitService/GitLab/Caption: ~GitLab Сервер +Saving/GitService/GitLab/Password: Токен за личен пристап за API (прочитајте ја [[оваа објава на GitLab|https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html]] за повеќе информации) +Saving/GitService/Path: Насока до таргет датотека (пр. `/вики/`) +Saving/GitService/Repo: Таргетирано репозитори (пр. `Jermolene/TiddlyWiki5`) +Saving/GitService/ServerURL: Сервер API URL +Saving/GitService/UserName: Корисничко име +Saving/Hint: Опции за меморирање на целосното ТидлиВики како еден фајл преку серверски модул +Saving/TiddlySpot/Advanced/Heading: Напредни опции +Saving/TiddlySpot/BackupDir: Датотека за резервни копии (Backup) +Saving/TiddlySpot/Backups: Резервни копии +Saving/TiddlySpot/Caption: ~TiddlySpot Сервер +Saving/TiddlySpot/ControlPanel: ~TiddlySpot Контролен Панел +Saving/TiddlySpot/Description: Овие опции важат само при меморирање до [[TiddlySpot|http://tiddlyspot.com]], [[TiddlyHost|https://tiddlyhost.com]], или компатибилен далечински (remote) сервер. Истражи тука на оваа [[страница|https://github.com/simonbaird/tiddlyhost/wiki/TiddlySpot-Saver-configuration-for-Tiddlyhost-and-Tiddlyspot]] за повеќе информации за меморирање на конфигурација од ~TiddlySpot и ~TiddlyHost. +Saving/TiddlySpot/Filename: Име на фајл за трансвер +Saving/TiddlySpot/Heading: ~TiddlySpot +Saving/TiddlySpot/Hint: //URL на серверот е `http://.tiddlyspot.com/store.cgi` и може да се промени за да се користи посебна серверска адреса, пр. `http://example.com/store.php`.// +Saving/TiddlySpot/Password: Лозинка +Saving/TiddlySpot/ReadOnly: Имајте на ум дека [[TiddlySpot|http://tiddlyspot.com]] повеќе не дозволува создавање на нови страници. За создавање на нови страници можете да го користите [[TiddlyHost|https://tiddlyhost.com]], новиот хостинг оператор кој го заменува ~TiddlySpot. +Saving/TiddlySpot/ServerURL: Сервер URL +Saving/TiddlySpot/UploadDir: Датотека за трансвер +Saving/TiddlySpot/UserName: Име на википедија +Settings/AutoSave/Caption: Автоматско меморирање +Settings/AutoSave/Disabled/Description: Не ги меморирај промените автоматски +Settings/AutoSave/Enabled/Description: Меморирај ги промените автоматски +Settings/AutoSave/Hint: Обиди се да ги зачуваш автоматски промените додека трае уредувањето при користење на соодветен сервер. +Settings/CamelCase/Caption: CamelCase линкови +Settings/CamelCase/Description: Вклучи автоматско ~CamelCase линкување +Settings/CamelCase/Hint: Можете глобално да го вклучите / исклучите автоматското линкување преку ~CamelCase зборови.
Потребно е да ја освежите википедијата за да има ефект. +Settings/Caption: Опции +Settings/DefaultMoreSidebarTab/Caption: Селектирано под-мени во групата Повеќе +Settings/DefaultMoreSidebarTab/Hint: Одберете кое под-мени ќе биде селектирано во групата __Повеќе__ која се наоѓа во страничното мени +Settings/DefaultSidebarTab/Caption: Селектирана група во страничното мени +Settings/DefaultSidebarTab/Hint: Одберете која група ќе биде селектирана во страничното мени +Settings/EditorToolbar/Caption: Алатки за уредување +Settings/EditorToolbar/Description: Прикажи ги алатките за уредување +Settings/EditorToolbar/Hint: Вклучи / Исклучи алатки за уредување +Settings/Hint: Овие опции ви дозволуваат да го приспособите вашето ТидлиВики. +Settings/InfoPanelMode/Caption: Панел за повеќе информации во запис +Settings/InfoPanelMode/Hint: Контролирајте кога панелот за повеќе информации се исклучува: +Settings/InfoPanelMode/Popup/Description: Панелот за повеќе инфо се исклучува автоматски +Settings/InfoPanelMode/Sticky/Description: Панелот за повеќе инфо останува вклучен додека самите не го исклучиме +Settings/LinkToBehaviour/Caption: Начин на отворање на запис +Settings/LinkToBehaviour/InsideRiver/Hint: Од внатрешна навигација во реката со записи +Settings/LinkToBehaviour/OpenAbove: Отвори над моменталниот запис +Settings/LinkToBehaviour/OpenAtBottom: Отвори најдолу во реката со записи +Settings/LinkToBehaviour/OpenAtTop: Отвори најгоре во реката со записи +Settings/LinkToBehaviour/OpenBelow: Отвори под моменталниот запис +Settings/LinkToBehaviour/OutsideRiver/Hint: Од надворешна навигација во реката со записи +Settings/MissingLinks/Caption: Вики линкови +Settings/MissingLinks/Description: Дозволи линкување до непостоечки записи +Settings/MissingLinks/Hint: Одберете дали сакате линкување до записи кои сè уште непостојат +Settings/NavigationAddressBar/Caption: Лента за навигација +Settings/NavigationAddressBar/Hint: Начин на однесување на лентата за навигација на прелистувачот: +Settings/NavigationAddressBar/No/Description: Не ја ажурирај лентата за навигација +Settings/NavigationAddressBar/Permalink/Description: Додадете го таргетираниот запис +Settings/NavigationAddressBar/Permaview/Description: Додадете го таргетираниот запис и моментално отворените записи +Settings/NavigationHistory/Caption: Историска навигација +Settings/NavigationHistory/Hint: Ажурирање на историјата при навигација: +Settings/NavigationHistory/No/Description: Не ја ажурирај историјата +Settings/NavigationHistory/Yes/Description: Ажурирај ја историјата +Settings/NavigationPermalinkviewMode/Caption: Директен линк / Директен приказ +Settings/NavigationPermalinkviewMode/CopyToClipboard/Description: Копирај URL од директен линк / директен приказ до клипборд +Settings/NavigationPermalinkviewMode/Hint: Одбери како се однесува директниот линк / директниот приказ: +Settings/NavigationPermalinkviewMode/UpdateAddressBar/Description: Ажурирај ја лентата за навигација со директниот линк / директниот приказ +Settings/PerformanceInstrumentation/Caption: Приказ на перформанси +Settings/PerformanceInstrumentation/Description: Вклучи приказ на перформанси +Settings/PerformanceInstrumentation/Hint: Прикажи статистика на перформанси во програмерската конзула на прелистувачот.
Потребно е да ја освежите википедијата за да има ефект. +Settings/TitleLinks/Caption: Наслови на записи +Settings/TitleLinks/Hint: Опционално прикажи ги насловите на записите како линкови +Settings/TitleLinks/No/Description: Не ги прикажувај насловите на записите како линкови +Settings/TitleLinks/Yes/Description: Прикажи ги насловите на записите како линкови +Settings/ToolbarButtons/Caption: Алатки +Settings/ToolbarButtons/Hint: Основен приказ на алатките +Settings/ToolbarButtons/Icons/Description: Прикажи икона +Settings/ToolbarButtons/Text/Description: Прикажи текст +Settings/ToolbarButtonStyle/Caption: Изглед на алатки +Settings/ToolbarButtonStyle/Hint: Одбери го изгледот на алатките: +Settings/ToolbarButtonStyle/Styles/Borderless: Без рамка +Settings/ToolbarButtonStyle/Styles/Boxed: Коцкасти +Settings/ToolbarButtonStyle/Styles/Rounded: Тркалезни +StoryTiddler/Caption: Река на записи +StoryTiddler/Hint: Овие правила се користат за динамичко избирање на шаблон за прикажување запис во реката со записи +StoryView/Caption: Преглед +StoryView/Prompt: Моментален изглед: +Stylesheets/Caption: Стил +Stylesheets/Expand/Caption: Отвори ги сите +Stylesheets/Hint: Ова е CSS за стилот на оние записи означени со <> +Stylesheets/Restore/Caption: Врати назад +Theme/Caption: Тема +Theme/Prompt: Моментална тема: +TiddlerColour/Caption: Боја во запис +TiddlerColour/Hint: Овие правила се користат за динамичко избирање на боја во запис (за иконата и пилулата за ознаки). +TiddlerFields/Caption: Полиња +TiddlerFields/Hint: Ова е целата листа на полиња на запис што се користат во ова ТидлиВики (вклучувајќи ги системските записи, но без сенките). +TiddlerIcon/Caption: Икона на запис +TiddlerIcon/Hint: Овие правила се користат за динамичко избирање на икона на запис. +Toolbars/Caption: Алатки +Toolbars/EditorToolbar/Caption: Алатки во уредникот +Toolbars/EditorToolbar/Hint: Изберете кои алатки се прикажуваат во уредникот. Имајте на ум дека некои алатки ќе се прикажат само во одредени видови на записи. Со кликање и повлекување на алатките во оваа листа можете слободно да ги подредите како што сакате. +Toolbars/EditToolbar/Caption: Алатки на записот +Toolbars/EditToolbar/Hint: Изберете кои алатки се прикажуваат на записите при уредување. Со кликање и повлекување на алатките во оваа листа можете слободно да ги подредите како што сакате. +Toolbars/Hint: Селектирајте ги алатките што сакате да бидат прикажани +Toolbars/PageControls/Caption: Глобални алатки +Toolbars/PageControls/Hint: Изберете кои глобални алатки се прикажуваат. Со кликање и повлекување на алатките во оваа листа можете слободно да ги подредите како што сакате. +Toolbars/ViewToolbar/Caption: Видливи алатки +Toolbars/ViewToolbar/Hint: Изберете кои други алатки се прикажуваат на записите додека не ги уредувате. Со кликање и повлекување на алатките во оваа листа можете слободно да ги подредите како што сакате. +Tools/Download/Full/Caption: Превземете ја целата википедија +ViewTemplateBody/Caption: Приказ +ViewTemplateBody/Hint: Овие правила се користат за динамичко избирање на шаблон за приказ кој се користи за прикажување на содржината во записот. +ViewTemplateTitle/Caption: Наслов +ViewTemplateTitle/Hint: Овие правила се користат за динамичко избирање на шаблон за наслов кој се користи за прикажување на насловот на записот. diff --git a/languages/mk-MK/CoreReadMe.tid b/languages/mk-MK/CoreReadMe.tid new file mode 100644 index 000000000..002d66569 --- /dev/null +++ b/languages/mk-MK/CoreReadMe.tid @@ -0,0 +1,8 @@ +title: $:/core/readme + +Овој плаген содржи основни ТидлиВики компоненти кои се состојат од: + +* ЈаваСкрипт модули +* Икони +* Шаблони потребни за креирање на ТидлиВики интерфејс +* Македонски („мк-МК“) преводи на главните локализирани реченици diff --git a/languages/mk-MK/Dates.multids b/languages/mk-MK/Dates.multids new file mode 100644 index 000000000..7e560fd17 --- /dev/null +++ b/languages/mk-MK/Dates.multids @@ -0,0 +1,87 @@ +title: $:/language/ + +Date/DaySuffix/1: ви +Date/DaySuffix/10: ти +Date/DaySuffix/11: ти +Date/DaySuffix/12: ти +Date/DaySuffix/13: ти +Date/DaySuffix/14: ти +Date/DaySuffix/15: ти +Date/DaySuffix/16: ти +Date/DaySuffix/17: ти +Date/DaySuffix/18: ти +Date/DaySuffix/19: ти +Date/DaySuffix/2: ри +Date/DaySuffix/20: ти +Date/DaySuffix/21: ви +Date/DaySuffix/22: ри +Date/DaySuffix/23: ти +Date/DaySuffix/24: ти +Date/DaySuffix/25: ти +Date/DaySuffix/26: ти +Date/DaySuffix/27: ми +Date/DaySuffix/28: ми +Date/DaySuffix/29: ти +Date/DaySuffix/3: ти +Date/DaySuffix/30: ти +Date/DaySuffix/31: ви +Date/DaySuffix/4: ти +Date/DaySuffix/5: ти +Date/DaySuffix/6: ти +Date/DaySuffix/7: ми +Date/DaySuffix/8: ми +Date/DaySuffix/9: ти +Date/Long/Day/0: Недела +Date/Long/Day/1: Понеделник +Date/Long/Day/2: Вторник +Date/Long/Day/3: Среда +Date/Long/Day/4: Четврток +Date/Long/Day/5: Петок +Date/Long/Day/6: Сабота +Date/Long/Month/1: Јануари +Date/Long/Month/10: Октомври +Date/Long/Month/11: Ноември +Date/Long/Month/12: Декември +Date/Long/Month/2: Февруари +Date/Long/Month/3: Март +Date/Long/Month/4: Април +Date/Long/Month/5: Мај +Date/Long/Month/6: Јуни +Date/Long/Month/7: Јули +Date/Long/Month/8: Август +Date/Long/Month/9: Септември +Date/Period/am: am +Date/Period/pm: pm +Date/Short/Day/0: Нед +Date/Short/Day/1: Пон +Date/Short/Day/2: Вто +Date/Short/Day/3: Сре +Date/Short/Day/4: Чет +Date/Short/Day/5: Пет +Date/Short/Day/6: Саб +Date/Short/Month/1: Јан +Date/Short/Month/10: Окт +Date/Short/Month/11: Ное +Date/Short/Month/12: Дек +Date/Short/Month/2: Фев +Date/Short/Month/3: Мар +Date/Short/Month/4: Апр +Date/Short/Month/5: Мај +Date/Short/Month/6: Јун +Date/Short/Month/7: Јул +Date/Short/Month/8: Авг +Date/Short/Month/9: Сеп +RelativeDate/Future/Days: <> дена од сега +RelativeDate/Future/Hours: <> часа од сега +RelativeDate/Future/Minutes: <> минути од сега +RelativeDate/Future/Months: <> месеци од сега +RelativeDate/Future/Second: 1 секунда од сега +RelativeDate/Future/Seconds: <> секунди од сега +RelativeDate/Future/Years: <> години од сега +RelativeDate/Past/Days: пред <> дена +RelativeDate/Past/Hours: пред <> часа +RelativeDate/Past/Minutes: пред <> минути +RelativeDate/Past/Months: пред <> месеци +RelativeDate/Past/Second: пред 1 секунда +RelativeDate/Past/Seconds: пред <> секунди +RelativeDate/Past/Years: пред <> години diff --git a/languages/mk-MK/Docs/ModuleTypes.multids b/languages/mk-MK/Docs/ModuleTypes.multids new file mode 100644 index 000000000..61af72c8b --- /dev/null +++ b/languages/mk-MK/Docs/ModuleTypes.multids @@ -0,0 +1,30 @@ +title: $:/language/Docs/ModuleTypes/ + +allfilteroperator: Под-оператор за филтерот "all" +animation: Анимации што можат да се користат со RevealWidget. +authenticator: Дефинира како барањата се одобрени од вградениот HTTP сервер. +bitmapeditoroperation: Оператор за bitmap уредникот +command: Команди што можат да се извршат преку Node.js. +config: Податоци за вметнување во `$tw.config`. +filteroperator: Индивидуални методи за оператори на филтри. +global: Глобална дата за вметнување во `$tw`. +info: Објавува системски информации преку [[$:/temp/info-plugin]] псевдо-плагенот. +isfilteroperator: Оператори за филтерот "is" +library: Генерички тип на модул за општа намена на ЈаваСкрипт модули. +macro: ЈаваСкрипт макро дефиниции. +parser: Анализатори за различни видови содржина. +route: Дефинира како поединични URL шеми (patterns) се контролираат преку HTTP серверот. +saver: Зачувувачи кои се справуваат со различни методи за меморирање фајлови од прелистувачот. +startup: Стартни функции. +storyview: Преглед на реката со записи за нивна анимација +texteditoroperation: Оператори за уредување текст +tiddlerdeserializer: Конвертира различни видови содржини во записи. +tiddlerfield: Го дефинира значењето на индивидуално поле од записот +tiddlermethod: Додава методи во прототипот `$tw.Tiddler` +upgrader: Ги процесира записите при надградба или импорт. +utils: Додаваат методи во `$tw.utils`. +utils-browser: Додаваат специфични методи за прелистувачот во `$tw.utils`. +utils-node: Додаваат специфични Node.js методи во `$tw.utils`. +widget: Додатоци (widgets) за сумирање на DOM рендерирање и освежување. +wikimethod: Додава методи во `$tw.Wiki`. +wikirule: Индивидуални правила за анализаторот на вики-текст (WikiText). diff --git a/languages/mk-MK/Docs/PaletteColours.multids b/languages/mk-MK/Docs/PaletteColours.multids new file mode 100644 index 000000000..eaae646fb --- /dev/null +++ b/languages/mk-MK/Docs/PaletteColours.multids @@ -0,0 +1,109 @@ +title: $:/language/Docs/PaletteColours/ + +alert-background: Предупредувачка боја +alert-border: Предупредувачка боја на рамка +alert-highlight: Предупредувачка боја на истакнатост +alert-muted-foreground: Предупредувачка мјутирана (muted) боја +background: Генерална боја +blockquote-bar: Боја на вертикалната линија на цитиран текст +button-background: Основна боја на копче +button-border: Основна боја на рамка на копче +button-foreground: Основна боја на текст во копче +code-background: Боја на код +code-border: Боја на рамка на код +code-foreground: Боја на текст во код +dirty-indicator: Боја на индикатор за незачувани промени +download-background: Боја на копче за превземање +download-foreground: Боја на текст во копче за превземање +dragger-background: Боја на влечење +dragger-foreground: Боја на текст при влечење +dropdown-background: Боја на пуштање +dropdown-border: Боја на рамка на пуштање +dropdown-tab-background: Боја на група (таб) на пуштање +dropdown-tab-background-selected: Боја на селектирана група (таб) +dropzone-background: Боја на таргет место за пуштање +external-link-background: Боја за надворешни (други) линкови +external-link-background-hover: Боја при доближување на маусот над надворешен линк +external-link-background-visited: Боја на посетени надворешни линкови +external-link-foreground: Боја на текст во надворешни линкови +external-link-foreground-hover: Боја на текст во надворешен линк при доближување на маусот +external-link-foreground-visited: Боја на текст во посетени надворешни линкови +foreground: Генерална боја на текст +menubar-background: Боја на лента со мени +menubar-foreground: Боја на текст во лента со мени +message-background: Боја на поле за порака +message-border: Боја на рамка на поле за порака +message-foreground: Боја на текст во поле за порака +modal-backdrop: Боја за модална позадина +modal-background: Модална боја +modal-border: Модална рамка +modal-footer-background: Модална боја во долен дел +modal-footer-border: Модална боја на рамка во долен дел +modal-header-border: Модална боја во горен дел +muted-foreground: Генерална мјутирана (muted) боја +notification-background: Боја за нотификација +notification-border: Боја на рамка за нотификација +page-background: Боја на позадина +pre-background: Боја на претходно форматиран код +pre-border: Боја на рамка на претходно форматиран код +primary: Боја на општа вашност +select-tag-background: Боја на `` елемент +sidebar-button-foreground: Боја на текст во копче во страничното мени +sidebar-controls-foreground: Боја на контролери во страничното мени +sidebar-controls-foreground-hover: Боја на текст во контролери во страничното мени +sidebar-foreground: Боја на текст во страничното мени +sidebar-foreground-shadow: Боја на текст во сенка во страничното мени +sidebar-muted-foreground: Мјутирана (muted) боја на текст во страничното мени +sidebar-muted-foreground-hover: Мјутирана (muted) боја на текст при доближување со маусот во страничното мени +sidebar-tab-background: Боја на група (таб) во страничното мени +sidebar-tab-background-selected: Боја на селектирана група (таб) во страничното мени +sidebar-tab-border: Боја на рамка на група (таб) во страничното мени +sidebar-tab-border-selected: Боја на рамка за селектирана група (таб) во страничното мени +sidebar-tab-divider: Боја на разделник во страничното мени +sidebar-tab-foreground: Боја на текст во група (таб) во страничното мени +sidebar-tab-foreground-selected: Боја на текст во селектирана група (таб) во страничното мени +sidebar-tiddler-link-foreground: Боја на текст на линк од запис во страничното мени +sidebar-tiddler-link-foreground-hover: Боја на текст во линк од запис во страничното мени при доближување со маусот +site-title-foreground: Боја на текст на наслов +static-alert-foreground: Боја на текст на статично предупредување +tab-background: Боја на група (таб) +tab-background-selected: Боја на селектирана група (таб) +tab-border: Боја на рамка на група (таб) +tab-border-selected: Боја на рамка на селектирана група (таб) +tab-divider: Боја на разделник на група (таб) +tab-foreground: Боја на текст во група (таб) +tab-foreground-selected: Боја на текст во селектирана група (таб) +table-border: Боја на рамка на табела +table-footer-background: Боја на долниот дел од табелата +table-header-background: Боја на горниот дел од табелата +tag-background: Боја на ознака +tag-foreground: Боја на текст во ознака +tiddler-background: Боја на запис +tiddler-border: Боја на рамка на запис +tiddler-controls-foreground: Боја на текст во контролери на запис +tiddler-controls-foreground-hover: Боја на текст во контролери на запис при доближување со маусот +tiddler-controls-foreground-selected: Боја на текст во селектирани контролери на запис +tiddler-editor-background: Боја на уредникот на запис +tiddler-editor-border: Боја на рамка на уредникот на запис +tiddler-editor-border-image: Боја на рамка во уредникот за слика +tiddler-editor-fields-even: Боја на еднакви полиња во уредникот на запис +tiddler-editor-fields-odd: Боја на различни полиња во уредникот на запис +tiddler-info-background: Боја на инфо панелот на запис +tiddler-info-border: Боја на рамка на инфо панелот на запис +tiddler-info-tab-background: Боја на група (таб) во инфо панелот на запис +tiddler-link-background: Боја за линк на запис +tiddler-link-foreground: Боја за текст во линк на запис +tiddler-subtitle-foreground: Боја на текст во поднаслов на запис +tiddler-title-foreground: Боја на наслов на запис +toolbar-cancel-button: Боја на текст во „откажи“ копчето +toolbar-close-button: Боја на текст во „затвори“ копчето +toolbar-delete-button: Боја на текст во „избриши“ копчето +toolbar-done-button: Боја на текст во „заврши“ копчето +toolbar-edit-button: Боја на текст во „уреди“ копчето +toolbar-info-button: Боја на текст во „инфо“ копчето +toolbar-new-button: Боја на текст во „нов запис“ копчето +toolbar-options-button: Боја на текст во „опции“ копчето +toolbar-save-button: Боја на текст во „зачувај“ копчето +untagged-background: Боја на пилулата за неозначени записи +very-muted-foreground: Многу мјутирана (muted) боја diff --git a/languages/mk-MK/EditTemplate.multids b/languages/mk-MK/EditTemplate.multids new file mode 100644 index 000000000..a909a6905 --- /dev/null +++ b/languages/mk-MK/EditTemplate.multids @@ -0,0 +1,38 @@ +title: $:/language/EditTemplate/ + +Body/External/Hint: Овој запис прикажува содржина зачувана надвор од ТидлиВики фајлот. Можете да ги уредувате ознаките и полињата, но не можете директно да ја уредувате содржината. +Body/Placeholder: Напишете го текстот за овој запис +Body/Preview/Type/DiffCurrent: разлики од претходното +Body/Preview/Type/DiffShadow: разлики од сенката +Body/Preview/Type/Output: излезен приказ +Caption: Уредник +Field/Dropdown/Caption: листа на поле +Field/Dropdown/Hint: Листа на полиња +Field/Remove/Caption: избриши поле +Field/Remove/Hint: Избриши поле +Fields/Add/Button: додади +Fields/Add/Button/Hint: Додади го новото поле на записот +Fields/Add/Dropdown/System: Системски полиња +Fields/Add/Dropdown/User: Кориснички полиња +Fields/Add/Name/Placeholder: име на поле +Fields/Add/Prompt: Додади ново поле: +Fields/Add/Value/Placeholder: содржина на поле +Shadow/OverriddenWarning: Ова е модифицирана сенка. Можете да ја вратите стандардната верзија во плагенот <> со бришење на овој запис +Shadow/Warning: Ова е сенка. Сите промени што ќе ги направите ќе ја обноват (презапишат) стандардната верзија од плагенот <> +Tags/Add/Button: додади +Tags/Add/Button/Hint: додади ознака +Tags/Add/Placeholder: има на ознака +Tags/ClearInput/Caption: очисти +Tags/ClearInput/Hint: Очисти ознака +Tags/Dropdown/Caption: листа на ознаки +Tags/Dropdown/Hint: Листа на ознаки +Title/BadCharacterWarning: Предупредување: избегнувајте да ги користите знаците <> во наслови на записи. +Title/Exists/Prompt: Таргетираниот запис веќе постои +Title/References/Prompt: Следниве референци од овој запис нема автоматски да се ажурираат: +Title/Relink/Prompt: Промени го ''<$text text=<>/>'' во ''<$text text=<>/>'' и во сите други __ознаки__ и __полиња__ +Type/Delete/Caption: избриши го видот на содржина +Type/Delete/Hint: Избриши го видот на содржина +Type/Dropdown/Caption: листа на видови содржина +Type/Dropdown/Hint: Листа на видови содржина +Type/Placeholder: видови содржина +Type/Prompt: Видови: diff --git a/languages/mk-MK/Exporters.multids b/languages/mk-MK/Exporters.multids new file mode 100644 index 000000000..0d7b231ad --- /dev/null +++ b/languages/mk-MK/Exporters.multids @@ -0,0 +1,6 @@ +title: $:/language/Exporters/ + +CsvFile: CSV фајл +JsonFile: JSON фајл +StaticRiver: Статичен HTML +TidFile: TID текст фајл diff --git a/languages/mk-MK/Fields.multids b/languages/mk-MK/Fields.multids new file mode 100644 index 000000000..9dffbc562 --- /dev/null +++ b/languages/mk-MK/Fields.multids @@ -0,0 +1,43 @@ +title: $:/language/Docs/Fields/ + +_canonical_uri: Целосен линк на сликата од надвор +_is_skinny: Доколку е присутен, покажува дека полето за текст во записот мора да биде вчитано од страна на серверот +author: Име на авторот на записот +bag: Име на фиока од која потекнува записот +caption: Текст што ќе се прикаже на копче или група (tab) +code-body: Шаблонот за приказ ќе го прикаже записот како код +color: CSS бојата поврзана со записот +component: Име на компонентата одговорна за [[alert tiddler|AlertMechanism]] +core-version: Доколку станува збор за плаген, покажува кој плаген со која верзија од ТидлиВики е компатибилен +created: Датумот кога е создаден записот +creator: Името на личноста која го креирала записот +current-tiddler: Се користи за кеширање на записот во [[history list|HistoryMechanism]] +dependents: Доколку станува збор за плаген, ја покажува листата на имиња од други плагени од кои зависи плагенот +description: Описен текст за записот +draft.of: Доколку станува збор за незачуван запис, го зачувува името на записот од кој овој запис е незачуван +draft.title: Доколку станува збор за незачуван запис, го задржува предложениот нов наслов за записот +footer: Долниот текст (footer) +hide-body: Шаблонот за приказ ќе ја сокрие содржината од записот +icon: Наслов од запис кој ја содржи иконата која ќе биде поврзана со овој запис +library: Укажува дека записот треба да се зачува како ЈаваСкрипт библиотека +list: Нумерирана листа од наслови на записи кои кореспондираат со овој запис +list-after: Насловот на записот после кој треба овој запис да биде додаден +list-before: Насловот на записот пред кој треба овој запис да биде додаден +modified: Датумот и времето кога последен пат овој запис бил променет +modifier: Личноста која последен пат го променила записот +module-type: Одредува за каков вид на модул станува збор за ЈаваСкрипт записи +name: Човечки-читливо име поврзано со записот +parent-plugin: Доколку станува збор за плаген, покажува од кој главен плаген овој запис е под-плаген +plugin-priority: Нумеричка вредност што означува приоритет на плаген +plugin-type: Вид на плаген +released: Датум на објавување +revision: Ревизија на запис одржана на серверот +source: Целосна URL адреса поврзана со записот +subtitle: Поднаслов на записот +tags: Листа на ознаки поврзани со записот +text: Содржина на записот +throttle.refresh: Доколку е достапен, го освежува записот +title: Уникатно име на записот +toc-link: Го потиснува линкот на записот во содржина +type: Видот на содржината во записот +version: Информации за верзијата на записот diff --git a/languages/mk-MK/Filters.multids b/languages/mk-MK/Filters.multids new file mode 100644 index 000000000..152e63d72 --- /dev/null +++ b/languages/mk-MK/Filters.multids @@ -0,0 +1,16 @@ +title: $:/language/Filters/ + +AllTags: Сите ознаки освен системски ознаки +AllTiddlers: Сите записи освен системски записи +Drafts: Незачувани записи +Missing: Непостоечки записи +Orphans: Самостојни записи +OverriddenShadowTiddlers: Променливи сенки +RecentSystemTiddlers: Неодамна модифицирани записи, вклучувајќи ги системските записи +RecentTiddlers: Неодамна модифицирани записи +SessionTiddlers: Модифицирани записи од моментот на вклучување на википедијата +ShadowTiddlers: Сенки +StoryList: Записи во реката, без <$text text="$:/AdvancedSearch"/> +SystemTags: Системски ознаки +SystemTiddlers: Системски записи +TypedTiddlers: Записи кои не се вики-текст diff --git a/languages/mk-MK/GettingStarted.tid b/languages/mk-MK/GettingStarted.tid new file mode 100644 index 000000000..658dc0c7c --- /dev/null +++ b/languages/mk-MK/GettingStarted.tid @@ -0,0 +1,18 @@ +title: GettingStarted + +\define lingo-base() $:/language/ControlPanel/Basics/ +!Добредојдовте во ТидлиВики 🐈‍⬛ + +Пред да започнете со складирање на важни информации во вашето ТидлиВики, од големо значење е да знаете како навистина можете да ги меморирате вашите промени. За повеќе информации прочитајте ја објавата: https://tiddlywiki.com/#GettingStarted + +!! Основни податоци + +
+ +|tc-table-no-border tc-first-col-min-width tc-first-link-nowrap|k +| <$link to="$:/SiteTitle"><>|<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> | +| <$link to="$:/SiteSubtitle"><>|<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> | +|^ <$link to="$:/DefaultTiddlers"><>
<>|<$edit tag="textarea" tiddler="$:/DefaultTiddlers"/>
//<>// | +
+ +Отворете го [[контролниот панел|$:/ControlPanel]] за повеќе опции. diff --git a/languages/mk-MK/Help/build.tid b/languages/mk-MK/Help/build.tid new file mode 100644 index 000000000..2219819c2 --- /dev/null +++ b/languages/mk-MK/Help/build.tid @@ -0,0 +1,11 @@ +title: $:/language/Help/build +description: Автоматски извршува команди + +Build the specified build targets for the current wiki. If no build targets are specified then all available targets will be built. + +``` +--build [ ...] +``` + +Build targets are defined in the `tiddlywiki.info` file of a wiki folder. + diff --git a/languages/mk-MK/Help/clearpassword.tid b/languages/mk-MK/Help/clearpassword.tid new file mode 100644 index 000000000..4907c3364 --- /dev/null +++ b/languages/mk-MK/Help/clearpassword.tid @@ -0,0 +1,8 @@ +title: $:/language/Help/clearpassword +description: Брише лозинка од крипто операции + +Clear the password for subsequent crypto operations + +``` +--clearpassword +``` diff --git a/languages/mk-MK/Help/commands.tid b/languages/mk-MK/Help/commands.tid new file mode 100644 index 000000000..37590ed34 --- /dev/null +++ b/languages/mk-MK/Help/commands.tid @@ -0,0 +1,18 @@ +title: $:/language/Help/commands +description: Извршува команди од филтер + +Sequentially run the command tokens returned from a filter + +``` +--commands +``` + +Examples + +``` +--commands "[enlist:raw{$:/build-commands-as-text}]" +``` + +``` +--commands "[{$:/build-commands-as-json}jsonindexes[]] :map[{$:/build-commands-as-json}jsonget]" +``` diff --git a/languages/mk-MK/Help/default.tid b/languages/mk-MK/Help/default.tid new file mode 100644 index 000000000..d3a1cf338 --- /dev/null +++ b/languages/mk-MK/Help/default.tid @@ -0,0 +1,26 @@ +title: $:/language/Help/default +description: + +\define commandTitle() +$:/language/Help/$(command)$ +\end +\whitespace trim +``` +usage: tiddlywiki [] [-- [...]...] +``` + +Available commands: + +
    +<$list filter="[commands[]sort[title]]" variable="command"> +
  • <$link to=<>><$macrocall $name="command" $type="text/plain" $output="text/plain"/>: + +<$transclude tiddler=<> field="description"/>
  • + +
+ +To get detailed help on a command: + +``` +tiddlywiki --help +``` diff --git a/languages/mk-MK/Help/deletetiddlers.tid b/languages/mk-MK/Help/deletetiddlers.tid new file mode 100644 index 000000000..099fa09f0 --- /dev/null +++ b/languages/mk-MK/Help/deletetiddlers.tid @@ -0,0 +1,8 @@ +title: $:/language/Help/deletetiddlers +description: Брише група записи + +<<.from-version "5.1.20">> Deletes a group of tiddlers identified by a filter. + +``` +--deletetiddlers +``` diff --git a/languages/mk-MK/Help/editions.tid b/languages/mk-MK/Help/editions.tid new file mode 100644 index 000000000..66f3c6122 --- /dev/null +++ b/languages/mk-MK/Help/editions.tid @@ -0,0 +1,8 @@ +title: $:/language/Help/editions +description: Покажува листа на достапни уредници во ТидлиВики + +Lists the names and descriptions of the available editions. You can create a new wiki of a specified edition with the `--init` command. + +``` +--editions +``` diff --git a/languages/mk-MK/Help/fetch.tid b/languages/mk-MK/Help/fetch.tid new file mode 100644 index 000000000..86e919889 --- /dev/null +++ b/languages/mk-MK/Help/fetch.tid @@ -0,0 +1,38 @@ +title: $:/language/Help/fetch +description: Превзема записи од друга википедија преку URL + +Fetch one or more files over HTTP/HTTPS, and import the tiddlers matching a filter, optionally transforming the incoming titles. + +``` +--fetch file +--fetch files +--fetch raw-file +--fetch raw-files +``` + +The "file" and "files" variants fetch the specified files and attempt to import the tiddlers within them (the same processing as if the files were dragged into the browser window). The "raw-file" and "raw-files" variants fetch the specified files and then store the raw file data in tiddlers, without applying the import logic. + +With the "file" and "raw-file" variants only a single file is fetched and the first parameter is the URL of the file to read. + +With the "files" and "raw-files" variants, multiple files are fetched and the first parameter is a filter yielding a list of URLs of the files to read. For example, given a set of tiddlers tagged "remote-server" that have a field "url" the filter `[tag[remote-server]get[url]]` will retrieve all the available URLs. + +For the "file" and "files" variants, the `` parameter specifies a filter determining which tiddlers are imported. It defaults to `[all[tiddlers]]` if not provided. + +For all variants, the `` parameter specifies an optional filter that transforms the titles of the imported tiddlers. For example, `[addprefix[$:/myimports/]]` would add the prefix `$:/myimports/` to each title. + +Preceding the `--fetch` command with `--verbose` will output progress information during the import. + +Note that TiddlyWiki will not fetch an older version of an already loaded plugin. + +The following example retrieves all the non-system tiddlers from https://tiddlywiki.com and saves them to a JSON file: + +``` +tiddlywiki --verbose --fetch file "https://tiddlywiki.com/" "[!is[system]]" "" --rendertiddler "$:/core/templates/exporters/JsonFile" output.json text/plain "" exportFilter "[!is[system]]" +``` + +The following example retrieves the "favicon" file from tiddlywiki.com and saves it in a file called "output.ico". Note that the intermediate tiddler "Icon Tiddler" is quoted in the "--fetch" command because it is being used as a transformation filter to replace the default title, while there are no quotes for the "--savetiddler" command because it is being used directly as a title. + +``` +tiddlywiki --verbose --fetch raw-file "https://tiddlywiki.com/favicon.ico" "[[Icon Tiddler]]" --savetiddler "Icon Tiddler" output.ico +``` + diff --git a/languages/mk-MK/Help/help.tid b/languages/mk-MK/Help/help.tid new file mode 100644 index 000000000..d8aafcfd1 --- /dev/null +++ b/languages/mk-MK/Help/help.tid @@ -0,0 +1,10 @@ +title: $:/language/Help/help +description: Покажува помош за ТидлиВики команди + +Displays help text for a command: + +``` +--help [] +``` + +If the command name is omitted then a list of available commands is displayed. diff --git a/languages/mk-MK/Help/import.tid b/languages/mk-MK/Help/import.tid new file mode 100644 index 000000000..1a8a63a24 --- /dev/null +++ b/languages/mk-MK/Help/import.tid @@ -0,0 +1,24 @@ +title: $:/language/Help/import +description: Импортира записи од фајл + +Import tiddlers from TiddlyWiki (`.html`), `.tiddler`, `.tid`, `.json` or other local files. The deserializer must be explicitly specified, unlike the `load` command which infers the deserializer from the file extension. + +``` +--import [] [<encoding>] +``` + +The deserializers in the core include: + +* application/javascript +* application/json +* application/x-tiddler +* application/x-tiddler-html-div +* application/x-tiddlers +* text/html +* text/plain + +The title of the imported tiddler defaults to the filename. + +The encoding defaults to "utf8", but can be "base64" for importing binary files. + +Note that TiddlyWiki will not import an older version of an already loaded plugin. diff --git a/languages/mk-MK/Help/init.tid b/languages/mk-MK/Help/init.tid new file mode 100644 index 000000000..dfa93faea --- /dev/null +++ b/languages/mk-MK/Help/init.tid @@ -0,0 +1,23 @@ +title: $:/language/Help/init +description: Вчитува нов фолдер за википедијата + +Initialise an empty [[WikiFolder|WikiFolders]] with a copy of the specified edition. + +``` +--init <edition> [<edition> ...] +``` + +For example: + +``` +tiddlywiki ./MyWikiFolder --init empty +``` + +Note: + +* The wiki folder directory will be created if necessary +* The "edition" defaults to ''empty'' +* The init command will fail if the wiki folder is not empty +* The init command removes any `includeWikis` definitions in the edition's `tiddlywiki.info` file +* When multiple editions are specified, editions initialised later will overwrite any files shared with earlier editions (so, the final `tiddlywiki.info` file will be copied from the last edition) +* `--editions` returns a list of available editions diff --git a/languages/mk-MK/Help/listen.tid b/languages/mk-MK/Help/listen.tid new file mode 100644 index 000000000..dfb938c5d --- /dev/null +++ b/languages/mk-MK/Help/listen.tid @@ -0,0 +1,35 @@ +title: $:/language/Help/listen +description: Обезбедува интерфејс за HTTP серверот и ТидлиВики + +Serves a wiki over HTTP. + +The listen command uses NamedCommandParameters: + +``` +--listen [<name>=<value>]... +``` + +All parameters are optional with safe defaults, and can be specified in any order. The recognised parameters are: + +* ''host'' - optional hostname to serve from (defaults to "127.0.0.1" aka "localhost") +* ''path-prefix'' - optional prefix for paths +* ''port'' - port number on which to listen; non-numeric values are interpreted as a system environment variable from which the port number is extracted (defaults to "8080") +* ''credentials'' - pathname of credentials CSV file (relative to wiki folder) +* ''anon-username'' - the username for signing edits for anonymous users +* ''username'' - optional username for basic authentication +* ''password'' - optional password for basic authentication +* ''authenticated-user-header'' - optional name of request header to be used for trusted authentication. +* ''readers'' - comma-separated list of principals allowed to read from this wiki +* ''writers'' - comma-separated list of principals allowed to write to this wiki +* ''csrf-disable'' - set to "yes" to disable CSRF checks (defaults to "no") +* ''root-tiddler'' - the tiddler to serve at the root (defaults to "$:/core/save/all") +* ''root-render-type'' - the content type to which the root tiddler should be rendered (defaults to "text/plain") +* ''root-serve-type'' - the content type with which the root tiddler should be served (defaults to "text/html") +* ''tls-cert'' - pathname of TLS certificate file (relative to wiki folder) +* ''tls-key'' - pathname of TLS key file (relative to wiki folder) +* ''debug-level'' - optional debug level; set to "debug" to view request details (defaults to "none") +* ''gzip'' - set to "yes" to enable gzip compression for some http endpoints (defaults to "no") +* ''use-browser-cache'' - set to "yes" to allow the browser to cache responses to save bandwidth (defaults to "no") + +For information on opening up your instance to the entire local network, and possible security concerns, see the WebServer tiddler at TiddlyWiki.com. + diff --git a/languages/mk-MK/Help/load.tid b/languages/mk-MK/Help/load.tid new file mode 100644 index 000000000..ccbc28cfa --- /dev/null +++ b/languages/mk-MK/Help/load.tid @@ -0,0 +1,19 @@ +title: $:/language/Help/load +description: Вчитува записи од фајл + +Load tiddlers from TiddlyWiki (`.html`), `.tiddler`, `.tid`, `.json` or other local files. The processing applied to incoming files is determined by the file extension. Use the alternative `import` command if you need to specify the deserializer and encoding explicitly. + +``` +--load <filepath> [noerror] +--load <dirpath> [noerror] +``` + +By default, the load command raises an error if no tiddlers are found. The error can be suppressed by providing the optional "noerror" parameter. + +To load tiddlers from an encrypted TiddlyWiki file you should first specify the password with the PasswordCommand. For example: + +``` +tiddlywiki ./MyWiki --password pa55w0rd --load my_encrypted_wiki.html +``` + +Note that TiddlyWiki will not load an older version of an already loaded plugin. diff --git a/languages/mk-MK/Help/makelibrary.tid b/languages/mk-MK/Help/makelibrary.tid new file mode 100644 index 000000000..6c4ce9ece --- /dev/null +++ b/languages/mk-MK/Help/makelibrary.tid @@ -0,0 +1,14 @@ +title: $:/language/Help/makelibrary +description: Го конструира плагенот за библиотеката потребен за процес на надградба + +Constructs the `$:/UpgradeLibrary` tiddler for the upgrade process. + +The upgrade library is formatted as an ordinary plugin tiddler with the plugin type `library`. It contains a copy of each of the plugins, themes and language packs available within the TiddlyWiki5 repository. + +This command is intended for internal use; it is only relevant to users constructing a custom upgrade procedure. + +``` +--makelibrary <title> +``` + +The title argument defaults to `$:/UpgradeLibrary`. diff --git a/languages/mk-MK/Help/notfound.tid b/languages/mk-MK/Help/notfound.tid new file mode 100644 index 000000000..9268d32b0 --- /dev/null +++ b/languages/mk-MK/Help/notfound.tid @@ -0,0 +1,4 @@ +title: $:/language/Help/notfound +description: + +Нема таква помошна ставка \ No newline at end of file diff --git a/languages/mk-MK/Help/output.tid b/languages/mk-MK/Help/output.tid new file mode 100644 index 000000000..e69c1bd79 --- /dev/null +++ b/languages/mk-MK/Help/output.tid @@ -0,0 +1,11 @@ +title: $:/language/Help/output +description: Поставува општа излезна датотека (насока) за команди + +Sets the base output directory for subsequent commands. The default output directory is the `output` subdirectory of the edition directory. + +``` +--output <pathname> +``` + +If the specified pathname is relative then it is resolved relative to the current working directory. For example `--output .` sets the output directory to the current working directory. + diff --git a/languages/mk-MK/Help/password.tid b/languages/mk-MK/Help/password.tid new file mode 100644 index 000000000..0ce217c79 --- /dev/null +++ b/languages/mk-MK/Help/password.tid @@ -0,0 +1,10 @@ +title: $:/language/Help/password +description: Поставува лозинка за крипто операции + +Set a password for subsequent crypto operations + +``` +--password <password> +``` + +''Note'': This should not be used for serving TiddlyWiki with password protection. Instead, see the password option under the [[ServerCommand]]. diff --git a/languages/mk-MK/Help/render.tid b/languages/mk-MK/Help/render.tid new file mode 100644 index 000000000..f44e4061b --- /dev/null +++ b/languages/mk-MK/Help/render.tid @@ -0,0 +1,35 @@ +title: $:/language/Help/render +description: Рендерира записи одделно во фајлови + +Render individual tiddlers identified by a filter and save the results to the specified files. + +Optionally, the title of a template tiddler can be specified. In this case, instead of directly rendering each tiddler, the template tiddler is rendered with the "currentTiddler" variable set to the title of the tiddler that is being rendered. + +A name and value for an additional variable may optionally also be specified. + +``` +--render <tiddler-filter> [<filename-filter>] [<render-type>] [<template>] [ [<name>] [<value>] ]* +``` + +* ''tiddler-filter'': A filter identifying the tiddler(s) to be rendered +* ''filename-filter'': Optional filter transforming tiddler titles into pathnames. If omitted, defaults to `[is[tiddler]addsuffix[.html]]`, which uses the unchanged tiddler title as the filename +* ''render-type'': Optional render type: `text/html` (the default) returns the full HTML text and `text/plain` just returns the text content (ie it ignores HTML tags and other unprintable material) +* ''template'': Optional template through which each tiddler is rendered +* ''name'': Name of optional variables +* ''value'': Value of optional variables + +By default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory. + +Notes: + +* The output directory is not cleared of any existing files +* Any missing directories in the path to the filename are automatically created. +* When referring to a tiddler with spaces in its title, take care to use both the quotes required by your shell and also TiddlyWiki's double square brackets: `--render "[[Motovun Jack.jpg]]"` +* The filename filter is evaluated with the selected items being set to the title of the tiddler currently being rendered, allowing the title to be used as the basis for computing the filename. For example `[encodeuricomponent[]addprefix[static/]]` applies URI encoding to each title, and then adds the prefix `static/` +* Multiple ''name''/''value'' pairs can be used to pass more than one variable +* The `--render` command is a more flexible replacement for both the `--rendertiddler` and `--rendertiddlers` commands, which are deprecated + +Examples: + +* `--render '[!is[system]]' '[encodeuricomponent[]addprefix[tiddlers/]addsuffix[.html]]'` -- renders all non-system tiddlers as files in the subdirectory "tiddlers" with URL-encoded titles and the extension HTML +* `--render '.' 'tiddlers.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[HelloThere]]'` -- renders the tiddlers tagged "HelloThere" to a JSON file named "tiddlers.json" diff --git a/languages/mk-MK/Help/rendertiddler.tid b/languages/mk-MK/Help/rendertiddler.tid new file mode 100644 index 000000000..c40d7893f --- /dev/null +++ b/languages/mk-MK/Help/rendertiddler.tid @@ -0,0 +1,24 @@ +title: $:/language/Help/rendertiddler +description: Рендерира запис како назначен вид на содржина + +(Note: The `--rendertiddler` command is deprecated in favour of the new, more flexible `--render` command) + +Render an individual tiddler as a specified ContentType, defaulting to `text/html` and save it to the specified filename. + +Optionally the title of a template tiddler can be specified, in which case the template tiddler is rendered with the "currentTiddler" variable set to the tiddler that is being rendered (the first parameter value). + +A name and value for an additional variable may optionally also be specified. + +``` +--rendertiddler <title> <filename> [<type>] [<template>] [<name>] [<value>] +``` + +By default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory. + +Any missing directories in the path to the filename are automatically created. + +For example, the following command saves all tiddlers matching the filter `[tag[done]]` to a JSON file titled `output.json` by employing the core template `$:/core/templates/exporters/JsonFile`. + +``` +--rendertiddler "$:/core/templates/exporters/JsonFile" output.json text/plain "" exportFilter "[tag[done]]" +``` diff --git a/languages/mk-MK/Help/rendertiddlers.tid b/languages/mk-MK/Help/rendertiddlers.tid new file mode 100644 index 000000000..83d6fb483 --- /dev/null +++ b/languages/mk-MK/Help/rendertiddlers.tid @@ -0,0 +1,20 @@ +title: $:/language/Help/rendertiddlers +description: Рендерира записи што одговараат на филтер за одреден вид на содржина + +(Note: The `--rendertiddlers` command is deprecated in favour of the new, more flexible `--render` command) + +Render a set of tiddlers matching a filter to separate files of a specified ContentType (defaults to `text/html`) and extension (defaults to `.html`). + +``` +--rendertiddlers '<filter>' <template> <pathname> [<type>] [<extension>] ["noclean"] +``` + +For example: + +``` +--rendertiddlers '[!is[system]]' $:/core/templates/static.tiddler.html ./static text/plain +``` + +By default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory. + +Any files in the target directory are deleted unless the ''noclean'' flag is specified. The target directory is recursively created if it is missing. diff --git a/languages/mk-MK/Help/save.tid b/languages/mk-MK/Help/save.tid new file mode 100644 index 000000000..6ae0cf644 --- /dev/null +++ b/languages/mk-MK/Help/save.tid @@ -0,0 +1,25 @@ +title: $:/language/Help/save +description: Ги зачувува записите одделно во фајлови + +Saves individual tiddlers identified by a filter in their raw text or binary format to the specified files. + +``` +--save <tiddler-filter> <filename-filter> +``` + +* ''tiddler-filter'': A filter identifying the tiddler(s) to be saved +* ''filename-filter'': Optional filter transforming tiddler titles into pathnames. If omitted, defaults to `[is[tiddler]]`, which uses the unchanged tiddler title as the filename + +By default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory. + +Notes: + +* The output directory is not cleared of any existing files +* Any missing directories in the path to the filename are automatically created. +* When saving a tiddler with spaces in its title, take care to use both the quotes required by your shell and also TiddlyWiki's double square brackets: `--save "[[Motovun Jack.jpg]]"` +* The filename filter is evaluated with the selected items being set to the title of the tiddler currently being saved, allowing the title to be used as the basis for computing the filename. For example `[encodeuricomponent[]addprefix[static/]]` applies URI encoding to each title, and then adds the prefix `static/` +* The `--save` command is a more flexible replacement for both the `--savetiddler` and `--savetiddlers` commands, which are deprecated + +Examples: + +* `--save "[!is[system]is[image]]" "[encodeuricomponent[]addprefix[tiddlers/]]"` -- saves all non-system image tiddlers as files in the subdirectory "tiddlers" with URL-encoded titles diff --git a/languages/mk-MK/Help/savetiddler.tid b/languages/mk-MK/Help/savetiddler.tid new file mode 100644 index 000000000..7c3072ac6 --- /dev/null +++ b/languages/mk-MK/Help/savetiddler.tid @@ -0,0 +1,14 @@ +title: $:/language/Help/savetiddler +description: Зачувува запис во фајл + +(Note: The `--savetiddler` command is deprecated in favour of the new, more flexible `--save` command) + +Saves an individual tiddler in its raw text or binary format to the specified filename. + +``` +--savetiddler <title> <filename> +``` + +By default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory. + +Any missing directories in the path to the filename are automatically created. diff --git a/languages/mk-MK/Help/savetiddlers.tid b/languages/mk-MK/Help/savetiddlers.tid new file mode 100644 index 000000000..de6ee9885 --- /dev/null +++ b/languages/mk-MK/Help/savetiddlers.tid @@ -0,0 +1,16 @@ +title: $:/language/Help/savetiddlers +description: Зачувува повеќе записи во датотека + +(Note: The `--savetiddlers` command is deprecated in favour of the new, more flexible `--save` command) + +Saves a group of tiddlers in their raw text or binary format to the specified directory. + +``` +--savetiddlers <filter> <pathname> ["noclean"] +``` + +By default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory. + +The output directory is cleared of existing files before saving the specified files. The deletion can be disabled by specifying the ''noclean'' flag. + +Any missing directories in the pathname are automatically created. diff --git a/languages/mk-MK/Help/savewikifolder.tid b/languages/mk-MK/Help/savewikifolder.tid new file mode 100644 index 000000000..a77475873 --- /dev/null +++ b/languages/mk-MK/Help/savewikifolder.tid @@ -0,0 +1,34 @@ +title: $:/language/Help/savewikifolder +description: Зачувува википедија во нов фолдер + +<<.from-version "5.1.20">> Saves the current wiki as a wiki folder, including tiddlers, plugins and configuration: + +``` +--savewikifolder <wikifolderpath> [<filter>] [ [<name>=<value>] ]* +``` + +* The target wiki folder must be empty or non-existent +* The filter specifies which tiddlers should be included. It is optional, defaulting to `[all[tiddlers]]` +* Plugins from the official plugin library are replaced with references to those plugins in the `tiddlywiki.info` file +* Custom plugins are unpacked into their own folder + +The following options are supported: + +* ''filter'': a filter expression that defines the tiddlers to include in the output. +* ''explodePlugins'': defaults to "yes" +** ''yes'' will "explode" plugins into separate tiddler files and save them to the plugin directory within the wiki folder +** ''no'' will suppress exploding plugins into their constituent tiddler files. It will save the plugin as a single JSON tiddler in the tiddlers folder + +Note that both ''explodePlugins'' options will produce wiki folders that build the exact same original wiki. The difference lies in how plugins are represented in the wiki folder. + +A common usage is to convert a TiddlyWiki HTML file into a wiki folder: + +``` +tiddlywiki --load ./mywiki.html --savewikifolder ./mywikifolder +``` + +Save the plugin to the tiddlers directory of the target wiki folder: + +``` +tiddlywiki --load ./mywiki.html --savewikifolder ./mywikifolder explodePlugins=no +``` diff --git a/languages/mk-MK/Help/server.tid b/languages/mk-MK/Help/server.tid new file mode 100644 index 000000000..5df4d6405 --- /dev/null +++ b/languages/mk-MK/Help/server.tid @@ -0,0 +1,43 @@ +title: $:/language/Help/server +description: (застарено: погледнете ја 'listen' командата) Обезбедува интерфејс помеѓу HTTP серверот и ТидлиВики + +Legacy command to serve a wiki over HTTP. + +``` +--server <port> <root-tiddler> <root-render-type> <root-serve-type> <username> <password> <host> <path-prefix> <debug-level> +``` + +The parameters are: + +* ''port'' - port number on which to listen; non-numeric values are interpreted as a system environment variable from which the port number is extracted (defaults to "8080") +* ''root-tiddler'' - the tiddler to serve at the root (defaults to "$:/core/save/all") +* ''root-render-type'' - the content type to which the root tiddler should be rendered (defaults to "text/plain") +* ''root-serve-type'' - the content type with which the root tiddler should be served (defaults to "text/html") +* ''username'' - the default username for signing edits +* ''password'' - optional password for basic authentication +* ''host'' - optional hostname to serve from (defaults to "127.0.0.1" aka "localhost") +* ''path-prefix'' - optional prefix for paths +* ''debug-level'' - optional debug level; set to "debug" to view request details (defaults to "none") + +If the password parameter is specified then the browser will prompt the user for the username and password. Note that the password is transmitted in plain text so this implementation should only be used on a trusted network or over HTTPS. + +For example: + +``` +--server 8080 $:/core/save/all text/plain text/html MyUserName passw0rd +``` + +The username and password can be specified as empty strings if you need to set the hostname or pathprefix and don't want to require a password. + + +``` +--server 8080 $:/core/save/all text/plain text/html "" "" 192.168.0.245 +``` + +Using an address like this exposes your system to the local network. For information on opening up your instance to the entire local network, and possible security concerns, see the WebServer tiddler at TiddlyWiki.com. + +To run multiple TiddlyWiki servers at the same time you'll need to put each one on a different port. It can be useful to use an environment variable to pass the port number to the Node.js process. This example references an environment variable called "MY_PORT_NUMBER": + +``` +--server MY_PORT_NUMBER $:/core/save/all text/plain text/html MyUserName passw0rd +``` diff --git a/languages/mk-MK/Help/setfield.tid b/languages/mk-MK/Help/setfield.tid new file mode 100644 index 000000000..1357a3f8f --- /dev/null +++ b/languages/mk-MK/Help/setfield.tid @@ -0,0 +1,17 @@ +title: $:/language/Help/setfield +description: Ги подготвува надворешните записи за употреба + +//Note that this command is experimental and may change or be replaced before being finalised// + +Sets the specified field of a group of tiddlers to the result of wikifying a template tiddler with the `currentTiddler` variable set to the tiddler. + +``` +--setfield <filter> <fieldname> <templatetitle> <rendertype> +``` + +The parameters are: + +* ''filter'' - filter identifying the tiddlers to be affected +* ''fieldname'' - the field to modify (defaults to "text") +* ''templatetitle'' - the tiddler to wikify into the specified field. If blank or missing then the specified field is deleted +* ''rendertype'' - the text type to render (defaults to "text/plain"; "text/html" can be used to include HTML tags) diff --git a/languages/mk-MK/Help/unpackplugin.tid b/languages/mk-MK/Help/unpackplugin.tid new file mode 100644 index 000000000..6f1d94622 --- /dev/null +++ b/languages/mk-MK/Help/unpackplugin.tid @@ -0,0 +1,8 @@ +title: $:/language/Help/unpackplugin +description: Ги отпакува записите поврзани со плаген + +Ги екстрактира записите поврзани со плаген и ги креира како обични записи: + +``` +--unpackplugin <title> +``` diff --git a/languages/mk-MK/Help/verbose.tid b/languages/mk-MK/Help/verbose.tid new file mode 100644 index 000000000..0dae62bd1 --- /dev/null +++ b/languages/mk-MK/Help/verbose.tid @@ -0,0 +1,8 @@ +title: $:/language/Help/verbose +description: Активира опширен излезен режим + +Активира опширен излезен режим, корисен за debugging + +``` +--verbose +``` diff --git a/languages/mk-MK/Help/version.tid b/languages/mk-MK/Help/version.tid new file mode 100644 index 000000000..5538883ff --- /dev/null +++ b/languages/mk-MK/Help/version.tid @@ -0,0 +1,8 @@ +title: $:/language/Help/version +description: Ја покажува ТидлиВики верзијата. + +Ја покажува ТидлиВики верзијата. + +``` +--version +``` diff --git a/languages/mk-MK/Import.multids b/languages/mk-MK/Import.multids new file mode 100644 index 000000000..11f36e649 --- /dev/null +++ b/languages/mk-MK/Import.multids @@ -0,0 +1,34 @@ +title: $:/language/Import/ + +Editor/Import/Heading: Импортирај слики и додади ги во уредникот. +Imported/Hint: Овие записи беа импортирани: +Listing/Cancel/Caption: Откажи +Listing/Cancel/Warning: Дали сакате да го откажете импортирањето? +Listing/Hint: Овие записи се спремни за импорт: +Listing/Import/Caption: Импортирај +Listing/Preview: Преглед: +Listing/Preview/Diff: Разлика +Listing/Preview/DiffFields: Разлика (Полиња) +Listing/Preview/Fields: Полиња +Listing/Preview/Text: Текст +Listing/Preview/TextRaw: Текст (Чист) +Listing/Rename/CancelRename: Откажи +Listing/Rename/ConfirmRename: Преименувај запис +Listing/Rename/OverwriteWarning: Запис со ваков наслов веќе постои. +Listing/Rename/Prompt: Преименувај во: +Listing/Rename/Tooltip: Преименувај го записот пред импортирање +Listing/Select/Caption: Избери +Listing/Status/Caption: Статус +Listing/Title/Caption: Наслов +Upgrader/Plugins/Suppressed/Incompatible: Блокиран некомпатибилен или застарен плаген. +Upgrader/Plugins/Suppressed/Version: Блокиран плаген (поради тоа што дојдовниот <<incoming>> не е понов од постоечкиот <<existing>>). +Upgrader/Plugins/Upgraded: Надоградба на плаген од <<incoming>> во <<upgraded>>. +Upgrader/State/Suppressed: Блокирана привремена состојба на запис. +Upgrader/System/Alert: Ќе импортирате запис кој ќе обнови (презапише) основен модуларен запис. Ова не е препорачливо бидејќи може да го направи системот нестабилен. +Upgrader/System/Disabled: Исклучен системски запис. +Upgrader/System/Suppressed: Блокиран системски запис. +Upgrader/System/Warning: Основен модуларен запис. +Upgrader/ThemeTweaks/Created: Мигрирана тематска измена од <$text text=<<from>>/>. +Upgrader/Tiddler/Disabled: Исклучен запис. +Upgrader/Tiddler/Selected: Избран запис. +Upgrader/Tiddler/Unselected: Неизбран запис. diff --git a/languages/mk-MK/Misc.multids b/languages/mk-MK/Misc.multids new file mode 100644 index 000000000..8a02eafb4 --- /dev/null +++ b/languages/mk-MK/Misc.multids @@ -0,0 +1,99 @@ +title: $:/language/ + +AboveStory/ClassicPlugin/Warning: Изгледа дека се обидувате да вклучите плаген дизајниран за ТидлиВики Класик. Имајте во предвид дека [[овие плагени не функционираат со ТидлиВики верзија 5.x.x|https://tiddlywiki.com/#TiddlyWikiClassic]]. Избришани плагени што се за ТидлиВики Класик: +BinaryWarning/Prompt: Овој запис содржи бинарни податоци +ClassicWarning/Hint: Овој запис е креиран со вики-текст формат за ТидлиВики Класик кој што не е целосно компатибилен со верзија 5 на ТидлиВики. Посетете ја оваа страница https://tiddlywiki.com/static/Upgrading.html за повеќе информации. +ClassicWarning/Upgrade/Caption: надоградба +CloseAll/Button: затвори ги сите +ColourPicker/Recent: Скорашни: +ConfirmAction: Дали сакате да продолжите? +ConfirmCancelTiddler: Дали сакате да ги отстраните промените на записот "<$text text=<<title>>/>"? +ConfirmDeleteTiddler: Дали сакате да го избришете записот "<$text text=<<title>>/>"? +ConfirmDeleteTiddlers: Сигурно сакате да избришете <<resultCount>> запис(и)? +ConfirmEditShadowTiddler: Ќе започнете со уредување на сенка. Било каква промена што ќе ја направите тука ќе го презапише (обнови) основниот систем. Сигурно сакате да го уредувате "<$text text=<<title>>/>"? +ConfirmOverwriteTiddler: Дали сакате да го обновите записот "<$text text=<<title>>/>"? +Count: брои +DefaultNewTiddlerTitle: Нов Запис +Diffs/CountMessage: <<diff-count>> разлики +DropMessage: Пуштете сега (или користете го копчето „Escape“ за да откажете) +Encryption/Cancel: Откажи +Encryption/ConfirmClearPassword: Дали сакате да ја избришете лозинката? Со овој чекор ќе го отстраните шифрирањето што се применува за оваа википедија +Encryption/Password: Лозинка +Encryption/PasswordNoMatch: Лозинките не се совпаѓаат +Encryption/PromptSetPassword: Поставете нова лозинка за ова ТидлиВики +Encryption/RepeatPassword: Повтори лозинка +Encryption/SetPassword: Постави лозинка +Encryption/Username: Корисничко име +Error/Caption: Грешка +Error/DeserializeOperator/MissingOperand: Грешка во филтер: Недостасува управител за операторот 'deserialize' +Error/DeserializeOperator/UnknownDeserializer: Грешка во филтер: Непознат 'deserializer' означен како управител на операторот 'deserialize' +Error/Filter: Грешка во филтер +Error/FilterRunPrefix: Грешка во филтер: Непознат префикс за работа на филтерот +Error/FilterSyntax: Синтаксна грешка во изразот на филтерот +Error/FormatFilterOperator: Грешка во филтер: Непозната наставка за операторот на 'format' филтерот +Error/IsFilterOperator: Грешка во филтер: Непознат управител на операторот 'is' +Error/LoadingPluginLibrary: Грешка при вчитување на библиотеката со плагени +Error/NetworkErrorAlert: `<h2>''Мрежна грешка''</h2> Изгледа дека врската со серверот е изгубена. Проверете ја вашата мрежна конекција. Обидете се да ја вратите врската пред да продолжите.<br><br>''Сите незачувани промени автоматски ќе се синхронизираат откако ќе се врати поврзувањето''.` +Error/PutEditConflict: Фајлот е променет на серверот +Error/PutForbidden: Барањето е одбиено +Error/PutUnauthorized: Потребна е авторизација +Error/RecursiveTransclusion: Грешка при ''recursive transclusion'' во widget +Error/RetrievingSkinny: Грешка при превземање листа со записи +Error/SavingToTWEdit: Грешка при меморирање во TWEdit +Error/WhileSaving: Грешка при меморирање +Error/XMLHttpRequest: XMLHttpRequest грешка +Error/ZoominTextNode: Грешка во изгледот на реката: Се чини дека се обидовте да работите со запис кој се прикажува во посебен контејнер. Ова најверојатно е предизвикано од користењето на `$:/tags/StoryTiddlerTemplateFilter` со шаблон кој содржи текст или празно место на почетокот. Ве молиме користете ја прагмата `\whitespace trim` и погрижете се целата содржина на записот да биде опфатена во еден HTML елемент. Текстот кој го предизвика овој проблем: +InternalJavaScriptError/Hint: Ах...е ова е за срамота. Се препорачува да го рестартирате вашето ТидлиВики со освежување на вашиот прелистувач +InternalJavaScriptError/Title: Внатрешна ЈаваСкрипт грешка +LayoutSwitcher/Description: Отвори го менувачот за распоред +LazyLoadingWarning: <p>Се обидува да вчита надворешна содржина од ''<$text text={{!!_canonical_uri}}/>''</p><p>Доколку оваа порака не исчезне, или видот на содржина во записот не одговара со надворешната содржина, или пак користите прелистувач кој не подржува надворешна содржина за самостојни википедии. Видете повеќе тука: https://tiddlywiki.com/#ExternalText</p> +LoginToTiddlySpace: Најава до TiddlySpace +Manager/Controls/FilterByTag/None: (ништо) +Manager/Controls/FilterByTag/Prompt: Филтер според ознака: +Manager/Controls/Order/Prompt: Обратен редослед +Manager/Controls/Search/Placeholder: Пребарувај +Manager/Controls/Search/Prompt: Пребарувај: +Manager/Controls/Show/Option/Tags: ознаки +Manager/Controls/Show/Option/Tiddlers: записи +Manager/Controls/Show/Prompt: Прикажи: +Manager/Controls/Sort/Prompt: Подреди според: +Manager/Item/Colour: Боја +Manager/Item/Fields: Полиња +Manager/Item/Icon: Икона +Manager/Item/Icon/None: (ништо) +Manager/Item/RawText: Чист текст +Manager/Item/Tags: Ознаки +Manager/Item/Tools: Алатки +Manager/Item/WikifiedText: Wikified текст +MissingTiddler/Hint: Записот "<$text text=<<currentTiddler>>/>" е непостоечки -- кликни {{||$:/core/ui/Buttons/edit}} за да го креираш +No: Не +OfficialPluginLibrary: Официјална библиотека за плагени +OfficialPluginLibrary/Hint: Официјална библиотека за ТидлиВики плагени од tiddlywiki.com. Сите плагени, теми и јазични пакети се одржувани од страна на главниот тим. +PageTemplate/Description: Основен ТидлиВики распоред +PageTemplate/Name: Основен шаблон +PluginReloadWarning: Ве молиме зачувајте {{$:/core/ui/Buttons/save-wiki}} и освежете {{$:/core/ui/Buttons/refresh}} за да може промените во ЈаваСкрипт плагените да имаат ефект +RecentChanges/DateFormat: DDth MMM YYYY +Shortcuts/Input/Accept/Hint: Прифати го означеното +Shortcuts/Input/AcceptVariant/Hint: Прифати го означеното (варијанта) +Shortcuts/Input/AdvancedSearch/Hint: Отвори напредно пребарување додека пишуваме во полето за пребарувај +Shortcuts/Input/Cancel/Hint: Исчисти го полето за внесување +Shortcuts/Input/Down/Hint: Одбери следно +Shortcuts/Input/Tab-Left/Hint: Одбери претходна група +Shortcuts/Input/Tab-Right/Hint: Одбери следна група +Shortcuts/Input/Up/Hint: Одбери претходно +Shortcuts/SidebarLayout/Hint: Смени распоред на страничното мени +Switcher/Subtitle/language: Смени јазик +Switcher/Subtitle/layout: Смени распоред +Switcher/Subtitle/palette: Смени палета +Switcher/Subtitle/theme: Смени тема +SystemTiddler/Tooltip: Ова е системски запис +SystemTiddlers/Include/Prompt: Прикажи ги системските записи +TagManager/Colour/Heading: Боја +TagManager/Count/Heading: Вкупно +TagManager/Icon/Heading: Икона +TagManager/Icons/None: Ништо +TagManager/Info/Heading: Инфо +TagManager/Tag/Heading: Ознака +Tiddler/DateFormat: DDth MMM YYYY во hh:0mm +UnsavedChangesWarning: Имате незачувани промени во вашето ТидлиВики +Yes: Да diff --git a/languages/mk-MK/Modals/Download.tid b/languages/mk-MK/Modals/Download.tid new file mode 100644 index 000000000..3b8908bbb --- /dev/null +++ b/languages/mk-MK/Modals/Download.tid @@ -0,0 +1,13 @@ +title: $:/language/Modals/Download +type: +subtitle: Download changes +footer: <$button message="tm-close-tiddler">Close</$button> +help: https://tiddlywiki.com/static/DownloadingChanges.html + +Вашиот прелистувач подржува само мануелно меморирање. + +За да ги зачувате промените на вашата википедија, кликнете со десен клик на долниот линк за преземање (Download link) и одберете „Download file“ или „Save file“. Па, потоа одберете име на фајлот и фолдер за меморирање. + +//Можете и побрзо да го направите тоа со кликање на линкот за преземање при што истовремено држите на Ctrl (за Виндовс) или Options/Alt (за Мекинтош). При ваквото меморирање нема да побара од вас да го именувате фајлот или пак да одберете фолдер за меморирање. Но, подоцна можеби ќе треба да го преименувате фајлот вклучувајќи ја и .html екстензијата.// + +На мобилните телефони каде не е дозволено преземањето на фајлови, наместо тоа, можете да го обележите линкот (bookmark), а потоа да ги синхронизирате обележените линкови со вашиот десктоп каде што ќе можете да извршите нормално меморирање. \ No newline at end of file diff --git a/languages/mk-MK/NewJournal.multids b/languages/mk-MK/NewJournal.multids new file mode 100644 index 000000000..e196b55a0 --- /dev/null +++ b/languages/mk-MK/NewJournal.multids @@ -0,0 +1,5 @@ +title: $:/config/NewJournal/ + +Tags: Дневник +Text: +Title: DDth MMM YYYY diff --git a/languages/mk-MK/Notifications.multids b/languages/mk-MK/Notifications.multids new file mode 100644 index 000000000..defe7f475 --- /dev/null +++ b/languages/mk-MK/Notifications.multids @@ -0,0 +1,6 @@ +title: $:/language/Notifications/ + +CopiedToClipboard/Failed: Неуспешно копирање до клипборд! +CopiedToClipboard/Succeeded: Копирано до клипборд! +Save/Done: Зачувана википедија +Save/Starting: Википедијата започнува да се зачувува diff --git a/languages/mk-MK/Search.multids b/languages/mk-MK/Search.multids new file mode 100644 index 000000000..5e55e0af0 --- /dev/null +++ b/languages/mk-MK/Search.multids @@ -0,0 +1,20 @@ +title: $:/language/Search/ + +DefaultResults/Caption: Листа +Filter/Caption: Филтер +Filter/Hint: Пребарувај со [[филтер|https://tiddlywiki.com/static/Filters.html]] +Filter/Matches: //<small><<resultCount>> пронајдени</small>// +Matches: //<small><<resultCount>> пронајдени</small>// +Matches/All: Сите резултати: +Matches/Title: Наслови: +Search: Пребарувај +Search/TooShort: Текстот е прекраток за пребарување +Shadows/Caption: Сенки +Shadows/Hint: Пребарувај записи кои се сенки +Shadows/Matches: //<small><<resultCount>> пронајдени</small>// +Standard/Caption: Стандардно +Standard/Hint: Пребарувај општи записи +Standard/Matches: //<small><<resultCount>> пронајдени</small>// +System/Caption: Системско +System/Hint: Пребарувај записи кои се системски +System/Matches: //<small><<resultCount>> пронајдени</small>// diff --git a/languages/mk-MK/SideBar.multids b/languages/mk-MK/SideBar.multids new file mode 100644 index 000000000..bba310d2e --- /dev/null +++ b/languages/mk-MK/SideBar.multids @@ -0,0 +1,18 @@ +title: $:/language/SideBar/ + +All/Caption: Сите +Caption: Мени +Contents/Caption: Содржини +Drafts/Caption: Незачувани +Explorer/Caption: Истражувач +Missing/Caption: Непостоечки +More/Caption: Повеќе +Open/Caption: Отворени +Orphans/Caption: Самостојни +Recent/Caption: Скорашни +Shadows/Caption: Сенки +System/Caption: Системски +Tags/Caption: Ознаки +Tags/Untagged/Caption: без +Tools/Caption: Алатки +Types/Caption: Видови diff --git a/languages/mk-MK/SiteSubtitle.tid b/languages/mk-MK/SiteSubtitle.tid new file mode 100644 index 000000000..2764b4d40 --- /dev/null +++ b/languages/mk-MK/SiteSubtitle.tid @@ -0,0 +1,3 @@ +title: $:/SiteSubtitle + +''//персонализирана википедија на знаење//'' \ No newline at end of file diff --git a/languages/mk-MK/SiteTitle.tid b/languages/mk-MK/SiteTitle.tid new file mode 100644 index 000000000..365166cff --- /dev/null +++ b/languages/mk-MK/SiteTitle.tid @@ -0,0 +1,3 @@ +title: $:/SiteTitle + +ТидлиВики \ No newline at end of file diff --git a/languages/mk-MK/Snippets/ListByTag.tid b/languages/mk-MK/Snippets/ListByTag.tid new file mode 100644 index 000000000..3ad194198 --- /dev/null +++ b/languages/mk-MK/Snippets/ListByTag.tid @@ -0,0 +1,5 @@ +title: $:/language/Snippets/ListByTag +tags: $:/tags/TextEditor/Snippet +caption: Листа на записи според ознаки + +<<list-links "[tag[task]sort[title]]">> diff --git a/languages/mk-MK/Snippets/MacroDefinition.tid b/languages/mk-MK/Snippets/MacroDefinition.tid new file mode 100644 index 000000000..d3815e578 --- /dev/null +++ b/languages/mk-MK/Snippets/MacroDefinition.tid @@ -0,0 +1,7 @@ +title: $:/language/Snippets/MacroDefinition +tags: $:/tags/TextEditor/Snippet +caption: Дефинирање макро + +\define macroName(param1:"default value",param2) +Text of the macro +\end diff --git a/languages/mk-MK/Snippets/Table4x3.tid b/languages/mk-MK/Snippets/Table4x3.tid new file mode 100644 index 000000000..9ed3aa2e2 --- /dev/null +++ b/languages/mk-MK/Snippets/Table4x3.tid @@ -0,0 +1,8 @@ +title: $:/language/Snippets/Table4x3 +tags: $:/tags/TextEditor/Snippet +caption: Табела од 4 колони со 3 реда + +|! |!Алфа |!Бета |!Гама |!Делта | +|!Еден | | | | | +|!Два | | | | | +|!Три | | | | | diff --git a/languages/mk-MK/Snippets/TableOfContents.tid b/languages/mk-MK/Snippets/TableOfContents.tid new file mode 100644 index 000000000..e6e86718f --- /dev/null +++ b/languages/mk-MK/Snippets/TableOfContents.tid @@ -0,0 +1,9 @@ +title: $:/language/Snippets/TableOfContents +tags: $:/tags/TextEditor/Snippet +caption: Содржина + +<div class="tc-table-of-contents"> + +<<toc-selective-expandable 'TableOfContents'>> + +</div> \ No newline at end of file diff --git a/languages/mk-MK/ThemeTweaks.multids b/languages/mk-MK/ThemeTweaks.multids new file mode 100644 index 000000000..4e0526abb --- /dev/null +++ b/languages/mk-MK/ThemeTweaks.multids @@ -0,0 +1,42 @@ +title: $:/language/ThemeTweaks/ + +Metrics: Големина +Metrics/BodyFontSize: Големина на фонт во реката со записи +Metrics/BodyLineHeight: Размер во реката со записи +Metrics/FontSize: Големина на фонт за страничното мени +Metrics/LineHeight: Размер за страничното мени +Metrics/SidebarBreakpoint: Сокри го страничното мени +Metrics/SidebarBreakpoint/Hint: минимална ширина со која ќе се одреди дали страничното мени <br> ќе биде прикажано или сокриено при намалување на <br> отворениот ТидлиВики прозорец +Metrics/SidebarWidth: Ширина на страничното мени +Metrics/SidebarWidth/Hint: ширината на страничното мени во <br> __флуидни записи, фиксирано мени__ распоред +Metrics/StoryLeft: Лева маргина на реката со записи +Metrics/StoryLeft/Hint: колку левата маргина на реката со записи ќе биде <br> оддалечена од левата страна на екранот +Metrics/StoryRight: Лева маргина на страничното мени +Metrics/StoryRight/Hint: колку левата маргина на страничното мени <br> ќе биде оддалечена од левата страна на екранот во <br> __фиксирани записи, флуидно мени__ распоред +Metrics/StoryTop: Горна маргина +Metrics/StoryTop/Hint: колку горната маргина ќе биде оддалечена од горната страна на екранот +Metrics/StoryWidth: Општа ширина +Metrics/StoryWidth/Hint: ширината на самата река со записи +Metrics/TiddlerWidth: Ширина на запис +Metrics/TiddlerWidth/Hint: ширината во реката со записи +Options: Опции +Options/CodeWrapping: Завиткајте ги долгите реченици при работа со код блокови +Options/SidebarLayout: Распоред +Options/SidebarLayout/Fixed-Fluid: Фиксирани записи, флуидно мени +Options/SidebarLayout/Fluid-Fixed: Флуидни записи, фиксирано мени +Options/StickyTitles: Видливи наслови +Options/StickyTitles/Hint: насловите на записите да се “закачат“ <br> на горниот дел од реката со записи при скролање нагоре/надоле +Settings: Поставки +Settings/BackgroundImage: Позадинска слика +Settings/BackgroundImageAttachment: Начин на однесување на сликата +Settings/BackgroundImageAttachment/Fixed: Фиксирано +Settings/BackgroundImageAttachment/Scroll: Движечко +Settings/BackgroundImageSize: Димензии на сликата +Settings/BackgroundImageSize/Auto: Ауто +Settings/BackgroundImageSize/Contain: Прикриј +Settings/BackgroundImageSize/Cover: Опфати +Settings/CodeFontFamily: Фонт фамилија за код +Settings/EditorFontFamily: Фонт фамилија за уредник +Settings/FontFamily: Фонт фамилија +ThemeTweaks: Измени +ThemeTweaks/Hint: Можете да промените одредени аспекти на „Ванила“ темата. diff --git a/languages/mk-MK/TiddlerInfo.multids b/languages/mk-MK/TiddlerInfo.multids new file mode 100644 index 000000000..ae55e8966 --- /dev/null +++ b/languages/mk-MK/TiddlerInfo.multids @@ -0,0 +1,21 @@ +title: $:/language/TiddlerInfo/ + +Advanced/Caption: Напредно +Advanced/PluginInfo/Empty/Hint: ништо +Advanced/PluginInfo/Heading: Опис на плаген +Advanced/PluginInfo/Hint: Овој плаген ги содржи следниве сенки: +Advanced/ShadowInfo/Heading: Статус за сенка +Advanced/ShadowInfo/NotShadow/Hint: Записот <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> не е сенка +Advanced/ShadowInfo/OverriddenShadow/Hint: Заменето е со обичен запис +Advanced/ShadowInfo/Shadow/Hint: Записот <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> е сенка +Advanced/ShadowInfo/Shadow/Source: Дефинирано е во плагенот <$link to=<<pluginTiddler>>><$text text=<<pluginTiddler>>/></$link> +Fields/Caption: Полиња +List/Caption: Своја листа +List/Empty: Овој запис нема своја листа +Listed/Caption: Друга листа +Listed/Empty: Овој запис не е спомнат во друга листа +References/Caption: Линкови +References/Empty: Нема записи кои го спомнуваат овој запис +Tagging/Caption: Ознаки +Tagging/Empty: Нема записи кои се означени со овој запис +Tools/Caption: Алатки diff --git a/languages/mk-MK/Types/application%2Fjavascript.tid b/languages/mk-MK/Types/application%2Fjavascript.tid new file mode 100644 index 000000000..44e1277b4 --- /dev/null +++ b/languages/mk-MK/Types/application%2Fjavascript.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/application/javascript +description: ЈаваСкрипт +name: application/javascript +group: Девелопер diff --git a/languages/mk-MK/Types/application%2Fjson.tid b/languages/mk-MK/Types/application%2Fjson.tid new file mode 100644 index 000000000..31efdac8f --- /dev/null +++ b/languages/mk-MK/Types/application%2Fjson.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/application/json +description: JSON дата +name: application/json +group: Девелопер diff --git a/languages/mk-MK/Types/application%2Fx-tiddler-dictionary.tid b/languages/mk-MK/Types/application%2Fx-tiddler-dictionary.tid new file mode 100644 index 000000000..f14866ce1 --- /dev/null +++ b/languages/mk-MK/Types/application%2Fx-tiddler-dictionary.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/application/x-tiddler-dictionary +description: Дата речник +name: application/x-tiddler-dictionary +group: Девелопер diff --git a/languages/mk-MK/Types/image%2Fgif.tid b/languages/mk-MK/Types/image%2Fgif.tid new file mode 100644 index 000000000..f2f50306b --- /dev/null +++ b/languages/mk-MK/Types/image%2Fgif.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/image/gif +description: GIF слика +name: image/gif +group: Фотографија diff --git a/languages/mk-MK/Types/image%2Fjpeg.tid b/languages/mk-MK/Types/image%2Fjpeg.tid new file mode 100644 index 000000000..5f2080e9a --- /dev/null +++ b/languages/mk-MK/Types/image%2Fjpeg.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/image/jpeg +description: JPEG слика +name: image/jpeg +group: Фотографија diff --git a/languages/mk-MK/Types/image%2Fpng.tid b/languages/mk-MK/Types/image%2Fpng.tid new file mode 100644 index 000000000..ba337ee49 --- /dev/null +++ b/languages/mk-MK/Types/image%2Fpng.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/image/png +description: PNG слика +name: image/png +group: Фотографија diff --git a/languages/mk-MK/Types/image%2Fsvg%2Bxml.tid b/languages/mk-MK/Types/image%2Fsvg%2Bxml.tid new file mode 100644 index 000000000..06e07f849 --- /dev/null +++ b/languages/mk-MK/Types/image%2Fsvg%2Bxml.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/image/svg+xml +description: SVG слика +name: image/svg+xml +group: Фотографија diff --git a/languages/mk-MK/Types/image%2Fx-icon.tid b/languages/mk-MK/Types/image%2Fx-icon.tid new file mode 100644 index 000000000..0f28bb5b8 --- /dev/null +++ b/languages/mk-MK/Types/image%2Fx-icon.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/image/x-icon +description: ICO икона +name: image/x-icon +group: Фотографија diff --git a/languages/mk-MK/Types/text%2Fcss.tid b/languages/mk-MK/Types/text%2Fcss.tid new file mode 100644 index 000000000..426722135 --- /dev/null +++ b/languages/mk-MK/Types/text%2Fcss.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/text/css +description: Статичен stylesheet +name: text/css +group: Девелопер diff --git a/languages/mk-MK/Types/text%2Fhtml.tid b/languages/mk-MK/Types/text%2Fhtml.tid new file mode 100644 index 000000000..63e59b5d6 --- /dev/null +++ b/languages/mk-MK/Types/text%2Fhtml.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/text/html +description: HTML markup +name: text/html +group: Текст diff --git a/languages/mk-MK/Types/text%2Fplain.tid b/languages/mk-MK/Types/text%2Fplain.tid new file mode 100644 index 000000000..3d0654bca --- /dev/null +++ b/languages/mk-MK/Types/text%2Fplain.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/text/plain +description: Обичен текст +name: text/plain +group: Текст diff --git a/languages/mk-MK/Types/text%2Fvnd.tiddlywiki.tid b/languages/mk-MK/Types/text%2Fvnd.tiddlywiki.tid new file mode 100644 index 000000000..febd44ed0 --- /dev/null +++ b/languages/mk-MK/Types/text%2Fvnd.tiddlywiki.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/text/vnd.tiddlywiki +description: ТидлиВики 5 +name: text/vnd.tiddlywiki +group: Текст diff --git a/languages/mk-MK/Types/text%2Fx-tiddlywiki.tid b/languages/mk-MK/Types/text%2Fx-tiddlywiki.tid new file mode 100644 index 000000000..224c5cf00 --- /dev/null +++ b/languages/mk-MK/Types/text%2Fx-tiddlywiki.tid @@ -0,0 +1,4 @@ +title: $:/language/Docs/Types/text/x-tiddlywiki +description: ТидлиВики Класик +name: text/x-tiddlywiki +group: Текст diff --git a/languages/mk-MK/icon.tid b/languages/mk-MK/icon.tid new file mode 100644 index 000000000..20525ace9 --- /dev/null +++ b/languages/mk-MK/icon.tid @@ -0,0 +1,8 @@ +title: $:/languages/mk-MK/icon +type: image/svg+xml + +<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="600" viewBox="-140 -70 280 140" fill="#f8e92e"> + <path fill="#d82126" d="m-140-70h280V70h-280z"/> + <path d="m-140 14v-28l280 28v-28zm126-84h28L0-15zM14 70h-28L0 15zM-140-70h42L12.86 7.72zm0 140h42L12.86-7.72zM140-70H98L-12.86 7.72zm0 140H98L-12.86-7.72z"/> + <circle r="22.5" stroke="#d82126" stroke-width="5"/> +</svg> diff --git a/languages/mk-MK/plugin.info b/languages/mk-MK/plugin.info new file mode 100644 index 000000000..1e96fe2e1 --- /dev/null +++ b/languages/mk-MK/plugin.info @@ -0,0 +1,8 @@ +{ + "title": "$:/languages/mk-MK", + "name": "mk-MK", + "plugin-type": "language", + "description": "Macedonian (North Macedonia)", + "author": "Nikola Dio Petkovski", + "core-version": ">=5.1.4" +} diff --git a/languages/pl-PL/Dates.multids b/languages/pl-PL/Dates.multids index f1c2d3a1b..0c12a366f 100644 --- a/languages/pl-PL/Dates.multids +++ b/languages/pl-PL/Dates.multids @@ -31,46 +31,46 @@ Date/DaySuffix/28: . Date/DaySuffix/29: . Date/DaySuffix/30: . Date/DaySuffix/31: . -Date/Long/Day/0: Niedziela -Date/Long/Day/1: Poniedziałek -Date/Long/Day/2: Wtorek -Date/Long/Day/3: Środa -Date/Long/Day/4: Czwartek -Date/Long/Day/5: Piątek -Date/Long/Day/6: Sobota -Date/Long/Month/1: Styczeń -Date/Long/Month/2: Luty -Date/Long/Month/3: Marzec -Date/Long/Month/4: Kwiecień -Date/Long/Month/5: Maj -Date/Long/Month/6: Czerwiec -Date/Long/Month/7: Lipiec -Date/Long/Month/8: Sierpień -Date/Long/Month/9: Wrzesień -Date/Long/Month/10: Październik -Date/Long/Month/11: Listopad -Date/Long/Month/12: Grudzień -Date/Period/am: AM -Date/Period/pm: PM -Date/Short/Day/0: nd -Date/Short/Day/1: pn -Date/Short/Day/2: wt -Date/Short/Day/3: śr -Date/Short/Day/4: cz -Date/Short/Day/5: pt -Date/Short/Day/6: sb -Date/Short/Month/1: st -Date/Short/Month/2: lut -Date/Short/Month/3: mrz -Date/Short/Month/4: kw -Date/Short/Month/5: maj -Date/Short/Month/6: cz -Date/Short/Month/7: lip -Date/Short/Month/8: sier -Date/Short/Month/9: wrz -Date/Short/Month/10: paź -Date/Short/Month/11: lis -Date/Short/Month/12: gr +Date/Long/Day/0: niedziela +Date/Long/Day/1: poniedziałek +Date/Long/Day/2: wtorek +Date/Long/Day/3: środa +Date/Long/Day/4: czwartek +Date/Long/Day/5: piątek +Date/Long/Day/6: sobota +Date/Long/Month/1: stycznia +Date/Long/Month/2: lutego +Date/Long/Month/3: marca +Date/Long/Month/4: kwietnia +Date/Long/Month/5: maja +Date/Long/Month/6: czerwca +Date/Long/Month/7: lipca +Date/Long/Month/8: sierpnia +Date/Long/Month/9: września +Date/Long/Month/10: października +Date/Long/Month/11: listopada +Date/Long/Month/12: grudnia +Date/Period/am: rano +Date/Period/pm: po południu +Date/Short/Day/0: niedz. +Date/Short/Day/1: pon. +Date/Short/Day/2: wt. +Date/Short/Day/3: śr. +Date/Short/Day/4: czw. +Date/Short/Day/5: pt. +Date/Short/Day/6: sob. +Date/Short/Month/1: I +Date/Short/Month/2: II +Date/Short/Month/3: III +Date/Short/Month/4: IV +Date/Short/Month/5: V +Date/Short/Month/6: VI +Date/Short/Month/7: VII +Date/Short/Month/8: VIII +Date/Short/Month/9: IX +Date/Short/Month/10: X +Date/Short/Month/11: XI +Date/Short/Month/12: XII RelativeDate/Future/Days: <<period>> dni od teraz RelativeDate/Future/Hours: <<period>> godzin od teraz RelativeDate/Future/Minutes: <<period>> minut od teraz @@ -79,7 +79,7 @@ RelativeDate/Future/Second: 1 sekunda od teraz RelativeDate/Future/Seconds: <<period>> sekund od teraz RelativeDate/Future/Years: <<period>> lat od teraz RelativeDate/Past/Days: <<period>> dni temu -RelativeDate/Past/Hours: <<period>> godizn temu +RelativeDate/Past/Hours: <<period>> godzin temu RelativeDate/Past/Minutes: <<period>> minut temu RelativeDate/Past/Months: <<period>> miesięcy temu RelativeDate/Past/Second: 1 sekundę temu diff --git a/languages/zh-Hans/Buttons.multids b/languages/zh-Hans/Buttons.multids index f33169778..c56e41ffe 100644 --- a/languages/zh-Hans/Buttons.multids +++ b/languages/zh-Hans/Buttons.multids @@ -28,6 +28,7 @@ Encryption/ClearPassword/Caption: 清除密码 Encryption/ClearPassword/Hint: 清除密码且不加密保存此维基 Encryption/SetPassword/Caption: 设置密码 Encryption/SetPassword/Hint: 设置加密保存此维基的密码 +EmergencyDownload/Caption: 下载条目为 json ExportPage/Caption: 导出所有条目 ExportPage/Hint: 导出所有条目 ExportTiddler/Caption: 导出此条目 diff --git a/languages/zh-Hans/Docs/ModuleTypes.multids b/languages/zh-Hans/Docs/ModuleTypes.multids index e86baa57f..6f33a3fe0 100644 --- a/languages/zh-Hans/Docs/ModuleTypes.multids +++ b/languages/zh-Hans/Docs/ModuleTypes.multids @@ -9,7 +9,7 @@ config: 加入 `$tw.config` 的数据。 filteroperator: 个别筛选器算子方法。 global: 加入 `$tw` 的全域数据。 info: 透过 [[$:/temp/info-plugin]] 伪插件,发布系统信息。 -isfilteroperator: ''is'' 筛选器算子的运算符。 +isfilteroperator: ''is'' 筛选器运算子的参数。 library: 一般用途的 JavaScript 模块的通用模块类型。 macro: JavaScript ''宏''定义。 parser: 不同内容类型的解析器。 diff --git a/languages/zh-Hans/Fields.multids b/languages/zh-Hans/Fields.multids index fc545848d..b406a56ad 100644 --- a/languages/zh-Hans/Fields.multids +++ b/languages/zh-Hans/Fields.multids @@ -5,6 +5,7 @@ author: 一个插件作者的姓名 bag: 条目的来源集的名称 caption: 显示于页签或按钮上的标题文字 code-body: 若设置为 ''yes'',视图模板将以程式码形式显示条目 +class: 渲染条目时,套用到条目的 CSS 类别 - 请参阅[[依自订类别的自订样式|Custom styles by user-class]]。也适用于[[互动窗口|Modals]] color: 条目的 CSS 颜色值 component: 负责[[提醒条目|AlertMechanism]]的组件名称 core-version: 对于一个插件,表示与其兼容的 TiddlyWiki 版本 diff --git a/languages/zh-Hans/Misc.multids b/languages/zh-Hans/Misc.multids index 51e6a2ca0..edd508ecd 100644 --- a/languages/zh-Hans/Misc.multids +++ b/languages/zh-Hans/Misc.multids @@ -31,7 +31,7 @@ Error/Filter: 筛选器错误 Error/FilterRunPrefix: 筛选器错误:筛选器 run 的未知首码 Error/FilterSyntax: 筛选器运算式中的语法错误 Error/FormatFilterOperator: 筛选器错误:`format` 筛选器运算符的未知尾码 -Error/IsFilterOperator: 筛选器错误︰'is' 筛选器运算符的未知操作数 +Error/IsFilterOperator: 筛选器错误︰'is' 筛选器运算子的未知参数 Error/LoadingPluginLibrary: 加载插件库时,发生错误 Error/NetworkErrorAlert: `<h2>''网络错误''</h2>与服务器的连缐似乎已中断。这可能表示您的网络连缐有问题。请尝试恢复网路连缐才能继续。<br><br>''恢复连缐时,所有未保存的更改,将自动同步''。` Error/PutEditConflict: 服务器上的文件已更改 diff --git a/languages/zh-Hant/Buttons.multids b/languages/zh-Hant/Buttons.multids index cc5ebba6b..75514b6da 100644 --- a/languages/zh-Hant/Buttons.multids +++ b/languages/zh-Hant/Buttons.multids @@ -28,6 +28,7 @@ Encryption/ClearPassword/Caption: 清除密碼 Encryption/ClearPassword/Hint: 清除密碼且不加密儲存此維基 Encryption/SetPassword/Caption: 設定密碼 Encryption/SetPassword/Hint: 設定加密儲存此維基的密碼 +EmergencyDownload/Caption: 下載條目為 json ExportPage/Caption: 導出所有條目 ExportPage/Hint: 導出所有條目 ExportTiddler/Caption: 導出此條目 diff --git a/languages/zh-Hant/Docs/ModuleTypes.multids b/languages/zh-Hant/Docs/ModuleTypes.multids index baba51100..620615248 100644 --- a/languages/zh-Hant/Docs/ModuleTypes.multids +++ b/languages/zh-Hant/Docs/ModuleTypes.multids @@ -9,7 +9,7 @@ config: 加入 `$tw.config` 的資料。 filteroperator: 個別篩選器運算元方法。 global: 加入 `$tw` 的全域資料。 info: 透過 [[$:/temp/info-plugin]] 偽插件,發佈系統資訊。 -isfilteroperator: ''is'' 篩選器運算元的運算子。 +isfilteroperator: ''is'' 篩選器運算子的參數。 library: 一般用途的 JavaScript 模組的通用的模組類型。 macro: JavaScript ''巨集''定義。 parser: 不同內容類型的解析器。 diff --git a/languages/zh-Hant/Fields.multids b/languages/zh-Hant/Fields.multids index ab2962b36..a41e8b65e 100644 --- a/languages/zh-Hant/Fields.multids +++ b/languages/zh-Hant/Fields.multids @@ -4,6 +4,7 @@ _canonical_uri: 外部圖片條目的完整的 URI author: 一個插件作者的姓名 bag: 條目的來源集的名稱 caption: 顯示於頁籤或按鈕上的標題文字 +class: 渲染條目時,套用到條目的 CSS 類別 - 請參閱[[依自訂類別的自訂樣式|Custom styles by user-class]]。也適用於[[互動視窗|Modals]] code-body: 若設定為 ''yes'',檢視範本將以程式碼形式顯示條目 color: 條目的 CSS 顏色值 component: 負責[[警示條目|AlertMechanism]]的元件名稱 diff --git a/languages/zh-Hant/Misc.multids b/languages/zh-Hant/Misc.multids index e38900415..5ddb9f1a3 100644 --- a/languages/zh-Hant/Misc.multids +++ b/languages/zh-Hant/Misc.multids @@ -31,7 +31,7 @@ Error/Filter: 篩選器錯誤 Error/FilterRunPrefix: 篩選器錯誤:篩選器 run 的未知首碼 Error/FilterSyntax: 篩選器運算式中的語法錯誤 Error/FormatFilterOperator: 篩選器錯誤:`format` 篩選器運算子的未知尾碼 -Error/IsFilterOperator: 篩選器錯誤︰'is' 篩選器運算子的未知運算元 +Error/IsFilterOperator: 篩選器錯誤︰'is' 篩選器運算子的未知參數 Error/LoadingPluginLibrary: 載入插件程式庫時,發生錯誤 Error/NetworkErrorAlert: `<h2>''網路錯誤''</h2>與伺服器的連線似乎已中斷。這可能表示您的網路連線有問題。請嘗試恢復網路連線才能繼續。<br><br>''恢復連線時,所有未儲存的變更,將自動同步''。` Error/PutEditConflict: 伺服器上的檔案已更改 diff --git a/license b/license index d15740df2..f7513a693 100644 --- a/license +++ b/license @@ -1,7 +1,7 @@ TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com) Copyright (c) 2004-2007, Jeremy Ruston -Copyright (c) 2007-2023, UnaMesa Association +Copyright (c) 2007-2024, UnaMesa Association All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index 2a2066e8f..e73a46e35 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -553,3 +553,19 @@ BuckarooBanzay, @BuckarooBanzay, 2023/09/01 Timur, @T1mL3arn, 2023/10/04 Wang Ke, @Gk0Wk, 2023/10/17 + +@frittro, 2023/10/27 + +@etardiff, 2023/12/10 + +John Long, @drevarr, 2023/12/12 + +Ed Holsinger, @eschlon, 2024/02/08 + +Kim I. McKinley, @PotOfCoffee2Go, 2024/03/16 + +@Jinix6, 2024/03/31 + +Anders Jarmund, @andjar, 2024/04/05 + +@sarna, 2024/04/28 diff --git a/package.json b/package.json index a4377956b..cb4eb8fc9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tiddlywiki", "preferGlobal": "true", - "version": "5.3.2-prerelease", + "version": "5.3.4-prerelease", "author": "Jeremy Ruston <jeremy@jermolene.com>", "description": "a non-linear personal web notebook", "contributors": [ diff --git a/plugins/tiddlywiki/classictools/modules/recipe.js b/plugins/tiddlywiki/classictools/modules/recipe.js index 5b3a0b019..aa5362887 100644 --- a/plugins/tiddlywiki/classictools/modules/recipe.js +++ b/plugins/tiddlywiki/classictools/modules/recipe.js @@ -69,6 +69,15 @@ exports["text/vnd.tiddlywiki2-recipe"] = function(text,fields) { }, sourcePath = fields.title; // Bit of a hack to take advantage of the default title being the path to the tiddler file processRecipe(sourcePath,text); + // Add a $:/RecipeTiddlers tiddler with the titles of the loaded tiddlers in order + var titles = []; + $tw.utils.each(tiddlers,function(tiddler) { + titles.push(tiddler.title); + }); + tiddlers.push({ + title: "$:/RecipeTiddlers", + list: $tw.utils.stringifyList(titles) + }); return tiddlers; }; diff --git a/plugins/tiddlywiki/classictools/templates/tiddlywiki2.externaljs.template.html.tid b/plugins/tiddlywiki/classictools/templates/tiddlywiki2.externaljs.template.html.tid index 980000027..12795f44a 100644 --- a/plugins/tiddlywiki/classictools/templates/tiddlywiki2.externaljs.template.html.tid +++ b/plugins/tiddlywiki/classictools/templates/tiddlywiki2.externaljs.template.html.tid @@ -1,7 +1,7 @@ title: $:/core/templates/tiddlywiki2.externaljs.template.html -{{{ [prefix[{prejs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} -{{{ [prefix[{js}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} -{{{ [prefix[{postjs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} -{{{ [prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} +{{{ [list[$:/RecipeTiddlers]prefix[{prejs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} +{{{ [list[$:/RecipeTiddlers]prefix[{js}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} +{{{ [list[$:/RecipeTiddlers]prefix[{postjs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} +{{{ [list[$:/RecipeTiddlers]prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} diff --git a/plugins/tiddlywiki/classictools/templates/tiddlywiki2.template.html.tid b/plugins/tiddlywiki/classictools/templates/tiddlywiki2.template.html.tid index d2dcc1f0b..fb65d1615 100644 --- a/plugins/tiddlywiki/classictools/templates/tiddlywiki2.template.html.tid +++ b/plugins/tiddlywiki/classictools/templates/tiddlywiki2.template.html.tid @@ -6,35 +6,35 @@ title: $:/core/templates/tiddlywiki2.template.html <head> <script id="versionArea" type="text/javascript"> //<![CDATA[ -{{{ [prefix[{version}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{version}]] ||$:/core/templates/plain-text-tiddler}}} //]]> </script> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="copyright" content=" -{{{ [prefix[{copyright}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{copyright}]] ||$:/core/templates/plain-text-tiddler}}} " /> <!--PRE-HEAD-START--> -{{{ [prefix[{prehead}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{prehead}]] ||$:/core/templates/plain-text-tiddler}}} <!--PRE-HEAD-END--> <title> -{{{ [prefix[{title}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{title}]] ||$:/core/templates/plain-text-tiddler}}} -{{{ [prefix[{posthead}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{posthead}]] ||$:/core/templates/plain-text-tiddler}}} -{{{ [prefix[{prebody}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{prebody}]] ||$:/core/templates/plain-text-tiddler}}}
@@ -46,39 +46,39 @@ Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jerem
-{{{ [prefix[{shadow}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}} +{{{ [list[$:/RecipeTiddlers]prefix[{shadow}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}}
-{{{ [prefix[{tiddler}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}} -{{{ [prefix[{plugin}]] ||$:/core/templates/plain-text-tiddler}}} -{{{ [prefix[{posttiddlers}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{tiddler}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}} +{{{ [list[$:/RecipeTiddlers]prefix[{plugin}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{posttiddlers}]] ||$:/core/templates/plain-text-tiddler}}}
-{{{ [prefix[{postbody}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{postbody}]] ||$:/core/templates/plain-text-tiddler}}} -{{{ [prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} +{{{ [list[$:/RecipeTiddlers]prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} -{{{ [prefix[{postscript}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{postscript}]] ||$:/core/templates/plain-text-tiddler}}} diff --git a/plugins/tiddlywiki/confetti/confetti-manager.js b/plugins/tiddlywiki/confetti/confetti-manager.js new file mode 100644 index 000000000..98384bf32 --- /dev/null +++ b/plugins/tiddlywiki/confetti/confetti-manager.js @@ -0,0 +1,56 @@ +/*\ +title: $:/plugins/tiddlywiki/confetti/confetti-manager.js +type: application/javascript +module-type: global + +Confetti manager + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +var confetti = require("$:/plugins/tiddlywiki/confetti/confetti.js"); + +function ConfettiManager() { + this.outstandingTimers = []; +} + +ConfettiManager.prototype.launch = function (delay,options) { + var self = this, + defaultOptions = { + scalar: 1.2, + particleCount: 400, + zIndex: 2000 + }; + options = $tw.utils.extend(defaultOptions,options); + if(delay > 0) { + var id = setTimeout(function() { + var p = self.outstandingTimers.indexOf(id); + if(p !== -1) { + self.outstandingTimers.splice(p,1); + } else { + console.log("Confetti Manager Error: Cannot find previously stored timer ID"); + debugger; + } + confetti(options); + },delay); + this.outstandingTimers.push(id); + } else { + confetti(options); + } +}; + +ConfettiManager.prototype.reset = function () { + $tw.utils.each(this.outstandingTimers,function(id) { + clearTimeout(id); + }); + this.outstandingTimers = []; + confetti.reset(); +}; + +exports.ConfettiManager = ConfettiManager; + +})(); diff --git a/plugins/tiddlywiki/confetti/confetti-widget.js b/plugins/tiddlywiki/confetti/confetti-widget.js new file mode 100644 index 000000000..6c78f7066 --- /dev/null +++ b/plugins/tiddlywiki/confetti/confetti-widget.js @@ -0,0 +1,67 @@ +/*\ +title: $:/plugins/tiddlywiki/confetti/confetti-widget.js +type: application/javascript +module-type: widget + +Confetti widget + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +var Widget = require("$:/core/modules/widgets/widget.js").widget; + +var confetti = require("$:/plugins/tiddlywiki/confetti/confetti.js"); + +var ConfettiWidget = function(parseTreeNode,options) { + this.initialise(parseTreeNode,options); +}; + +/* +Inherit from the base widget class +*/ +ConfettiWidget.prototype = new Widget(); + +/* +Render this widget into the DOM +*/ +ConfettiWidget.prototype.render = function(parent,nextSibling) { + var self = this; + // Remember parent + this.parentDomNode = parent; + // Compute attributes and execute state + this.computeAttributes(); + this.execute(); + // Launch confetti + if($tw.browser) { + var options = {}; + $tw.utils.each(this.attributes,function(attribute,name) { + options[name] = self.getAttribute(name); + }); + $tw.confettiManager.launch(options.delay,options); + } + // Render children + this.renderChildren(parent,nextSibling); +}; + +/* +Compute the internal state of the widget +*/ +ConfettiWidget.prototype.execute = function() { + // Make child widgets + this.makeChildWidgets(); +}; + +/* +Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering +*/ +ConfettiWidget.prototype.refresh = function(changedTiddlers) { + return this.refreshChildren(changedTiddlers); +}; + +exports.confetti = ConfettiWidget; + +})(); diff --git a/plugins/tiddlywiki/confetti/examples/staggered.tid b/plugins/tiddlywiki/confetti/examples/staggered.tid new file mode 100644 index 000000000..8b45ceef4 --- /dev/null +++ b/plugins/tiddlywiki/confetti/examples/staggered.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/confetti/examples/staggered +tags: $:/tags/ConfettiExample + +<$button> +<$action-sendmessage $message="tm-confetti-launch"/> +<$action-sendmessage $message="tm-confetti-launch" originY=0.6 spread=70 delay=300/> +<$action-sendmessage $message="tm-confetti-launch" originY=0.55 spread=30 delay=600/> +Launch three staggered rounds of confetti + diff --git a/plugins/tiddlywiki/confetti/examples/typing-trigger.tid b/plugins/tiddlywiki/confetti/examples/typing-trigger.tid new file mode 100644 index 000000000..d4362bb63 --- /dev/null +++ b/plugins/tiddlywiki/confetti/examples/typing-trigger.tid @@ -0,0 +1,10 @@ +title: $:/plugins/tiddlywiki/confetti/examples/typing-trigger +tags: $:/tags/ConfettiExample + +Type the word "launch": <$edit-text tiddler="$:/temp/confetti/launchstatus" tag="input" placeholder="Type here"/> + +<$list filter="[{$:/temp/confetti/launchstatus}match:caseinsensitive[launch]]" variable="ignore"> +Launched! +<$confetti particleCount=100/> +<$confetti particleCount=100 delay=300/> + diff --git a/plugins/tiddlywiki/confetti/files/LICENSE b/plugins/tiddlywiki/confetti/files/LICENSE new file mode 100644 index 000000000..d703e2ecc --- /dev/null +++ b/plugins/tiddlywiki/confetti/files/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2020, Kiril Vatev + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/plugins/tiddlywiki/confetti/files/confetti.js b/plugins/tiddlywiki/confetti/files/confetti.js new file mode 100644 index 000000000..b2a5e6e67 --- /dev/null +++ b/plugins/tiddlywiki/confetti/files/confetti.js @@ -0,0 +1,626 @@ +(function main(global, module, isWorker, workerSize) { + var canUseWorker = !!( + global.Worker && + global.Blob && + global.Promise && + global.OffscreenCanvas && + global.OffscreenCanvasRenderingContext2D && + global.HTMLCanvasElement && + global.HTMLCanvasElement.prototype.transferControlToOffscreen && + global.URL && + global.URL.createObjectURL); + + function noop() {} + + // create a promise if it exists, otherwise, just + // call the function directly + function promise(func) { + var ModulePromise = module.exports.Promise; + var Prom = ModulePromise !== void 0 ? ModulePromise : global.Promise; + + if (typeof Prom === 'function') { + return new Prom(func); + } + + func(noop, noop); + + return null; + } + + var raf = (function () { + var TIME = Math.floor(1000 / 60); + var frame, cancel; + var frames = {}; + var lastFrameTime = 0; + + if (typeof requestAnimationFrame === 'function' && typeof cancelAnimationFrame === 'function') { + frame = function (cb) { + var id = Math.random(); + + frames[id] = requestAnimationFrame(function onFrame(time) { + if (lastFrameTime === time || lastFrameTime + TIME - 1 < time) { + lastFrameTime = time; + delete frames[id]; + + cb(); + } else { + frames[id] = requestAnimationFrame(onFrame); + } + }); + + return id; + }; + cancel = function (id) { + if (frames[id]) { + cancelAnimationFrame(frames[id]); + } + }; + } else { + frame = function (cb) { + return setTimeout(cb, TIME); + }; + cancel = function (timer) { + return clearTimeout(timer); + }; + } + + return { frame: frame, cancel: cancel }; + }()); + + var getWorker = (function () { + var worker; + var prom; + var resolves = {}; + + function decorate(worker) { + function execute(options, callback) { + worker.postMessage({ options: options || {}, callback: callback }); + } + worker.init = function initWorker(canvas) { + var offscreen = canvas.transferControlToOffscreen(); + worker.postMessage({ canvas: offscreen }, [offscreen]); + }; + + worker.fire = function fireWorker(options, size, done) { + if (prom) { + execute(options, null); + return prom; + } + + var id = Math.random().toString(36).slice(2); + + prom = promise(function (resolve) { + function workerDone(msg) { + if (msg.data.callback !== id) { + return; + } + + delete resolves[id]; + worker.removeEventListener('message', workerDone); + + prom = null; + done(); + resolve(); + } + + worker.addEventListener('message', workerDone); + execute(options, id); + + resolves[id] = workerDone.bind(null, { data: { callback: id }}); + }); + + return prom; + }; + + worker.reset = function resetWorker() { + worker.postMessage({ reset: true }); + + for (var id in resolves) { + resolves[id](); + delete resolves[id]; + } + }; + } + + return function () { + if (worker) { + return worker; + } + + if (!isWorker && canUseWorker) { + var code = [ + 'var CONFETTI, SIZE = {}, module = {};', + '(' + main.toString() + ')(this, module, true, SIZE);', + 'onmessage = function(msg) {', + ' if (msg.data.options) {', + ' CONFETTI(msg.data.options).then(function () {', + ' if (msg.data.callback) {', + ' postMessage({ callback: msg.data.callback });', + ' }', + ' });', + ' } else if (msg.data.reset) {', + ' CONFETTI && CONFETTI.reset();', + ' } else if (msg.data.resize) {', + ' SIZE.width = msg.data.resize.width;', + ' SIZE.height = msg.data.resize.height;', + ' } else if (msg.data.canvas) {', + ' SIZE.width = msg.data.canvas.width;', + ' SIZE.height = msg.data.canvas.height;', + ' CONFETTI = module.exports.create(msg.data.canvas);', + ' }', + '}', + ].join('\n'); + try { + worker = new Worker(URL.createObjectURL(new Blob([code]))); + } catch (e) { + // eslint-disable-next-line no-console + typeof console !== undefined && typeof console.warn === 'function' ? console.warn('🎊 Could not load worker', e) : null; + + return null; + } + + decorate(worker); + } + + return worker; + }; + })(); + + var defaults = { + particleCount: 50, + angle: 90, + spread: 45, + startVelocity: 45, + decay: 0.9, + gravity: 1, + drift: 0, + ticks: 200, + x: 0.5, + y: 0.5, + shapes: ['square', 'circle'], + zIndex: 100, + colors: [ + '#26ccff', + '#a25afd', + '#ff5e7e', + '#88ff5a', + '#fcff42', + '#ffa62d', + '#ff36ff' + ], + // probably should be true, but back-compat + disableForReducedMotion: false, + scalar: 1 + }; + + function convert(val, transform) { + return transform ? transform(val) : val; + } + + function isOk(val) { + return !(val === null || val === undefined); + } + + function prop(options, name, transform) { + return convert( + options && isOk(options[name]) ? options[name] : defaults[name], + transform + ); + } + + function onlyPositiveInt(number){ + return number < 0 ? 0 : Math.floor(number); + } + + function randomInt(min, max) { + // [min, max) + return Math.floor(Math.random() * (max - min)) + min; + } + + function toDecimal(str) { + return parseInt(str, 16); + } + + function colorsToRgb(colors) { + return colors.map(hexToRgb); + } + + function hexToRgb(str) { + var val = String(str).replace(/[^0-9a-f]/gi, ''); + + if (val.length < 6) { + val = val[0]+val[0]+val[1]+val[1]+val[2]+val[2]; + } + + return { + r: toDecimal(val.substring(0,2)), + g: toDecimal(val.substring(2,4)), + b: toDecimal(val.substring(4,6)) + }; + } + + function getOrigin(options) { + var origin = prop(options, 'origin', Object); + origin.x = prop(origin, 'x', Number); + origin.y = prop(origin, 'y', Number); + + return origin; + } + + function setCanvasWindowSize(canvas) { + canvas.width = document.documentElement.clientWidth; + canvas.height = document.documentElement.clientHeight; + } + + function setCanvasRectSize(canvas) { + var rect = canvas.getBoundingClientRect(); + canvas.width = rect.width; + canvas.height = rect.height; + } + + function getCanvas(zIndex) { + var canvas = document.createElement('canvas'); + + canvas.style.position = 'fixed'; + canvas.style.top = '0px'; + canvas.style.left = '0px'; + canvas.style.pointerEvents = 'none'; + canvas.style.zIndex = zIndex; + + return canvas; + } + + function ellipse(context, x, y, radiusX, radiusY, rotation, startAngle, endAngle, antiClockwise) { + context.save(); + context.translate(x, y); + context.rotate(rotation); + context.scale(radiusX, radiusY); + context.arc(0, 0, 1, startAngle, endAngle, antiClockwise); + context.restore(); + } + + function randomPhysics(opts) { + var radAngle = opts.angle * (Math.PI / 180); + var radSpread = opts.spread * (Math.PI / 180); + + return { + x: opts.x, + y: opts.y, + wobble: Math.random() * 10, + wobbleSpeed: Math.min(0.11, Math.random() * 0.1 + 0.05), + velocity: (opts.startVelocity * 0.5) + (Math.random() * opts.startVelocity), + angle2D: -radAngle + ((0.5 * radSpread) - (Math.random() * radSpread)), + tiltAngle: (Math.random() * (0.75 - 0.25) + 0.25) * Math.PI, + color: opts.color, + shape: opts.shape, + tick: 0, + totalTicks: opts.ticks, + decay: opts.decay, + drift: opts.drift, + random: Math.random() + 2, + tiltSin: 0, + tiltCos: 0, + wobbleX: 0, + wobbleY: 0, + gravity: opts.gravity * 3, + ovalScalar: 0.6, + scalar: opts.scalar + }; + } + + function updateFetti(context, fetti) { + fetti.x += Math.cos(fetti.angle2D) * fetti.velocity + fetti.drift; + fetti.y += Math.sin(fetti.angle2D) * fetti.velocity + fetti.gravity; + fetti.wobble += fetti.wobbleSpeed; + fetti.velocity *= fetti.decay; + fetti.tiltAngle += 0.1; + fetti.tiltSin = Math.sin(fetti.tiltAngle); + fetti.tiltCos = Math.cos(fetti.tiltAngle); + fetti.random = Math.random() + 2; + fetti.wobbleX = fetti.x + ((10 * fetti.scalar) * Math.cos(fetti.wobble)); + fetti.wobbleY = fetti.y + ((10 * fetti.scalar) * Math.sin(fetti.wobble)); + + var progress = (fetti.tick++) / fetti.totalTicks; + + var x1 = fetti.x + (fetti.random * fetti.tiltCos); + var y1 = fetti.y + (fetti.random * fetti.tiltSin); + var x2 = fetti.wobbleX + (fetti.random * fetti.tiltCos); + var y2 = fetti.wobbleY + (fetti.random * fetti.tiltSin); + + context.fillStyle = 'rgba(' + fetti.color.r + ', ' + fetti.color.g + ', ' + fetti.color.b + ', ' + (1 - progress) + ')'; + context.beginPath(); + + if (fetti.shape === 'circle') { + context.ellipse ? + context.ellipse(fetti.x, fetti.y, Math.abs(x2 - x1) * fetti.ovalScalar, Math.abs(y2 - y1) * fetti.ovalScalar, Math.PI / 10 * fetti.wobble, 0, 2 * Math.PI) : + ellipse(context, fetti.x, fetti.y, Math.abs(x2 - x1) * fetti.ovalScalar, Math.abs(y2 - y1) * fetti.ovalScalar, Math.PI / 10 * fetti.wobble, 0, 2 * Math.PI); + } else if (fetti.shape === 'star') { + var rot = Math.PI / 2 * 3; + var innerRadius = 4 * fetti.scalar; + var outerRadius = 8 * fetti.scalar; + var x = fetti.x; + var y = fetti.y; + var spikes = 5; + var step = Math.PI / spikes; + + while (spikes--) { + x = fetti.x + Math.cos(rot) * outerRadius; + y = fetti.y + Math.sin(rot) * outerRadius; + context.lineTo(x, y); + rot += step; + + x = fetti.x + Math.cos(rot) * innerRadius; + y = fetti.y + Math.sin(rot) * innerRadius; + context.lineTo(x, y); + rot += step; + } + } else { + context.moveTo(Math.floor(fetti.x), Math.floor(fetti.y)); + context.lineTo(Math.floor(fetti.wobbleX), Math.floor(y1)); + context.lineTo(Math.floor(x2), Math.floor(y2)); + context.lineTo(Math.floor(x1), Math.floor(fetti.wobbleY)); + } + + context.closePath(); + context.fill(); + + return fetti.tick < fetti.totalTicks; + } + + function animate(canvas, fettis, resizer, size, done) { + var animatingFettis = fettis.slice(); + var context = canvas.getContext('2d'); + var animationFrame; + var destroy; + + var prom = promise(function (resolve) { + function onDone() { + animationFrame = destroy = null; + + context.clearRect(0, 0, size.width, size.height); + + done(); + resolve(); + } + + function update() { + if (isWorker && !(size.width === workerSize.width && size.height === workerSize.height)) { + size.width = canvas.width = workerSize.width; + size.height = canvas.height = workerSize.height; + } + + if (!size.width && !size.height) { + resizer(canvas); + size.width = canvas.width; + size.height = canvas.height; + } + + context.clearRect(0, 0, size.width, size.height); + + animatingFettis = animatingFettis.filter(function (fetti) { + return updateFetti(context, fetti); + }); + + if (animatingFettis.length) { + animationFrame = raf.frame(update); + } else { + onDone(); + } + } + + animationFrame = raf.frame(update); + destroy = onDone; + }); + + return { + addFettis: function (fettis) { + animatingFettis = animatingFettis.concat(fettis); + + return prom; + }, + canvas: canvas, + promise: prom, + reset: function () { + if (animationFrame) { + raf.cancel(animationFrame); + } + + if (destroy) { + destroy(); + } + } + }; + } + + function confettiCannon(canvas, globalOpts) { + var isLibCanvas = !canvas; + var allowResize = !!prop(globalOpts || {}, 'resize'); + var globalDisableForReducedMotion = prop(globalOpts, 'disableForReducedMotion', Boolean); + var shouldUseWorker = canUseWorker && !!prop(globalOpts || {}, 'useWorker'); + var worker = shouldUseWorker ? getWorker() : null; + var resizer = isLibCanvas ? setCanvasWindowSize : setCanvasRectSize; + var initialized = (canvas && worker) ? !!canvas.__confetti_initialized : false; + var preferLessMotion = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion)').matches; + var animationObj; + + function fireLocal(options, size, done) { + var particleCount = prop(options, 'particleCount', onlyPositiveInt); + var angle = prop(options, 'angle', Number); + var spread = prop(options, 'spread', Number); + var startVelocity = prop(options, 'startVelocity', Number); + var decay = prop(options, 'decay', Number); + var gravity = prop(options, 'gravity', Number); + var drift = prop(options, 'drift', Number); + var colors = prop(options, 'colors', colorsToRgb); + var ticks = prop(options, 'ticks', Number); + var shapes = prop(options, 'shapes'); + var scalar = prop(options, 'scalar'); + var origin = getOrigin(options); + + var temp = particleCount; + var fettis = []; + + var startX = canvas.width * origin.x; + var startY = canvas.height * origin.y; + + while (temp--) { + fettis.push( + randomPhysics({ + x: startX, + y: startY, + angle: angle, + spread: spread, + startVelocity: startVelocity, + color: colors[temp % colors.length], + shape: shapes[randomInt(0, shapes.length)], + ticks: ticks, + decay: decay, + gravity: gravity, + drift: drift, + scalar: scalar + }) + ); + } + + // if we have a previous canvas already animating, + // add to it + if (animationObj) { + return animationObj.addFettis(fettis); + } + + animationObj = animate(canvas, fettis, resizer, size , done); + + return animationObj.promise; + } + + function fire(options) { + var disableForReducedMotion = globalDisableForReducedMotion || prop(options, 'disableForReducedMotion', Boolean); + var zIndex = prop(options, 'zIndex', Number); + + if (disableForReducedMotion && preferLessMotion) { + return promise(function (resolve) { + resolve(); + }); + } + + if (isLibCanvas && animationObj) { + // use existing canvas from in-progress animation + canvas = animationObj.canvas; + } else if (isLibCanvas && !canvas) { + // create and initialize a new canvas + canvas = getCanvas(zIndex); + document.body.appendChild(canvas); + } + + if (allowResize && !initialized) { + // initialize the size of a user-supplied canvas + resizer(canvas); + } + + var size = { + width: canvas.width, + height: canvas.height + }; + + if (worker && !initialized) { + worker.init(canvas); + } + + initialized = true; + + if (worker) { + canvas.__confetti_initialized = true; + } + + function onResize() { + if (worker) { + // TODO this really shouldn't be immediate, because it is expensive + var obj = { + getBoundingClientRect: function () { + if (!isLibCanvas) { + return canvas.getBoundingClientRect(); + } + } + }; + + resizer(obj); + + worker.postMessage({ + resize: { + width: obj.width, + height: obj.height + } + }); + return; + } + + // don't actually query the size here, since this + // can execute frequently and rapidly + size.width = size.height = null; + } + + function done() { + animationObj = null; + + if (allowResize) { + global.removeEventListener('resize', onResize); + } + + if (isLibCanvas && canvas) { + document.body.removeChild(canvas); + canvas = null; + initialized = false; + } + } + + if (allowResize) { + global.addEventListener('resize', onResize, false); + } + + if (worker) { + return worker.fire(options, size, done); + } + + return fireLocal(options, size, done); + } + + fire.reset = function () { + if (worker) { + worker.reset(); + } + + if (animationObj) { + animationObj.reset(); + } + }; + + return fire; + } + + // Make default export lazy to defer worker creation until called. + var defaultFire; + function getDefaultFire() { + if (!defaultFire) { + defaultFire = confettiCannon(null, { useWorker: true, resize: true }); + } + return defaultFire; + } + + module.exports = function() { + return getDefaultFire().apply(this, arguments); + }; + module.exports.reset = function() { + getDefaultFire().reset(); + }; + module.exports.create = confettiCannon; +}((function () { + if (typeof window !== 'undefined') { + return window; + } + + if (typeof self !== 'undefined') { + return self; + } + + return this || {}; +})(), module, false)); diff --git a/plugins/tiddlywiki/confetti/files/tiddlywiki.files b/plugins/tiddlywiki/confetti/files/tiddlywiki.files new file mode 100644 index 000000000..c59b41874 --- /dev/null +++ b/plugins/tiddlywiki/confetti/files/tiddlywiki.files @@ -0,0 +1,20 @@ +{ + "tiddlers": [ + { + "file": "confetti.js", + "fields": { + "type": "application/javascript", + "title": "$:/plugins/tiddlywiki/confetti/confetti.js", + "module-type": "library" + }, + "prefix": "", + "suffix": "" + },{ + "file": "LICENSE", + "fields": { + "type": "text/plain", + "title": "$:/plugins/tiddlywiki/confetti/license" + } + } + ] +} diff --git a/plugins/tiddlywiki/confetti/plugin.info b/plugins/tiddlywiki/confetti/plugin.info new file mode 100644 index 000000000..f4c2f420c --- /dev/null +++ b/plugins/tiddlywiki/confetti/plugin.info @@ -0,0 +1,6 @@ +{ + "title": "$:/plugins/tiddlywiki/confetti", + "name": "Confetti", + "description": "Animated confetti effect", + "list": "readme" +} diff --git a/plugins/tiddlywiki/confetti/readme.tid b/plugins/tiddlywiki/confetti/readme.tid new file mode 100644 index 000000000..d9606ea6a --- /dev/null +++ b/plugins/tiddlywiki/confetti/readme.tid @@ -0,0 +1,65 @@ +title: $:/plugins/tiddlywiki/confetti/readme + +\define show-example(name) +<$let title={{{ [[$:/plugins/tiddlywiki/confetti/examples/]addsuffix<__name__>] }}}> + +For example: + +<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/> + +<$codeblock code={{{ [get[text]] }}}/> + +Renders as: + +<$transclude tiddler=<<title>> mode="block"/> + +</$let> +\end + +! Introduction + +This plugin adds a programmable confetti cannon to your TiddlyWiki. It is based on https://www.kirilv.com/canvas-confetti/ by Kiril Vatev. + +! Usage + +The confetti cannon can be controlled using messages or via the `<$confetti>` widget. Use the message approach when triggering confetti in response to an action (such as clicking a button). Use the widget approach when confetti is to be triggered by a condition (such as a target number of words being reached). + +!! Messages: tm-confetti-launch and tm-confetti-reset + +The `tm-confetti-launch` message launches the confetti cannon. See below for the available parameters. + +The `tm-confetti-reset` message cancels any confetti that is in progress. + +<<show-example staggered>> + +!! Widget: `<$confetti>` + +The `<$confetti>` widget launches the confetti cannon when it is first rendered. See below for the available attributes. + +Typically it is used in conjunction with a `<$list>` or `<$reveal>` widget that shows the widget when the conditions required to trigger the confetti are satisfied. + +In this example, the confetti will be launched when the word "launch" in typed into the box. + +<<show-example typing-trigger>> + +!! Confetti Launch parameters + +The following options are supported: + +|!Name |!Description |!Default | +|''delay'' |Number of milliseconds to delay the launch |0 | +|''particleCount'' |The number of confetti to launch |50 | +|''angle'' |The angle in which to launch the confetti, in degrees (90 is straight up) |90 | +|''spread'' |How far off center the confetti can go, in degrees. 45 means the confetti will launch at the defined `angle` plus or minus 22.5 degrees |45 | +|''startVelocity'' |How fast the confetti will start going, in pixels |45 | +|''decay'' |How quickly the confetti will lose speed. Keep this number between 0 and 1, otherwise the confetti will gain speed |0.9 | +|''gravity'' |How quickly the particles are pulled down. 1 is full gravity, 0.5 is half gravity, etc. |1 | +|''drift'' |How much to the side the confetti will drift. The default is 0, meaning that they will fall straight down. Use a negative number for left and positive number for right |0 | +|''ticks'' |How many times the confetti will move (this is an abstract quantity; the designed recommends playing with it if the confetti disappears too quickly for you) |200 | +|''originX'' |The `x` position on the page, with `0` being the left edge and `1` being the right edge |0.5 | +|''originY'' |The `y` position on the page, with `0` being the top edge and `1` being the bottom edge |0.5 | +|''colors'' |A space separated list of color strings in hex format (eg `#bada55` or `#ce5`) | | +|''shapes'' |A space separated list of shapes for the confetti. The possible values are `square`, `circle`, and `star`. The default is to use both squares and circles in an even mix. To use a single shape, you can provide just one shape in the list, such as `star`. You can also change the mix by providing a value such as `circle circle square` to use two third circles and one third squares | | +|''scalar'' |Scale factor for each confetti particle. Use decimals to make the confetti smaller |1 | +|''zIndex'' |Z-index of confetti. Increase the value if the confetti is appearing behind other on-screen elements|100 | +|''disableForReducedMotion'' |Set to `yes` to entirely disable confetti for users that [[prefer reduced motion|https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion]] |`no` | diff --git a/plugins/tiddlywiki/confetti/startup.js b/plugins/tiddlywiki/confetti/startup.js new file mode 100644 index 000000000..6634cbbca --- /dev/null +++ b/plugins/tiddlywiki/confetti/startup.js @@ -0,0 +1,63 @@ +/*\ +title: $:/plugins/tiddlywiki/confetti/startup.js +type: application/javascript +module-type: startup + +Setup the root widget event handlers + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +// Export name and synchronous status +exports.name = "confetti"; +exports.platforms = ["browser"]; +exports.after = ["startup"]; +exports.synchronous = true; + +// Install the root widget event handlers +exports.startup = function() { + $tw.confettiManager = new $tw.ConfettiManager(); + $tw.rootWidget.addEventListener("tm-confetti-launch",function(event) { + var paramObject = event.paramObject || {}, + options = {}, + extractNumericParameter = function(name) { + if(paramObject[name]) { + options[name] = $tw.utils.parseNumber(paramObject[name]); + } + }, + extractListParameter = function(name) { + if(paramObject[name]) { + options[name] = $tw.utils.parseStringArray(paramObject[name]); + } + }, + extractBooleanParameter = function(name) { + if(paramObject[name]) { + options[name] = paramObject[name] === "yes"; + } + }; + $tw.utils.each("particleCount angle spread startVelocity decay gravity drift ticks scalar zIndex".split(" "),function(name) { + extractNumericParameter(name); + }); + $tw.utils.each("colors shapes".split(" "),function(name) { + extractListParameter(name); + }); + if(paramObject.originX && paramObject.originY) { + options.origin = { + x: paramObject.originX && $tw.utils.parseNumber(paramObject.originX), + y: paramObject.originY && $tw.utils.parseNumber(paramObject.originY) + }; + } + extractBooleanParameter("disableForReducedMotion"); + var delay = paramObject.delay ? $tw.utils.parseNumber(paramObject.delay) : 0; + $tw.confettiManager.launch(delay,options); + }); + $tw.rootWidget.addEventListener("tm-confetti-reset",function(event) { + $tw.confettiManager.reset(); + }); +}; + +})(); diff --git a/plugins/tiddlywiki/dynannotate/docs/readme.tid b/plugins/tiddlywiki/dynannotate/docs/readme.tid index 5160d137f..6076def30 100644 --- a/plugins/tiddlywiki/dynannotate/docs/readme.tid +++ b/plugins/tiddlywiki/dynannotate/docs/readme.tid @@ -5,6 +5,7 @@ The ''Dynannotate'' plugin allows annotations on textual content to be created a * The dynannotate widget draws clickable textual annotations, search highlights and search snippets as overlays over the top of the content that it contains * The selection tracker keeps track of changes to the selected text in the main browser window. It triggers an action string when the selection changes, passing it the details of the selection. It can be used to display a popup menu ** The original legacy selection tracker is also provided for backwards compatibility. It is much more limited, and not recommended for new projects +* The element spotlight highlights on screen elements using a spotlight animation !! Dynannotate Widget @@ -172,3 +173,12 @@ Notes: * The selection popup will disappear if the selection is cancelled; this will happen if the user clicks on any other element apart than a button. Thus it is not possible to have any interactive controls within the popup apart from buttons +!! Element Spotlight + +The `tm-spotlight-element` message causes a spotlight effect to briefly appear to highlight a specified element. The message accepts the following parameters: + +|!Parameter |!Description | +|`selector` |CSS selector of the element to highlight | +|{//Any parameter names starting with `selector-`}// |Fallback CSS selectors to be used if the primary selector does not resolve to an element | + +The fallback CSS selectors are case-insensitively sorted by title before use, with uppercase letters sorting before lower case letters. The usual convention is to use numeric suffixes: `selector-00`, `selector-01` etc. diff --git a/plugins/tiddlywiki/dynannotate/examples/spotlight.tid b/plugins/tiddlywiki/dynannotate/examples/spotlight.tid new file mode 100644 index 000000000..6e6316b1b --- /dev/null +++ b/plugins/tiddlywiki/dynannotate/examples/spotlight.tid @@ -0,0 +1,71 @@ +title: $:/plugins/tiddlywiki/dynannotate/examples/spotlight +tags: $:/tags/dynannotateExamples +caption: Spotlight + +\define show-example(example) +<$codeblock code=<<__example__>>/> + +//''Displays as:''// + +$example$ +\end + +<div class="tc-dynannotation-example-info"> + +!! Spotlighting an Image + +</div> + +<<show-example """ +<$button> +<$action-sendmessage $message="tm-spotlight-element" selector=".tc-dynannotate-spotlight-image-example"/> +Spotlight this image +</$button> +<div class="tc-dynannotate-spotlight-image-example" style="display:inline-block;"> +{{$:/core/images/globe}} +</div> +""">> + +<div class="tc-dynannotation-example-info"> + +!! Spotlighting a Button + +</div> + +<<show-example """ +<$button class="tc-dynannotate-spotlight-button-example"> +<$action-sendmessage $message="tm-spotlight-element" selector=".tc-dynannotate-spotlight-button-example"/> +Spotlight this button +</$button> +""">> + +<div class="tc-dynannotation-example-info"> + +!! Spotlighting a Text Area + +</div> + +<<show-example """ +<$button> +<$action-sendmessage $message="tm-spotlight-element" selector=".tc-dynannotate-spotlight-textarea-example"/> +Spotlight this text area +</$button> + +<$edit-text class="tc-dynannotate-spotlight-textarea-example" tag="textarea" tiddler="$:/temp/dynannotate/spotlight/demo/text"/> + +""">> + +<div class="tc-dynannotation-example-info"> + +!! Spotlighting the Sidebar Search Input + +This button will spotlight the sidebar search, but if the sidebar is hidden then it will spotlight the button for showing the sidebar. + +</div> + +<<show-example """ +<$button> +<$action-sendmessage $message="tm-spotlight-element" selector=".tc-sidebar-search .tc-popup-handle" selector-fallback=".tc-menubar .tc-show-sidebar-btn"/> +Spotlight the sidebar search input +</$button> +""">> \ No newline at end of file diff --git a/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js b/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js new file mode 100644 index 000000000..cbf4e4679 --- /dev/null +++ b/plugins/tiddlywiki/dynannotate/modules/element-spotlight.js @@ -0,0 +1,136 @@ +/*\ +title: $:/plugins/tiddlywiki/dynannotate/element-spotlight.js +type: application/javascript +module-type: library + +Manages the element spotlight effect + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +function ElementSpotlight() { + this.animationStartTime; // Undefined if no animation is in progress + // Create DOM nodes + this.spotlightElement = $tw.utils.domMaker("div",{ + "class": "tc-dynannotate-spotlight" + }); + this.spotlightWrapper = $tw.utils.domMaker("div",{ + "class": "tc-dynannotate-spotlight-wrapper", + children: [ + this.spotlightElement + ] + }); + document.body.appendChild(this.spotlightWrapper); +} + +/* +Return the first visible element that matches a selector +*/ +ElementSpotlight.prototype.querySelectorSafe = function(selector) { + var targetNodes; + // Get the matching elements + try { + targetNodes = document.querySelectorAll(selector); + } catch(e) { + console.log("Error with selector: " + selector); + } + if(!targetNodes) { + return undefined; + } + // Remove any elements from the start of the list that are hidden, or have hidden ancestors + var didRemoveFirstEntry; + do { + didRemoveFirstEntry = false; + var hasHiddenAncestor = false, + n = targetNodes[0]; + while(n) { + if(n.hidden || (n instanceof Element && window.getComputedStyle(n).display === "none")) { + hasHiddenAncestor = true; + break; + } + n = n.parentNode; + } + if(hasHiddenAncestor) { + // Remove first entry from targetNodes array + targetNodes = [].slice.call(targetNodes, 1); + didRemoveFirstEntry = true; + } + } while(didRemoveFirstEntry) + // Return the first result + return targetNodes[0]; +}; + +ElementSpotlight.prototype.positionSpotlight = function(x,y,innerRadius,outerRadius,opacity) { + this.spotlightElement.style.display = "block"; + this.spotlightElement.style.backgroundImage = "radial-gradient(circle at " + (x / window.innerWidth * 100) + "% " + (y / window.innerHeight * 100) + "%, transparent " + innerRadius + "px, rgba(0, 0, 0, " + opacity + ") " + outerRadius + "px)"; +}; + +ElementSpotlight.prototype.easeInOut = function(v) { + return (Math.sin((v - 0.5) * Math.PI) + 1) / 2; +}; + +/* +Shine a spotlight on the first element that matches an array of selectors +*/ +ElementSpotlight.prototype.shineSpotlight = function(selectors) { + var self = this; + function animationLoop(selectors) { + // Calculate how far through the animation we are + // 0...1 = zoom in + // 1...2 = hold + // 2...3 = fade out + var now = new Date(), + t = (now - self.animationStartTime) / ($tw.utils.getAnimationDuration() * 2); + t = t >= 3 ? 3 : t; + // Query the selector for the target element + var targetNode, selectorIndex = 0; + while(!targetNode && selectorIndex < selectors.length) { + targetNode = self.querySelectorSafe(selectors[selectorIndex]); + selectorIndex += 1; + } + // Position the spotlight if we've got the target + if(targetNode) { + var rect = targetNode.getBoundingClientRect(); + var innerRadius, outerRadius, opacity; + if(t <= 1) { + t = self.easeInOut(t); + innerRadius = rect.width / 2 + (window.innerWidth * 2 * (1 - t)); + outerRadius = rect.width + (window.innerWidth * 3 * (1 - t)); + opacity = 0.2 + t / 4; + } else if(t <= 2) { + innerRadius = rect.width / 2; + outerRadius = rect.width; + opacity = 0.45; + } else { + t = self.easeInOut(3 - t); + innerRadius = rect.width / 2 + (window.innerWidth * 2 * (1 - t)); + outerRadius = rect.width + (window.innerWidth * 3 * (1 - t)); + opacity = t / 3; + } + self.positionSpotlight((rect.left + rect.right) / 2,(rect.top + rect.bottom) / 2,innerRadius,outerRadius,opacity); + } else { + self.spotlightElement.style.display = "none"; + } + // Call the next frame unless we're at the end + if(t <= 3) { + window.requestAnimationFrame(function () { + animationLoop(selectors); + }); + } else { + // End the animation if we've exceeded the time limit + self.animationStartTime = undefined; + } + } + this.animationStartTime = new Date(); + window.requestAnimationFrame(function () { + animationLoop(selectors); + }); +}; + +exports.ElementSpotlight = ElementSpotlight; + +})(); diff --git a/plugins/tiddlywiki/dynannotate/modules/startup.js b/plugins/tiddlywiki/dynannotate/modules/startup.js index a2fe6a7f6..4324c5893 100644 --- a/plugins/tiddlywiki/dynannotate/modules/startup.js +++ b/plugins/tiddlywiki/dynannotate/modules/startup.js @@ -1,3 +1,5 @@ +const { ElementSpotlight } = require("./element-spotlight"); + /*\ title: $:/plugins/tiddlywiki/dynannotate/startup.js type: application/javascript @@ -22,18 +24,39 @@ var CONFIG_SELECTION_TRACKER_TITLE = "$:/config/Dynannotate/SelectionTracker/Ena CONFIG_LEGACY_SELECTION_TRACKER_TITLE = "$:/config/Dynannotate/LegacySelectionTracker/Enable"; var SelectionTracker = require("$:/plugins/tiddlywiki/dynannotate/selection-tracker.js").SelectionTracker, - LegacySelectionTracker = require("$:/plugins/tiddlywiki/dynannotate/legacy-selection-tracker.js").LegacySelectionTracker; + LegacySelectionTracker = require("$:/plugins/tiddlywiki/dynannotate/legacy-selection-tracker.js").LegacySelectionTracker, + ElementSpotlight = require("$:/plugins/tiddlywiki/dynannotate/element-spotlight.js").ElementSpotlight; exports.startup = function() { $tw.dynannotate = {}; + // Setup selection tracker if($tw.wiki.getTiddlerText(CONFIG_SELECTION_TRACKER_TITLE,"yes") === "yes") { $tw.dynannotate.selectionTracker = new SelectionTracker($tw.wiki); } + // Setup legacy selection tracker if($tw.wiki.getTiddlerText(CONFIG_LEGACY_SELECTION_TRACKER_TITLE,"yes") === "yes") { $tw.dynannotate.legacySelectionTracker = new LegacySelectionTracker($tw.wiki,{ allowBlankSelectionPopup: true }); } + // Set up the element spotlight + $tw.dynannotate.elementSpotlight = new ElementSpotlight(); + $tw.rootWidget.addEventListener("tm-spotlight-element",function(event) { + var selectors = []; + if(event.paramObject.selector) { + selectors.push(event.paramObject.selector); + } + $tw.utils.each(Object.keys(event.paramObject).sort(),function(name) { + var SELECTOR_PROPERTY_PREFIX = "selector-"; + if($tw.utils.startsWith(name,SELECTOR_PROPERTY_PREFIX)) { + selectors.push(event.paramObject[name]); + } + }); + if(event.paramObject["selector-fallback"]) { + selectors.push(event.paramObject["selector-fallback"]); + } + $tw.dynannotate.elementSpotlight.shineSpotlight(selectors); + }); }; })(); diff --git a/plugins/tiddlywiki/dynannotate/styles.tid b/plugins/tiddlywiki/dynannotate/styles.tid index 8b13eba58..9143b8fd0 100644 --- a/plugins/tiddlywiki/dynannotate/styles.tid +++ b/plugins/tiddlywiki/dynannotate/styles.tid @@ -52,3 +52,20 @@ tags: [[$:/tags/Stylesheet]] background: #ffa; padding: 1em; } + +.tc-dynannotate-spotlight-wrapper { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 1000; + pointer-events: none; +} + +.tc-dynannotate-spotlight { + position: absolute; + height: 100%; + width: 100%; + display: none; +} diff --git a/plugins/tiddlywiki/github-fork-ribbon/readme.tid b/plugins/tiddlywiki/github-fork-ribbon/readme.tid index 95d0f7095..4707aaa6b 100644 --- a/plugins/tiddlywiki/github-fork-ribbon/readme.tid +++ b/plugins/tiddlywiki/github-fork-ribbon/readme.tid @@ -4,8 +4,6 @@ This plugin provides a diagonal ribbon across the corner of the window. It resem The ribbon can be positioned over any corner, and can incorporate user defined text, colours and a link. -The CSS stylesheet is adapted from work by Simon Whitaker: +The CSS stylesheet is adapted from work by [[Simon Whitaker|https://github.com/simonwhitaker/github-fork-ribbon-css/]] -https://github.com/simonwhitaker/github-fork-ribbon-css/ - -[[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/github-fork-ribbon]] +[[Plugin source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/github-fork-ribbon]] diff --git a/plugins/tiddlywiki/github-fork-ribbon/styles.tid b/plugins/tiddlywiki/github-fork-ribbon/styles.tid index 66bddbc7e..d22e28ac2 100644 --- a/plugins/tiddlywiki/github-fork-ribbon/styles.tid +++ b/plugins/tiddlywiki/github-fork-ribbon/styles.tid @@ -1,5 +1,4 @@ title: $:/plugins/tiddlywiki/github-fork-ribbon/styles -tags: [[$:/tags/Stylesheet]] /* Left will inherit from right (so we don't need to duplicate code */ .github-fork-ribbon { @@ -10,7 +9,7 @@ tags: [[$:/tags/Stylesheet]] padding: 2px 0; /* Set the base colour */ - background-color: #a00; + background-color: <<color>>; /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.00)), to(rgba(0, 0, 0, 0.15))); @@ -25,7 +24,7 @@ tags: [[$:/tags/Stylesheet]] -webkit-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); - z-index: 999; + z-index: 700; pointer-events: auto; } @@ -61,8 +60,8 @@ tags: [[$:/tags/Stylesheet]] height: 150px; position: absolute; overflow: hidden; - top: 0; - z-index: 999; + top: <<top>>; + z-index: 700; pointer-events: none; } @@ -71,25 +70,25 @@ tags: [[$:/tags/Stylesheet]] } .github-fork-ribbon-wrapper.left { - left: 0; + left: <<left>>; } .github-fork-ribbon-wrapper.right { - right: 0; + right: <<right>>; } .github-fork-ribbon-wrapper.left-bottom { position: fixed; top: inherit; - bottom: 0; - left: 0; + bottom: <<bottom>>; + left: <<left>>; } .github-fork-ribbon-wrapper.right-bottom { position: fixed; top: inherit; - bottom: 0; - right: 0; + bottom: <<bottom>>; + right: <<right>>; } .github-fork-ribbon-wrapper.right .github-fork-ribbon { diff --git a/plugins/tiddlywiki/github-fork-ribbon/template.tid b/plugins/tiddlywiki/github-fork-ribbon/template.tid new file mode 100644 index 000000000..22cee156d --- /dev/null +++ b/plugins/tiddlywiki/github-fork-ribbon/template.tid @@ -0,0 +1,26 @@ +title: $:/plugins/tiddlywiki/github-fork-ribbon/template + +<!-- Parameters: +position: "right", "left", "right-bottom" and "left-bottom" +url: link target +text: ribbon text +color: defaults to "#aa0000" - dark red +top: offset from the top in px - eg: "30px" +bottom: offset from the bottom in px - No ; +left: offset from left in px - No ; +right: offset from right in px - No ; +fixed: "fixed" .. If ribbon is at the top, it can be "fixed". Bottom is always fixed +--> +\parameters (position:"right", url:"https://github.com/Jermolene/TiddlyWiki5", text:"Fork me on ~GitHub" color:"#aa0000" top:"0" bottom:"0" left:"0" right:"0" fixed:"") + +<style> +{{$:/plugins/tiddlywiki/github-fork-ribbon/styles}} +</style> + +<div class={{{ github-fork-ribbon-wrapper [<position>] [<fixed>] +[join[ ]] }}}> + <div class="github-fork-ribbon"> + <a href=<<url>>> + <<text>> + </a> + </div> +</div> diff --git a/plugins/tiddlywiki/github-fork-ribbon/usage.tid b/plugins/tiddlywiki/github-fork-ribbon/usage.tid index c6d5311e0..aea2e3dba 100644 --- a/plugins/tiddlywiki/github-fork-ribbon/usage.tid +++ b/plugins/tiddlywiki/github-fork-ribbon/usage.tid @@ -1,26 +1,81 @@ title: $:/plugins/tiddlywiki/github-fork-ribbon/usage -Copy appropriate chunks on a new tiddler and tag it `$:/tags/PageControls`. Name of the new tiddler does not matter. Only the tag matters. +\procedure ribbonCode() +\whitespace trim +<$transclude $tiddler="$:/plugins/tiddlywiki/github-fork-ribbon/template" top="30px" fixed=fixed color="green"/> +\end -``` -<!-- TOP RIGHT RIBBON: START COPYING HERE --> -<div class="github-fork-ribbon-wrapper right"><div class="github-fork-ribbon"><a href="https://github.com/simonwhitaker/github-fork-ribbon-css">Fork me on ~GitHub</a></div> -</div> -<!-- TOP RIGHT RIBBON: END COPYING HERE --> +\procedure ribbonCreateActions() +<% if [[$:/github-ribbon]!is[tiddler]] %> + <$action-setfield $tiddler="$:/github-ribbon" $field="text" $value=<<ribbonCode>> + tags="$:/tags/PageTemplate" + code-body="yes" /> +<% endif %> +<$action-navigate $to="$:/github-ribbon" /> +\end -<!-- TOP LEFT RIBBON: START COPYING HERE --> -<div class="github-fork-ribbon-wrapper left"><div class="github-fork-ribbon"><a href="https://github.com/simonwhitaker/github-fork-ribbon-css">Fork me on ~GitHub</a></div> -</div> -<!-- TOP LEFT RIBBON: END COPYING HERE --> +\procedure createRibbon() +<$button actions=<<ribbonCreateActions>> > +<%if [[$:/github-ribbon]!is[tiddler]] %> +Create +<% else %> +Show +<% endif %> ~$:/github-ribbon +</$button> +\end + +\procedure ribbonToggleTagActions() +<$action-listops $tiddler="$:/github-ribbon" $field="tags" $subfilter="+[toggle[$:/tags/PageTemplate]]" /> +\end + +\procedure ribbonToggleTag() <$button actions=<<ribbonToggleTagActions>> >Toggle Tag</$button> -<!-- BOTTOM RIGHT RIBBON: START COPYING HERE --> -<div class="github-fork-ribbon-wrapper right-bottom"><div class="github-fork-ribbon"><a href="https://github.com/simonwhitaker/github-fork-ribbon-css">Fork me on ~GitHub</a></div> -</div> -<!-- BOTTOM RIGHT RIBBON: END COPYING HERE --> +`$:/plugins/tiddlywiki/github-fork-ribbon/template` is a template tiddler, that can be used with a transclusion and parameters. -<!-- BOTTOM LEFT RIBBON: START COPYING HERE --> -<div class="github-fork-ribbon-wrapper left-bottom"><div class="github-fork-ribbon"><a href="https://github.com/simonwhitaker/github-fork-ribbon-css">Fork me on ~GitHub</a></div> -</div> -<!-- BOTTOM LEFT RIBBON: END COPYING HERE --> -``` +!! Usage + +* Create a new tiddler eg: $:/github-ribbon +* Tag it `$:/tags/PageTemplate` +* Copy the code below + +<pre><$text text=<<ribbonCode>>/></pre> + +<<createRibbon>> <<ribbonToggleTag>> + +!! Parameters + +; position +: "right" (default), "left", "right-bottom" and "left-bottom" + +; url +: Target URL, default: https://github.com/Jermolene/TiddlyWiki5 + +; text +: Ribbon text. default: `Fork me on ~GitHub` + +; color +: Ribbon background color: default: `#aa0000` + +; top +: Offset from the top if postion is top. default: `0` eg: `30px`, if the menu-toolbar plugin is installed + +; bottom +: Offset from the bottom in px + +; left +: Offset from the left in px + +; right +: Offset from the right in px + +; fixed +: If position is ''top'', the ribbon will scroll out of the viewport by default +: If the parameter `fixed="fixed"` it will be fixed + +!! Remove the Ribbon + +* Disable the plugin +* ''Remove the tag'' from $:/github-ribbon tiddler +* Delete the $:/github-ribbon tiddler +* <<ribbonToggleTag>> \ No newline at end of file diff --git a/plugins/tiddlywiki/highlight/files/tiddlywiki.files b/plugins/tiddlywiki/highlight/files/tiddlywiki.files index 8c6f014c7..acc957162 100644 --- a/plugins/tiddlywiki/highlight/files/tiddlywiki.files +++ b/plugins/tiddlywiki/highlight/files/tiddlywiki.files @@ -7,7 +7,6 @@ "title": "$:/plugins/tiddlywiki/highlight/highlight.js", "module-type": "library" }, - "prefix": "var hljs = require(\"$:/plugins/tiddlywiki/highlight/highlight.js\");\n", "suffix": "\nexports.hljs = hljs;\n" }, { diff --git a/plugins/tiddlywiki/menubar/items/pagecontrols.tid b/plugins/tiddlywiki/menubar/items/pagecontrols.tid index 833d035f4..af4026664 100644 --- a/plugins/tiddlywiki/menubar/items/pagecontrols.tid +++ b/plugins/tiddlywiki/menubar/items/pagecontrols.tid @@ -5,15 +5,14 @@ caption: Page controls custom-menu-content: <$transclude tiddler="$:/plugins/tiddlywiki/menubar/items/pagecontrols" mode="inline"/> \whitespace trim -\define config-title() -$:/config/PageControlButtons/Visibility/$(listItem)$ -\end +\define config-title() $:/config/PageControlButtons/Visibility/$(listItem)$ + <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> -<$set name="hidden" value=<<config-title>>> -<$list filter="[<hidden>!text[hide]]" storyview="pop" variable="ignore"> -<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"> -<$transclude tiddler=<<listItem>> mode="inline"/> -</$set> -</$list> -</$set> + <$set name="hidden" value=<<config-title>>> + <$list filter="[<hidden>!text[hide]]" storyview="pop" variable="ignore"> + <$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"> + <$transclude tiddler=<<listItem>> mode="inline"/> + </$set> + </$list> + </$set> </$list> diff --git a/plugins/tiddlywiki/tiddlyweb/html-json-skinny-tiddler.tid b/plugins/tiddlywiki/tiddlyweb/html-json-skinny-tiddler.tid index b7329c265..ce953fbf2 100644 --- a/plugins/tiddlywiki/tiddlyweb/html-json-skinny-tiddler.tid +++ b/plugins/tiddlywiki/tiddlyweb/html-json-skinny-tiddler.tid @@ -1,3 +1,3 @@ title: $:/core/templates/html-json-skinny-tiddler -<$jsontiddler tiddler=<<currentTiddler>> exclude="text" escapeUnsafeScriptChars="yes" $revision=<<changecount>> $bag="default" $_is_skinny=""/> +<$text text=<<join>>/><$jsontiddler tiddler=<<currentTiddler>> exclude="text" escapeUnsafeScriptChars="yes" $revision=<<changecount>> $bag="default" $_is_skinny=""/> diff --git a/plugins/tiddlywiki/tour/config-AutoStartTour.tid b/plugins/tiddlywiki/tour/config-AutoStartTour.tid new file mode 100644 index 000000000..ba598fd0e --- /dev/null +++ b/plugins/tiddlywiki/tour/config-AutoStartTour.tid @@ -0,0 +1,2 @@ +title: $:/config/AutoStartTour +text: no diff --git a/plugins/tiddlywiki/tour/config-CurrentTour.tid b/plugins/tiddlywiki/tour/config-CurrentTour.tid new file mode 100644 index 000000000..3f7cd7b5e --- /dev/null +++ b/plugins/tiddlywiki/tour/config-CurrentTour.tid @@ -0,0 +1,2 @@ +title: $:/config/CurrentTour +text: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/config-DefaultColourMappings.multids b/plugins/tiddlywiki/tour/config-DefaultColourMappings.multids new file mode 100644 index 000000000..d753333f9 --- /dev/null +++ b/plugins/tiddlywiki/tour/config-DefaultColourMappings.multids @@ -0,0 +1,31 @@ +title: $:/config/DefaultColourMappings/ + +tour-chooser-button-foreground: <<colour very-muted-foreground>> +tour-chooser-button-hover-background: <<colour muted-foreground>> +tour-chooser-button-hover-foreground:: <<colour background>> +tour-chooser-button-selected-background: <<colour primary>> +tour-chooser-button-selected-foreground: <<colour background>> +tour-chooser-dropdown-foreground: <<colour very-muted-foreground>> +tour-chooser-item-background: <<colour background>> +tour-chooser-item-border: <<colour muted-foreground>> +tour-chooser-item-foreground: <<colour foreground>> +tour-chooser-item-shadow: <<colour muted-foreground>> +tour-chooser-item-start-background: <<colour download-background>> +tour-chooser-item-start-foreground: <<colour background>> +tour-chooser-item-start-hover-background: <<colour primary>> +tour-chooser-item-start-hover-foreground: <<colour background>> +tour-fullscreen-background: <<colour page-background>> +tour-fullscreen-controls-foreground: <<colour muted-foreground>> +tour-navigation-buttons-back-background: red +tour-navigation-buttons-back-foreground: white +tour-navigation-buttons-hint-background: purple +tour-navigation-buttons-hint-foreground: white +tour-navigation-buttons-hover-background: <<colour foreground>> +tour-navigation-buttons-hover-foreground: <<colour background>> +tour-navigation-buttons-next-background: purple +tour-navigation-buttons-next-foreground: white +tour-overlay-background: #cbfff8 +tour-overlay-border: #228877 +tour-step-heading-background: none +tour-step-task-background: <<colour download-background>> +tour-step-task-foreground: <<colour download-foreground>> diff --git a/plugins/tiddlywiki/tour/config-ShowTour.tid b/plugins/tiddlywiki/tour/config-ShowTour.tid new file mode 100644 index 000000000..44ed4339f --- /dev/null +++ b/plugins/tiddlywiki/tour/config-ShowTour.tid @@ -0,0 +1,2 @@ +title: $:/config/ShowTour +text: hide diff --git a/plugins/tiddlywiki/tour/docs.tid b/plugins/tiddlywiki/tour/docs.tid new file mode 100644 index 000000000..0f9168f38 --- /dev/null +++ b/plugins/tiddlywiki/tour/docs.tid @@ -0,0 +1,25 @@ +title: $:/plugins/tiddlywiki/tour/docs + +Tour definition tiddlers have the following fields: + +|!Name |!Description | +|tags |Must include $:/tags/Tour | +|tour-tag |Name of tag used to define tour step sequence | +|logo |Title of tiddler containing logo of tour | +|description |Brief description of the tour | +|text |Longer description of the tour | +|class |(optional) additional class to apply to the tour wrapper | + + +Tour step tiddlers have the following fields: + +|!Name |!Description | +|tags|Must include the tag used to define the tour step sequence | +|caption|Caption for the tour step | +|display-mode|(optional) can be set to `fullscreen` | +|enter-actions|(optional) action string invoked when the step is displayed | +|hint-selector|(optional) selector to be highlighted by the hint button in steps with a step-success-filter | +|hint-text|(optional) text to be displayed for the hint button | +|condition|(optional) filter expression that must return a result for the step to be displayed | +|step-success-filter|(optional) filter expression that must return a result for the step to be considered completed | +|step-success-filtervar|(optional) filter expression evaluated to set the first result as the variable `step-success-filter-var` which can be used in the `step-success-filter` | \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/images/tour-button-icon.tid b/plugins/tiddlywiki/tour/images/tour-button-icon.tid new file mode 100644 index 000000000..88a0a1402 --- /dev/null +++ b/plugins/tiddlywiki/tour/images/tour-button-icon.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/tour/tour-button-icon +tags: $:/tags/Image + +\parameters (size:"22pt") +<svg width=<<size>> height=<<size>> class="tc-image-tour-button tc-image-button" viewBox="0 0 24 24"> +<path d="M0 0h24v24H0z" style="fill:none"/> +<path d="M1.832 10.356a1.024 1.024 0 0 1 0-1.832l9.71-4.856c.288-.144.628-.144.916 0l9.71 4.856a1.024 1.024 0 0 1 0 1.832l-9.71 4.855a1.025 1.025 0 0 1-.916 0l-9.71-4.855Z"/> +<path d="M18.5 13.19v3.25h-.066c.044.163.066.33.066.5 0 1.932-2.913 3.5-6.5 3.5s-6.5-1.568-6.5-3.5c0-.17.022-.337.066-.5H5.5v-3.25l6.042 3.02c.288.145.628.145.916 0l6.042-3.02ZM2.73 8.44l.208 5-.681 3s-.002.709.974.717c.92.007 1-.717 1-.717l-.793-3 .293-5h-1Z"/> +</svg> \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/plugin.info b/plugins/tiddlywiki/tour/plugin.info new file mode 100644 index 000000000..203e98abb --- /dev/null +++ b/plugins/tiddlywiki/tour/plugin.info @@ -0,0 +1,7 @@ +{ + "title": "$:/plugins/tiddlywiki/tour", + "name": "Tour", + "description": "A tour of TiddlyWiki", + "list": "readme docs settings", + "dependents": ["$:/plugins/tiddlywiki/confetti","$:/plugins/tiddlywiki/dynannotate"] +} diff --git a/plugins/tiddlywiki/tour/readme.tid b/plugins/tiddlywiki/tour/readme.tid new file mode 100644 index 000000000..7ebbf380b --- /dev/null +++ b/plugins/tiddlywiki/tour/readme.tid @@ -0,0 +1,3 @@ +title: $:/plugins/tiddlywiki/tour/readme + +The Tour Plugin for TiddlyWiki provides a framework for making interactive guided tours. An "Introduction to ~TiddlyWiki" tour is included in the plugin but it is also possible to load additional tours and switch between them. diff --git a/plugins/tiddlywiki/tour/settings.tid b/plugins/tiddlywiki/tour/settings.tid new file mode 100644 index 000000000..bdb955bee --- /dev/null +++ b/plugins/tiddlywiki/tour/settings.tid @@ -0,0 +1,154 @@ +title: $:/plugins/tiddlywiki/tour/settings + +\import [[$:/plugins/tiddlywiki/tour/variables]] +\procedure button-expand-collapse-all(caption,text) +<$button> + <$list filter="[all[shadows+tiddlers]tag<currentTourTag>]" variable="currentStep"> + <$let + collapseState={{{ [[$:/state/Tour/Settings/Tour/Visibility/]addsuffix<currentTour>addsuffix<currentStep>] }}} + > + <$action-setfield $tiddler=<<collapseState>> text=<<text>>/> + </$let> + </$list> + <$text text=<<caption>>/> +</$button> +\end + +\procedure display-tour-step-field-text(fieldName,fieldCaption) +<$list filter="[<currentStep>has<fieldName>]" variable="ignore"> + <tr> + <th> + <$text text=<<fieldCaption>>/> + </th> + <td> + <$text text={{{ [<currentStep>get<fieldName>] }}}/> + </td> + </tr> +</$list> +\end + +<$let + stateCurrentTour=<<qualify "$:/state/Tour/Settings/Current">> + defaultTour={{{ [{$:/config/CurrentTour}] :else[all[shadows+tiddlers]tag[$:/tags/Tour]] }}} +> + +! Tour Overview + +Select a tour: +<$select tiddler=<<stateCurrentTour>> default=<<defaultTour>>> + <$list filter="[all[shadows+tiddlers]tag[$:/tags/Tour]]"> + <option value=<<currentTiddler>>> + <$transclude $field="description"> + <$text text=<<currentTiddler>>/> + </$transclude> + </option> + </$list> +</$select> + +<$let + currentTour={{{ [<stateCurrentTour>get[text]] :else[<defaultTour>] }}} + currentTourTag={{{ [<currentTour>get[tour-tag]] }}} +> + <table class="tc-tour-settings-tour-details"> + <tbody> + <tr> + <th> + Tour title + </th> + <td> + <$link to=<<currentTour>>><$text text=<<currentTour>>/></$link> + </td> + </tr> + <tr> + <th> + Tour description + </th> + <td> + <div class="tc-tour-settings-tour-details-description"> + <$transclude $tiddler=<<currentTour>>> + (No description available) + </$transclude> + </div> + </td> + </tr> + <tr> + <th> + Tour logo + </th> + <td> + <div class="tc-tour-settings-tour-details-logo"> + <$image source={{{ [<currentTour>get[logo]] }}}/> + </div> + </td> + </tr> + <tr> + <th> + Tour step tag + </th> + <td> + <$transclude $variable="tag" tag=<<currentTourTag>>/> + </td> + </tr> + </tbody> + </table> + <$list filter="[<currentTour>has[settings]]" variable="ignore"> + <p> + Custom tour settings: + </p> + <div class="tc-tour-settings-tour-settings"> + <$transclude $tiddler={{{ [<currentTour>get[settings]] }}}/> + </div> + </$list> + <p> + <<button-expand-collapse-all "Expand All" "show">> + <<button-expand-collapse-all "Collapse All" "hide">> + </p> + <$list filter="[all[shadows+tiddlers]tag<currentTourTag>]" variable="currentStep" counter="stepNumber"> + <$let + collapseState={{{ [[$:/state/Tour/Settings/Tour/Visibility/]addsuffix<currentTour>addsuffix<currentStep>] }}} + > + <div class="tc-tour-settings-tour-step"> + <div class="tc-tour-settings-tour-step-heading"> + <$button class="tc-btn-invisible tc-tour-settings-tour-step-open-button"> + <$action-setfield $tiddler=<<collapseState>> text={{{ [<collapseState>get[text]else[hide]match[show]then[hide]else[show]] }}}/> + <$list filter="[<collapseState>get[text]else[hide]match[show]]" variable="ignore" emptyMessage="{{$:/core/images/right-arrow}}"> + {{$:/core/images/down-arrow}} + </$list> + <span class="tc-tour-settings-tour-step-heading-step-number"> + <$text text=<<stepNumber>>/> + </span> + <$transclude $tiddler=<<currentStep>> $field="caption"> + <$text text=<<currentStep>>/> + </$transclude> + </$button> + <$button class="tc-btn-invisible tc-tour-settings-tour-step-launch-button" tooltip="Launch this step of the tour"> + <$transclude $variable="tour-start" title=<<currentTour>> step=<<currentStep>>/> + {{$:/core/images/open-window}} + </$button> + </div> + <$reveal state=<<collapseState>> text="show" type="match" default="hide" animate="yes"> + <table class="tc-tour-settings-tour-step-details"> + <tbody> + <<display-tour-step-field-text "title" "Title">> + <<display-tour-step-field-text "caption" "Caption">> + <<display-tour-step-field-text "step-success-filter" "step-success-filter">> + <<display-tour-step-field-text "step-success-filter-var" "step-success-filter Variable">> + <<display-tour-step-field-text "display-mode" "Display Mode">> + <<display-tour-step-field-text "enter-actions" "Enter Actions">> + <<display-tour-step-field-text "hint-text" "Hint text">> + <<display-tour-step-field-text "hint-selector" "Hint selector">> + <<display-tour-step-field-text "hint-selector-fallback-1" "Hint selector Fallback 1">> + <<display-tour-step-field-text "hint-selector-fallback-2" "Hint selector Fallback 2">> + <<display-tour-step-field-text "condition" "Condition">> + </tbody> + </table> + <div class="tc-tour-settings-tour-step-body"> + <$transclude $tiddler=<<currentStep>> $mode="block"/> + </div> + </$reveal> + </div> + </$let> + </$list> +</$let> + +</$let> diff --git a/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid b/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid new file mode 100644 index 000000000..9adf981e1 --- /dev/null +++ b/plugins/tiddlywiki/tour/simplified-tiddler-with-tags.tid @@ -0,0 +1,106 @@ +title: $:/plugins/tiddlywiki/tour/simplified-tiddler-with-tags + +\whitespace trim +\define tag-pill-styles() +background-color:$(backgroundColor)$; +fill:$(foregroundColor)$; +color:$(foregroundColor)$; +\end + +\procedure tag-pill-label(prefix) +<$text text={{{ [<currentTiddler>removeprefix<prefix>] }}}/> +\end + +\procedure tag-pill-label-link(prefix) +<div> + <$link> + <$transclude $variable="tag-pill-label" prefix=<<prefix>>/> + </$link> +</div> +\end + +<!-- This has no whitespace trim to avoid modifying $actions$. Closing tags omitted for brevity. --> +\define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions,prefix) +\whitespace trim +<$let + foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> + backgroundColor=<<__colour__>> +> +<$element-tag$ + $element-attributes$ + class="tc-tag-label tc-btn-invisible" + style=<<tag-pill-styles>> +> + <<__actions__>> + <$transclude tiddler=<<__icon__>>/> + <$let currentTiddler=<<__tag__>>> + <$transclude $variable="tag-pill-label" prefix=<<__prefix__>>/> + </$let> +</$element-tag$> +</$let> +\end + +\define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions,prefix) +<$transclude $variable="tag-pill-inner" + tag=<<__tag__>> + icon=<<__icon__>> + colour=<<__colour__>> + fallbackTarget={{$palette$##tag-background}} + colourA={{$palette$##foreground}} + colourB={{$palette$##background}} + element-tag=<<__element-tag__>> + element-attributes=<<__element-attributes__>> + actions=<<__actions__>> + prefix=<<__prefix__>> +/> +\end + +\procedure simplified-tag(prefix) +<span class="tc-tag-list-item" data-tag-title=<<currentTiddler>>> + <$set name="transclusion" value=<<currentTiddler>>> + <$transclude $variable="tag-pill-body" + tag=<<currentTiddler>> + icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} + colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} + palette={{$:/palette}} + element-tag="$button" + element-attributes="""popup=<<qualify "$:/state/popup/tag">> dragFilter="[all[current]tagging[]]" tag='span'""" + prefix=<<prefix>> + /> + <$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down"> + <$set name="tv-show-missing-links" value="yes"> + <$transclude $variable="tag-pill-label-link" prefix=<<prefix>>/> + </$set> + <hr> + <$list filter="[all[shadows+tiddlers]tag<currentTiddler>]"> + <$transclude $variable="tag-pill-label-link" prefix=<<prefix>>/> + </$list> + </$reveal> + </$set> +</span> +\end + +<$let storyTiddler=<<currentTiddler>>> + <div class="tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-shadow " role="article"> + <div class="tc-tiddler-title"> + <div class="tc-titlebar"> + <span class="tc-tiddler-controls"> + <$list filter="[<tour-simplified-tiddler-close-button>match[yes]]" variable="ignore"> + {{||$:/core/ui/Buttons/close}} + </$list> + </span> + <span> + <h2 class="tc-title"><$view field="caption"/></h2> + </span> + </div> + </div> + <div class="tc-tags-wrapper"> + <$list filter="[all[current]tags[]sort[title]]" storyview="pop"> + <<simplified-tag "$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/">> + </$list> + </div> + <div class="tc-tiddler-body"> + <$transclude field="text" mode="block"/> + </div> + </div> +</$let> \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/simplified-tiddler.tid b/plugins/tiddlywiki/tour/simplified-tiddler.tid new file mode 100644 index 000000000..22a146b9a --- /dev/null +++ b/plugins/tiddlywiki/tour/simplified-tiddler.tid @@ -0,0 +1,22 @@ +title: $:/plugins/tiddlywiki/tour/simplified-tiddler + +\whitespace trim +<$let storyTiddler=<<currentTiddler>>> + <div class="tc-tiddler-frame tc-tiddler-view-frame tc-tiddler-exists tc-tiddler-shadow " role="article"> + <div class="tc-tiddler-title"> + <div class="tc-titlebar"> + <span class="tc-tiddler-controls"> + <$list filter="[<tour-simplified-tiddler-close-button>match[yes]]" variable="ignore"> + {{||$:/core/ui/Buttons/close}} + </$list> + </span> + <span> + <h2 class="tc-title"><$view field="caption"/></h2> + </span> + </div> + </div> + <div class="tc-tiddler-body"> + <$transclude field="text" mode="block"/> + </div> + </div> +</$let> \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/start-tour-button.tid b/plugins/tiddlywiki/tour/start-tour-button.tid new file mode 100644 index 000000000..d04d8b698 --- /dev/null +++ b/plugins/tiddlywiki/tour/start-tour-button.tid @@ -0,0 +1,18 @@ +title: $:/plugins/tiddlywiki/tour/start-tour-button +tags: $:/tags/PageControls +caption: {{$:/plugins/tiddlywiki/tour/tour-button-icon}} Start Tour +description: Start interactive training tour + +\whitespace trim +\import [[$:/plugins/tiddlywiki/tour/variables]] +<$button tooltip="Start interactive training tour" aria-label="Start Tour" class=<<tv-config-toolbar-class>>> +<<tour-restart>> +<$list filter="[<tv-config-toolbar-icons>match[yes]]" variable="listItem"> +{{$:/plugins/tiddlywiki/tour/tour-button-icon}} +</$list> +<$list filter="[<tv-config-toolbar-text>match[yes]]"> +<span class="tc-btn-text"> +<$text text="Start Tour"/> +</span> +</$list> +</$button> \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/startup-actions.tid b/plugins/tiddlywiki/tour/startup-actions.tid new file mode 100644 index 000000000..033e0a614 --- /dev/null +++ b/plugins/tiddlywiki/tour/startup-actions.tid @@ -0,0 +1,7 @@ +title: $:/plugins/tiddlywiki/tour/startup-actions +tags: $:/tags/StartupAction + +\import [[$:/plugins/tiddlywiki/tour/variables]] +<$list filter="[[$:/config/AutoStartTour]get[text]else[no]match[yes]]" variable="ignore"> +<<tour-restart>> +</$list> diff --git a/plugins/tiddlywiki/tour/styles.tid b/plugins/tiddlywiki/tour/styles.tid new file mode 100644 index 000000000..2cd28bc93 --- /dev/null +++ b/plugins/tiddlywiki/tour/styles.tid @@ -0,0 +1,261 @@ +title: $:/plugins/tiddlywiki/tour/styles +tags: $:/tags/Stylesheet + +\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock + +.tc-tour-panel { + position: fixed; + bottom: 0; + left: 0; + width: 310px; + height: 400px; + overflow: auto; + -webkit-overflow-scrolling: touch; + <<box-shadow "0px 0px 5px rgba(0, 0, 0, 0.3)">> + border: 1px solid <<colour tour-overlay-border>>; + background: <<colour tour-overlay-background>>; + border-radius: 8px; + padding: 1em; + margin: 0.5em; + z-index: 2000; +} + +.tc-tour-panel-navigation .tc-btn-big-green { + border-radius: 0.25em; + margin: 0 1em 0 0; +} + +.tc-tour-panel-navigation .tc-btn-big-green.tc-tour-panel-navigation-back { + background: <<colour tour-navigation-buttons-back-background>>; + color: <<colour tour-navigation-buttons-back-foreground>>; +} + +.tc-tour-panel-navigation .tc-btn-big-green.tc-tour-panel-navigation-next { + background: <<colour tour-navigation-buttons-next-background>>; + color: <<colour tour-navigation-buttons-next-foreground>>; +} + +.tc-tour-panel-navigation .tc-btn-big-green.tc-tour-panel-navigation-hint { + background: <<colour tour-navigation-buttons-hint-background>>; + color: <<colour tour-navigation-buttons-hint-foreground>>; +} + +.tc-tour-panel-navigation .tc-btn-big-green:hover { + color: <<colour tour-navigation-buttons-hover-foreground>>; + background: <<colour tour-navigation-buttons-hover-background>>; +} + +.tc-tour-panel-fullscreen { + top: 0; + right: 0; + width: auto; + height: auto; + box-shadow: none; + border: none; + background: <<colour tour-fullscreen-background>>; + margin: 0; + border-radius: 0; +} + +.tc-tour-panel-controls .tc-tour-panel-list-button { + padding: 2px 8px; + border-radius: 1em; + color: <<color tour-chooser-button-foreground>>; + text-align: left; +} + +.tc-tour-panel-controls .tc-tour-panel-list-button.tc-selected { + color: <<colour tour-chooser-button-selected-foreground>>; + fill: <<colour tour-chooser-button-selected-foreground>>; + background: <<color tour-chooser-button-selected-background>>; +} + +.tc-tour-panel-controls .tc-tour-panel-list-button:hover { + background: <<colour tour-chooser-button-hover-background>>; + color: <<colour tour-chooser-button-hover-foreground>>; +} + +.tc-tour-panel-controls .tc-popup .tc-drop-down { + font-size: 1em; + color: <<colour tour-chooser-dropdown-foreground>>; + min-width: auto; +} + +.tc-tour-panel-chooser-item { + border: 1px solid <<colour tour-chooser-item-border>>; + background: <<colour tour-chooser-item-background>>; + color: <<colour tour-chooser-item-foreground>>; + padding: 4px 4px 4px 8px; + margin: 12px 0; + border-radius: 12px; + box-shadow: 3px 3px 5px <<colour tour-chooser-item-shadow>>; + display: flex; + flex-direction: row; + justify-content: space-between; + gap: 1em; +} + +.tc-tour-panel-chooser-item .tc-tour-panel-chooser-start-button { + display: inline-block; + width: auto; + padding: 4px; + font-size: 0.7em; + vertical-align: baseline; + border-radius: 1em; + background: <<colour tour-chooser-item-start-background>>; + color: <<colour tour-chooser-item-start-foreground>>; + fill: <<colour tour-chooser-item-start-foreground>>; + text-transform: uppercase; +} + +.tc-tour-panel-chooser-wrapper button:hover { + background: <<colour tour-chooser-item-start-hover-background>>; + color: <<colour tour-chooser-item-start-hover-foreground>>; +} + +.tc-tour-panel-fullscreen h1 { + background: <<colour tour-step-heading-background>>; + padding: 0.25em; + margin: -0.25em; + border-radius: 4px; +} + +.tc-tour-panel-fullscreen .tc-tour-panel-controls { + /* display: none; */ + position: fixed; + top: 0; + left: 0; + right: 0; + padding: 4px; + color: <<colour tour-fullscreen-controls-foreground>>; +} + +.tc-tour-panel .tc-tour-panel-banner-image { + display: none; +} + +.tc-tour-panel-fullscreen .tc-tour-panel-banner-image { + display: block; + width: 200px; + float: right; + margin: 4em 2em 2em 2em; +} + +.tc-tour-panel-fullscreen .tc-tour-panel-inner { + width: 30%; + min-width: 400px; + height: 30%; + margin: 20% auto; +} + +.tc-tour-panel .tc-tour-panel-inner .tc-tiddler-frame { + width: auto; + padding: 1.5em 2.5em; +} + +.tc-tour-panel .tc-tour-panel-inner .tc-tiddler-frame .tc-titlebar { + font-size: 1.5em; + line-height: 1.1; +} + +.tc-tour-task { + background: <<colour tour-step-task-background>>; + color: <<colour tour-step-task-foreground>>; + padding: 0.5em; + border-radius: 1em; +} + +.tc-tour-task svg { + fill: <<colour tour-step-task-foreground>>; + vertical-align: middle; + width: 1.2em; + height: 1.2em; + margin-right: 0.5em; +} + +.tc-tour-settings-tour-details, +.tc-tour-settings-tour-step-details { + width: 100%; +} + +.tc-tour-settings-tour-details th, +.tc-tour-settings-tour-step-details th { + text-align: right; + vertical-align: top; + font-weight: normal; + width:10em; +} + +.tc-tour-settings-tour-details td, +.tc-tour-settings-tour-step-details td { + font-weight: bold; +} + +.tc-tour-settings-tour-details-description { + +} + +.tc-tour-settings-tour-details-logo img { + max-width: 200px; + max-height: 100px; +} + +.tc-tour-settings-tour-settings { + border: 1px solid <<colour muted-foreground>>; + margin: 0.5em 0; + padding: 0.5em; +} + +.tc-tour-settings-tour-step { + border: 1px solid <<colour foreground>>; +} + +.tc-tour-settings-tour-step-heading { + background: <<colour muted-foreground>>; + border: 0; + display: flex; + flex-wrap: nowrap; + justify-content: space-between; + align-items: center; + gap: 5px; +} + +.tc-tour-settings-tour-step-open-button, +.tc-tour-settings-tour-step-launch-button { + display: inline-block; + padding: 0.25em; +} + +.tc-tour-settings-tour-step-open-button { + flex-grow: 1; + text-align: left; +} + +.tc-tour-settings-tour-step-launch-button { + flex-grow: 0; +} + +.tc-tour-settings-tour-step-open-button:hover, +.tc-tour-settings-tour-step-launch-button:hover { + background: <<colour foreground>>; + color: <<colour background>>; + fill: <<colour background>>; +} + +.tc-tour-settings-tour-step-heading-step-number { + font-weight: bold; + background: <<colour foreground>>; + color: <<colour background>>; + border-radius: 1em; + font-size: 0.9em; + display: inline-block; + padding: 0 4px; +} + +.tc-tour-settings-tour-step-details { + margin: 0; +} + +.tc-tour-settings-tour-step-body { + padding: 0.5em; +} diff --git a/plugins/tiddlywiki/tour/tour-panel.tid b/plugins/tiddlywiki/tour/tour-panel.tid new file mode 100644 index 000000000..63a23f6e6 --- /dev/null +++ b/plugins/tiddlywiki/tour/tour-panel.tid @@ -0,0 +1,106 @@ +title: $:/plugins/tiddlywiki/tour/panel +tags: $:/tags/PageTemplate + +\whitespace trim + +\procedure tour-buttons() +\procedure tv-action-refresh-policy() always +<div class="tc-tour-panel-navigation"> + <%if [function[tour-is-not-first-step]] %> + <$button class="tc-btn-big-green tc-tour-panel-navigation-back"> + <<tour-previous-step>> + back + </$button> + <%endif%> + <%if [function[tour-is-not-last-step]] %> + <$button class="tc-btn-big-green tc-tour-panel-navigation-next"> + <<tour-next-step>> + next + </$button> + <%endif%> + <%if [function[tour-is-last-step]] %> + <$confetti/> + <$confetti delay=100/> + <$confetti delay=200/> + <$confetti delay=300/> + <$confetti delay=400/> + <$confetti delay=500/> + <%endif%> +</div> +\end + +\procedure tour-step-no-success-filter() +<$transclude tiddler=<<currentTourStep>> mode="block"/> +<<tour-buttons>> +\end tour-step-no-success-filter + +\procedure tour-step-success-filter-not-satisfied() +<$transclude tiddler=<<currentTourStep>> mode="block"/> +<%if [{$:/state/tour/step}has[hint-selector]] %> + <div class="tc-tour-panel-navigation"> + <$button class="tc-btn-big-green tc-tour-panel-navigation-hint"> + <$action-sendmessage $message="tm-spotlight-element" selector={{{ [{$:/state/tour/step}get[hint-selector]] }}} selector-fallback-1={{{ [{$:/state/tour/step}get[hint-selector-fallback-1]] }}} selector-fallback-2={{{ [{$:/state/tour/step}get[hint-selector-fallback-2]] }}}/> + <$transclude tiddler={{$:/state/tour/step}} field="hint-text" mode="inline"> show me a hint </$transclude> + </$button> + </div> +<%endif%> +\end tour-step-success-filter-not-satisfied + +\procedure tour-step-success-filter-satisfied() +<$let tour-task=""> + <$transclude tiddler=<<currentTourStep>> mode="block"/> +</$let> +<$confetti/> +<p> + Congratulations, you may proceed +</p> +<<tour-buttons>> +\end tour-step-success-filter-satisfied +\import [[$:/plugins/tiddlywiki/tour/variables]] + +<%if [{$:/config/ShowTour}!is[blank]else[show]match[show]] %> + <div class=`tc-tour-panel tc-tour-panel-${ [{$:/state/tour/step}get[display-mode]else[normal]] }$ ${ [{$:/config/CurrentTour}get[class]] }$`> + <$image class="tc-tour-panel-banner-image" source={{{ [{$:/config/CurrentTour}get[logo]] }}}/> + <div class="tc-tour-panel-inner"> + <div class="tc-tiddler-controls tc-tour-panel-controls"> + <$button set="$:/config/ShowTour" setTo="no" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button> + <$button popup=<<qualify "$:/state/popup/tour-dropdown">> class="tc-btn-invisible tc-tour-panel-list-button" selectedClass="tc-selected"> + <span class="tc-small-gap-right">''Tour'':</span> <<tour-display-current-tour>> + </$button> + <$reveal state=<<qualify "$:/state/popup/tour-dropdown">> type="popup" position="belowleft" animate="yes" tag="div"> + <div class="tc-drop-down"> + <p> + Choose a tour: + </p> + <p> + <<tour-chooser>> + </p> + </div> + </$reveal> + </div> + <$let + currentTour={{$:/config/CurrentTour}} + currentTourStep={{$:/state/tour/step}} + step-success-filter-var={{{ [<currentTourStep>get[step-success-filter-var]] :map[subfilter<currentTiddler>] }}} + > + <%if [<currentTourStep>has[caption]] %> + <h1><$transclude $tiddler=<<currentTourStep>> $field="caption" mode="inline"/></h1> + <%endif%> + <!-- Handle steps without a step-success-filter --> + <%if [<currentTourStep>!has[step-success-filter]] %> + <<tour-step-no-success-filter>> + <%endif%> + <!-- Handle steps that have a step-success-filter --> + <%if [<currentTourStep>has[step-success-filter]] %> + <$let step-success-filter={{{ [<currentTourStep>get[step-success-filter]] }}}> + <%if [subfilter<step-success-filter>] %> + <<tour-step-success-filter-satisfied>> + <%else%> + <<tour-step-success-filter-not-satisfied>> + <%endif%> + </$let> + <%endif%> + </$let> + </div> + </div> +<%endif%> diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/config/ProductName.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/config/ProductName.tid new file mode 100644 index 000000000..be410b9e1 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/config/ProductName.tid @@ -0,0 +1,2 @@ +title: $:/config/Tours/IntroductionToTiddlyWiki/ProductName +text: ~TiddlyWiki diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-GasGiant.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-GasGiant.tid new file mode 100644 index 000000000..a3acbe3f6 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-GasGiant.tid @@ -0,0 +1,4 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Gas Giant +caption: Gas Giant + + A gas giant is a large planet that has a solid core, but a very thick atmosphere. This means that most of the planet is made up of gas. These planets are very large. \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Jupiter.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Jupiter.tid new file mode 100644 index 000000000..139bfc372 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Jupiter.tid @@ -0,0 +1,5 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Jupiter +caption: Jupiter +tags: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Planet [[$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Gas Giant]] + +Jupiter is the largest planet in the Solar System. It is the fifth planet from the Sun. Jupiter is a gas giant because it is so large and made of gas. The other gas giants in the Solar System are [[Saturn|$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Saturn]], Uranus, and Neptune. diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Mars.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Mars.tid new file mode 100644 index 000000000..68bac333d --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Mars.tid @@ -0,0 +1,5 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Mars +caption: Mars +tags: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Planet [[$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Rocky]] + +Mars is the fourth planet from the Sun in the Solar System and the second-smallest planet. Mars is a terrestrial planet with polar ice caps of frozen water and carbon dioxide. It has the largest volcano in the Solar System, and some very large impact craters. Mars is named after the mythological Roman god of war because it appears of red color. diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Planet.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Planet.tid new file mode 100644 index 000000000..1f5d782b1 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Planet.tid @@ -0,0 +1,4 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Planet +caption: Planet + + A planet is a large object such as Venus or Earth that orbits a star. Planets are smaller than stars, and they do not make light. Jupiter is the biggest planet in the Solar System, while the smallest planet in the Solar System is Mercury. \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Rocky.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Rocky.tid new file mode 100644 index 000000000..b07d53f50 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Rocky.tid @@ -0,0 +1,4 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Rocky +caption: Rocky + + Rocky planets have a core, a mantle, and a crust. They are a bit like a boiled egg: the central yolk is the core; the white albumin is the mantle; and the shell is the crust. The crust of a terrestrial planet is thin, with the core and the mantle taking up the vast bulk, sometimes with a very large core, sometimes much smaller. Terrestrial planets have metallic cores of mostly iron, with rocky mantles and crusts. \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Saturn.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Saturn.tid new file mode 100644 index 000000000..2324b5475 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/data/tiddlers-Saturn.tid @@ -0,0 +1,5 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Saturn +caption: Saturn +tags: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Planet [[$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Gas Giant]] + +Saturn is the sixth planet from the Sun located in the Solar System. It is the second largest planet in the Solar System, after Jupiter. Saturn is one of the four gas giant planets in the Solar System, along with [[Jupiter|$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Jupiter]], Uranus, and Neptune. \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/images/tiddlywiki-tour-logo.svg b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/images/tiddlywiki-tour-logo.svg new file mode 100644 index 000000000..100556513 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/images/tiddlywiki-tour-logo.svg @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg width="100%" height="100%" viewBox="0 0 500 335" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> + <g transform="matrix(0.488281,0,0,0.436198,0,0)"> + <rect id="Artboard1" x="0" y="0" width="1024" height="768" style="fill:none;"/> + <clipPath id="_clip1"> + <rect id="Artboard11" serif:id="Artboard1" x="0" y="0" width="1024" height="768"/> + </clipPath> + <g clip-path="url(#_clip1)"> + <g transform="matrix(3.66495,0,0,4.10256,0,0.218772)"> + <g transform="matrix(1,0,0,1,-59.5095,-391.468)"> + <path d="M320.725,420.421C326.96,417.788 332.843,414.256 338.913,411.253C338.882,411.406 338.722,411.458 338.626,411.561C328.964,419.375 327.614,432.589 328.751,444.808C329.174,451.149 327.382,458.033 325.167,464.525C321.022,475.102 313.017,486.251 303.726,485.68C300.214,485.568 298.174,483.58 295.563,481.456C295.057,485.757 293.067,489.595 291.148,493.398C286.718,501.831 275.14,505.548 264.419,514.553C253.699,523.558 267.849,555.718 271.28,561.578C274.711,567.439 284.287,569.583 280.571,574.872C279.434,576.618 277.696,577.243 275.838,577.921L273.318,578.249C262.308,577.938 257.466,577.965 251.859,568.744L247.489,568.87C242.402,568.644 244.522,568.746 241.129,568.577C235.455,568.356 236.364,562.965 235.366,560.117C233.769,550.449 237.478,540.73 237.361,531.06C237.32,527.627 232.462,515.476 230.727,511.132C225.287,512.156 219.817,512.351 214.298,512.626C201.576,512.595 188.94,511.037 176.396,509.059C173.952,519.157 166.686,533.291 172.692,543.554C179.982,554.17 185.098,557.111 193.028,557.751C200.957,558.39 202.748,567.343 200.829,570.541C199.131,572.751 196.147,573.152 193.611,573.687L188.539,573.925C184.548,573.791 180.98,572.714 177.424,571.052C171.485,567.736 165.351,560.844 160.793,555.895C161.854,557.871 162.487,561.729 161.525,563.524C158.83,567.341 147.176,567.318 141.839,564.946C135.776,562.252 121.125,543.335 118.86,529.168C124.886,517.772 133.665,507.845 138.106,495.437C128.425,489.26 123.24,479.204 123.913,467.813L124.156,466.494C114.631,468.277 119.57,467.614 109.323,468.389C76.689,468.289 47.99,446.162 64.15,411.773C65.201,409.737 66.201,407.885 67.982,408.77C69.412,409.479 69.207,412.325 68.487,415.481C59.25,456.572 104.396,456.886 132.149,449.282C134.903,448.528 140.381,443.444 144.176,441.759C150.379,439.004 157.111,437.887 163.793,437.082C180.411,435.188 200.384,443.943 210.533,444.228C220.681,444.514 235.118,441.798 243.98,442.37C250.41,442.664 256.724,443.825 262.928,445.478C266.944,425.911 267.228,411.489 276.748,408.151C281.18,408.851 284.806,413.787 287.706,417.829L287.706,423.746C287.706,428.653 295.104,432.636 304.216,432.636C313.328,432.636 320.725,428.653 320.725,423.746L320.725,420.421ZM151.046,554.19L152.645,554.662C154.654,553.763 158.693,555.152 160.836,555.832C156.89,551.458 150.947,545.035 146.664,540.986C145.259,536.084 145.859,531.152 146.161,526.148L146.222,525.734C144.534,529.74 142.391,533.634 141.24,537.85C139.893,543.539 147.228,549.677 150.073,553.194L151.046,554.19Z"/> + </g> + <g transform="matrix(2.12347,0,0,2.12347,219.225,-7.42467)"> + <g transform="matrix(1,0,0,0.666667,-0.185118,3.43957)"> + <path d="M0.667,9.362C0.576,9.293 0.518,9.153 0.518,9C0.518,8.847 0.576,8.707 0.667,8.638C2.756,7.072 10.971,0.911 12.065,0.09C12.14,0.033 12.23,0.033 12.306,0.09C13.399,0.911 21.614,7.072 23.703,8.638C23.794,8.707 23.852,8.847 23.852,9C23.852,9.153 23.794,9.293 23.703,9.362C21.614,10.928 13.399,17.089 12.306,17.91C12.23,17.967 12.14,17.967 12.065,17.91C10.971,17.089 2.756,10.928 0.667,9.362Z"/> + </g> + <g transform="matrix(1,0,0,1,1.77636e-15,4.43957)"> + <path d="M18.5,8.75L18.5,13.744C18.5,15.675 15.587,17.244 12,17.244C8.413,17.244 5.5,15.675 5.5,13.744L5.5,8.75L11.951,11.975C11.982,11.991 12.018,11.991 12.049,11.975L18.5,8.75Z"/> + </g> + <g transform="matrix(1,0,0,0.648293,19.2746,5.5086)"> + <path d="M2,6L2.207,11L1.526,14C1.526,14 1.524,14.709 2.5,14.717C3.421,14.724 3.5,14 3.5,14L2.707,11L3,6L2,6Z"/> + </g> + </g> + </g> + </g> + </g> +</svg> diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/images/tiddlywiki-tour-logo.svg.meta b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/images/tiddlywiki-tour-logo.svg.meta new file mode 100644 index 000000000..c2c789d5b --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/images/tiddlywiki-tour-logo.svg.meta @@ -0,0 +1,2 @@ +title: $:/plugins/tiddlywiki/tour/tiddlywiki-tour-logo +type: image/svg+xml diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/introduction-to-tiddlywiki.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/introduction-to-tiddlywiki.tid new file mode 100644 index 000000000..8d78c1073 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/introduction-to-tiddlywiki.tid @@ -0,0 +1,8 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki +tags: $:/tags/Tour +tour-tag: $:/tags/Tour/IntroductionToTiddlyWiki +logo: $:/plugins/tiddlywiki/tour/tiddlywiki-tour-logo +description: Introduction to {{$:/config/Tours/IntroductionToTiddlyWiki/ProductName}} +settings: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/settings + +An introductory tour to {{$:/config/Tours/IntroductionToTiddlyWiki/ProductName}} \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/settings.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/settings.tid new file mode 100644 index 000000000..9d5c964bc --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/settings.tid @@ -0,0 +1,4 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/settings + +Customise name used for ~TiddlyWiki: <$edit tiddler="$:/config/Tours/IntroductionToTiddlyWiki/ProductName" tag="input"/> + diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/close-control-panel.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/close-control-panel.tid new file mode 100644 index 000000000..3abd90764 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/close-control-panel.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/close-control-panel +caption: Close the control panel +tags: $:/tags/Tour/IntroductionToTiddlyWiki +hint-selector: .tc-story-river div[data-tiddler-title='$:/ControlPanel'] .tc-btn-\%24\%3A\%2Fcore\%2Fui\%2FButtons\%2Fclose +step-success-filter: [[$:/StoryList]!contains[$:/ControlPanel]] + +<<tour-task "Now close the control panel">> + +Use the {{$:/core/images/close-button|0.65em}} button in the top right corner of the control panel tiddler. \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/closing-tiddlers.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/closing-tiddlers.tid new file mode 100644 index 000000000..38f5af0fd --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/closing-tiddlers.tid @@ -0,0 +1,25 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/closing-tiddlers +caption: Closing tiddlers +tags: $:/tags/Tour/IntroductionToTiddlyWiki +display-mode: fullscreen +enter-actions: <$action-setfield $tiddler="$:/temp/Tour/DemoStoryList" list="$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Jupiter $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Saturn"/> +step-success-filter: [list[$:/temp/Tour/DemoStoryList]count[]match[0]] + +\procedure tour-simplified-tiddler-close-button() yes + +In the top right corner of each tiddler there is a button marked {{$:/core/images/close-button|0.65em}} that can be used to close them when you are finished with them. + +<<tour-task "Close both of these tiddlers">> + +Closing a tiddler does not delete it or alter it in any way. It just removes it from the display. + +<$navigator story="$:/temp/Tour/DemoStoryList" history="$:/temp/Tour/DemoHistoryList" openLinkFromInsideRiver="below"> + +<$list + filter="[list[$:/temp/Tour/DemoStoryList]]" + history="$:/temp/Tour/DemoHistoryList" + template="$:/plugins/tiddlywiki/tour/simplified-tiddler" + storyview="classic" +/> + +</$navigator> diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/create-tiddler.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/create-tiddler.tid new file mode 100644 index 000000000..13d40a26d --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/create-tiddler.tid @@ -0,0 +1,11 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/create-tiddler +caption: Creating Tiddlers +tags: $:/tags/Tour/IntroductionToTiddlyWiki +hint-selector: .tc-story-river div[data-tiddler-title="Draft of 'New Tiddler'"] input[value]:not([value="Congratulations"]) +hint-selector-fallback-1: .tc-story-river div[data-tiddler-title='Draft of \'New Tiddler\''] .tc-btn-\%24\%3A\%2Fcore\%2Fui\%2FButtons\%2Fsave +hint-selector-fallback-2: .tc-btn-\%24\%3A\%2Fcore\%2Fui\%2FButtons\%2Fnew-tiddler +step-success-filter: [list[$:/StoryList]match[Congratulations]] + +<<tour-task "Create a tiddler titled 'Congratulations'">> + +Use the {{$:/core/images/new-button|0.65em}} button to create the new tiddler, then type correct "title". Finally, click the {{$:/core/images/done-button|0.65em}} button. diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/end-of-fullscreen.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/end-of-fullscreen.tid new file mode 100644 index 000000000..fbf778d0f --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/end-of-fullscreen.tid @@ -0,0 +1,10 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/end-of-fullscreen +caption: Going Deeper +tags: $:/tags/Tour/IntroductionToTiddlyWiki +display-mode: fullscreen + +Congratulations! + +You have completed the first part of this tour. + +Now we are going guide you through using {{$:/config/Tours/IntroductionToTiddlyWiki/ProductName}}. diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/finished.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/finished.tid new file mode 100644 index 000000000..16cdd6509 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/finished.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/finished +caption: Congratulations +tags: $:/tags/Tour/IntroductionToTiddlyWiki + +You have completed the tour. + +You can choose to take another tour: + +<<tour-chooser filter:"[all[shadows+tiddlers]tag[$:/tags/Tour]] -[<currentTour>]">> diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/links.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/links.tid new file mode 100644 index 000000000..257088c14 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/links.tid @@ -0,0 +1,23 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/links +caption: Linking tiddlers +tags: $:/tags/Tour/IntroductionToTiddlyWiki +display-mode: fullscreen +enter-actions: <$action-setfield $tiddler="$:/temp/Tour/DemoStoryList" list="$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Jupiter"/> +step-success-filter: [[$:/temp/Tour/DemoStoryList]contains[$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Saturn]] + +Links allow you to decide if you want more information on a particular area or term as you go. + +<<tour-task "Click the blue link to open the tiddler 'Saturn'">> + +Notice how the new tiddler opens alongside the old one. This allows you to scroll back up to retrace your steps. + +<$navigator story="$:/temp/Tour/DemoStoryList" history="$:/temp/Tour/DemoHistoryList" openLinkFromInsideRiver="below"> + +<$list + filter="[list[$:/temp/Tour/DemoStoryList]]" + history="$:/temp/Tour/DemoHistoryList" + template="$:/plugins/tiddlywiki/tour/simplified-tiddler" + storyview="classic" +/> + +</$navigator> diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/open-control-panel.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/open-control-panel.tid new file mode 100644 index 000000000..69751f6ba --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/open-control-panel.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/open-control-panel +caption: Open the control panel +tags: $:/tags/Tour/IntroductionToTiddlyWiki +hint-selector: .tc-btn-\%24\%3A\%2Fcore\%2Fui\%2FButtons\%2Fcontrol-panel +step-success-filter: [[$:/StoryList]contains[$:/ControlPanel]] + +<<tour-task "Open the control panel">> + +Click the {{$:/core/images/options-button|0.65em}} icon in the sidebar at the right. \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/recent.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/recent.tid new file mode 100644 index 000000000..5c894741f --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/recent.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/recent +caption: Finding recent tiddlers +tags: $:/tags/Tour/IntroductionToTiddlyWiki +hint-selector: .tc-sidebar-tabs-main .tc-timeline > .tc-menu-list-item:nth-child(1) .tc-menu-list-subitem:nth-child(1) .tc-tiddlylink +hint-selector-fallback-1: .tc-sidebar-tabs-main button[data-tab-title="\$\:\/core\/ui\/SideBar\/Recent"] +step-success-filter: [list[$:/StoryList]match<step-success-filter-var>] +step-success-filter-var: [all[tiddlers]!is[system]!sort[modified]] + +<<tour-task "Use the ''Recent'' tab of the sidebar to open the most recently edited tiddler.">> diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/search.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/search.tid new file mode 100644 index 000000000..44b153785 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/search.tid @@ -0,0 +1,9 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/search +caption: Searching +tags: $:/tags/Tour/IntroductionToTiddlyWiki +hint-selector: .tc-sidebar-search .tc-popup-handle +step-success-filter: [{$:/temp/search}match[help]] + +<<tour-task "Search for the phrase 'help'">> + +Type the phrase into the text box labelled "search" in the sidebar at the right. diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/tags.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/tags.tid new file mode 100644 index 000000000..0629d3b02 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/tags.tid @@ -0,0 +1,26 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/tags +caption: Tagging tiddlers +tags: $:/tags/Tour/IntroductionToTiddlyWiki +display-mode: fullscreen +enter-actions: <$action-setfield $tiddler="$:/temp/Tour/DemoStoryList" list="$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Mars"/> +step-success-filter: [[$:/temp/Tour/DemoStoryList]contains[$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Saturn]] + +Tiddlers may be categorised with one or more descriptive keywords or phrases called "tags". Tags can be used to search and navigate between tiddlers. + +Click on the tag to display a dropdown menu. The menu is divided into two parts: + +* At the top, there is a link to the tiddler with the same title as the tag. This is generally used to describe the tag or give an overview of its purpose +* Beneath the link to the tag, there a list of links to the other tiddlers with the same tag + +<<tour-task "Use the tag dropdown to open the tiddler 'Saturn'">> + +<$navigator story="$:/temp/Tour/DemoStoryList" history="$:/temp/Tour/DemoHistoryList" openLinkFromInsideRiver="below"> + +<$list + filter="[list[$:/temp/Tour/DemoStoryList]]" + history="$:/temp/Tour/DemoHistoryList" + template="$:/plugins/tiddlywiki/tour/simplified-tiddler-with-tags" + storyview="classic" +/> + +</$navigator> diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/tiddlers.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/tiddlers.tid new file mode 100644 index 000000000..af939bff1 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/tiddlers.tid @@ -0,0 +1,16 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/tiddlers +caption: How does it work? +tags: $:/tags/Tour/IntroductionToTiddlyWiki +display-mode: fullscreen + +{{$:/config/Tours/IntroductionToTiddlyWiki/ProductName}} lets you collect and organise all kinds of information into interconnected bite-sized pieces called ''tiddlers''. + +A tiddler is like an index card. + +<$let tv-wikilinks="no"> + +{{$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/tiddlers/Jupiter||$:/plugins/tiddlywiki/tour/simplified-tiddler}} + +</$let> + +Each tiddler must have a unique title that is used to distinguish it. diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/welcome.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/welcome.tid new file mode 100644 index 000000000..c9037dbf2 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/steps/welcome.tid @@ -0,0 +1,10 @@ +title: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/welcome +caption: Welcome +tags: $:/tags/Tour/IntroductionToTiddlyWiki +display-mode: fullscreen + +!! An interactive tour of {{$:/config/Tours/IntroductionToTiddlyWiki/ProductName}} + +Welcome to this tour of {{$:/config/Tours/IntroductionToTiddlyWiki/ProductName}}. + +We hope you'll find {{$:/config/Tours/IntroductionToTiddlyWiki/ProductName}} a helpful and supportive tool. Let's get started! diff --git a/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/tagsTourIntroductionToTiddlyWiki.tid b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/tagsTourIntroductionToTiddlyWiki.tid new file mode 100644 index 000000000..c717061e7 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/introduction-to-tiddlywiki/tagsTourIntroductionToTiddlyWiki.tid @@ -0,0 +1,2 @@ +title: $:/tags/Tour/IntroductionToTiddlyWiki +list: $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/welcome $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/tiddlers $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/links $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/closing-tiddlers $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/tags $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/end-of-fullscreen $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/open-control-panel $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/close-control-panel $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/search $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/recent $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/create-tiddler $:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/finished diff --git a/plugins/tiddlywiki/tour/tours/using-tags/finished.tid b/plugins/tiddlywiki/tour/tours/using-tags/finished.tid new file mode 100644 index 000000000..6d8a9e4f9 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/using-tags/finished.tid @@ -0,0 +1,5 @@ +title: $:/plugins/tiddlywiki/tour/using-tags/finished +caption: Congratulations +tags: $:/tags/Tour/UsingTags + +<<tour-chooser filter:"[all[shadows+tiddlers]tag[$:/tags/Tour]] -[<currentTour>]">> diff --git a/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg b/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg new file mode 100644 index 000000000..0773e0f00 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg width="100%" height="100%" viewBox="0 0 500 335" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> + <g transform="matrix(0.488281,0,0,0.436198,0,0)"> + <rect id="Artboard1" x="0" y="0" width="1024" height="768" style="fill:none;"/> + <clipPath id="_clip1"> + <rect id="Artboard11" serif:id="Artboard1" x="0" y="0" width="1024" height="768"/> + </clipPath> + <g clip-path="url(#_clip1)"> + <g transform="matrix(3.66495,0,0,4.10256,0,0.218772)"> + <g transform="matrix(1,0,0,1,-59.5095,-391.468)"> + <path d="M320.725,420.421C326.96,417.788 332.843,414.256 338.913,411.253C338.882,411.406 338.722,411.458 338.626,411.561C328.964,419.375 327.614,432.589 328.751,444.808C329.174,451.149 327.382,458.033 325.167,464.525C321.022,475.102 313.017,486.251 303.726,485.68C300.214,485.568 298.174,483.58 295.563,481.456C295.057,485.757 293.067,489.595 291.148,493.398C286.718,501.831 275.14,505.548 264.419,514.553C253.699,523.558 267.849,555.718 271.28,561.578C274.711,567.439 284.287,569.583 280.571,574.872C279.434,576.618 277.696,577.243 275.838,577.921L273.318,578.249C262.308,577.938 257.466,577.965 251.859,568.744L247.489,568.87C242.402,568.644 244.522,568.746 241.129,568.577C235.455,568.356 236.364,562.965 235.366,560.117C233.769,550.449 237.478,540.73 237.361,531.06C237.32,527.627 232.462,515.476 230.727,511.132C225.287,512.156 219.817,512.351 214.298,512.626C201.576,512.595 188.94,511.037 176.396,509.059C173.952,519.157 166.686,533.291 172.692,543.554C179.982,554.17 185.098,557.111 193.028,557.751C200.957,558.39 202.748,567.343 200.829,570.541C199.131,572.751 196.147,573.152 193.611,573.687L188.539,573.925C184.548,573.791 180.98,572.714 177.424,571.052C171.485,567.736 165.351,560.844 160.793,555.895C161.854,557.871 162.487,561.729 161.525,563.524C158.83,567.341 147.176,567.318 141.839,564.946C135.776,562.252 121.125,543.335 118.86,529.168C124.886,517.772 133.665,507.845 138.106,495.437C128.425,489.26 123.24,479.204 123.913,467.813L124.156,466.494C114.631,468.277 119.57,467.614 109.323,468.389C76.689,468.289 47.99,446.162 64.15,411.773C65.201,409.737 66.201,407.885 67.982,408.77C69.412,409.479 69.207,412.325 68.487,415.481C59.25,456.572 104.396,456.886 132.149,449.282C134.903,448.528 140.381,443.444 144.176,441.759C150.379,439.004 157.111,437.887 163.793,437.082C180.411,435.188 200.384,443.943 210.533,444.228C220.681,444.514 235.118,441.798 243.98,442.37C250.41,442.664 256.724,443.825 262.928,445.478C266.944,425.911 267.228,411.489 276.748,408.151C281.18,408.851 284.806,413.787 287.706,417.829L287.706,423.746C287.706,428.653 295.104,432.636 304.216,432.636C313.328,432.636 320.725,428.653 320.725,423.746L320.725,420.421ZM151.046,554.19L152.645,554.662C154.654,553.763 158.693,555.152 160.836,555.832C156.89,551.458 150.947,545.035 146.664,540.986C145.259,536.084 145.859,531.152 146.161,526.148L146.222,525.734C144.534,529.74 142.391,533.634 141.24,537.85C139.893,543.539 147.228,549.677 150.073,553.194L151.046,554.19Z" fill="red"/> + </g> + <g transform="matrix(2.12347,0,0,2.12347,219.225,-7.42467)"> + <g transform="matrix(1,0,0,0.666667,-0.185118,3.43957)"> + <path d="M0.667,9.362C0.576,9.293 0.518,9.153 0.518,9C0.518,8.847 0.576,8.707 0.667,8.638C2.756,7.072 10.971,0.911 12.065,0.09C12.14,0.033 12.23,0.033 12.306,0.09C13.399,0.911 21.614,7.072 23.703,8.638C23.794,8.707 23.852,8.847 23.852,9C23.852,9.153 23.794,9.293 23.703,9.362C21.614,10.928 13.399,17.089 12.306,17.91C12.23,17.967 12.14,17.967 12.065,17.91C10.971,17.089 2.756,10.928 0.667,9.362Z"/> + </g> + <g transform="matrix(1,0,0,1,1.77636e-15,4.43957)"> + <path d="M18.5,8.75L18.5,13.744C18.5,15.675 15.587,17.244 12,17.244C8.413,17.244 5.5,15.675 5.5,13.744L5.5,8.75L11.951,11.975C11.982,11.991 12.018,11.991 12.049,11.975L18.5,8.75Z"/> + </g> + <g transform="matrix(1,0,0,0.648293,19.2746,5.5086)"> + <path d="M2,6L2.207,11L1.526,14C1.526,14 1.524,14.709 2.5,14.717C3.421,14.724 3.5,14 3.5,14L2.707,11L3,6L2,6Z"/> + </g> + </g> + </g> + </g> + </g> +</svg> diff --git a/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg.meta b/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg.meta new file mode 100644 index 000000000..29d308fc0 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/using-tags/tags-tour-logo.svg.meta @@ -0,0 +1,2 @@ +title: $:/plugins/tiddlywiki/tour/tags-tour-logo +type: image/svg+xml diff --git a/plugins/tiddlywiki/tour/tours/using-tags/tagsTourUsingTags.tid b/plugins/tiddlywiki/tour/tours/using-tags/tagsTourUsingTags.tid new file mode 100644 index 000000000..30681ca24 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/using-tags/tagsTourUsingTags.tid @@ -0,0 +1,2 @@ +title: $:/tags/Tour/UsingTags +list: $:/plugins/tiddlywiki/tour/using-tags/welcome $:/plugins/tiddlywiki/tour/using-tags/finished diff --git a/plugins/tiddlywiki/tour/tours/using-tags/using-tags.tid b/plugins/tiddlywiki/tour/tours/using-tags/using-tags.tid new file mode 100644 index 000000000..31c2f4b78 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/using-tags/using-tags.tid @@ -0,0 +1,7 @@ +title: $:/plugins/tiddlywiki/tour/using-tags +tags: $:/tags/Tour +tour-tag: $:/tags/Tour/UsingTags +logo: $:/plugins/tiddlywiki/tour/tags-tour-logo +description: Using Tags in ~TiddlyWiki + +An introduction to using tags in ~TiddlyWiki \ No newline at end of file diff --git a/plugins/tiddlywiki/tour/tours/using-tags/welcome.tid b/plugins/tiddlywiki/tour/tours/using-tags/welcome.tid new file mode 100644 index 000000000..852273629 --- /dev/null +++ b/plugins/tiddlywiki/tour/tours/using-tags/welcome.tid @@ -0,0 +1,5 @@ +title: $:/plugins/tiddlywiki/tour/using-tags/welcome +caption: Welcome +tags: $:/tags/Tour/UsingTags + +!! An introduction to using tags in ~TiddlyWiki diff --git a/plugins/tiddlywiki/tour/variables.tid b/plugins/tiddlywiki/tour/variables.tid new file mode 100644 index 000000000..65cec532d --- /dev/null +++ b/plugins/tiddlywiki/tour/variables.tid @@ -0,0 +1,104 @@ +title: $:/plugins/tiddlywiki/tour/variables + +\whitespace trim + +<!-- + +The following state tiddlers control the tour. They should not be directly modified, but rather use the appropriate procedure to ensure that all the associated actions are performed. + +* $:/config/CurrentTour: title of current tour definition tiddler +* $:/state/tour/step: title of current step of the tour + +These config tiddlers may be changed directly as required: + +* $:/config/ShowTour: "show" (default) or "hide" +* $:/config/AutoStartTour: "no" (default) or "yes" + +--> + +\function tour-current-tag() +[{$:/config/CurrentTour}get[tour-tag]] +\end + +\procedure tour-filter-steps-by-condition() +[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] :else[<currentTiddler>!has[condition]then[true]] +\end + +\function tour-all-steps-filtered-by-condition() +[all[shadows+tiddlers]tag<tour-current-tag>filter<tour-filter-steps-by-condition>] +\end + +\function tour-is-not-first-step() +[function[tour-all-steps-filtered-by-condition]allbefore{$:/state/tour/step}count[]compare:number:gt[0]] +\end + +\function tour-is-last-step() +[function[tour-all-steps-filtered-by-condition]allafter{$:/state/tour/step}count[]compare:number:eq[0]] +\end + +\function tour-is-not-last-step() +[function[tour-all-steps-filtered-by-condition]allafter{$:/state/tour/step}count[]compare:number:gt[0]] +\end + + +\procedure tour-initialise-current-tour-step() +\procedure tv-action-refresh-policy() always +<$transclude $tiddler={{$:/state/tour/step}} $field="enter-actions"/> +\end + +\procedure tour-chooser(filter:"[all[shadows+tiddlers]tag[$:/tags/Tour]]") +\procedure choose-tour-actions() +<$transclude $variable="tour-start" title=<<currentTiddler>>/> +\end choose-tour-actions +<div class="tc-tour-panel-chooser-wrapper"> + <$list filter=<<filter>>> + <div class="tc-tour-panel-chooser-item"> + <div class="tc-tour-panel-chooser-item-text"> + <$transclude $field="description"> + <$text text=<<currentTiddler>>/> + </$transclude> + </div> + <$button class="tc-btn-invisible tc-tour-panel-chooser-start-button" actions=<<choose-tour-actions>>> + start {{$:/core/images/chevron-right}} + </$button> + </div> + </$list> +</div> +\end tour-chooser + +\procedure tour-start(title,step) +\procedure tv-action-refresh-policy() always +<$action-setfield $tiddler="$:/config/CurrentTour" text=<<title>>/> +<$transclude $variable="tour-restart" step=<<step>>/> +\end + +\procedure tour-restart(step) +\procedure tv-action-refresh-policy() always +<$action-setfield $tiddler="$:/config/ShowTour" text="show"/> +<$action-setfield $tiddler="$:/state/tour/step" $field="text" $value={{{ [<step>!is[blank]] :else[function[tour-all-steps-filtered-by-condition]first[]] }}}/> +<<tour-initialise-current-tour-step>> +\end + +\procedure tour-next-step() +\procedure tv-action-refresh-policy() always +<$action-setfield $tiddler="$:/state/tour/step" $field="text" $value={{{ [function[tour-all-steps-filtered-by-condition]allafter{$:/state/tour/step}else[$:/plugins/tiddlywiki/tour/introduction-to-tiddlywiki/steps/finished]] }}}/> +<<tour-initialise-current-tour-step>> +\end + +\procedure tour-previous-step() +\procedure tv-action-refresh-policy() always +<$action-setfield $tiddler="$:/state/tour/step" $field="text" $value={{{ [function[tour-all-steps-filtered-by-condition]allbefore{$:/state/tour/step}last[]] :else[all[shadows+tiddlers]tag<tour-current-tag>first[]] }}}/> +<<tour-initialise-current-tour-step>> +\end + +\procedure tour-display-current-tour() +<$transclude $tiddler={{$:/config/CurrentTour}} $field="description"> + <$text text={{$:/config/CurrentTour}}/> +</$transclude> +\end + +\procedure tour-task(text) +<div class="tc-tour-task"> +{{$:/core/images/help}} <$transclude $variable="text" $mode="inline"/> +</div> +\end diff --git a/readme.md b/readme.md index 2dad1f1de..1a7b21df5 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ <p>Welcome to <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a>, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation.</p><p><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> is a complete interactive wiki in <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/JavaScript.html">JavaScript</a>. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/WikiText.html">WikiText</a>.</p><p>Learn more and see it in action at <a class="tc-tiddlylink-external" href="https://tiddlywiki.com/" rel="noopener noreferrer" target="_blank">https://tiddlywiki.com/</a></p><p>Developer documentation is in progress at <a class="tc-tiddlylink-external" href="https://tiddlywiki.com/dev/" rel="noopener noreferrer" target="_blank">https://tiddlywiki.com/dev/</a></p><h1 class="">Join the Community</h1><p> <h2 class="">Official Forums</h2><p>The new official forum for talking about TiddlyWiki: requests for help, announcements of new releases and plugins, debating new features, or just sharing experiences. You can participate via the associated website, or subscribe via email.</p><p><a class="tc-tiddlylink-external" href="https://talk.tiddlywiki.org/" rel="noopener noreferrer" target="_blank">https://talk.tiddlywiki.org/</a></p><p>Note that talk.tiddlywiki.org is a community run service that we host and maintain ourselves. The modest running costs are covered by community contributions.</p><p>For the convenience of existing users, we also continue to operate the original TiddlyWiki group (hosted on Google Groups since 2005):</p><p><a class="tc-tiddlylink-external" href="https://groups.google.com/group/TiddlyWiki" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/TiddlyWiki</a></p><h2 class="">Developer Forums</h2><p>There are several resources for developers to learn more about <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> and to discuss and contribute to its development.</p><ul><li><a class="tc-tiddlylink-external" href="https://tiddlywiki.com/dev" rel="noopener noreferrer" target="_blank">tiddlywiki.com/dev</a> is the official developer documentation</li><li>Get involved in the <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5" rel="noopener noreferrer" target="_blank">development on GitHub</a><ul><li><a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/discussions" rel="noopener noreferrer" target="_blank">Discussions</a> are for Q&A and open-ended discussion</li><li><a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/issues" rel="noopener noreferrer" target="_blank">Issues</a> are for raising bug reports and proposing specific, actionable new ideas</li></ul></li><li>The older TiddlyWikiDev Google Group is now closed in favour of <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/discussions" rel="noopener noreferrer" target="_blank">GitHub Discussions</a> but remains a useful archive: <a class="tc-tiddlylink-external" href="https://groups.google.com/group/TiddlyWikiDev" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/TiddlyWikiDev</a><ul><li>An enhanced group search facility is available on <a class="tc-tiddlylink-external" href="https://www.mail-archive.com/tiddlywikidev@googlegroups.com/" rel="noopener noreferrer" target="_blank">mail-archive.com</a></li></ul></li><li>Follow <a class="tc-tiddlylink-external" href="http://twitter.com/#!/TiddlyWiki" rel="noopener noreferrer" target="_blank">@TiddlyWiki on Twitter</a> for the latest news</li><li>Chat at <a class="tc-tiddlylink-external" href="https://gitter.im/TiddlyWiki/public" rel="noopener noreferrer" target="_blank">https://gitter.im/TiddlyWiki/public</a> (development room coming soon)</li></ul><h2 class="">Other Forums</h2><ul><li><a class="tc-tiddlylink-external" href="https://www.reddit.com/r/TiddlyWiki5/" rel="noopener noreferrer" target="_blank">TiddlyWiki Subreddit</a></li><li>Chat with Gitter at <a class="tc-tiddlylink-external" href="https://gitter.im/TiddlyWiki/public" rel="noopener noreferrer" target="_blank">https://gitter.im/TiddlyWiki/public</a> !</li><li>Chat on Discord at <a class="tc-tiddlylink-external" href="https://discord.gg/HFFZVQ8" rel="noopener noreferrer" target="_blank">https://discord.gg/HFFZVQ8</a></li></ul><h3 class="">Documentation</h3><p>There is also a discussion group specifically for discussing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> documentation improvement initiatives: <a class="tc-tiddlylink-external" href="https://groups.google.com/group/tiddlywikidocs" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/tiddlywikidocs</a> </p> -</p><h1 class="">Installing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><ol><li>Install <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Node.js.html">Node.js</a><ul><li>Linux: <blockquote><div><em>Debian/Ubuntu</em>:<br><code>apt install nodejs</code><br>May need to be followed up by:<br><code>apt install npm</code></div><div><em>Arch Linux</em><br><code>yay -S tiddlywiki</code> <br>(installs node and tiddlywiki)</div></blockquote></li><li>Mac<blockquote><div><code>brew install node</code></div></blockquote></li><li>Android<blockquote><div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Serving%2520TW5%2520from%2520Android.html">Termux for Android</a></div></blockquote></li><li>Other <blockquote><div>See <a class="tc-tiddlylink-external" href="http://nodejs.org" rel="noopener noreferrer" target="_blank">http://nodejs.org</a></div></blockquote></li></ul></li><li>Open a command line terminal and type:<blockquote><div><code>npm install -g tiddlywiki</code></div><div>If it fails with an error you may need to re-run the command as an administrator:</div><div><code>sudo npm install -g tiddlywiki</code> (Mac/Linux)</div></blockquote></li><li>Ensure TiddlyWiki is installed by typing:<blockquote><div><code>tiddlywiki --version</code></div></blockquote><ul><li>In response, you should see <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> report its current version (eg "5.3.1". You may also see other debugging information reported.)</li></ul></li><li>Try it out:<ol><li><code>tiddlywiki mynewwiki --init server</code> to create a folder for a new wiki that includes server-related components</li><li><code>tiddlywiki mynewwiki --listen</code> to start <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a></li><li>Visit <a class="tc-tiddlylink-external" href="http://127.0.0.1:8080/" rel="noopener noreferrer" target="_blank">http://127.0.0.1:8080/</a> in your browser</li><li>Try editing and creating tiddlers</li></ol></li><li>Optionally, make an offline copy:<ul><li>click the <span class="doc-icon"><svg class="tc-image-save-button-dynamic tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"> +</p><h1 class="">Installing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><ol><li>Install <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Node.js.html">Node.js</a><ul><li>Linux: <blockquote><div><em>Debian/Ubuntu</em>:<br><code>apt install nodejs</code><br>May need to be followed up by:<br><code>apt install npm</code></div><div><em>Arch Linux</em><br><code>yay -S tiddlywiki</code> <br>(installs node and tiddlywiki)</div></blockquote></li><li>Mac<blockquote><div><code>brew install node</code></div></blockquote></li><li>Android<blockquote><div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Serving%2520TW5%2520from%2520Android.html">Termux for Android</a></div></blockquote></li><li>Other <blockquote><div>See <a class="tc-tiddlylink-external" href="http://nodejs.org" rel="noopener noreferrer" target="_blank">http://nodejs.org</a></div></blockquote></li></ul></li><li>Open a command line terminal and type:<blockquote><div><code>npm install -g tiddlywiki</code></div><div>If it fails with an error you may need to re-run the command as an administrator:</div><div><code>sudo npm install -g tiddlywiki</code> (Mac/Linux)</div></blockquote></li><li>Ensure TiddlyWiki is installed by typing:<blockquote><div><code>tiddlywiki --version</code></div></blockquote><ul><li>In response, you should see <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> report its current version (eg "5.3.3". You may also see other debugging information reported.)</li></ul></li><li>Try it out:<ol><li><code>tiddlywiki mynewwiki --init server</code> to create a folder for a new wiki that includes server-related components</li><li><code>tiddlywiki mynewwiki --listen</code> to start <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a></li><li>Visit <a class="tc-tiddlylink-external" href="http://127.0.0.1:8080/" rel="noopener noreferrer" target="_blank">http://127.0.0.1:8080/</a> in your browser</li><li>Try editing and creating tiddlers</li></ol></li><li>Optionally, make an offline copy:<ul><li>click the <span class="doc-icon"><svg class="tc-image-save-button-dynamic tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"> <g class="tc-image-save-button-dynamic-clean"> <path d="M120.783 34.33c4.641 8.862 7.266 18.948 7.266 29.646 0 35.347-28.653 64-64 64-35.346 0-64-28.653-64-64 0-35.346 28.654-64 64-64 18.808 0 35.72 8.113 47.43 21.03l2.68-2.68c3.13-3.13 8.197-3.132 11.321-.008 3.118 3.118 3.121 8.193-.007 11.32l-4.69 4.691zm-12.058 12.058a47.876 47.876 0 013.324 17.588c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48c14.39 0 27.3 6.332 36.098 16.362L58.941 73.544 41.976 56.578c-3.127-3.127-8.201-3.123-11.32-.005-3.123 3.124-3.119 8.194.006 11.319l22.617 22.617a7.992 7.992 0 005.659 2.347c2.05 0 4.101-.783 5.667-2.349l44.12-44.12z" fill-rule="evenodd"></path> </g> diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 4b10c1696..89b5c9525 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -931,6 +931,7 @@ button.tc-btn-invisible.tc-remove-tag-button { .tc-page-controls { margin-top: 14px; + margin-bottom: 14px; font-size: 1.5em; } @@ -1335,6 +1336,7 @@ canvas.tc-edit-bitmapeditor { clear: both; } +.tc-single-tiddler-window .tc-tiddler-body, .tc-tiddler-frame .tc-tiddler-body { font-size: {{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}}; line-height: {{$:/themes/tiddlywiki/vanilla/metrics/bodylineheight}}; @@ -1344,6 +1346,11 @@ canvas.tc-edit-bitmapeditor { overflow: hidden; /* https://github.com/Jermolene/TiddlyWiki5/issues/282 */ } +/* +* Tiddler in a new window. +* Also see: .tc-single-tiddler-window .tc-tiddler-body, above +*/ + html body.tc-body.tc-single-tiddler-window { margin: 1em; background: <<colour tiddler-background>>; @@ -1577,10 +1584,6 @@ html body.tc-body.tc-single-tiddler-window { padding-left: 4px; } -.tc-tiddler-preview { - overflow: auto; -} - .tc-tiddler-editor { display: grid; } @@ -1589,7 +1592,7 @@ html body.tc-body.tc-single-tiddler-window { grid-template-areas: "toolbar toolbar" "editor preview"; - grid-template-columns: 1fr 1fr; + grid-template-columns: repeat(2, minmax(0px, 1fr)); grid-template-rows: auto 1fr; } diff --git a/themes/tiddlywiki/vanilla/reset.tid b/themes/tiddlywiki/vanilla/reset.tid index 0f7d24eab..938ecc7b1 100644 --- a/themes/tiddlywiki/vanilla/reset.tid +++ b/themes/tiddlywiki/vanilla/reset.tid @@ -1,7 +1,7 @@ title: $:/themes/tiddlywiki/vanilla/reset type: text/css -/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ +/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ /* Document @@ -13,28 +13,26 @@ Use a better box model (opinionated). */ *, -*::before, -*::after { - box-sizing: border-box; +::before, +::after { + box-sizing: border-box; } -/** -Use a more readable tab size (opinionated). -*/ - -:root { - -moz-tab-size: 4; - tab-size: 4; -} - -/** -1. Correct the line height in all browsers. -2. Prevent adjustments of font size after orientation changes in iOS. -*/ - html { - line-height: 1.15; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ + /* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */ + font-family: + system-ui, + 'Segoe UI', + Roboto, + Helvetica, + Arial, + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji'; + line-height: 1.15; /* 1. Correct the line height in all browsers. */ + -webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */ + -moz-tab-size: 4; /* 3. Use a more readable tab size (opinionated). */ + tab-size: 4; /* 3 */ } /* @@ -42,29 +40,8 @@ Sections ======== */ -/** -Remove the margin in all browsers. -*/ - body { - margin: 0; -} - -/** -Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) -*/ - -body { - font-family: - system-ui, - -apple-system, /* Firefox supports this but not yet `system-ui` */ - 'Segoe UI', - Roboto, - Helvetica, - Arial, - sans-serif, - 'Apple Color Emoji', - 'Segoe UI Emoji'; + margin: 0; /* Remove the margin in all browsers. */ } /* @@ -78,8 +55,8 @@ Grouping content */ hr { - height: 0; /* 1 */ - color: inherit; /* 2 */ + height: 0; /* 1 */ + color: inherit; /* 2 */ } /* @@ -92,7 +69,7 @@ Add the correct text decoration in Chrome, Edge, and Safari. */ abbr[title] { - text-decoration: underline dotted; + text-decoration: underline dotted; } /** @@ -101,7 +78,7 @@ Add the correct font weight in Edge and Safari. b, strong { - font-weight: bolder; + font-weight: bolder; } /** @@ -113,14 +90,14 @@ code, kbd, samp, pre { - font-family: - ui-monospace, - SFMono-Regular, - Consolas, - 'Liberation Mono', - Menlo, - monospace; /* 1 */ - font-size: 1em; /* 2 */ + font-family: + ui-monospace, + SFMono-Regular, + Consolas, + 'Liberation Mono', + Menlo, + monospace; /* 1 */ + font-size: 1em; /* 2 */ } /** @@ -128,7 +105,7 @@ Add the correct font size in all browsers. */ small { - font-size: 80%; + font-size: 80%; } /** @@ -137,18 +114,18 @@ Prevent 'sub' and 'sup' elements from affecting the line height in all browsers. sub, sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } sub { - bottom: -0.25em; + bottom: -0.25em; } sup { - top: -0.5em; + top: -0.5em; } /* @@ -158,12 +135,12 @@ Tabular data /** 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) -2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +2. Correct table border color inheritance in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) */ table { - text-indent: 0; /* 1 */ - border-color: inherit; /* 2 */ + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ } /* @@ -181,20 +158,19 @@ input, optgroup, select, textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 1 */ - line-height: 1.15; /* 1 */ - margin: 0; /* 2 */ + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ } /** Remove the inheritance of text transform in Edge and Firefox. -1. Remove the inheritance of text transform in Firefox. */ button, -select { /* 1 */ - text-transform: none; +select { + text-transform: none; } /** @@ -205,7 +181,7 @@ button, [type='button'], [type='reset'], [type='submit'] { - -webkit-appearance: button; + -webkit-appearance: button; } /** @@ -213,8 +189,8 @@ Remove the inner border and padding in Firefox. */ ::-moz-focus-inner { - border-style: none; - padding: 0; + border-style: none; + padding: 0; } /** @@ -222,7 +198,7 @@ Restore the focus styles unset by the previous rule. */ :-moz-focusring { - outline: 1px dotted ButtonText; + outline: 1px dotted ButtonText; } /** @@ -231,7 +207,7 @@ See: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d4 */ :-moz-ui-invalid { - box-shadow: none; + box-shadow: none; } /** @@ -239,7 +215,7 @@ Remove the padding so developers are not caught out when they zero out 'fieldset */ legend { - padding: 0; + padding: 0; } /** @@ -247,7 +223,7 @@ Add the correct vertical alignment in Chrome and Firefox. */ progress { - vertical-align: baseline; + vertical-align: baseline; } /** @@ -256,7 +232,7 @@ Correct the cursor style of increment and decrement buttons in Safari. ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { - height: auto; + height: auto; } /** @@ -265,8 +241,8 @@ Correct the cursor style of increment and decrement buttons in Safari. */ [type='search'] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ } /** @@ -274,7 +250,7 @@ Remove the inner padding in Chrome and Safari on macOS. */ ::-webkit-search-decoration { - -webkit-appearance: none; + -webkit-appearance: none; } /** @@ -283,8 +259,8 @@ Remove the inner padding in Chrome and Safari on macOS. */ ::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ } /* @@ -297,5 +273,5 @@ Add the correct display in Chrome and Safari. */ summary { - display: list-item; + display: list-item; }