diff --git a/bin/build-site.sh b/bin/build-site.sh index af39f1285..03d4ecdee 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.1 + TW5_BUILD_VERSION=v5.3.2 fi echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]" diff --git a/boot/boot.js b/boot/boot.js index 0aa089aa0..06d4628c0 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -575,9 +575,8 @@ var globalCheck =[ " configurable: true", " });", " if(Object.keys(__temp__).length){", - " console.log(Object.keys(__temp__));", + " console.log(\"Warning: Global assignment detected\",Object.keys(__temp__));", " delete Object.prototype.__temp__;", - " throw \"Global assignment is not allowed within modules on node.\";", " }", " delete Object.prototype.__temp__;", ].join('\n'); @@ -596,11 +595,11 @@ $tw.utils.evalGlobal = function(code,context,filename,sandbox,allowGlobals) { // Add the code prologue and epilogue code = [ "(function(" + contextNames.join(",") + ") {", - " (function(){\n" + code + "\n;})();", + " (function(){" + code + "\n;})();\n", (!$tw.browser && sandbox && !allowGlobals) ? globalCheck : "", - " return exports;\n", + "\nreturn exports;\n", "})" - ].join("\n"); + ].join(""); // Compile the code into a function var fn; @@ -926,7 +925,7 @@ $tw.modules.execute = function(moduleName,moduleRoot) { } } else { // line number should be included in e.stack for runtime errors - $tw.utils.error("Error executing boot module " + name + ": " + JSON.stringify(e) + "\n\n" + e.stack); + $tw.utils.error("Error executing boot module " + name + ": " + String(e) + "\n\n" + e.stack); } } } diff --git a/core/modules/parsers/wikiparser/rules/fnprocdef.js b/core/modules/parsers/wikiparser/rules/fnprocdef.js index 5d0a8878b..3f21b8da7 100644 --- a/core/modules/parsers/wikiparser/rules/fnprocdef.js +++ b/core/modules/parsers/wikiparser/rules/fnprocdef.js @@ -35,7 +35,7 @@ Instantiate parse rule exports.init = function(parser) { this.parser = parser; // Regexp to match - this.matchRegExp = /^\\(function|procedure|widget)\s+([^(\s]+)\((\s*([^)]*))?\)(\s*\r?\n)?/mg; + this.matchRegExp = /\\(function|procedure|widget)\s+([^(\s]+)\((\s*([^)]*))?\)(\s*\r?\n)?/mg; }; /* @@ -53,7 +53,7 @@ exports.parse = function() { var reEnd; if(this.match[5]) { // If so, the end of the body is marked with \end - reEnd = new RegExp("(\\r?\\n\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg"); + reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg"); } else { // Otherwise, the end of the definition is marked by the end of the line reEnd = /($|\r?\n)/mg; diff --git a/core/modules/parsers/wikiparser/rules/parameters.js b/core/modules/parsers/wikiparser/rules/parameters.js index f288740aa..60bbd8901 100644 --- a/core/modules/parsers/wikiparser/rules/parameters.js +++ b/core/modules/parsers/wikiparser/rules/parameters.js @@ -26,7 +26,7 @@ Instantiate parse rule exports.init = function(parser) { this.parser = parser; // Regexp to match - this.matchRegExp = /^\\parameters\s*\(([^)]*)\)(\s*\r?\n)?/mg; + this.matchRegExp = /\\parameters\s*\(([^)]*)\)(\s*\r?\n)?/mg; }; /* diff --git a/core/modules/startup/startup.js b/core/modules/startup/startup.js index e0990228f..e09f6393f 100755 --- a/core/modules/startup/startup.js +++ b/core/modules/startup/startup.js @@ -27,6 +27,11 @@ exports.startup = function() { if($tw.browser) { $tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent)); $tw.browser.isFirefox = !!document.mozFullScreenEnabled; + // 2023-07-21 Edge returns UA below. So we use "isChromeLike" + //'mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/114.0.0.0 safari/537.36 edg/114.0.1823.82' + $tw.browser.isChromeLike = navigator.userAgent.toLowerCase().indexOf("chrome") > -1; + $tw.browser.hasTouch = !!window.matchMedia && window.matchMedia("(pointer: coarse)").matches; + $tw.browser.isMobileChrome = $tw.browser.isChromeLike && $tw.browser.hasTouch; } // Platform detection $tw.platform = {}; diff --git a/core/modules/utils/dom/dragndrop.js b/core/modules/utils/dom/dragndrop.js index 0b5360216..c7c32cbaf 100644 --- a/core/modules/utils/dom/dragndrop.js +++ b/core/modules/utils/dom/dragndrop.js @@ -80,7 +80,7 @@ exports.makeDraggable = function(options) { if(dataTransfer.setDragImage) { if(dragImageType === "pill") { dataTransfer.setDragImage(dragImage.firstChild,-16,-16); - } else if (dragImageType === "blank") { + } else if(dragImageType === "blank") { dragImage.removeChild(dragImage.firstChild); dataTransfer.setDragImage(dragImage,0,0); } else { @@ -106,7 +106,9 @@ exports.makeDraggable = function(options) { dataTransfer.setData("text/vnd.tiddler",jsonData); dataTransfer.setData("text/plain",titleString); dataTransfer.setData("text/x-moz-url","data:text/vnd.tiddler," + encodeURIComponent(jsonData)); - } else { + } + // If browser is Chrome-like and has a touch-input device do NOT .setData + if(!($tw.browser.isMobileChrome)) { dataTransfer.setData("URL","data:text/vnd.tiddler," + encodeURIComponent(jsonData)); } dataTransfer.setData("Text",titleString); diff --git a/core/modules/widgets/checkbox.js b/core/modules/widgets/checkbox.js index e2df3185c..fc987d815 100644 --- a/core/modules/widgets/checkbox.js +++ b/core/modules/widgets/checkbox.js @@ -116,7 +116,7 @@ CheckboxWidget.prototype.getValue = function() { } else { list = $tw.utils.parseStringArray(this.checkboxDefault || "") || []; } - } else if (this.checkboxListIndex) { + } else if(this.checkboxListIndex) { list = $tw.utils.parseStringArray(this.wiki.extractTiddlerDataItem(tiddler,this.checkboxListIndex,this.checkboxDefault || "")) || []; } else { list = this.wiki.filterTiddlers(this.checkboxFilter,this) || []; @@ -215,6 +215,8 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) { if($tw.utils.isArray(fieldContents)) { // Make a copy so we can modify it without changing original that's refrenced elsewhere listContents = fieldContents.slice(0); + } else if(fieldContents === undefined) { + listContents = []; } else if(typeof fieldContents === "string") { listContents = $tw.utils.parseStringArray(fieldContents); // No need to copy since parseStringArray returns a fresh array, not refrenced elsewhere diff --git a/core/modules/widgets/transclude.js b/core/modules/widgets/transclude.js index 7b4b9581d..ac467a2c8 100755 --- a/core/modules/widgets/transclude.js +++ b/core/modules/widgets/transclude.js @@ -41,28 +41,43 @@ TranscludeWidget.prototype.execute = function() { this.collectAttributes(); this.collectStringParameters(); this.collectSlotFillParameters(); - // Get the target text and parse tree nodes that we are transcluding - var target = this.getTransclusionTarget(), - parseTreeNodes; - this.sourceText = target.text; - this.parserType = target.type; - this.parseAsInline = target.parseAsInline; + // Determine whether we're being used in inline or block mode + var parseAsInline = !this.parseTreeNode.isBlock; + if(this.transcludeMode === "inline") { + parseAsInline = true; + } else if(this.transcludeMode === "block") { + parseAsInline = false; + } + // Set 'thisTiddler' + this.setVariable("thisTiddler",this.transcludeTitle); + var parseTreeNodes, target; // Process the transclusion according to the output type switch(this.transcludeOutput || "text/html") { case "text/html": - // Return the parse tree nodes + // Return the parse tree nodes of the target + target = this.parseTransclusionTarget(parseAsInline); + this.parseAsInline = target.parseAsInline; parseTreeNodes = target.parseTreeNodes; break; case "text/raw": // Just return the raw text - parseTreeNodes = [{type: "text", text: this.sourceText}]; + target = this.getTransclusionTarget(); + parseTreeNodes = [{type: "text", text: target.text}]; break; default: - // text/plain - var plainText = this.wiki.renderText("text/plain",this.parserType,this.sourceText,{parentWidget: this}); - parseTreeNodes = [{type: "text", text: plainText}]; + // "text/plain" is the plain text result of wikifying the text + target = this.parseTransclusionTarget(parseAsInline); + var widgetNode = this.wiki.makeWidget(target.parser,{ + parentWidget: this, + document: $tw.fakeDocument + }); + var container = $tw.fakeDocument.createElement("div"); + widgetNode.render(container,null); + parseTreeNodes = [{type: "text", text: container.textContent}]; break; } + this.sourceText = target.text; + this.parserType = target.type; // Set the legacy transclusion context variables only if we're not transcluding a variable if(!this.transcludeVariable) { var recursionMarker = this.makeRecursionMarker(); @@ -159,17 +174,44 @@ TranscludeWidget.prototype.collectSlotFillParameters = function() { }; /* -Get transcluded parse tree nodes as an object {text:,type:,parseTreeNodes:,parseAsInline:} +Get transcluded details as an object {text:,type:} */ TranscludeWidget.prototype.getTransclusionTarget = function() { var self = this; - // Determine whether we're being used in inline or block mode - var parseAsInline = !this.parseTreeNode.isBlock; - if(this.transcludeMode === "inline") { - parseAsInline = true; - } else if(this.transcludeMode === "block") { - parseAsInline = false; + var text; + // Return the text and type of the target + if(this.hasAttribute("$variable")) { + if(this.transcludeVariable) { + // Transcluding a variable + var variableInfo = this.getVariableInfo(this.transcludeVariable,{params: this.getOrderedTransclusionParameters()}); + text = variableInfo.text; + return { + text: variableInfo.text, + type: this.transcludeType + }; + } + } else { + // Transcluding a text reference + var parserInfo = this.wiki.getTextReferenceParserInfo( + this.transcludeTitle, + this.transcludeField, + this.transcludeIndex, + { + subTiddler: this.transcludeSubTiddler, + defaultType: this.transcludeType + }); + return { + text: parserInfo.text, + type: parserInfo.type + }; } +}; + +/* +Get transcluded parse tree nodes as an object {text:,type:,parseTreeNodes:,parseAsInline:} +*/ +TranscludeWidget.prototype.parseTransclusionTarget = function(parseAsInline) { + var self = this; var parser; // Get the parse tree if(this.hasAttribute("$variable")) { @@ -235,7 +277,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() { } $tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"]) }); - } else if(srcVariable && (srcVariable.isMacroDefinition || !srcVariable.isFunctionDefinition)) { + } else if(srcVariable && !srcVariable.isFunctionDefinition) { // For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__" parser = { tree: [ @@ -266,25 +308,14 @@ TranscludeWidget.prototype.getTransclusionTarget = function() { defaultType: this.transcludeType }); } - // Set 'thisTiddler' - this.setVariable("thisTiddler",this.transcludeTitle); // Return the parse tree - if(parser) { - return { - parseTreeNodes: parser.tree, - parseAsInline: parseAsInline, - text: parser.source, - type: parser.type - }; - } else { - // If there's no parse tree then return the missing slot value - return { - parseTreeNodes: (this.slotFillParseTrees["ts-missing"] || []), - parseAsInline: parseAsInline, - text: null, - type: null - }; - } + return { + parser: parser, + parseTreeNodes: parser ? parser.tree : (this.slotFillParseTrees["ts-missing"] || []), + parseAsInline: parseAsInline, + text: parser && parser.source, + type: parser && parser.type + }; }; /* diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index 3b9a1de25..6c3997179 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -13,7 +13,7 @@ Widget base class "use strict"; /* Maximum permitted depth of the widget tree for recursion detection */ -var MAX_WIDGET_TREE_DEPTH = 500; +var MAX_WIDGET_TREE_DEPTH = 1000; /* Create a widget object for a parse tree node @@ -719,46 +719,23 @@ Widget.prototype.findFirstDomNode = function() { }; /* -Entry into destroy procedure -*/ -Widget.prototype.destroyChildren = function() { - $tw.utils.each(this.children,function(childWidget) { - childWidget.destroy(); - }); -}; -/* -Legacy entry into destroy procedure +Remove any DOM nodes created by this widget or its children */ Widget.prototype.removeChildDomNodes = function() { - this.destroy(); -}; -/* -Default destroy -*/ -Widget.prototype.destroy = function() { - // call children to remove their resources - this.destroyChildren(); - // remove our resources - this.children = []; - this.removeLocalDomNodes(); -}; - -/* -Remove any DOM nodes created by this widget -*/ -Widget.prototype.removeLocalDomNodes = function() { - // If this widget has directly created DOM nodes, delete them and exit. + // If this widget has directly created DOM nodes, delete them and exit. This assumes that any child widgets are contained within the created DOM nodes, which would normally be the case if(this.domNodes.length > 0) { $tw.utils.each(this.domNodes,function(domNode) { - if(domNode.parentNode) { - domNode.parentNode.removeChild(domNode); - } + domNode.parentNode.removeChild(domNode); }); this.domNodes = []; + } else { + // Otherwise, ask the child widgets to delete their DOM nodes + $tw.utils.each(this.children,function(childWidget) { + childWidget.removeChildDomNodes(); + }); } }; - /* Invoke the action widgets that are descendents of the current widget. */ diff --git a/core/wiki/config/OfficialPluginLibrary.tid b/core/wiki/config/OfficialPluginLibrary.tid index 4aa985b87..c753568bc 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.1/index.html +url: https://tiddlywiki.com/library/v5.3.2/index.html caption: {{$:/language/OfficialPluginLibrary}} {{$:/language/OfficialPluginLibrary/Hint}} diff --git a/core/wiki/macros/toc.tid b/core/wiki/macros/toc.tid index 528c0e63c..a925e7ee5 100644 --- a/core/wiki/macros/toc.tid +++ b/core/wiki/macros/toc.tid @@ -7,7 +7,7 @@ tags: $:/tags/Macro \define toc-caption() \whitespace trim - + <$set name="tv-wikilinks" value="no"> <$transclude field="caption"> <$view field="title"/> @@ -145,7 +145,7 @@ tags: $:/tags/Macro <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
  • >> - <$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}} <$view field='caption'><$view field='title'/>"> + <$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="""<$button class="tc-btn-invisible">{{$:/core/images/blank}}<>"""> <$reveal type="nomatch" stateTitle=<> text="open"> <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> <$transclude tiddler=<> /> diff --git a/editions/prerelease/tiddlers/Release 5.3.1.tid b/editions/prerelease/tiddlers/Release 5.3.2.tid similarity index 56% rename from editions/prerelease/tiddlers/Release 5.3.1.tid rename to editions/prerelease/tiddlers/Release 5.3.2.tid index dcea04fb5..ce4f218c5 100644 --- a/editions/prerelease/tiddlers/Release 5.3.1.tid +++ b/editions/prerelease/tiddlers/Release 5.3.2.tid @@ -1,57 +1,60 @@ -caption: 5.3.1 -created: 20230701133439630 -modified: 20230701133439630 +caption: 5.3.2 +created: 20230820114855583 +modified: 20230820114855583 tags: ReleaseNotes -title: Release 5.3.1 +title: Release 5.3.2 type: text/vnd.tiddlywiki -//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.0...master]]// - -! Overview of v5.3.1 - - -! Plugin Improvements - -* +//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.1...master]]// ! Translation improvement Improvements to the following translations: -* Chinese -* Polish - -! Usability Improvements - * ! Widget Improvements -* - -! Filter improvements - -* +* ! Hackability Improvements -* +* ! Bug Fixes -* +* ! Node.js Improvements -* +* -! Performance Improvements +! Developer 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 """ +AnthonyMuscio +btheado +catter-fly +cmo-pomerium +CrossEye +flibbles +hffqyd +lilscribby +linonetwo +Marxsal +mateuszwilczek +pille1842 +pmario +rmunn +saqimtiaz +stevesunypoly +TiddlyTweeter +twMat +yaisog """>> diff --git a/editions/prerelease/tiddlers/system/PrereleaseLocalPluginLibrary.tid b/editions/prerelease/tiddlers/system/PrereleaseLocalPluginLibrary.tid index a42bdc774..9f3972203 100644 --- a/editions/prerelease/tiddlers/system/PrereleaseLocalPluginLibrary.tid +++ b/editions/prerelease/tiddlers/system/PrereleaseLocalPluginLibrary.tid @@ -1,6 +1,6 @@ title: $:/config/LocalPluginLibrary tags: $:/tags/PluginLibrary -url: http://127.0.0.1:8080/prerelease/library/v5.3.1/index.html +url: http://127.0.0.1:8080/prerelease/library/v5.3.2/index.html caption: {{$:/language/OfficialPluginLibrary}} (Prerelease Local) A locally installed version of the official ~TiddlyWiki plugin library at tiddlywiki.com for testing and debugging. //Requires a local web server to share the library// diff --git a/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid b/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid index 555b81ab6..dfd8a6153 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.1/index.html +url: https://tiddlywiki.com/prerelease/library/v5.3.2/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/TiddlyWiki Pre-release.tid b/editions/prerelease/tiddlers/system/TiddlyWiki Pre-release.tid index 96aee607c..be4e4ff9b 100644 --- a/editions/prerelease/tiddlers/system/TiddlyWiki Pre-release.tid +++ b/editions/prerelease/tiddlers/system/TiddlyWiki Pre-release.tid @@ -1,5 +1,5 @@ title: TiddlyWiki Pre-release -modified: 20150428204930183 +modified: 20230731122156493 This is a pre-release build of TiddlyWiki provided for testing and review purposes. ''Please don't try to depend on the pre-release for anything important'' -- you should use the latest official release from https://tiddlywiki.com. diff --git a/editions/test/tiddlers/tests/data/functions/IndentedFunctions.tid b/editions/test/tiddlers/tests/data/functions/IndentedFunctions.tid new file mode 100644 index 000000000..206a8958e --- /dev/null +++ b/editions/test/tiddlers/tests/data/functions/IndentedFunctions.tid @@ -0,0 +1,24 @@ +title: Functions/Function/Indented +description: Indented function definition +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + + \whitespace trim + \function .dividebysomething(factor:0.5) + [divide] + \end + + \function multiplebysomething(first:ignored,factor:2) + [multiplymultiply[2].dividebysomething[0.25]] + \end + +<$text text={{{ [[4]function[multiplebysomething]] }}}/> +| +<$text text={{{ [[6]function[multiplebysomething],[ignored],[4]] }}}/> + ++ +title: ExpectedResult + +

    64|192

    \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/functions/WikifiedFunctions.tid b/editions/test/tiddlers/tests/data/functions/WikifiedFunctions.tid index 733fbdaef..36b64e4a3 100644 --- a/editions/test/tiddlers/tests/data/functions/WikifiedFunctions.tid +++ b/editions/test/tiddlers/tests/data/functions/WikifiedFunctions.tid @@ -33,4 +33,4 @@ $param$ with a ''buffalo'' + title: ExpectedResult -

    Going to lunch with a ''buffalo''

    Going to breakfastwith abuffalo

    Going to dinner with a buffalo

    Going to lunch with a buffalo with a buffaloGoing to dinner with a buffalo \ No newline at end of file +

    Going to lunch with a ''buffalo''

    Going to breakfastwith abuffalo

    Going to dinner with a buffalo

    Going to lunch with a ''buffalo''Going to breakfastwith abuffaloGoing to dinner with a buffalo \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/procedures/Nested-indented.tid b/editions/test/tiddlers/tests/data/procedures/Nested-indented.tid new file mode 100644 index 000000000..75aaadb4c --- /dev/null +++ b/editions/test/tiddlers/tests/data/procedures/Nested-indented.tid @@ -0,0 +1,20 @@ +title: Procedures/Nested/Indented +description: Nested Procedures that are indented +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\whitespace trim +\procedure alpha(x) + \procedure beta(y) + <$text text=<>/> + \end beta +<$transclude $variable="beta" y={{{ [addprefix] }}}/> +\end alpha + +<> ++ +title: ExpectedResult + +

    ElephantElephant

    \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/procedures/TrailingNewlines.tid b/editions/test/tiddlers/tests/data/procedures/TrailingNewlines.tid new file mode 100644 index 000000000..467235876 --- /dev/null +++ b/editions/test/tiddlers/tests/data/procedures/TrailingNewlines.tid @@ -0,0 +1,22 @@ +title: Procedures/TrailingNewlines +description: Trailing newlines in procedures must not be dropped +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\procedure inner() +Paragraph 1 + +Paragraph 2 +\end +\procedure outer() +<$macrocall $name=inner /> + +\end +<> + ++ +title: ExpectedResult + +

    Paragraph 1

    Paragraph 2

    \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/transclude/CustomWidget-Simple-Indented.tid b/editions/test/tiddlers/tests/data/transclude/CustomWidget-Simple-Indented.tid new file mode 100644 index 000000000..19945e6ea --- /dev/null +++ b/editions/test/tiddlers/tests/data/transclude/CustomWidget-Simple-Indented.tid @@ -0,0 +1,33 @@ +title: Transclude/CustomWidget/Simple/Indented +description: Custom widget definition indented +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\whitespace trim +<$transclude $tiddler='TiddlerOne' one='Ferret'> + ++ +title: TiddlerOne + +\whitespace trim + + \widget $my.widget(one:'Jaguar') + \whitespace trim + <$text text=<>/> + <$slot $name="ts-raw"> + Whale + + \end +<$my.widget one="Dingo"> + Crocodile + +<$my.widget one="BumbleBee"> + Squirrel + +<$my.widget/> ++ +title: ExpectedResult + +

    DingoCrocodileBumbleBeeSquirrelJaguarWhale

    \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/transclude/Parameterised-Shortcut-ParametersIndented.tid b/editions/test/tiddlers/tests/data/transclude/Parameterised-Shortcut-ParametersIndented.tid new file mode 100644 index 000000000..90e9a90aa --- /dev/null +++ b/editions/test/tiddlers/tests/data/transclude/Parameterised-Shortcut-ParametersIndented.tid @@ -0,0 +1,20 @@ +title: Transclude/Parameterised/Shortcut/ParametersIndented +description: Simple parameterised transclusion using the parameters pragma (indented) +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\whitespace trim +<$transclude $tiddler='TiddlerOne' one='Ferret'/> +<$transclude $tiddler='TiddlerOne'/> ++ +title: TiddlerOne + +\whitespace trim + \parameters(one:'Jaguar') +<$text text=<>/> ++ +title: ExpectedResult + +

    FerretJaguar

    \ No newline at end of file diff --git a/editions/test/tiddlers/tests/data/transclude/Procedures-Double-Underscore.tid b/editions/test/tiddlers/tests/data/transclude/Procedures-Double-Underscore.tid new file mode 100644 index 000000000..f22efb4f6 --- /dev/null +++ b/editions/test/tiddlers/tests/data/transclude/Procedures-Double-Underscore.tid @@ -0,0 +1,26 @@ +title: Procedures/Double/Underscore +description: Checking that procedures don't expose parameters as variables wrapped in double underscores +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Output + +\whitespace trim +\procedure mamacro(one:"red",two:"green") +It is $one$ and $two$<<__one__>><<__two__>>. +\end + +<$macrocall $name="mamacro"/> + +<$transclude $variable="mamacro"/> + +<$transclude $variable="mamacro" one="orange"/> + +<$transclude $variable="mamacro" 0="pink"/> + +<$transclude $variable="mamacro" one="purple" 1="pink"/> + ++ +title: ExpectedResult + +

    It is $one$ and $two$.

    It is $one$ and $two$.

    It is $one$ and $two$.

    It is $one$ and $two$.

    It is $one$ and $two$.

    \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/community/resources/TiddlyWiki Posts.tid b/editions/tw5.com/tiddlers/community/resources/TiddlyWiki Posts.tid index 0c3d37cff..c9cbb7e96 100644 --- a/editions/tw5.com/tiddlers/community/resources/TiddlyWiki Posts.tid +++ b/editions/tw5.com/tiddlers/community/resources/TiddlyWiki Posts.tid @@ -1,11 +1,11 @@ created: 20140129085406905 -modified: 20210106151027268 +modified: 20230805140720289 tags: [[Other Resources]] Articles title: "TiddlyWiki Posts" by Jeffrey Kishner type: text/vnd.tiddlywiki -url: http://blog.jeffreykishner.com/tiddlywiki/ +url: https://web.archive.org/web/20221015011644/http://blog.jeffreykishner.com/tiddlywiki/ -A collection of articles covering integration with Fargo, Font Awesome and Google Calendar, and tips for managing task lists. +A collection of articles covering integration with Fargo, Font Awesome and Google Calendar, and tips for managing task lists. The original site is missing, but a link to an archive is provided. {{!!url}} diff --git a/editions/tw5.com/tiddlers/community/tutorials/GitHub Saver Tutorial by Mohammad.tid b/editions/tw5.com/tiddlers/community/tutorials/GitHub Saver Tutorial by Mohammad.tid index 4f4e39c4e..a9063d996 100644 --- a/editions/tw5.com/tiddlers/community/tutorials/GitHub Saver Tutorial by Mohammad.tid +++ b/editions/tw5.com/tiddlers/community/tutorials/GitHub Saver Tutorial by Mohammad.tid @@ -1,11 +1,11 @@ created: 20201117163027900 -modified: 20210106151027459 +modified: 20230723074506632 tags: Tutorials title: GitHub Saver Tutorial by Mohammad type: text/vnd.tiddlywiki url: https://kookma.github.io/TW5-GitHub-Saver/ -GitHub Saver is a step by step tutorial shows how to integrate Tiddlywiki 5 and GitHub Pages to create websites hosted on https://github.com/. +GitHub Saver is a step by step tutorial that shows how to integrate Tiddlywiki 5 and ~GitHub Pages to create websites hosted on https://github.com/. {{!!url}} @@ -13,11 +13,11 @@ This instruction is based on Tiddlywiki single html file model, while it can use !! Other tutorials -;Tiddlywiki, Travis-CI and GitHub Pages +;Tiddlywiki, Travis-CI and ~GitHub Pages :https://kookma.github.io/Tiddlywiki-Travis-CI/ :This wiki shows how to set up websites hosted on [[GitHub Pages|https://pages.github.com/]] using [[Travis-CI|https://travis-ci.org]] and [[Tiddlywiki 5|https://tiddlywiki.com]] on Node.js. -;Tiddlywiki and GitHub Pages +;Tiddlywiki and ~GitHub Pages :https://kookma.github.io/Tiddlywiki-and-GitHub-Pages/ -:This instruction is based on local edit, save and push to GitHub. It does NOT use the new GitHub Saver mechanism (requires TW 5.1.20+) which lets edit and save directly from Tiddlywiki! \ No newline at end of file +:This instruction is based on local edit, save and push to ~GitHub. It does NOT use the new ~GitHub Saver mechanism (requires TW 5.1.20+) which lets edit and save directly from Tiddlywiki! \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/definitions/Git.tid b/editions/tw5.com/tiddlers/definitions/Git.tid new file mode 100644 index 000000000..41e3711fc --- /dev/null +++ b/editions/tw5.com/tiddlers/definitions/Git.tid @@ -0,0 +1,9 @@ +created: 20230723073000469 +modified: 20230723073046462 +tags: Definitions +title: Git +type: text/vnd.tiddlywiki + +>Git (/ɡɪt/) is a distributed version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows (thousands of parallel branches running on different computers). +> +>https://en.wikipedia.org/wiki/Git diff --git a/editions/tw5.com/tiddlers/definitions/GitHub.tid b/editions/tw5.com/tiddlers/definitions/GitHub.tid index 16ab4fd36..06b24c710 100644 --- a/editions/tw5.com/tiddlers/definitions/GitHub.tid +++ b/editions/tw5.com/tiddlers/definitions/GitHub.tid @@ -1,13 +1,15 @@ created: 20140910212609354 -modified: 20190408173002622 +modified: 20230723074351846 tags: Definitions title: GitHub type: text/vnd.tiddlywiki -GitHub is a hosting service for distributed projects that use git as their version-control system. It allows free hosting and management of open-source projects and facilitates collaborative development on the source code. Using GitHub for non-open-source endeavours requires additional fees. +GitHub is a hosting service for distributed projects that use git as their version-control system. It allows free hosting and management of open-source projects and facilitates collaborative development on the source code. Using ~GitHub for non-open-source endeavours requires additional fees. -The code and documentation of TiddlyWiki is hosted on GitHub at: +The code and documentation of TiddlyWiki is hosted on ~GitHub at: https://github.com/Jermolene/TiddlyWiki5 -GitHub also offer a free web hosting service called [[GitHub Pages|https://pages.github.com/]] that can be used directly from the single file configuration. See [[Saving to a Git service]]. +~GitHub also offer a free web hosting service called [[GitHub Pages|https://pages.github.com/]] that can be used directly from the single file configuration. See [[Saving to a Git service]]. + +An alternative to ~GitHub is GitLab \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/definitions/GitLab.tid b/editions/tw5.com/tiddlers/definitions/GitLab.tid new file mode 100644 index 000000000..a0f031f6a --- /dev/null +++ b/editions/tw5.com/tiddlers/definitions/GitLab.tid @@ -0,0 +1,13 @@ +created: 20230723072527781 +modified: 20230723073955715 +tags: Definitions +title: GitLab +type: text/vnd.tiddlywiki + +>GitLab Inc. is an open-core company that operates ~GitLab, a ~DevOps software package which can develop, secure, and operate software. The open source software project was created by Ukrainian developer Dmytro Zaporozhets and Dutch developer Sytse Sijbrandij +> +>https://en.wikipedia.org/wiki/GitLab + +Both GitLab and GitHub use [[Git]] a distributed version control system, that can be used to store, view and edit TiddlyWiki wikis using [[GitLab Pages|https://docs.gitlab.com/ee/user/project/pages/]] + +Learn more at: [[Saving to a Git service]] diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid index dd9d0b78f..cdd9850d8 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid @@ -1,6 +1,8 @@ +caption: Fourth-Caption created: 20150221194405000 modified: 20211114013601188 tags: Contents [[Table-of-Contents Demonstrations]] title: Fourth +type: text/vnd.tiddlywiki <<.toc-lorem>> diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid index be826c19b..c7fdf343b 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid @@ -2,5 +2,15 @@ created: 20150221194423000 modified: 20211114013601189 tags: SecondThree [[Table-of-Contents Demonstrations]] title: SecondThreeThree +toc-link: no +type: text/vnd.tiddlywiki + +''Important'' + +It's important that this tiddler has no "child" to be able to visually test every possible toc code-path. + +* This tiddler has a field ''toc-link: no'' +* Do not tag any other tiddler with the title of this one + + -<<.toc-lorem>> diff --git a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid index f8a51f8d2..7e2c7c7e1 100644 --- a/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid +++ b/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid @@ -1,7 +1,9 @@ +caption: Third-Caption created: 20150221194436000 list: ThirdOne ThirdTwo ThirdThree modified: 20211114013601191 tags: Contents [[Table-of-Contents Demonstrations]] title: Third +type: text/vnd.tiddlywiki <<.toc-lorem>> diff --git a/editions/tw5.com/tiddlers/filters/substitute Operator.tid b/editions/tw5.com/tiddlers/filters/substitute Operator.tid index 85da915da..c7f98384e 100644 --- a/editions/tw5.com/tiddlers/filters/substitute Operator.tid +++ b/editions/tw5.com/tiddlers/filters/substitute Operator.tid @@ -18,9 +18,9 @@ The <<.op substitute>> operator replaces any placeholders in the input titles in # variables |placeholder syntax|description|h -|`$n$`|Text substitution of a parameter provided to the operator, where n is the position of the parameter starting with 1 for the first parameter. Unmatched placeholders pass through unchanged.| -|`$(varname)$`|Text substitution of a variable. Undefined variables are replaced with an empty string.| -|`${ filter expression }$`|Text substitution with the first result of evaluating the filter expression. | +|`$n$`|Text substitution of a parameter provided to the operator, where n is the position of the parameter starting with 1 for the first parameter. Unmatched placeholders pass through unchanged. | +|`$(varname)$`|Text substitution of a variable. Undefined variables are replaced with an empty string. | +|`${ filter expression }$`|Text substitution of the first result of evaluating a filter expression. In other words, if the filter returns multiple titles only the first one will be used. | <<.tip """Placeholders that contain square bracket characters are not valid filter syntax when used directly in a filter expression. However they can be provided as input to the <$macrocall $name=".op" _="substitute"/> operator as text references or variables""">> diff --git a/editions/tw5.com/tiddlers/hellothere/HelloThere.tid b/editions/tw5.com/tiddlers/hellothere/HelloThere.tid index 0fba0a32b..89967fe80 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: 20230701123439630 +modified: 20230820112855583 tags: TableOfContents title: HelloThere type: text/vnd.tiddlywiki diff --git a/editions/tw5.com/tiddlers/images/New Release Banner.png b/editions/tw5.com/tiddlers/images/New Release Banner.png index 17925343e..daa1db094 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/TagMacro.tid b/editions/tw5.com/tiddlers/macros/TagMacro.tid index 7a7beb0bc..eda75dcb9 100644 --- a/editions/tw5.com/tiddlers/macros/TagMacro.tid +++ b/editions/tw5.com/tiddlers/macros/TagMacro.tid @@ -1,12 +1,14 @@ caption: tag created: 20141206130540337 -modified: 20150221224326000 +modified: 20230725201240201 tags: Macros [[Core Macros]] title: tag Macro type: text/vnd.tiddlywiki The <<.def tag>> [[macro|Macros]] generates a tag pill for a specified tag. Clicking the tag pill opens a dropdown. This can be compared to the [[tag-pill Macro]] which also features other parameters. +<<.tip """If a [[list widget|ListWidget]] generates multiple tag macros for the same tag, clicking on one of them will open dropdowns on all of them. The simplest way to prevent this is to add the `counter="transclusion"` attribute to the list widget. See the examples below for more details.""">> + !! Parameters ;tag diff --git a/editions/tw5.com/tiddlers/macros/examples/tag.tid b/editions/tw5.com/tiddlers/macros/examples/tag.tid index 915c175e5..103a5eab7 100644 --- a/editions/tw5.com/tiddlers/macros/examples/tag.tid +++ b/editions/tw5.com/tiddlers/macros/examples/tag.tid @@ -1,8 +1,29 @@ created: 20150221211317000 -modified: 20150221224519000 +modified: 20230725203751870 tags: [[tag Macro]] [[Macro Examples]] title: tag Macro (Examples) type: text/vnd.tiddlywiki <$macrocall $name=".example" n="1" eg="""<>"""/> <$macrocall $name=".example" n="2" eg="""<>"""/> + +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]]"> + +* <$link/> is tagged with: <$list filter="[tags[]]"> <> + +"""/> + +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"> + +* <$link/> is tagged with: <$list filter="[tags[]]"> <> + +"""/> + +A slightly more performant option is to use the `variable="transclusion"` attribute in the list widget. In this case, the variable `<>` has to be used inside the list widget instead of the `<>` . +<$macrocall $name=".example" n="5" eg="""<$list filter="[tag[HelloThere]]" variable="transclusion"> + +* <$link to=<>/> is tagged with: <$list filter="[tags[]]"> <> + +"""/> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-close-window.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-close-window.tid index 739efb192..07b69e5b9 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-close-window.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-close-window.tid @@ -1,6 +1,6 @@ caption: tm-open-window created: 20220228140417116 -modified: 20220409092811188 +modified: 20230723220539648 tags: Messages title: WidgetMessage: tm-close-window type: text/vnd.tiddlywiki @@ -29,7 +29,7 @@ src=""" width="400" height="500" windowID="window1" - something="I just in over in a variable, and boy is my Hashmap tired." /> + something="I just flew in on a variable, and boy is my Hashmap tired." /> <$button>Close Window <$action-sendmessage diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-download-file.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-download-file.tid index 128966501..e80c1aba8 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-download-file.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-download-file.tid @@ -1,15 +1,15 @@ +caption: tm-download-file created: 20140811112201235 -modified: 20220123141646321 +modified: 20230723214745520 tags: Messages title: WidgetMessage: tm-download-file type: text/vnd.tiddlywiki -caption: tm-download-file The download file message causes the current saver module to prompt the user to download the result of parsing a specified template tiddler as a file. It requires the following properties on the `event` object: |!Name |!Description | |param |Title of a tiddler to use as a template for the new tiddler | -|paramObject |Optional hashmap of variable values to use for the rendering | +|//{any other params}// |Any other parameters are made available as variables within the context of the widget message. | The following variable names have special behaviour: diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-bitmap-operation.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-bitmap-operation.tid index e8df75efd..edbc5ce5d 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-bitmap-operation.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-bitmap-operation.tid @@ -1,6 +1,6 @@ caption: tm-edit-bitmap-operation created: 20160424204236050 -modified: 20160424215219517 +modified: 20230723214716576 tags: Messages title: WidgetMessage: tm-edit-bitmap-operation type: text/vnd.tiddlywiki @@ -30,12 +30,12 @@ Clears the contents of the image and fills it with a solid colour. Parameters in \end - A `tm-edit-bitmap-operation` invokes one of the available operations on a __surrounding__ bitmap editor. Therefore the message has to be dispatched within the editor in order for it to catch it. The following properties on the `event` object are required: |!Name |!Description | |param |Name of the operation to be executed, see ''below'' for a list of possible operations | -|paramObject| Hashmap of additional parameters required by the operation top be executed | +|//{any other params}// |Any other parameters are made available as variables within the context of the widget message. | + The `tm-edit-bitmap-operation` message is usually generated by a ButtonWidget or an ActionWidget and is handled by the surrounding bitmap editor. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid index 9737c3b24..a34fe3fc0 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid @@ -1,6 +1,6 @@ caption: tm-edit-text-operation created: 20160424211339792 -modified: 20210520053923011 +modified: 20230723214636245 tags: Messages title: WidgetMessage: tm-edit-text-operation type: text/vnd.tiddlywiki @@ -121,7 +121,7 @@ A `tm-edit-text-operation` invokes one of the available operations on a __surrou |!Name |!Description | |param |Name of the operation to be executed, see ''below'' for a list of possible operations | -|paramObject|Hashmap of additional parameters required by the operation top be executed | +|//{any other params}// |Any other parameters are made available as variables within the context of the widget message. | The `tm-edit-text-operation` message is usually generated by a ButtonWidget or an ActionWidget and is handled by the surrounding text editor. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-focus-selector.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-focus-selector.tid index 1b33502ed..c041e15dc 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-focus-selector.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-focus-selector.tid @@ -1,6 +1,6 @@ caption: tm-focus-selector created: 20190628162542132 -modified: 20190628162542132 +modified: 20230723215122038 tags: Messages title: WidgetMessage: tm-focus-selector type: text/vnd.tiddlywiki @@ -9,6 +9,6 @@ The `tm-focus-selector` message sets the focus to the DOM element identified by |!Name |!Description | |param |Selector identifying the DOM element to be focussed | -|paramObject |Optional hashmap of additional parameters to be passed to the [[focus()|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus]] method | +|//{any other params}// |Any other parameters to be passed to the [[focus()|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus]] method as variables.| <<.tip """Use preventScroll="true" to prevent the browser from scrolling to the focused element""">> 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 8a6280fd8..958c31bae 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 @@ -57,6 +57,8 @@ tags: $:/tags/Global This demo uses the API of the website https://random.dog/ to import a random dog image or video. +//Note that the images and videos can be quite large, so this demo is not recommended to be used over mobile data connections.// + <$button actions=<>> Import a random dog image or video @@ -80,7 +82,7 @@ Export all imported random dogs: <$macrocall $name="exportButton" exportFilter=" <$link> <$text text=<>/> -
    +
    <$transclude $tiddler=<>/>
  • 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 9c441c524..e370ad72c 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid @@ -1,6 +1,6 @@ caption: tm-http-request created: 20230429161453032 -modified: 20230717104212742 +modified: 20230723215344887 tags: Messages title: WidgetMessage: tm-http-request type: text/vnd.tiddlywiki @@ -11,7 +11,7 @@ It uses the following properties on the `event` object: |!Name |!Description | |param |Not used | -|paramObject |Hashmap of parameters (see below) | +|//{any other params}// |Any other parameters are made available as variables within the context of the widget message. See below. | The following parameters are used: @@ -50,4 +50,4 @@ Note that the state tiddler $:/state/http-requests contains a number representin !! Examples * [[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 Dogs]] +* [[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]] diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-modal.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-modal.tid index 9b459fb7b..158bb7878 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-modal.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-modal.tid @@ -1,13 +1,13 @@ caption: tm-modal created: 20140811112133701 -modified: 20201117081247738 +modified: 20230723215434712 tags: Messages title: WidgetMessage: tm-modal type: text/vnd.tiddlywiki |!Name |!Description | |param |Title of the tiddler to be displayed | -|paramObject |Hashmap of variables to be provided to the modal, contains all extra parameters passed to the widget sending the message. | +|//{any other params}// |Any other parameters are made available as variables within the context of the widget message. | |rootwindow |<<.from-version 5.1.18>> ''yes'' or ''true'' will always display a modal in the wiki-root-window | The modal message is usually generated with the ButtonWidget. The modal message is handled by the TiddlyWiki core. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid index d435d5f4f..c487f015f 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid @@ -1,6 +1,6 @@ caption: tm-new-tiddler created: 20140226194405353 -modified: 20220521143507491 +modified: 20230723215831560 tags: Messages navigator-message title: WidgetMessage: tm-new-tiddler type: text/vnd.tiddlywiki @@ -9,12 +9,12 @@ The new tiddler message creates a new draft tiddler and adds it to the current s |!Name |!Description | |param |The optional title of a tiddler to use as a template for the new tiddler | -|paramObject |Optional hashmap of additional tiddler fields | +|//{any other params}// |The names and values of additional tiddler fields. | |navigateFromTitle |Title of the tiddler from which the navigation to the new tiddler was initiated | The title for the draft tiddler is chosen according to these rules: -* If a hashmap was used and a title field was specified, use that title +* If additional parameters were used and a title field was specified, use that title * If a template tiddler was used, use the title of the template tiddler, making it unique with a numeric suffix * Otherwise, generate a new title based on the default new tiddler title with a numeric suffix to make it unique diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-notify.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-notify.tid index f44839f45..b64f4a573 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-notify.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-notify.tid @@ -1,14 +1,14 @@ +caption: tm-notify created: 20140811112304772 -modified: 20160701140248738 +modified: 20230723220728382 tags: Messages title: WidgetMessage: tm-notify type: text/vnd.tiddlywiki -caption: tm-notify The notify message briefly displays a specified tiddler as a small alert in the upper right corner of the page. It requires the following properties on the `event` object: |!Name |!Description | |param |Title of the tiddler to be displayed | -|paramObject |Hashmap of variables to be provided to the notification | +|//{any other params}// |Any other parameters are made available as variables to the notify message. | The notify message is handled by the TiddlyWiki core. diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-external-window.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-external-window.tid index 960f94f2f..4e868312c 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-external-window.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-external-window.tid @@ -1,6 +1,6 @@ caption: tm-open-external-window -created: 201701211823 -modified: 201701211825 +created: 20170121182300000 +modified: 20230723220850135 tags: Messages title: WidgetMessage: tm-open-external-window type: text/vnd.tiddlywiki @@ -11,7 +11,8 @@ The `tm-open-external-window` message opens an external link eg: "https://tiddly |!Name |!Description | |param |URL of the tiddler to be opened in a new browser window, defaults to the [[TiddlyWiki help|https://tiddlywiki.com/#WidgetMessage%3A%20tm-open-external-window if empty]] | -|paramObject |Optional: Hashmap of variables that will be provided to the window. see below | +|//{any other params}// |Any other parameters are made available as variables to the window. See below. | + ''parmObject'' diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-save-wiki.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-save-wiki.tid index 605ee37e8..701caa4f2 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-save-wiki.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-save-wiki.tid @@ -1,15 +1,15 @@ +caption: tm-save-wiki created: 20140811112325641 -modified: 20141110133723696 +modified: 20230723220944427 tags: Messages title: WidgetMessage: tm-save-wiki type: text/vnd.tiddlywiki -caption: tm-save-wiki The save wiki message causes the current saver module to perform a full save operation. The save operation can involve user interaction. It requires the following properties on the `event` object: |!Name |!Description | |param |Title of a tiddler to use as a template for rendering the wiki (defaults to `$:/core/save/all`) | -|paramObject |Optional hashmap of variable values to use for the rendering | +|//{any other params}// |Any other parameters are made available as variables to use for the rendering. | The save wiki message is usually generated by the ButtonWidget. diff --git a/editions/tw5.com/tiddlers/pragmas/Pragma_ _procedure.tid b/editions/tw5.com/tiddlers/pragmas/Pragma_ _procedure.tid index 076d26687..06b0251d5 100644 --- a/editions/tw5.com/tiddlers/pragmas/Pragma_ _procedure.tid +++ b/editions/tw5.com/tiddlers/pragmas/Pragma_ _procedure.tid @@ -1,5 +1,5 @@ created: 20221007132845007 -modified: 20230518152756112 +modified: 20230724184009153 tags: Pragmas title: Pragma: \procedure type: text/vnd.tiddlywiki @@ -19,7 +19,7 @@ Note that the `\end` marker can optionally specify the name of the procedure to There is also a single line form for shorter procedures: ``` -\define ([:],[:]...) +\procedure ([:],[:]...) ``` The first line of the definition specifies the procedure name and any parameters. Each parameter has a name and, optionally, a default value that is used if no value is supplied on a particular call to the procedure. The lines that follow contain the text of the procedure text (i.e. the snippet represented by the procedure name), until `\end` appears on a line by itself: diff --git a/editions/tw5.com/tiddlers/pragmas/Pragma_ _rules.tid b/editions/tw5.com/tiddlers/pragmas/Pragma_ _rules.tid index 799c9b71c..56aa4d665 100644 --- a/editions/tw5.com/tiddlers/pragmas/Pragma_ _rules.tid +++ b/editions/tw5.com/tiddlers/pragmas/Pragma_ _rules.tid @@ -1,5 +1,5 @@ created: 20220917112931273 -modified: 20230419103154329 +modified: 20230724184044642 tags: Pragmas title: Pragma: \rules type: text/vnd.tiddlywiki @@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki The ''\rules'' [[pragma|Pragmas]] adjusts the set of parser rules used to parse the remaining text. ``` -\rules only|expect +\rules only|except ``` The list of available parser rules can be consulted in $:/ControlPanel -> Info -> Advanced -> Parsing. diff --git a/editions/tw5.com/tiddlers/pragmas/Pragmas.tid b/editions/tw5.com/tiddlers/pragmas/Pragmas.tid index 46981c51e..0f18df7b6 100644 --- a/editions/tw5.com/tiddlers/pragmas/Pragmas.tid +++ b/editions/tw5.com/tiddlers/pragmas/Pragmas.tid @@ -1,5 +1,5 @@ created: 20220917112416666 -modified: 20230419103154329 +modified: 20230721064409436 tags: Concepts [[WikiText Parser Modes]] title: Pragmas type: text/vnd.tiddlywiki @@ -8,6 +8,8 @@ A <<.def pragma>> is a special component of WikiText that provides control over Pragmas occupy lines that start with `\`. They can only appear at the start of the text of a tiddler, but blank lines and comments are allowed between them. If a pragma appears in the main body of the text, it is treated as if it was ordinary text. +<<.from-version "5.2.6">> Pragmas can have preceding optional whitespace characters. + The following pragmas are available: <> diff --git a/editions/tw5.com/tiddlers/procedures/Procedure Definitions.tid b/editions/tw5.com/tiddlers/procedures/Procedure Definitions.tid index 0c9741c7e..aa6d37a72 100644 --- a/editions/tw5.com/tiddlers/procedures/Procedure Definitions.tid +++ b/editions/tw5.com/tiddlers/procedures/Procedure Definitions.tid @@ -13,7 +13,7 @@ This tiddler describes the different ways in which [[Procedures|Procedures]] can Procedures are created using the [[Pragma: \procedure]] at the start of a tiddler. The definitions are available in the rest of the tiddler that defines them, plus any tiddlers that it transcludes. ``` -\define my-procedure(param) +\procedure my-procedure(param) This is the procedure text (param=<>) \end ``` diff --git a/editions/tw5.com/tiddlers/releasenotes/Release 5.3.1.tid b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.1.tid new file mode 100644 index 000000000..b4c326125 --- /dev/null +++ b/editions/tw5.com/tiddlers/releasenotes/Release 5.3.1.tid @@ -0,0 +1,86 @@ +caption: 5.3.1 +created: 20230820112855583 +modified: 20230820112855583 +released: 20230820112855583 +tags: ReleaseNotes +title: Release 5.3.1 +type: text/vnd.tiddlywiki + +//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.0...v5.3.1]]// + +<<.banner-credits + credit:"""Congratulations to [[vilc|https://talk.tiddlywiki.org/u/vilc]] 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-0/7406/10]]). +""" + url:"https://github.com/Jermolene/TiddlyWiki5/blob/4124bbdfb3e2445d45488006dfff1925d067ab0f/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png?raw=true" +>> + +! Overview of v5.3.1 + +This release comes only a few weeks after [[v5.3.0|Release 5.3.0]]. The motivation for the release is to swiftly fix some issues that have emerged with v5.3.0. There are also some other improvements included in this release, notably the ability to access binary resources over HTTP -- the [[demo|WidgetMessage: tm-http-request Example - Random Dog]] downloads a random image or video of a dog. + +! Bug Fixes and Reversions of v5.3.0 Changes + +* Reverted adding the `widget.destroy()` method because of performance concerns (see https://github.com/Jermolene/TiddlyWiki5/pull/7468) +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7647">> inefficiency when transcluding with the ''$output'' attribute set to `text/plain` that manifested itself as extremely slow export times +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7648">> unwanted error message "Global assignment is not allowed within modules on node" + +! Translation improvement + +Improvements to the following translations: + +* Chinese +* Polish + +! Widget Improvements + +* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7594">> ''tabindex'' attribute to SelectWidget + +! Hackability Improvements + +* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7611">> ImportVariablesWidget and [[Pragma: \import]] to trim whitespace when parsing tiddlers +* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/9b2af1359614f4ad5afd05be7cf9853909334592">> [[WidgetMessage: tm-http-request]] to handle binary responses ([[demo|WidgetMessage: tm-http-request Example - Random Dog]]) + +! Bug Fixes + +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7627">> table of contents indentation +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7595">> bindStatus and bindProgress parameters of [[WidgetMessage: tm-http-request]] +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7606">> attribute substitution to handle variables containing non-word characters +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7624">> the pragmas introduced in v5.3.0 so that they can be indented with whitespace +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7619">> size of tiddler icons +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7622">> drag and drop from Chrome-like browsers to Firefox +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7679">> listIndex mode of checkbox widgets + +! Node.js Improvements + +* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7645">> console reporting of ~JavaScript errors + +! Developer Improvements + +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/6c7c21a87bdb0d8a00df1c14eea18912164e0b57">> overeager onload handler in Jasmine plugin +* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/08bad90e51c45233a196333e101bbbf6ecf702ce">> ordering of shadow tiddler listings to not reflect order of insertion + +! 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 """ +AnthonyMuscio +btheado +catter-fly +cmo-pomerium +CrossEye +flibbles +hffqyd +lilscribby +linonetwo +Marxsal +mateuszwilczek +pille1842 +pmario +rmunn +saqimtiaz +stevesunypoly +TiddlyTweeter +twMat +yaisog +""">> diff --git a/editions/tw5.com/tiddlers/Saving on Browser with TiddlyStow.tid b/editions/tw5.com/tiddlers/saving/Saving on Browser with TiddlyStow.tid similarity index 92% rename from editions/tw5.com/tiddlers/Saving on Browser with TiddlyStow.tid rename to editions/tw5.com/tiddlers/saving/Saving on Browser with TiddlyStow.tid index 870936ffc..5823ca30d 100644 --- a/editions/tw5.com/tiddlers/Saving on Browser with TiddlyStow.tid +++ b/editions/tw5.com/tiddlers/saving/Saving on Browser with TiddlyStow.tid @@ -1,4 +1,4 @@ -caption: TiddlyStow (experimental) +caption: ~TiddlyStow (experimental) color: #FF8A65 created: 20230403170650008 delivery: Saver @@ -13,4 +13,4 @@ url: https://github.com/btheado/tiddlystow ''Link:'' {{!!url}} Tiddlystow saves TiddlyWiki files locally using the browser file system API (Chrome-based browsers currently). -This is a simple web page for loading a local TiddlyWiki file and storing it back to the same local file requiring no plugins or extensions. \ No newline at end of file +This is a simple web page for loading a local TiddlyWiki file and storing it back to the same local file requiring no plugins or extensions. diff --git a/editions/tw5.com/tiddlers/saving/Saving to a Git service.tid b/editions/tw5.com/tiddlers/saving/Saving to a Git service.tid index 113e2aa8b..b646a38bb 100644 --- a/editions/tw5.com/tiddlers/saving/Saving to a Git service.tid +++ b/editions/tw5.com/tiddlers/saving/Saving to a Git service.tid @@ -4,7 +4,7 @@ created: 20190408173002622 delivery: Service description: Save changes directly to a Git repository (on GitHub, GitLab) method: save -modified: 20200507203007684 +modified: 20230723074211772 tags: Android Chrome Firefox [[Internet Explorer]] Linux Mac Opera Safari Saving Windows iOS Edge title: Saving to a Git service type: text/vnd.tiddlywiki @@ -24,3 +24,7 @@ Saving to a Git service is configured in the [[$:/ControlPanel]] in the ''Git Se Notes * The Git service token or password is stored persistently in browser local storage. Be sure to clear the password if using a shared machine. Using a personal access token for authentication offers an extra layer of security: if the access token is accidentally exposed it can be revoked without needing to reset the account password + +--- + +For a more detailed info about the ~GitHub saver see: [[GitHub Saver Tutorial by Mohammad]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/saving/Saving via a Minimal Web Server.tid b/editions/tw5.com/tiddlers/saving/Saving via a Minimal Web Server.tid index 5bbf79485..a625627be 100644 --- a/editions/tw5.com/tiddlers/saving/Saving via a Minimal Web Server.tid +++ b/editions/tw5.com/tiddlers/saving/Saving via a Minimal Web Server.tid @@ -1,4 +1,4 @@ -caption: tw5-server +caption: tw5server color: #70c9a0 community-author: hffqyd created: 20230302011710789 @@ -10,27 +10,23 @@ tags: Android Chrome Firefox [[Internet Explorer]] Linux Mac Opera Safari Saving title: Saving via a Minimal Web Server type: text/vnd.tiddlywiki -A local server for TiddlyWiki5 that saves and backups wikis, inspired by +A local mini binary server for TiddlyWiki5 that saves and backups wikis and uploads files for TiddlyWiki, inspired by [[tw5-server.rb | https://gist.github.com/jimfoltz/ee791c1bdd30ce137bc23cce826096da]]. -tw5-server provides features of: +tw5server provides features of: * Server for TiddlyWiki5, as well as other files (e.g. images used in TW5 `[img[images/*.png]]`); * Easy to save wiki via browsers; * Backup wiki in compress format (.gz), to save disk space; * Auto clean backups: keep one newest per previous month, keep all backups in current month. -* Upload files/images to server, for use in tiddlywiki as external links. -* Offer binary executable for Linux, macos and windows. +* Upload files/images to server via pressing button or drag-and-drop, for use in tiddlywiki as external links. +* Offer binary executable for Linux, macos, Android and windows. -Download executable script and binary at the github.com [[tw5-server|https://github.com/hffqyd/tw5-server]]. +Download executable binary at the github.com [[tw5-server|https://github.com/hffqyd/tw5-server]]. ! Usage ```bash -# python script: -python tw5-server.py -p 8000 -d ./ -b backup_dir - -# binary file: tw5server -a:192.168.0.10 -p:8000 -d:./ -b:backup -h usage help @@ -44,6 +40,7 @@ Backups auto-clean strategy: Keep all backups in current month, keep only the newest one for previous months. ``` -In Unix/Linux, just excute `./tw5-server.py` (with `chmod +x tw5-server.py`). +In Unix/Linux, maybe first `chmod +x tw5server`), then run it. +For Android version, run it in Termux, or some other terminals. Then go to http://localhost:8000 (or other address:port specified in command) in your web browser, and click on your wiki html file. diff --git a/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_Macro.tid b/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_Macro.tid index 6eaa005ab..d6433b45c 100644 --- a/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_Macro.tid +++ b/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_Macro.tid @@ -6,4 +6,4 @@ tags: SystemTags title: SystemTag: $:/tags/Macro type: text/vnd.tiddlywiki -The [[system tag|SystemTags]] `$:/tags/Macro` marks global macros. It is now deprecated in favour of [[SystemTag $:/tags/Global]]. \ No newline at end of file +The [[system tag|SystemTags]] `$:/tags/Macro` marks global macros. It is now deprecated in favour of [[SystemTag: $:/tags/Global]]. diff --git a/editions/tw5.com/tiddlers/variables/Behaviour of invoked variables depends on how the variable was declared.tid b/editions/tw5.com/tiddlers/variables/Behaviour of invoked variables depends on how the variable was declared.tid new file mode 100644 index 000000000..319bf2c78 --- /dev/null +++ b/editions/tw5.com/tiddlers/variables/Behaviour of invoked variables depends on how the variable was declared.tid @@ -0,0 +1,52 @@ +created: 20230726145210484 +modified: 20230726145757234 +tags: [[Variable Usage]] +title: Behaviour of invoked variables depends on how the variable was declared +type: text/vnd.tiddlywiki + +\define m1(a1) $a1$ - <<__a1__>> - <> +\procedure p1(a1) $a1$ - <<__a1__>> - <> +\function f1(a1) "$a1$" "-" [<__a1__>] ="-" [] :and[join[ ]] + +Invoked in normal wikitext context: `<$transclude $variable=macro/>` or `<>` + +{{Behaviour of variables invoked via normal wikitext}} + +Invoked via widget attribute: `
    >/>` + +{{Behaviour of variables invoked via widget attributes}} + +Invoked via filter operator parameter: `[]` + +{{Behaviour of variables invoked via filter operator parameter}} + +Invoked via function call in a filter expression: `[function[macro]]` + +{{Behaviour of variables invoked via filter expression function call}} + +!! Examples + +Below is an example macro, procedure and function definition. All three forms of parameter substitution `$a1$`, `<<__a1__>>`, and `<>` are included in each definition. The output helps illustrate when each form of substitution will or will not have affect. + +``` +\define m1(a1) $a1$ - <<__a1__>> - <> +\procedure p1(a1) $a1$ - <<__a1__>> - <> +\function f1(a1) $a1$ "-" [<__a1__>] ="-" [] :and[join[ ]] +``` + +| !Variable transclusion|!output | +| `<>`|<>| +| `<>`|<>| +| `<>`|<>| +| !Widget attribute|!output | +| `<$text text=<>/>`|<$text text=<>/>| +| `<$text text=<>/>`|<$text text=<>/>| +| `<$text text=<>/>`|<$text text=<>/>| +| !Filter operator parameter|!output | +| `[]`|<$text text={{{[]}}}/>| +| `[]`|<$text text={{{[]}}}/>| +| `[]`|<$text text={{{[]}}}/>| +| !Function call in filter expression|!output | +| `[function[m1],[foo]]`|<$text text={{{[function[m1],[foo]]}}}/>| +| `[function[p1],[foo]]`|<$text text={{{[function[p1],[foo]]}}}/>| +| `[function[f1],[foo]]`|<$text text={{{[function[f1],[foo]]}}}/>| \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via filter expression function call.tid b/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via filter expression function call.tid new file mode 100644 index 000000000..52d44c9fd --- /dev/null +++ b/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via filter expression function call.tid @@ -0,0 +1,10 @@ +created: 20230726143929233 +modified: 20230726150604831 +tags: [[Variable Usage]] +title: Behaviour of variables invoked via filter expression function call +type: text/vnd.tiddlywiki + +|tc-first-col-min-width|k +|!how declared|!behaviour| +|\define, <<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Every function is a variable, but only variables defined using \function are invokable using the <<.olink function>> filter operator. Attempts to use a non-function variable is the same as if the function doesn't exist. The behavior in this case is like the identity function. All filter input is passed unchanged to the output.| +|\function|The body text of the function is treated as a filter expression and evaluated. This filter expression can itself contain a function call. Filter expressions can be factored out into functions arbitrarily deep.| \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via filter operator parameter.tid b/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via filter operator parameter.tid new file mode 100644 index 000000000..8c652488b --- /dev/null +++ b/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via filter operator parameter.tid @@ -0,0 +1,11 @@ +created: 20230726143617389 +modified: 20230726150625716 +tags: [[Variable Usage]] +title: Behaviour of variables invoked via filter operator parameter +type: text/vnd.tiddlywiki + +|tc-first-col-min-width|k +|!how declared|!behaviour| +|\define|Textual substitution of parameters is performed on the body text. No further processing takes place. The result after textual substitution is used as the filter operator's parameter.| +|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Body text is retrieved as-is and used as the filter operator's parameter.| +|\function|The body text of the function is treated as a filter expression and evaluated. The first result is passed to the operator as a parameter. The remaining results are discarded.| \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via normal wikitext.tid b/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via normal wikitext.tid new file mode 100644 index 000000000..0caa74c26 --- /dev/null +++ b/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via normal wikitext.tid @@ -0,0 +1,11 @@ +created: 20230726142925020 +modified: 20230726150648189 +tags: [[Variable Usage]] +title: Behaviour of variables invoked via normal wikitext +type: text/vnd.tiddlywiki + +|tc-first-col-min-width|k +|!how declared|!behaviour| +|\define|All wikitext and variable substitution and textual substitution takes place| +|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|All wikitext and variable substitution takes place| +|\function|Invoking a function in this way (`<>`) is a synonym for `<$text text={{{[function[macro]]}}}/>`. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded| \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via widget attributes.tid b/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via widget attributes.tid new file mode 100644 index 000000000..3bf06e219 --- /dev/null +++ b/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via widget attributes.tid @@ -0,0 +1,11 @@ +created: 20230726143332803 +modified: 20230726150616232 +tags: [[Variable Usage]] +title: Behaviour of variables invoked via widget attributes +type: text/vnd.tiddlywiki + +|tc-first-col-min-width|k +|!how declared|!behaviour| +|\define|Textual substitution of parameters is performed on the body text. No further processing takes place. The result after textual substitution is used as the attribute's value| +|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Body text is retrieved as-is and used as the attribute's value.| +|\function|When a function is invoked as `
    >/>`, it is a synonym for `
    `. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded. That first result is used as the attribute's value. Note that functions are recursively processed even when invoked in this form. In other words a filter expression in a function can invoke another function and the processing will continue| \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/variables/Variable Usage.tid b/editions/tw5.com/tiddlers/variables/Variable Usage.tid index 9db23a456..962137e68 100644 --- a/editions/tw5.com/tiddlers/variables/Variable Usage.tid +++ b/editions/tw5.com/tiddlers/variables/Variable Usage.tid @@ -1,13 +1,9 @@ created: 20230421020225031 -modified: 20230422144812613 +modified: 20230726145912019 tags: title: Variable Usage type: text/vnd.tiddlywiki -\define m1(a1) $a1$ - <<__a1__>> - <> -\procedure p1(a1) $a1$ - <<__a1__>> - <> -\function f1(a1) "$a1$" "-" [<__a1__>] ="-" [] :and[join[ ]] - !Ways to define variables and parameters |! how declared|! how parameters are defined|! accessing parameter values in the body| |\define|`()`|`$param$, <<__param__>>`| @@ -100,50 +96,10 @@ These examples are meant to provide insight into the various ways of defining an -!Behavior of invoked variables depends on how the variable was declared +!Behaviour of invoked variables depends on how the variable was declared -|!how invoked|!how declared|!behavior| -|`<$transclude $variable=macro/>` or `<>` in normal wikitext context|\define|All wikitext and variable substitution and textual substitution takes place| -|~|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|All wikitext and variable substitution takes place| -|~|\function|Invoking a function in this way (`<>`) is a synonym for `<$text text={{{[function[macro]]}}}/>`. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded.| -|||| -|widget attribute: `
    >/>`|\define|Textual substitution of parameters is performed on the body text. No further processing takes place. The result after textual substitution is used as the attribute's value| -|~|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Body text is retrieved as-is and used as the attribute's value.| -|~|\function|When a function is invoked as `
    >/>`, it is a synonym for `
    `. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded. That first result is used as the attribute's value. Note that functions are recursively processed even when invoked in this form. In other words a filter expression in a function can invoke another function and the processing will continue| -|||| -|filter operator parameter: `[]`|\define|Textual substitution of parameters is performed on the body text. No further processing takes place. The result after textual substitution is used as the filter operator's parameter.| -|~|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Body text is retrieved as-is and used as the filter operator's parameter.| -|~|\function|The body text of the function is treated as a filter expression and evaluated. The first result is passed to the operator as a parameter. The remaining results are discarded| -|||| -|function call in a filter expression: `[function[macro]]`|\define, <<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Every function is a variable, but only variables defined using \function are invokable using the <<.olink function>> filter operator. Attempts to use a non-function variable is the same as if the function doesn't exist. The behavior in this case is like the identity function. All filter input is passed unchanged to the output.| -|~|\function|The body text of the function is treated as a filter expression and evaluated. This filter expression can itself contain a function call. Filter expressions can be factored out into functions arbitrarily deep.| +{{Behaviour of invoked variables depends on how the variable was declared}} -!! Examples - -Below is an example macro, procedure and function definition. All three forms of parameter substitution `$a1$`, `<<__a1__>>`, and `<>` are included in each definition. The output helps illustrate when each form of substitution will or will not have affect. - -``` -\define m1(a1) $a1$ - <<__a1__>> - <> -\procedure p1(a1) $a1$ - <<__a1__>> - <> -\function f1(a1) $a1$ "-" [<__a1__>] ="-" [] :and[join[ ]] -``` - -| !Variable transclusion|!output | -| `<>`|<>| -| `<>`|<>| -| `<>`|<>| -| !Widget attribute|!output | -| `<$text text=<>/>`|<$text text=<>/>| -| `<$text text=<>/>`|<$text text=<>/>| -| `<$text text=<>/>`|<$text text=<>/>| -| !Filter operator parameter|!output | -| `[]`|<$text text={{{[]}}}/>| -| `[]`|<$text text={{{[]}}}/>| -| `[]`|<$text text={{{[]}}}/>| -| !Function call in filter expression|!output | -| `[function[m1],[foo]]`|<$text text={{{[function[m1],[foo]]}}}/>| -| `[function[p1],[foo]]`|<$text text={{{[function[p1],[foo]]}}}/>| -| `[function[f1],[foo]]`|<$text text={{{[function[f1],[foo]]}}}/>| !Namespaces diff --git a/editions/tw5.com/tiddlers/widgets/ActionListopsWidget.tid b/editions/tw5.com/tiddlers/widgets/ActionListopsWidget.tid index 2aadfe677..3771ab445 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionListopsWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionListopsWidget.tid @@ -1,6 +1,6 @@ caption: action-listops created: 20141025120850184 -modified: 20230301183438774 +modified: 20230805103548113 myfield: tags: ActionWidgets Widgets title: ActionListopsWidget @@ -22,6 +22,28 @@ The ''action-listops'' widget is invisible. Any content within it is ignored. |$subfilter |An optional subfilter expression, which takes the list being manipulated as input, and saves the modified list back to the field/index being manipulated | |$tags |An optional subfilter expression, which takes the <<.field tags>> field of the target tiddler as input, and saves the modified list of tags back to the <<.field tags>> field | +!! Note on subfilter expressions + +If the manipulation depends on the current contents of the list, e.g. when using the <<.olink toggle>> operator to toggle the presence of an element, the [[Filter Run]] would be prefixed with the `+` / `:and` [[filter run prefix|Filter Expression]] so that it properly receives the list as input. + +``` +<$action-listops $subfilter="+[toggle[List Item]]"/> +``` + +The above widget will toggle the presence of the element <<.value "List Item">> in the field <<.field list>> of the current tiddler, removing or adding the element as necessary. + +Similarly, if an element is to always be removed when it is present, the `-` / `:except` [[filter run prefix|Filter Expression]] can be used. Both of the following yield the same result: + +``` +<$action-listops $subfilter="-[[List Item]]"/> +<$action-listops $subfilter="+[remove[List Item]]"/> +``` + +Without any prefixes, the filter run output is simply [[dominantly appended|Dominant Append]] to the list. + +See also the [[Examples|ActionListopsWidget (Examples)]]. + + !! Using $filter or $subfilter Standalone use of the `$subfilter` attribute can be replaced by using a (more complicated) `$filter` attribute value. @@ -103,4 +125,4 @@ Add 'abc' to 'myfield' The [[enlist Operator]] with `raw` suffix will enlist the list saved in <<.field myfield>> of the current tiddler without de-duplication, while e.g. the [[list Operator]] will always de-duplicate. The widget then adds the item <<.value abc>> -- whether or not it is already included in the list -- and replaces the original list in <<.field myfield>>. -! [[Examples|ActionListopsWidget (Examples)]] +! [[Examples|ActionListopsWidget (Examples)]] \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/widgets/ActionPopupWidget.tid b/editions/tw5.com/tiddlers/widgets/ActionPopupWidget.tid index 590e25a92..aac63ea9a 100644 --- a/editions/tw5.com/tiddlers/widgets/ActionPopupWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ActionPopupWidget.tid @@ -1,6 +1,6 @@ caption: action-popup created: 20200303114556528 -modified: 20220815205132124 +modified: 20230731193016105 tags: Widgets ActionWidgets title: ActionPopupWidget type: text/vnd.tiddlywiki @@ -30,6 +30,6 @@ Here is an example of button that triggers the "more" button in the sidebar "Too <$macrocall $name='wikitext-example-without-html' src='<$button> <$action-setfield $tiddler="$:/state/tab/sidebar--595412856" $value="$:/core/ui/SideBar/Tools"/> -<$action-popup $state="$:/state/popup/more-2053862905" $coords="(0,20,0,0)"/> +<$action-popup $state="$:/state/popup/more--810643385" $coords="(0,20,0,0)"/> Click me! '/> diff --git a/editions/tw5.com/tiddlers/widgets/ListWidget.tid b/editions/tw5.com/tiddlers/widgets/ListWidget.tid index 0404f643f..b36d0f3bf 100644 --- a/editions/tw5.com/tiddlers/widgets/ListWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ListWidget.tid @@ -1,6 +1,6 @@ caption: list created: 20131024141900000 -modified: 20220718120325494 +modified: 20230725203601441 tags: Widgets Lists title: ListWidget type: text/vnd.tiddlywiki @@ -119,6 +119,8 @@ Displays as: Note that using the `counter` attribute can reduce performance when working with list items that dynamically reorder or update themselves. The best advice is only to use it when it is really necessary: to obtain a numeric index, or to detect the first or last entries in the list. +Setting `counter="transclusion"` is a handy way to make child elements for each list element be identified as unique. A common use case are multiple [[tag macros|tag Macro]] for the same tag generated by a list widget. Refer to [[tag macro examples|tag Macro (Examples)]] for more details. + !! Edit mode The `<$list>` widget can optionally render draft tiddlers through a different template to handle editing, see DraftMechanism. diff --git a/editions/tw5.com/tiddlers/widgets/examples/ActionListopsWidget (Examples).tid b/editions/tw5.com/tiddlers/widgets/examples/ActionListopsWidget (Examples).tid index 8f8fe8a87..ec8a5de5c 100644 --- a/editions/tw5.com/tiddlers/widgets/examples/ActionListopsWidget (Examples).tid +++ b/editions/tw5.com/tiddlers/widgets/examples/ActionListopsWidget (Examples).tid @@ -1,8 +1,9 @@ created: 20230301174431218 list: efg hlm pqr -modified: 20230301174431218 +modified: 20230805103601224 myfield: revision: 0 +tags: ActionListopsWidget title: ActionListopsWidget (Examples) type: text/vnd.tiddlywiki @@ -47,6 +48,16 @@ Unmangle List """/> +--- +The following example toggles the tag <<.value Examples>> for the current tiddler. + +<$macrocall $name='wikitext-example-without-html' +src="""<$button> +<$action-listops $tags="+[toggle[Examples]]"/> +Toggle 'Examples' tag + +"""/> + --- In this example we shall append a few tags to the 'tags' field of this tiddler (the default). We shall then remove some of the appended tags. diff --git a/editions/tw5.com/tiddlers/wikitext/Styles and Classes in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Styles and Classes in WikiText.tid index eadbd2227..82e37309f 100644 --- a/editions/tw5.com/tiddlers/wikitext/Styles and Classes in WikiText.tid +++ b/editions/tw5.com/tiddlers/wikitext/Styles and Classes in WikiText.tid @@ -1,21 +1,23 @@ +caption: Styles and Classes created: 20131205160532119 -modified: 20131205160549129 +modified: 20230726105744098 tags: WikiText [[How to apply custom styles]] title: Styles and Classes in WikiText type: text/vnd.tiddlywiki -caption: Styles and Classes -Content can be wrapped in `@@`double at signs`@@` to apply specified CSS styles or classes to it. There are multiple ways to use this syntax, as presented below. +CSS styles and classes can be applied to inline or block content wrapped in `@@double at signs@@`. Classes can be applied to certain block WikiText elements. -Inline content wrapped in `@@`double at signs`@@` without specifying style or class will be assigned the `.tc-inline-style` and displayed as highlighted text. The foreground and background colours of the highlighted text are defined as `highlight-background` and `highlight-foreground` in the current palette. +//Inline content// wrapped in `@@double at signs@@` without specifying style or class will be assigned the `tc-inline-style` class and displayed as highlighted text. The foreground and background colours of the highlighted text are defined as `highlight-background` and `highlight-foreground` in the current palette. -<> +<> -Style attributes, e.g. `color`, each followed by `;` semicolon can be introduced immediately after the opening `@@`. +!! Styles -<> +Multiple style attributes, e.g. `color`, each followed by `;` semicolon can be introduced immediately after the opening `@@`, without spaces in between. -Similarly a style can be applied to a multiline content: +<> + +Similarly, styles can be applied to //block content//. Wrapping block content in `@@` without specifying style or class has no effect. <> -A class may be applied to a multiline content only: +!! Classes -< +.coloured-text {color: darkkhaki;} +.coloured-bg {background-color: cornsilk;} + + +Multiple classes, each prefixed with `.`, can be introduced immediately after the opening `@@`, followed by a ` ` space. This works both for inline and block content: + +<> + +<> -Multiple classes and styles can be used together: +Multiple classes and styles can be applied simultaneously. In case of inline content, the styles have to be defined first, followed by the classes. -<> +<> + +In case of block content, the styles and classes can be defined in a single line after the opening `@@` identically as for the inline content, or in separate lines, each beginning with `@@`: + +<> + +In a similar way classes, but not styles, can be applied to those block WikiText elements that are introduced through characters on the beginning of the line. The classes prefixed with `.` are specified immediately after the special characters, followed by a ` ` space. + +<> \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/wikitext/Variable Attribute Values.tid b/editions/tw5.com/tiddlers/wikitext/Variable Attribute Values.tid index d65d81871..e233feb5a 100644 --- a/editions/tw5.com/tiddlers/wikitext/Variable Attribute Values.tid +++ b/editions/tw5.com/tiddlers/wikitext/Variable Attribute Values.tid @@ -1,5 +1,5 @@ created: 20230615045239825 -modified: 20230615045312961 +modified: 20230726151053593 tags: [[Widget Attributes]] WikiText title: Variable Attribute Values type: text/vnd.tiddlywiki @@ -11,4 +11,7 @@ Variable attribute values are indicated with double angle brackets around a [[ma ...
    ``` -<<.warning "The text from the definition of the macro will be retrieved and text substitution will be performed (i.e. <<.param $param$>> and <<.param $(...)$>> syntax). The value of the attribute value will be the resulting text. Any wiki syntax in that text (including further macro calls and variable references) will be left as-is.">> \ No newline at end of file + +The behaviour of variables invoked via widget attributes is not the same as when they are [[invoked via normal wikitext|Behaviour of variables invoked via normal wikitext]]. In addition, the behaviour depends on how the variable is declared: + +{{Behaviour of variables invoked via widget attributes}} diff --git a/editions/tw5.com/tiddlers/wikitext/Widget Attributes.tid b/editions/tw5.com/tiddlers/wikitext/Widget Attributes.tid index 4703c0265..02b3a540e 100644 --- a/editions/tw5.com/tiddlers/wikitext/Widget Attributes.tid +++ b/editions/tw5.com/tiddlers/wikitext/Widget Attributes.tid @@ -1,10 +1,10 @@ created: 20230615045526689 -modified: 20230615060059476 +modified: 20230731210638956 tags: WikiText title: Widget Attributes type: text/vnd.tiddlywiki -Attributes of HTML elements and widgets can be specified in several different ways: +Attributes of [[HTML elements|HTML in WikiText]] and widgets can be specified in several different ways: * [[a literal string|Literal Attribute Values]] * [[a transclusion of a textReference|Transcluded Attribute Values]] @@ -19,3 +19,8 @@ Attributes of HTML elements and widgets can be specified in several different wa |filtered |triple curly braces around a filter expression| |substituted|single or triple backticks around the text to be processed for substitutions| + +<$list filter="[[Literal Attribute Values]] [[Transcluded Attribute Values]] [[Variable Attribute Values]] [[Filtered Attribute Values]] [[Substituted Attribute Values]]"> +<$link>

    <$text text=<>/>

    +<$transclude mode="block"/> + diff --git a/editions/tw5.com/tiddlers/wikitext/Widgets in WikiText.tid b/editions/tw5.com/tiddlers/wikitext/Widgets in WikiText.tid index c23c3475f..67503cd89 100644 --- a/editions/tw5.com/tiddlers/wikitext/Widgets in WikiText.tid +++ b/editions/tw5.com/tiddlers/wikitext/Widgets in WikiText.tid @@ -20,6 +20,7 @@ Note that widgets inherit all the features of [[HTML in WikiText]]: ** Macro invocations (eg `attr=<>`) ** Transclusions (eg, `attr={{MyTiddler!!field}}`) ** Filtered transclusions (eg, `attr={{{ [filter[op]] }}}`) +** <<.from-version "5.3.0">> [[Substituted Attribute Values]] * The content of a widget is [[parsed|WikiText Parser Modes]] in [[inline mode|Inline Mode WikiText]] unless the opening tag is followed by two linebreaks, which forces [[block mode|Block Mode WikiText]] ** [[inline mode|Inline Mode WikiText]] means that [[block mode|Block Mode WikiText]] parse rules like headings, tables and lists are not recognised diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index e6b394653..7a4904fca 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -537,3 +537,13 @@ Tavin Cole, @tavin, 2023/05/25 WhiteFall, @Zacharia2, 2023/06/04 @oeyoews, 2023/06/30 + +Eric Haberstroh, @pille1842, 2023/07/23 + +@lilscribby, 2023-07-24 + +@TiddlyTweeter, 2023/07/25 + +@catter-fly, 2023/07/27 + +@cmo-pomerium, 2023/08/03 diff --git a/package.json b/package.json index 28bbaea43..778e8ed1e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tiddlywiki", "preferGlobal": "true", - "version": "5.3.1-prerelease", + "version": "5.3.2-prerelease", "author": "Jeremy Ruston ", "description": "a non-linear personal web notebook", "contributors": [ diff --git a/readme.md b/readme.md index ef04d0567..2dad1f1de 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@

    Welcome to TiddlyWiki, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation.

    TiddlyWiki is a complete interactive wiki in JavaScript. 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 WikiText.

    Learn more and see it in action at https://tiddlywiki.com/

    Developer documentation is in progress at https://tiddlywiki.com/dev/

    Join the Community

    Official Forums

    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.

    https://talk.tiddlywiki.org/

    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.

    For the convenience of existing users, we also continue to operate the original TiddlyWiki group (hosted on Google Groups since 2005):

    https://groups.google.com/group/TiddlyWiki

    Developer Forums

    There are several resources for developers to learn more about TiddlyWiki and to discuss and contribute to its development.

    Other Forums

    Documentation

    There is also a discussion group specifically for discussing TiddlyWiki documentation improvement initiatives: https://groups.google.com/group/tiddlywikidocs

    -

    Installing TiddlyWiki on Node.js

    1. Install Node.js
      • Linux:
        Debian/Ubuntu:
        apt install nodejs
        May need to be followed up by:
        apt install npm
        Arch Linux
        yay -S tiddlywiki
        (installs node and tiddlywiki)
      • Mac
        brew install node
      • Android
      • Other
    2. Open a command line terminal and type:
      npm install -g tiddlywiki
      If it fails with an error you may need to re-run the command as an administrator:
      sudo npm install -g tiddlywiki (Mac/Linux)
    3. Ensure TiddlyWiki is installed by typing:
      tiddlywiki --version
      • In response, you should see TiddlyWiki report its current version (eg "5.3.0". You may also see other debugging information reported.)
    4. Try it out:
      1. tiddlywiki mynewwiki --init server to create a folder for a new wiki that includes server-related components
      2. tiddlywiki mynewwiki --listen to start TiddlyWiki
      3. Visit http://127.0.0.1:8080/ in your browser
      4. Try editing and creating tiddlers
    5. Optionally, make an offline copy:
      • click the +

        Installing TiddlyWiki on Node.js

        1. Install Node.js
          • Linux:
            Debian/Ubuntu:
            apt install nodejs
            May need to be followed up by:
            apt install npm
            Arch Linux
            yay -S tiddlywiki
            (installs node and tiddlywiki)
          • Mac
            brew install node
          • Android
          • Other
        2. Open a command line terminal and type:
          npm install -g tiddlywiki
          If it fails with an error you may need to re-run the command as an administrator:
          sudo npm install -g tiddlywiki (Mac/Linux)
        3. Ensure TiddlyWiki is installed by typing:
          tiddlywiki --version
          • In response, you should see TiddlyWiki report its current version (eg "5.3.1". You may also see other debugging information reported.)
        4. Try it out:
          1. tiddlywiki mynewwiki --init server to create a folder for a new wiki that includes server-related components
          2. tiddlywiki mynewwiki --listen to start TiddlyWiki
          3. Visit http://127.0.0.1:8080/ in your browser
          4. Try editing and creating tiddlers
        5. Optionally, make an offline copy:
          • click the diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index dcf4a1697..4603589ae 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -580,7 +580,7 @@ button svg, button img, label svg, label img { } button:disabled.tc-btn-invisible { - cursor: default; + cursor: default; color: <>; } @@ -1172,6 +1172,11 @@ button.tc-btn-invisible.tc-remove-tag-button { margin-right: .1em; } +.tc-tiddler-title-icon svg { + width: 0.9em; + height: 0.9em; +} + .tc-system-title-prefix { color: <>; } @@ -2774,15 +2779,11 @@ input.tc-palette-manager-colour-input { white-space: nowrap; } -.tc-table-of-contents button { +.tc-table-of-contents button, +.tc-table-of-contents .toc-item-muted { color: <>; } -button + .tc-toc-caption, -button > .tc-toc-caption{ - margin-left: .25em; -} - .tc-table-of-contents svg { width: 0.7em; height: 0.7em;