tiddlywiki 5.3.0 → 5.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +9 -2
- package/bin/build-site.sh +25 -5
- package/bin/ci-test.sh +16 -0
- package/boot/boot.js +18 -7
- package/core/images/new-journal-button.tid +1 -3
- package/core/language/en-GB/Exporters.multids +1 -1
- package/core/language/en-GB/Help/commands.tid +1 -1
- package/core/language/en-GB/Help/savewikifolder.tid +2 -2
- package/core/language/en-GB/Help/server.tid +1 -1
- package/core/language/en-GB/Types/image_svg_xml.tid +1 -1
- package/core/language/en-GB/Types/image_x-icon.tid +1 -1
- package/core/modules/commands/savetiddlers.js +1 -1
- package/core/modules/editor/engines/framed.js +1 -1
- package/core/modules/editor/engines/simple.js +1 -1
- package/core/modules/filters/all.js +5 -5
- package/core/modules/filters/encodings.js +6 -2
- package/core/modules/filters/json-ops.js +95 -1
- package/core/modules/filters/listops.js +1 -0
- package/core/modules/parsers/textparser.js +5 -4
- package/core/modules/parsers/wikiparser/rules/conditional.js +120 -0
- package/core/modules/parsers/wikiparser/rules/fnprocdef.js +2 -2
- package/core/modules/parsers/wikiparser/rules/parameters.js +1 -1
- package/core/modules/parsers/wikiparser/wikiparser.js +31 -8
- package/core/modules/savers/github.js +1 -1
- package/core/modules/startup/rootwidget.js +1 -0
- package/core/modules/startup/startup.js +5 -0
- package/core/modules/startup/windows.js +2 -1
- package/core/modules/syncer.js +160 -122
- package/core/modules/utils/dom/dom.js +3 -3
- package/core/modules/utils/dom/dragndrop.js +4 -2
- package/core/modules/utils/dom/http.js +19 -3
- package/core/modules/utils/fakedom.js +5 -1
- package/core/modules/utils/utils.js +27 -4
- package/core/modules/widgets/browse.js +10 -0
- package/core/modules/widgets/button.js +15 -3
- package/core/modules/widgets/checkbox.js +14 -1
- package/core/modules/widgets/draggable.js +16 -5
- package/core/modules/widgets/droppable.js +14 -2
- package/core/modules/widgets/image.js +19 -14
- package/core/modules/widgets/importvariables.js +1 -1
- package/core/modules/widgets/link.js +12 -2
- package/core/modules/widgets/list.js +176 -19
- package/core/modules/widgets/radio.js +4 -0
- package/core/modules/widgets/range.js +4 -0
- package/core/modules/widgets/scrollable.js +66 -1
- package/core/modules/widgets/select.js +35 -23
- package/core/modules/widgets/transclude.js +88 -45
- package/core/modules/widgets/widget.js +42 -47
- package/core/modules/wiki.js +3 -3
- package/core/templates/html-json-skinny-tiddler.tid +0 -1
- package/core/templates/html-json-tiddler.tid +1 -1
- package/core/templates/store.area.template.html.tid +4 -4
- package/core/ui/AlertTemplate.tid +1 -0
- package/core/ui/ControlPanel/Basics.tid +2 -2
- package/core/ui/EditTemplate/body/default.tid +12 -8
- package/core/ui/EditTemplate/fields.tid +2 -2
- package/core/ui/EditTemplate/type.tid +1 -1
- package/core/ui/EditTemplate.tid +1 -0
- package/core/ui/EditorToolbar/preview.tid +6 -0
- package/core/ui/ImportPreviews/Text.tid +1 -0
- package/core/ui/PageStylesheet.tid +1 -0
- package/core/ui/PageTemplate.tid +2 -1
- package/core/ui/RootTemplate.tid +1 -0
- package/core/ui/StoryTiddlerTemplate.tid +1 -0
- package/core/ui/ViewTemplate/body/default.tid +1 -0
- package/core/ui/ViewTemplate/subtitle.tid +2 -5
- package/core/ui/ViewTemplate.tid +1 -0
- package/core/wiki/config/OfficialPluginLibrary.tid +1 -1
- package/core/wiki/config/ViewTemplateBodyFilters.multids +2 -1
- package/core/wiki/macros/colour-picker.tid +6 -6
- package/core/wiki/macros/image-picker.tid +5 -5
- package/core/wiki/macros/list.tid +95 -78
- package/core/wiki/macros/tabs.tid +9 -1
- package/core/wiki/macros/tag-picker.tid +2 -2
- package/core/wiki/macros/tag.tid +2 -1
- package/core/wiki/macros/toc.tid +3 -3
- package/core/wiki/tags/ViewTemplateBodyFilter.tid +1 -2
- package/editions/de-AT/tiddlers/HelloThere.tid +2 -2
- package/editions/de-AT/tiddlers/community/Fur_Entwickler.tid +1 -1
- package/editions/de-AT/tiddlers/external/tiddlywiki.files +1 -1
- package/editions/de-AT-server/tiddlers/system/favicon.png +0 -0
- package/editions/{es-ES-server/tiddlers/system/favicon.ico.meta → de-AT-server/tiddlers/system/favicon.png.meta} +1 -1
- package/editions/dev/tiddlers/images/favicon.png +0 -0
- package/editions/{de-AT-server/tiddlers/system/favicon.ico.meta → dev/tiddlers/images/favicon.png.meta} +1 -1
- package/editions/dev/tiddlers/new/HookMechanism.tid +28 -3
- package/editions/empty/tiddlywiki.info +5 -2
- package/editions/es-ES/tiddlers/Forums.tid +4 -5
- package/editions/es-ES/tiddlers/HelloThere.tid +2 -2
- package/editions/es-ES/tiddlers/Typography.tid +1 -1
- package/editions/es-ES/tiddlers/images/favicon.png +0 -0
- package/editions/{dev/tiddlers/images/favicon.ico.meta → es-ES/tiddlers/images/favicon.png.meta} +1 -1
- package/editions/es-ES/tiddlers/images/green_favicon.png +0 -0
- package/editions/es-ES/tiddlers/images/{green_favicon.ico.meta → green_favicon.png.meta} +1 -1
- package/editions/es-ES-server/tiddlers/system/favicon.png +0 -0
- package/editions/{es-ES/tiddlers/images/favicon.ico.meta → es-ES-server/tiddlers/system/favicon.png.meta} +1 -1
- package/editions/fr-FR/tiddlers/images/favicon.png +0 -0
- package/editions/fr-FR/tiddlers/images/favicon.png.meta +2 -0
- package/editions/fr-FR/tiddlers/images/green_favicon.png +0 -0
- package/editions/fr-FR/tiddlers/images/{green_favicon.ico.meta → green_favicon.png.meta} +1 -1
- package/editions/fr-FR-server/tiddlers/system/favicon.png +0 -0
- package/editions/fr-FR-server/tiddlers/system/favicon.png.meta +2 -0
- package/editions/highlightdemo/tiddlywiki.info +1 -1
- package/editions/ja-JP/tiddlers/images/favicon.png +0 -0
- package/editions/ja-JP/tiddlers/images/favicon.png.meta +2 -0
- package/editions/ja-JP/tiddlers/images/green_favicon.png +0 -0
- package/editions/ja-JP/tiddlers/images/{green_favicon.ico.meta → green_favicon.png.meta} +1 -1
- package/editions/katexdemo/tiddlywiki.info +1 -1
- package/editions/ko-KR/tiddlers/images/favicon.png +0 -0
- package/editions/ko-KR/tiddlers/images/favicon.png.meta +2 -0
- package/editions/ko-KR/tiddlers/images/green_favicon.png +0 -0
- package/editions/ko-KR/tiddlers/images/{green_favicon.ico.meta → green_favicon.png.meta} +1 -1
- package/editions/ko-KR-server/tiddlers/system/favicon.png +0 -0
- package/editions/ko-KR-server/tiddlers/system/favicon.png.meta +2 -0
- package/editions/pluginlibrary/tiddlywiki.info +2 -2
- package/editions/prerelease/tiddlers/{Release 5.3.1.tid → Release 5.3.3.tid } +23 -21
- package/editions/prerelease/tiddlers/system/PrereleaseLocalPluginLibrary.tid +1 -1
- package/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid +1 -1
- package/editions/prerelease/tiddlers/system/TiddlyWiki Pre-release.tid +1 -1
- package/editions/prerelease/tiddlers/system/favicon.png +0 -0
- package/editions/prerelease/tiddlers/system/favicon.png.meta +2 -0
- package/editions/prerelease/tiddlers/system/temp-my-scroll-position.tid +3 -0
- package/editions/resumebuilder/tiddlywiki.info +1 -1
- package/editions/server/tiddlywiki.info +1 -1
- package/editions/server-external-js/tiddlywiki.info +1 -1
- package/editions/test/playwright.spec.js +25 -0
- package/editions/test/tiddlers/tests/data/conditionals/Basic.tid +26 -0
- package/editions/test/tiddlers/tests/data/conditionals/BlockMode.tid +37 -0
- package/editions/test/tiddlers/tests/data/conditionals/Else.tid +26 -0
- package/editions/test/tiddlers/tests/data/conditionals/Elseif.tid +32 -0
- package/editions/test/tiddlers/tests/data/conditionals/MissingEndIf.tid +26 -0
- package/editions/test/tiddlers/tests/data/conditionals/MultipleResults.tid +12 -0
- package/editions/test/tiddlers/tests/data/conditionals/Nested.tid +38 -0
- package/editions/test/tiddlers/tests/data/conditionals/NestedElseif.tid +60 -0
- package/editions/test/tiddlers/tests/data/functions/IndentedFunctions.tid +24 -0
- package/editions/test/tiddlers/tests/data/functions/WikifiedFunctions.tid +1 -1
- package/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets.tid +23 -0
- package/editions/test/tiddlers/tests/data/importvariables/WithSetWidgets2.tid +22 -0
- package/editions/test/tiddlers/tests/data/importvariables/WithSetWidgetsAndMacros.tid +29 -0
- package/editions/test/tiddlers/tests/data/list-widget/WithExplicitTemplates.tid +29 -0
- package/editions/test/tiddlers/tests/data/list-widget/WithExplicitTemplatesInBlockMode.tid +32 -0
- package/editions/test/tiddlers/tests/data/list-widget/WithExplicitTemplatesOverriddenByAttributes.tid +33 -0
- package/editions/test/tiddlers/tests/data/list-widget/WithJoinTemplate.tid +30 -0
- package/editions/test/tiddlers/tests/data/list-widget/WithJoinTemplateInBlockMode.tid +32 -0
- package/editions/test/tiddlers/tests/data/list-widget/WithLimit.tid +25 -0
- package/editions/test/tiddlers/tests/data/list-widget/WithMissingTemplate.tid +26 -0
- package/editions/test/tiddlers/tests/data/procedures/Nested-indented.tid +20 -0
- package/editions/test/tiddlers/tests/data/procedures/TrailingNewlines.tid +22 -0
- package/editions/test/tiddlers/tests/data/transclude/CustomWidget-CodeblockOverride-TextParser.tid +20 -0
- package/editions/test/tiddlers/tests/data/transclude/CustomWidget-Simple-Indented.tid +33 -0
- package/editions/test/tiddlers/tests/data/transclude/Parameterised-Shortcut-ParametersIndented.tid +20 -0
- package/editions/test/tiddlers/tests/data/transclude/Procedures-Double-Underscore.tid +26 -0
- package/editions/test/tiddlers/tests/data/transclude/Variable-Refreshing.tid +27 -0
- package/editions/test/tiddlers/tests/data/transclude/Variable-Static.tid +15 -0
- package/editions/test/tiddlers/tests/data/widgets/DataAttributes/ButtonWidget-DataAttributes.tid +27 -0
- package/editions/test/tiddlers/tests/data/widgets/DataAttributes/CheckboxWidget-DataAttributes.tid +22 -0
- package/editions/test/tiddlers/tests/data/widgets/DataAttributes/DraggableWidget-DataAttributes.tid +27 -0
- package/editions/test/tiddlers/tests/data/widgets/DataAttributes/DroppableWidget-DataAttributes.tid +27 -0
- package/editions/test/tiddlers/tests/data/widgets/DataAttributes/LinkWidget-DataAttributes.tid +27 -0
- package/editions/test/tiddlers/tests/data/widgets/DataAttributes/OrderedStyleAttributes.tid +15 -0
- package/editions/test/tiddlers/tests/data/widgets/DataAttributes/SelectWidget-DataAttributes.tid +27 -0
- package/editions/test/tiddlers/tests/data/widgets/ElementWidgetEventAttributes.tid +15 -0
- package/editions/test/tiddlers/tests/data/widgets/ElementWidgetStyleAttributes.tid +15 -0
- package/editions/test/tiddlers/tests/data/widgets/SubstitutedAttributes.tid +5 -3
- package/editions/test/tiddlers/tests/test-filters.js +5 -4
- package/editions/test/tiddlers/tests/test-json-filters.js +40 -0
- package/editions/test/tiddlers/tests/test-utils.js +23 -0
- package/editions/test/tiddlers/tests/test-widget.js +62 -0
- package/editions/tw.org/tiddlers/$__favicon.ico.png +0 -0
- package/editions/tw.org/tiddlywiki.info +1 -1
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/classic.tiddlywiki.com.png +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/{classic.tiddlywiki.com.ico.meta → classic.tiddlywiki.com.png.meta} +1 -1
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/links.tiddlywiki.org.png +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/{links.tiddlywiki.org.ico.meta → links.tiddlywiki.org.png.meta} +1 -1
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/tiddlywiki.com.dev.png +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/{tiddlywiki.com.dev.ico.meta → tiddlywiki.com.dev.png.meta} +1 -1
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/tiddlywiki.com.png +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/{tiddlywiki.com.ico.meta → tiddlywiki.com.png.meta} +1 -1
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/tiddlywiki.com.prerelease.png +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/{tiddlywiki.com.prerelease.ico.meta → tiddlywiki.com.prerelease.png.meta} +1 -1
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/tiddlywiki.com.upgrade.png +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/{tiddlywiki.com.upgrade.ico.meta → tiddlywiki.com.upgrade.png.meta} +1 -1
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/tiddlywiki.org.png +0 -0
- package/editions/tw5.com/tiddlers/about/Archive.tid +82 -0
- package/editions/tw5.com/tiddlers/community/Chinese Community.tid +20 -0
- package/editions/tw5.com/tiddlers/community/editions/Tidme by oflg.tid +16 -0
- package/editions/tw5.com/tiddlers/community/plugins/FSRS4TW by oflg.tid +10 -0
- package/editions/tw5.com/tiddlers/community/resources/TiddlyWiki Posts.tid +3 -3
- package/editions/tw5.com/tiddlers/community/resources/_Timimi_ Extension and executable by Riz.tid +3 -1
- package/editions/tw5.com/tiddlers/community/tutorials/GitHub Saver Tutorial by Mohammad.tid +5 -5
- package/editions/tw5.com/tiddlers/concepts/Macros.tid +7 -3
- package/editions/tw5.com/tiddlers/concepts/Title List.tid +5 -1
- package/editions/tw5.com/tiddlers/definitions/Git.tid +9 -0
- package/editions/tw5.com/tiddlers/definitions/GitHub.tid +6 -4
- package/editions/tw5.com/tiddlers/definitions/GitLab.tid +13 -0
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Fourth.tid +2 -0
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/SecondThreeThree.tid +11 -1
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContents/Third.tid +2 -0
- package/editions/tw5.com/tiddlers/filters/decodebase64 Operator.tid +6 -1
- package/editions/tw5.com/tiddlers/filters/encodebase64 Operator.tid +6 -1
- package/editions/tw5.com/tiddlers/filters/examples/jsonset.tid +59 -0
- package/editions/tw5.com/tiddlers/filters/examples/jsonstringify Operator (Examples).tid +7 -5
- package/editions/tw5.com/tiddlers/filters/examples/stringify_Operator_(Examples).tid +5 -3
- package/editions/tw5.com/tiddlers/filters/jsonextract.tid +8 -0
- package/editions/tw5.com/tiddlers/filters/jsonget.tid +8 -0
- package/editions/tw5.com/tiddlers/filters/jsonset.tid +64 -0
- package/editions/tw5.com/tiddlers/filters/jsonstringify Operator.tid +14 -15
- package/editions/tw5.com/tiddlers/filters/jsontype.tid +8 -0
- package/editions/tw5.com/tiddlers/filters/stringify_Operator.tid +12 -15
- package/editions/tw5.com/tiddlers/filters/substitute Operator.tid +3 -3
- package/editions/tw5.com/tiddlers/filters/syntax/Filter Expression.tid +1 -1
- package/editions/tw5.com/tiddlers/hellothere/HelloThere.tid +6 -1
- package/editions/tw5.com/tiddlers/howtos/Constructing JSON tiddlers.tid +3 -3
- package/editions/tw5.com/tiddlers/images/Favicon template.svg +296 -0
- package/editions/tw5.com/tiddlers/images/Favicon template.svg.meta +3 -0
- package/editions/tw5.com/tiddlers/images/New Release Banner.png +0 -0
- package/editions/tw5.com/tiddlers/images/{New Release Banner.jpg.meta → New Release Banner.png.meta } +1 -1
- package/editions/tw5.com/tiddlers/images/favicon.png +0 -0
- package/editions/tw5.com/tiddlers/images/favicon.png.meta +2 -0
- package/editions/tw5.com/tiddlers/images/green_favicon.png +0 -0
- package/editions/tw5.com/tiddlers/images/green_favicon.png.meta +2 -0
- package/editions/tw5.com/tiddlers/macros/CoreMacros.tid +1 -1
- package/editions/tw5.com/tiddlers/macros/TagMacro.tid +3 -1
- package/editions/tw5.com/tiddlers/macros/examples/tag.tid +22 -1
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-close-window.tid +2 -2
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-download-file.tid +3 -3
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-bitmap-operation.tid +3 -3
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-edit-text-operation.tid +2 -2
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-focus-selector.tid +2 -2
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Random Dog.tid +90 -0
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request Example Zotero.tid +4 -3
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-http-request.tid +4 -2
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-modal.tid +2 -2
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid +3 -3
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-notify.tid +3 -3
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-external-window.tid +4 -3
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-open-window.tid +12 -5
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-permalink.tid +1 -1
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-save-wiki.tid +3 -3
- package/editions/tw5.com/tiddlers/pragmas/Pragma_ _procedure.tid +2 -2
- package/editions/tw5.com/tiddlers/pragmas/Pragma_ _rules.tid +2 -2
- package/editions/tw5.com/tiddlers/pragmas/Pragma_ _whitespace.tid +7 -3
- package/editions/tw5.com/tiddlers/pragmas/Pragmas.tid +3 -1
- package/editions/tw5.com/tiddlers/procedures/Procedure Definitions.tid +4 -2
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.0.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.1.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.10.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.11.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.12.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.13.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.14.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.15.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.16.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.17.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.18.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.19.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.2.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.20.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.21.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.22.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.23.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.3.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.4.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.5.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.6.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.7.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.8.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.1.9.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.0.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.1.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.2.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.3.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.4.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.5.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.6.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.7.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.3.0.tid +1 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.3.1.tid +87 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.3.2.tid +184 -0
- package/editions/tw5.com/tiddlers/releasenotes/Releases.tid +4 -2
- package/editions/tw5.com/tiddlers/releasenotes/TiddlyWiki Releases.tid +1 -1
- package/editions/tw5.com/tiddlers/{Saving on Browser with TiddlyStow.tid → saving/Saving on Browser with TiddlyStow.tid } +2 -2
- package/editions/tw5.com/tiddlers/saving/Saving to a Git service.tid +5 -1
- package/editions/tw5.com/tiddlers/saving/Saving via a Minimal Web Server.tid +8 -11
- package/editions/tw5.com/tiddlers/system/tw5.com-styles.tid +5 -0
- package/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_Macro.tid +1 -1
- package/editions/tw5.com/tiddlers/variables/Behaviour of invoked variables depends on how the variable was declared.tid +52 -0
- package/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via filter expression function call.tid +10 -0
- package/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via filter operator parameter.tid +11 -0
- package/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via normal wikitext.tid +11 -0
- package/editions/tw5.com/tiddlers/variables/Behaviour of variables invoked via widget attributes.tid +11 -0
- package/editions/tw5.com/tiddlers/variables/Variable Usage.tid +5 -49
- package/editions/tw5.com/tiddlers/widgets/ActionListopsWidget.tid +24 -2
- package/editions/tw5.com/tiddlers/widgets/ActionPopupWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/BrowseWidget.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/CheckboxWidget.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/Custom Widgets.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/DraggableWidget.tid +3 -2
- package/editions/tw5.com/tiddlers/widgets/DroppableWidget.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/GenesisWidget.tid +1 -1
- package/editions/tw5.com/tiddlers/widgets/ImageWidget.tid +2 -1
- package/editions/tw5.com/tiddlers/widgets/LinkWidget.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/ListWidget.tid +27 -2
- package/editions/tw5.com/tiddlers/widgets/RadioWidget.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/RangeWidget.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid +27 -2
- package/editions/tw5.com/tiddlers/widgets/SelectWidget.tid +4 -1
- package/editions/tw5.com/tiddlers/widgets/SetWidget.tid +17 -1
- package/editions/tw5.com/tiddlers/widgets/TranscludeWidget.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/examples/ActionListopsWidget (Examples).tid +12 -1
- package/editions/tw5.com/tiddlers/wikitext/Anchor Links using HTML.tid +1 -1
- package/editions/tw5.com/tiddlers/wikitext/Conditional Shortcut Syntax.tid +62 -0
- package/editions/tw5.com/tiddlers/wikitext/Styles and Classes in WikiText.tid +52 -19
- package/editions/tw5.com/tiddlers/wikitext/Transclusion and Substitution.tid +3 -3
- package/editions/tw5.com/tiddlers/wikitext/Variable Attribute Values.tid +5 -2
- package/editions/tw5.com/tiddlers/wikitext/Widget Attributes.tid +8 -3
- package/editions/tw5.com/tiddlers/wikitext/Widgets in WikiText.tid +1 -0
- package/editions/tw5.com/tiddlywiki.info +9 -3
- package/editions/tw5.com-server/tiddlers/system/tiddlywiki.com.server.png +0 -0
- package/editions/tw5.com-server/tiddlers/system/tiddlywiki.com.server.png.meta +2 -0
- package/editions/zh-Hans/tiddlers/images/favicon.png +0 -0
- package/editions/zh-Hans/tiddlers/images/favicon.png.meta +2 -0
- package/editions/zh-Hans/tiddlers/images/green_favicon.png +0 -0
- package/editions/zh-Hans/tiddlers/images/green_favicon.png.meta +2 -0
- package/editions/zh-Hant/tiddlers/images/favicon.png +0 -0
- package/editions/zh-Hant/tiddlers/images/favicon.png.meta +2 -0
- package/editions/zh-Hant/tiddlers/images/green_favicon.png +0 -0
- package/editions/zh-Hant/tiddlers/images/green_favicon.png.meta +2 -0
- package/languages/de-DE/Exporters.multids +1 -1
- package/languages/de-DE/Help/commands.tid +2 -2
- package/languages/de-DE/Help/server.tid +1 -1
- package/languages/de-DE/Types/image_x-icon.tid +1 -1
- package/languages/es-ES/Buttons.multids +2 -0
- package/languages/es-ES/Fields.multids +4 -0
- package/languages/es-ES/Help/listen.tid +1 -1
- package/languages/es-ES/Help/savewikifolder.tid +16 -1
- package/languages/es-ES/Help/server.tid +1 -1
- package/languages/es-ES/Misc.multids +3 -0
- package/languages/es-ES/SiteTitle.tid +1 -1
- package/languages/pl-PL/Exporters.multids +1 -1
- package/languages/pl-PL/Help/commands.tid +1 -1
- package/languages/pl-PL/Help/savewikifolder.tid +19 -4
- package/languages/pl-PL/Help/server.tid +1 -1
- package/languages/zh-Hans/Exporters.multids +1 -1
- package/languages/zh-Hans/Help/commands.tid +1 -1
- package/languages/zh-Hans/Help/savewikifolder.tid +5 -1
- package/languages/zh-Hans/Help/server.tid +1 -1
- package/languages/zh-Hans/Types/image_svg_xml.tid +1 -1
- package/languages/zh-Hans/Types/image_x-icon.tid +1 -1
- package/languages/zh-Hant/Exporters.multids +1 -1
- package/languages/zh-Hant/Help/commands.tid +1 -1
- package/languages/zh-Hant/Help/savewikifolder.tid +5 -1
- package/languages/zh-Hant/Help/server.tid +1 -1
- package/languages/zh-Hant/Types/image_svg_xml.tid +1 -1
- package/languages/zh-Hant/Types/image_x-icon.tid +1 -1
- package/licenses/cla-individual.md +20 -0
- package/package.json +4 -1
- package/playwright.config.js +46 -0
- package/plugins/tiddlywiki/codemirror/styles.tid +5 -0
- package/plugins/tiddlywiki/comments/styles.tid +8 -8
- package/plugins/tiddlywiki/dynannotate/docs/readme.tid +1 -0
- package/plugins/tiddlywiki/dynannotate/modules/dynannotate.js +28 -27
- package/plugins/tiddlywiki/evernote/modules/enex-deserializer.js +82 -23
- package/plugins/tiddlywiki/evernote/readme.tid +1 -0
- package/plugins/tiddlywiki/evernote/samples/sample-enex-with-image.xml.enex +2 -2
- package/plugins/tiddlywiki/googleanalytics/googleanalytics.js +1 -1
- package/plugins/tiddlywiki/googleanalytics/settings.tid +1 -3
- package/plugins/tiddlywiki/jasmine/jasmine-plugin.js +9 -2
- package/plugins/tiddlywiki/jasmine/run-wiki-based-tests.js +1 -1
- package/plugins/tiddlywiki/jasmine/startup.js +2 -1
- package/plugins/tiddlywiki/qrcode/barcodereader.js +90 -0
- package/plugins/tiddlywiki/qrcode/docs/barcodereader.tid +44 -0
- package/plugins/tiddlywiki/qrcode/{doc/usage.tid → docs/makeqr.tid} +4 -4
- package/plugins/tiddlywiki/qrcode/docs.tid +3 -0
- package/plugins/tiddlywiki/qrcode/{MakeContactQR.tid → examples/make/MakeContactQR.tid} +1 -1
- package/plugins/tiddlywiki/qrcode/{MakeGenericQR.tid → examples/make/MakeGenericQR.tid} +1 -1
- package/plugins/tiddlywiki/qrcode/{MakeWifiQR.tid → examples/make/MakeWifiQR.tid} +1 -1
- package/plugins/tiddlywiki/qrcode/examples/make/make.tid +5 -0
- package/plugins/tiddlywiki/qrcode/examples/read/BarCodeReader.tid +17 -0
- package/plugins/tiddlywiki/qrcode/examples/read/read.tid +5 -0
- package/plugins/tiddlywiki/qrcode/examples.tid +3 -0
- package/plugins/tiddlywiki/qrcode/files/html5-qrcode/LICENSE +201 -0
- package/plugins/tiddlywiki/qrcode/files/html5-qrcode/README.md +398 -0
- package/plugins/tiddlywiki/qrcode/files/html5-qrcode/html5-qrcode.min.js +1 -0
- package/plugins/tiddlywiki/qrcode/files/tiddlywiki.files +20 -4
- package/plugins/tiddlywiki/qrcode/makeqr.js +1 -1
- package/plugins/tiddlywiki/qrcode/plugin.info +1 -1
- package/plugins/tiddlywiki/qrcode/readme.tid +15 -0
- package/plugins/tiddlywiki/tiddlyweb/html-json-skinny-tiddler.tid +0 -1
- package/plugins/tiddlywiki/tiddlyweb/html-json-tiddler.tid +1 -2
- package/plugins/tiddlywiki/upgrade/UpgradeWizard.tid +2 -2
- package/plugins/tiddlywiki/upgrade/favicon.png +0 -0
- package/plugins/tiddlywiki/upgrade/favicon.png.meta +2 -0
- package/readme.md +1 -1
- package/themes/tiddlywiki/vanilla/base.tid +45 -14
- package/themes/tiddlywiki/vanilla/settings.multids +1 -1
- package/editions/de-AT-server/tiddlers/system/favicon.ico +0 -0
- package/editions/dev/tiddlers/images/favicon.ico +0 -0
- package/editions/es-ES/tiddlers/images/favicon.ico +0 -0
- package/editions/es-ES/tiddlers/images/green_favicon.ico +0 -0
- package/editions/es-ES-server/tiddlers/system/favicon.ico +0 -0
- package/editions/fr-FR/tiddlers/images/favicon.ico +0 -0
- package/editions/fr-FR/tiddlers/images/favicon.ico.meta +0 -2
- package/editions/fr-FR/tiddlers/images/green_favicon.ico +0 -0
- package/editions/fr-FR-server/tiddlers/system/favicon.ico +0 -0
- package/editions/fr-FR-server/tiddlers/system/favicon.ico.meta +0 -2
- package/editions/ja-JP/tiddlers/images/favicon.ico +0 -0
- package/editions/ja-JP/tiddlers/images/favicon.ico.meta +0 -2
- package/editions/ja-JP/tiddlers/images/green_favicon.ico +0 -0
- package/editions/ko-KR/tiddlers/images/favicon.ico +0 -0
- package/editions/ko-KR/tiddlers/images/favicon.ico.meta +0 -2
- package/editions/ko-KR/tiddlers/images/green_favicon.ico +0 -0
- package/editions/ko-KR-server/tiddlers/system/favicon.ico +0 -0
- package/editions/ko-KR-server/tiddlers/system/favicon.ico.meta +0 -2
- package/editions/prerelease/tiddlers/system/favicon.ico +0 -0
- package/editions/prerelease/tiddlers/system/favicon.ico.meta +0 -2
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/classic.tiddlywiki.com.ico +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/links.tiddlywiki.org.ico +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/tiddlywiki.com.dev.ico +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/tiddlywiki.com.ico +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/tiddlywiki.com.prerelease.ico +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/tiddlywiki.com.upgrade.ico +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/tiddlywiki.org.ico +0 -0
- package/editions/tw5.com/tiddlers/community/editions/TiddlyMemo by oflg.tid +0 -16
- package/editions/tw5.com/tiddlers/community/tutorials/Install and run TiddlyWiki on a CentOS 6 VPS using Nginx.tid +0 -16
- package/editions/tw5.com/tiddlers/images/New Release Banner.jpg +0 -0
- package/editions/tw5.com/tiddlers/images/favicon.ico +0 -0
- package/editions/tw5.com/tiddlers/images/favicon.ico.meta +0 -2
- package/editions/tw5.com/tiddlers/images/green_favicon.ico +0 -0
- package/editions/tw5.com/tiddlers/images/green_favicon.ico.meta +0 -2
- package/editions/tw5.com-server/tiddlers/system/favicon.ico +0 -0
- package/editions/tw5.com-server/tiddlers/system/favicon.ico.meta +0 -2
- package/editions/zh-Hans/tiddlers/images/favicon.ico +0 -0
- package/editions/zh-Hans/tiddlers/images/favicon.ico.meta +0 -2
- package/editions/zh-Hans/tiddlers/images/green_favicon.ico +0 -0
- package/editions/zh-Hans/tiddlers/images/green_favicon.ico.meta +0 -2
- package/editions/zh-Hant/tiddlers/images/favicon.ico +0 -0
- package/editions/zh-Hant/tiddlers/images/favicon.ico.meta +0 -2
- package/editions/zh-Hant/tiddlers/images/green_favicon.ico +0 -0
- package/editions/zh-Hant/tiddlers/images/green_favicon.ico.meta +0 -2
- package/plugins/tiddlywiki/qrcode/doc/examples.tid +0 -3
- package/plugins/tiddlywiki/qrcode/doc/readme.tid +0 -13
- package/plugins/tiddlywiki/upgrade/favicon.ico +0 -0
- package/plugins/tiddlywiki/upgrade/favicon.ico.meta +0 -2
- /package/editions/tw5.com/tiddlers/_tw_shared/favicons/{tiddlywiki.org.ico.meta → tiddlywiki.org.png.meta} +0 -0
- /package/plugins/tiddlywiki/qrcode/files/{LICENSE → qrcode/LICENSE} +0 -0
- /package/plugins/tiddlywiki/qrcode/files/{README.md → qrcode/README.md} +0 -0
- /package/plugins/tiddlywiki/qrcode/files/{qrcode.js → qrcode/qrcode.js} +0 -0
package/.github/workflows/ci.yml
CHANGED
@@ -5,7 +5,7 @@ on:
|
|
5
5
|
- master
|
6
6
|
- tiddlywiki-com
|
7
7
|
env:
|
8
|
-
NODE_VERSION: "
|
8
|
+
NODE_VERSION: "18"
|
9
9
|
jobs:
|
10
10
|
test:
|
11
11
|
runs-on: ubuntu-latest
|
@@ -14,7 +14,13 @@ jobs:
|
|
14
14
|
- uses: actions/setup-node@v1
|
15
15
|
with:
|
16
16
|
node-version: "${{ env.NODE_VERSION }}"
|
17
|
-
- run: "./bin/test.sh"
|
17
|
+
- run: "./bin/ci-test.sh"
|
18
|
+
- uses: actions/upload-artifact@v3
|
19
|
+
if: always()
|
20
|
+
with:
|
21
|
+
name: playwright-report
|
22
|
+
path: playwright-report/
|
23
|
+
retention-days: 30
|
18
24
|
build-prerelease:
|
19
25
|
runs-on: ubuntu-latest
|
20
26
|
if: github.ref == 'refs/heads/master'
|
@@ -54,6 +60,7 @@ jobs:
|
|
54
60
|
TW5_BUILD_TIDDLYWIKI: "./node_modules/tiddlywiki/tiddlywiki.js"
|
55
61
|
TW5_BUILD_MAIN_EDITION: "./editions/tw5.com"
|
56
62
|
TW5_BUILD_OUTPUT: "./output"
|
63
|
+
TW5_BUILD_ARCHIVE: "./output"
|
57
64
|
steps:
|
58
65
|
- uses: actions/checkout@v2
|
59
66
|
- uses: actions/setup-node@v1
|
package/bin/build-site.sh
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# Default to the current version number for building the plugin library
|
6
6
|
|
7
7
|
if [ -z "$TW5_BUILD_VERSION" ]; then
|
8
|
-
TW5_BUILD_VERSION=v5.3.
|
8
|
+
TW5_BUILD_VERSION=v5.3.2
|
9
9
|
fi
|
10
10
|
|
11
11
|
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
@@ -84,10 +84,27 @@ echo -e -n "title: $:/build\ncommit: $TW5_BUILD_COMMIT\n\n$TW5_BUILD_DETAILS\n"
|
|
84
84
|
|
85
85
|
######################################################
|
86
86
|
#
|
87
|
-
# Core
|
87
|
+
# Core distributions
|
88
88
|
#
|
89
89
|
######################################################
|
90
90
|
|
91
|
+
# Conditionally build archive if $TW5_BUILD_ARCHIVE variable is set, otherwise do nothing
|
92
|
+
#
|
93
|
+
# /archive/Empty-TiddlyWiki-<version>.html Empty archived version
|
94
|
+
# /archive/TiddlyWiki-<version>.html Full archived version
|
95
|
+
|
96
|
+
if [ -n "$TW5_BUILD_ARCHIVE" ]; then
|
97
|
+
|
98
|
+
node $TW5_BUILD_TIDDLYWIKI \
|
99
|
+
$TW5_BUILD_MAIN_EDITION \
|
100
|
+
--verbose \
|
101
|
+
--version \
|
102
|
+
--load $TW5_BUILD_OUTPUT/build.tid \
|
103
|
+
--output $TW5_BUILD_ARCHIVE \
|
104
|
+
--build archive \
|
105
|
+
|| exit 1
|
106
|
+
fi
|
107
|
+
|
91
108
|
# /index.html Main site
|
92
109
|
# /favicon.ico Favicon for main site
|
93
110
|
# /static.html Static rendering of default tiddlers
|
@@ -95,6 +112,7 @@ echo -e -n "title: $:/build\ncommit: $TW5_BUILD_COMMIT\n\n$TW5_BUILD_DETAILS\n"
|
|
95
112
|
# /static/* Static single tiddlers
|
96
113
|
# /static/static.css Static stylesheet
|
97
114
|
# /static/favicon.ico Favicon for static pages
|
115
|
+
|
98
116
|
node $TW5_BUILD_TIDDLYWIKI \
|
99
117
|
$TW5_BUILD_MAIN_EDITION \
|
100
118
|
--verbose \
|
@@ -104,13 +122,15 @@ node $TW5_BUILD_TIDDLYWIKI \
|
|
104
122
|
--build favicon static index \
|
105
123
|
|| exit 1
|
106
124
|
|
107
|
-
# /empty.html
|
108
|
-
# /empty.hta
|
125
|
+
# /empty.html Empty
|
126
|
+
# /empty.hta For Internet Explorer
|
127
|
+
# /empty-external-core.html External core empty
|
128
|
+
# /tiddlywikicore-<version>.js Core plugin javascript
|
109
129
|
node $TW5_BUILD_TIDDLYWIKI \
|
110
130
|
./editions/empty \
|
111
131
|
--verbose \
|
112
132
|
--output $TW5_BUILD_OUTPUT \
|
113
|
-
--build empty \
|
133
|
+
--build empty emptyexternalcore \
|
114
134
|
|| exit 1
|
115
135
|
|
116
136
|
|
package/bin/ci-test.sh
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# test TiddlyWiki5 for tiddlywiki.com
|
4
|
+
|
5
|
+
node ./tiddlywiki.js \
|
6
|
+
./editions/test \
|
7
|
+
--verbose \
|
8
|
+
--version \
|
9
|
+
--rendertiddler $:/core/save/all test.html text/plain \
|
10
|
+
--test \
|
11
|
+
|| exit 1
|
12
|
+
|
13
|
+
npm install playwright @playwright/test
|
14
|
+
npx playwright install chromium firefox --with-deps
|
15
|
+
|
16
|
+
npx playwright test
|
package/boot/boot.js
CHANGED
@@ -575,9 +575,8 @@ var globalCheck =[
|
|
575
575
|
" configurable: true",
|
576
576
|
" });",
|
577
577
|
" if(Object.keys(__temp__).length){",
|
578
|
-
" console.log(Object.keys(__temp__));",
|
578
|
+
" console.log(\"Warning: Global assignment detected\",Object.keys(__temp__));",
|
579
579
|
" delete Object.prototype.__temp__;",
|
580
|
-
" throw \"Global assignment is not allowed within modules on node.\";",
|
581
580
|
" }",
|
582
581
|
" delete Object.prototype.__temp__;",
|
583
582
|
].join('\n');
|
@@ -596,11 +595,11 @@ $tw.utils.evalGlobal = function(code,context,filename,sandbox,allowGlobals) {
|
|
596
595
|
// Add the code prologue and epilogue
|
597
596
|
code = [
|
598
597
|
"(function(" + contextNames.join(",") + ") {",
|
599
|
-
" (function(){
|
598
|
+
" (function(){" + code + "\n;})();\n",
|
600
599
|
(!$tw.browser && sandbox && !allowGlobals) ? globalCheck : "",
|
601
|
-
"
|
600
|
+
"\nreturn exports;\n",
|
602
601
|
"})"
|
603
|
-
].join("
|
602
|
+
].join("");
|
604
603
|
|
605
604
|
// Compile the code into a function
|
606
605
|
var fn;
|
@@ -926,7 +925,7 @@ $tw.modules.execute = function(moduleName,moduleRoot) {
|
|
926
925
|
}
|
927
926
|
} else {
|
928
927
|
// line number should be included in e.stack for runtime errors
|
929
|
-
$tw.utils.error("Error executing boot module " + name + ": " +
|
928
|
+
$tw.utils.error("Error executing boot module " + name + ": " + String(e) + "\n\n" + e.stack);
|
930
929
|
}
|
931
930
|
}
|
932
931
|
}
|
@@ -1150,7 +1149,7 @@ $tw.Wiki = function(options) {
|
|
1150
1149
|
shadowTiddlerTitles = null,
|
1151
1150
|
getShadowTiddlerTitles = function() {
|
1152
1151
|
if(!shadowTiddlerTitles) {
|
1153
|
-
shadowTiddlerTitles = Object.keys(shadowTiddlers);
|
1152
|
+
shadowTiddlerTitles = Object.keys(shadowTiddlers).sort(function(a,b) {return a.localeCompare(b);});
|
1154
1153
|
}
|
1155
1154
|
return shadowTiddlerTitles;
|
1156
1155
|
},
|
@@ -2675,6 +2674,18 @@ $tw.hooks.addHook = function(hookName,definition) {
|
|
2675
2674
|
}
|
2676
2675
|
};
|
2677
2676
|
|
2677
|
+
/*
|
2678
|
+
Delete hooks from the hashmap
|
2679
|
+
*/
|
2680
|
+
$tw.hooks.removeHook = function(hookName,definition) {
|
2681
|
+
if($tw.utils.hop($tw.hooks.names,hookName)) {
|
2682
|
+
var p = $tw.hooks.names[hookName].indexOf(definition);
|
2683
|
+
if(p !== -1) {
|
2684
|
+
$tw.hooks.names[hookName].splice(p, 1);
|
2685
|
+
}
|
2686
|
+
}
|
2687
|
+
};
|
2688
|
+
|
2678
2689
|
/*
|
2679
2690
|
Invoke the hook by key
|
2680
2691
|
*/
|
@@ -1,6 +1,4 @@
|
|
1
1
|
title: $:/core/images/new-journal-button
|
2
2
|
tags: $:/tags/Image
|
3
3
|
|
4
|
-
<$parameters size="22pt" day=<<now "DD"
|
5
|
-
<svg width=<<size>> height=<<size>> class="tc-image-new-journal-button tc-image-button" viewBox="0 0 128 128"><g fill-rule="evenodd"><path d="M102.545 112.818v11.818c0 1.306 1.086 2.364 2.425 2.364h6.06c1.34 0 2.425-1.058 2.425-2.364v-11.818h12.12c1.34 0 2.425-1.058 2.425-2.363v-5.91c0-1.305-1.085-2.363-2.424-2.363h-12.121V90.364c0-1.306-1.086-2.364-2.425-2.364h-6.06c-1.34 0-2.425 1.058-2.425 2.364v11.818h-12.12c-1.34 0-2.425 1.058-2.425 2.363v5.91c0 1.305 1.085 2.363 2.424 2.363h12.121zM60.016 4.965c-4.781-2.76-10.897-1.118-13.656 3.66L5.553 79.305A9.993 9.993 0 009.21 92.963l51.04 29.468c4.78 2.76 10.897 1.118 13.655-3.66l40.808-70.681a9.993 9.993 0 00-3.658-13.656L60.016 4.965zm-3.567 27.963a6 6 0 106-10.393 6 6 0 00-6 10.393zm31.697 17.928a6 6 0 106-10.392 6 6 0 00-6 10.392z"/><text class="tc-fill-background" font-family="Helvetica" font-size="47.172" font-weight="bold" transform="rotate(30 25.742 95.82)"><tspan x="42" y="77.485" text-anchor="middle"><$text text=<<day>>/></tspan></text></g></svg>
|
6
|
-
</$parameters>
|
4
|
+
<$parameters size="22pt" day=<<now "DD">>><svg width=<<size>> height=<<size>> class="tc-image-new-journal-button tc-image-button" viewBox="0 0 128 128"><g fill-rule="evenodd"><path d="M102.545 112.818v11.818c0 1.306 1.086 2.364 2.425 2.364h6.06c1.34 0 2.425-1.058 2.425-2.364v-11.818h12.12c1.34 0 2.425-1.058 2.425-2.363v-5.91c0-1.305-1.085-2.363-2.424-2.363h-12.121V90.364c0-1.306-1.086-2.364-2.425-2.364h-6.06c-1.34 0-2.425 1.058-2.425 2.364v11.818h-12.12c-1.34 0-2.425 1.058-2.425 2.363v5.91c0 1.305 1.085 2.363 2.424 2.363h12.121zM60.016 4.965c-4.781-2.76-10.897-1.118-13.656 3.66L5.553 79.305A9.993 9.993 0 009.21 92.963l51.04 29.468c4.78 2.76 10.897 1.118 13.655-3.66l40.808-70.681a9.993 9.993 0 00-3.658-13.656L60.016 4.965zm-3.567 27.963a6 6 0 106-10.393 6 6 0 00-6 10.393zm31.697 17.928a6 6 0 106-10.392 6 6 0 00-6 10.392z"/><text class="tc-fill-background" font-family="Helvetica" font-size="47.172" font-weight="bold" transform="rotate(30 25.742 95.82)"><tspan x="42" y="77.485" text-anchor="middle"><$text text=<<day>>/></tspan></text></g></svg></$parameters>
|
@@ -19,7 +19,7 @@ The following options are supported:
|
|
19
19
|
** ''yes'' will "explode" plugins into separate tiddler files and save them to the plugin directory within the wiki folder
|
20
20
|
** ''no'' will suppress exploding plugins into their constituent tiddler files. It will save the plugin as a single JSON tiddler in the tiddlers folder
|
21
21
|
|
22
|
-
Note that both ''explodePlugins'' options will produce wiki folders that build the
|
22
|
+
Note that both ''explodePlugins'' options will produce wiki folders that build the exact same original wiki. The difference lies in how plugins are represented in the wiki folder.
|
23
23
|
|
24
24
|
A common usage is to convert a TiddlyWiki HTML file into a wiki folder:
|
25
25
|
|
@@ -31,4 +31,4 @@ Save the plugin to the tiddlers directory of the target wiki folder:
|
|
31
31
|
|
32
32
|
```
|
33
33
|
tiddlywiki --load ./mywiki.html --savewikifolder ./mywikifolder explodePlugins=no
|
34
|
-
```
|
34
|
+
```
|
@@ -1,5 +1,5 @@
|
|
1
1
|
title: $:/language/Help/server
|
2
|
-
description: Provides an HTTP server interface to TiddlyWiki
|
2
|
+
description: (deprecated: see 'listen' command) Provides an HTTP server interface to TiddlyWiki
|
3
3
|
|
4
4
|
Legacy command to serve a wiki over HTTP.
|
5
5
|
|
@@ -46,7 +46,7 @@ Command.prototype.execute = function() {
|
|
46
46
|
type = tiddler.fields.type || "text/vnd.tiddlywiki",
|
47
47
|
contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"},
|
48
48
|
filename = path.resolve(pathname,$tw.utils.encodeURIComponentExtended(title));
|
49
|
-
fs.writeFileSync(filename,tiddler.fields.text,contentTypeInfo.encoding);
|
49
|
+
fs.writeFileSync(filename,tiddler.fields.text || "",contentTypeInfo.encoding);
|
50
50
|
});
|
51
51
|
return null;
|
52
52
|
};
|
@@ -60,7 +60,7 @@ function FramedEngine(options) {
|
|
60
60
|
this.domNode.value = this.value;
|
61
61
|
}
|
62
62
|
// Set the attributes
|
63
|
-
if(this.widget.editType) {
|
63
|
+
if(this.widget.editType && this.widget.editTag !== "textarea") {
|
64
64
|
this.domNode.setAttribute("type",this.widget.editType);
|
65
65
|
}
|
66
66
|
if(this.widget.editPlaceholder) {
|
@@ -34,7 +34,7 @@ function SimpleEngine(options) {
|
|
34
34
|
this.domNode.value = this.value;
|
35
35
|
}
|
36
36
|
// Set the attributes
|
37
|
-
if(this.widget.editType) {
|
37
|
+
if(this.widget.editType && this.widget.editTag !== "textarea") {
|
38
38
|
this.domNode.setAttribute("type",this.widget.editType);
|
39
39
|
}
|
40
40
|
if(this.widget.editPlaceholder) {
|
@@ -28,12 +28,8 @@ function getAllFilterOperators() {
|
|
28
28
|
Export our filter function
|
29
29
|
*/
|
30
30
|
exports.all = function(source,operator,options) {
|
31
|
-
// Get our suboperators
|
32
|
-
var allFilterOperators = getAllFilterOperators();
|
33
|
-
// Cycle through the suboperators accumulating their results
|
34
|
-
var results = new $tw.utils.LinkedList(),
|
35
|
-
subops = operator.operand.split("+");
|
36
31
|
// Check for common optimisations
|
32
|
+
var subops = operator.operand.split("+");
|
37
33
|
if(subops.length === 1 && subops[0] === "") {
|
38
34
|
return source;
|
39
35
|
} else if(subops.length === 1 && subops[0] === "tiddlers") {
|
@@ -46,6 +42,10 @@ exports.all = function(source,operator,options) {
|
|
46
42
|
return options.wiki.eachShadowPlusTiddlers;
|
47
43
|
}
|
48
44
|
// Do it the hard way
|
45
|
+
// Get our suboperators
|
46
|
+
var allFilterOperators = getAllFilterOperators();
|
47
|
+
// Cycle through the suboperators accumulating their results
|
48
|
+
var results = new $tw.utils.LinkedList();
|
49
49
|
for(var t=0; t<subops.length; t++) {
|
50
50
|
var subop = allFilterOperators[subops[t]];
|
51
51
|
if(subop) {
|
@@ -18,16 +18,20 @@ Export our filter functions
|
|
18
18
|
|
19
19
|
exports.decodebase64 = function(source,operator,options) {
|
20
20
|
var results = [];
|
21
|
+
var binary = operator.suffixes && operator.suffixes.indexOf("binary") !== -1;
|
22
|
+
var urlsafe = operator.suffixes && operator.suffixes.indexOf("urlsafe") !== -1;
|
21
23
|
source(function(tiddler,title) {
|
22
|
-
results.push($tw.utils.base64Decode(title));
|
24
|
+
results.push($tw.utils.base64Decode(title,binary,urlsafe));
|
23
25
|
});
|
24
26
|
return results;
|
25
27
|
};
|
26
28
|
|
27
29
|
exports.encodebase64 = function(source,operator,options) {
|
28
30
|
var results = [];
|
31
|
+
var binary = operator.suffixes && operator.suffixes.indexOf("binary") !== -1;
|
32
|
+
var urlsafe = operator.suffixes && operator.suffixes.indexOf("urlsafe") !== -1;
|
29
33
|
source(function(tiddler,title) {
|
30
|
-
results.push($tw.utils.base64Encode(title));
|
34
|
+
results.push($tw.utils.base64Encode(title,binary,urlsafe));
|
31
35
|
});
|
32
36
|
return results;
|
33
37
|
};
|
@@ -68,6 +68,54 @@ exports["jsontype"] = function(source,operator,options) {
|
|
68
68
|
return results;
|
69
69
|
};
|
70
70
|
|
71
|
+
exports["jsonset"] = function(source,operator,options) {
|
72
|
+
var suffixes = operator.suffixes || [],
|
73
|
+
type = suffixes[0] && suffixes[0][0],
|
74
|
+
indexes = operator.operands.slice(0,-1),
|
75
|
+
value = operator.operands[operator.operands.length - 1],
|
76
|
+
results = [];
|
77
|
+
if(operator.operands.length === 1 && operator.operands[0] === "") {
|
78
|
+
value = undefined; // Prevents the value from being assigned
|
79
|
+
}
|
80
|
+
switch(type) {
|
81
|
+
case "string":
|
82
|
+
// Use value unchanged
|
83
|
+
break;
|
84
|
+
case "boolean":
|
85
|
+
value = (value === "true" ? true : (value === "false" ? false : undefined));
|
86
|
+
break;
|
87
|
+
case "number":
|
88
|
+
value = $tw.utils.parseNumber(value);
|
89
|
+
break;
|
90
|
+
case "array":
|
91
|
+
indexes = operator.operands;
|
92
|
+
value = [];
|
93
|
+
break;
|
94
|
+
case "object":
|
95
|
+
indexes = operator.operands;
|
96
|
+
value = {};
|
97
|
+
break;
|
98
|
+
case "null":
|
99
|
+
indexes = operator.operands;
|
100
|
+
value = null;
|
101
|
+
break;
|
102
|
+
case "json":
|
103
|
+
value = $tw.utils.parseJSONSafe(value,function() {return undefined;});
|
104
|
+
break;
|
105
|
+
default:
|
106
|
+
// Use value unchanged
|
107
|
+
break;
|
108
|
+
}
|
109
|
+
source(function(tiddler,title) {
|
110
|
+
var data = $tw.utils.parseJSONSafe(title,title);
|
111
|
+
if(data) {
|
112
|
+
data = setDataItem(data,indexes,value);
|
113
|
+
results.push(JSON.stringify(data));
|
114
|
+
}
|
115
|
+
});
|
116
|
+
return results;
|
117
|
+
};
|
118
|
+
|
71
119
|
/*
|
72
120
|
Given a JSON data structure and an array of index strings, return an array of the string representation of the values at the end of the index chain, or "undefined" if any of the index strings are invalid
|
73
121
|
*/
|
@@ -165,6 +213,18 @@ function getDataItemType(data,indexes) {
|
|
165
213
|
}
|
166
214
|
}
|
167
215
|
|
216
|
+
function getItemAtIndex(item,index) {
|
217
|
+
if($tw.utils.hop(item,index)) {
|
218
|
+
return item[index];
|
219
|
+
} else if($tw.utils.isArray(item)) {
|
220
|
+
index = $tw.utils.parseInt(index);
|
221
|
+
if(index < 0) { index = index + item.length };
|
222
|
+
return item[index]; // Will be undefined if index was out-of-bounds
|
223
|
+
} else {
|
224
|
+
return undefined;
|
225
|
+
}
|
226
|
+
}
|
227
|
+
|
168
228
|
/*
|
169
229
|
Given a JSON data structure and an array of index strings, return the value at the end of the index chain, or "undefined" if any of the index strings are invalid
|
170
230
|
*/
|
@@ -177,7 +237,7 @@ function getDataItem(data,indexes) {
|
|
177
237
|
for(var i=0; i<indexes.length; i++) {
|
178
238
|
if(item !== undefined) {
|
179
239
|
if(item !== null && ["number","string","boolean"].indexOf(typeof item) === -1) {
|
180
|
-
item = item
|
240
|
+
item = getItemAtIndex(item,indexes[i]);
|
181
241
|
} else {
|
182
242
|
item = undefined;
|
183
243
|
}
|
@@ -186,5 +246,39 @@ function getDataItem(data,indexes) {
|
|
186
246
|
return item;
|
187
247
|
}
|
188
248
|
|
249
|
+
/*
|
250
|
+
Given a JSON data structure, an array of index strings and a value, return the data structure with the value added at the end of the index chain. If any of the index strings are invalid then the JSON data structure is returned unmodified. If the root item is targetted then a different data object will be returned
|
251
|
+
*/
|
252
|
+
function setDataItem(data,indexes,value) {
|
253
|
+
// Ignore attempts to assign undefined
|
254
|
+
if(value === undefined) {
|
255
|
+
return data;
|
256
|
+
}
|
257
|
+
// Check for the root item
|
258
|
+
if(indexes.length === 0 || (indexes.length === 1 && indexes[0] === "")) {
|
259
|
+
return value;
|
260
|
+
}
|
261
|
+
// Traverse the JSON data structure using the index chain
|
262
|
+
var current = data;
|
263
|
+
for(var i = 0; i < indexes.length - 1; i++) {
|
264
|
+
current = getItemAtIndex(current,indexes[i]);
|
265
|
+
if(current === undefined) {
|
266
|
+
// Return the original JSON data structure if any of the index strings are invalid
|
267
|
+
return data;
|
268
|
+
}
|
269
|
+
}
|
270
|
+
// Add the value to the end of the index chain
|
271
|
+
var lastIndex = indexes[indexes.length - 1];
|
272
|
+
if($tw.utils.isArray(current)) {
|
273
|
+
lastIndex = $tw.utils.parseInt(lastIndex);
|
274
|
+
if(lastIndex < 0) { lastIndex = lastIndex + current.length };
|
275
|
+
}
|
276
|
+
// Only set indexes on objects and arrays
|
277
|
+
if(typeof current === "object") {
|
278
|
+
current[lastIndex] = value;
|
279
|
+
}
|
280
|
+
return data;
|
281
|
+
}
|
282
|
+
|
189
283
|
})();
|
190
284
|
|
@@ -14,10 +14,12 @@ The plain text parser processes blocks of source text into a degenerate parse tr
|
|
14
14
|
|
15
15
|
var TextParser = function(type,text,options) {
|
16
16
|
this.tree = [{
|
17
|
-
type: "
|
17
|
+
type: "genesis",
|
18
18
|
attributes: {
|
19
|
-
|
20
|
-
|
19
|
+
$type: {name: "$type", type: "string", value: "$codeblock"},
|
20
|
+
code: {name: "code", type: "string", value: text},
|
21
|
+
language: {name: "language", type: "string", value: type},
|
22
|
+
$remappable: {name: "$remappable", type:"string", value: "no"}
|
21
23
|
}
|
22
24
|
}];
|
23
25
|
this.source = text;
|
@@ -32,4 +34,3 @@ exports["text/css"] = TextParser;
|
|
32
34
|
exports["application/x-tiddler-dictionary"] = TextParser;
|
33
35
|
|
34
36
|
})();
|
35
|
-
|
@@ -0,0 +1,120 @@
|
|
1
|
+
/*\
|
2
|
+
title: $:/core/modules/parsers/wikiparser/rules/conditional.js
|
3
|
+
type: application/javascript
|
4
|
+
module-type: wikirule
|
5
|
+
|
6
|
+
Conditional shortcut syntax
|
7
|
+
|
8
|
+
```
|
9
|
+
This is a <% if [{something}] %>Elephant<% elseif [{else}] %>Pelican<% else %>Crocodile<% endif %>
|
10
|
+
```
|
11
|
+
|
12
|
+
\*/
|
13
|
+
(function(){
|
14
|
+
|
15
|
+
/*jslint node: true, browser: true */
|
16
|
+
/*global $tw: false */
|
17
|
+
"use strict";
|
18
|
+
|
19
|
+
exports.name = "conditional";
|
20
|
+
exports.types = {inline: true, block: true};
|
21
|
+
|
22
|
+
exports.init = function(parser) {
|
23
|
+
this.parser = parser;
|
24
|
+
// Regexp to match
|
25
|
+
this.matchRegExp = /\<\%\s*if\s+/mg;
|
26
|
+
this.terminateIfRegExp = /\%\>/mg;
|
27
|
+
};
|
28
|
+
|
29
|
+
exports.findNextMatch = function(startPos) {
|
30
|
+
// Look for the next <% if shortcut
|
31
|
+
this.matchRegExp.lastIndex = startPos;
|
32
|
+
this.match = this.matchRegExp.exec(this.parser.source);
|
33
|
+
// If not found then return no match
|
34
|
+
if(!this.match) {
|
35
|
+
return undefined;
|
36
|
+
}
|
37
|
+
// Check for the next %>
|
38
|
+
this.terminateIfRegExp.lastIndex = this.match.index;
|
39
|
+
this.terminateIfMatch = this.terminateIfRegExp.exec(this.parser.source);
|
40
|
+
// If not found then return no match
|
41
|
+
if(!this.terminateIfMatch) {
|
42
|
+
return undefined;
|
43
|
+
}
|
44
|
+
// Return the position at which the construction was found
|
45
|
+
return this.match.index;
|
46
|
+
};
|
47
|
+
|
48
|
+
/*
|
49
|
+
Parse the most recent match
|
50
|
+
*/
|
51
|
+
exports.parse = function() {
|
52
|
+
// Get the filter condition
|
53
|
+
var filterCondition = this.parser.source.substring(this.match.index + this.match[0].length,this.terminateIfMatch.index);
|
54
|
+
// Advance the parser position to past the %>
|
55
|
+
this.parser.pos = this.terminateIfMatch.index + this.terminateIfMatch[0].length;
|
56
|
+
// Parse the if clause
|
57
|
+
return this.parseIfClause(filterCondition);
|
58
|
+
};
|
59
|
+
|
60
|
+
exports.parseIfClause = function(filterCondition) {
|
61
|
+
// Create the list widget
|
62
|
+
var listWidget = {
|
63
|
+
type: "list",
|
64
|
+
tag: "$list",
|
65
|
+
isBlock: this.is.block,
|
66
|
+
children: [
|
67
|
+
{
|
68
|
+
type: "list-template",
|
69
|
+
tag: "$list-template"
|
70
|
+
},
|
71
|
+
{
|
72
|
+
type: "list-empty",
|
73
|
+
tag: "$list-empty"
|
74
|
+
}
|
75
|
+
]
|
76
|
+
};
|
77
|
+
$tw.utils.addAttributeToParseTreeNode(listWidget,"filter",filterCondition);
|
78
|
+
$tw.utils.addAttributeToParseTreeNode(listWidget,"variable","condition");
|
79
|
+
$tw.utils.addAttributeToParseTreeNode(listWidget,"limit","1");
|
80
|
+
// Check for an immediately following double linebreak
|
81
|
+
var hasLineBreak = !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g);
|
82
|
+
// Parse the body looking for else or endif
|
83
|
+
var reEndString = "\\<\\%\\s*(endif)\\s*\\%\\>|\\<\\%\\s*(else)\\s*\\%\\>|\\<\\%\\s*(elseif)\\s+([\\s\\S]+?)\\%\\>",
|
84
|
+
ex;
|
85
|
+
if(hasLineBreak) {
|
86
|
+
ex = this.parser.parseBlocksTerminatedExtended(reEndString);
|
87
|
+
} else {
|
88
|
+
var reEnd = new RegExp(reEndString,"mg");
|
89
|
+
ex = this.parser.parseInlineRunTerminatedExtended(reEnd,{eatTerminator: true});
|
90
|
+
}
|
91
|
+
// Put the body into the list template
|
92
|
+
listWidget.children[0].children = ex.tree;
|
93
|
+
// Check for an else or elseif
|
94
|
+
if(ex.match) {
|
95
|
+
if(ex.match[1] === "endif") {
|
96
|
+
// Nothing to do if we just found an endif
|
97
|
+
} else if(ex.match[2] === "else") {
|
98
|
+
// Check for an immediately following double linebreak
|
99
|
+
hasLineBreak = !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g);
|
100
|
+
// If we found an else then we need to parse the body looking for the endif
|
101
|
+
var reEndString = "\\<\\%\\s*(endif)\\s*\\%\\>",
|
102
|
+
ex;
|
103
|
+
if(hasLineBreak) {
|
104
|
+
ex = this.parser.parseBlocksTerminatedExtended(reEndString);
|
105
|
+
} else {
|
106
|
+
var reEnd = new RegExp(reEndString,"mg");
|
107
|
+
ex = this.parser.parseInlineRunTerminatedExtended(reEnd,{eatTerminator: true});
|
108
|
+
}
|
109
|
+
// Put the parsed content inside the list empty template
|
110
|
+
listWidget.children[1].children = ex.tree;
|
111
|
+
} else if(ex.match[3] === "elseif") {
|
112
|
+
// Parse the elseif clause by reusing this parser, passing the new filter condition
|
113
|
+
listWidget.children[1].children = this.parseIfClause(ex.match[4]);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
// Return the parse tree node
|
117
|
+
return [listWidget];
|
118
|
+
};
|
119
|
+
|
120
|
+
})();
|
@@ -35,7 +35,7 @@ Instantiate parse rule
|
|
35
35
|
exports.init = function(parser) {
|
36
36
|
this.parser = parser;
|
37
37
|
// Regexp to match
|
38
|
-
this.matchRegExp =
|
38
|
+
this.matchRegExp = /\\(function|procedure|widget)\s+([^(\s]+)\((\s*([^)]*))?\)(\s*\r?\n)?/mg;
|
39
39
|
};
|
40
40
|
|
41
41
|
/*
|
@@ -53,7 +53,7 @@ exports.parse = function() {
|
|
53
53
|
var reEnd;
|
54
54
|
if(this.match[5]) {
|
55
55
|
// If so, the end of the body is marked with \end
|
56
|
-
reEnd = new RegExp("(\\r?\\n
|
56
|
+
reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
57
57
|
} else {
|
58
58
|
// Otherwise, the end of the definition is marked by the end of the line
|
59
59
|
reEnd = /($|\r?\n)/mg;
|