diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 737d523ef..75c3bb8d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: - master - tiddlywiki-com env: - NODE_VERSION: "18" + NODE_VERSION: "22" jobs: test: runs-on: ubuntu-latest diff --git a/bin/build-site.sh b/bin/build-site.sh index 31cf171d0..f1fe649e7 100755 --- a/bin/build-site.sh +++ b/bin/build-site.sh @@ -97,7 +97,6 @@ if [ -n "$TW5_BUILD_ARCHIVE" ]; then node $TW5_BUILD_TIDDLYWIKI \ $TW5_BUILD_MAIN_EDITION \ - --verbose \ --version \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_ARCHIVE \ @@ -115,7 +114,6 @@ fi node $TW5_BUILD_TIDDLYWIKI \ $TW5_BUILD_MAIN_EDITION \ - --verbose \ --version \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ @@ -128,7 +126,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /tiddlywikicore-.js Core plugin javascript node $TW5_BUILD_TIDDLYWIKI \ ./editions/empty \ - --verbose \ --output $TW5_BUILD_OUTPUT \ --build empty emptyexternalcore \ || exit 1 @@ -137,7 +134,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /test.html Test edition node $TW5_BUILD_TIDDLYWIKI \ ./editions/test \ - --verbose \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all test.html text/plain \ || exit 1 @@ -150,7 +146,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /dev/static/static.css Static stylesheet node $TW5_BUILD_TIDDLYWIKI \ ./editions/dev \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/dev \ --build index favicon static \ @@ -159,7 +154,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /tour.html tour edition node $TW5_BUILD_TIDDLYWIKI \ ./editions/tour \ - --verbose \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all tour.html text/plain \ || exit 1 @@ -167,7 +161,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /share.html Custom edition for sharing via the URL node $TW5_BUILD_TIDDLYWIKI \ ./editions/share \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --build share \ @@ -176,7 +169,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /upgrade.html Custom edition for performing upgrades node $TW5_BUILD_TIDDLYWIKI \ ./editions/upgrade \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --build upgrade \ @@ -185,7 +177,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /encrypted.html Copy of the main file encrypted with the password "password" node $TW5_BUILD_TIDDLYWIKI \ $TW5_BUILD_MAIN_EDITION \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --build encrypted \ @@ -201,7 +192,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /editions/xlsx-utils/index.html xlsx-utils edition node $TW5_BUILD_TIDDLYWIKI \ ./editions/xlsx-utils \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/editions/xlsx-utils/ \ --build index \ @@ -210,7 +200,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /editions/resumebuilder/index.html Resume builder edition node $TW5_BUILD_TIDDLYWIKI \ ./editions/resumebuilder \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/editions/resumebuilder/ \ --build index \ @@ -219,7 +208,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /editions/text-slicer/index.html Text slicer edition node $TW5_BUILD_TIDDLYWIKI \ ./editions/text-slicer \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/editions/text-slicer/ \ --build index \ @@ -228,7 +216,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /editions/translators/index.html Translators edition node $TW5_BUILD_TIDDLYWIKI \ ./editions/translators \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/editions/translators/ \ --build index \ @@ -237,7 +224,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /editions/introduction/index.html Introduction edition node $TW5_BUILD_TIDDLYWIKI \ ./editions/introduction \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/editions/introduction/ \ --build index \ @@ -246,7 +232,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /editions/full/index.html Full edition node $TW5_BUILD_TIDDLYWIKI \ ./editions/full \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/editions/full/ \ --build index \ @@ -255,7 +240,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /editions/tw5.com-docs/index.html tiddlywiki.com docs edition node $TW5_BUILD_TIDDLYWIKI \ ./editions/tw5.com-docs \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/editions/tw5.com-docs/ \ --build index \ @@ -264,7 +248,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /editions/twitter-archivist/index.html Twitter Archivist edition node $TW5_BUILD_TIDDLYWIKI \ ./editions/twitter-archivist \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/editions/twitter-archivist/ \ --build index \ @@ -280,7 +263,6 @@ node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \ ./editions/innerwikidemo \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all plugins/tiddlywiki/innerwiki/index.html text/plain \ @@ -291,7 +273,6 @@ node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \ ./editions/dynaviewdemo \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all plugins/tiddlywiki/dynaview/index.html text/plain \ @@ -306,7 +287,6 @@ node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \ ./editions/katexdemo \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all plugins/tiddlywiki/katex/index.html text/plain \ @@ -317,7 +297,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /plugins/tiddlywiki/tahoelafs/empty.html Empty wiki with Tahoe-LAFS plugin node $TW5_BUILD_TIDDLYWIKI \ ./editions/tahoelafs \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all plugins/tiddlywiki/tahoelafs/index.html text/plain \ @@ -328,7 +307,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /plugins/tiddlywiki/d3/empty.html Empty wiki with D3 plugin node $TW5_BUILD_TIDDLYWIKI \ ./editions/d3demo \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all plugins/tiddlywiki/d3/index.html text/plain \ @@ -339,7 +317,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /plugins/tiddlywiki/codemirror/empty.html Empty wiki with codemirror plugin node $TW5_BUILD_TIDDLYWIKI \ ./editions/codemirrordemo \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all plugins/tiddlywiki/codemirror/index.html text/plain \ @@ -350,7 +327,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /plugins/tiddlywiki/markdown/empty.html Empty wiki with Markdown plugin node $TW5_BUILD_TIDDLYWIKI \ ./editions/markdowndemo \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all plugins/tiddlywiki/markdown/index.html text/plain \ @@ -361,7 +337,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /plugins/tiddlywiki/tw2parser/empty.html Empty wiki with tw2parser plugin node $TW5_BUILD_TIDDLYWIKI \ ./editions/classicparserdemo \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all plugins/tiddlywiki/tw2parser/index.html text/plain \ @@ -372,7 +347,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /plugins/tiddlywiki/highlight/empty.html Empty wiki with highlight plugin node $TW5_BUILD_TIDDLYWIKI \ ./editions/highlightdemo \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all plugins/tiddlywiki/highlight/index.html text/plain \ @@ -383,7 +357,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /plugins/tiddlywiki/geospatial/empty.html Empty wiki with geospatial plugin node $TW5_BUILD_TIDDLYWIKI \ ./editions/geospatialdemo \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT \ --rendertiddler $:/core/save/all plugins/tiddlywiki/geospatial/index.html text/plain \ @@ -411,7 +384,6 @@ rm -rf $TW5_BUILD_OUTPUT/languages/zh-Hant/static/* # /languages/de-AT/empty.html Empty wiki with de-AT language node $TW5_BUILD_TIDDLYWIKI \ ./editions/de-AT \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/languages/de-AT \ --build favicon empty static index \ @@ -421,7 +393,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /languages/de-DE/empty.html Empty wiki with de-DE language node $TW5_BUILD_TIDDLYWIKI \ ./editions/de-DE \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/languages/de-DE \ --build favicon empty static index \ @@ -431,7 +402,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /languages/es-ES/empty.html Empty wiki with es-ES language node $TW5_BUILD_TIDDLYWIKI \ ./editions/es-ES \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/languages/es-ES \ --build favicon empty static index \ @@ -441,7 +411,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /languages/fr-FR/empty.html Empty wiki with fr-FR language node $TW5_BUILD_TIDDLYWIKI \ ./editions/fr-FR \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/languages/fr-FR \ --build favicon empty static index \ @@ -451,7 +420,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /languages/ja-JP/empty.html Empty wiki with ja-JP language node $TW5_BUILD_TIDDLYWIKI \ ./editions/ja-JP \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/languages/ja-JP \ --build empty index \ @@ -461,7 +429,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /languages/ko-KR/empty.html Empty wiki with ko-KR language node $TW5_BUILD_TIDDLYWIKI \ ./editions/ko-KR \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/languages/ko-KR \ --build favicon empty static index \ @@ -471,7 +438,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /languages/zh-Hans/empty.html Empty wiki with zh-Hans language node $TW5_BUILD_TIDDLYWIKI \ ./editions/zh-Hans \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/languages/zh-Hans \ --build empty index \ @@ -481,7 +447,6 @@ node $TW5_BUILD_TIDDLYWIKI \ # /languages/zh-Hant/empty.html Empty wiki with zh-Hant language node $TW5_BUILD_TIDDLYWIKI \ ./editions/zh-Hant \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/languages/zh-Hant \ --build empty index \ @@ -495,7 +460,6 @@ node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \ ./editions/pluginlibrary \ - --verbose \ --load $TW5_BUILD_OUTPUT/build.tid \ --output $TW5_BUILD_OUTPUT/library/$TW5_BUILD_VERSION \ --build library\ diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 7adf4aa04..2c41f215e 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -175,6 +175,8 @@ Settings/NavigationPermalinkviewMode/UpdateAddressBar/Description: Update addres Settings/PerformanceInstrumentation/Caption: Performance Instrumentation Settings/PerformanceInstrumentation/Hint: Displays performance statistics in the browser developer console. Requires reload to take effect Settings/PerformanceInstrumentation/Description: Enable performance instrumentation +Settings/RecentLimit/Caption: Recent Tab Limit +Settings/RecentLimit/Hint: Maximum number of tiddlers to be displayed under the sidebar "Recent" tab Settings/ToolbarButtonStyle/Caption: Toolbar Button Style Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons: Settings/ToolbarButtonStyle/Styles/Borderless: Borderless diff --git a/core/modules/commands/build.js b/core/modules/commands/build.js index 8471119d7..60456372d 100644 --- a/core/modules/commands/build.js +++ b/core/modules/commands/build.js @@ -24,7 +24,7 @@ var Command = function(params,commander) { Command.prototype.execute = function() { // Get the build targets defined in the wiki - var buildTargets = $tw.boot.wikiInfo.build; + var buildTargets = $tw.boot.wikiInfo && $tw.boot.wikiInfo.build; if(!buildTargets) { return "No build targets defined"; } diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js index fb28465fe..66f2314e2 100755 --- a/core/modules/utils/fakedom.js +++ b/core/modules/utils/fakedom.js @@ -56,36 +56,64 @@ Object.defineProperty(TW_TextNode.prototype, "formattedTextContent", { } }); -var TW_Element = function(tag,namespace) { +var TW_Style = function(el) { + // Define the internal style object + var styleObject = { + // Method to get the entire style object + get: function() { + return el._style; + }, + // Method to set styles using a string (e.g. "color:red; background-color:blue;") + set: function(str) { + var self = this; + str = str || ""; + $tw.utils.each(str.split(";"),function(declaration) { + var parts = declaration.split(":"), + name = $tw.utils.trim(parts[0]), + value = $tw.utils.trim(parts[1]); + if(name && value) { + el._style[$tw.utils.convertStyleNameToPropertyName(name)] = value; + } + }); + }, + // Method to set a specific property without transforming the property name, such as a custom property + setProperty: function(name, value) { + el._style[name] = value; + } + }; + + // Return a Proxy to handle direct access to individual style properties + return new Proxy(styleObject, { + get: function(target, property) { + // If the property exists on styleObject, return it (get, set, setProperty methods) + if (property in target) { + return target[property]; + } + // Otherwise, return the corresponding property from _style + return el._style[$tw.utils.convertStyleNameToPropertyName(property)] || ""; + }, + set: function(target, property, value) { + // Set the property in _style + el._style[$tw.utils.convertStyleNameToPropertyName(property)] = value; + return true; + } + }); +}; + +var TW_Element = function(tag, namespace) { bumpSequenceNumber(this); this.isTiddlyWikiFakeDom = true; this.tag = tag; this.attributes = {}; this.isRaw = false; this.children = []; - this._style = {}; + this._style = {}; // Internal style object + this.style = new TW_Style(this); // Proxy for style management this.namespaceURI = namespace || "http://www.w3.org/1999/xhtml"; }; -Object.setPrototypeOf(TW_Element.prototype,TW_Node.prototype); -Object.defineProperty(TW_Element.prototype, "style", { - get: function() { - return this._style; - }, - set: function(str) { - var self = this; - str = str || ""; - $tw.utils.each(str.split(";"),function(declaration) { - var parts = declaration.split(":"), - name = $tw.utils.trim(parts[0]), - value = $tw.utils.trim(parts[1]); - if(name && value) { - self._style[$tw.utils.convertStyleNameToPropertyName(name)] = value; - } - }); - } -}); +Object.setPrototypeOf(TW_Element.prototype,TW_Node.prototype); Object.defineProperty(TW_Element.prototype, "nodeType", { get: function() { @@ -105,7 +133,7 @@ TW_Element.prototype.setAttribute = function(name,value) { throw "Cannot setAttribute on a raw TW_Element"; } if(name === "style") { - this.style = value; + this.style.set(value); } else { this.attributes[name] = value + ""; } diff --git a/core/modules/widgets/droppable.js b/core/modules/widgets/droppable.js index 0dcba1688..ba54d8860 100644 --- a/core/modules/widgets/droppable.js +++ b/core/modules/widgets/droppable.js @@ -125,11 +125,23 @@ DroppableWidget.prototype.handleDropEvent = function(event) { // Remove highlighting $tw.utils.removeClass(this.domNodes[0],"tc-dragover"); // Try to import the various data types we understand - $tw.utils.importDataTransfer(dataTransfer,null,function(fieldsArray) { - fieldsArray.forEach(function(fields) { - self.performActions(fields.title || fields.text,event); + if(this.droppableActions) { + $tw.utils.importDataTransfer(dataTransfer,null,function(fieldsArray) { + fieldsArray.forEach(function(fields) { + self.performActions(fields.title || fields.text,event); + }); }); - }); + } + // Send a TitleList to performListActions + if(this.droppableListActions) { + $tw.utils.importDataTransfer(dataTransfer,null,function(fieldsArray) { + var titleList = []; + fieldsArray.forEach(function(fields) { + titleList.push(fields.title || fields.text); + }); + self.performListActions($tw.utils.stringifyList(titleList),event); + }); + } // Tell the browser that we handled the drop event.preventDefault(); // Stop the drop ripple up to any parent handlers @@ -137,6 +149,13 @@ DroppableWidget.prototype.handleDropEvent = function(event) { return false; }; +DroppableWidget.prototype.performListActions = function(titleList,event) { + if(this.droppableListActions) { + var modifierKey = $tw.keyboardManager.getEventModifierKeyDescriptor(event); + this.invokeActionString(this.droppableListActions,this,event,{actionTiddlerList: titleList, modifier: modifierKey}); + } +}; + DroppableWidget.prototype.performActions = function(title,event) { if(this.droppableActions) { var modifierKey = $tw.keyboardManager.getEventModifierKeyDescriptor(event); @@ -149,6 +168,7 @@ Compute the internal state of the widget */ DroppableWidget.prototype.execute = function() { this.droppableActions = this.getAttribute("actions"); + this.droppableListActions = this.getAttribute("listActions"); this.droppableEffect = this.getAttribute("effect","copy"); this.droppableTag = this.getAttribute("tag"); this.droppableEnable = (this.getAttribute("enable") || "yes") === "yes"; @@ -168,7 +188,8 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ DroppableWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if(changedAttributes.tag || changedAttributes.enable || changedAttributes.disabledClass || changedAttributes.actions || changedAttributes.effect) { + if(changedAttributes.tag || changedAttributes.enable || changedAttributes.disabledClass || + changedAttributes.actions|| changedAttributes.listActions || changedAttributes.effect) { this.refreshSelf(); return true; } else { diff --git a/core/modules/widgets/genesis.js b/core/modules/widgets/genesis.js index c8403a3d4..299be1e48 100644 --- a/core/modules/widgets/genesis.js +++ b/core/modules/widgets/genesis.js @@ -65,6 +65,16 @@ GenesisWidget.prototype.execute = function() { children: this.parseTreeNode.children || [], isNotRemappable: !this.genesisRemappable }]; + // Apply attributes in $names/$values + this.attributeNames = []; + this.attributeValues = []; + if(this.genesisNames && this.genesisValues) { + this.attributeNames = this.wiki.filterTiddlers(self.genesisNames,this); + this.attributeValues = this.wiki.filterTiddlers(self.genesisValues,this); + $tw.utils.each(this.attributeNames,function(varname,index) { + $tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],varname,self.attributeValues[index] || ""); + }); + } // Apply explicit attributes $tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(this.parseTreeNode),function(attribute) { var name = attribute.name; @@ -79,16 +89,6 @@ GenesisWidget.prototype.execute = function() { } $tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],$tw.utils.extend({},attribute,{name: name})); }); - // Apply attributes in $names/$values - this.attributeNames = []; - this.attributeValues = []; - if(this.genesisNames && this.genesisValues) { - this.attributeNames = this.wiki.filterTiddlers(self.genesisNames,this); - this.attributeValues = this.wiki.filterTiddlers(self.genesisValues,this); - $tw.utils.each(this.attributeNames,function(varname,index) { - $tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],varname,self.attributeValues[index] || ""); - }); - } // Construct the child widgets this.makeChildWidgets(parseTreeNodes); }; diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index b73294654..14e90ba2d 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -428,6 +428,11 @@ Widget.prototype.assignAttributes = function(domNode,options) { destPrefix = options.destPrefix || "", EVENT_ATTRIBUTE_PREFIX = "on"; var assignAttribute = function(name,value) { + // Process any CSS custom properties + if(name.substr(0,2) === "--" && name.length > 2) { + domNode.style.setProperty(name,value); + return; + } // Process any style attributes before considering sourcePrefix and destPrefix if(name.substr(0,6) === "style." && name.length > 6) { domNode.style[$tw.utils.unHyphenateCss(name.substr(6))] = value; diff --git a/core/palettes/FlexokiDark.tid b/core/palettes/FlexokiDark.tid new file mode 100644 index 000000000..b8bb4570c --- /dev/null +++ b/core/palettes/FlexokiDark.tid @@ -0,0 +1,212 @@ +color-scheme: dark +description: An inky color scheme for prose and code +name: FlexokiDark +tags: $:/tags/Palette +title: $:/palettes/FlexokiDark +type: application/x-tiddler-dictionary + +flexoki-paper: #FFFCF0 +flexoki-999: #100F0F +flexoki-950: #1C1B1A +flexoki-900: #282726 +flexoki-850: #343331 +flexoki-800: #403E3C +flexoki-700: #575653 +flexoki-600: #6c6b66 +flexoki-500: #878580 +flexoki-300: #B7B5AC +flexoki-200: #CECDC3 +flexoki-150: #DAD8CE +flexoki-100: #E6E4D9 +flexoki-050: #F2F0E5 +flexoki-red-600: #AF3029 +flexoki-red-400: #D14D41 +flexoki-orange-600: #BC5215 +flexoki-orange-400: #DA702C +flexoki-yellow-900: #4D3A0B +flexoki-yellow-600: #AD8301 +flexoki-yellow-400: #D0A215 +flexoki-yellow-100: #FCEEB8 +flexoki-green-600: #66800B +flexoki-green-400: #879A39 +flexoki-cyan-950: #142625 +flexoki-cyan-600: #227d77 +flexoki-cyan-400: #3AA99F +flexoki-cyan-050: #EBF2E7 +flexoki-blue-600: #205EA6 +flexoki-blue-400: #4385BE +flexoki-purple-600: #5E409D +flexoki-purple-400: #8B7EC8 +flexoki-magenta-600: #A02F6F +flexoki-magenta-400: #CE5D97 + +flexoki-bg: <> +flexoki-tx-2: <> +flexoki-tx-3: <> +flexoki-ui-3: <> +flexoki-ui-2: <> +flexoki-ui: <> +flexoki-bg-2: <> +flexoki-tx: <> +flexoki-re: <> +flexoki-or: <> +flexoki-ye: <> +flexoki-gr: <> +flexoki-cy: <> +flexoki-bl: <> +flexoki-pu: <> +flexoki-ma: <> +flexoki-re-2: <> +flexoki-or-2: <> +flexoki-ye-2: <> +flexoki-gr-2: <> +flexoki-cy-2: <> +flexoki-bl-2: <> +flexoki-pu-2: <> +flexoki-ma-2: <> + +alert-background: <> +alert-border: <> +alert-highlight: <> +alert-muted-foreground: <> +background: #1C1B1A +blockquote-bar: <> +button-background: <> +button-foreground: <> +button-border: <> +code-background: <> +code-border: <> +code-foreground: <> +diff-delete-background: <> +diff-delete-foreground: <> +diff-equal-background: +diff-equal-foreground: inherit +diff-insert-background: <> +diff-insert-foreground: <> +diff-invisible-background: <> +diff-invisible-foreground: <> +dirty-indicator: <> +download-background: <> +download-foreground: <> +dragger-background: <> +dragger-foreground: <> +dropdown-background: <> +dropdown-border: <> +dropdown-tab-background-selected: <> +dropdown-tab-background: <> +dropzone-background: <> +external-link-background-hover: inherit +external-link-background-visited: inherit +external-link-background: inherit +external-link-foreground-hover: inherit +external-link-foreground-visited: <> +external-link-foreground: <> +footnote-target-background: <> +foreground: #B7B5AC +highlight-background: #ffff00 +highlight-foreground: #000000 +menubar-background: <> +menubar-foreground: <> +message-background: <> +message-border: <> +message-foreground: <> +modal-backdrop: <> +modal-background: <> +modal-border: <> +modal-footer-background: <> +modal-footer-border: <> +modal-header-border: <> +muted-foreground: <> +network-activity-foreground: <> +notification-background: <> +notification-border: <> +page-background: <> +pre-background: <> +pre-border: <> +primary: <> +selection-background: #2b7b73 +selection-foreground: <> +select-tag-background: <> +select-tag-foreground: <> +sidebar-button-foreground: <> +sidebar-controls-foreground-hover: <> +sidebar-controls-foreground: <> +sidebar-foreground-shadow: transparent +sidebar-foreground: <> +sidebar-muted-foreground-hover: <> +sidebar-muted-foreground: <> +sidebar-tab-background-selected: <> +sidebar-tab-background: <> +sidebar-tab-border-selected: <> +sidebar-tab-border: <> +sidebar-tab-divider: #e4e4e4 +sidebar-tab-foreground-selected: +sidebar-tab-foreground: <> +sidebar-tiddler-link-foreground-hover: <> +sidebar-tiddler-link-foreground: <> +site-title-foreground: <> +stability-stable: <> +stability-experimental: <> +stability-deprecated: <> +stability-legacy: <> +static-alert-foreground: #aaaaaa +tab-background-selected: <> +tab-background: <> +tab-border-selected: <> +tab-border: <> +tab-divider: <> +tab-foreground-selected: <> +tab-foreground: <> +table-border: <> +table-footer-background: <> +table-header-background: <> +tag-background: #D0A215 +tag-foreground: #100F0F +testcase-accent-level-1: <> +testcase-accent-level-2: <> +testcase-accent-level-3: <> +tiddler-background: <> +tiddler-border: <> +tiddler-controls-foreground-hover: <> +tiddler-controls-foreground-selected: <> +tiddler-controls-foreground: <> +tiddler-editor-background: <> +tiddler-editor-border-image: #ffffff +tiddler-editor-border: <> +tiddler-editor-fields-even: <> +tiddler-editor-fields-odd: <> +tiddler-info-background: <> +tiddler-info-border: <> +tiddler-info-tab-background: <> +tiddler-link-background: <> +tiddler-link-foreground: <> +tiddler-subtitle-foreground: <> +tiddler-title-foreground: <> +toolbar-new-button: +toolbar-options-button: +toolbar-save-button: +toolbar-info-button: +toolbar-edit-button: +toolbar-close-button: +toolbar-delete-button: +toolbar-cancel-button: +toolbar-done-button: +untagged-background: #999999 +very-muted-foreground: <> +wikilist-background: #e5e5e5 +wikilist-item: #fff +wikilist-info: #000 +wikilist-title: #666 +wikilist-title-svg: <> +wikilist-url: #aaa +wikilist-button-open: #4fb82b +wikilist-button-open-hover: green +wikilist-button-reveal: #5778d8 +wikilist-button-reveal-hover: blue +wikilist-button-remove: #d85778 +wikilist-button-remove-hover: red +wikilist-toolbar-background: #d3d3d3 +wikilist-toolbar-foreground: #888 +wikilist-droplink-dragover: rgba(255,192,192,0.5) +wikilist-button-background: #acacac +wikilist-button-foreground: #000 \ No newline at end of file diff --git a/core/palettes/FlexokiLight.tid b/core/palettes/FlexokiLight.tid new file mode 100644 index 000000000..ba6862f66 --- /dev/null +++ b/core/palettes/FlexokiLight.tid @@ -0,0 +1,214 @@ +title: $:/palettes/FlexokiLight +name: FlexokiLight +description: An inky color scheme for prose and code +tags: $:/tags/Palette +type: application/x-tiddler-dictionary +color-scheme: light + +flexoki-black: #100F0F +flexoki-paper: #FFFCF0 +flexoki-950: #1C1B1A +flexoki-900: #282726 +flexoki-850: #343331 +flexoki-800: #403E3C +flexoki-700: #575653 +flexoki-600: #6F6E69 +flexoki-500: #878580 +flexoki-300: #B7B5AC +flexoki-200: #CECDC3 +flexoki-150: #DAD8CE +flexoki-100: #E6E4D9 +flexoki-050: #F2F0E5 +flexoki-red-600: #AF3029 +flexoki-red-400: #D14D41 +flexoki-orange-600: #BC5215 +flexoki-orange-400: #DA702C +flexoki-yellow-900: #4D3A0B +flexoki-yellow-600: #AD8301 +flexoki-yellow-400: #D0A215 +flexoki-yellow-100: #FCEEB8 +flexoki-green-600: #66800B +flexoki-green-400: #879A39 +flexoki-cyan-950: #142625 +flexoki-cyan-600: #24837B +flexoki-cyan-400: #3AA99F +flexoki-cyan-050: #EBF2E7 +flexoki-blue-600: #205EA6 +flexoki-blue-400: #4385BE +flexoki-purple-600: #5E409D +flexoki-purple-400: #8B7EC8 +flexoki-magenta-600: #A02F6F +flexoki-magenta-400: #CE5D97 + +flexoki-tx: <> +flexoki-tx-2: <> +flexoki-tx-3: <> +flexoki-ui-3: <> +flexoki-ui-2: <> +flexoki-ui: <> +flexoki-bg-2: <> +flexoki-bg: <> + +flexoki-re: <> +flexoki-or: <> +flexoki-ye: <> +flexoki-gr: <> +flexoki-cy: <> +flexoki-bl: <> +flexoki-pu: <> +flexoki-ma: <> + +flexoki-re-2: <> +flexoki-or-2: <> +flexoki-ye-2: <> +flexoki-gr-2: <> +flexoki-cy-2: <> +flexoki-bl-2: <> +flexoki-pu-2: <> +flexoki-ma-2: <> + +alert-background: <> +alert-border: <> +alert-highlight: <> +alert-muted-foreground: <> +background: #FFFCF0 +blockquote-bar: <> +button-background: <> +button-foreground: <> +button-border: <> +code-background: <> +code-border: <> +code-foreground: <> +diff-delete-background: <> +diff-delete-foreground: <> +diff-equal-background: +diff-equal-foreground: <> +diff-insert-background: <> +diff-insert-foreground: <> +diff-invisible-background: <> +diff-invisible-foreground: <> +dirty-indicator: <> +download-background: <> +download-foreground: <> +dragger-background: <> +dragger-foreground: <> +dropdown-background: <> +dropdown-border: <> +dropdown-tab-background-selected: #fff +dropdown-tab-background: #ececec +dropzone-background: <> +external-link-background-hover: inherit +external-link-background-visited: inherit +external-link-background: inherit +external-link-foreground-hover: inherit +external-link-foreground-visited: <> +external-link-foreground: <> +footnote-target-background: <> +foreground: #100F0F +highlight-background: #ffff00 +highlight-foreground: #000000 +menubar-background: <> +menubar-foreground: <> +message-background: <> +message-border: <> +message-foreground: <> +modal-backdrop: <> +modal-background: <> +modal-border: #999999 +modal-footer-background: #f5f5f5 +modal-footer-border: #dddddd +modal-header-border: #eeeeee +muted-foreground: <> +network-activity-foreground: <> +notification-background: <> +notification-border: <> +page-background: <> +pre-background: <> +pre-border: <> +primary: <> +selection-background: +selection-foreground: +select-tag-background: <> +select-tag-foreground: <> +sidebar-button-foreground: <> +sidebar-controls-foreground-hover: <> +sidebar-controls-foreground: <> +sidebar-foreground-shadow: rgba(255,255,255, 0.8) +sidebar-foreground: <> +sidebar-muted-foreground-hover: <> +sidebar-muted-foreground: <> +sidebar-tab-background-selected: <> +sidebar-tab-background: <> +sidebar-tab-border-selected: <> +sidebar-tab-border: <> +sidebar-tab-divider: <> +sidebar-tab-foreground-selected: +sidebar-tab-foreground: <> +sidebar-tiddler-link-foreground-hover: <> +sidebar-tiddler-link-foreground: <> +site-title-foreground: <> +stability-stable: <> +stability-experimental: <> +stability-deprecated: <> +stability-legacy: <> +static-alert-foreground: <> +tab-background-selected: <> +tab-background: <> +tab-border-selected: <> +tab-border: <> +tab-divider: <> +tab-foreground-selected: <> +tab-foreground: <> +table-border: <> +table-footer-background: <> +table-header-background: <> +tag-background: #AD8301 +tag-foreground: #FFFCF0 +testcase-accent-level-1: <> +testcase-accent-level-2: <> +testcase-accent-level-3: <> +tiddler-background: <> +tiddler-border: <> +tiddler-controls-foreground-hover: <> +tiddler-controls-foreground-selected: <> +tiddler-controls-foreground: <> +tiddler-editor-background: <> +tiddler-editor-border-image: #ffffff +tiddler-editor-border: <> +tiddler-editor-fields-even: <> +tiddler-editor-fields-odd: <> +tiddler-info-background: <> +tiddler-info-border: <> +tiddler-info-tab-background: <> +tiddler-link-background: <> +tiddler-link-foreground: <> +tiddler-subtitle-foreground: <> +tiddler-title-foreground: <> +toolbar-new-button: +toolbar-options-button: +toolbar-save-button: +toolbar-info-button: +toolbar-edit-button: +toolbar-close-button: +toolbar-delete-button: +toolbar-cancel-button: +toolbar-done-button: +untagged-background: #999999 +very-muted-foreground: #888888 +wikilist-background: <> +wikilist-item: #fff +wikilist-info: #000 +wikilist-title: #666 +wikilist-title-svg: <> +wikilist-url: #aaa +wikilist-button-open: #4fb82b +wikilist-button-open-hover: green +wikilist-button-reveal: #5778d8 +wikilist-button-reveal-hover: blue +wikilist-button-remove: #d85778 +wikilist-button-remove-hover: red +wikilist-toolbar-background: #d3d3d3 +wikilist-toolbar-foreground: #888 +wikilist-droplink-dragover: rgba(255,192,192,0.5) +wikilist-button-background: #acacac +wikilist-button-foreground: #000 diff --git a/core/ui/AdvancedSearch/Filter.tid b/core/ui/AdvancedSearch/Filter.tid index a8baf9d30..7369e4c40 100644 --- a/core/ui/AdvancedSearch/Filter.tid +++ b/core/ui/AdvancedSearch/Filter.tid @@ -2,18 +2,28 @@ title: $:/core/ui/AdvancedSearch/Filter tags: $:/tags/AdvancedSearch caption: {{$:/language/Search/Filter/Caption}} -\define lingo-base() $:/language/Search/ -\define set-next-input-tab(beforeafter:"after") -<$macrocall $name="change-input-tab" +\procedure lingo-base() $:/language/Search/ +\procedure set-next-input-tab() +<$transclude $variable="change-input-tab" stateTitle="$:/state/tab--1498284803" tag="$:/tags/AdvancedSearch" - beforeafter="$beforeafter$" + beforeafter="after" defaultState="$:/core/ui/AdvancedSearch/System" actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<>/>" /> \end -\define cancel-search-actions() +\procedure set-previous-input-tab() +<$transclude $variable="change-input-tab" + stateTitle="$:/state/tab--1498284803" + tag="$:/tags/AdvancedSearch" + beforeafter="before" + defaultState="$:/core/ui/AdvancedSearch/System" + actions="<$action-setfield $tiddler='$:/state/advancedsearch/currentTab' text=<>/>" +/> +\end + +\procedure cancel-search-actions() \whitespace trim <$list filter="[{$:/temp/advancedsearch/input}!match{$:/temp/advancedsearch}]"> <$list-empty> @@ -24,30 +34,30 @@ caption: {{$:/language/Search/Filter/Caption}} \end -\define input-accept-actions() +\procedure input-accept-actions() \whitespace trim <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"> <$list-empty> - <$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"> - <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/> + <$list filter="[get[text]!is[missing]] :else[get[text]is[shadow]]"> + <$action-navigate $to={{{ [get[text]] }}}/> <$/list-empty> - <$action-navigate $to={{{ [<__tiddler__>get[text]] }}}/> + <$action-navigate $to={{{ [get[text]] }}}/> \end -\define input-accept-variant-actions() +\procedure input-accept-variant-actions() \whitespace trim <$list filter="[{$:/config/Search/NavigateOnEnter/enable}match[yes]]"> <$list-empty> - <$list filter="[<__tiddler__>get[text]!is[missing]] ~[<__tiddler__>get[text]is[shadow]]"> + <$list filter="[get[text]!is[missing]] :else[get[text]is[shadow]]"> <$list filter="[<__tiddler__>get[text]minlength[1]]"> - <$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/> + <$action-sendmessage $message="tm-edit-tiddler" $param={{{ [get[text]] }}}/> - <$list filter="[<__tiddler__>get[text]minlength[1]]"> - <$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/> + <$list filter="[get[text]minlength[1]]"> + <$action-sendmessage $message="tm-edit-tiddler" $param={{{ [get[text]] }}}/> \end @@ -58,8 +68,8 @@ caption: {{$:/language/Search/Filter/Caption}}