1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-25 04:14:40 +00:00

Compare commits

..

11 Commits

Author SHA1 Message Date
Jeremy Ruston
ace2d2d518 Fix mis-merge 2025-07-17 16:51:08 +01:00
Jeremy Ruston
0532790292 Merge branch 'master' into new-bidi-improvements 2025-07-17 16:48:45 +01:00
Jeremy Ruston
505c7e1256 Update tests 2025-03-21 17:57:52 +00:00
Jeremy Ruston
2eb54edeb3 Merge branch 'master' into new-bidi-improvements 2025-03-21 17:25:38 +00:00
Jeremy Ruston
b92636e715 Fix for bidi in the text editor 2025-02-14 17:48:54 +00:00
Mohammad Rahmani
89f5e0802d Fix the missing bracket in controls.tid BIDI version (#8939)
Fix the missing bracket in controls.tid BIDI version
2025-02-14 17:42:36 +00:00
Jeremy Ruston
a62e39a689 Merge branch 'master' into new-bidi-improvements 2025-01-27 16:47:17 +00:00
Jeremy Ruston
7fe9a31917 Add dir="auto" to all <p> tags
And fix 182 test files!
2025-01-27 12:36:50 +00:00
Jeremy Ruston
29c7d1ce26 Fixes after merging master 2025-01-24 10:37:19 +00:00
Jeremy Ruston
df3f2f1a09 Merge branch 'master' into new-bidi-improvements 2025-01-24 10:37:04 +00:00
jeremy@jermolene.com
9751d6cffd Initial commit 2023-06-21 17:14:50 +01:00
472 changed files with 700 additions and 8240 deletions

View File

@@ -4,4 +4,4 @@ TiddlyWiki incorporates code from these fine OpenSource projects:
* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]
* [[The Jasmine JavaScript Test Framework|https://jasmine.github.io/]]
* [[modern-normalize by Sindre Sorhus|https://github.com/sindresorhus/modern-normalize]]
* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]

View File

@@ -69,6 +69,9 @@ function FramedEngine(options) {
if(this.widget.editRows) {
this.domNode.setAttribute("rows",this.widget.editRows);
}
if(this.widget.editDir) {
this.domNode.setAttribute("dir",this.widget.editDir);
}
if(this.widget.editTabIndex) {
this.iframeNode.setAttribute("tabindex",this.widget.editTabIndex);
}
@@ -117,6 +120,7 @@ FramedEngine.prototype.copyStyles = function() {
this.domNode.style["-webkit-text-fill-color"] = "currentcolor";
// Ensure we don't force text direction to LTR
this.domNode.style.removeProperty("direction");
this.domNode.style.removeProperty("unicodeBidi");
};
/*

View File

@@ -49,6 +49,9 @@ function SimpleEngine(options) {
if(this.widget.editTabIndex) {
this.domNode.setAttribute("tabindex",this.widget.editTabIndex);
}
if(this.widget.editDir) {
this.domNode.setAttribute("dir",this.widget.editDir);
}
if(this.widget.editAutoComplete) {
this.domNode.setAttribute("autocomplete",this.widget.editAutoComplete);
}

View File

@@ -180,6 +180,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
this.editFocusSelectFromStart = $tw.utils.parseNumber(this.getAttribute("focusSelectFromStart","0"));
this.editFocusSelectFromEnd = $tw.utils.parseNumber(this.getAttribute("focusSelectFromEnd","0"));
this.editTabIndex = this.getAttribute("tabindex");
this.editDir = this.getAttribute("dir");
this.editCancelPopups = this.getAttribute("cancelPopups","") === "yes";
this.editInputActions = this.getAttribute("inputActions");
this.editRefreshTitle = this.getAttribute("refreshTitle");
@@ -217,7 +218,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
EditTextWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
// Completely rerender if any of our attributes have changed
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || changedTiddlers[HEIGHT_MODE_TITLE] || changedTiddlers[ENABLE_TOOLBAR_TITLE] || changedTiddlers["$:/palette"] || changedAttributes.disabled || changedAttributes.fileDrop) {
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedAttributes.tabindex || changedAttributes.dir || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || changedTiddlers[HEIGHT_MODE_TITLE] || changedTiddlers[ENABLE_TOOLBAR_TITLE] || changedTiddlers["$:/palette"] || changedAttributes.disabled || changedAttributes.fileDrop) {
this.refreshSelf();
return true;
} else if (changedTiddlers[this.editRefreshTitle]) {

View File

@@ -0,0 +1,51 @@
/*\
title: $:/core/modules/parsers/wikiparser/rules/dir.js
type: application/javascript
module-type: wikirule
Wiki pragma rule for specifying text direction
```
\dir rtl
\dir ltr
\dir auto
```
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.name = "dir";
exports.types = {pragma: true};
/*
Instantiate parse rule
*/
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /^\\dir[^\S\n]*(\S+)\r?\n/mg;
};
/*
Parse the most recent match
*/
exports.parse = function() {
var self = this;
// Move past the pragma invocation
this.parser.pos = this.matchRegExp.lastIndex;
// Parse tree nodes to return
return [{
type: "element",
tag: this.parser.parseAsInline ? "span" : "div",
attributes: {
dir: {type: "string", value: this.match[1]}
},
children: []
}];
};
})();

View File

@@ -33,6 +33,7 @@ options: see below:
*/
var WikiParser = function(type,text,options) {
this.wiki = options.wiki;
this.parseAsInline = options.parseAsInline;
var self = this;
// Check for an externally linked tiddler
if($tw.browser && (text || "") === "" && options._canonical_uri) {
@@ -256,7 +257,7 @@ WikiParser.prototype.parseBlock = function(terminatorRegExpString) {
var start = this.pos;
var children = this.parseInlineRun(terminatorRegExp);
var end = this.pos;
return [{type: "element", tag: "p", children: children, start: start, end: end }];
return [{type: "element", tag: "p", attributes: {dir: {type: "string", value: "auto"}}, children: children, start: start, end: end }];
};
/*

View File

@@ -39,6 +39,9 @@ RevealWidget.prototype.render = function(parent,nextSibling) {
if(this.style) {
domNode.setAttribute("style",this.style);
}
if(this.direction) {
domNode.setAttribute("dir",this.direction);
}
parent.insertBefore(domNode,nextSibling);
this.renderChildren(domNode,null);
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
@@ -120,6 +123,7 @@ RevealWidget.prototype.execute = function() {
this["default"] = this.getAttribute("default","");
this.animate = this.getAttribute("animate","no");
this.retain = this.getAttribute("retain","no");
this.direction = this.getAttribute("dir");
this.openAnimation = this.animate === "no" ? undefined : "open";
this.closeAnimation = this.animate === "no" ? undefined : "close";
this.updatePopupPosition = this.getAttribute("updatePopupPosition","no") === "yes";
@@ -211,7 +215,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/
RevealWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes.positionAllowNegative || changedAttributes["default"] || changedAttributes.animate || changedAttributes.stateTitle || changedAttributes.stateField || changedAttributes.stateIndex) {
if(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes.positionAllowNegative || changedAttributes["default"] || changedAttributes.animate || changedAttributes.stateTitle || changedAttributes.stateField || changedAttributes.stateIndex || changedAttributes.dir) {
this.refreshSelf();
return true;
} else {

View File

@@ -267,6 +267,9 @@ TranscludeWidget.prototype.parseTransclusionTarget = function(parseAsInline) {
parser.tree[0] = {
type: "element",
tag: "p",
attributes: {
dir: {type: "string", value: "auto"}
},
children: [{
type: "text",
text: this.transcludeFunctionResult

View File

@@ -70,7 +70,7 @@ alert-border: <<colour flexoki-ye>>
alert-highlight: <<colour flexoki-re>>
alert-muted-foreground: <<colour flexoki-ye>>
background: #100F0F
blockquote-bar: <<colour flexoki-ma>>
blockquote-bar: <<colour flexoki-ma-2>>
button-background: <<colour flexoki-bg-2>>
button-foreground: <<colour flexoki-paper>>
button-border: <<colour flexoki-600>>
@@ -106,7 +106,7 @@ foreground: #CECDC3
highlight-background: <<colour flexoki-yellow-900>>
highlight-foreground: inherit
menubar-background: <<colour primary>>
menubar-foreground: <<colour flexoki-999>>
menubar-foreground: <<colour flexoki-paper>>
message-background: <<colour background>>
message-border: <<colour foreground>>
message-foreground: <<colour foreground>>

View File

@@ -12,7 +12,8 @@ tc-page-container tc-page-view-$(storyviewTitle)$ tc-language-$(languageTitle)$
tv-config-toolbar-class={{$:/config/Toolbar/ButtonClass}}
tv-show-missing-links={{$:/config/MissingLinks}}
storyviewTitle={{$:/view}}
languageTitle={{{ [{$:/language}get[name]] }}}>
languageTitle={{{ [{$:/language}get[name]] }}}
tv-text-direction={{$:/config/DefaultTextDirection}}>
<div class=<<containerClasses>>>

View File

@@ -30,6 +30,7 @@ title: $:/core/ui/EditTemplate
data-tiddler-title=<<currentTiddler>>
data-tags={{!!tags}}
class={{{ [all[shadows+tiddlers]tag[$:/tags/ClassFilters/TiddlerTemplate]!is[draft]] :map:flat[subfilter{!!text}] tc-tiddler-frame tc-tiddler-edit-frame [<currentTiddler>is[tiddler]then[tc-tiddler-exists]] [<currentTiddler>is[missing]!is[shadow]then[tc-tiddler-missing]] [<currentTiddler>is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [<currentTiddler>is[system]then[tc-tiddler-system]] [{!!class}] [<currentTiddler>tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}}
dir=<<tv-text-direction>>
role="region"
aria-label={{$:/language/EditTemplate/Caption}}>
<$fieldmangler>

View File

@@ -9,6 +9,7 @@ title: $:/core/ui/EditTemplate/body/editor
placeholder={{$:/language/EditTemplate/Body/Placeholder}}
tabindex={{$:/config/EditTabIndex}}
focus={{{ [{$:/config/AutoFocus}match[text]then[true]] ~[[false]] }}}
dir=<<tv-text-direction>>
cancelPopups="yes"
fileDrop={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}}

View File

@@ -20,7 +20,7 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
importState=<<qualify $:/state/ImportImage>> >
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> >
<div>
<div class={{{ [<edit-preview-state>match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}>
<div class={{{ [<edit-preview-state>match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}} dir=<<tv-text-direction>>>
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>

View File

@@ -3,7 +3,7 @@ tags: $:/tags/EditTemplate
\define config-title() $:/config/EditToolbarButtons/Visibility/$(listItem)$
\whitespace trim
<div class="tc-tiddler-title tc-tiddler-edit-title tc-clearfix">
<div class="tc-tiddler-title tc-tiddler-edit-title tc-clearfix" dir=<<tv-text-direction>> >
<$view field="title"/>
<span class="tc-tiddler-controls tc-titlebar">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem">

View File

@@ -71,7 +71,7 @@ $value={{{ [subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
\whitespace trim
<$set name="newFieldValueTiddlerPrefix" value=<<newFieldValueTiddlerPrefix>> emptyValue=<<qualify "$:/temp/NewFieldValue">> >
<div class="tc-edit-fields">
<div class="tc-edit-fields" dir=<<tv-text-direction>>>
<table class={{{ [all[current]fields[]] :filter[lookup[$:/config/EditTemplateFields/Visibility/]!match[hide]] :and[count[]!match[0]] :and[then[tc-edit-fields]] :else[[tc-edit-fields tc-edit-fields-small]] }}}>
<tbody>
<$list filter="[all[current]fields[]] :and[sort[title]]" variable="currentField" storyview="pop">
@@ -98,7 +98,7 @@ $value={{{ [subfilter<get-field-value-tiddler-filter>get[text]] }}}/>
</div>
<$fieldmangler>
<div class="tc-edit-field-add">
<div class="tc-edit-field-add" dir=<<tv-text-direction>>>
<em class="tc-edit tc-small-gap-right">
<<lingo Fields/Add/Prompt>>
</em>

View File

@@ -14,7 +14,7 @@ tags: $:/tags/EditTemplate
<$list filter="[all[current]shadowsource[]]" variable="pluginTitle">
<$set name="pluginLink" value=<<pluginLinkBody>>>
<div class="tc-message-box">
<div class="tc-message-box" dir=<<tv-text-direction>>>
<<lingo Warning>>
@@ -29,7 +29,7 @@ tags: $:/tags/EditTemplate
<$list filter="[all[current]shadowsource[]]" variable="pluginTitle">
<$set name="pluginLink" value=<<pluginLinkBody>>>
<div class="tc-message-box">
<div class="tc-message-box" dir=<<tv-text-direction>>>
<<lingo OverriddenWarning>>

View File

@@ -44,7 +44,7 @@ tags: $:/tags/EditTemplate
\end
\procedure edit-tags-template(tagField:"tags")
<div class="tc-edit-tags">
<div class="tc-edit-tags" dir=<<tv-text-direction>>>
<$list filter="[<currentTiddler>get<tagField>enlist-input[]sort[title]]" storyview="pop">
<$macrocall $name="tag-body"
colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}

View File

@@ -2,13 +2,13 @@ title: $:/core/ui/EditTemplate/title
tags: $:/tags/EditTemplate
\whitespace trim
<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes" dir=<<tv-text-direction>>/>
<$vars pattern="""[\|\[\]{}]""" bad-chars="""`| [ ] { }`""">
<$list filter="[all[current]regexp:draft.title<pattern>]" variable="listItem">
<div class="tc-message-box">
<div class="tc-message-box" dir=<<tv-text-direction>>>
{{$:/core/images/warning}}&#32;{{$:/language/EditTemplate/Title/BadCharacterWarning}}
@@ -18,7 +18,7 @@ tags: $:/tags/EditTemplate
</$vars>
<$reveal state="!!draft.title" type="nomatch" text={{!!draft.of}} tag="div">
<$reveal state="!!draft.title" type="nomatch" text={{!!draft.of}} tag="div" dir=<<tv-text-direction>>>
<$list filter="[{!!draft.title}!is[missing]]" variable="listItem">

View File

@@ -9,7 +9,7 @@ first-search-filter: [all[shadows+tiddlers]prefix[$:/language/Docs/Types/]sort[d
<div class="tc-edit-type-selector-wrapper">
<em class="tc-edit tc-small-gap-right"><<lingo Type/Prompt>></em>
<div class="tc-type-selector-dropdown-wrapper">
<div class="tc-type-selector"><$fieldmangler>
<div class="tc-type-selector" dir=<<tv-text-direction>>><$fieldmangler>
<$transclude $variable="keyboard-driven-input" tiddler=<<currentTiddler>> storeTitle=<<typeInputTiddler>> refreshTitle=<<refreshTitle>> selectionStateTitle=<<typeSelectionTiddler>> field="type" tag="input" default="" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify "$:/state/popup/type-dropdown">> class="tc-edit-typeeditor tc-edit-texteditor tc-popup-handle" tabindex={{$:/config/EditTabIndex}} focus={{{ [{$:/config/AutoFocus}match[type]then[true]] :else[[false]] }}} cancelPopups="yes" configTiddlerFilter="[[$:/core/ui/EditTemplate/type]]" inputCancelActions=<<input-cancel-actions>>/><$button popup=<<qualify "$:/state/popup/type-dropdown">> class="tc-btn-invisible tc-btn-dropdown tc-small-gap" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button><$button message="tm-remove-field" param="type" class="tc-btn-invisible tc-btn-icon" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}<$action-deletetiddler $filter="[<typeInputTiddler>] [<storeTitle>] [<refreshTitle>] [<selectionStateTitle>]"/></$button>
</$fieldmangler></div>

View File

@@ -14,7 +14,8 @@ code-body: yes
tv-enable-drag-and-drop={{$:/config/DragAndDrop/Enable}}
tv-show-missing-links={{$:/config/MissingLinks}}
storyviewTitle={{$:/view}}
languageTitle={{{ [{$:/language}get[name]] }}}>
languageTitle={{{ [{$:/language}get[name]] }}}
tv-text-direction={{$:/config/DefaultTextDirection}}>
<div class={{{ [all[shadows+tiddlers]tag[$:/tags/ClassFilters/PageTemplate]!is[draft]] :map:flat[subfilter{!!text}] tc-page-container [[tc-page-view-]addsuffix<storyviewTitle>] [[tc-language-]addsuffix<languageTitle>] :and[unique[]join[ ]] }}} >

View File

@@ -7,7 +7,7 @@ caption: {{$:/language/SideBar/Tools/Caption}}
\procedure lingo-base() $:/language/ControlPanel/
\function config-title() [[$:/config/PageControlButtons/Visibility/$(listItem)$]substitute[]]
<<lingo Basics/Version/Prompt>><span class="tc-tiny-gap-left"><<version>></span>
<<lingo Basics/Version/Prompt>> <<version>>
<$let tv-config-toolbar-icons="yes"
tv-config-toolbar-text="yes"

View File

@@ -8,7 +8,7 @@ $:/state/folded/$(currentTiddler)$
\define cancel-delete-tiddler-actions(message) <$action-sendmessage $message="tm-$message$-tiddler"/>
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View]!is[draft]]
<$vars storyTiddler=<<currentTiddler>> tiddlerInfoState=<<qualify "$:/state/popup/tiddler-info">>>
<div data-tiddler-title=<<currentTiddler>> data-tags={{!!tags}} class={{{ [all[shadows+tiddlers]tag[$:/tags/ClassFilters/TiddlerTemplate]!is[draft]] :map:flat[subfilter{!!text}] tc-tiddler-frame tc-tiddler-view-frame [<currentTiddler>is[tiddler]then[tc-tiddler-exists]] [<currentTiddler>is[missing]!is[shadow]then[tc-tiddler-missing]] [<currentTiddler>is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [<currentTiddler>is[shadow]is[tiddler]then[tc-tiddler-overridden-shadow]] [<currentTiddler>is[system]then[tc-tiddler-system]] [{!!class}] [<currentTiddler>tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}} role="article">
<div dir=<<tv-text-direction>> data-tiddler-title=<<currentTiddler>> data-tags={{!!tags}} class={{{ [all[shadows+tiddlers]tag[$:/tags/ClassFilters/TiddlerTemplate]!is[draft]] :map:flat[subfilter{!!text}] tc-tiddler-frame tc-tiddler-view-frame [<currentTiddler>is[tiddler]then[tc-tiddler-exists]] [<currentTiddler>is[missing]!is[shadow]then[tc-tiddler-missing]] [<currentTiddler>is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] [<currentTiddler>is[shadow]is[tiddler]then[tc-tiddler-overridden-shadow]] [<currentTiddler>is[system]then[tc-tiddler-system]] [{!!class}] [<currentTiddler>tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ ]] }}} role="article">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!is[draft]]" variable="listItem">
<$transclude tiddler=<<listItem>>/>
</$list>

View File

@@ -3,7 +3,7 @@ tags: $:/tags/ViewTemplate
\import [all[shadows+tiddlers]tag[$:/tags/Macro/View/Body]!is[draft]] [all[shadows+tiddlers]tag[$:/tags/Global/View/Body]!is[draft]]
<$reveal tag="div" class="tc-tiddler-body tc-clearfix" type="nomatch" stateTitle=<<folded-state>> text="hide" retain="yes" animate="yes">
<$reveal tag="div" class="tc-tiddler-body tc-clearfix" type="nomatch" stateTitle=<<folded-state>> text="hide" retain="yes" animate="yes" dir=<<tv-text-direction>>>
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateBodyFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/body/default]] }}} />

View File

@@ -2,4 +2,4 @@ title: $:/core/ui/ViewTemplate/subtitle
tags: $:/tags/ViewTemplate
\whitespace trim
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateSubtitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/subtitle/default]] }}} />
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateSubtitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/subtitle/default]] }}} />

View File

@@ -2,7 +2,7 @@ title: $:/core/ui/ViewTemplate/subtitle/default
\whitespace trim
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
<div class="tc-subtitle tc-clearfix">
<div class="tc-subtitle tc-clearfix" dir=<<tv-text-direction>>>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler">
<$transclude tiddler=<<subtitleTiddler>> mode="inline"/>
</$list>

View File

@@ -2,4 +2,4 @@ title: $:/core/ui/ViewTemplate/tags
tags: $:/tags/ViewTemplate
\whitespace trim
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTagsFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/tags/default]] }}} />
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTagsFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/tags/default]] }}} />

View File

@@ -2,7 +2,7 @@ title: $:/core/ui/ViewTemplate/tags/default
\whitespace trim
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
<div class="tc-tags-wrapper">
<div class="tc-tags-wrapper" dir=<<tv-text-direction>>>
<$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Tags]!has[draft.of]]">
<$transclude mode="inline"/>

View File

@@ -5,7 +5,7 @@ tags: $:/tags/ViewTemplate
\define title-styles() fill:$(foregroundColor)$;
<div class="tc-tiddler-title tc-clearfix">
<div class="tc-titlebar">
<div class="tc-titlebar" dir=<<tv-text-direction>>>
<span class="tc-tiddler-controls">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]"
storyview="pop"

View File

@@ -0,0 +1,2 @@
title: $:/config/DefaultTextDirection
text: auto

View File

@@ -1,58 +1,55 @@
title: $:/core/macros/colour-picker
tags: $:/tags/Macro
\define colour-picker-update-recent()
\procedure colour-picker-update-recent()
<$action-listops
$tiddler="$:/config/ColourPicker/Recent"
$subfilter="$(colour-picker-value)$ [list[$:/config/ColourPicker/Recent]remove[$(colour-picker-value)$]] +[limit[8]]"
$subfilter="[<colour-picker-value>] [list[$:/config/ColourPicker/Recent]remove<colour-picker-value>] +[limit[8]]"
/>
\end
\define colour-picker-inner(actions)
<$button tag="a" tooltip="""$(colour-picker-value)$""">
$(colour-picker-update-recent)$
<$transclude $variable="__actions__"/>
<span style="display:inline-block; background-color: $(colour-picker-value)$; width: 100%; height: 100%; border-radius: 50%;"/>
\procedure colour-picker-inner(actions)
<$button tag="a" tooltip=<<colour-picker-value>>>
<<colour-picker-update-recent>>
<$transclude $variable="actions"/>
<span style.display="inline-block" style.backgroundColor=<<colour-picker-value>> style.width="100%" style.height="100%" style.borderRadius="50%"/>
</$button>
\end
\define colour-picker-recent-inner(actions)
\whitespace trim
<$set name="colour-picker-value" value="$(recentColour)$">
<$macrocall $name="colour-picker-inner" actions=<<__actions__>>/>
\procedure colour-picker-recent-inner(actions)
<$set name="colour-picker-value" value=<<recentColour>>>
<$transclude $variable="colour-picker-inner" actions=<<actions>>/>
</$set>
\end
\define colour-picker-recent(actions)
\whitespace trim
\procedure colour-picker-recent(actions)
{{$:/language/ColourPicker/Recent}}<$list filter="[list[$:/config/ColourPicker/Recent]]" variable="recentColour">
&#32;
<$macrocall $name="colour-picker-recent-inner" actions=<<__actions__>>/>
<$transclude $variable="colour-picker-recent-inner" actions=<<actions>>/>
</$list>
\end
\define colour-picker(actions)
\whitespace trim
\procedure colour-picker(actions)
<div class="tc-colour-chooser">
<$macrocall $name="colour-picker-recent" actions=<<__actions__>>/>
<$transclude $variable="colour-picker-recent" actions=<<actions>>/>
---
<$list filter="LightPink Pink Crimson LavenderBlush PaleVioletRed HotPink DeepPink MediumVioletRed Orchid Thistle Plum Violet Magenta Fuchsia DarkMagenta Purple MediumOrchid DarkViolet DarkOrchid Indigo BlueViolet MediumPurple MediumSlateBlue SlateBlue DarkSlateBlue Lavender GhostWhite Blue MediumBlue MidnightBlue DarkBlue Navy RoyalBlue CornflowerBlue LightSteelBlue LightSlateGrey SlateGrey DodgerBlue AliceBlue SteelBlue LightSkyBlue SkyBlue DeepSkyBlue LightBlue PowderBlue CadetBlue Azure LightCyan PaleTurquoise Cyan Aqua DarkTurquoise DarkSlateGrey DarkCyan Teal MediumTurquoise LightSeaGreen Turquoise Aquamarine MediumAquamarine MediumSpringGreen MintCream SpringGreen MediumSeaGreen SeaGreen Honeydew LightGreen PaleGreen DarkSeaGreen LimeGreen Lime ForestGreen Green DarkGreen Chartreuse LawnGreen GreenYellow DarkOliveGreen YellowGreen OliveDrab Beige LightGoldenrodYellow Ivory LightYellow Yellow Olive DarkKhaki LemonChiffon PaleGoldenrod Khaki Gold Cornsilk Goldenrod DarkGoldenrod FloralWhite OldLace Wheat Moccasin Orange PapayaWhip BlanchedAlmond NavajoWhite AntiqueWhite Tan BurlyWood Bisque DarkOrange Linen Peru PeachPuff SandyBrown Chocolate SaddleBrown Seashell Sienna LightSalmon Coral OrangeRed DarkSalmon Tomato MistyRose Salmon Snow LightCoral RosyBrown IndianRed Red Brown FireBrick DarkRed Maroon White WhiteSmoke Gainsboro LightGrey Silver DarkGrey Grey DimGrey Black" variable="colour-picker-value">
&#32;
<$macrocall $name="colour-picker-inner" actions=<<__actions__>>/>
<$transclude $variable="colour-picker-inner" actions=<<actions>>/>
</$list>
---
<$edit-text tiddler="$:/config/ColourPicker/New" tag="input" default="" placeholder=""/>
&#32;
<$edit-text tiddler="$:/config/ColourPicker/New" tag="input" default="" placeholder="" class="tc-tiny-gap-right"/>
<$edit-text tiddler="$:/config/ColourPicker/New" type="color" tag="input"/>
<$set name="colour-picker-value" value={{$:/config/ColourPicker/New}}>
<$macrocall $name="colour-picker-inner" actions=<<__actions__>>/>
<%if [{$:/config/ColourPicker/New}!is[blank]] %>
<$transclude $variable="colour-picker-inner" actions=<<actions>>/>
<%endif%>
</$set>
</div>

View File

@@ -1,7 +1,7 @@
title: $:/core/macros/dumpvariables
tags: $:/tags/Macro
\define dumpvariables()
\procedure dumpvariables()
\whitespace trim
<ul>
<$list filter="[variables[]]" variable="varname">

View File

@@ -1,39 +1,36 @@
created: 20170715180840889
modified: 20170715180914005
tags: $:/tags/Macro
title: $:/core/macros/image-picker
type: text/vnd.tiddlywiki
\define image-picker-thumbnail(actions)
<$button tag="a" tooltip="""$(imageTitle)$"""><$transclude $variable="__actions__"/><$transclude tiddler=<<imageTitle>>/></$button>
\procedure image-picker-thumbnail(actions)
<$button tag="a" tooltip=<<imageTitle>>><$transclude $variable="actions"/><$transclude tiddler=<<imageTitle>>/></$button>
\end
\define image-picker-list(filter,actions)
\procedure image-picker-list(filter,actions)
\whitespace trim
<$list filter="""$filter$""" variable="imageTitle">
<$macrocall $name="image-picker-thumbnail" actions=<<__actions__>>/>
<$list filter=<<filter>> variable="imageTitle">
<$transclude $variable="image-picker-thumbnail" actions=<<actions>>/>
&#32;
</$list>
\end
\define image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]$subfilter$sort[title]]",subfilter:"")
\procedure image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]$subfilter$sort[title]]",subfilter:"")
\whitespace trim
<div class="tc-image-chooser">
<$vars state-system=<<qualify "$:/state/image-picker/system">>>
<$let state-system=<<qualify "$:/state/image-picker/system">> tv-filter={{{ [<filter>search-replace[$subfilter$],<subfilter>] }}}>
<$checkbox tiddler=<<state-system>> field="text" checked="show" unchecked="hide" default="hide">
&#32;
{{$:/language/SystemTiddlers/Include/Prompt}}
<span class="tc-tiny-gap-left">{{$:/language/SystemTiddlers/Include/Prompt}}</span>
</$checkbox>
<$reveal state=<<state-system>> type="match" text="hide" default="hide" tag="div">
<$macrocall $name="image-picker-list" filter="""$filter$ +[!is[system]]""" actions=<<__actions__>>/>
<$transclude $variable="image-picker-list" filter=`$(tv-filter)$ +[!is[system]]` actions=<<actions>>/>
</$reveal>
<$reveal state=<<state-system>> type="nomatch" text="hide" default="hide" tag="div">
<$macrocall $name="image-picker-list" filter="""$filter$""" actions=<<__actions__>>/>
<$transclude $variable="image-picker-list" filter=<<tv-filter>> actions=<<actions>>/>
</$reveal>
</$vars>
</$let>
</div>
\end
\define image-picker-include-tagged-images(actions)
<$macrocall $name="image-picker" filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]" actions=<<__actions__>>/>
\procedure image-picker-include-tagged-images(actions)
<$transclude $variable="image-picker" filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]" actions=<<actions>>/>
\end

View File

@@ -1,14 +1,18 @@
title: $:/core/macros/list
tags: $:/tags/Macro
\define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage,field:"caption")
\procedure list-links-draggable-drop-actions()
<$action-listops $tiddler=<<targetTiddler>> $field=<<targetField>> $subfilter="+[insertbefore<actionTiddler>,<currentTiddler>]"/>
\end
\whitespace trim
<$genesis $type=<<__type__>> class=<<__class__>>>
<$list filter=<<__filter__>> emptyMessage=<<__emptyMessage__>>>
<$genesis $type=<<__subtype__>>>
\procedure list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage,field:"caption")
<$genesis $type=<<type>> class=<<class>>>
<$list filter=<<filter>> emptyMessage=<<emptyMessage>>>
<$genesis $type=<<subtype>>>
<$link to={{!!title}}>
<$let tv-wikilinks="no">
<$transclude field=<<__field__>>>
<$transclude field=<<field>>>
<$view field="title"/>
</$transclude>
</$let>
@@ -18,24 +22,19 @@ tags: $:/tags/Macro
</$genesis>
\end
\define list-links-draggable-drop-actions()
<$action-listops $tiddler=<<targetTiddler>> $field=<<targetField>> $subfilter="+[insertbefore<actionTiddler>,<currentTiddler>]"/>
\end
\define list-links-draggable(tiddler,field:"list",emptyMessage,type:"ul",subtype:"li",class:"",itemTemplate)
\whitespace trim
\procedure list-links-draggable(tiddler,field:"list",emptyMessage,type:"ul",subtype:"li",class:"",itemTemplate)
<span class="tc-links-draggable-list">
<$vars targetTiddler="""$tiddler$""" targetField="""$field$""">
<$genesis $type=<<__type__>> class="$class$">
<$list filter="[list[$tiddler$!!$field$]]" emptyMessage=<<__emptyMessage__>>>
<$let targetTiddler=<<tiddler>> targetField=<<field>>>
<$genesis $type=<<type>> class=<<class>>>
<$list filter="[<tiddler>get<field>enlist-input[]]" emptyMessage=<<emptyMessage>>>
<$droppable
actions=<<list-links-draggable-drop-actions>>
tag="""$subtype$"""
tag=<<subtype>>
enable=<<tv-enable-drag-and-drop>>
>
<div class="tc-droppable-placeholder"/>
<div>
<$transclude tiddler="""$itemTemplate$""">
<$transclude tiddler=<<itemTemplate>>>
<$link to={{!!title}}>
<$let tv-wikilinks="no">
<$transclude field="caption">
@@ -60,50 +59,48 @@ tags: $:/tags/Macro
</$droppable>
</$tiddler>
</$genesis>
</$vars>
</$let>
</span>
\end
\define list-tagged-draggable-drop-actions(tag)
\whitespace trim
\procedure list-tagged-draggable-drop-actions(tag)
<!-- Save the current ordering of the tiddlers with this tag -->
<$set name="order" filter="[<__tag__>tagging[]]">
<$set name="order" filter="[<tag>tagging[]]">
<!-- Remove any list-after or list-before fields from the tiddlers with this tag -->
<$list filter="[<__tag__>tagging[]]">
<$list filter="[<tag>tagging[]]">
<$action-deletefield $field="list-before"/>
<$action-deletefield $field="list-after"/>
</$list>
<!-- Save the new order to the Tag Tiddler -->
<$action-listops $tiddler=<<__tag__>> $field="list" $filter="+[enlist<order>] +[insertbefore<actionTiddler>,<currentTiddler>]"/>
<$action-listops $tiddler=<<tag>> $field="list" $filter="+[enlist<order>] +[insertbefore<actionTiddler>,<currentTiddler>]"/>
<!-- Make sure the newly added item has the right tag -->
<!-- Removing this line makes dragging tags within the dropdown work as intended -->
<!--<$action-listops $tiddler=<<actionTiddler>> $tags=<<__tag__>>/>-->
<!--<$action-listops $tiddler=<<actionTiddler>> $tags=<<tag>>/>-->
<!-- Using the following 5 lines as replacement makes dragging titles from outside into the dropdown apply the tag -->
<$list filter="[<actionTiddler>!contains:tags<__tag__>]">
<$list filter="[<actionTiddler>!contains:tags<tag>]">
<$fieldmangler tiddler=<<actionTiddler>>>
<$action-sendmessage $message="tm-add-tag" $param=<<__tag__>>/>
<$action-sendmessage $message="tm-add-tag" $param=<<tag>>/>
</$fieldmangler>
</$list>
</$set>
\end
\define list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div",storyview:"")
\whitespace trim
\procedure list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div",storyview:"")
<span class="tc-tagged-draggable-list">
<$set name="tag" value=<<__tag__>>>
<$set name="tag" value=<<tag>>>
<$list
filter="[<__tag__>tagging[]$subFilter$]"
emptyMessage=<<__emptyMessage__>>
storyview=<<__storyview__>>
filter=`[<tag>tagging[]$(subFilter)$]`
emptyMessage=<<emptyMessage>>
storyview=<<storyview>>
>
<$genesis $type=<<__elementTag__>> class="tc-menu-list-item">
<$genesis $type=<<elementTag>> class="tc-menu-list-item">
<$droppable
actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>"""
actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<tag>>/>"""
enable=<<tv-enable-drag-and-drop>>
>
<$genesis $type=<<__elementTag__>> class="tc-droppable-placeholder"/>
<$genesis $type=<<__elementTag__>>>
<$transclude tiddler="""$itemTemplate$""">
<$genesis $type=<<elementTag>> class="tc-droppable-placeholder"/>
<$genesis $type=<<elementTag>>>
<$transclude tiddler=<<itemTemplate>>>
<$link to={{!!title}}>
<$view field="title"/>
</$link>
@@ -114,11 +111,11 @@ tags: $:/tags/Macro
</$list>
<$tiddler tiddler="">
<$droppable
actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>"""
actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<tag>>/>"""
enable=<<tv-enable-drag-and-drop>>
>
<$genesis $type=<<__elementTag__>> class="tc-droppable-placeholder"/>
<$genesis $type=<<__elementTag__>> style="height:0.5em;"/>
<$genesis $type=<<elementTag>> class="tc-droppable-placeholder"/>
<$genesis $type=<<elementTag>> style="height:0.5em;"/>
</$droppable>
</$tiddler>
</$set>

View File

@@ -1,28 +1,28 @@
title: $:/core/macros/translink
tags: $:/tags/Macro
\define translink(title,mode:"block")
\procedure translink(title,mode:"block")
\whitespace trim
<$list filter="[<__mode__>match[block]]">
<%if [<mode>match[block]] %>
<div class="tc-translink">
<div>
<$link to="""$title$""">
<h1><$text text="""$title$"""/></h1>
<$link to=<<title>>>
<h1><$text text=<<title>>/></h1>
</$link>
<$transclude tiddler="""$title$""" mode="block">
<$set name="currentTiddler" value="""$title$"""><$transclude tiddler="$:/language/MissingTiddler/Hint"/></$set>
<$transclude tiddler=<<title>> mode="block">
<$set name="currentTiddler" value=<<title>>><$transclude tiddler="$:/language/MissingTiddler/Hint"/></$set>
</$transclude>
</div>
</div>
</$list>
<$list filter="[<__mode__>match[inline]]">
<%endif%>
<%if [<mode>match[inline]] %>
<span class="tc-translink">
<$link to="""$title$""">
<$text text="""$title$"""/>
<$link to=<<title>> class="tc-tiny-gap-right">
<$text text=<<title>>/>
</$link>
&#32;(<$transclude tiddler="""$title$""" mode="inline">
<$set name="currentTiddler" value="""$title$"""><$transclude tiddler="$:/language/MissingTiddler/Hint"/></$set>
(<$transclude tiddler=<<title>> mode="inline">
<$set name="currentTiddler" value=<<title>>><$transclude tiddler="$:/language/MissingTiddler/Hint"/></$set>
</$transclude>)
</span>
</$list>
<%endif%>
\end

View File

@@ -1,62 +1,58 @@
title: $:/core/macros/tree
tags: $:/tags/Macro
\define leaf-link(full-title,chunk,separator: "/")
<$link to=<<__full-title__>>><$text text=<<__chunk__>>/></$link>
\procedure leaf-link(full-title,chunk,separator: "/")
<$link to=<<full-title>>><$text text=<<chunk>>/></$link>
\end
\define leaf-node(prefix,chunk)
\whitespace trim
\procedure leaf-node(prefix,chunk)
<li>
<$list filter="[<__prefix__>addsuffix<__chunk__>is[shadow]] [<__prefix__>addsuffix<__chunk__>is[tiddler]]" variable="full-title">
<$list filter="[<full-title>removeprefix<__prefix__>]" variable="chunk">
<span>{{$:/core/images/file}}</span>&#32;<$macrocall $name="leaf-link" full-title=<<full-title>> chunk=<<chunk>>/>
<$list filter="[<prefix>addsuffix<chunk>is[shadow]] [<prefix>addsuffix<chunk>is[tiddler]]" variable="full-title">
<$list filter="[<full-title>removeprefix<prefix>]" variable="chunk">
<span class="tc-tiny-gap-right">{{$:/core/images/file}}</span><$transclude $variable="leaf-link" full-title=<<full-title>> chunk=<<chunk>>/>
</$list>
</$list>
</li>
\end
\define branch-node(prefix,chunk,separator: "/")
\whitespace trim
\procedure branch-node(prefix,chunk,separator: "/")
<li>
<$set name="reveal-state" value={{{ [[$:/state/tree/]addsuffix<__prefix__>addsuffix<__chunk__>] }}}>
<$set name="reveal-state" value={{{ [[$:/state/tree/]addsuffix<prefix>addsuffix<chunk>] }}}>
<$reveal type="nomatch" stateTitle=<<reveal-state>> text="show">
<$button setTitle=<<reveal-state>> setTo="show" class="tc-btn-invisible">
{{$:/core/images/folder}}&#32;<$text text=<<__chunk__>>/>
{{$:/core/images/folder}}&#32;<$text text=<<chunk>>/>
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<reveal-state>> text="show">
<$button setTitle=<<reveal-state>> setTo="hide" class="tc-btn-invisible">
{{$:/core/images/folder}}&#32;<$text text=<<__chunk__>>/>
{{$:/core/images/folder}}&#32;<$text text=<<chunk>>/>
</$button>
</$reveal>
&#32;
<span>(<$count filter="[all[shadows+tiddlers]removeprefix<__prefix__>removeprefix<__chunk__>] -[<__prefix__>addsuffix<__chunk__>]"/>)</span>
<span class="tc-tiny-gap-left">(<$count filter="[all[shadows+tiddlers]removeprefix<prefix>removeprefix<chunk>] -[<prefix>addsuffix<chunk>]"/>)</span>
<$reveal type="match" stateTitle=<<reveal-state>> text="show">
<$macrocall $name="tree-node" prefix={{{ [<__prefix__>addsuffix<__chunk__>] }}} separator=<<__separator__>>/>
<$transclude $variable="tree-node" prefix={{{ [<prefix>addsuffix<chunk>] }}} separator=<<separator>>/>
</$reveal>
</$set>
</li>
\end
\define tree-node(prefix,separator: "/")
\whitespace trim
\procedure tree-node(prefix,separator: "/")
<ol>
<$list filter="[all[shadows+tiddlers]removeprefix<__prefix__>splitbefore<__separator__>sort[]!suffix<__separator__>]" variable="chunk">
<$macrocall $name="leaf-node" prefix=<<__prefix__>> chunk=<<chunk>> separator=<<__separator__>>/>
<$list filter="[all[shadows+tiddlers]removeprefix<prefix>splitbefore<separator>sort[]!suffix<separator>]" variable="chunk">
<$transclude $variable="leaf-node" prefix=<<prefix>> chunk=<<chunk>> separator=<<separator>>/>
</$list>
<$list filter="[all[shadows+tiddlers]removeprefix<__prefix__>splitbefore<__separator__>sort[]suffix<__separator__>]" variable="chunk">
<$macrocall $name="branch-node" prefix=<<__prefix__>> chunk=<<chunk>> separator=<<__separator__>>/>
<$list filter="[all[shadows+tiddlers]removeprefix<prefix>splitbefore<separator>sort[]suffix<separator>]" variable="chunk">
<$transclude $variable="branch-node" prefix=<<prefix>> chunk=<<chunk>> separator=<<separator>>/>
</$list>
</ol>
\end
\define tree(prefix: "$:/",separator: "/")
\whitespace trim
\procedure tree(prefix: "$:/",separator: "/")
<div class="tc-tree">
<span><$text text=<<__prefix__>>/></span>
<span><$text text=<<prefix>>/></span>
<div>
<$macrocall $name="tree-node" prefix=<<__prefix__>> separator=<<__separator__>>/>
<$transclude $variable="tree-node" prefix=<<prefix>> separator=<<separator>>/>
</div>
</div>
\end

View File

@@ -11,7 +11,6 @@ type: text/vnd.tiddlywiki
# Move the latest release note from the prerelease edition into the tw5.com edition
# Adjust the release date and the ''released'' field of the latest release tiddler (eg, [[Release 5.1.3]])
# Also adjust the github.com comparison link to point to the tag for the new release
# Adjust the tiddler [[TiddlyWiki Archive]] to include the new version number
# Ensure [[TiddlyWiki Releases]] has the new version as the default tab
# Adjust the modified time of HelloThere
# Make sure ''master'' is fully committed

View File

@@ -0,0 +1,63 @@
caption: 5.3.8
created: 20250717140646135
modified: 20250717140646135
tags: ReleaseNotes
title: Release 5.3.8
type: text/vnd.tiddlywiki
description: Under development
//[[See GitHub for detailed change history of this release|https://github.com/TiddlyWiki/TiddlyWiki5/compare/v5.3.7...master]]//
! New Features
-
! Translation improvements
* Chinese
! Plugin Improvements
*
! Widget Improvements
*
! Usability Improvements
*
! Palette Improvements
*
! Hackability Improvements
*
! Bug Fixes
* <<.link-badge-reverted "https://github.com/TiddlyWiki/TiddlyWiki5/pull/9156">> the [[change in v5.3.7|https://github.com/TiddlyWiki/TiddlyWiki5/pull/8721]] to the handling of caption fields by the [[list-tagged-draggable Macro]]
* <<.link-badge-fixed "https://github.com/TiddlyWiki/TiddlyWiki5/commit/93d30f374da4a6b2037b335f7f7d4eddce8192db">> display of field names longer than the available width in the info panel
! 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 """
""">>

View File

@@ -19,8 +19,8 @@ title: Output
+
title: ExpectedResult
<p>
<p dir="auto">
This is a Elephant, I think.
</p><p>
</p><p dir="auto">
This is a , I think.
</p>

View File

@@ -19,8 +19,8 @@ title: Output
+
title: ExpectedResult
<p>
<p dir="auto">
This is a Elephant, I think.
</p><p>
</p><p dir="auto">
This is a Crocodile, I think.
</p>

View File

@@ -23,10 +23,10 @@ title: Output
+
title: ExpectedResult
<p>
<p dir="auto">
This is a Elephant, I think.
</p><p>
</p><p dir="auto">
This is a Antelope, I think.
</p><p>
</p><p dir="auto">
This is a Crocodile, I think.
</p>

View File

@@ -19,8 +19,8 @@ title: Output
+
title: ExpectedResult
<p>
<p dir="auto">
This is a Elephant
</p><p>
</p><p dir="auto">
This is a
</p>

View File

@@ -9,4 +9,4 @@ This is a <%if 1 2 3 4 5 6 %>Elephant<%endif%>, I think.
+
title: ExpectedResult
<p>This is a Elephant, I think.</p>
<p dir="auto">This is a Elephant, I think.</p>

View File

@@ -47,14 +47,14 @@ title: Output
+
title: ExpectedResult
<p>
<p dir="auto">
This is a Indian Elephant, I think.
</p><p>
</p><p dir="auto">
This is a African Elephant, I think.
</p><p>
</p><p dir="auto">
This is a Unknown Elephant, I think.
</p><p>
</p><p dir="auto">
This is a Antelope, I think.
</p><p>
</p><p dir="auto">
This is a Crocodile, I think.
</p>

View File

@@ -21,4 +21,4 @@ title: Output
+
title: ExpectedResult
<p>246-492</p>
<p dir="auto">246-492</p>

View File

@@ -21,4 +21,4 @@ title: Output
+
title: ExpectedResult
<p>492-984|492-984</p>
<p dir="auto">492-984|492-984</p>

View File

@@ -18,4 +18,4 @@ title: Output
+
title: ExpectedResult
<p>246|246</p>
<p dir="auto">246|246</p>

View File

@@ -24,4 +24,4 @@ This is a payload tiddler from a compound tiddler
+
title: ExpectedResult
<p><div class="tc-test-case "><div>[{"title":"Payload Tiddler","tags":"Alpha Beta Gamma","text":"This is a payload tiddler from a compound tiddler","custom":"Alpha"}]</div></div></p>
<p dir="auto"><div class="tc-test-case "><div>[{"title":"Payload Tiddler","tags":"Alpha Beta Gamma","text":"This is a payload tiddler from a compound tiddler","custom":"Alpha"}]</div></div></p>

View File

@@ -20,4 +20,4 @@ This is the tiddler HelloThere
+
title: ExpectedResult
<p><div class="tc-test-case "><div>[{"title":"RealTitle","tags":"Definitions","text":"This is the tiddler HelloThere"}]</div></div></p>
<p dir="auto"><div class="tc-test-case "><div>[{"title":"RealTitle","tags":"Definitions","text":"This is the tiddler HelloThere"}]</div></div></p>

View File

@@ -25,4 +25,4 @@ This is the tiddler AnotherDefinition
+
title: ExpectedResult
<p><div class="tc-test-case "><div>[{"title":"AnotherDefinition","tags":"Definitions","text":"This is the tiddler AnotherDefinition","custom":"Alpha"},{"title":"HelloThere","tags":"Definitions","text":"This is the tiddler HelloThere","custom":"Alpha"}]</div></div></p>
<p dir="auto"><div class="tc-test-case "><div>[{"title":"AnotherDefinition","tags":"Definitions","text":"This is the tiddler AnotherDefinition","custom":"Alpha"},{"title":"HelloThere","tags":"Definitions","text":"This is the tiddler HelloThere","custom":"Alpha"}]</div></div></p>

View File

@@ -20,4 +20,4 @@ This is the tiddler HelloThere
+
title: ExpectedResult
<p><div class="tc-test-case "><div>[{"title":"HelloThere","tags":"Definitions","text":"This is the tiddler HelloThere","custom":"Alpha"}]</div></div></p>
<p dir="auto"><div class="tc-test-case "><div>[{"title":"HelloThere","tags":"Definitions","text":"This is the tiddler HelloThere","custom":"Alpha"}]</div></div></p>

View File

@@ -15,4 +15,4 @@ title: Output
+
title: ExpectedResult
<p><div class="tc-test-case my-class an-other-class"><div>[{"title":"Epsilon","text":"Theta"}]</div></div></p>
<p dir="auto"><div class="tc-test-case my-class an-other-class"><div>[{"title":"Epsilon","text":"Theta"}]</div></div></p>

View File

@@ -13,7 +13,7 @@ title: Output
+
title: ExpectedResult
<p>(SmVyZW15MTIzNA==)
<p dir="auto">(SmVyZW15MTIzNA==)
()
(Jeremy1234)
()</p>

View File

@@ -18,7 +18,7 @@ the hat saw in every category
+
title: ExpectedResult
<p>@@ -1,22 +1,29 @@
<p dir="auto">@@ -1,22 +1,29 @@
the
-c
+h

View File

@@ -12,4 +12,4 @@ title: Output
+
title: ExpectedResult
<p>/**-- Excessive filter recursion --**/</p>
<p dir="auto">/**-- Excessive filter recursion --**/</p>

View File

@@ -7,21 +7,21 @@ title: Output
\whitespace trim
<$list variable="var" filter="[[existing variable should have output]] :filter[[..currentTiddler]is[variable]]">
<p><<var>></p>
<p dir="auto"><<var>></p>
</$list>
<$list variable="var" filter="[[non-existing variable should not have output]] :filter[[nonExistingVariable]is[variable]]">
<p><<var>></p>
<p dir="auto"><<var>></p>
</$list>
<$list variable="var" filter="[[existing variable negated should not have output]] :filter[[..currentTiddler]!is[variable]]">
<p><<var>></p>
<p dir="auto"><<var>></p>
</$list>
<$list variable="var" filter="[[non-existing variable negated should have output]] :filter[[nonExistingVariable]!is[variable]]">
<p><<var>></p>
<p dir="auto"><<var>></p>
</$list>
+
title: ExpectedResult
<p><p>existing variable should have output</p></p><p></p><p></p><p><p>non-existing variable negated should have output</p></p>
<p dir="auto"><p dir="auto">existing variable should have output</p></p><p dir="auto"></p><p dir="auto"></p><p dir="auto"><p dir="auto">non-existing variable negated should have output</p></p>

View File

@@ -31,7 +31,7 @@ title: Output
+
title: ExpectedResult
<p>()
<p dir="auto">()
(Hello There, welcome to $TiddlyWiki$)
(Welcome to TiddlyWiki)
(Welcome to TiddlyWiki today)

View File

@@ -21,4 +21,4 @@ title: Output
+
title: ExpectedResult
<p>16|32</p>
<p dir="auto">16|32</p>

View File

@@ -21,4 +21,4 @@ title: Output
+
title: ExpectedResult
<p>Idiosyncrasy Caption Field,Idiosyncrasy Caption Field</p>
<p dir="auto">Idiosyncrasy Caption Field,Idiosyncrasy Caption Field</p>

View File

@@ -21,4 +21,4 @@ title: Output
+
title: ExpectedResult
<p>64|192</p>
<p dir="auto">64|192</p>

View File

@@ -21,4 +21,4 @@ title: Output
+
title: ExpectedResult
<p>64|192</p>
<p dir="auto">64|192</p>

View File

@@ -7,7 +7,7 @@ title: Output
\whitespace trim
\function .buffalo(p)
[.buffalo<p>]
[.buffalo<p dir="auto">]
\end
<$text text=<<.buffalo 8>>/>

View File

@@ -19,4 +19,4 @@ title: Output
+
title: ExpectedResult
hello world<p>hello world</p>hello <p>hello </p>
hello world<p dir="auto">hello world</p>hello <p dir="auto">hello </p>

View File

@@ -33,4 +33,4 @@ $param$ with a ''buffalo''
+
title: ExpectedResult
<p>Going to lunch with a ''buffalo''</p><p>Going to breakfastwith a<strong>buffalo</strong></p><p>Going to dinner with a <strong>buffalo</strong></p>Going to lunch with a ''buffalo''Going to breakfastwith abuffaloGoing to dinner with a buffalo
<p dir="auto">Going to lunch with a ''buffalo''</p><p dir="auto">Going to breakfastwith a<strong>buffalo</strong></p><p dir="auto">Going to dinner with a <strong>buffalo</strong></p>Going to lunch with a ''buffalo''Going to breakfastwith abuffaloGoing to dinner with a buffalo

View File

@@ -27,4 +27,4 @@ Block forced inline
+
title: ExpectedResult
<div class=" tc-reveal"><p>Block</p></div><div class=" tc-reveal"><p>Block forced block</p></div><span class=" tc-reveal"><p>Block forced inline</p></span><p><span class=" tc-reveal">Inline</span><div class=" tc-reveal">Inline forced block</div><span class=" tc-reveal">Inline forced inline</span></p>
<div class=" tc-reveal"><p dir="auto">Block</p></div><div class=" tc-reveal"><p dir="auto">Block forced block</p></div><span class=" tc-reveal"><p dir="auto">Block forced inline</p></span><p dir="auto"><span class=" tc-reveal">Inline</span><div class=" tc-reveal">Inline forced block</div><span class=" tc-reveal">Inline forced inline</span></p>

View File

@@ -11,4 +11,4 @@ title: Output
+
title: ExpectedResult
<p>(Kitten)(Kitten)</p>
<p dir="auto">(Kitten)(Kitten)</p>

View File

@@ -11,4 +11,4 @@ title: Output
+
title: ExpectedResult
<p>Mouse</p><p>Mouse</p>
<p dir="auto">Mouse</p><p dir="auto">Mouse</p>

View File

@@ -11,4 +11,4 @@ title: Output
+
title: ExpectedResult
<p>(Shark|Donkey)(Shark|Donkey)</p>
<p dir="auto">(Shark|Donkey)(Shark|Donkey)</p>

View File

@@ -26,6 +26,6 @@ title: Output
+
title: ExpectedResult
<p>(--Elephant--)
<p dir="auto">(--Elephant--)
(--Kangaroo--)
(--Giraffe--)</p>

View File

@@ -11,4 +11,4 @@ title: Output
+
title: ExpectedResult
<p><div>Mouse</div><div class="tc-thing" label="Squeak">Mouse</div></p>
<p dir="auto"><div>Mouse</div><div class="tc-thing" label="Squeak">Mouse</div></p>

View File

@@ -20,4 +20,4 @@ title: Definitions
+
title: ExpectedResult
<p>elephant,giraffe</p>
<p dir="auto">elephant,giraffe</p>

View File

@@ -20,4 +20,4 @@ title: Definitions
+
title: ExpectedResult
<p>elephant,giraffe</p>
<p dir="auto">elephant,giraffe</p>

View File

@@ -27,4 +27,4 @@ Bunny Hill
+
title: ExpectedResult
<p>Bugs Bunny,Bunny Hill,elephant,giraffe</p>
<p dir="auto">Bugs Bunny,Bunny Hill,elephant,giraffe</p>

View File

@@ -10,4 +10,4 @@ title: Output
+
title: ExpectedResult
<p><p></p></p>
<p dir="auto"><p></p></p>

View File

@@ -26,4 +26,4 @@ title: Output
+
title: ExpectedResult
<p>123</p><p>None!</p>
<p dir="auto">123</p><p dir="auto">None!</p>

View File

@@ -30,4 +30,4 @@ title: Template
+
title: ExpectedResult
<p>112233</p><p>Zero</p>
<p dir="auto">112233</p><p dir="auto">Zero</p>

View File

@@ -27,4 +27,4 @@ title: Output
+
title: ExpectedResult
<p>Item:1,Item:2,Item:3</p><p>None!</p>
<p dir="auto">Item:1,Item:2,Item:3</p><p dir="auto">None!</p>

View File

@@ -29,4 +29,4 @@ title: Output
title: ExpectedResult
comment: I wish there was a good way to get rid of these extraneous paragraph elements
<p>Item:1</p><p></p><p></p><br><p>Item:2</p><p></p><p></p><br><p>Item:3</p><p></p><p></p>None!
<p dir="auto">Item:1</p><p dir="auto"></p><p dir="auto"></p><br><p dir="auto">Item:2</p><p dir="auto"></p><p dir="auto"></p><br><p dir="auto">Item:3</p><p dir="auto"></p><p dir="auto"></p>None!

View File

@@ -21,5 +21,5 @@ title: Template
+
title: ExpectedResult
<p>Zero: </p><p>One: 1</p><p>Two: 12</p><p>Minus Two: 34
<p dir="auto">Zero: </p><p dir="auto">One: 1</p><p dir="auto">Two: 12</p><p dir="auto">Minus Two: 34
</p>

View File

@@ -23,4 +23,4 @@ title: Output
+
title: ExpectedResult
<p><span><a class="tc-tiddlylink tc-tiddlylink-missing" href="#1">1</a></span><span><a class="tc-tiddlylink tc-tiddlylink-missing" href="#2">2</a></span><span><a class="tc-tiddlylink tc-tiddlylink-missing" href="#3">3</a></span></p><p>None!</p>
<p dir="auto"><span><a class="tc-tiddlylink tc-tiddlylink-missing" href="#1">1</a></span><span><a class="tc-tiddlylink tc-tiddlylink-missing" href="#2">2</a></span><span><a class="tc-tiddlylink tc-tiddlylink-missing" href="#3">3</a></span></p><p dir="auto">None!</p>

View File

@@ -13,4 +13,4 @@ Out: <<hello>>
+
title: ExpectedResult
<p>Out: hello \end</p>
<p dir="auto">Out: hello \end</p>

View File

@@ -13,4 +13,4 @@ Out: <<hello>>
+
title: ExpectedResult
<p>Out: hello \end</p>
<p dir="auto">Out: hello \end</p>

View File

@@ -13,4 +13,4 @@ Out: <<hello>>
+
title: ExpectedResult
<p>Out: \end goodbye</p>
<p dir="auto">Out: \end goodbye</p>

View File

@@ -14,5 +14,5 @@ Out: <<max>>
+
title: ExpectedResult
<p>Nothing
\end</p><p>Out: </p>
<p dir="auto">Nothing
\end</p><p dir="auto">Out: </p>

View File

@@ -12,4 +12,4 @@ Out: <<empty>>
+
title: ExpectedResult
<p>Out: </p>
<p dir="auto">Out: </p>

View File

@@ -33,4 +33,4 @@ title: Output
+
title: ExpectedResult
<p>Jaguar</p>
<p dir="auto">Jaguar</p>

View File

@@ -33,4 +33,4 @@ title: Output
+
title: ExpectedResult
<p>Jaguar</p>
<p dir="auto">Jaguar</p>

View File

@@ -33,4 +33,4 @@ Jaguar
+
title: ExpectedResult
<p>Jaguar</p>
<p dir="auto">Jaguar</p>

View File

@@ -19,4 +19,4 @@ Paragraph 2
+
title: ExpectedResult
<p>Paragraph 1</p><p>Paragraph 2</p>
<p dir="auto">Paragraph 1</p><p dir="auto">Paragraph 2</p>

View File

@@ -24,4 +24,4 @@ title: Output
+
title: ExpectedResult
<p>test 1</p><p>asdf 1</p>
<p dir="auto">test 1</p><p dir="auto">asdf 1</p>

View File

@@ -20,4 +20,4 @@ title: Output
+
title: ExpectedResult
<p>New Tiddler 1</p><p>New Tiddler 1</p><p>New Tiddler 1</p>
<p dir="auto">New Tiddler 1</p><p dir="auto">New Tiddler 1</p><p dir="auto">New Tiddler 1</p>

View File

@@ -17,4 +17,4 @@ title: Output
+
title: ExpectedResult
<p>New Tiddler</p><p>New Tiddler</p><p>New Tiddler</p>
<p dir="auto">New Tiddler</p><p dir="auto">New Tiddler</p><p dir="auto">New Tiddler</p>

View File

@@ -25,4 +25,4 @@ title: Output
+
title: ExpectedResult
<p>New Tiddler 1</p><p>New Tiddler-1</p><p>anotherBase 1</p><p>About-1</p>
<p dir="auto">New Tiddler 1</p><p dir="auto">New Tiddler-1</p><p dir="auto">anotherBase 1</p><p dir="auto">About-1</p>

View File

@@ -25,4 +25,4 @@ title: Output
+
title: ExpectedResult
<p>New Tiddler</p><p>New Tiddler</p><p>anotherBase</p><p>About</p><p>New Tiddler 3</p><p>invalid start</p><p>invalid count</p>
<p dir="auto">New Tiddler</p><p dir="auto">New Tiddler</p><p dir="auto">anotherBase</p><p dir="auto">About</p><p dir="auto">New Tiddler 3</p><p dir="auto">invalid start</p><p dir="auto">invalid count</p>

View File

@@ -47,4 +47,4 @@ title: Output
+
title: ExpectedResult
<p>New Tiddler 1</p><p>xxx-y-1</p><p>01-New Tiddler</p><p>0002 asdf</p><p>0001 abc</p>
<p dir="auto">New Tiddler 1</p><p dir="auto">xxx-y-1</p><p dir="auto">01-New Tiddler</p><p dir="auto">0002 asdf</p><p dir="auto">0001 abc</p>

View File

@@ -21,4 +21,4 @@ title: Output
+
title: ExpectedResult
<p>New Tiddler</p><p>xxx</p><p>00-New Tiddler</p><p>0000 asdf</p>
<p dir="auto">New Tiddler</p><p dir="auto">xxx</p><p dir="auto">00-New Tiddler</p><p dir="auto">0000 asdf</p>

View File

@@ -24,4 +24,4 @@ title: Output
+
title: ExpectedResult
<p>New Tiddler 0xx</p><p>New Tiddler 4xx</p><p>New Tiddler 11xx</p><p>emptyCount 00xx</p><p>invalid start 0xx</p><p>invalid count 0xx</p>
<p dir="auto">New Tiddler 0xx</p><p dir="auto">New Tiddler 4xx</p><p dir="auto">New Tiddler 11xx</p><p dir="auto">emptyCount 00xx</p><p dir="auto">invalid start 0xx</p><p dir="auto">invalid count 0xx</p>

View File

@@ -25,4 +25,4 @@ title: Output
+
title: ExpectedResult
<p>New Tiddler</p><p>count-missing0</p><p>00-new</p><p>00-base</p><p>00-New Tiddler</p><p>00-asdf</p><p>00 asdf</p>
<p dir="auto">New Tiddler</p><p dir="auto">count-missing0</p><p dir="auto">00-new</p><p dir="auto">00-base</p><p dir="auto">00-New Tiddler</p><p dir="auto">00-asdf</p><p dir="auto">00 asdf</p>

View File

@@ -21,7 +21,7 @@ title: Actions
+
title: ExpectedResult
<p>text: {
<p dir="auto">text: {
"tiddlers": {
"Elephants": {
"title": "Elephants"

View File

@@ -21,7 +21,7 @@ title: Actions
+
title: ExpectedResult
<p>text: {
<p dir="auto">text: {
"tiddlers": {
"Elephants": {
"title": "Elephants"

View File

@@ -22,7 +22,7 @@ title: Actions
+
title: ExpectedResult
<p>text: {
<p dir="auto">text: {
"tiddlers": {
"Elephants": {
"title": "Elephants"

Some files were not shown because too many files have changed in this diff Show More