From 077a747b6e0361f893f5283d8d2ddcbee0d0ab8d Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sun, 28 Jul 2024 22:51:29 +0100 Subject: [PATCH 01/44] Add an link to the prerelease --- editions/tw5.com/tiddlers/releasenotes/Releases.tid | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editions/tw5.com/tiddlers/releasenotes/Releases.tid b/editions/tw5.com/tiddlers/releasenotes/Releases.tid index 57e5d3fd4..bd68f1ac6 100644 --- a/editions/tw5.com/tiddlers/releasenotes/Releases.tid +++ b/editions/tw5.com/tiddlers/releasenotes/Releases.tid @@ -6,6 +6,8 @@ type: text/vnd.tiddlywiki New releases of TiddlyWiki and TiddlyDesktop are announced via the [[official discussion groups|Forums]] and [[Twitter|https://twitter.com/TiddlyWiki]] +The prerelease of the next version of TiddlyWiki can be found at https://tiddlywiki.com/prerelease for testing and review purposes. + See the [[TiddlyWiki Archive]] to download older versions. <> From 4acf7a580fb5cdb914af8e7cd859a2992a2d5849 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Tue, 30 Jul 2024 11:00:22 +0200 Subject: [PATCH 02/44] Add info about `tc-tiddlylink-shadow tc-tiddlylink-resolves` to the LinkWidget (#8454) --- editions/tw5.com/tiddlers/widgets/LinkWidget.tid | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid index 000b3219f..8daf3f4e1 100644 --- a/editions/tw5.com/tiddlers/widgets/LinkWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/LinkWidget.tid @@ -1,6 +1,6 @@ caption: link created: 20131024141900000 -modified: 20231113093304323 +modified: 20240730065043721 tags: Widgets title: LinkWidget type: text/vnd.tiddlywiki @@ -69,11 +69,13 @@ This causes the tooltip to be the ''tooltip'' field of the target tiddler. If th The link widget automatically determines and applies the following classes to links: -* `tc-tiddlylink` - applied to all links +* `tc-tiddlylink` - applied to ''all'' links * `tc-tiddlylink-external` - applied to external, non-tiddler links * `tc-tiddlylink-internal` - applied to tiddler links * `tc-tiddlylink-missing` - applied to tiddler links where the target tiddler doesn't exist * `tc-tiddlylink-resolves` - applied to tiddler links when the target tiddler does exist +* `tc-tiddlylink-shadow` - applied to tiddler links when the target is a shadow tiddler +** `tc-tiddlylink-shadow tc-tiddlylink-resolves` - applied to ''overwritten'' shadow tiddlers Use the `class` attribute to specify additional css classes, or `overrideClass` to apply only that but not the above defaults, e.g. when used in a LinkCatcherWidget: From ada5af5af4b8c5f1684b67394844504a52a52718 Mon Sep 17 00:00:00 2001 From: Bram Chen Date: Tue, 30 Jul 2024 18:45:06 +0800 Subject: [PATCH 03/44] Update chinese language files (#8453) * imrove simplied chinese translations for Snippets/ProcedureDefinition * add chinese translations for text/vnd.tiddlywiki-multiple --- languages/zh-Hans/Snippets/ProcedureDefinition.tid | 4 ++-- languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid | 5 +++++ languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid create mode 100644 languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid diff --git a/languages/zh-Hans/Snippets/ProcedureDefinition.tid b/languages/zh-Hans/Snippets/ProcedureDefinition.tid index d6445349b..3b4f60212 100644 --- a/languages/zh-Hans/Snippets/ProcedureDefinition.tid +++ b/languages/zh-Hans/Snippets/ProcedureDefinition.tid @@ -2,6 +2,6 @@ title: $:/language/Snippets/ProcedureDefinition tags: $:/tags/TextEditor/Snippet caption: 程序定义 -\procedure procName(param1:"预设值",param2) -这里就是您的文字了。 +\procedure procName(param1:"默认值",param2) +这里就是您的文本了。 \end diff --git a/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid b/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid new file mode 100644 index 000000000..dd8e72be9 --- /dev/null +++ b/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid @@ -0,0 +1,5 @@ +title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple +description: TiddlyWiki 5 复合条目 +name: text/vnd.tiddlywiki-multiple +group: 开发者 +group-sort: 2 diff --git a/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid b/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid new file mode 100644 index 000000000..745734788 --- /dev/null +++ b/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid @@ -0,0 +1,5 @@ +title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple +description: TiddlyWiki 5 複合條目 +name: text/vnd.tiddlywiki-multiple +group: 開發者 +group-sort: 2 From 22286aa569ae1c829285c84c158bf018808cfe72 Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Wed, 31 Jul 2024 20:38:25 +0800 Subject: [PATCH 04/44] Add image toolbar dropdown to markdown plugin (#8459) * Add image toolbar dropdown to markdown plugin * Escape special characters --- .../EditorToolbar/picture-dropdown.tid | 24 +++++++++++++++++++ .../markdown/EditorToolbar/picture.tid | 10 ++++++++ 2 files changed, 34 insertions(+) create mode 100644 plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown.tid create mode 100644 plugins/tiddlywiki/markdown/EditorToolbar/picture.tid diff --git a/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown.tid b/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown.tid new file mode 100644 index 000000000..966c991fd --- /dev/null +++ b/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown.tid @@ -0,0 +1,24 @@ +title: $:/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown + +\define replacement-text() +![](<#$(escaped-text)$>) +\end + +\define escapetitle() [()<>\\] + +''{{$:/language/Buttons/Picture/Hint}}'' + +<$macrocall $name="image-picker" actions=""" + +<$let escaped-text={{{ [search-replace:g:regexp,[\$&]] }}}> +<$action-sendmessage + $message="tm-edit-text-operation" + $param="replace-selection" + text=<> +/> + +<$action-deletetiddler + $tiddler=<> +/> + +"""/> diff --git a/plugins/tiddlywiki/markdown/EditorToolbar/picture.tid b/plugins/tiddlywiki/markdown/EditorToolbar/picture.tid new file mode 100644 index 000000000..27e108c81 --- /dev/null +++ b/plugins/tiddlywiki/markdown/EditorToolbar/picture.tid @@ -0,0 +1,10 @@ +title: $:/plugins/tiddlywiki/markdown/EditorToolbar/picture +list-after: $:/core/ui/EditorToolbar/picture +tags: $:/tags/EditorToolbar +icon: $:/core/images/picture +caption: {{$:/language/Buttons/Picture/Caption}} (Markdown) +description: {{$:/language/Buttons/Picture/Hint}} +condition: [type[text/x-markdown]] [type[text/markdown]] +shortcuts: ((picture)) +dropdown: $:/plugins/tiddlywiki/markdown/EditorToolbar/picture-dropdown + From 792947bd8c84a41e813b5bbfc3a2f1e351d01fe4 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Thu, 1 Aug 2024 12:27:23 +0200 Subject: [PATCH 05/44] [Docs] Fix some typos: tidder -> tiddler (#8464) --- .../tiddlers/nodejs/Customising Tiddler File Naming.tid | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/editions/tw5.com/tiddlers/nodejs/Customising Tiddler File Naming.tid b/editions/tw5.com/tiddlers/nodejs/Customising Tiddler File Naming.tid index 084586e77..14e324456 100644 --- a/editions/tw5.com/tiddlers/nodejs/Customising Tiddler File Naming.tid +++ b/editions/tw5.com/tiddlers/nodejs/Customising Tiddler File Naming.tid @@ -6,7 +6,7 @@ type: text/vnd.tiddlywiki By default, a [[TiddlyWiki on Node.js]] instance using a [[wiki folder|TiddlyWikiFolders]] will create new tiddler files by using the sanitised and disambiguated title as filename. All filepath operations are relative to a `default-tiddler-location` which defaults to the wiki folder's `tiddlers/` directory. This can be overridden by mapping a path in the wiki's tiddlywiki.info file, by using a `default-tiddler-location` property in the `config` object. -The default file extension of `.tid` is used for tiddlers that are missing the `type` field, or for tiddlers of type "text/vnd.tiddlywiki". Tidders of other types are saved according to their MIME types (defined at boot startup). +The default file extension of `.tid` is used for tiddlers that are missing the `type` field, or for tiddlers of type "text/vnd.tiddlywiki". Tiddlers of other types are saved according to their MIME types (defined at boot startup). Both the logical path (directory and file name) and the file extension can be customised independently by creating optional tiddlers [[$:/config/FileSystemPaths]] and [[$:/config/FileSystemExtensions]]. @@ -29,7 +29,7 @@ Logical paths do not include the file-on-disk's extension (see below), and they <<.note "All paths are relative to the wiki's `default-tiddler-location`.">> -This will store newly created system tiddlers that are not drafts of other tiddlers in `./_system/` (after stripping the `$:/` prefix). Next, all drafts have the path separator characters in their titles replaced by "_" and are stored in `./drafts/`. Then tiddlers tagged [[task]] are stored in a subdirectory `./mytasks/`. Finally, all tidders not tagged with "externalnote" will match the final `[!tag[externalnote]addprefix[wiki/]]` storing these in `./wiki/`. In this example, tiddlers tagged with "externalnote" have been imported using [[tiddlywiki.files Files]] with an "isEditableFile" flag set to true, causing the server to remember their original file path in the $:/config/OriginalTiddlerPaths tiddler. +This will store newly created system tiddlers that are not drafts of other tiddlers in `./_system/` (after stripping the `$:/` prefix). Next, all drafts have the path separator characters in their titles replaced by "_" and are stored in `./drafts/`. Then tiddlers tagged [[task]] are stored in a subdirectory `./mytasks/`. Finally, all tiddlers not tagged with "externalnote" will match the final `[!tag[externalnote]addprefix[wiki/]]` storing these in `./wiki/`. In this example, tiddlers tagged with "externalnote" have been imported using [[tiddlywiki.files Files]] with an "isEditableFile" flag set to true, causing the server to remember their original file path in the $:/config/OriginalTiddlerPaths tiddler. Whenever a tiddler generates a $:/config/FileSystemPaths filter match, any `/` or `\` in the tiddler title is mapped to a path separator. With the above filters, the non-system, non-draft tiddler titled `some/thing/entirely/new` (with no tags) will be saved to `./wiki/some/thing/entirely/new.tid` (ie, the file `new.tid` in a directory called `entirely/`). Thus, $:/config/FileSystemPaths itself will end up in `./_system/config/FileSystemPaths.tid` or `.\_system\config\FileSystemPaths.tid`, depending on the platform. @@ -39,7 +39,7 @@ Normally, the file system extension of a tiddler on disk is determined by the pr If the tiddler does not have such field values, then the `type` field is referenced to find a matching file-type, with `.tid` used for tiddlers without a type value. The boot engine defines a set of these tiddler-type to file-type relationships in the [[$:/boot/boot.js]] tiddler. Search for `// Add file extension information` to find the section of code that defines these relationships. -The file extension of individual tidders can be customised by creating a tiddler [[$:/config/FileSystemExtensions]] containing one or more [[filter expressions|Filter Syntax]], each on a line of its own. Every time a tiddler is saved to disk it is tested against these filters, and the first output of the first filter to produce any output is taken as the file extension to be used for the tiddler file. Extensions should always start with a leading dot (see example). If no filter matches, the default extension is used. If the extension has changed a new file is created and the old file is deleted. +The file extension of individual tiddlers can be customised by creating a tiddler [[$:/config/FileSystemExtensions]] containing one or more [[filter expressions|Filter Syntax]], each on a line of its own. Every time a tiddler is saved to disk it is tested against these filters, and the first output of the first filter to produce any output is taken as the file extension to be used for the tiddler file. Extensions should always start with a leading dot (see example). If no filter matches, the default extension is used. If the extension has changed a new file is created and the old file is deleted. <<.note """A result of ".tid" will force the tiddler to be written to disk as a single-file text tiddler. A result of ".json" will force the tiddler to be written to disk as a single file tiddler in json-format (a single tiddler fields object in an array), NOT as a tiddler of type "application/json". All other recognised file-types will be saved using their defined extension along with an accompanying *.meta file of the same name which describes all fields but the "text" field.""">> @@ -51,6 +51,6 @@ The file extension of individual tidders can be customised by creating a tiddler [tag[.tid]then[.tid]] ``` -This will cause all tidders that have the tag ".txt" to be saved at the filepath determined by the File System Paths filters, but with their text field saved as a *.txt file, and all other fields saved as a *.txt.meta file. +This will cause all tiddlers that have the tag ".txt" to be saved at the filepath determined by the File System Paths filters, but with their text field saved as a *.txt file, and all other fields saved as a *.txt.meta file. Next, all tiddlers that have the ".json" tag are saved as *.json files. Finally, all tiddlers that have tag ".tid" are saved as single files. If a tiddler matches none of the filters, the default extension determined by the tiddlers `type` field would be used. \ No newline at end of file From 39bd45002ea051a6dc98fe8a2b4ff91826119e9a Mon Sep 17 00:00:00 2001 From: poc2go Date: Thu, 1 Aug 2024 06:47:37 -0400 Subject: [PATCH 06/44] Test to verify that reserved wikitext constructs are not parsed (#8384) --- .../reserved-wikitext/ReservedWikiText.tid | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 editions/test/tiddlers/tests/data/reserved-wikitext/ReservedWikiText.tid diff --git a/editions/test/tiddlers/tests/data/reserved-wikitext/ReservedWikiText.tid b/editions/test/tiddlers/tests/data/reserved-wikitext/ReservedWikiText.tid new file mode 100644 index 000000000..b9b77f160 --- /dev/null +++ b/editions/test/tiddlers/tests/data/reserved-wikitext/ReservedWikiText.tid @@ -0,0 +1,54 @@ +title: ReservedWikiText +description: Verify that reserved wikitext constructions are not parsed +type: text/vnd.tiddlywiki-multiple +tags: [[$:/tags/wiki-test-spec]] + +title: Narrative + +Verifies that certain wikitext constructions that are reserved for use by other tools are not parsed by TiddlyWiki. ++ +title: TestTiddler + +{%%} +(==) +{% %} +(= =) +{% something %} +(= something =) +Inline {% something %} substitution +Inline (= something =) substitution +Prefix-{% +Prefix-(= +%}-Postfix +=)-Postfix + {% + (= + %} + =) ++ +title: Output + +<$wikify name="parsetree" text={{TestTiddler}} output="parsetree"> +<$text text={{{ [jsonget[0],[children],[0],[text]] }}}/> + ++ +title: ExpectedResult + +

+{%%} +(==) +{% %} +(= =) +{% something %} +(= something =) +Inline {% something %} substitution +Inline (= something =) substitution +Prefix-{% +Prefix-(= +%}-Postfix +=)-Postfix + {% + (= + %} + =) +

\ No newline at end of file From 5c43512a56b9e08e680ad555439d8932ea2b9164 Mon Sep 17 00:00:00 2001 From: Mohammad Rahmani <830394+kookma@users.noreply.github.com> Date: Thu, 1 Aug 2024 19:13:10 +0330 Subject: [PATCH 07/44] Shorter Title of Compound Tiddler in Type Field Dropdown Menu (#8469) * Update text_vnd.tiddlywiki_multiple.tid This PR addresses the idea in #8465 * Update text_vnd.tiddlywiki_multiple.tid This addresses the idea in #8465 for de-DE language --- core/language/en-GB/Types/text_vnd.tiddlywiki_multiple.tid | 2 +- languages/de-DE/Types/text_vnd.tiddlywiki_multiple.tid | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/language/en-GB/Types/text_vnd.tiddlywiki_multiple.tid b/core/language/en-GB/Types/text_vnd.tiddlywiki_multiple.tid index 4fb3f2ec1..af15d7ac3 100644 --- a/core/language/en-GB/Types/text_vnd.tiddlywiki_multiple.tid +++ b/core/language/en-GB/Types/text_vnd.tiddlywiki_multiple.tid @@ -1,5 +1,5 @@ title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple -description: TiddlyWiki 5 compound tiddler +description: Compound tiddler name: text/vnd.tiddlywiki-multiple group: Developer group-sort: 2 diff --git a/languages/de-DE/Types/text_vnd.tiddlywiki_multiple.tid b/languages/de-DE/Types/text_vnd.tiddlywiki_multiple.tid index 2c192f96f..ab32b262c 100644 --- a/languages/de-DE/Types/text_vnd.tiddlywiki_multiple.tid +++ b/languages/de-DE/Types/text_vnd.tiddlywiki_multiple.tid @@ -1,5 +1,5 @@ title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple -description: TW5 - TiddlyWiki Wikitext Verbund Tiddler +description: Verbund Tiddler name: text/vnd.tiddlywiki-multiple group: Entwickler group-sort: 2 From 57d3e8e765cda7dadce9f021a5caab2dcfb9b4a8 Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Fri, 2 Aug 2024 01:01:22 +0800 Subject: [PATCH 08/44] Feat: allow tags have its ViewTemplate tag and cascade (#8462) * feat: allow tags have its ViewTemplate tag and cascade * feat: quick addition of subtitle cascade * docs: tag subtitle cascade control panel * Update ControlPanel.multids --- core/language/en-GB/ControlPanel.multids | 4 ++++ .../ui/ControlPanel/Cascades/ViewTemplateSubtitle.tid | 9 +++++++++ core/ui/ControlPanel/Cascades/ViewTemplateTags.tid | 9 +++++++++ core/ui/ViewTemplate/subtitle.tid | 8 +------- core/ui/ViewTemplate/subtitle/default.tid | 10 ++++++++++ core/ui/ViewTemplate/tags.tid | 4 +--- core/ui/ViewTemplate/tags/default.tid | 11 +++++++++++ languages/zh-Hans/ControlPanel.multids | 4 ++++ languages/zh-Hant/ControlPanel.multids | 6 +++++- 9 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 core/ui/ControlPanel/Cascades/ViewTemplateSubtitle.tid create mode 100644 core/ui/ControlPanel/Cascades/ViewTemplateTags.tid create mode 100644 core/ui/ViewTemplate/subtitle/default.tid create mode 100644 core/ui/ViewTemplate/tags/default.tid diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 93cfc3c10..772949c0d 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -235,3 +235,7 @@ ViewTemplateBody/Caption: View Template Body ViewTemplateBody/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler. ViewTemplateTitle/Caption: View Template Title ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler. +ViewTemplateSubtitle/Caption: View Template Subtitle +ViewTemplateSubtitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the subtitle of a tiddler. +ViewTemplateTags/Caption: View Template Tags +ViewTemplateTags/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the tags area of a tiddler. diff --git a/core/ui/ControlPanel/Cascades/ViewTemplateSubtitle.tid b/core/ui/ControlPanel/Cascades/ViewTemplateSubtitle.tid new file mode 100644 index 000000000..5ba1234ae --- /dev/null +++ b/core/ui/ControlPanel/Cascades/ViewTemplateSubtitle.tid @@ -0,0 +1,9 @@ +title: $:/core/ui/ControlPanel/ViewTemplateSubtitle +tags: $:/tags/ControlPanel/Cascades +caption: {{$:/language/ControlPanel/ViewTemplateSubtitle/Caption}} + +\define lingo-base() $:/language/ControlPanel/ViewTemplateSubtitle/ + +<> + +{{$:/tags/ViewTemplateSubtitleFilter||$:/snippets/ListTaggedCascade}} diff --git a/core/ui/ControlPanel/Cascades/ViewTemplateTags.tid b/core/ui/ControlPanel/Cascades/ViewTemplateTags.tid new file mode 100644 index 000000000..3cea12307 --- /dev/null +++ b/core/ui/ControlPanel/Cascades/ViewTemplateTags.tid @@ -0,0 +1,9 @@ +title: $:/core/ui/ControlPanel/ViewTemplateTags +tags: $:/tags/ControlPanel/Cascades +caption: {{$:/language/ControlPanel/ViewTemplateTags/Caption}} + +\define lingo-base() $:/language/ControlPanel/ViewTemplateTags/ + +<> + +{{$:/tags/ViewTemplateTagsFilter||$:/snippets/ListTaggedCascade}} diff --git a/core/ui/ViewTemplate/subtitle.tid b/core/ui/ViewTemplate/subtitle.tid index a7c010287..013f0266b 100644 --- a/core/ui/ViewTemplate/subtitle.tid +++ b/core/ui/ViewTemplate/subtitle.tid @@ -2,10 +2,4 @@ title: $:/core/ui/ViewTemplate/subtitle tags: $:/tags/ViewTemplate \whitespace trim -<$reveal type="nomatch" stateTitle=<> text="hide" tag="div" retain="yes" animate="yes"> -
-<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler"> -<$transclude tiddler=<> mode="inline"/><$list-join>  - -
- +<$transclude tiddler={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateSubtitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/subtitle/default]] }}} /> \ No newline at end of file diff --git a/core/ui/ViewTemplate/subtitle/default.tid b/core/ui/ViewTemplate/subtitle/default.tid new file mode 100644 index 000000000..3885dc779 --- /dev/null +++ b/core/ui/ViewTemplate/subtitle/default.tid @@ -0,0 +1,10 @@ +title: $:/core/ui/ViewTemplate/subtitle/default + +\whitespace trim +<$reveal type="nomatch" stateTitle=<> text="hide" tag="div" retain="yes" animate="yes"> +
+<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler"> +<$transclude tiddler=<> mode="inline"/><$list-join>  + +
+ diff --git a/core/ui/ViewTemplate/tags.tid b/core/ui/ViewTemplate/tags.tid index d1f4e55c9..fc09c571a 100644 --- a/core/ui/ViewTemplate/tags.tid +++ b/core/ui/ViewTemplate/tags.tid @@ -2,6 +2,4 @@ title: $:/core/ui/ViewTemplate/tags tags: $:/tags/ViewTemplate \whitespace trim -<$reveal type="nomatch" stateTitle=<> text="hide" tag="div" retain="yes" animate="yes"> -
<$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/>
- +<$transclude tiddler={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTagsFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/tags/default]] }}} /> \ No newline at end of file diff --git a/core/ui/ViewTemplate/tags/default.tid b/core/ui/ViewTemplate/tags/default.tid new file mode 100644 index 000000000..d524bfccd --- /dev/null +++ b/core/ui/ViewTemplate/tags/default.tid @@ -0,0 +1,11 @@ +title: $:/core/ui/ViewTemplate/tags/default + +\whitespace trim +<$reveal type="nomatch" stateTitle=<> text="hide" tag="div" retain="yes" animate="yes"> +
+ <$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"/> + +
+ diff --git a/languages/zh-Hans/ControlPanel.multids b/languages/zh-Hans/ControlPanel.multids index 258c051ad..33bc5e9ce 100644 --- a/languages/zh-Hans/ControlPanel.multids +++ b/languages/zh-Hans/ControlPanel.multids @@ -236,3 +236,7 @@ ViewTemplateBody/Caption: 查看模板主体 ViewTemplateBody/Hint: 默认的查看模板使用此规则级联,动态选择模板以显示条目的主体。 ViewTemplateTitle/Caption: 查看模板标题 ViewTemplateTitle/Hint: 默认的查看模板使用此规则级联,动态选择模板以显示条目的标题。 +ViewTemplateSubtitle/Caption: 查看模板副标题 +ViewTemplateSubtitle/Hint: 默认的查看模板使用此规则级联,动态选择模板以显示条目的副标题。 +ViewTemplateTags/Caption: 查看模板标签区 +ViewTemplateTags/Hint: 默认的查看模板使用此规则级联,动态选择模板以显示条目的标签区域。 diff --git a/languages/zh-Hant/ControlPanel.multids b/languages/zh-Hant/ControlPanel.multids index 497b72e49..853ca98d5 100644 --- a/languages/zh-Hant/ControlPanel.multids +++ b/languages/zh-Hant/ControlPanel.multids @@ -235,4 +235,8 @@ Tools/Download/Full/Caption: 下載完整副本 ViewTemplateBody/Caption: 檢視範本主體 ViewTemplateBody/Hint: 預設的檢視範本使用此規則級聯,動態選擇範本以顯示條目的主體。 ViewTemplateTitle/Caption: 檢視範本標題 -ViewTemplateTitle/Hint: 預設的檢視範本使用此規則級聯,動態選擇範本以顯示條目的標題。 \ No newline at end of file +ViewTemplateTitle/Hint: 預設的檢視範本使用此規則級聯,動態選擇範本以顯示條目的標題。 +ViewTemplateSubtitle/Caption: 檢視範本副標題 +ViewTemplateSubtitle/Hint: 預設的檢視範本使用此規則級聯,動態選擇範本以顯示條目的副標題。 +ViewTemplateTags/Caption: 檢視範本標籤 +ViewTemplateTags/Hint: 預設的檢視範本使用此規則級聯,動態選擇範本以顯示條目的標籤。 \ No newline at end of file From 77335a42b534613e3300f56d9bc24b1a029cad74 Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Fri, 2 Aug 2024 16:45:52 +0800 Subject: [PATCH 09/44] Fix: add cascade configs (#8470) --- core/wiki/config/ViewTemplateSubtitleFilters.multids | 4 ++++ core/wiki/config/ViewTemplateTagsFilters.multids | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 core/wiki/config/ViewTemplateSubtitleFilters.multids create mode 100644 core/wiki/config/ViewTemplateTagsFilters.multids diff --git a/core/wiki/config/ViewTemplateSubtitleFilters.multids b/core/wiki/config/ViewTemplateSubtitleFilters.multids new file mode 100644 index 000000000..dd673b673 --- /dev/null +++ b/core/wiki/config/ViewTemplateSubtitleFilters.multids @@ -0,0 +1,4 @@ +title: $:/config/ViewTemplateSubtitleFilters/ +tags: $:/tags/ViewTemplateSubtitleFilter + +default: [[$:/core/ui/ViewTemplate/subtitle/default]] diff --git a/core/wiki/config/ViewTemplateTagsFilters.multids b/core/wiki/config/ViewTemplateTagsFilters.multids new file mode 100644 index 000000000..2f6c13051 --- /dev/null +++ b/core/wiki/config/ViewTemplateTagsFilters.multids @@ -0,0 +1,4 @@ +title: $:/config/ViewTemplateTagsFilters/ +tags: $:/tags/ViewTemplateTagsFilter + +default: [[$:/core/ui/ViewTemplate/tags/default]] From 2bc7ec4b946f6a1cd3db5146f02ff7717eef6355 Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Sat, 3 Aug 2024 20:16:05 +0800 Subject: [PATCH 10/44] Do not import "$:/build" (#8476) --- core/modules/upgraders/system.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/upgraders/system.js b/core/modules/upgraders/system.js index a93a57712..a653a75b1 100644 --- a/core/modules/upgraders/system.js +++ b/core/modules/upgraders/system.js @@ -12,7 +12,7 @@ Upgrader module that suppresses certain system tiddlers that shouldn't be import /*global $tw: false */ "use strict"; -var DONT_IMPORT_LIST = ["$:/Import"], +var DONT_IMPORT_LIST = ["$:/Import", "$:/build"], UNSELECT_PREFIX_LIST = ["$:/temp/","$:/state/","$:/StoryList","$:/HistoryList"], WARN_IMPORT_PREFIX_LIST = ["$:/core/modules/"]; From c5c72795548343ae36729e7f016897c573daf23f Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sun, 4 Aug 2024 13:48:57 +0200 Subject: [PATCH 11/44] Eslint force double-quotes for strings -- avoidEscape:true (#8482) --- .eslintrc.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 049af59e4..0316b8385 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -231,7 +231,10 @@ rules: prefer-spread: 'off' prefer-template: 'off' quote-props: 'off' - quotes: 'off' + quotes: + - error + - double + - avoidEscape: true radix: 'off' require-atomic-updates: error require-await: error From dbbf8ea90d6ccca0fedc1e32af71cdb1e0b812f6 Mon Sep 17 00:00:00 2001 From: twMat Date: Sun, 4 Aug 2024 14:26:17 +0200 Subject: [PATCH 12/44] Update Intertwingled Innovations.tid (#8480) typo --- .../tw5.com/tiddlers/definitions/Intertwingled Innovations.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/definitions/Intertwingled Innovations.tid b/editions/tw5.com/tiddlers/definitions/Intertwingled Innovations.tid index 02f177082..07576617b 100644 --- a/editions/tw5.com/tiddlers/definitions/Intertwingled Innovations.tid +++ b/editions/tw5.com/tiddlers/definitions/Intertwingled Innovations.tid @@ -4,6 +4,6 @@ tags: Definitions title: Intertwingled Innovations type: text/vnd.tiddlywiki -Intertwingled Innovations Limited is the company through which [[JeremyRuston]] performs commercial consultancy work helping companies and individuals release the businesss value of TiddlyWiki. +Intertwingled Innovations Limited is the company through which [[JeremyRuston]] performs commercial consultancy work helping companies and individuals release the business value of TiddlyWiki. See https://intertwingledinnovations.com/ for more information. From ac286dac822acad835d05a28cc0fbef6553c23dd Mon Sep 17 00:00:00 2001 From: Bram Chen Date: Mon, 5 Aug 2024 06:47:37 +0800 Subject: [PATCH 13/44] Update chinese language files (#8473) * update chinese descriptions for text/vnd.tiddlywiki-multiple --- languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid | 2 +- languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid b/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid index dd8e72be9..c38ddf015 100644 --- a/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid +++ b/languages/zh-Hans/Types/text_vnd.tiddlywiki_multiple.tid @@ -1,5 +1,5 @@ title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple -description: TiddlyWiki 5 复合条目 +description: 复合条目 name: text/vnd.tiddlywiki-multiple group: 开发者 group-sort: 2 diff --git a/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid b/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid index 745734788..aee5a301e 100644 --- a/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid +++ b/languages/zh-Hant/Types/text_vnd.tiddlywiki_multiple.tid @@ -1,5 +1,5 @@ title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple -description: TiddlyWiki 5 複合條目 +description: 複合條目 name: text/vnd.tiddlywiki-multiple group: 開發者 group-sort: 2 From d9ac4a823fe0f91c615ed33fa890069f88cc8ab9 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 5 Aug 2024 11:20:35 +0100 Subject: [PATCH 14/44] Fix crash with render command when filename filter returns empty result --- core/modules/commands/render.js | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/core/modules/commands/render.js b/core/modules/commands/render.js index b396deef9..bd8b23171 100644 --- a/core/modules/commands/render.js +++ b/core/modules/commands/render.js @@ -45,17 +45,22 @@ Render individual tiddlers and save the results to the specified files variableList = variableList.slice(2); } $tw.utils.each(tiddlers,function(title) { - var filepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]); - if(self.commander.verbose) { - console.log("Rendering \"" + title + "\" to \"" + filepath + "\""); + var filenameResults = wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title])); + if(filenameResults.length > 0) { + var filepath = path.resolve(self.commander.outputPath,filenameResults[0]); + if(self.commander.verbose) { + console.log("Rendering \"" + title + "\" to \"" + filepath + "\""); + } + var parser = wiki.parseTiddler(template || title), + widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}), + container = $tw.fakeDocument.createElement("div"); + widgetNode.render(container,null); + var text = type === "text/html" ? container.innerHTML : container.textContent; + $tw.utils.createFileDirectories(filepath); + fs.writeFileSync(filepath,text,"utf8"); + } else { + console.log("Not rendering \"" + title + "\" because the filename filter returned an empty result"); } - var parser = wiki.parseTiddler(template || title), - widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}), - container = $tw.fakeDocument.createElement("div"); - widgetNode.render(container,null); - var text = type === "text/html" ? container.innerHTML : container.textContent; - $tw.utils.createFileDirectories(filepath); - fs.writeFileSync(filepath,text,"utf8"); }); return null; }; From 885faf964b02cc1fb158dd8914ac56cf026a547e Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Mon, 5 Aug 2024 22:29:16 +0800 Subject: [PATCH 15/44] Fix strange links in $:/plugins/tiddlywiki/highlight/usage (#8487) * Normalize links in highlight usage * Revert to use define --- plugins/tiddlywiki/highlight/usage.tid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/tiddlywiki/highlight/usage.tid b/plugins/tiddlywiki/highlight/usage.tid index 5e5b51600..fc1d8f12c 100644 --- a/plugins/tiddlywiki/highlight/usage.tid +++ b/plugins/tiddlywiki/highlight/usage.tid @@ -31,8 +31,8 @@ You can import language definitions into <$text text="JavaScript"/> tiddlers, wi First, locate the language file(s) you need. You can fetch the files from the following CDNs: -* >>jsDelivr -* >>unpkg +* > class="tc-tiddlylink-external" target="_blank">jsDelivr +* > class="tc-tiddlylink-external" target="_blank">unpkg Then, click the button below to create a "highlight" module. Copy and paste the content of a language file into the the text area. Give your tiddler a meaningful title so you can keep track of the languages you've installed. You may choose to either create one tiddler per language or lump all language definitions into one tiddler. Save and reload your wiki. From a6ffcc13413e5ad98e45fc854877b99baa62f9ec Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Tue, 6 Aug 2024 16:45:14 +0200 Subject: [PATCH 16/44] Update bug_report.yml (#8468) Replace boilerplate text with "placeholder" text --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 1e644e161..286a842bc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -21,7 +21,7 @@ body: attributes: label: To Reproduce description: "Steps to reproduce the behavior:" - value: | + placeholder: | 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -41,7 +41,7 @@ body: attributes: label: TiddlyWiki Configuration description: please complete the following information - value: | + placeholder: | - Version [e.g. v5.1.24] - Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc] - Plugins installed [e.g. Freelinks, TiddlyMap] From 9b6baba5d50c16417422a40b5111556710a753a9 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Tue, 6 Aug 2024 21:32:04 +0100 Subject: [PATCH 17/44] Fix geospatial plugin popup demo --- plugins/tiddlywiki/geospatial/docs/geomap.tid | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/plugins/tiddlywiki/geospatial/docs/geomap.tid b/plugins/tiddlywiki/geospatial/docs/geomap.tid index ba933ec8a..e72d3c156 100644 --- a/plugins/tiddlywiki/geospatial/docs/geomap.tid +++ b/plugins/tiddlywiki/geospatial/docs/geomap.tid @@ -53,13 +53,10 @@ If no base layers are defined by `<$geobaselayer>` widgets within the `<$geomap> lat="51.751944" long="-1.257778" alt="0" - text="""This is Oxford!"""/> + text="""{{$:/core/images/star-filled}} This is Oxford!"""/> <$data title="Output" text="""<$geomap state=<> > - <$list filter="[all[tiddlers+shadows]tag[$:/tags/GeoMarker]]"> - <$geolayer lat={{!!lat}} long={{!!long}} alt={{!!alt}} color={{!!color}}/> - """/> <$data $tiddler="$:/plugins/tiddlywiki/geospatial"/> @@ -80,7 +77,24 @@ If no base layers are defined by `<$geobaselayer>` widgets within the `<$geomap> """/> -<$data $tiddler="ui/PopupTemplate"/> +<$data + title="Oxford" + tags="$:/tags/GeoMarker" + caption="Oxford" + lat="51.751944" + long="-1.257778" + alt="0" + text="""{{$:/core/images/star-filled}} This is Oxford!"""/> + properties=""/> +<$data title="ui/PopupTemplate" text=""" +
+ <$let currentTiddler={{{ [jsonget[properties],[title]] }}}> + <$link><$text text=<>/> + + <$transclude $tiddler=<> $mode="block"/> + +
+"""/> <$data $tiddler="$:/plugins/tiddlywiki/geospatial"/> From 0e0818c8e9ea1d31307633c544f00f28c51caa1f Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 7 Aug 2024 11:42:46 +0100 Subject: [PATCH 18/44] Transliterate control characters in site title (#8339) --- core/modules/utils/transliterate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/utils/transliterate.js b/core/modules/utils/transliterate.js index 4e91de234..ce1cbeddb 100644 --- a/core/modules/utils/transliterate.js +++ b/core/modules/utils/transliterate.js @@ -924,7 +924,7 @@ exports.transliterate = function(str) { }; exports.transliterateToSafeASCII = function(str) { - return str.replace(/[^\x00-\x7F]/g,function(ch) { + return str.replace(/[^\x20-\x7F]/g,function(ch) { return exports.transliterationPairs[ch] || "" }); }; From 0bfa12466e664542ade30b60aa86e36bd983da3c Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Wed, 7 Aug 2024 19:07:22 +0800 Subject: [PATCH 19/44] Apply proper color for target footnote background in markdown (#8492) * Use footnote-target-background index for the color of the background of target footnote * Apply proper color to palettes --- core/palettes/Blanca.tid | 1 + core/palettes/Blue.tid | 1 + core/palettes/BrightMute.tid | 1 + core/palettes/ContrastDark.tid | 1 + core/palettes/ContrastLight.tid | 1 + core/palettes/CupertinoDark.tid | 1 + core/palettes/DarkPhotos.tid | 1 + core/palettes/DesertSand.tid | 1 + core/palettes/GruvBoxDark.tid | 1 + core/palettes/Nord.tid | 1 + core/palettes/Rocker.tid | 1 + core/palettes/SolarFlare.tid | 1 + core/palettes/SolarizedDark.tid | 1 + core/palettes/SolarizedLight.tid | 1 + core/palettes/SpartanDay.tid | 1 + core/palettes/SpartanNight.tid | 1 + core/palettes/Twilight.tid | 1 + core/palettes/Vanilla.tid | 1 + plugins/tiddlywiki/markdown/styles.tid | 2 +- 19 files changed, 19 insertions(+), 1 deletion(-) diff --git a/core/palettes/Blanca.tid b/core/palettes/Blanca.tid index 0fd8e2da3..7a6e7d97b 100644 --- a/core/palettes/Blanca.tid +++ b/core/palettes/Blanca.tid @@ -33,6 +33,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333333 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/Blue.tid b/core/palettes/Blue.tid index cc3846b50..b5bdecb8a 100644 --- a/core/palettes/Blue.tid +++ b/core/palettes/Blue.tid @@ -33,6 +33,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333353 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/BrightMute.tid b/core/palettes/BrightMute.tid index ddbd6b3cd..2762a995d 100644 --- a/core/palettes/BrightMute.tid +++ b/core/palettes/BrightMute.tid @@ -33,6 +33,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333333 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/ContrastDark.tid b/core/palettes/ContrastDark.tid index 850a5863b..a10a1b8eb 100644 --- a/core/palettes/ContrastDark.tid +++ b/core/palettes/ContrastDark.tid @@ -33,6 +33,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #00a external-link-foreground: #00e +footnote-target-background: #e5e5e5 foreground: #000 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/ContrastLight.tid b/core/palettes/ContrastLight.tid index ade9f43f8..67552b30e 100644 --- a/core/palettes/ContrastLight.tid +++ b/core/palettes/ContrastLight.tid @@ -33,6 +33,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #00a external-link-foreground: #00e +footnote-target-background: #4c4c4c foreground: #fff highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/CupertinoDark.tid b/core/palettes/CupertinoDark.tid index 7f08f4100..f13fc1e16 100644 --- a/core/palettes/CupertinoDark.tid +++ b/core/palettes/CupertinoDark.tid @@ -31,6 +31,7 @@ external-link-background: transparent external-link-foreground-hover: external-link-foreground-visited: #BF5AF2 external-link-foreground: #32D74B +footnote-target-background: #747474 foreground: #FFFFFF highlight-background: #ffff78 highlight-foreground: #000000 diff --git a/core/palettes/DarkPhotos.tid b/core/palettes/DarkPhotos.tid index 71fa40f2f..5d086fc27 100644 --- a/core/palettes/DarkPhotos.tid +++ b/core/palettes/DarkPhotos.tid @@ -35,6 +35,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333333 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/DesertSand.tid b/core/palettes/DesertSand.tid index ddce80e27..12b06c948 100644 --- a/core/palettes/DesertSand.tid +++ b/core/palettes/DesertSand.tid @@ -39,6 +39,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #313163 external-link-foreground: #555592 +footnote-target-background: #fff7d9 foreground: #2D2A23 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/GruvBoxDark.tid b/core/palettes/GruvBoxDark.tid index 6c3fa6a73..e839fd7b4 100644 --- a/core/palettes/GruvBoxDark.tid +++ b/core/palettes/GruvBoxDark.tid @@ -40,6 +40,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #d3869b external-link-foreground: #8ec07c +footnote-target-background: #665c54 foreground: #fbf1c7 highlight-background: #ffff79 highlight-foreground: #000000 diff --git a/core/palettes/Nord.tid b/core/palettes/Nord.tid index e8e280998..5f18dce3f 100644 --- a/core/palettes/Nord.tid +++ b/core/palettes/Nord.tid @@ -40,6 +40,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #5E81AC external-link-foreground: #8FBCBB +footnote-target-background: #2E3440 foreground: #d8dee9 highlight-background: #ffff78 highlight-foreground: #000000 diff --git a/core/palettes/Rocker.tid b/core/palettes/Rocker.tid index a91cd1b5f..c6693eb52 100644 --- a/core/palettes/Rocker.tid +++ b/core/palettes/Rocker.tid @@ -33,6 +33,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333333 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/SolarFlare.tid b/core/palettes/SolarFlare.tid index 4d81bf531..932256665 100644 --- a/core/palettes/SolarFlare.tid +++ b/core/palettes/SolarFlare.tid @@ -131,6 +131,7 @@ external-link-background-hover: inherit external-link-background-visited: inherit external-link-background: inherit external-link-foreground-hover: inherit +footnote-target-background: #ded8c5 highlight-background: #ffff00 highlight-foreground: #000000 message-border: #cfd6e6 diff --git a/core/palettes/SolarizedDark.tid b/core/palettes/SolarizedDark.tid index bacd385b2..326f6a4fb 100644 --- a/core/palettes/SolarizedDark.tid +++ b/core/palettes/SolarizedDark.tid @@ -34,6 +34,7 @@ external-link-background-visited: inherit external-link-foreground: #268bd2 external-link-foreground-hover: external-link-foreground-visited: #268bd2 +footnote-target-background: #073642 foreground: #839496 highlight-background: #ffff78 highlight-foreground: #000000 diff --git a/core/palettes/SolarizedLight.tid b/core/palettes/SolarizedLight.tid index 5d8757386..28ce1c7c2 100644 --- a/core/palettes/SolarizedLight.tid +++ b/core/palettes/SolarizedLight.tid @@ -34,6 +34,7 @@ external-link-background-visited: inherit external-link-foreground: #268bd2 external-link-foreground-hover: inherit external-link-foreground-visited: #268bd2 +footnote-target-background: #eee8d5 foreground: #657b83 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/SpartanDay.tid b/core/palettes/SpartanDay.tid index cc197144e..505427d33 100644 --- a/core/palettes/SpartanDay.tid +++ b/core/palettes/SpartanDay.tid @@ -33,6 +33,7 @@ external-link-background: transparent external-link-foreground-hover: external-link-foreground-visited: external-link-foreground: +footnote-target-background: #ececec foreground: rgba(0, 0, 0, 0.87) highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/core/palettes/SpartanNight.tid b/core/palettes/SpartanNight.tid index dc47a0774..b36ecb526 100644 --- a/core/palettes/SpartanNight.tid +++ b/core/palettes/SpartanNight.tid @@ -33,6 +33,7 @@ external-link-background: transparent external-link-foreground-hover: external-link-foreground-visited: #7c318c external-link-foreground: #9e3eb3 +footnote-target-background: #494949 foreground: rgba(255, 255, 255, 0.7) highlight-background: #ffff78 highlight-foreground: #000000 diff --git a/core/palettes/Twilight.tid b/core/palettes/Twilight.tid index 4c127f822..1cd8efab1 100644 --- a/core/palettes/Twilight.tid +++ b/core/palettes/Twilight.tid @@ -42,6 +42,7 @@ external-link-background-visited: inherit external-link-foreground: rgb(179, 179, 255) external-link-foreground-hover: inherit external-link-foreground-visited: rgb(153, 153, 255) +footnote-target-background: <> foreground: rgb(179, 179, 179) highlight-background: #ffff78 highlight-foreground: #000000 diff --git a/core/palettes/Vanilla.tid b/core/palettes/Vanilla.tid index 067f32519..76307acee 100644 --- a/core/palettes/Vanilla.tid +++ b/core/palettes/Vanilla.tid @@ -41,6 +41,7 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #0000aa external-link-foreground: #0000ee +footnote-target-background: #ecf2ff foreground: #333333 highlight-background: #ffff00 highlight-foreground: #000000 diff --git a/plugins/tiddlywiki/markdown/styles.tid b/plugins/tiddlywiki/markdown/styles.tid index f4d953d1b..4185d4304 100644 --- a/plugins/tiddlywiki/markdown/styles.tid +++ b/plugins/tiddlywiki/markdown/styles.tid @@ -36,7 +36,7 @@ code-body: yes margin-left: 0.25em; } .markdown a.footnote-ref:target, .markdown .footnote-item:target { - background-color: <>; + background-color: <>; scroll-margin-top: {{{ [{$:/themes/tiddlywiki/vanilla/options/stickytitles}match[yes]then[120px]else[60px]] }}}; } .markdown li > p:first-child { From d3394aa1ba459f8f3ba1d2d2af5147fe4c553de7 Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Wed, 7 Aug 2024 19:46:16 +0800 Subject: [PATCH 20/44] Fix transposed palette filename for "Contrast" palettes (#8493) --- core/palettes/ContrastDark.tid | 18 +++++++++--------- core/palettes/ContrastLight.tid | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/core/palettes/ContrastDark.tid b/core/palettes/ContrastDark.tid index a10a1b8eb..67552b30e 100644 --- a/core/palettes/ContrastDark.tid +++ b/core/palettes/ContrastDark.tid @@ -1,7 +1,7 @@ -title: $:/palettes/ContrastLight -name: Contrast (Light) -color-scheme: light -description: High contrast and unambiguous (light version) +title: $:/palettes/ContrastDark +name: Contrast (Dark) +color-scheme: dark +description: High contrast and unambiguous (dark version) tags: $:/tags/Palette type: application/x-tiddler-dictionary @@ -9,7 +9,7 @@ alert-background: #f00 alert-border: <> alert-highlight: <> alert-muted-foreground: #800 -background: #fff +background: #000 blockquote-bar: <> button-background: <> button-foreground: <> @@ -33,8 +33,8 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #00a external-link-foreground: #00e -footnote-target-background: #e5e5e5 -foreground: #000 +footnote-target-background: #4c4c4c +foreground: #fff highlight-background: #ffff00 highlight-foreground: #000000 message-background: <> @@ -83,8 +83,8 @@ tab-foreground: <> table-border: #dddddd table-footer-background: #a8a8a8 table-header-background: #f0f0f0 -tag-background: #000 -tag-foreground: #fff +tag-background: #fff +tag-foreground: #000 tiddler-background: <> tiddler-border: <> tiddler-controls-foreground-hover: #ddd diff --git a/core/palettes/ContrastLight.tid b/core/palettes/ContrastLight.tid index 67552b30e..a10a1b8eb 100644 --- a/core/palettes/ContrastLight.tid +++ b/core/palettes/ContrastLight.tid @@ -1,7 +1,7 @@ -title: $:/palettes/ContrastDark -name: Contrast (Dark) -color-scheme: dark -description: High contrast and unambiguous (dark version) +title: $:/palettes/ContrastLight +name: Contrast (Light) +color-scheme: light +description: High contrast and unambiguous (light version) tags: $:/tags/Palette type: application/x-tiddler-dictionary @@ -9,7 +9,7 @@ alert-background: #f00 alert-border: <> alert-highlight: <> alert-muted-foreground: #800 -background: #000 +background: #fff blockquote-bar: <> button-background: <> button-foreground: <> @@ -33,8 +33,8 @@ external-link-background: inherit external-link-foreground-hover: inherit external-link-foreground-visited: #00a external-link-foreground: #00e -footnote-target-background: #4c4c4c -foreground: #fff +footnote-target-background: #e5e5e5 +foreground: #000 highlight-background: #ffff00 highlight-foreground: #000000 message-background: <> @@ -83,8 +83,8 @@ tab-foreground: <> table-border: #dddddd table-footer-background: #a8a8a8 table-header-background: #f0f0f0 -tag-background: #fff -tag-foreground: #000 +tag-background: #000 +tag-foreground: #fff tiddler-background: <> tiddler-border: <> tiddler-controls-foreground-hover: #ddd From 0674ac6389b84cbe0a92f74a04df6554ddb8229e Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 7 Aug 2024 14:36:11 +0100 Subject: [PATCH 21/44] Add code-of-conduct.md to root of repo --- bin/readme-bld.sh | 8 ++++++++ code-of-conduct.md | 1 + editions/tw.org/tiddlywiki.info | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 code-of-conduct.md diff --git a/bin/readme-bld.sh b/bin/readme-bld.sh index 198c3abd0..e7c9df564 100755 --- a/bin/readme-bld.sh +++ b/bin/readme-bld.sh @@ -15,3 +15,11 @@ node $TW5_BUILD_TIDDLYWIKI \ --output . \ --build readmes \ || exit 1 + +# tw.org readmes +node $TW5_BUILD_TIDDLYWIKI \ + editions/tw.org \ + --verbose \ + --output . \ + --build readmes \ + || exit 1 diff --git a/code-of-conduct.md b/code-of-conduct.md new file mode 100644 index 000000000..e8e7664a7 --- /dev/null +++ b/code-of-conduct.md @@ -0,0 +1 @@ +

This community exists because TiddlyWiki is more useful when people share and work together.

This community is a beautiful but fragile thing: a collection of diverse people from all over the planet, united in their interest in the project, and their commitment to helping one another achieve and learn more.

We try to make the community as broad and welcoming as possible by remembering some basic principles of culture and behaviour.

These principles guide technical and non-technical decisions, and help contributors and leaders support our project and community.

  • We are optimistic and hopeful
  • We aim to foster a learning environment that is collaborative and safe for everyone
  • We recognise that the motivation for sharing and helping is usually for appreciation, and not financial gain, and so we take care to acknowledge and thank the people who enrich the community by sharing what they have created
  • While we are united in our interest in TiddlyWiki, we differ in every other conceivable way. We choose to focus on what unites us, and avoid unnecessarily mixing contentious topics like religion and politics
  • We treat each other with respect, and start with the assumption that others are acting in good faith
  • We avoid discriminatory language
  • We try to use our strength as a community to help others
  • We avoid responding when angry or upset because we try to de-escalate conflict
  • We make sure we critique ideas, not people
  • When we disagree with others we do so graciously, and treat others with dignity and respoect
  • We do not tolerate intolerance towards others
  • We seek first to understand others, and then to be understood
  • We have fun

Our discussions are in English. It is not the first language of many people in the community, nor do we all share the same cultural background and reference points. So we take care to use language that is clear and unambigous, and avoid cultural references or jokes that will not be widely understood.

It is not acceptable to make jokes or other comments that discriminate by race, gender, sexuality, or other protected characteristic.

As an inclusive community, we are committed to making sure that TiddlyWiki is an accessible tool that understands the needs of people with disabilities.

\ No newline at end of file diff --git a/editions/tw.org/tiddlywiki.info b/editions/tw.org/tiddlywiki.info index 5e4202ccc..3dbd86516 100644 --- a/editions/tw.org/tiddlywiki.info +++ b/editions/tw.org/tiddlywiki.info @@ -16,6 +16,8 @@ "--setfield","[tag[external-image]]","_canonical_uri","$:/core/templates/canonical-uri-external-image","text/plain", "--setfield","[tag[external-image]]","text","","text/plain", "--render","$:/core/save/all","index.html","text/plain"], + "readmes": [ + "--render","[[Code of Conduct]]","code-of-conduct.md","text/html"], "favicon": [ "--savetiddler","$:/favicon.ico","favicon.ico"], "static": [ From 3707e10ef604625518613a96308de606341e8c23 Mon Sep 17 00:00:00 2001 From: Rob Hoelz Date: Thu, 8 Aug 2024 04:06:44 -0500 Subject: [PATCH 22/44] Add start/end properties for table row/cell elements (#8494) * Add test for existing table parsing functionality * Add expected start/end for tr elements in table wikitext test * Populate start/end properties for tr elements * Add expected start/end for th/td elements in table wikitext test * Populate start/end properties for th/td elements --- .../modules/parsers/wikiparser/rules/table.js | 9 +- .../tiddlers/tests/test-wikitext-parser.js | 94 +++++++++++++++++++ 2 files changed, 100 insertions(+), 3 deletions(-) diff --git a/core/modules/parsers/wikiparser/rules/table.js b/core/modules/parsers/wikiparser/rules/table.js index 59aa81e91..fbdbb4f9d 100644 --- a/core/modules/parsers/wikiparser/rules/table.js +++ b/core/modules/parsers/wikiparser/rules/table.js @@ -93,11 +93,12 @@ var processRow = function(prevColumns) { } // Check whether this is a heading cell var cell; + var start = this.parser.pos; if(chr === "!") { this.parser.pos++; - cell = {type: "element", tag: "th", children: []}; + cell = {type: "element", tag: "th", start: start, children: []}; } else { - cell = {type: "element", tag: "td", children: []}; + cell = {type: "element", tag: "td", start: start, children: []}; } tree.push(cell); // Record information about this cell @@ -121,6 +122,7 @@ var processRow = function(prevColumns) { } // Move back to the closing `|` this.parser.pos--; + cell.end = this.parser.pos; } col++; cellRegExp.lastIndex = this.parser.pos; @@ -169,12 +171,13 @@ exports.parse = function() { rowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true}); } else { // Create the row - var theRow = {type: "element", tag: "tr", children: []}; + var theRow = {type: "element", tag: "tr", children: [], start: rowMatch.index}; $tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? "oddRow" : "evenRow"); rowContainer.children.push(theRow); // Process the row theRow.children = processRow.call(this,prevColumns); this.parser.pos = rowMatch.index + rowMatch[0].length; + theRow.end = this.parser.pos; // Increment the row count rowCount++; } diff --git a/editions/test/tiddlers/tests/test-wikitext-parser.js b/editions/test/tiddlers/tests/test-wikitext-parser.js index 04d041ec9..a488ff030 100644 --- a/editions/test/tiddlers/tests/test-wikitext-parser.js +++ b/editions/test/tiddlers/tests/test-wikitext-parser.js @@ -324,6 +324,100 @@ describe("WikiText parser tests", function() { }); + it("should parse tables", function() { + let wikitext = ` +|!Cell1 |!Cell2 | +|Cell3 |Cell4 |`.trim(); + + let expectedParseTree = [{ + type: 'element', + tag: 'table', + start: 0, + end: 33, + rule: 'table', + children: [{ + type: 'element', + tag: 'tbody', + start: 0, + end: 33, + children: [{ + type: 'element', + tag: 'tr', + attributes: { + 'class': { name: 'class', type: 'string', value: 'evenRow' }, + }, + orderedAttributes: [ + { name: 'class', type: 'string', value: 'evenRow' }, + ], + start: 0, + end: 18, + children: [{ + type: 'element', + tag: 'th', + attributes: { + 'align': { name: 'align', type: 'string', value: 'left' }, + }, + orderedAttributes: [ + { name: 'align', type: 'string', value: 'left' }, + ], + start: 1, + end: 8, + children: [{type: 'text', text: 'Cell1', start: 2, end: 7}], + }, { + type: 'element', + tag: 'th', + attributes: { + 'align': { name: 'align', type: 'string', value: 'left' }, + }, + orderedAttributes: [ + { name: 'align', type: 'string', value: 'left' }, + ], + start: 9, + end: 16, + children: [{type: 'text', text: 'Cell2', start: 10, end: 15}], + }], + }, { + type: 'element', + tag: 'tr', + attributes: { + 'class': { name: 'class', type: 'string', value: 'oddRow' }, + }, + orderedAttributes: [ + { name: 'class', type: 'string', value: 'oddRow' }, + ], + start: 18, + end: 33, + children: [{ + type: 'element', + tag: 'td', + attributes: { + 'align': { name: 'align', type: 'string', value: 'left' }, + }, + orderedAttributes: [ + { name: 'align', type: 'string', value: 'left' }, + ], + start: 19, + end: 25, + children: [{type: 'text', text: 'Cell3', start: 19, end: 24}], + }, { + type: 'element', + tag: 'td', + attributes: { + 'align': { name: 'align', type: 'string', value: 'left' }, + }, + orderedAttributes: [ + { name: 'align', type: 'string', value: 'left' }, + ], + start: 26, + end: 32, + children: [{type: 'text', text: 'Cell4', start: 26, end: 31}], + }], + }], + }], + }]; + + expect(parse(wikitext)).toEqual(expectedParseTree); + }); }); })(); From 4da27f6a4b78decc89fbabe9a22e02fd9c733b39 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 8 Aug 2024 10:15:38 +0100 Subject: [PATCH 23/44] Add support for social media cards (#8441) * Initial Commit * Fix Twitter description * Improve image preview name Thanks @simonbaird * Add control panel UI for social media cards --- core/language/en-GB/ControlPanel.multids | 6 ++++ core/templates/social-metadata.tid | 38 ++++++++++++++++++++++++ core/ui/ControlPanel/SocialCard.tid | 22 ++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 core/templates/social-metadata.tid create mode 100644 core/ui/ControlPanel/SocialCard.tid diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 772949c0d..a1b164c5c 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -198,6 +198,12 @@ Settings/TitleLinks/Yes/Description: Display tiddler titles as links Settings/MissingLinks/Caption: Wiki Links Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist yet Settings/MissingLinks/Description: Enable links to missing tiddlers +SocialCard/Caption: Social Media Card +SocialCard/Domain/Prompt: Domain name to display for the link (for example, ''tiddlywiki.com'') +SocialCard/Hint: This information is used by social and messaging services to display a preview card for links to this TiddlyWiki when hosted online +SocialCard/PreviewUrl/Prompt: Full URL to preview image for this TiddlyWiki +SocialCard/PreviewUrl/Preview: Preview image: +SocialCard/Url/Prompt: Full URL of this TiddlyWiki StoryTiddler/Caption: Story Tiddler StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river. StoryView/Caption: Story View diff --git a/core/templates/social-metadata.tid b/core/templates/social-metadata.tid new file mode 100644 index 000000000..6f9dc11bc --- /dev/null +++ b/core/templates/social-metadata.tid @@ -0,0 +1,38 @@ +title: $:/core/templates/social-metadata +tags: $:/tags/RawMarkupWikified + +\procedure meta-plain(name,source,name-attribute:"name") +\whitespace trim +<%if [has[text]] %> + <meta <$text text=<>/>="<$text text=<>/>" content="<$text text={{{ [get[text]encodehtml[]] }}}/>"> + <$text text={{{ [charcode[10]] }}}/> +<%endif%> +\end meta-plain + +\procedure meta-wikified(name,source,name-attribute:"name") +\whitespace trim +<%if [has[text]] %> + <$wikify name="html" text={{{ [get[text]] }}} output="text"> + <meta <$text text=<>/>="<$text text=<>/>" content="<$text text={{{ [encodehtml[]] }}}/>"> + <$text text={{{ [charcode[10]] }}}/> + +<%endif%> +\end meta-wikified + +\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock conditional commentinline commentblock +<> + + +<> +<> +<> +<> +<> + + +<> +<> +<> +<> +<> +<> diff --git a/core/ui/ControlPanel/SocialCard.tid b/core/ui/ControlPanel/SocialCard.tid new file mode 100644 index 000000000..591c6550f --- /dev/null +++ b/core/ui/ControlPanel/SocialCard.tid @@ -0,0 +1,22 @@ +title: $:/core/ui/ControlPanel/SocialCard +tags: $:/tags/ControlPanel/Advanced +caption: {{$:/language/ControlPanel/SocialCard/Caption}} + +\define lingo-base() $:/language/ControlPanel/ + +<> + +|<$link to="$:/SiteTitle"><> |<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> | +|<$link to="$:/SiteSubtitle"><> |<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> | +|<$link to="$:/SiteDomain"><> |<$edit-text tiddler="$:/SiteDomain" default="" tag="input"/> | +|<$link to="$:/SiteUrl"><> |<$edit-text tiddler="$:/SiteUrl" default="" tag="input"/> | +|<$link to="$:/SitePreviewUrl"><> |<$edit-text tiddler="$:/SitePreviewUrl" default="" tag="input"/> | + +<%if [[$:/SitePreviewUrl]get[text]else[]!is[blank]] %> +
+
+<> +
+ +
+<%endif%> \ No newline at end of file From ec651539a6475b4846c2475f89633b97a5f9cba3 Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Mon, 19 Aug 2024 05:29:32 +0800 Subject: [PATCH 24/44] Add stability badge colors for Solar Flare palette (#8521) --- core/palettes/SolarFlare.tid | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/palettes/SolarFlare.tid b/core/palettes/SolarFlare.tid index 932256665..9f394f10c 100644 --- a/core/palettes/SolarFlare.tid +++ b/core/palettes/SolarFlare.tid @@ -142,6 +142,10 @@ sidebar-controls-foreground-hover: sidebar-muted-foreground-hover: sidebar-tab-background: #ded8c5 sidebar-tiddler-link-foreground-hover: +stability-deprecated: <> +stability-experimental: <> +stability-legacy: <> +stability-stable: <> static-alert-foreground: #aaaaaa tab-border: #cccccc modal-footer-border: <> From c51a2336272e53830d0a33552ee3cb90f7b4f29b Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sun, 18 Aug 2024 23:35:36 +0200 Subject: [PATCH 25/44] Make testcase default template more modular (#8514) * make testcase default template more modular * exclude state/popup/export from tabList * fix state in linkcatcherActions * use "explicitState" instead of "state" for tabs macro * clean testcase-tablist code * remove unwanted tiddler * remove redundant parameters from export-filter --- core/ui/TestCases/DefaultTemplate.tid | 208 ++++++++++++++++---------- core/ui/TestCases/actions/Export.tid | 2 +- 2 files changed, 130 insertions(+), 80 deletions(-) diff --git a/core/ui/TestCases/DefaultTemplate.tid b/core/ui/TestCases/DefaultTemplate.tid index 04623cbc6..39c6bab52 100644 --- a/core/ui/TestCases/DefaultTemplate.tid +++ b/core/ui/TestCases/DefaultTemplate.tid @@ -2,91 +2,141 @@ title: $:/core/ui/testcases/DefaultTemplate code-body: yes \whitespace trim + +\function tf.state() [] + \procedure linkcatcherActions() <%if [has[title]] %> - <$qualify title=<> name="qualifiedState"> - <$action-setfield $tiddler=<> text=<>/> - + <$action-setfield $tiddler=<> text=<>/> <%endif%> \end -<$let - state={{{ [] }}} -> -
-
-

- <$genesis $type={{{ [!match[]then[$link]else[span]] }}} to=<>> - <%if [!match[]] %> - !match[fail]then[tc-test-case-result-icon-pass]] [match[fail]then[tc-test-case-result-icon-fail]] +[join[ ]] }}}> - <%if [!match[fail]] %> - {{$:/core/images/done-button}} - <%else%> - {{$:/core/images/close-button}} - <%endif%> - +\procedure testcase-header() +
+

+ <$genesis $type={{{ [!match[]then[$link]else[span]] }}} to=<>> + <%if [!match[]] %> + !match[fail]then[tc-test-case-result-icon-pass]] + [match[fail]then[tc-test-case-result-icon-fail]] + +[join[ ]] }}} + > + <%if [!match[fail]] %> + {{$:/core/images/done-button}} + <%else%> + {{$:/core/images/close-button}} <%endif%> - <$view tiddler="Description" mode="inline"/> - - - <$button popup=`$(state)$-more` - tooltip={{$:/language/Buttons/More/Hint}} - aria-label={{$:/language/Buttons/More/Caption}} - class="tc-btn-invisible" - selectedClass="tc-selected" - > - {{$:/core/images/down-arrow}} - - <$let - tv-config-toolbar-icons="yes" - tv-config-toolbar-text="yes" - tv-config-toolbar-class="tc-btn-invisible" - > - <$reveal state=`$(state)$-more` type="popup" position="belowleft" animate="yes"> -
- <$list filter="[all[shadows+tiddlers]tag[$:/tags/TestCase/Actions]!has[draft.of]]" - variable="listItem" - > - <$transclude $tiddler=<> $mode="inline"/> - -
- -
-

+ <%endif%> + <$view tiddler="Description" mode="inline"/> + + + <> + +

+
+\end + +\procedure testcase-toolbar() +<$button popup=`$(tf.state)$-more` + tooltip={{$:/language/Buttons/More/Hint}} + aria-label={{$:/language/Buttons/More/Caption}} + class="tc-btn-invisible" + selectedClass="tc-selected" +> + {{$:/core/images/down-arrow}} + +<$let + tv-config-toolbar-icons="yes" + tv-config-toolbar-text="yes" + tv-config-toolbar-class="tc-btn-invisible" +> + <$reveal state=`$(tf.state)$-more` type="popup" position="belowleft" animate="yes"> +
+ <$list filter="[all[shadows+tiddlers]tag[$:/tags/TestCase/Actions]!has[draft.of]]" + variable="listItem" + > + <$transclude $tiddler=<> $mode="inline"/> +
- <%if [[Narrative]is[tiddler]] %> -
- <$transclude $tiddler="Narrative" $mode="block"/> -
- <%endif%> - <%if [match[fail]] %> -
-
- TEST FAILED -
-
- <$diff-text source=<> dest=<>/> -
-
- <%endif%> -
-
- <$macrocall $name="tabs" tabsList="[all[tiddlers]sort[]] -[prefix] -Description -Narrative -Output Output +[putfirst[]] -[has[plugin-type]]" state=<> default="Output" template="$:/core/ui/testcases/DefaultTemplate/SourceTabs"/> -
-
-
-
- <%if [!match[]else[wikitext]match[plaintext]] %> -
<$view tiddler="Output" format="plainwikified" mode="block"/>
- <%else%> - <$linkcatcher actions=<>> - <$tiddler tiddler="Output"> - <$transclude $tiddler="Output" $mode="block"/> - - - <%endif%> -
-
-
+ +\end + +\procedure testcase-narrative() +
+ <$transclude $tiddler="Narrative" $mode="block"/> +
+\end + +\procedure testcase-fail() +
+
+ TEST FAILED +
+
+ <$diff-text source=<> dest=<>/> +
+
+\end + +\procedure testcase-output-wikified() +<$linkcatcher actions=<>> + <$tiddler tiddler="Output"> + <$transclude $tiddler="Output" $mode="block"/> + + +\end + +\procedure testcase-output() +
+ <%if [!match[]else[wikitext]match[plaintext]] %> +
<$view tiddler="Output" format="plainwikified" mode="block"/>
+ <%else%> + <> + <%endif%> +
+\end + +\procedure testcase-tabsList() +[all[tiddlers]sort[]] Output +[putfirst[]] +-Description +-Narrative +-[has[plugin-type]] +-[prefix] +-[prefix[$:/state/popup/export]] +\end + +\procedure testcase-source() +
+ <$macrocall $name="tabs" + tabsList=<> + explicitState=<> + default="Output" + template="$:/core/ui/testcases/DefaultTemplate/SourceTabs" + /> +
+\end + +\procedure testcase-panes() +
+ <> +
+ <> +
+\end + +\procedure testcase-body() +
+ <> + <%if [[Narrative]is[tiddler]] %> + <> + <%endif%> + <%if [match[fail]] %> + <> + <%endif%> + <> +
+\end + +<> \ No newline at end of file diff --git a/core/ui/TestCases/actions/Export.tid b/core/ui/TestCases/actions/Export.tid index 0d5f976e5..79c6eb93a 100644 --- a/core/ui/TestCases/actions/Export.tid +++ b/core/ui/TestCases/actions/Export.tid @@ -1,4 +1,4 @@ title: $:/core/ui/testcases/actions/Export tags: $:/tags/TestCase/Actions -<$macrocall $name="exportButton" exportFilter="[all[tiddlers]sort[]] -[prefix[$:/state/]] -Description -Narrative -ExpectedResult -Output Output +[putfirst[]] -[has[plugin-type]]" lingoBase="$:/language/Buttons/ExportTiddlers/"/> \ No newline at end of file +<$macrocall $name="exportButton" exportFilter="[all[tiddlers]sort[]] -[prefix[$:/state/]] -Description -Narrative -ExpectedResult -[has[plugin-type]]" lingoBase="$:/language/Buttons/ExportTiddlers/"/> \ No newline at end of file From 6798e58fc81e993a63ab883b1836168822429bf1 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 19 Aug 2024 10:33:14 +0100 Subject: [PATCH 26/44] Prune plugins for tiddlywiki.com Fixes #8528 --- editions/tw5.com/tiddlywiki.info | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/editions/tw5.com/tiddlywiki.info b/editions/tw5.com/tiddlywiki.info index 504abac5c..2f3ddade8 100644 --- a/editions/tw5.com/tiddlywiki.info +++ b/editions/tw5.com/tiddlywiki.info @@ -1,16 +1,13 @@ { "description": "Documentation from https://tiddlywiki.com", "plugins": [ - "tiddlywiki/nodewebkitsaver", "tiddlywiki/browser-sniff", "tiddlywiki/railroad", - "tiddlywiki/evernote", "tiddlywiki/internals", "tiddlywiki/menubar", "tiddlywiki/confetti", "tiddlywiki/dynannotate", - "tiddlywiki/tour", - "tiddlywiki/qrcode" + "tiddlywiki/tour" ], "themes": [ "tiddlywiki/vanilla", From ab2b79ef801b9bec66075c9eb9a13240fda63ee9 Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Mon, 19 Aug 2024 18:50:23 +0800 Subject: [PATCH 27/44] Let language plugins display properly (#8355) * Fix language plugin viewtemplatebody * Let config/ViewTemplateBodyFilters/plugin have higher priority * Fix for file import --- core/wiki/tags/ViewTemplateBodyFilter.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/wiki/tags/ViewTemplateBodyFilter.tid b/core/wiki/tags/ViewTemplateBodyFilter.tid index 0143c1f88..c7510cb09 100644 --- a/core/wiki/tags/ViewTemplateBodyFilter.tid +++ b/core/wiki/tags/ViewTemplateBodyFilter.tid @@ -1,2 +1,2 @@ title: $:/tags/ViewTemplateBodyFilter -list: $:/config/ViewTemplateBodyFilters/testcase $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/code-body $:/config/ViewTemplateBodyFilters/stylesheet $:/config/ViewTemplateBodyFilters/core-ui-advanced-search $:/config/ViewTemplateBodyFilters/core-ui-tags $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/default \ No newline at end of file +list: $:/config/ViewTemplateBodyFilters/testcase $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/code-body $:/config/ViewTemplateBodyFilters/stylesheet $:/config/ViewTemplateBodyFilters/core-ui-advanced-search $:/config/ViewTemplateBodyFilters/core-ui-tags $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/default From 53b808d723b6450b0eff341be48ffcb4a4fa6ac4 Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Tue, 20 Aug 2024 23:24:29 +0800 Subject: [PATCH 28/44] Add support for language Chinese (Hong Kong) (#8531) * Add support for language Chinese (Hong Kong) * Remove error translation --- editions/full/tiddlywiki.info | 3 +- languages/zh-HK/Buttons.multids | 17 +++++++ languages/zh-HK/ControlPanel.multids | 31 +++++++++++++ languages/zh-HK/Docs/ModuleTypes.multids | 3 ++ languages/zh-HK/Fields.multids | 5 +++ languages/zh-HK/GettingStarted.tid | 18 ++++++++ languages/zh-HK/Help/listen.tid | 35 +++++++++++++++ languages/zh-HK/Help/notfound.tid | 3 ++ languages/zh-HK/Help/password.tid | 10 +++++ languages/zh-HK/Help/render.tid | 34 ++++++++++++++ languages/zh-HK/Help/savetiddlers.tid | 16 +++++++ languages/zh-HK/Help/server.tid | 44 +++++++++++++++++++ languages/zh-HK/Help/setfield.tid | 17 +++++++ languages/zh-HK/Misc.multids | 5 +++ languages/zh-HK/SideBar.multids | 3 ++ .../zh-HK/Snippets/ProcedureDefinition.tid | 7 +++ languages/zh-HK/ThemeTweaks.multids | 3 ++ 17 files changed, 253 insertions(+), 1 deletion(-) create mode 100644 languages/zh-HK/Buttons.multids create mode 100644 languages/zh-HK/ControlPanel.multids create mode 100644 languages/zh-HK/Docs/ModuleTypes.multids create mode 100644 languages/zh-HK/Fields.multids create mode 100644 languages/zh-HK/GettingStarted.tid create mode 100644 languages/zh-HK/Help/listen.tid create mode 100644 languages/zh-HK/Help/notfound.tid create mode 100644 languages/zh-HK/Help/password.tid create mode 100644 languages/zh-HK/Help/render.tid create mode 100644 languages/zh-HK/Help/savetiddlers.tid create mode 100644 languages/zh-HK/Help/server.tid create mode 100644 languages/zh-HK/Help/setfield.tid create mode 100644 languages/zh-HK/Misc.multids create mode 100644 languages/zh-HK/SideBar.multids create mode 100644 languages/zh-HK/Snippets/ProcedureDefinition.tid create mode 100644 languages/zh-HK/ThemeTweaks.multids diff --git a/editions/full/tiddlywiki.info b/editions/full/tiddlywiki.info index 130d61dfe..b12834645 100644 --- a/editions/full/tiddlywiki.info +++ b/editions/full/tiddlywiki.info @@ -57,7 +57,8 @@ "sl-SI", "sv-SE", "zh-Hans", - "zh-Hant" + "zh-Hant", + "zh-HK" ], "themes": [ "tiddlywiki/centralised", diff --git a/languages/zh-HK/Buttons.multids b/languages/zh-HK/Buttons.multids new file mode 100644 index 000000000..4ec7a7628 --- /dev/null +++ b/languages/zh-HK/Buttons.multids @@ -0,0 +1,17 @@ +title: $:/language/Buttons/ + +ControlPanel/Hint: 開啓控制台 +FoldOthers/Hint: 收合其他已開啓條目的內容 +FoldAll/Hint: 收合所有已開啓條目的內容 +UnfoldAll/Hint: 展開所有已開啓條目的內容 +Help/Caption: 説明 +Help/Hint: 顯示説明中心 +Home/Hint: 開啓首頁條目 +LayoutSwitcher/Hint: 開啓版面切換器 +Manager/Hint: 開啓條目管理器 +OpenControlPanel/Hint: 開啓控制台 +OpenWindow/Caption: 開啓於新視窗 +OpenWindow/Hint: 在新視窗中開啓條目 +Permaview/Hint: 設定瀏覽器網址列為直接連結到當前所有已開啓條目 +Timestamp/On/Caption: 時間戳記開啓 +Stamp/New/Text: 片段的文字。(記得在 `caption` 欄位中新增一個説明性的標題)。 diff --git a/languages/zh-HK/ControlPanel.multids b/languages/zh-HK/ControlPanel.multids new file mode 100644 index 000000000..44e43bcac --- /dev/null +++ b/languages/zh-HK/ControlPanel.multids @@ -0,0 +1,31 @@ +title: $:/language/ControlPanel/ + +Basics/DefaultTiddlers/BottomHint: 標題含空白時請使用 [[雙中括弧]],或者您可用 {{保留開啓中的條目順序||$:/snippets/retain-story-ordering-button}} +Basics/DefaultTiddlers/TopHint: 預設開啓的條目 +KeyboardShortcuts/Platform/All: 所有平台 +KeyboardShortcuts/Platform/Mac: 僅 Macintosh 平台 +KeyboardShortcuts/Platform/NonMac: 僅非 Macintosh 平台 +KeyboardShortcuts/Platform/Linux: 僅 Linux 平台 +KeyboardShortcuts/Platform/NonLinux: 僅非 Linux 平台 +KeyboardShortcuts/Platform/Windows: 僅 Windows 平台 +KeyboardShortcuts/Platform/NonWindows: 僅非 Windows 平台 +Plugins/Enable/Caption: 啓用 +Plugins/Enable/Hint: 重新載入頁面時啓用此插件 +Plugins/OpenPluginLibrary: 開啓插件程式庫 +Parsing/Hint: 在此您可以全域停用或啓用維基解析規則。要使更改生效,請儲存並重新載入您的維基。停用某些解析規則,會妨礙 <$text text="TiddlyWiki"/> 正常運作。可使用[[安全模式|https://tiddlywiki.com/#SafeMode]]恢復正常操作。 +Saving/DownloadSaver/AutoSave/Hint: 啓用下載儲存模組的自動儲存 +Saving/GitService/GitHub/Password: 密碼、OAUTH 權杖,或個人存取權杖 (詳見 [[GitHub 説明頁面|https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line]]) +Saving/GitService/GitLab/Password: 個人存取權杖的 API (詳見 [[GitLab 説明頁面|https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html]]) +Settings/CamelCase/Caption: 駝峯式維基鏈接 +Settings/CamelCase/Hint: 您可以全域停用駝峯式短語自動鏈接。須儲存後重新載入,方才生效。 +Settings/CamelCase/Description: 啓用自動駝峯式鏈接 +Settings/EditorToolbar/Hint: 啓用或停用編輯器工具列︰ +Settings/InfoPanelMode/Sticky/Description: 條目資訊面板保持開啓狀態,直到明確關閉 +Settings/LinkToBehaviour/Caption: 條目開啓行為 +Settings/LinkToBehaviour/OpenAbove: 開啓於當前條目之上 +Settings/LinkToBehaviour/OpenBelow: 開啓於當前條目之下 +Settings/LinkToBehaviour/OpenAtTop: 開啓於故事河的頂端 +Settings/LinkToBehaviour/OpenAtBottom: 開啓於故事河的底部 +Settings/MissingLinks/Description: 啓用鏈接到佚失條目 +Settings/NavigationAddressBar/Permaview/Description: 包括目標條目和當前已開啓的條目序列 +Settings/PerformanceInstrumentation/Description: 啓用效能檢測 \ No newline at end of file diff --git a/languages/zh-HK/Docs/ModuleTypes.multids b/languages/zh-HK/Docs/ModuleTypes.multids new file mode 100644 index 000000000..c7915f3aa --- /dev/null +++ b/languages/zh-HK/Docs/ModuleTypes.multids @@ -0,0 +1,3 @@ +title: $:/language/Docs/ModuleTypes/ + +startup: 啓動時期的功能函數。 diff --git a/languages/zh-HK/Fields.multids b/languages/zh-HK/Fields.multids new file mode 100644 index 000000000..002a625a5 --- /dev/null +++ b/languages/zh-HK/Fields.multids @@ -0,0 +1,5 @@ +title: $:/language/Docs/Fields/ + +class: 渲染條目時,套用到條目的 CSS 類別 - 請參閲[[依自訂類別的自訂樣式|Custom styles by user-class]]。也適用於[[互動視窗|Modals]] +description: 插件的説明、描述 +toc-link: 若設定為 ''no'',則抑制目錄樹中的條目鏈接。 \ No newline at end of file diff --git a/languages/zh-HK/GettingStarted.tid b/languages/zh-HK/GettingStarted.tid new file mode 100644 index 000000000..1988e17de --- /dev/null +++ b/languages/zh-HK/GettingStarted.tid @@ -0,0 +1,18 @@ +title: GettingStarted + +\define lingo-base() $:/language/ControlPanel/Basics/ +歡迎使用 ~TiddlyWiki 及參與 ~TiddlyWiki 社羣 + +開始將重要資訊存放於 ~TiddlyWiki 之前,確認您可以可靠地儲存變更是很重要的。詳細資訊請參閲 https://tiddlywiki.com/#GettingStarted + +!! 設定此 ~TiddlyWiki + +
+ +|tc-table-no-border tc-first-col-min-width tc-first-link-nowrap|k +| <$link to="$:/SiteTitle"><>|<$edit-text tiddler="$:/SiteTitle" default="" tag="input"/> | +| <$link to="$:/SiteSubtitle"><>|<$edit-text tiddler="$:/SiteSubtitle" default="" tag="input"/> | +|^ <$link to="$:/DefaultTiddlers"><>
<>|<$edit tag="textarea" tiddler="$:/DefaultTiddlers"/>
//<>// | +
+ +請參閲[[控制枱|$:/ControlPanel]]查看更多選項。 \ No newline at end of file diff --git a/languages/zh-HK/Help/listen.tid b/languages/zh-HK/Help/listen.tid new file mode 100644 index 000000000..f3ad22e92 --- /dev/null +++ b/languages/zh-HK/Help/listen.tid @@ -0,0 +1,35 @@ +title: $:/language/Help/listen +description: 為 TiddlyWiki 提供一個 HTTP 伺服器介面 + +通過 HTTP 提供一個維基服務。 + +listen 命令使用[[命名的命令參數|NamedCommandParameters]]: + +``` +--listen [=]... +``` + +所有參數都是可選的, 具有安全的預設值, 可以按任意順序指定。認可的參數有: + +* ''host'' - 可選的主機名稱, (預設為 "127.0.0.1" 或名為 "localhost") +* ''path-prefix'' - 可選的路徑前綴 +* ''port'' - 偵聽的埠號;非數值會被解譯為一個系統環境變數,從其中提取埠號 (預設為 "8080") +* ''credentials'' - 憑證 CSV 檔案的路徑名(相對於維基資料夾) +* ''anon-username'' - 匿名使用者的編輯署名 +* ''username'' - 可選的基本驗證使用者名稱 +* ''password'' - 可選的基本驗證密碼 +* ''authenticated-user-header'' - 可選的 HTTP 請求功能參數名稱,用於受信任身份驗證 +* ''readers'' - 允許讀取此維基,以逗號分隔的使用者名稱的清單 +* ''writers'' - 允許寫入此維基,以逗號分隔的使用者名稱的清單 +* ''csrf-disable'' - 設定為 "yes" 以停用 CSRF 檢查 (預設為 "no") +* ''sse-enabled'' - 設定為 "yes" 以啟用伺服器傳送的事件 (預設為 "no") +* ''root-tiddler'' - 服務的基本條目 (預設為 "$:/core/save/all") +* ''root-render-type'' - 呈現的基本條目的內容類型 (預設為 "text/plain") +* ''root-serve-type'' - 服務的基本條目的內容類型 (預設為 "text/html") +* ''tls-cert'' - TLS 證書檔案的路徑名(相對於維基資料夾) +* ''tls-key'' - TLS 密鑰檔案的路徑名(相對於維基資料夾) +* ''debug-level'' - 可選的偵錯層級;設定為 "debug" 來檢視請求的詳細資訊;(預設為 "none") +* ''gzip'' - 設為 "yes" 以啟用某些 http 端點的 gzip 壓縮 (預設為 "no") +* ''use-browser-cache'' - 設定為 "yes" ,允許瀏覽器快取回應,以節省頻寬(預設值為 "no") + +有關向整個本地網路開啟實例的資訊,以及可能的安全問題,請參閲 TiddlyWiki.com 的 WebServer 條目。 diff --git a/languages/zh-HK/Help/notfound.tid b/languages/zh-HK/Help/notfound.tid new file mode 100644 index 000000000..52bf9bd25 --- /dev/null +++ b/languages/zh-HK/Help/notfound.tid @@ -0,0 +1,3 @@ +title: $:/language/Help/notfound + +無此項目説明 \ No newline at end of file diff --git a/languages/zh-HK/Help/password.tid b/languages/zh-HK/Help/password.tid new file mode 100644 index 000000000..1560ef72c --- /dev/null +++ b/languages/zh-HK/Help/password.tid @@ -0,0 +1,10 @@ +title: $:/language/Help/password +description: 設定用以加密的密碼 + +設定用以加密的密碼 + +``` +--password +``` + +''請注意'':這不是用於提供 TiddlyWiki 具有密碼保護功能。相反地,請看 [[ServerCommand]] 的密碼選項説明。 diff --git a/languages/zh-HK/Help/render.tid b/languages/zh-HK/Help/render.tid new file mode 100644 index 000000000..bcc924113 --- /dev/null +++ b/languages/zh-HK/Help/render.tid @@ -0,0 +1,34 @@ +title: $:/language/Help/render +description: 呈現個別條目到檔案 + +呈現由篩選器標識的個別條目,並將結果儲存到指定的檔案。 + +可選擇性地指定範本條目名稱。在此情況下,不是直接呈現每個條目,而是使用設為正在呈現的條目名稱的 "currentTiddler" 變數,來呈現範本條目。 + +也可以選擇性地指定附加變數的名稱和值。 + +``` +--render [] [] [