tiddlywiki 5.2.3 → 5.2.5
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 +11 -2
- package/bin/test.sh +1 -0
- package/boot/boot.js +9 -6
- package/core/images/layout-button.tid +4 -0
- package/core/images/mastodon.tid +6 -0
- package/core/language/en-GB/Buttons.multids +4 -0
- package/core/language/en-GB/ControlPanel.multids +3 -3
- package/core/language/en-GB/Fields.multids +2 -2
- package/core/language/en-GB/GettingStarted.tid +4 -3
- package/core/language/en-GB/Help/commands.tid +18 -0
- package/core/language/en-GB/Misc.multids +1 -0
- package/core/modules/commands/commands.js +42 -0
- package/core/modules/editor/engines/framed.js +12 -1
- package/core/modules/editor/factory.js +2 -2
- package/core/modules/filters/format/json.js +35 -0
- package/core/modules/filters/is/variable.js +2 -2
- package/core/modules/filters/json-ops.js +186 -0
- package/core/modules/filters/variables.js +9 -3
- package/core/modules/filters.js +15 -6
- package/core/modules/keyboard.js +13 -1
- package/core/modules/parsers/csvparser.js +25 -17
- package/core/modules/parsers/wikiparser/rules/macrodef.js +1 -1
- package/core/modules/parsers/wikiparser/rules/parsermode.js +68 -0
- package/core/modules/parsers/wikiparser/rules/styleinline.js +3 -3
- package/core/modules/parsers/wikiparser/wikiparser.js +4 -2
- package/core/modules/server/routes/put-tiddler.js +10 -0
- package/core/modules/startup/startup.js +5 -1
- package/core/modules/utils/csv.js +101 -23
- package/core/modules/utils/dom/dom.js +17 -2
- package/core/modules/utils/dom/modal.js +6 -0
- package/core/modules/utils/dom/popup.js +69 -6
- package/core/modules/utils/fakedom.js +2 -2
- package/core/modules/utils/linked-list.js +79 -75
- package/core/modules/utils/logger.js +3 -1
- package/core/modules/utils/parsetree.js +20 -10
- package/core/modules/utils/utils.js +3 -0
- package/core/modules/widgets/action-deletefield.js +2 -2
- package/core/modules/widgets/action-popup.js +10 -8
- package/core/modules/widgets/button.js +7 -2
- package/core/modules/widgets/checkbox.js +12 -5
- package/core/modules/widgets/error.js +63 -0
- package/core/modules/widgets/genesis.js +108 -0
- package/core/modules/widgets/importvariables.js +4 -1
- package/core/modules/widgets/keyboard.js +4 -0
- package/core/modules/widgets/let.js +3 -5
- package/core/modules/widgets/reveal.js +11 -10
- package/core/modules/widgets/select.js +9 -0
- package/core/modules/widgets/transclude.js +3 -5
- package/core/modules/widgets/widget.js +44 -18
- package/core/palettes/Blanca.tid +2 -0
- package/core/palettes/Blue.tid +2 -0
- package/core/palettes/BrightMute.tid +2 -0
- package/core/palettes/ContrastDark.tid +2 -0
- package/core/palettes/ContrastLight.tid +2 -0
- package/core/palettes/CupertinoDark.tid +2 -0
- package/core/palettes/DarkPhotos.tid +2 -0
- package/core/palettes/DesertSand.tid +2 -0
- package/core/palettes/GruvBoxDark.tid +2 -0
- package/core/palettes/Nord.tid +2 -0
- package/core/palettes/Rocker.tid +2 -0
- package/core/palettes/SolarFlare.tid +2 -0
- package/core/palettes/SolarizedDark.tid +2 -0
- package/core/palettes/SolarizedLight.tid +2 -0
- package/core/palettes/SpartanDay.tid +2 -0
- package/core/palettes/SpartanNight.tid +2 -0
- package/core/palettes/Twilight.tid +2 -0
- package/core/palettes/Vanilla.tid +2 -0
- package/core/templates/external-js/save-all-external-js.tid +4 -2
- package/core/templates/external-js/save-offline-external-js.tid +4 -2
- package/core/templates/single.tiddler.window.tid +1 -1
- package/core/ui/Actions/new-image.tid +1 -7
- package/core/ui/AdvancedSearch/FilterButtons/delete.tid +3 -3
- package/core/ui/AdvancedSearch/FilterButtons/dropdown.tid +2 -2
- package/core/ui/ControlPanel/Basics/retain-story-ordering-button.tid +3 -0
- package/core/ui/ControlPanel/Basics.tid +3 -2
- package/core/ui/EditTemplate/Preview/output.tid +1 -1
- package/core/ui/EditTemplate/body/default.tid +1 -1
- package/core/ui/EditTemplate/fields.tid +12 -2
- package/core/ui/EditTemplate.tid +7 -2
- package/core/ui/ImportListing.tid +5 -5
- package/core/ui/KeyboardShortcuts/advanced-search.tid +1 -1
- package/core/ui/PageControls/layout.tid +15 -0
- package/core/ui/PageTemplate.tid +1 -4
- package/core/ui/SideBar/More.tid +2 -2
- package/core/ui/SwitcherModal.tid +1 -0
- package/core/ui/TagManager.tid +75 -63
- package/core/ui/ViewTemplate/unfold.tid +6 -2
- package/core/ui/ViewTemplate.tid +1 -1
- package/core/wiki/config/DefaultTiddlersRetainStory.tid +3 -0
- package/core/wiki/config/OfficialPluginLibrary.tid +1 -1
- package/core/wiki/config/PageControlButtons.multids +1 -0
- package/core/wiki/macros/list.tid +7 -7
- package/core/wiki/macros/timeline.tid +6 -9
- package/core/wiki/macros/toc.tid +12 -8
- package/core/wiki/tags/PageControls.tid +1 -1
- package/editions/de-AT/tiddlywiki.info +0 -1
- package/editions/de-AT-server/tiddlywiki.info +0 -1
- package/editions/de-DE/tiddlywiki.info +0 -1
- package/editions/dev/tiddlers/HelloThere.tid +2 -1
- package/editions/dev/tiddlers/How to run a local plugin library for testing.tid +42 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Child widgets tutorial.tid +140 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Do nothing widget demo.tid +22 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Do nothing widget tutorial.tid +25 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Hello World demo.tid +23 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Hello World widget tutorial.tid +18 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Javascript Widget Tutorial.tid +37 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Undefined widget demo.tid +18 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Undefined widget tutorial.tid +11 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget attributes demo I.tid +48 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget attributes demo II.tid +48 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget attributes tutorial part I.tid +50 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget attributes tutorial part II.tid +33 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh demo I.tid +44 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh demo II.tid +40 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh demo III.tid +50 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh tutorial part I.tid +47 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh tutorial part II.tid +37 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/Widget refresh tutorial part III.tid +26 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/domwidget.js +47 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/domwidget.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/donothing.js +16 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/donothing.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute-optimized.js +51 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute-optimized.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute.js +47 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello-attribute.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello.js +35 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/hello.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/refreshcount.js +43 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/refreshcount.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield-norefresh.js +36 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield-norefresh.js.meta +6 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield.js +46 -0
- package/editions/dev/tiddlers/javascript-widget-tutorial/tiddlerfield.js.meta +6 -0
- package/editions/dev/tiddlywiki.info +2 -1
- package/editions/es-ES/tiddlers/GettingStarted_-_Chrome.tid +1 -1
- package/editions/es-ES/tiddlers/Saving_with_the_HTML5_fallback_saver.tid +1 -27
- package/editions/es-ES/tiddlers/Saving_with_the_HTML5_saver.tid +35 -0
- package/editions/fr-FR/tiddlers/$__editions_tw5.com_doc-macros.tid +1 -1
- package/editions/fr-FR/tiddlers/GettingStarted - Chrome.tid +1 -1
- package/editions/fr-FR/tiddlers/Saving with the HTML5 saver.tid +23 -0
- package/editions/fr-FR/tiddlers/saving/Saving with the HTML5 fallback saver.tid +1 -22
- package/editions/fr-FR/tiddlers/system/$__core_macros_list.tid +113 -0
- package/editions/fr-FR/tiddlers/system/$__core_macros_tag.tid +39 -0
- package/editions/fr-FR/tiddlers/system/$__core_ui_TagPickerTagTemplate.tid +25 -0
- package/editions/full/tiddlywiki.info +0 -1
- package/editions/introduction/tiddlywiki.info +0 -1
- package/editions/pluginlibrary/tiddlers/GettingStarted.tid +45 -0
- package/editions/pluginlibrary/tiddlers/PrereleaseLocalPluginLibrary.tid +6 -0
- package/editions/pluginlibrary/tiddlers/meta/SiteSubtitle.tid +3 -0
- package/editions/pluginlibrary/tiddlers/meta/SiteTitle.tid +3 -0
- package/editions/pluginlibrary/tiddlers/system/$__themes_tiddlywiki_vanilla_options_sidebarlayout.tid +3 -0
- package/editions/pluginlibrary/tiddlywiki.info +7 -0
- package/editions/prerelease/tiddlers/Release 5.2.6.tid +107 -0
- package/editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid +1 -1
- package/editions/prerelease/tiddlers/system/TiddlyWiki Pre-release.tid +5 -1
- package/editions/test/tiddlers/tests/data/csv-cases.tid +282 -0
- package/editions/test/tiddlers/tests/data/filters/Recursion.tid +15 -0
- package/editions/test/tiddlers/tests/data/filters/fake-variables.tid +27 -0
- package/editions/test/tiddlers/tests/data/genesis-widget/DollarSigns.tid +14 -0
- package/editions/test/tiddlers/tests/data/genesis-widget/MultipleAttributes.tid +14 -0
- package/editions/test/tiddlers/tests/data/genesis-widget/Simple.tid +14 -0
- package/editions/test/tiddlers/tests/data/macros/NestedMacros.tid +36 -0
- package/editions/test/tiddlers/tests/data/pragmas/Parsermode.tid +36 -0
- package/editions/test/tiddlers/tests/data/transclude/Recursion.tid +13 -0
- package/editions/test/tiddlers/tests/modules/utils/test-csv.js +33 -0
- package/editions/test/tiddlers/tests/test-checkbox-widget.js +35 -1
- package/editions/test/tiddlers/tests/test-json-filters.js +112 -0
- package/editions/test/tiddlers/tests/test-linked-list.js +42 -2
- package/editions/test/tiddlers/tests/test-popup.js +63 -0
- package/editions/test/tiddlers/tests/test-utils.js +1 -0
- package/editions/test/tiddlers/tests/test-wikitext.js +16 -0
- package/editions/test/tiddlywiki.info +2 -1
- package/editions/translators/tiddlers/system/PageControlButtonsVisibility.multids +1 -0
- package/editions/translators/tiddlywiki.info +0 -1
- package/editions/tw.org/tiddlers/Code of Conduct.tid +4 -1
- package/editions/tw.org/tiddlers/Fundraising.tid +2 -2
- package/editions/tw5.com/tiddlers/Tables in WikiText CSS Utility Classes.tid +81 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/markplace.png +0 -0
- package/editions/tw5.com/tiddlers/_tw_shared/favicons/markplace.png.meta +3 -0
- package/editions/tw5.com/tiddlers/_tw_shared/sites/marketplace.tid +6 -0
- package/editions/tw5.com/tiddlers/_tw_shared/tags-TiddlyWikiSites.tid +1 -1
- package/editions/tw5.com/tiddlers/about/Funding TiddlyWiki.tid +19 -0
- package/editions/tw5.com/tiddlers/about/Open Collective.tid +14 -0
- package/editions/tw5.com/tiddlers/commands/CommandsCommand.tid +8 -0
- package/editions/tw5.com/tiddlers/commands/RenderTiddlerCommand.tid +2 -0
- package/editions/tw5.com/tiddlers/commands/RenderTiddlersCommand.tid +2 -0
- package/editions/tw5.com/tiddlers/commands/SaveTiddlerCommand.tid +2 -0
- package/editions/tw5.com/tiddlers/commands/SaveTiddlersCommand.tid +2 -0
- package/editions/tw5.com/tiddlers/community/plugins/GSD5.tid +2 -2
- package/editions/tw5.com/tiddlers/community/plugins/_JD Mobile Layout plugin_ by JD.tid +0 -1
- package/editions/tw5.com/tiddlers/community/resources/RegExp in Tiddlywiki by Mohammad.tid +1 -1
- package/editions/tw5.com/tiddlers/community/resources/_Dropboard_ by Reid Gould.tid +0 -1
- package/editions/tw5.com/tiddlers/community/resources/_Hacks_ by Thomas Elmiger.tid +0 -2
- package/editions/tw5.com/tiddlers/community/resources/_MathCell_ by Ste Wilson.tid +0 -1
- package/editions/tw5.com/tiddlers/community/resources/_TiddlyServer_ by Matt Lauber.tid +0 -1
- package/editions/tw5.com/tiddlers/community/resources/_X3DOM for TiddlyWiki 5_ by Jamal Wills.tid +0 -1
- package/editions/tw5.com/tiddlers/community/resources/_file-backups_ Extension Firefox by pmario.tid +1 -1
- package/editions/tw5.com/tiddlers/community/resources/_savetiddlers_ Extension for Chrome and Firefox by buggyj.tid +1 -1
- package/editions/tw5.com/tiddlers/concepts/CoordinateSystems.tid +42 -0
- package/editions/tw5.com/tiddlers/concepts/KeyboardShortcutTiddler.tid +2 -0
- package/editions/tw5.com/tiddlers/definitions/Federatial.tid +13 -1
- package/editions/tw5.com/tiddlers/definitions/HTML Block Elements.tid +9 -0
- package/editions/tw5.com/tiddlers/definitions/TiddlyWikiClassic.tid +3 -1
- package/editions/tw5.com/tiddlers/demonstrations/TableOfContentsMacro Selective Expandable Example custom icons.tid +16 -0
- package/editions/tw5.com/tiddlers/demonstrations/Tasks/TaskManagementExampleDraggable.tid +1 -1
- package/editions/tw5.com/tiddlers/features/DateFormat.tid +27 -3
- package/editions/tw5.com/tiddlers/features/JSON in TiddlyWiki.tid +1 -1
- package/editions/tw5.com/tiddlers/features/Modals.tid +3 -0
- package/editions/tw5.com/tiddlers/filters/examples/format Operator (Examples).tid +5 -2
- package/editions/tw5.com/tiddlers/filters/format.tid +5 -4
- package/editions/tw5.com/tiddlers/filters/jsonextract.tid +66 -0
- package/editions/tw5.com/tiddlers/filters/jsonget.tid +93 -0
- package/editions/tw5.com/tiddlers/filters/jsonindexes.tid +65 -0
- package/editions/tw5.com/tiddlers/filters/jsontype.tid +74 -0
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted - Chrome.tid +2 -2
- package/editions/tw5.com/tiddlers/gettingstarted/GettingStarted.tid +3 -7
- package/editions/tw5.com/tiddlers/hellothere/HelloThere.tid +23 -22
- package/editions/tw5.com/tiddlers/hellothere/HelloThumbnail.tid +1 -1
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Funding.tid +10 -0
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Grok TiddlyWiki.tid +2 -0
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Introduction Video.tid +2 -0
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Latest Version.tid +9 -1
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Marketplace.tid +10 -0
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - TiddlyWikiLinks.tid +3 -1
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail_-_Federatial.tid +11 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting Default Story Ordering.tid +4 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting Sync System Tiddlers From Server.tid +13 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting SyncLogging.tid +13 -0
- package/editions/tw5.com/tiddlers/hiddensettings/Hidden Setting_ More Tabs Horizontal.tid +7 -0
- package/editions/tw5.com/tiddlers/howtos/How to create keyboard shortcuts.tid +2 -0
- package/editions/tw5.com/tiddlers/howtos/Reading data from JSON tiddlers.tid +10 -1
- package/editions/tw5.com/tiddlers/images/Federatial.png +0 -0
- package/editions/tw5.com/tiddlers/images/Federatial.png.meta +3 -0
- package/editions/tw5.com/tiddlers/images/Funding.png +0 -0
- package/editions/tw5.com/tiddlers/images/{TiddlyMap.png.meta → Funding.png.meta} +1 -1
- package/editions/tw5.com/tiddlers/images/Marketplace Banner.png +0 -0
- package/editions/tw5.com/tiddlers/images/Marketplace Banner.png.meta +3 -0
- package/editions/tw5.com/tiddlers/images/New Release Banner.png +0 -0
- package/editions/tw5.com/tiddlers/macros/ListMacro.tid +3 -1
- package/editions/tw5.com/tiddlers/macros/TableOfContentsMacro.tid +36 -2
- package/editions/tw5.com/tiddlers/marketplace/TiddlyWiki Marketplace.tid +18 -0
- package/editions/tw5.com/tiddlers/mechanisms/PopupMechanism.tid +1 -0
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-modal.tid +4 -2
- package/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-new-tiddler.tid +1 -1
- package/editions/tw5.com/tiddlers/nodejs/Installing TiddlyWiki on Node.js.tid +2 -2
- package/editions/tw5.com/tiddlers/pragmas/Pragma_ _parsermode.tid +17 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.4.tid +144 -0
- package/editions/tw5.com/tiddlers/releasenotes/Release 5.2.5.tid +25 -0
- package/editions/tw5.com/tiddlers/releasenotes/Releases.tid +1 -1
- package/editions/tw5.com/tiddlers/saving/Emergency Tiddler Export.tid +1 -1
- package/editions/tw5.com/tiddlers/saving/Saving on TiddlyHost.tid +1 -1
- package/editions/tw5.com/tiddlers/saving/Saving on TiddlySpot.tid +0 -1
- package/editions/tw5.com/tiddlers/saving/Saving with Polly.tid +1 -0
- package/editions/tw5.com/tiddlers/saving/Saving with the HTML5 fallback saver.tid +3 -23
- package/editions/tw5.com/tiddlers/saving/Saving with the HTML5 saver.tid +27 -0
- package/editions/tw5.com/tiddlers/saving/Saving.tid +12 -5
- package/editions/tw5.com/tiddlers/saving/TiddlyBucket - Save to AWS or Google Storage.tid +15 -0
- package/editions/tw5.com/tiddlers/system/doc-macros.tid +1 -1
- package/editions/tw5.com/tiddlers/system/tw5.com-card-template.tid +1 -16
- package/editions/tw5.com/tiddlers/system/tw5.com-styles.tid +168 -40
- package/editions/tw5.com/tiddlers/system/version-macros.tid +3 -4
- package/editions/tw5.com/tiddlers/system/wikitext-macros.tid +43 -15
- package/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ClassFilters_PageTemplate.tid +9 -0
- package/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ClassFilters_TiddlerTemplate.tid +9 -0
- package/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_Filter.tid +2 -2
- package/editions/tw5.com/tiddlers/testimonials/Testimonials - Joe Armstrong.tid +8 -0
- package/editions/tw5.com/tiddlers/testimonials/Testimonials - Network World.tid +8 -0
- package/editions/tw5.com/tiddlers/testimonials/Testimonials - Product Hunt.tid +6 -0
- package/editions/tw5.com/tiddlers/webserver/Using the external JavaScript template.tid +10 -10
- package/editions/tw5.com/tiddlers/webserver/WebServer API_ Get All Tiddlers.tid +3 -1
- package/editions/tw5.com/tiddlers/widgets/ActionPopupWidget.tid +4 -3
- package/editions/tw5.com/tiddlers/widgets/ButtonWidget.tid +2 -1
- package/editions/tw5.com/tiddlers/widgets/DraggableWidget.tid +2 -1
- package/editions/tw5.com/tiddlers/widgets/ErrorWidget.tid +17 -0
- package/editions/tw5.com/tiddlers/widgets/EventCatcherWidget.tid +4 -3
- package/editions/tw5.com/tiddlers/widgets/GenesisWidget.tid +41 -0
- package/editions/tw5.com/tiddlers/widgets/LetWidget.tid +4 -1
- package/editions/tw5.com/tiddlers/widgets/ScrollableWidget.tid +1 -1
- package/editions/tw5.com/tiddlers/widgets/SelectWidget.tid +1 -0
- package/editions/tw5.com/tiddlers/wikitext/Macro Definitions in WikiText.tid +27 -4
- package/editions/tw5.com/tiddlers/wikitext/Styles and Classes in WikiText.tid +1 -1
- package/editions/tw5.com/tiddlers/wikitext/Table Classes Captions Headers and Footers.tid +20 -0
- package/editions/tw5.com/tiddlers/wikitext/Tables in WikiText.tid +3 -13
- package/editions/tw5.com/tiddlers/wikitext/Utility Classes.tid +20 -0
- package/editions/tw5.com/tiddlers/wikitext/parser/WikiText Parser Modes.tid +1 -1
- package/editions/twitter-archivist/tiddlers/DefaultTiddlers.tid +4 -0
- package/editions/twitter-archivist/tiddlers/HelloThere.tid +9 -0
- package/editions/twitter-archivist/tiddlers/SiteSubtitle.tid +3 -0
- package/editions/twitter-archivist/tiddlers/SiteTitle.tid +3 -0
- package/editions/twitter-archivist/tiddlywiki.info +16 -0
- package/languages/ar-PS/ControlPanel.multids +1 -1
- package/languages/ca-ES/ControlPanel.multids +1 -1
- package/languages/cs-CZ/ControlPanel.multids +1 -1
- package/languages/da-DK/ControlPanel.multids +1 -1
- package/languages/de-DE/Buttons.multids +5 -1
- package/languages/de-DE/ControlPanel.multids +1 -1
- package/languages/de-DE/Help/commands.tid +14 -0
- package/languages/de-DE/Misc.multids +1 -0
- package/languages/el-GR/ControlPanel.multids +1 -1
- package/languages/es-ES/Buttons.multids +91 -87
- package/languages/es-ES/ControlPanel.multids +19 -2
- package/languages/es-ES/Docs/PaletteColours.multids +2 -2
- package/languages/es-ES/EditTemplate.multids +3 -0
- package/languages/es-ES/Fields.multids +6 -5
- package/languages/es-ES/GettingStarted.tid +4 -3
- package/languages/es-ES/Help/commands.tid +18 -0
- package/languages/es-ES/Help/default.tid +4 -1
- package/languages/es-ES/Help/listen.tid +0 -1
- package/languages/es-ES/Help/render.tid +2 -2
- package/languages/es-ES/Import.multids +1 -1
- package/languages/es-ES/Misc.multids +2 -1
- package/languages/es-ES/SideBar.multids +1 -0
- package/languages/es-ES/Snippets/ListByTag.tid +1 -1
- package/languages/fa-IR/ControlPanel.multids +1 -1
- package/languages/fr-FR/Buttons.multids +2 -0
- package/languages/fr-FR/ControlPanel.multids +4 -4
- package/languages/fr-FR/Misc.multids +3 -2
- package/languages/hi-IN/ControlPanel.multids +1 -1
- package/languages/ia-IA/ControlPanel.multids +1 -1
- package/languages/it-IT/ControlPanel.multids +1 -1
- package/languages/ja-JP/ControlPanel.multids +9 -9
- package/languages/ko-KR/ControlPanel.multids +1 -1
- package/languages/nl-NL/ControlPanel.multids +1 -1
- package/languages/pl-PL/Buttons.multids +7 -3
- package/languages/pl-PL/ControlPanel.multids +26 -24
- package/languages/pl-PL/GettingStarted.tid +4 -3
- package/languages/pl-PL/Help/commands.tid +18 -0
- package/languages/pl-PL/Help/render.tid +2 -2
- package/languages/pl-PL/Misc.multids +1 -0
- package/languages/pl-PL/ThemeTweaks.multids +3 -3
- package/languages/pt-BR/ControlPanel.multids +1 -1
- package/languages/pt-PT/ControlPanel.multids +1 -1
- package/languages/ru-RU/ControlPanel.multids +1 -1
- package/languages/sk-SK/ControlPanel.multids +1 -1
- package/languages/sl-SI/ControlPanel.multids +1 -1
- package/languages/sv-SE/ControlPanel.multids +1 -1
- package/languages/zh-Hans/Buttons.multids +36 -32
- package/languages/zh-Hans/ControlPanel.multids +19 -19
- package/languages/zh-Hans/CoreReadMe.tid +1 -1
- package/languages/zh-Hans/Docs/ModuleTypes.multids +2 -2
- package/languages/zh-Hans/Docs/PaletteColours.multids +8 -8
- package/languages/zh-Hans/Fields.multids +7 -7
- package/languages/zh-Hans/Filters.multids +1 -1
- package/languages/zh-Hans/GettingStarted.tid +8 -6
- package/languages/zh-Hans/Help/commands.tid +18 -0
- package/languages/zh-Hans/Help/fetch.tid +6 -6
- package/languages/zh-Hans/Help/init.tid +1 -1
- package/languages/zh-Hans/Help/listen.tid +5 -5
- package/languages/zh-Hans/Help/makelibrary.tid +1 -1
- package/languages/zh-Hans/Help/savetiddlers.tid +1 -1
- package/languages/zh-Hans/Help/server.tid +6 -6
- package/languages/zh-Hans/Help/setfield.tid +3 -3
- package/languages/zh-Hans/Import.multids +1 -1
- package/languages/zh-Hans/Misc.multids +12 -11
- package/languages/zh-Hans/Search.multids +6 -6
- package/languages/zh-Hans/SiteSubtitle.tid +1 -1
- package/languages/zh-Hans/Snippets/ListByTag.tid +1 -1
- package/languages/zh-Hans/ThemeTweaks.multids +7 -7
- package/languages/zh-Hans/TiddlerInfo.multids +2 -2
- package/languages/zh-Hant/Buttons.multids +4 -0
- package/languages/zh-Hant/ControlPanel.multids +2 -2
- package/languages/zh-Hant/Fields.multids +2 -2
- package/languages/zh-Hant/GettingStarted.tid +4 -3
- package/languages/zh-Hant/Help/commands.tid +18 -0
- package/languages/zh-Hant/Misc.multids +1 -0
- package/licenses/cla-individual.md +6 -0
- package/package.json +1 -1
- package/plugins/tiddlywiki/bibtex/deserializer.js +2 -2
- package/plugins/tiddlywiki/codemirror/engine.js +4 -0
- package/plugins/tiddlywiki/dynannotate/docs/readme.tid +2 -2
- package/plugins/tiddlywiki/dynannotate/modules/dynannotate.js +4 -2
- package/plugins/tiddlywiki/help/tabs/Support.tid +6 -2
- package/plugins/tiddlywiki/jasmine/command.js +33 -0
- package/plugins/tiddlywiki/jasmine/help.tid +24 -0
- package/plugins/tiddlywiki/jasmine/jasmine-plugin.js +24 -18
- package/plugins/tiddlywiki/jasmine/readme.tid +31 -1
- package/plugins/tiddlywiki/jasmine/run-wiki-based-tests.js +93 -0
- package/plugins/tiddlywiki/jasmine/startup.js +37 -0
- package/plugins/tiddlywiki/translators/macros/translatableStringEditor.tid +6 -0
- package/plugins/tiddlywiki/translators/system/styles.tid +5 -0
- package/plugins/tiddlywiki/twitter-archivist/Twitter Archives.tid +5 -0
- package/plugins/tiddlywiki/twitter-archivist/archivist.js +319 -0
- package/plugins/tiddlywiki/twitter-archivist/configTiddlerInfoMode.tid +2 -0
- package/plugins/tiddlywiki/twitter-archivist/loadtwitterarchive.js +53 -0
- package/plugins/tiddlywiki/twitter-archivist/macros.tid +222 -0
- package/plugins/tiddlywiki/twitter-archivist/plugin.info +6 -0
- package/plugins/tiddlywiki/twitter-archivist/readme.tid +33 -0
- package/plugins/tiddlywiki/twitter-archivist/spec.tid +62 -0
- package/plugins/tiddlywiki/twitter-archivist/startup.js +38 -0
- package/plugins/tiddlywiki/twitter-archivist/styles.tid +47 -0
- package/plugins/tiddlywiki/twitter-archivist/template-archive.tid +3 -0
- package/plugins/tiddlywiki/twitter-archivist/template-hashtag.tid +3 -0
- package/plugins/tiddlywiki/twitter-archivist/template-tweet.tid +3 -0
- package/plugins/tiddlywiki/twitter-archivist/template-tweeter.tid +3 -0
- package/plugins/tiddlywiki/twitter-archivist/todo.tid +15 -0
- package/plugins/tiddlywiki/twitter-archivist/usage.tid +18 -0
- package/plugins/tiddlywiki/twitter-archivist/view-template-body-cascade.tid +8 -0
- package/plugins/tiddlywiki/upgrade/UpgradeWizard.tid +3 -3
- package/readme.md +1 -1
- package/themes/tiddlywiki/vanilla/base.tid +114 -9
- package/editions/fr-FR/tiddlers/$__core_ui_TagTemplate.tid +0 -33
- package/editions/prerelease/tiddlers/Release 5.2.4.tid +0 -59
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Classic.tid +0 -6
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Developers.tid +0 -7
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - Gentle Guide.tid +0 -11
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - HelpingTiddlyWiki.tid +0 -7
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - TWEUM2017.tid +0 -8
- package/editions/tw5.com/tiddlers/hellothere/thumbnails/HelloThumbnail - TiddlyMap.tid +0 -6
- package/editions/tw5.com/tiddlers/images/Dev Thumbnail.jpg +0 -0
- package/editions/tw5.com/tiddlers/images/Dev Thumbnail.jpg.meta +0 -3
- package/editions/tw5.com/tiddlers/images/TiddlyMap.png +0 -0
@@ -15,10 +15,11 @@ function LinkedList() {
|
|
15
15
|
|
16
16
|
LinkedList.prototype.clear = function() {
|
17
17
|
// LinkedList performs the duty of both the head and tail node
|
18
|
-
this.next =
|
19
|
-
this.prev =
|
20
|
-
|
21
|
-
this.
|
18
|
+
this.next = new LLMap();
|
19
|
+
this.prev = new LLMap();
|
20
|
+
// Linked list head initially points to itself
|
21
|
+
this.next.set(null, null);
|
22
|
+
this.prev.set(null, null);
|
22
23
|
this.length = 0;
|
23
24
|
};
|
24
25
|
|
@@ -41,28 +42,29 @@ Push behaves like array.push and accepts multiple string arguments. But it also
|
|
41
42
|
accepts a single array argument too, to be consistent with its other methods.
|
42
43
|
*/
|
43
44
|
LinkedList.prototype.push = function(/* values */) {
|
44
|
-
var values = arguments;
|
45
|
+
var i, values = arguments;
|
45
46
|
if($tw.utils.isArray(values[0])) {
|
46
47
|
values = values[0];
|
47
48
|
}
|
48
|
-
for(
|
49
|
+
for(i = 0; i < values.length; i++) {
|
49
50
|
_assertString(values[i]);
|
50
51
|
}
|
51
|
-
for(
|
52
|
+
for(i = 0; i < values.length; i++) {
|
52
53
|
_linkToEnd(this,values[i]);
|
53
54
|
}
|
54
55
|
return this.length;
|
55
56
|
};
|
56
57
|
|
57
58
|
LinkedList.prototype.pushTop = function(value) {
|
59
|
+
var t;
|
58
60
|
if($tw.utils.isArray(value)) {
|
59
|
-
for (
|
61
|
+
for (t=0; t<value.length; t++) {
|
60
62
|
_assertString(value[t]);
|
61
63
|
}
|
62
|
-
for(
|
64
|
+
for(t=0; t<value.length; t++) {
|
63
65
|
_removeOne(this,value[t]);
|
64
66
|
}
|
65
|
-
for(
|
67
|
+
for(t=0; t<value.length; t++) {
|
66
68
|
_linkToEnd(this,value[t]);
|
67
69
|
}
|
68
70
|
} else {
|
@@ -74,11 +76,11 @@ LinkedList.prototype.pushTop = function(value) {
|
|
74
76
|
|
75
77
|
LinkedList.prototype.each = function(callback) {
|
76
78
|
var visits = Object.create(null),
|
77
|
-
value = this.
|
78
|
-
while(value !==
|
79
|
+
value = this.next.get(null);
|
80
|
+
while(value !== null) {
|
79
81
|
callback(value);
|
80
|
-
var next = this.next
|
81
|
-
if(
|
82
|
+
var next = this.next.get(value);
|
83
|
+
if(Array.isArray(next)) {
|
82
84
|
var i = visits[value] || 0;
|
83
85
|
visits[value] = i+1;
|
84
86
|
value = next[i];
|
@@ -105,91 +107,79 @@ LinkedList.prototype.makeTiddlerIterator = function(wiki) {
|
|
105
107
|
};
|
106
108
|
|
107
109
|
function _removeOne(list,value) {
|
108
|
-
var
|
109
|
-
|
110
|
+
var nextEntry = list.next.get(value);
|
111
|
+
if(nextEntry === undefined) {
|
112
|
+
return;
|
113
|
+
}
|
114
|
+
var prevEntry = list.prev.get(value),
|
110
115
|
prev = prevEntry,
|
111
|
-
next = nextEntry
|
112
|
-
|
116
|
+
next = nextEntry,
|
117
|
+
ref;
|
118
|
+
if(Array.isArray(nextEntry)) {
|
113
119
|
next = nextEntry[0];
|
114
120
|
prev = prevEntry[0];
|
115
121
|
}
|
116
122
|
// Relink preceding element.
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
if(next === undefined) {
|
122
|
-
// Must have been last, and 'i' would be last element.
|
123
|
-
list.next[prev].pop();
|
124
|
-
} else {
|
125
|
-
var i = list.next[prev].indexOf(value);
|
126
|
-
list.next[prev][i] = next;
|
127
|
-
}
|
128
|
-
} else {
|
129
|
-
list.next[prev] = next;
|
130
|
-
}
|
123
|
+
ref = list.next.get(prev);
|
124
|
+
if(Array.isArray(ref)) {
|
125
|
+
var i = ref.indexOf(value);
|
126
|
+
ref[i] = next;
|
131
127
|
} else {
|
132
|
-
|
128
|
+
list.next.set(prev,next);
|
133
129
|
}
|
130
|
+
|
134
131
|
// Now relink following element
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
if(prev === undefined) {
|
140
|
-
// Must have been first, and 'i' would be 0.
|
141
|
-
list.prev[next].shift();
|
142
|
-
} else {
|
143
|
-
var i = list.prev[next].indexOf(value);
|
144
|
-
list.prev[next][i] = prev;
|
145
|
-
}
|
146
|
-
} else {
|
147
|
-
list.prev[next] = prev;
|
148
|
-
}
|
132
|
+
ref = list.prev.get(next);
|
133
|
+
if(Array.isArray(ref)) {
|
134
|
+
var i = ref.indexOf(value);
|
135
|
+
ref[i] = prev;
|
149
136
|
} else {
|
150
|
-
list.
|
137
|
+
list.prev.set(next,prev);
|
151
138
|
}
|
139
|
+
|
152
140
|
// Delink actual value. If it uses arrays, just remove first entries.
|
153
|
-
if(
|
141
|
+
if(Array.isArray(nextEntry) && nextEntry.length > 1) {
|
154
142
|
nextEntry.shift();
|
155
143
|
prevEntry.shift();
|
156
144
|
} else {
|
157
|
-
list.next
|
158
|
-
list.prev
|
145
|
+
list.next.set(value,undefined);
|
146
|
+
list.prev.set(value,undefined);
|
159
147
|
}
|
160
148
|
list.length -= 1;
|
161
149
|
};
|
162
150
|
|
163
151
|
// Sticks the given node onto the end of the list.
|
164
152
|
function _linkToEnd(list,value) {
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
if(
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
} else if(typeof list.next[value] === "undefined") {
|
174
|
-
// list.next[value] must be undefined.
|
175
|
-
// Special case. List already has 1 value. It's at the end.
|
176
|
-
list.next[value] = [];
|
177
|
-
list.prev[value] = [list.prev[value]];
|
178
|
-
}
|
179
|
-
list.prev[value].push(list.last);
|
180
|
-
// We do NOT append a new value onto "next" list. Iteration will
|
181
|
-
// figure out it must point to End-of-List on its own.
|
182
|
-
} else {
|
183
|
-
list.prev[value] = list.last;
|
153
|
+
var old = list.next.get(value);
|
154
|
+
var last = list.prev.get(null);
|
155
|
+
// Does it already exists?
|
156
|
+
if(old !== undefined) {
|
157
|
+
if(!Array.isArray(old)) {
|
158
|
+
old = [old];
|
159
|
+
list.next.set(value,old);
|
160
|
+
list.prev.set(value,[list.prev.get(value)]);
|
184
161
|
}
|
185
|
-
|
186
|
-
|
187
|
-
|
162
|
+
old.push(null);
|
163
|
+
list.prev.get(value).push(last);
|
164
|
+
} else {
|
165
|
+
list.next.set(value,null);
|
166
|
+
list.prev.set(value,last);
|
167
|
+
}
|
168
|
+
// Make the old last point to this new one.
|
169
|
+
if(value !== last) {
|
170
|
+
var array = list.next.get(last);
|
171
|
+
if(Array.isArray(array)) {
|
172
|
+
array[array.length-1] = value;
|
188
173
|
} else {
|
189
|
-
list.next
|
174
|
+
list.next.set(last,value);
|
190
175
|
}
|
176
|
+
list.prev.set(null,value);
|
177
|
+
} else {
|
178
|
+
// Edge case, the pushed value was already the last value.
|
179
|
+
// The second-to-last nextPtr for that value must point to itself now.
|
180
|
+
var array = list.next.get(last);
|
181
|
+
array[array.length-2] = value;
|
191
182
|
}
|
192
|
-
list.last = value;
|
193
183
|
list.length += 1;
|
194
184
|
};
|
195
185
|
|
@@ -199,6 +189,20 @@ function _assertString(value) {
|
|
199
189
|
}
|
200
190
|
};
|
201
191
|
|
192
|
+
var LLMap = function() {
|
193
|
+
this.map = Object.create(null);
|
194
|
+
};
|
195
|
+
|
196
|
+
// Just a wrapper so our object map can also accept null.
|
197
|
+
LLMap.prototype = {
|
198
|
+
set: function(key,val) {
|
199
|
+
(key === null) ? (this.null = val) : (this.map[key] = val);
|
200
|
+
},
|
201
|
+
get: function(key) {
|
202
|
+
return (key === null) ? this.null : this.map[key];
|
203
|
+
}
|
204
|
+
};
|
205
|
+
|
202
206
|
exports.LinkedList = LinkedList;
|
203
207
|
|
204
208
|
})();
|
@@ -48,7 +48,9 @@ Logger.prototype.log = function(/* args */) {
|
|
48
48
|
this.saveBufferLogger.buffer = this.saveBufferLogger.buffer.slice(-this.saveBufferLogger.saveLimit);
|
49
49
|
}
|
50
50
|
if(console !== undefined && console.log !== undefined) {
|
51
|
-
|
51
|
+
var logMessage = [$tw.utils.terminalColour(this.colour) + this.componentName + ":"].concat(Array.prototype.slice.call(arguments,0));
|
52
|
+
logMessage[logMessage.length-1] += $tw.utils.terminalColour();
|
53
|
+
return Function.apply.call(console.log, console, logMessage);
|
52
54
|
}
|
53
55
|
}
|
54
56
|
};
|
@@ -12,12 +12,26 @@ Parse tree utility functions.
|
|
12
12
|
/*global $tw: false */
|
13
13
|
"use strict";
|
14
14
|
|
15
|
+
/*
|
16
|
+
Add attribute to parse tree node
|
17
|
+
Can be invoked as (node,name,value) or (node,attr)
|
18
|
+
*/
|
15
19
|
exports.addAttributeToParseTreeNode = function(node,name,value) {
|
16
|
-
var attribute = {name: name, type: "string", value: value};
|
20
|
+
var attribute = typeof name === "object" ? name : {name: name, type: "string", value: value};
|
21
|
+
name = attribute.name;
|
17
22
|
node.attributes = node.attributes || {};
|
23
|
+
node.orderedAttributes = node.orderedAttributes || [];
|
18
24
|
node.attributes[name] = attribute;
|
19
|
-
|
25
|
+
var foundIndex = -1;
|
26
|
+
$tw.utils.each(node.orderedAttributes,function(attr,index) {
|
27
|
+
if(attr.name === name) {
|
28
|
+
foundIndex = index;
|
29
|
+
}
|
30
|
+
});
|
31
|
+
if(foundIndex === -1) {
|
20
32
|
node.orderedAttributes.push(attribute);
|
33
|
+
} else {
|
34
|
+
node.orderedAttributes[foundIndex] = attribute;
|
21
35
|
}
|
22
36
|
};
|
23
37
|
|
@@ -51,10 +65,8 @@ exports.addClassToParseTreeNode = function(node,classString) {
|
|
51
65
|
// If the class attribute does not exist, we must create it first.
|
52
66
|
attribute = {name: "class", type: "string", value: ""};
|
53
67
|
node.attributes["class"] = attribute;
|
54
|
-
|
55
|
-
|
56
|
-
node.orderedAttributes.push(attribute);
|
57
|
-
}
|
68
|
+
node.orderedAttributes = node.orderedAttributes || [];
|
69
|
+
node.orderedAttributes.push(attribute);
|
58
70
|
}
|
59
71
|
if(attribute.type === "string") {
|
60
72
|
if(attribute.value !== "") {
|
@@ -74,10 +86,8 @@ exports.addStyleToParseTreeNode = function(node,name,value) {
|
|
74
86
|
if(!attribute) {
|
75
87
|
attribute = {name: "style", type: "string", value: ""};
|
76
88
|
node.attributes.style = attribute;
|
77
|
-
|
78
|
-
|
79
|
-
node.orderedAttributes.push(attribute);
|
80
|
-
}
|
89
|
+
node.orderedAttributes = node.orderedAttributes || [];
|
90
|
+
node.orderedAttributes.push(attribute);
|
81
91
|
}
|
82
92
|
if(attribute.type === "string") {
|
83
93
|
attribute.value += name + ":" + value + ";";
|
@@ -354,6 +354,9 @@ exports.formatDateString = function(date,template) {
|
|
354
354
|
var result = "",
|
355
355
|
t = template,
|
356
356
|
matches = [
|
357
|
+
[/^TIMESTAMP/, function() {
|
358
|
+
return date.getTime();
|
359
|
+
}],
|
357
360
|
[/^0hh12/, function() {
|
358
361
|
return $tw.utils.pad($tw.utils.getHours12(date));
|
359
362
|
}],
|
@@ -36,7 +36,7 @@ Compute the internal state of the widget
|
|
36
36
|
*/
|
37
37
|
DeleteFieldWidget.prototype.execute = function() {
|
38
38
|
this.actionTiddler = this.getAttribute("$tiddler",this.getVariable("currentTiddler"));
|
39
|
-
this.actionField = this.getAttribute("$field");
|
39
|
+
this.actionField = this.getAttribute("$field",null);
|
40
40
|
};
|
41
41
|
|
42
42
|
/*
|
@@ -59,7 +59,7 @@ DeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
|
59
59
|
tiddler = this.wiki.getTiddler(self.actionTiddler),
|
60
60
|
removeFields = {},
|
61
61
|
hasChanged = false;
|
62
|
-
if(this.actionField && tiddler) {
|
62
|
+
if((this.actionField !== null) && tiddler) {
|
63
63
|
removeFields[this.actionField] = undefined;
|
64
64
|
if(this.actionField in tiddler.fields) {
|
65
65
|
hasChanged = true;
|
@@ -14,6 +14,8 @@ Action widget to trigger a popup.
|
|
14
14
|
|
15
15
|
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
16
16
|
|
17
|
+
var Popup = require("$:/core/modules/utils/dom/popup.js");
|
18
|
+
|
17
19
|
var ActionPopupWidget = function(parseTreeNode,options) {
|
18
20
|
this.initialise(parseTreeNode,options);
|
19
21
|
};
|
@@ -57,20 +59,20 @@ Invoke the action associated with this widget
|
|
57
59
|
*/
|
58
60
|
ActionPopupWidget.prototype.invokeAction = function(triggeringWidget,event) {
|
59
61
|
// Trigger the popup
|
60
|
-
var
|
61
|
-
|
62
|
-
if(match) {
|
62
|
+
var coordinates = Popup.parseCoordinates(this.actionCoords || "");
|
63
|
+
if(coordinates) {
|
63
64
|
$tw.popup.triggerPopup({
|
64
65
|
domNode: null,
|
65
66
|
domNodeRect: {
|
66
|
-
left:
|
67
|
-
top:
|
68
|
-
width:
|
69
|
-
height:
|
67
|
+
left: coordinates.left,
|
68
|
+
top: coordinates.top,
|
69
|
+
width: coordinates.width,
|
70
|
+
height: coordinates.height
|
70
71
|
},
|
71
72
|
title: this.actionState,
|
72
73
|
wiki: this.wiki,
|
73
|
-
floating: this.floating
|
74
|
+
floating: this.floating,
|
75
|
+
absolute: coordinates.absolute
|
74
76
|
});
|
75
77
|
} else {
|
76
78
|
$tw.popup.cancel(0);
|
@@ -14,6 +14,8 @@ Button widget
|
|
14
14
|
|
15
15
|
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
16
16
|
|
17
|
+
var Popup = require("$:/core/modules/utils/dom/popup.js");
|
18
|
+
|
17
19
|
var ButtonWidget = function(parseTreeNode,options) {
|
18
20
|
this.initialise(parseTreeNode,options);
|
19
21
|
};
|
@@ -147,7 +149,7 @@ ButtonWidget.prototype.isSelected = function() {
|
|
147
149
|
|
148
150
|
ButtonWidget.prototype.isPoppedUp = function() {
|
149
151
|
var tiddler = this.popupTitle ? this.wiki.getTiddler(this.popupTitle) : this.wiki.getTiddler(this.popup);
|
150
|
-
var result = tiddler && tiddler.fields.text ?
|
152
|
+
var result = tiddler && tiddler.fields.text ? Popup.readPopupState(tiddler.fields.text) : false;
|
151
153
|
return result;
|
152
154
|
};
|
153
155
|
|
@@ -173,6 +175,7 @@ ButtonWidget.prototype.triggerPopup = function(event) {
|
|
173
175
|
if(this.popupTitle) {
|
174
176
|
$tw.popup.triggerPopup({
|
175
177
|
domNode: this.domNodes[0],
|
178
|
+
absolute: (this.popupAbsCoords === "yes"),
|
176
179
|
title: this.popupTitle,
|
177
180
|
wiki: this.wiki,
|
178
181
|
noStateReference: true
|
@@ -180,6 +183,7 @@ ButtonWidget.prototype.triggerPopup = function(event) {
|
|
180
183
|
} else {
|
181
184
|
$tw.popup.triggerPopup({
|
182
185
|
domNode: this.domNodes[0],
|
186
|
+
absolute: (this.popupAbsCoords === "yes"),
|
183
187
|
title: this.popup,
|
184
188
|
wiki: this.wiki
|
185
189
|
});
|
@@ -223,6 +227,7 @@ ButtonWidget.prototype.execute = function() {
|
|
223
227
|
this.setField = this.getAttribute("setField");
|
224
228
|
this.setIndex = this.getAttribute("setIndex");
|
225
229
|
this.popupTitle = this.getAttribute("popupTitle");
|
230
|
+
this.popupAbsCoords = this.getAttribute("popupAbsCoords", "no");
|
226
231
|
this.tabIndex = this.getAttribute("tabindex");
|
227
232
|
this.isDisabled = this.getAttribute("disabled","no");
|
228
233
|
// Make child widgets
|
@@ -252,7 +257,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
|
|
252
257
|
*/
|
253
258
|
ButtonWidget.prototype.refresh = function(changedTiddlers) {
|
254
259
|
var changedAttributes = this.computeAttributes();
|
255
|
-
if(changedAttributes.actions || changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes.selectedClass || changedAttributes.style || changedAttributes.dragFilter || changedAttributes.dragTiddler || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup]) || (this.popupTitle && changedTiddlers[this.popupTitle]) || changedAttributes.setTitle || changedAttributes.setField || changedAttributes.setIndex || changedAttributes.popupTitle || changedAttributes.disabled || changedAttributes["default"]) {
|
260
|
+
if(changedAttributes.actions || changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes.selectedClass || changedAttributes.style || changedAttributes.dragFilter || changedAttributes.dragTiddler || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup]) || (this.popupTitle && changedTiddlers[this.popupTitle]) || changedAttributes.popupAbsCoords || changedAttributes.setTitle || changedAttributes.setField || changedAttributes.setIndex || changedAttributes.popupTitle || changedAttributes.disabled || changedAttributes["default"]) {
|
256
261
|
this.refreshSelf();
|
257
262
|
return true;
|
258
263
|
} else if(changedAttributes["class"]) {
|
@@ -66,14 +66,14 @@ CheckboxWidget.prototype.render = function(parent,nextSibling) {
|
|
66
66
|
CheckboxWidget.prototype.getValue = function() {
|
67
67
|
var tiddler = this.wiki.getTiddler(this.checkboxTitle);
|
68
68
|
if(tiddler || this.checkboxFilter) {
|
69
|
-
if(this.checkboxTag) {
|
69
|
+
if(tiddler && this.checkboxTag) {
|
70
70
|
if(this.checkboxInvertTag === "yes") {
|
71
71
|
return !tiddler.hasTag(this.checkboxTag);
|
72
72
|
} else {
|
73
73
|
return tiddler.hasTag(this.checkboxTag);
|
74
74
|
}
|
75
75
|
}
|
76
|
-
if(this.checkboxField || this.checkboxIndex) {
|
76
|
+
if(tiddler && (this.checkboxField || this.checkboxIndex)) {
|
77
77
|
// Same logic applies to fields and indexes
|
78
78
|
var value;
|
79
79
|
if(this.checkboxField) {
|
@@ -206,11 +206,18 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
|
206
206
|
}
|
207
207
|
// Set the list field (or index) if specified
|
208
208
|
if(this.checkboxListField || this.checkboxListIndex) {
|
209
|
-
var listContents, oldPos, newPos;
|
209
|
+
var fieldContents, listContents, oldPos, newPos;
|
210
210
|
if(this.checkboxListField) {
|
211
|
-
|
211
|
+
fieldContents = tiddler ? tiddler.fields[this.checkboxListField] : undefined;
|
212
|
+
} else {
|
213
|
+
fieldContents = this.wiki.extractTiddlerDataItem(this.checkboxTitle,this.checkboxListIndex);
|
214
|
+
}
|
215
|
+
if($tw.utils.isArray(fieldContents)) {
|
216
|
+
// Make a copy so we can modify it without changing original that's refrenced elsewhere
|
217
|
+
listContents = fieldContents.slice(0);
|
212
218
|
} else {
|
213
|
-
listContents = $tw.utils.parseStringArray(
|
219
|
+
listContents = $tw.utils.parseStringArray(fieldContents) || [];
|
220
|
+
// No need to copy since parseStringArray returns a fresh array, not refrenced elsewhere
|
214
221
|
}
|
215
222
|
oldPos = notValue ? listContents.indexOf(notValue) : -1;
|
216
223
|
newPos = value ? listContents.indexOf(value) : -1;
|
@@ -0,0 +1,63 @@
|
|
1
|
+
/*\
|
2
|
+
title: $:/core/modules/widgets/error.js
|
3
|
+
type: application/javascript
|
4
|
+
module-type: widget
|
5
|
+
|
6
|
+
Error widget
|
7
|
+
|
8
|
+
\*/
|
9
|
+
(function(){
|
10
|
+
|
11
|
+
/*jslint node: true, browser: true */
|
12
|
+
/*global $tw: false */
|
13
|
+
"use strict";
|
14
|
+
|
15
|
+
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
16
|
+
|
17
|
+
var ErrorWidget = function(parseTreeNode,options) {
|
18
|
+
this.initialise(parseTreeNode,options);
|
19
|
+
};
|
20
|
+
|
21
|
+
/*
|
22
|
+
Inherit from the base widget class
|
23
|
+
*/
|
24
|
+
ErrorWidget.prototype = new Widget();
|
25
|
+
|
26
|
+
/*
|
27
|
+
Render this widget into the DOM
|
28
|
+
*/
|
29
|
+
ErrorWidget.prototype.render = function(parent,nextSibling) {
|
30
|
+
this.parentDomNode = parent;
|
31
|
+
this.computeAttributes();
|
32
|
+
this.execute();
|
33
|
+
var message = this.getAttribute("$message","Unknown error"),
|
34
|
+
domNode = this.document.createElement("span");
|
35
|
+
domNode.appendChild(this.document.createTextNode(message));
|
36
|
+
domNode.className = "tc-error";
|
37
|
+
parent.insertBefore(domNode,nextSibling);
|
38
|
+
this.domNodes.push(domNode);
|
39
|
+
};
|
40
|
+
|
41
|
+
/*
|
42
|
+
Compute the internal state of the widget
|
43
|
+
*/
|
44
|
+
ErrorWidget.prototype.execute = function() {
|
45
|
+
// Nothing to do for a text node
|
46
|
+
};
|
47
|
+
|
48
|
+
/*
|
49
|
+
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
50
|
+
*/
|
51
|
+
ErrorWidget.prototype.refresh = function(changedTiddlers) {
|
52
|
+
var changedAttributes = this.computeAttributes();
|
53
|
+
if(changedAttributes["$message"]) {
|
54
|
+
this.refreshSelf();
|
55
|
+
return true;
|
56
|
+
} else {
|
57
|
+
return false;
|
58
|
+
}
|
59
|
+
};
|
60
|
+
|
61
|
+
exports.error = ErrorWidget;
|
62
|
+
|
63
|
+
})();
|
@@ -0,0 +1,108 @@
|
|
1
|
+
/*\
|
2
|
+
title: $:/core/modules/widgets/genesis.js
|
3
|
+
type: application/javascript
|
4
|
+
module-type: widget
|
5
|
+
|
6
|
+
Genesis widget for dynamically creating widgets
|
7
|
+
|
8
|
+
\*/
|
9
|
+
(function(){
|
10
|
+
|
11
|
+
/*jslint node: true, browser: true */
|
12
|
+
/*global $tw: false */
|
13
|
+
"use strict";
|
14
|
+
|
15
|
+
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
16
|
+
|
17
|
+
var GenesisWidget = function(parseTreeNode,options) {
|
18
|
+
this.initialise(parseTreeNode,options);
|
19
|
+
};
|
20
|
+
|
21
|
+
/*
|
22
|
+
Inherit from the base widget class
|
23
|
+
*/
|
24
|
+
GenesisWidget.prototype = new Widget();
|
25
|
+
|
26
|
+
/*
|
27
|
+
Render this widget into the DOM
|
28
|
+
*/
|
29
|
+
GenesisWidget.prototype.render = function(parent,nextSibling) {
|
30
|
+
this.parentDomNode = parent;
|
31
|
+
this.computeAttributes({filterFn: function(name) {
|
32
|
+
// Only compute our own attributes which start with a single dollar
|
33
|
+
return name.charAt(0) === "$" && name.charAt(1) !== "$";
|
34
|
+
}});
|
35
|
+
this.execute();
|
36
|
+
this.renderChildren(parent,nextSibling);
|
37
|
+
};
|
38
|
+
|
39
|
+
/*
|
40
|
+
Compute the internal state of the widget
|
41
|
+
*/
|
42
|
+
GenesisWidget.prototype.execute = function() {
|
43
|
+
var self = this;
|
44
|
+
// Collect attributes
|
45
|
+
this.genesisType = this.getAttribute("$type","element");
|
46
|
+
this.genesisRemappable = this.getAttribute("$remappable","yes") === "yes";
|
47
|
+
this.genesisNames = this.getAttribute("$names","");
|
48
|
+
this.genesisValues = this.getAttribute("$values","");
|
49
|
+
// Construct parse tree
|
50
|
+
var isElementWidget = this.genesisType.charAt(0) !== "$",
|
51
|
+
nodeType = isElementWidget ? "element" : this.genesisType.substr(1),
|
52
|
+
nodeTag = isElementWidget ? this.genesisType : undefined;
|
53
|
+
var parseTreeNodes = [{
|
54
|
+
type: nodeType,
|
55
|
+
tag: nodeTag,
|
56
|
+
attributes: {},
|
57
|
+
orderedAttributes: [],
|
58
|
+
children: this.parseTreeNode.children || [],
|
59
|
+
isNotRemappable: !this.genesisRemappable
|
60
|
+
}];
|
61
|
+
// Apply explicit attributes
|
62
|
+
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(this.parseTreeNode),function(attribute) {
|
63
|
+
var name = attribute.name;
|
64
|
+
if(name.charAt(0) === "$") {
|
65
|
+
if(name.charAt(1) === "$") {
|
66
|
+
// Double $$ is changed to a single $
|
67
|
+
name = name.substr(1);
|
68
|
+
} else {
|
69
|
+
// Single dollar is ignored
|
70
|
+
return;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
$tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],$tw.utils.extend({},attribute,{name: name}));
|
74
|
+
});
|
75
|
+
// Apply attributes in $names/$values
|
76
|
+
this.attributeNames = [];
|
77
|
+
this.attributeValues = [];
|
78
|
+
if(this.genesisNames && this.genesisValues) {
|
79
|
+
this.attributeNames = this.wiki.filterTiddlers(self.genesisNames,this);
|
80
|
+
this.attributeValues = this.wiki.filterTiddlers(self.genesisValues,this);
|
81
|
+
$tw.utils.each(this.attributeNames,function(varname,index) {
|
82
|
+
$tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],varname,self.attributeValues[index] || "");
|
83
|
+
});
|
84
|
+
}
|
85
|
+
// Construct the child widgets
|
86
|
+
this.makeChildWidgets(parseTreeNodes);
|
87
|
+
};
|
88
|
+
|
89
|
+
/*
|
90
|
+
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
91
|
+
*/
|
92
|
+
GenesisWidget.prototype.refresh = function(changedTiddlers) {
|
93
|
+
var changedAttributes = this.computeAttributes(),
|
94
|
+
filterNames = this.getAttribute("$names",""),
|
95
|
+
filterValues = this.getAttribute("$values",""),
|
96
|
+
attributeNames = this.wiki.filterTiddlers(filterNames,this),
|
97
|
+
attributeValues = this.wiki.filterTiddlers(filterValues,this);
|
98
|
+
if($tw.utils.count(changedAttributes) > 0 || !$tw.utils.isArrayEqual(this.attributeNames,attributeNames) || !$tw.utils.isArrayEqual(this.attributeValues,attributeValues)) {
|
99
|
+
this.refreshSelf();
|
100
|
+
return true;
|
101
|
+
} else {
|
102
|
+
return this.refreshChildren(changedTiddlers);
|
103
|
+
}
|
104
|
+
};
|
105
|
+
|
106
|
+
exports.genesis = GenesisWidget;
|
107
|
+
|
108
|
+
})();
|
@@ -39,7 +39,10 @@ Compute the internal state of the widget
|
|
39
39
|
ImportVariablesWidget.prototype.execute = function(tiddlerList) {
|
40
40
|
var widgetPointer = this;
|
41
41
|
// Got to flush all the accumulated variables
|
42
|
-
this.variables =
|
42
|
+
this.variables = Object.create(null);
|
43
|
+
if(this.parentWidget) {
|
44
|
+
Object.setPrototypeOf(this.variables,this.parentWidget.variables);
|
45
|
+
}
|
43
46
|
// Get our parameters
|
44
47
|
this.filter = this.getAttribute("filter");
|
45
48
|
// Compute the filter
|
@@ -53,6 +53,10 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) {
|
|
53
53
|
};
|
54
54
|
|
55
55
|
KeyboardWidget.prototype.handleChangeEvent = function(event) {
|
56
|
+
if ($tw.keyboardManager.handleKeydownEvent(event, {onlyPriority: true})) {
|
57
|
+
return true;
|
58
|
+
}
|
59
|
+
|
56
60
|
var keyInfo = $tw.keyboardManager.getMatchingKeyDescriptor(event,this.keyInfoArray);
|
57
61
|
if(keyInfo) {
|
58
62
|
var handled = this.invokeActions(this,event);
|
@@ -51,11 +51,9 @@ LetWidget.prototype.computeAttributes = function() {
|
|
51
51
|
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(this.parseTreeNode),function(attribute) {
|
52
52
|
var value = self.computeAttribute(attribute),
|
53
53
|
name = attribute.name;
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
self.currentValueFor[name] = value;
|
58
|
-
}
|
54
|
+
// Now that it's prepped, we're allowed to look this variable up
|
55
|
+
// when defining later variables
|
56
|
+
self.currentValueFor[name] = value;
|
59
57
|
});
|
60
58
|
// Run through again, setting variables and looking for differences
|
61
59
|
$tw.utils.each(this.currentValueFor,function(value,name) {
|