tiddlywiki 5.4.0 → 5.4.1
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/bin/build-site.sh +1 -1
- package/bin/build-tw-org.sh +0 -0
- package/bin/ci-pre-build.sh +0 -0
- package/bin/ci-push.sh +0 -0
- package/bin/ci-test.sh +0 -0
- package/bin/clean.sh +0 -0
- package/bin/get-plugin-library-version-number +0 -0
- package/bin/ginsu.sh +0 -0
- package/bin/lazy.sh +0 -0
- package/bin/npm-publish.sh +0 -0
- package/bin/optimise-svgs.js +0 -0
- package/bin/quick-bld.sh +0 -0
- package/bin/readme-bld.sh +0 -0
- package/bin/serve.sh +0 -0
- package/bin/tankbld.sh +0 -0
- package/bin/test.sh +0 -0
- package/bin/update-translation-from-html-file.sh +0 -0
- package/bin/verbump.sh +0 -0
- package/community/people/BurningTreeC.tid +9 -0
- package/community/project/teams/TiddlyDesktop Team.tid +8 -0
- package/core/images/advanced-search-button.tid +0 -0
- package/core/images/auto-height.tid +0 -0
- package/core/images/blank.tid +0 -0
- package/core/images/bold.tid +0 -0
- package/core/images/cancel-button.tid +0 -0
- package/core/images/chevron-down.tid +0 -0
- package/core/images/chevron-left.tid +0 -0
- package/core/images/chevron-right.tid +0 -0
- package/core/images/chevron-up.tid +0 -0
- package/core/images/clone-button.tid +0 -0
- package/core/images/close-all-button.tid +0 -0
- package/core/images/close-button.tid +0 -0
- package/core/images/close-others-button.tid +0 -0
- package/core/images/delete-button.tid +0 -0
- package/core/images/done-button.tid +0 -0
- package/core/images/down-arrow.tid +0 -0
- package/core/images/download-button.tid +0 -0
- package/core/images/edit-button.tid +0 -0
- package/core/images/erase.tid +0 -0
- package/core/images/excise.tid +0 -0
- package/core/images/export-button.tid +0 -0
- package/core/images/file.tid +0 -0
- package/core/images/fixed-height.tid +0 -0
- package/core/images/fold-all-button.tid +0 -0
- package/core/images/fold-button.tid +0 -0
- package/core/images/fold-others-button.tid +0 -0
- package/core/images/folder.tid +0 -0
- package/core/images/full-screen-button.tid +0 -0
- package/core/images/github.tid +0 -0
- package/core/images/globe.tid +0 -0
- package/core/images/heading-1.tid +0 -0
- package/core/images/heading-2.tid +0 -0
- package/core/images/heading-3.tid +0 -0
- package/core/images/heading-4.tid +0 -0
- package/core/images/heading-5.tid +0 -0
- package/core/images/heading-6.tid +0 -0
- package/core/images/help.tid +0 -0
- package/core/images/home-button.tid +0 -0
- package/core/images/import-button.tid +0 -0
- package/core/images/info-button.tid +0 -0
- package/core/images/italic.tid +0 -0
- package/core/images/layout-button.tid +0 -0
- package/core/images/left-arrow.tid +0 -0
- package/core/images/line-width.tid +0 -0
- package/core/images/list-bullet.tid +0 -0
- package/core/images/list-number.tid +0 -0
- package/core/images/locked-padlock.tid +0 -0
- package/core/images/mail.tid +0 -0
- package/core/images/menu-button.tid +0 -0
- package/core/images/mono-block.tid +0 -0
- package/core/images/mono-line.tid +0 -0
- package/core/images/new-button.tid +0 -0
- package/core/images/new-here-button.tid +0 -0
- package/core/images/new-image-button.tid +0 -0
- package/core/images/new-journal-button.tid +0 -0
- package/core/images/opacity.tid +0 -0
- package/core/images/open-window.tid +0 -0
- package/core/images/options-button.tid +0 -0
- package/core/images/paint.tid +0 -0
- package/core/images/palette.tid +0 -0
- package/core/images/permalink-button.tid +0 -0
- package/core/images/permaview-button.tid +0 -0
- package/core/images/picture.tid +0 -0
- package/core/images/plugin-generic-language.tid +0 -0
- package/core/images/plugin-generic-plugin.tid +0 -0
- package/core/images/plugin-generic-theme.tid +0 -0
- package/core/images/preview-closed.tid +0 -0
- package/core/images/preview-open.tid +0 -0
- package/core/images/quote.tid +0 -0
- package/core/images/refresh-button.tid +0 -0
- package/core/images/right-arrow.tid +0 -0
- package/core/images/save-button.tid +0 -0
- package/core/images/size.tid +0 -0
- package/core/images/spiral.tid +0 -0
- package/core/images/stamp.tid +0 -0
- package/core/images/star-filled.tid +0 -0
- package/core/images/storyview-classic.tid +0 -0
- package/core/images/storyview-pop.tid +0 -0
- package/core/images/storyview-zoomin.tid +0 -0
- package/core/images/strikethrough.tid +0 -0
- package/core/images/subscript.tid +0 -0
- package/core/images/superscript.tid +0 -0
- package/core/images/tag-button.tid +0 -0
- package/core/images/theme-button.tid +0 -0
- package/core/images/tip.tid +0 -0
- package/core/images/twitter.tid +0 -0
- package/core/images/underline.tid +0 -0
- package/core/images/unfold-all-button.tid +0 -0
- package/core/images/unfold-button.tid +0 -0
- package/core/images/unlocked-padlock.tid +0 -0
- package/core/images/up-arrow.tid +0 -0
- package/core/images/video.tid +0 -0
- package/core/images/warning.tid +0 -0
- package/core/modules/editor/engines/framed.js +2 -3
- package/core/modules/editor/engines/simple.js +2 -3
- package/core/modules/parsers/wikiparser/rules/codeinline.js +5 -2
- package/core/modules/parsers/wikiparser/rules/extlink.js +2 -1
- package/core/modules/parsers/wikiparser/rules/import.js +1 -1
- package/core/modules/parsers/wikiparser/rules/wikilinkprefix.js +4 -2
- package/core/modules/startup/load-modules.js +2 -2
- package/core/modules/startup/startup.js +0 -0
- package/core/modules/utils/deprecated.js +60 -11
- package/core/modules/utils/diff-match-patch/LICENSE +0 -0
- package/core/modules/utils/diff-match-patch/README.md +0 -0
- package/core/modules/utils/diff-match-patch/diff_match_patch.js +0 -0
- package/core/modules/utils/diff-match-patch/diff_match_patch_uncompressed.js +0 -0
- package/core/modules/utils/dom/dom.js +13 -0
- package/core/modules/utils/fakedom.js +9 -0
- package/core/modules/utils/utils.js +27 -7
- package/core/modules/widgets/element.js +0 -0
- package/core/modules/widgets/entity.js +0 -0
- package/core/modules/widgets/fields.js +0 -0
- package/core/modules/widgets/link.js +0 -0
- package/core/modules/widgets/list.js +0 -0
- package/core/modules/widgets/navigator.js +0 -0
- package/core/modules/widgets/reveal.js +0 -0
- package/core/modules/widgets/select.js +3 -4
- package/core/modules/widgets/setvariable.js +0 -0
- package/core/modules/widgets/text.js +0 -0
- package/core/modules/widgets/tiddler.js +0 -0
- package/core/modules/widgets/transclude.js +0 -0
- package/core/modules/widgets/view.js +0 -0
- package/core/modules/widgets/void.js +0 -0
- package/core/modules/widgets/widget.js +0 -0
- package/core/modules/wiki.js +0 -0
- package/core/sjcl-license.tid +0 -0
- package/core/wiki/config/OfficialPluginLibrary.tid +1 -1
- package/core-server/commands/rendertiddler.js +0 -0
- package/editions/de-AT/tiddlers/system/$__editions_de-AT-DE_download-empty.tid +0 -0
- package/editions/de-AT/tiddlywiki.info +0 -0
- package/editions/de-DE/tiddlywiki.info +0 -0
- package/editions/dev/tiddlywiki.info +0 -1
- package/editions/es-ES/tiddlers/system/download-empty.tid +0 -0
- package/editions/fr-FR/tiddlers/system/download-empty.tid +0 -0
- package/editions/introduction/tiddlywiki.info +0 -1
- package/editions/ja-JP/tiddlers/about/Archive.tid +1 -0
- package/editions/ja-JP/tiddlers/filters/syntax/Filter Expression.tid +2 -0
- package/editions/ja-JP/tiddlers/filters/syntax/Filter Parameter.tid +11 -1
- package/editions/ja-JP/tiddlers/filters/syntax/Filter Step.tid +3 -3
- package/editions/ja-JP/tiddlers/filters/syntax/Interchangeable Filter Run Prefixes.tid +3 -0
- package/editions/ja-JP/tiddlers/filters/syntax/Intersection Filter Run Prefix.tid +10 -1
- package/editions/ja-JP/tiddlers/filters/syntax/Let Filter Run Prefix (Examples).tid +15 -0
- package/editions/ja-JP/tiddlers/filters/syntax/Let Filter Run Prefix.tid +32 -0
- package/editions/ja-JP/tiddlers/filters/syntax/Named Filter Run Prefix.tid +11 -0
- package/editions/ja-JP/tiddlers/filters/syntax/Shortcut Filter Run Prefixes.tid +5 -3
- package/editions/ja-JP/tiddlers/filters/syntax/then Filter Run Prefix.tid +1 -1
- package/editions/ja-JP/tiddlers/functions/Functions.tid +3 -2
- package/editions/ja-JP/tiddlers/hellothere/HelloThere.tid +2 -2
- package/editions/ja-JP/tiddlers/hellothere/HelloThumbnail.tid +1 -1
- package/editions/ja-JP/tiddlers/hellothere/thumbnails/HelloThumbnail - Latest Version.tid +1 -0
- package/editions/ja-JP/tiddlers/hellothere/thumbnails/HelloThumbnail - Newsletter.tid +0 -1
- package/editions/ja-JP/tiddlers/procedures/Procedure Calls.tid +3 -52
- package/editions/ja-JP/tiddlers/procedures/calls/Calls.tid +66 -0
- package/editions/ja-JP/tiddlers/saving/Encryption.tid +5 -5
- package/editions/ja-JP/tiddlers/variables/Behaviour of variables invoked via widget attributes.tid +4 -2
- package/editions/ja-JP/tiddlers/wikitext/Description Lists in WikiText.tid +33 -3
- package/editions/ja-JP/tiddlers/wikitext/Formatting in WikiText.tid +1 -1
- package/editions/ja-JP/tiddlers/wikitext/Lists in WikiText.tid +6 -2
- package/editions/ja-JP/tiddlers/wikitext/Macro Calls.tid +1 -52
- package/editions/ja-JP/tiddlers/wikitext/Multi-Valued Variable Attribute Values.tid +39 -0
- package/editions/ja-JP/tiddlers/wikitext/Tables in WikiText CSS Utility Classes.tid +12 -1
- package/editions/ja-JP/tiddlers/wikitext/Transclusion in WikiText.tid +22 -0
- package/editions/ja-JP/tiddlers/wikitext/Widget Attributes.tid +3 -2
- package/editions/prerelease/tiddlers/system/PrereleaseLocalPluginLibrary.tid +1 -1
- package/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid +1 -1
- package/editions/test/playwright.spec.js +1 -1
- package/editions/test/quick-test.js +71 -0
- package/editions/test/tiddlers/tests/test-deprecated.js +252 -0
- package/editions/test/tiddlers/tests/test-edit-widgets/edit-widgets-helpers.js +138 -0
- package/editions/test/tiddlers/tests/test-edit-widgets/test-edit-text-widget-attributes.js +353 -0
- package/editions/test/tiddlers/tests/test-edit-widgets/test-edit-text-widget.js +198 -0
- package/editions/test/tiddlers/tests/test-fakedom.js +11 -0
- package/editions/test/tiddlers/tests/test-parsetree-positions.js +60 -0
- package/editions/test/tiddlers/tests/test-select-widget.js +144 -0
- package/editions/test/tiddlers/tests/test-utils-copyObjectProperiesSafe.js +240 -0
- package/editions/test/tiddlers/tests/test-widget.js +0 -0
- package/editions/tiddlywiki-surveys/scripts/import-great-interview-project-json.sh +0 -0
- package/editions/tw5.com/tiddlers/$__StoryList.tid +3 -0
- package/editions/tw5.com/tiddlers/about/Archive.tid +4 -2
- package/editions/tw5.com/tiddlers/community/Community Survey 2025.tid +2 -2
- package/editions/tw5.com/tiddlers/hellothere/HelloThere.tid +1 -1
- package/editions/tw5.com/tiddlers/hellothere/HelloThumbnail.tid +1 -1
- package/editions/tw5.com/tiddlers/images/New Release Banner.webp +0 -0
- package/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9609_impacts_event detail variables in eventcatcher.tid +8 -0
- package/editions/tw5.com/tiddlers/releasenotes/5.4.0/Release 5.4.0.tid +1 -1
- package/editions/tw5.com/tiddlers/releasenotes/5.4.1/#9828.tid +13 -0
- package/editions/tw5.com/tiddlers/releasenotes/5.4.1/#9829.tid +9 -0
- package/editions/tw5.com/tiddlers/releasenotes/5.4.1/#9836.tid +32 -0
- package/editions/tw5.com/tiddlers/releasenotes/5.4.1/#9841.tid +13 -0
- package/editions/tw5.com/tiddlers/releasenotes/5.4.1/#9870.tid +9 -0
- package/editions/tw5.com/tiddlers/releasenotes/5.4.1/#9873.tid +14 -0
- package/editions/tw5.com/tiddlers/releasenotes/5.4.1/#9882/#9882-fix-invalid-source-positions.tid +21 -0
- package/editions/tw5.com/tiddlers/releasenotes/5.4.1/#9905.tid +13 -0
- package/editions/tw5.com/tiddlers/releasenotes/5.4.1/Release 5.4.1.tid +19 -0
- package/editions/tw5.com/tiddlers/variables/Multi-Valued Variables.tid +2 -2
- package/editions/tw5.com/tiddlers/widgets/EditTextWidget.tid +1 -1
- package/languages/de-DE/Fields.multids +0 -0
- package/languages/de-DE/Filters.multids +0 -0
- package/languages/de-DE/GettingStarted.tid +0 -0
- package/languages/de-DE/TiddlerInfo.multids +0 -0
- package/languages/pl-PL/ControlPanel.multids +2 -1
- package/languages/pl-PL/Draft.multids +4 -0
- package/languages/pl-PL/Import.multids +2 -0
- package/languages/pl-PL/Misc.multids +1 -0
- package/languages/pl-PL/TiddlerInfo.multids +5 -0
- package/languages/sv-SE/Buttons.multids +0 -0
- package/languages/sv-SE/ControlPanel.multids +0 -0
- package/languages/sv-SE/Dates.multids +0 -0
- package/languages/sv-SE/Docs/ModuleTypes.multids +0 -0
- package/languages/sv-SE/Docs/PaletteColours.multids +0 -0
- package/languages/sv-SE/EditTemplate.multids +0 -0
- package/languages/sv-SE/Exporters.multids +0 -0
- package/languages/sv-SE/Fields.multids +0 -0
- package/languages/sv-SE/Filters.multids +0 -0
- package/languages/sv-SE/GettingStarted.tid +0 -0
- package/languages/sv-SE/Help/build.tid +0 -0
- package/languages/sv-SE/Help/clearpassword.tid +0 -0
- package/languages/sv-SE/Help/default.tid +0 -0
- package/languages/sv-SE/Help/editions.tid +0 -0
- package/languages/sv-SE/Help/help.tid +0 -0
- package/languages/sv-SE/Help/init.tid +0 -0
- package/languages/sv-SE/Help/load.tid +0 -0
- package/languages/sv-SE/Help/makelibrary.tid +0 -0
- package/languages/sv-SE/Help/notfound.tid +0 -0
- package/languages/sv-SE/Help/output.tid +0 -0
- package/languages/sv-SE/Help/password.tid +0 -0
- package/languages/sv-SE/Help/rendertiddler.tid +0 -0
- package/languages/sv-SE/Help/rendertiddlers.tid +0 -0
- package/languages/sv-SE/Help/savetiddler.tid +0 -0
- package/languages/sv-SE/Help/savetiddlers.tid +0 -0
- package/languages/sv-SE/Help/server.tid +0 -0
- package/languages/sv-SE/Help/setfield.tid +0 -0
- package/languages/sv-SE/Help/unpackplugin.tid +0 -0
- package/languages/sv-SE/Help/verbose.tid +0 -0
- package/languages/sv-SE/Help/version.tid +0 -0
- package/languages/sv-SE/Import.multids +0 -0
- package/languages/sv-SE/Misc.multids +0 -0
- package/languages/sv-SE/Modals/Download.tid +0 -0
- package/languages/sv-SE/NewJournal.multids +0 -0
- package/languages/sv-SE/Notifications.multids +0 -0
- package/languages/sv-SE/Search.multids +0 -0
- package/languages/sv-SE/SideBar.multids +0 -0
- package/languages/sv-SE/SiteSubtitle.tid +0 -0
- package/languages/sv-SE/SiteTitle.tid +0 -0
- package/languages/sv-SE/TiddlerInfo.multids +0 -0
- package/languages/sv-SE/Types/application_javascript.tid +0 -0
- package/languages/sv-SE/Types/application_json.tid +0 -0
- package/languages/sv-SE/Types/application_x_tiddler_dictionary.tid +0 -0
- package/languages/sv-SE/Types/image_gif.tid +0 -0
- package/languages/sv-SE/Types/image_jpeg.tid +0 -0
- package/languages/sv-SE/Types/image_png.tid +0 -0
- package/languages/sv-SE/Types/image_svg_xml.tid +0 -0
- package/languages/sv-SE/Types/text_css.tid +0 -0
- package/languages/sv-SE/Types/text_html.tid +0 -0
- package/languages/sv-SE/Types/text_plain.tid +0 -0
- package/languages/sv-SE/Types/text_vnd.tiddlywiki.tid +0 -0
- package/languages/sv-SE/plugin.info +0 -0
- package/licenses/cla-individual.md +2 -0
- package/package.json +1 -1
- package/playwright.config.js +11 -3
- package/plugins/tiddlywiki/codemirror/EditorTypeMappings.multids +0 -0
- package/plugins/tiddlywiki/codemirror/edit-codemirror.js +0 -0
- package/plugins/tiddlywiki/codemirror/engine.js +3 -4
- package/plugins/tiddlywiki/codemirror/files/addon/dialog/dialog.css +0 -0
- package/plugins/tiddlywiki/codemirror/files/addon/dialog/dialog.js +0 -0
- package/plugins/tiddlywiki/codemirror/files/codemirror.css +0 -0
- package/plugins/tiddlywiki/codemirror/files/codemirror.js +0 -0
- package/plugins/tiddlywiki/codemirror/files/mode/tw-meta.js +0 -0
- package/plugins/tiddlywiki/codemirror/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror/keyboard.tid +0 -0
- package/plugins/tiddlywiki/codemirror/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror/styles.tid +0 -0
- package/plugins/tiddlywiki/codemirror/usage.tid +0 -0
- package/plugins/tiddlywiki/codemirror-autocomplete/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-autocomplete/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-autocomplete/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-closebrackets/files/addon/edit/matchbrackets.js +0 -0
- package/plugins/tiddlywiki/codemirror-closebrackets/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-closebrackets/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-closebrackets/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-closetag/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-closetag/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-closetag/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-fullscreen-editing/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-fullscreen-editing/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-fullscreen-editing/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-keymap-emacs/files/keymap/emacs.js +0 -0
- package/plugins/tiddlywiki/codemirror-keymap-emacs/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-keymap-emacs/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-keymap-sublime-text/files/keymap/sublime.js +0 -0
- package/plugins/tiddlywiki/codemirror-keymap-sublime-text/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-keymap-sublime-text/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-keymap-vim/files/keymap/vim.js +0 -0
- package/plugins/tiddlywiki/codemirror-keymap-vim/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-keymap-vim/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-mode-css/files/mode/css/css.js +0 -0
- package/plugins/tiddlywiki/codemirror-mode-css/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-mode-css/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-mode-css/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-mode-htmlembedded/files/addon/mode/multiplex.js +0 -0
- package/plugins/tiddlywiki/codemirror-mode-htmlembedded/files/mode/htmlembedded/htmlembedded.js +0 -0
- package/plugins/tiddlywiki/codemirror-mode-htmlembedded/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-mode-htmlembedded/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-mode-htmlembedded/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-mode-htmlmixed/files/mode/htmlmixed/htmlmixed.js +0 -0
- package/plugins/tiddlywiki/codemirror-mode-htmlmixed/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-mode-htmlmixed/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-mode-htmlmixed/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-mode-javascript/files/mode/javascript/javascript.js +0 -0
- package/plugins/tiddlywiki/codemirror-mode-javascript/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-mode-javascript/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-mode-javascript/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-mode-markdown/files/mode/markdown/markdown.js +0 -0
- package/plugins/tiddlywiki/codemirror-mode-markdown/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-mode-markdown/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-mode-markdown/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-mode-x-tiddlywiki/files/mode/tiddlywiki/tiddlywiki.css +0 -0
- package/plugins/tiddlywiki/codemirror-mode-x-tiddlywiki/files/mode/tiddlywiki/tiddlywiki.js +0 -0
- package/plugins/tiddlywiki/codemirror-mode-x-tiddlywiki/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-mode-x-tiddlywiki/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-mode-x-tiddlywiki/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-mode-xml/files/mode/xml/xml.js +0 -0
- package/plugins/tiddlywiki/codemirror-mode-xml/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-mode-xml/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-mode-xml/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-search-replace/files/addon/search/searchcursor.js +0 -0
- package/plugins/tiddlywiki/codemirror-search-replace/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-search-replace/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-search-replace/readme.tid +0 -0
- package/plugins/tiddlywiki/codemirror-trailingspace/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/codemirror-trailingspace/plugin.info +0 -0
- package/plugins/tiddlywiki/codemirror-trailingspace/readme.tid +0 -0
- package/plugins/tiddlywiki/evernote/samples/sample-enex-with-image.xml.enex +0 -0
- package/plugins/tiddlywiki/evernote/samples/sample-enex.xml.enex +0 -0
- package/plugins/tiddlywiki/freelinks/aho-corasick.js +20 -14
- package/plugins/tiddlywiki/freelinks/config-Freelinks-MaxLinks.tid +2 -0
- package/plugins/tiddlywiki/freelinks/macros-view.tid +2 -3
- package/plugins/tiddlywiki/freelinks/readme.tid +9 -3
- package/plugins/tiddlywiki/freelinks/settings.tid +2 -0
- package/plugins/tiddlywiki/freelinks/text.js +25 -5
- package/plugins/tiddlywiki/geospatial/files/leaflet.markercluster/MarkerCluster.Default.css +0 -0
- package/plugins/tiddlywiki/geospatial/files/leaflet.markercluster/MarkerCluster.css +0 -0
- package/plugins/tiddlywiki/geospatial/files/leaflet.markercluster/leaflet.markercluster-src.js +0 -0
- package/plugins/tiddlywiki/geospatial/files/leaflet.markercluster/leaflet.markercluster-src.js.map +0 -0
- package/plugins/tiddlywiki/geospatial/files/leaflet.markercluster/leaflet.markercluster.js +0 -0
- package/plugins/tiddlywiki/geospatial/files/leaflet.markercluster/leaflet.markercluster.js.map +0 -0
- package/plugins/tiddlywiki/jasmine/update-packages.sh +0 -0
- package/plugins/tiddlywiki/jszip/files/LICENSE.markdown +0 -0
- package/plugins/tiddlywiki/jszip/files/jszip.min.v2.6.1.js +0 -0
- package/plugins/tiddlywiki/katex/files/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/bold.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/heading-1.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/heading-2.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/heading-3.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/heading-4.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/heading-5.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/heading-6.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/italic.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/link.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/linkify.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/list-bullet.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/list-number.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/mono-block.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/mono-line.tid +0 -0
- package/plugins/tiddlywiki/markdown/EditorToolbar/quote.tid +0 -0
- package/plugins/tiddlywiki/markdown/docs_type_markdown.tid +0 -0
- package/plugins/tiddlywiki/markdown/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/markdown/images/new-markdown-button.tid +0 -0
- package/plugins/tiddlywiki/markdown/new-markdown.tid +0 -0
- package/plugins/tiddlywiki/markdown/plugin.info +0 -0
- package/plugins/tiddlywiki/markdown/readme.tid +0 -0
- package/plugins/tiddlywiki/markdown/wrapper.js +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/bold.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-1.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-2.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-3.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-4.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-5.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/heading-6.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/italic.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/link.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/linkify.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/list-bullet.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/list-number.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/mono-block.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/mono-line.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/EditorToolbar/quote.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/docs_type_markdown.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/files/tiddlywiki.files +0 -0
- package/plugins/tiddlywiki/markdown-legacy/images/new-markdown-button.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/new-markdown.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/plugin.info +0 -0
- package/plugins/tiddlywiki/markdown-legacy/readme.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/usage.tid +0 -0
- package/plugins/tiddlywiki/markdown-legacy/wrapper.js +0 -0
- package/plugins/tiddlywiki/qrcode/files/qrcode/LICENSE +0 -0
- package/plugins/tiddlywiki/qrcode/files/qrcode/README.md +0 -0
- package/plugins/tiddlywiki/qrcode/files/qrcode/qrcode.js +0 -0
- package/plugins/tiddlywiki/tw2parser/wikitextrules.js +0 -0
- package/plugins/tiddlywiki/xmldom/files/LICENSE +0 -0
- package/plugins/tiddlywiki/xmldom/files/dom-parser.js +0 -0
- package/plugins/tiddlywiki/xmldom/files/dom.js +0 -0
- package/plugins/tiddlywiki/xmldom/files/entities.js +0 -0
- package/plugins/tiddlywiki/xmldom/files/readme.md +0 -0
- package/plugins/tiddlywiki/xmldom/files/sax.js +0 -0
- package/readme.md +1 -1
- package/.claude/settings.json +0 -34
- package/.claude/settings.local.json +0 -21
- package/editions/dev/tiddlers/$__StoryList.tid +0 -3
- package/editions/ja-JP/tiddlers/gettingstarted/GettingStarted - Internet Explorer.tid +0 -13
- package/editions/ja-JP/tiddlers/howtos/Windows HTA Hack.tid +0 -19
- package/editions/ja-JP/tiddlers/saving/Saving with TiddlyIE.tid +0 -28
- package/editions/test/tiddlers/$__StoryList.tid +0 -2
- package/editions/tw5.com/tiddlers/releasenotes/5.4.0/#9609_impacts_event detail variables in eventcatcher.json +0 -13
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/*\
|
|
2
|
+
title: test-edit-text-widget.js
|
|
3
|
+
type: application/javascript
|
|
4
|
+
tags: [[$:/tags/test-spec]]
|
|
5
|
+
|
|
6
|
+
Covers the `rows` / `autoHeight` / `minHeight` interaction in the
|
|
7
|
+
edit-text widget. Regression guard for issue #9451 / PR #9454 follow-up
|
|
8
|
+
fix (rows=1 autoHeight=yes must still grow).
|
|
9
|
+
|
|
10
|
+
Assertions target the routing inside SimpleEngine.fixHeight (which
|
|
11
|
+
branch runs, called with which minHeight) — pixel measurement needs a
|
|
12
|
+
real browser.
|
|
13
|
+
|
|
14
|
+
\*/
|
|
15
|
+
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
describe("Edit-text widget", function() {
|
|
19
|
+
|
|
20
|
+
// Shared helpers live in $:/tests/test-edit-widgets/helpers. See that
|
|
21
|
+
// file for what each helper prepares and where it is used across the suite.
|
|
22
|
+
var helpers = require("$:/tests/test-edit-widgets/helpers");
|
|
23
|
+
|
|
24
|
+
// Local wrapper: every test in THIS file seeds an empty "TestTiddler"
|
|
25
|
+
// as its default binding target, so we inject that by default.
|
|
26
|
+
function makeWiki(extraTiddlers) {
|
|
27
|
+
return helpers.makeWiki(extraTiddlers,{seedTestTiddler: true});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Local alias — `renderEditText` reads more naturally than
|
|
31
|
+
// `helpers.renderFromAttrs` for the routing tests.
|
|
32
|
+
function renderEditText(attrs,wiki,tiddlerTitle) {
|
|
33
|
+
return helpers.renderFromAttrs(attrs,wiki,tiddlerTitle);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// ---------------------------------------------------------------
|
|
37
|
+
// Attribute parsing
|
|
38
|
+
// ---------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
describe("attribute parsing", function() {
|
|
41
|
+
|
|
42
|
+
// manual: on a bare <$edit-text tiddler="T"/>, open devtools and
|
|
43
|
+
// inspect the widget instance — the element should be a textarea,
|
|
44
|
+
// there should be no rows attribute, and auto-height should be on.
|
|
45
|
+
// Manual Preview: Also use the widget-tree
|
|
46
|
+
it("defaults: tag=textarea, autoHeight=yes, no rows, minHeight=100px", function() {
|
|
47
|
+
var et = renderEditText({});
|
|
48
|
+
expect(et.editTag).toBe("textarea");
|
|
49
|
+
expect(et.editAutoHeight).toBe(true);
|
|
50
|
+
expect(et.editRows).toBeUndefined();
|
|
51
|
+
expect(et.editMinHeight).toBe("100px");
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// manual: render <$edit-text tiddler="T" rows=5 autoHeight="no" minHeight="1em"/>
|
|
55
|
+
// — the widget's internal state should reflect all three explicit
|
|
56
|
+
// values, overriding the defaults verified in the previous test.
|
|
57
|
+
// Manual Preview: Also use the widget-tree
|
|
58
|
+
it("explicit attributes override defaults (rows, autoHeight, minHeight)", function() {
|
|
59
|
+
var et = renderEditText({rows: "5", autoHeight: "no", minHeight: "1em"});
|
|
60
|
+
expect(et.editRows).toBe("5");
|
|
61
|
+
expect(et.editAutoHeight).toBe(false);
|
|
62
|
+
expect(et.editMinHeight).toBe("1em");
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// manual: render <$edit-text tiddler="T" field="caption" tag="textarea"/>
|
|
66
|
+
// — the element should be a multi-line textarea even though the
|
|
67
|
+
// field is not `text`.
|
|
68
|
+
it("tag=textarea override applies to non-text fields", function() {
|
|
69
|
+
var et = renderEditText({field: "caption", tag: "textarea"});
|
|
70
|
+
expect(et.editTag).toBe("textarea");
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// manual: set $:/config/TextEditor/EditorHeight/Mode = "fixed"
|
|
74
|
+
// (via control panel → settings → editor toolbar, or edit the
|
|
75
|
+
// tiddler directly). <$edit-text tiddler="T"/> should now behave
|
|
76
|
+
// as fixed-height (scrollbar on overflow) by default.
|
|
77
|
+
it("$:/config/TextEditor/EditorHeight/Mode=fixed flips default autoHeight to false", function() {
|
|
78
|
+
var wiki = makeWiki([
|
|
79
|
+
{title: "$:/config/TextEditor/EditorHeight/Mode", text: "fixed"}
|
|
80
|
+
]);
|
|
81
|
+
var et = renderEditText({},wiki);
|
|
82
|
+
expect(et.editAutoHeight).toBe(false);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// manual: with the same Mode=fixed config as above, an explicit
|
|
86
|
+
// <$edit-text tiddler="T" autoHeight="yes"/> should still auto-grow
|
|
87
|
+
// — the per-widget attribute wins over the global config.
|
|
88
|
+
it("explicit autoHeight=yes overrides Mode=fixed config", function() {
|
|
89
|
+
var wiki = makeWiki([
|
|
90
|
+
{title: "$:/config/TextEditor/EditorHeight/Mode", text: "fixed"}
|
|
91
|
+
]);
|
|
92
|
+
var et = renderEditText({autoHeight: "yes"},wiki);
|
|
93
|
+
expect(et.editAutoHeight).toBe(true);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// ---------------------------------------------------------------
|
|
98
|
+
// DOM node construction (SimpleEngine)
|
|
99
|
+
// ---------------------------------------------------------------
|
|
100
|
+
|
|
101
|
+
describe("DOM node construction (non-toolbar SimpleEngine)", function() {
|
|
102
|
+
|
|
103
|
+
// manual: render <$edit-text tiddler="T" rows=1/> and inspect the
|
|
104
|
+
// element — it should carry rows="1". Proves SimpleEngine copies
|
|
105
|
+
// widget.editRows onto the DOM element.
|
|
106
|
+
it("sets the rows attribute on the DOM node when rows is specified", function() {
|
|
107
|
+
var et = renderEditText({rows: "1"});
|
|
108
|
+
expect(et.engine.domNode.getAttribute("rows")).toBe("1");
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// ---------------------------------------------------------------
|
|
113
|
+
// fixHeight routing — the core of the fix
|
|
114
|
+
// ---------------------------------------------------------------
|
|
115
|
+
|
|
116
|
+
describe("fixHeight routing", function() {
|
|
117
|
+
|
|
118
|
+
var originalResize, resizeSpy;
|
|
119
|
+
|
|
120
|
+
beforeEach(function() {
|
|
121
|
+
originalResize = $tw.utils.resizeTextAreaToFit;
|
|
122
|
+
resizeSpy = jasmine.createSpy("resizeTextAreaToFit").and.returnValue(0);
|
|
123
|
+
$tw.utils.resizeTextAreaToFit = resizeSpy;
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
afterEach(function() {
|
|
127
|
+
$tw.utils.resizeTextAreaToFit = originalResize;
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// Make the SimpleEngine.fixHeight think we are in a real DOM so it
|
|
131
|
+
// actually reaches the $tw.utils.resizeTextAreaToFit call. Without
|
|
132
|
+
// this the engine short-circuits because fakedom nodes carry
|
|
133
|
+
// isTiddlyWikiFakeDom === true.
|
|
134
|
+
function callFixHeight(et) {
|
|
135
|
+
et.engine.domNode.isTiddlyWikiFakeDom = false;
|
|
136
|
+
et.engine.fixHeight();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// manual: render <$edit-text tiddler="T" rows=1 autoHeight=yes minHeight=1em/>
|
|
140
|
+
// (the TiddlyTools idiom). In 5.4.0 pre-fix, the textarea stayed
|
|
141
|
+
// a single row forever; after the fix, it starts at 1 row and
|
|
142
|
+
// grows as you type newlines. This covers BRANCH A (autoHeight=yes)
|
|
143
|
+
// of SimpleEngine.fixHeight: resize is called with minHeight even
|
|
144
|
+
// when rows is set. Strict superset of the no-rows baseline.
|
|
145
|
+
it("rows=1 autoHeight=yes minHeight=1em still calls resize (regression test for the PR #9454 follow-up fix)", function() {
|
|
146
|
+
var et = renderEditText({rows: "1", autoHeight: "yes", minHeight: "1em"});
|
|
147
|
+
callFixHeight(et);
|
|
148
|
+
expect(resizeSpy).toHaveBeenCalled();
|
|
149
|
+
expect(resizeSpy.calls.mostRecent().args[1]).toBe("1em");
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// manual: render <$edit-text tiddler="T" rows=5 autoHeight=no/> —
|
|
153
|
+
// the textarea must stay locked at exactly 5 rows tall, even if
|
|
154
|
+
// you paste in 50 lines (vertical scrollbar appears inside).
|
|
155
|
+
it("rows=5 autoHeight=no does NOT call resize and does NOT apply the fixed-height fallback", function() {
|
|
156
|
+
var et = renderEditText({rows: "5", autoHeight: "no"});
|
|
157
|
+
callFixHeight(et);
|
|
158
|
+
expect(resizeSpy).not.toHaveBeenCalled();
|
|
159
|
+
// rows attribute governs height — CSS height must remain unset
|
|
160
|
+
expect(et.engine.domNode.style.height).toBe("");
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// manual: set $:/config/TextEditor/EditorHeight/Height = "250px",
|
|
164
|
+
// then render <$edit-text tiddler="T" autoHeight="no"/> — the
|
|
165
|
+
// textarea should be exactly 250px tall regardless of content.
|
|
166
|
+
it("autoHeight=no with no rows applies the fixed-height fallback from config", function() {
|
|
167
|
+
var wiki = makeWiki([
|
|
168
|
+
{title: "$:/config/TextEditor/EditorHeight/Height", text: "250px"}
|
|
169
|
+
]);
|
|
170
|
+
var et = renderEditText({autoHeight: "no"},wiki);
|
|
171
|
+
callFixHeight(et);
|
|
172
|
+
expect(resizeSpy).not.toHaveBeenCalled();
|
|
173
|
+
expect(et.engine.domNode.style.height).toBe("250px");
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// manual: set $:/config/TextEditor/EditorHeight/Height = "5px",
|
|
177
|
+
// render <$edit-text tiddler="T" autoHeight="no"/> — the textarea
|
|
178
|
+
// should be 20px tall (clamped), not a sliver, so it stays usable.
|
|
179
|
+
it("autoHeight=no fallback height is clamped to at least 20px", function() {
|
|
180
|
+
var wiki = makeWiki([
|
|
181
|
+
{title: "$:/config/TextEditor/EditorHeight/Height", text: "5px"}
|
|
182
|
+
]);
|
|
183
|
+
var et = renderEditText({autoHeight: "no"},wiki);
|
|
184
|
+
callFixHeight(et);
|
|
185
|
+
expect(et.engine.domNode.style.height).toBe("20px");
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// manual: render <$edit-text tiddler="T" field="caption" autoHeight="no"/>
|
|
189
|
+
// — the element is a single-line <input> and the CSS height should
|
|
190
|
+
// remain unset (no height fallback applies to inputs).
|
|
191
|
+
it("tag=input: neither resize nor fixed-height fallback runs", function() {
|
|
192
|
+
var et = renderEditText({field: "caption", autoHeight: "no"});
|
|
193
|
+
callFixHeight(et);
|
|
194
|
+
expect(resizeSpy).not.toHaveBeenCalled();
|
|
195
|
+
expect(et.engine.domNode.style.height).toBe("");
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
});
|
|
@@ -18,4 +18,15 @@ describe("fakedom tests", function() {
|
|
|
18
18
|
expect($tw.fakeDocument.createTextNode("text").nodeType).toBe(3);
|
|
19
19
|
expect($tw.fakeDocument.createTextNode("text").TEXT_NODE).toBe(3);
|
|
20
20
|
});
|
|
21
|
+
|
|
22
|
+
// Real CSSStyleDeclaration returns undefined for Symbol property keys.
|
|
23
|
+
// Without a guard, the TW_Style Proxy throws on Symbol access. This bites
|
|
24
|
+
// in practice when Jasmine pretty-prints fakedom elements on failure.
|
|
25
|
+
// See related TODO in test-select-widget.js
|
|
26
|
+
it("returns undefined for Symbol property access on element.style", function() {
|
|
27
|
+
var el = $tw.fakeDocument.createElement("div");
|
|
28
|
+
expect(function() { return el.style[Symbol.toPrimitive]; }).not.toThrow();
|
|
29
|
+
expect(el.style[Symbol.toPrimitive]).toBeUndefined();
|
|
30
|
+
expect(function() { el.style[Symbol.iterator] = "x"; }).not.toThrow();
|
|
31
|
+
});
|
|
21
32
|
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*\
|
|
2
|
+
title: test-parsetree-positions.js
|
|
3
|
+
type: application/javascript
|
|
4
|
+
tags: [[$:/tags/test-spec]]
|
|
5
|
+
|
|
6
|
+
Regression tests for #9882: wikitext parser rules must emit accurate
|
|
7
|
+
`start`/`end` source positions on their parse tree nodes. Tooling that maps
|
|
8
|
+
rendered output back to the source text relies on these offsets.
|
|
9
|
+
|
|
10
|
+
\*/
|
|
11
|
+
|
|
12
|
+
"use strict";
|
|
13
|
+
|
|
14
|
+
describe("Parse tree source position tests (#9882)", function() {
|
|
15
|
+
|
|
16
|
+
// Create a wiki
|
|
17
|
+
var wiki = $tw.test.wiki();
|
|
18
|
+
|
|
19
|
+
// Define a parsing shortcut
|
|
20
|
+
var parse = function(text) {
|
|
21
|
+
return wiki.parseText("text/vnd.tiddlywiki",text).tree;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
it("should give inline code runs a text node that spans only the code, not the backticks", function() {
|
|
25
|
+
// codeinline.js: `code` gives a text node "code" spanning offsets 1 to 5. The closing backtick at 5 is excluded.
|
|
26
|
+
// Bug: `end` was set to `this.parser.pos`, which sits past the closing backtick, so end was 6 and the span swallowed the backtick.
|
|
27
|
+
expect(parse("`code`")).toEqual(
|
|
28
|
+
[ { type: "element", tag: "p", rule: "parseblock", start: 0, end: 6, children: [ { type: "element", tag: "code", rule: "codeinline", start: 0, end: 6, children: [ { type: "text", text: "code", start: 1, end: 5 } ] } ] } ]
|
|
29
|
+
);
|
|
30
|
+
// ``a`b`` gives text "a`b" spanning 2 to 5. `end` must be the offset of the closing marker whatever its length.
|
|
31
|
+
// Bug: `end` was `this.parser.pos` (7), two characters past the code, so it also swallowed the closing ``.
|
|
32
|
+
expect(parse("``a`b``")).toEqual(
|
|
33
|
+
[ { type: "element", tag: "p", rule: "parseblock", start: 0, end: 7, children: [ { type: "element", tag: "code", rule: "codeinline", start: 0, end: 7, children: [ { type: "text", text: "a`b", start: 2, end: 5 } ] } ] } ]
|
|
34
|
+
);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("should start the text node of a suppressed external link after the ~", function() {
|
|
38
|
+
// extlink.js: ~https://example.com/ emits the plain text "https://example.com/", which spans offsets 1 to 21.
|
|
39
|
+
// Bug: `start` was the offset of the ~ (0), so the span was one character too wide and began on the ~ that the text omits.
|
|
40
|
+
expect(parse("~https://example.com/")).toEqual(
|
|
41
|
+
[ { type: "element", tag: "p", rule: "parseblock", start: 0, end: 21, children: [ { type: "text", text: "https://example.com/", start: 1, end: 21, rule: "extlink" } ] } ]
|
|
42
|
+
);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("should give a suppressed wikilink's text node source positions", function() {
|
|
46
|
+
// wikilinkprefix.js: ~SuppressedLink emits the plain text "SuppressedLink", spanning offsets 1 to 15.
|
|
47
|
+
// Bug: the text node carried no `start`/`end` at all. The parser framework then defaulted `start` to the ~ offset (0).
|
|
48
|
+
expect(parse("~SuppressedLink")).toEqual(
|
|
49
|
+
[ { type: "element", tag: "p", rule: "parseblock", start: 0, end: 15, children: [ { type: "text", text: "SuppressedLink", start: 1, end: 15, rule: "wikilinkprefix" } ] } ]
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("should record the filter's start offset for an \\import pragma", function() {
|
|
54
|
+
// import.js: \import [tag[x]] records the filter value "[tag[x]]" starting at offset 8, right after "\import ".
|
|
55
|
+
// Bug: `filterStart` was assigned `this.parser.source` (the whole source string) instead of `this.parser.pos`, so `start` was a string, not an offset.
|
|
56
|
+
expect(parse("\\import [tag[x]]\n")).toEqual(
|
|
57
|
+
[ { type: "importvariables", rule: "import", start: 0, end: 16, attributes: { filter: { type: "string", value: "[tag[x]]", start: 8, end: 16 } }, children: [] } ]
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/*\
|
|
2
|
+
title: test-select-widget.js
|
|
3
|
+
type: application/javascript
|
|
4
|
+
tags: [[$:/tags/test-spec]]
|
|
5
|
+
|
|
6
|
+
Tests the select widget, focused on multi-select refresh behaviour.
|
|
7
|
+
|
|
8
|
+
\*/
|
|
9
|
+
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
describe("Select widget", function() {
|
|
13
|
+
|
|
14
|
+
var widget = require("$:/core/modules/widgets/widget.js");
|
|
15
|
+
|
|
16
|
+
// Helpers reused from: test-widget.js and test-checkbox-widget.js
|
|
17
|
+
function createWidgetNode(parseTreeNode,wiki) {
|
|
18
|
+
return new widget.widget(parseTreeNode,{
|
|
19
|
+
wiki: wiki,
|
|
20
|
+
document: $tw.fakeDocument
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function parseText(text,wiki,options) {
|
|
25
|
+
var parser = wiki.parseText("text/vnd.tiddlywiki",text,options);
|
|
26
|
+
return parser ? {type: "widget", children: parser.tree} : undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function renderWidgetNode(widgetNode) {
|
|
30
|
+
$tw.fakeDocument.setSequenceNumber(0);
|
|
31
|
+
var wrapper = $tw.fakeDocument.createElement("div");
|
|
32
|
+
widgetNode.render(wrapper,null);
|
|
33
|
+
return wrapper;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function refreshWidgetNode(widgetNode,wrapper,changes) {
|
|
37
|
+
var changedTiddlers = {};
|
|
38
|
+
if(changes) {
|
|
39
|
+
$tw.utils.each(changes,function(title) {
|
|
40
|
+
changedTiddlers[title] = true;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
widgetNode.refresh(changedTiddlers,wrapper,null);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Don't pass fakedom elements to Jasmine matchers. The matchers pretty-print
|
|
47
|
+
// values on assertion which walks the element.style Proxy with Symbol keys and
|
|
48
|
+
// crashes inside convertStyleNameToPropertyName.
|
|
49
|
+
// TODO: once issue: "fakedom style Proxy guards against non-string property keys" lands
|
|
50
|
+
// revert these workarounds to idiomatic matchers (toBe(null), toBeUndefined()).
|
|
51
|
+
function findSelectDom(node) {
|
|
52
|
+
if(node.tag === "select") return node;
|
|
53
|
+
if(node.children) {
|
|
54
|
+
for(var i = 0; i < node.children.length; i++) {
|
|
55
|
+
var found = findSelectDom(node.children[i]);
|
|
56
|
+
if(found) return found;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function selectedFlags(parent) {
|
|
63
|
+
var result = [];
|
|
64
|
+
for(var i = 0; i < parent.children.length; i++) {
|
|
65
|
+
result.push(!!parent.children[i].selected);
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Regression test for https://github.com/TiddlyWiki/TiddlyWiki5/issues/9839
|
|
71
|
+
// PR #8093 added <optgroup> support but used `child.children.length === 0` to
|
|
72
|
+
// distinguish a plain <option> from an <optgroup>. That heuristic misfires for
|
|
73
|
+
// any <option> whose contents render to inline HTML elements (e.g. tc-tiddlylink
|
|
74
|
+
// auto-links generated for "$:/..." titles), so the option's `selected` state
|
|
75
|
+
// was never restored on refresh.
|
|
76
|
+
it("preserves multi-select state across refresh when options contain inline HTML children",function() {
|
|
77
|
+
var wiki = $tw.test.wiki();
|
|
78
|
+
wiki.addTiddlers([
|
|
79
|
+
{title: "Picks", mylist: "foo $:/mumble"}
|
|
80
|
+
]);
|
|
81
|
+
// Each option has element children to mimic the auto-link case from #9839.
|
|
82
|
+
// Explicit value attribute lets fakedom resolve option.value (real browsers
|
|
83
|
+
// fall back to text content).
|
|
84
|
+
var widgetText = "<$select tiddler='Picks' field='mylist' multiple>" +
|
|
85
|
+
"<option value='foo'><span>foo</span></option>" +
|
|
86
|
+
"<option value='bar'><span>bar</span></option>" +
|
|
87
|
+
"<option value='$:/mumble'><a class='tc-tiddlylink'>$:/mumble</a></option>" +
|
|
88
|
+
"</$select>";
|
|
89
|
+
var widgetNode = createWidgetNode(parseText(widgetText,wiki),wiki);
|
|
90
|
+
var wrapper = renderWidgetNode(widgetNode);
|
|
91
|
+
var select = findSelectDom(wrapper);
|
|
92
|
+
expect(select === null).toBe(false);
|
|
93
|
+
expect(select.children.length).toBe(3);
|
|
94
|
+
|
|
95
|
+
// After initial render, options matching the field value should be selected.
|
|
96
|
+
// foo (idx 0), bar (idx 1), $:/mumble (idx 2).
|
|
97
|
+
expect(selectedFlags(select)).toEqual([true,false,true]);
|
|
98
|
+
|
|
99
|
+
// Change the stored field value and refresh - this is where the bug surfaced:
|
|
100
|
+
// the "$:/mumble" option (with an <a> child) was wrongly skipped.
|
|
101
|
+
wiki.addTiddler({title: "Picks", mylist: "bar $:/mumble"});
|
|
102
|
+
refreshWidgetNode(widgetNode,wrapper,["Picks"]);
|
|
103
|
+
|
|
104
|
+
expect(selectedFlags(select)).toEqual([false,true,true]);
|
|
105
|
+
// The inner <a> must not be touched - .selected is meaningful only on <option>.
|
|
106
|
+
var innerLinkSelected = select.children[2].children[0].selected;
|
|
107
|
+
expect(innerLinkSelected === undefined).toBe(true);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it("still selects options inside <optgroup> across refresh, including $:/-prefixed entries with inline HTML",function() {
|
|
111
|
+
var wiki = $tw.test.wiki();
|
|
112
|
+
wiki.addTiddlers([
|
|
113
|
+
{title: "Picks", mylist: "1 $:/mumble"}
|
|
114
|
+
]);
|
|
115
|
+
// The "high" group mixes a plain option with a $:/-prefixed option whose
|
|
116
|
+
// content is wrapped in an auto-link <a> - same pattern that broke #9839
|
|
117
|
+
// for top-level options, exercised here inside an <optgroup>.
|
|
118
|
+
var widgetText = "<$select tiddler='Picks' field='mylist' multiple>" +
|
|
119
|
+
"<optgroup label='low'>" +
|
|
120
|
+
"<option value='1'>1</option>" +
|
|
121
|
+
"<option value='2'>2</option>" +
|
|
122
|
+
"</optgroup>" +
|
|
123
|
+
"<optgroup label='high'>" +
|
|
124
|
+
"<option value='4'>4</option>" +
|
|
125
|
+
"<option value='$:/mumble'><a class='tc-tiddlylink'>$:/mumble</a></option>" +
|
|
126
|
+
"</optgroup>" +
|
|
127
|
+
"</$select>";
|
|
128
|
+
var widgetNode = createWidgetNode(parseText(widgetText,wiki),wiki);
|
|
129
|
+
var wrapper = renderWidgetNode(widgetNode);
|
|
130
|
+
var select = findSelectDom(wrapper);
|
|
131
|
+
expect(select === null).toBe(false);
|
|
132
|
+
expect(select.children.length).toBe(2);
|
|
133
|
+
|
|
134
|
+
// Initial state: "1" and "$:/mumble" selected
|
|
135
|
+
expect(selectedFlags(select.children[0])).toEqual([true,false]);
|
|
136
|
+
expect(selectedFlags(select.children[1])).toEqual([false,true]);
|
|
137
|
+
|
|
138
|
+
wiki.addTiddler({title: "Picks", mylist: "2 4"});
|
|
139
|
+
refreshWidgetNode(widgetNode,wrapper,["Picks"]);
|
|
140
|
+
expect(selectedFlags(select.children[0])).toEqual([false,true]);
|
|
141
|
+
expect(selectedFlags(select.children[1])).toEqual([true,false]);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
});
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/*\
|
|
2
|
+
title: test-utils-copyObjectPropertiesSafe.js
|
|
3
|
+
type: application/javascript
|
|
4
|
+
tags: [[$:/tags/test-spec]]
|
|
5
|
+
|
|
6
|
+
Tests $tw.utils.copyObjectPropertiesSafe, the root cause of #9869.
|
|
7
|
+
|
|
8
|
+
$eventcatcher serialises DOM events via JSON.stringify(copyObjectPropertiesSafe(event)).
|
|
9
|
+
|
|
10
|
+
The original bug was caused by instanceof Node/Window being realm-specific.
|
|
11
|
+
When an event originated from a different browser window, DOM objects from that
|
|
12
|
+
window were not detected and JSON.stringify() could throw "Illegal invocation".
|
|
13
|
+
|
|
14
|
+
The implementation must:
|
|
15
|
+
- skip DOM nodes and Window objects from other realms
|
|
16
|
+
- preserve normal event data
|
|
17
|
+
- preserve CustomEvent.detail payloads
|
|
18
|
+
- continue copying enumerable properties from non-DOM objects
|
|
19
|
+
- preserve arrays and break circular references
|
|
20
|
+
|
|
21
|
+
The tests use substitutes for foreign DOM objects because headless Node does not
|
|
22
|
+
provide a second browser realm. These objects model the important characteristics:
|
|
23
|
+
DOM nodes have nodeType/nodeName, and Window objects have window/self/document.
|
|
24
|
+
\*/
|
|
25
|
+
|
|
26
|
+
"use strict";
|
|
27
|
+
|
|
28
|
+
describe("copyObjectPropertiesSafe (#9869)", function() {
|
|
29
|
+
|
|
30
|
+
var cops = $tw.utils.copyObjectPropertiesSafe;
|
|
31
|
+
|
|
32
|
+
// Simulates a DOM node from another realm.
|
|
33
|
+
// The important characteristics are:
|
|
34
|
+
// - nodeType/nodeName identify it as a DOM node
|
|
35
|
+
// - circular parentNode references resemble real DOM trees
|
|
36
|
+
function fakeElement(tagName,extra) {
|
|
37
|
+
var node = $tw.utils.extend({
|
|
38
|
+
nodeType: 1,
|
|
39
|
+
nodeName: tagName,
|
|
40
|
+
tagName: tagName
|
|
41
|
+
},extra || {});
|
|
42
|
+
|
|
43
|
+
node.parentNode = node;
|
|
44
|
+
return node;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Simulates a Window object from another realm.
|
|
48
|
+
function fakeWindow() {
|
|
49
|
+
var win = {
|
|
50
|
+
document: {},
|
|
51
|
+
location: {}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
win.window = win;
|
|
55
|
+
win.self = win;
|
|
56
|
+
|
|
57
|
+
return win;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// An event carrying foreign DOM nodes and a Window.
|
|
61
|
+
function fakeEvent(type,target,extra) {
|
|
62
|
+
return $tw.utils.extend({
|
|
63
|
+
type: type,
|
|
64
|
+
target: target,
|
|
65
|
+
currentTarget: target,
|
|
66
|
+
view: fakeWindow(),
|
|
67
|
+
detail: 0,
|
|
68
|
+
isTrusted: true
|
|
69
|
+
},extra || {});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
it("does not throw serialising any event type from a secondary window", function() {
|
|
74
|
+
var events = [
|
|
75
|
+
fakeEvent("focusin",fakeElement("INPUT")),
|
|
76
|
+
fakeEvent("change",fakeElement("SELECT")),
|
|
77
|
+
fakeEvent("click",fakeElement("BUTTON"),{
|
|
78
|
+
button: 0,
|
|
79
|
+
clientX: 5,
|
|
80
|
+
clientY: 9,
|
|
81
|
+
relatedTarget: null
|
|
82
|
+
}),
|
|
83
|
+
fakeEvent("mouseover",fakeElement("DIV"),{
|
|
84
|
+
relatedTarget: fakeElement("SPAN")
|
|
85
|
+
})
|
|
86
|
+
];
|
|
87
|
+
|
|
88
|
+
events.forEach(function(event) {
|
|
89
|
+
expect(function() {
|
|
90
|
+
JSON.stringify(cops(event));
|
|
91
|
+
}).not.toThrow();
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
it("drops DOM nodes and Window but keeps serialisable event data", function() {
|
|
97
|
+
var event = fakeEvent("click",fakeElement("BUTTON"),{
|
|
98
|
+
button: 0,
|
|
99
|
+
clientX: 5,
|
|
100
|
+
clientY: 9
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
var result = JSON.parse(JSON.stringify(cops(event)));
|
|
104
|
+
|
|
105
|
+
expect(result.target).toBeUndefined();
|
|
106
|
+
expect(result.currentTarget).toBeUndefined();
|
|
107
|
+
expect(result.view).toBeUndefined();
|
|
108
|
+
|
|
109
|
+
expect(result.type).toBe("click");
|
|
110
|
+
expect(result.detail).toBe(0);
|
|
111
|
+
expect(result.isTrusted).toBe(true);
|
|
112
|
+
expect(result.button).toBe(0);
|
|
113
|
+
expect(result.clientX).toBe(5);
|
|
114
|
+
expect(result.clientY).toBe(9);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
it("preserves nested objects, arrays and circular reference handling", function() {
|
|
119
|
+
var event = fakeEvent("custom",fakeElement("DIV"),{
|
|
120
|
+
detail: {
|
|
121
|
+
nested: {
|
|
122
|
+
a: 1,
|
|
123
|
+
b: [2,3]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
path: [
|
|
127
|
+
fakeElement("DIV"),
|
|
128
|
+
fakeWindow(),
|
|
129
|
+
42
|
|
130
|
+
]
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
event.self = event;
|
|
134
|
+
|
|
135
|
+
var result = JSON.parse(JSON.stringify(cops(event)));
|
|
136
|
+
|
|
137
|
+
expect(result.detail).toEqual({
|
|
138
|
+
nested: {
|
|
139
|
+
a: 1,
|
|
140
|
+
b: [2,3]
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
expect(result.path).toEqual([
|
|
145
|
+
null,
|
|
146
|
+
null,
|
|
147
|
+
42
|
|
148
|
+
]);
|
|
149
|
+
|
|
150
|
+
expect(result.self).toBeUndefined();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
it("preserves CustomEvent.detail objects including custom object instances", function() {
|
|
155
|
+
function DetailObject() {
|
|
156
|
+
this.name = "example";
|
|
157
|
+
this.values = [1,2,3];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
var event = fakeEvent("custom",fakeElement("DIV"),{
|
|
161
|
+
detail: new DetailObject()
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
var result = JSON.parse(JSON.stringify(cops(event)));
|
|
165
|
+
|
|
166
|
+
expect(result.detail).toEqual({
|
|
167
|
+
name: "example",
|
|
168
|
+
values: [1,2,3]
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
it("preserves CustomEvent.detail objects while dropping DOM objects inside them", function() {
|
|
174
|
+
var event = fakeEvent("custom",fakeElement("DIV"),{
|
|
175
|
+
detail: {
|
|
176
|
+
value: 123,
|
|
177
|
+
nested: {
|
|
178
|
+
target: fakeElement("SPAN"),
|
|
179
|
+
kept: "yes"
|
|
180
|
+
},
|
|
181
|
+
items: [
|
|
182
|
+
fakeElement("BUTTON"),
|
|
183
|
+
42
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
var result = JSON.parse(JSON.stringify(cops(event)));
|
|
189
|
+
|
|
190
|
+
expect(result.detail.value).toBe(123);
|
|
191
|
+
|
|
192
|
+
expect(result.detail.nested.target).toBeUndefined();
|
|
193
|
+
expect(result.detail.nested.kept).toBe("yes");
|
|
194
|
+
|
|
195
|
+
expect(result.detail.items).toEqual([
|
|
196
|
+
null,
|
|
197
|
+
42
|
|
198
|
+
]);
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
it("accepts primitive, array and object arguments", function() {
|
|
203
|
+
var nullProto = Object.create(null);
|
|
204
|
+
nullProto.kept = true;
|
|
205
|
+
|
|
206
|
+
expect(cops(42)).toBe(42);
|
|
207
|
+
expect(cops(null)).toBe(null);
|
|
208
|
+
|
|
209
|
+
expect(cops([
|
|
210
|
+
1,
|
|
211
|
+
"two",
|
|
212
|
+
{three: 3}
|
|
213
|
+
])).toEqual([
|
|
214
|
+
1,
|
|
215
|
+
"two",
|
|
216
|
+
{three: 3}
|
|
217
|
+
]);
|
|
218
|
+
|
|
219
|
+
expect(cops({
|
|
220
|
+
a: 1,
|
|
221
|
+
b: {
|
|
222
|
+
c: 2
|
|
223
|
+
}
|
|
224
|
+
})).toEqual({
|
|
225
|
+
a: 1,
|
|
226
|
+
b: {
|
|
227
|
+
c: 2
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
expect(JSON.parse(JSON.stringify(cops({
|
|
232
|
+
nullProto: nullProto
|
|
233
|
+
})))).toEqual({
|
|
234
|
+
nullProto: {
|
|
235
|
+
kept: true
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
});
|
|
File without changes
|
|
File without changes
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
created: 20231005205623086
|
|
2
|
-
modified:
|
|
2
|
+
modified: 20260710090951727
|
|
3
3
|
tags: About
|
|
4
4
|
title: TiddlyWiki Archive
|
|
5
|
+
type: text/vnd.tiddlywiki
|
|
5
6
|
|
|
6
7
|
\procedure versions()
|
|
7
8
|
5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9
|
|
8
9
|
5.1.10 5.1.11 5.1.12 5.1.13 5.1.14 5.1.15 5.1.16 5.1.17 5.1.18 5.1.19
|
|
9
10
|
5.1.20 5.1.21 5.1.22 5.1.23
|
|
10
11
|
5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7
|
|
11
|
-
5.3.0 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8
|
|
12
|
+
5.3.0 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8
|
|
13
|
+
5.4.0 5.4.1
|
|
12
14
|
\end
|
|
13
15
|
|
|
14
16
|
Older versions of TiddlyWiki are available in the [[archive|https://github.com/TiddlyWiki/tiddlywiki.com-gh-pages/tree/master/archive]]:
|