tiddlywiki 5.3.0 → 5.3.2

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