1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-01-25 20:33:41 +00:00

Compare commits

..

101 Commits

Author SHA1 Message Date
Jeremy Ruston
afc042a967 Initial Commit 2024-03-27 10:33:22 +00:00
Jeremy Ruston
90a6f31db2 Merge branch 'tiddlywiki-com' 2024-03-27 10:10:26 +00:00
Jeremy Ruston
d37d6595b5 Docs: Add link to Basic Auth example 2024-03-27 10:09:46 +00:00
Jeremy Ruston
e02cafb938 Add docs about using Basic Authentication in HTTP requests 2024-03-27 08:35:56 +00:00
Jeremy Ruston
801ed0ea11 Fix cycle operator crashing if step size is larger than the number of operands
See https://talk.tiddlywiki.org/t/bug-report-javascript-error-at-tw-com-within-cycle-operator-try-it/9430/1
2024-03-26 16:04:13 +00:00
Mario Pietsch
31ec1bdd50 Add tag parameter to reveal-widget to fix regression (#8084) 2024-03-18 09:08:11 +00:00
Jeremy Ruston
62a5fc075b Merge branch 'tiddlywiki-com' 2024-03-16 22:05:51 +00:00
Mario Pietsch
0b6db6e860 Fix indentation for tiddlers that set tv-config-toolbar-class (#8079)
human readable in preparation to add data-title=<<listItem>>
for better UX defining a "read only" theme

Changes to be committed:
	modified:   core/ui/EditTemplate/controls.tid
	modified:   core/ui/PageControls.tid
	modified:   core/ui/PageControls/more-page-actions.tid
	modified:   core/ui/ViewTemplate/title.tid
	modified:   core/ui/ViewToolbar/more-tiddler-actions.tid
	modified:   plugins/tiddlywiki/menubar/items/pagecontrols.tid
2024-03-16 19:03:36 +00:00
poc2go
09f04cb5a6 Signing the CLA (#8077) 2024-03-16 17:33:13 +00:00
Mario Pietsch
511d480a60 Fix wikitext-macros example block mode (#8071) 2024-03-15 18:08:37 +00:00
Mario Pietsch
3342cfc886 Docs: fix doubled list in: Deprecated - What does it mean (#8060) 2024-03-13 22:08:11 +00:00
Mario Pietsch
ec0b264426 Docs: add Procedures railroad syntax description (#8061) 2024-03-13 22:07:39 +00:00
Mario Pietsch
8f741e8e67 Docs: deprecate Macro call railroad syntax (#8062) 2024-03-13 22:06:23 +00:00
Mario Pietsch
32bf9fd7a1 Docs - wikitext-macros new v5.3.x syntaxWikitext macros (#8059)
* docs - wikitext-macros new v5.3.x syntax

* fix flexcard macro wrong link
2024-03-13 22:02:56 +00:00
Jeremy Ruston
3657e59a08 Merge branch 'tiddlywiki-com' 2024-03-13 18:03:23 +00:00
Mateusz Wilczek
21a5841aab Add links to and instructions about Saq's PR Maker in docs (#8068) 2024-03-13 12:17:14 +00:00
Mateusz Wilczek
edfd27fa45 Improve filter run prefix docs (#8067) 2024-03-12 20:54:45 +00:00
Jeremy Ruston
0e7d566df7 Add link to demo of TiddlyWiki as a library in other Node.js apps 2024-03-12 17:16:51 +00:00
Mario Pietsch
8481b7d137 Dev edition: change layout to fluid-fixed (#8063) 2024-03-12 08:56:12 +00:00
Mario Pietsch
0fbfdce4b6 Add $:/StoryList to gitignore for tiddlywiki-com branch (#8065) 2024-03-12 08:54:09 +00:00
Jeremy Ruston
9079186b18 Merge branch 'tiddlywiki-com' 2024-03-11 12:15:06 +00:00
Jeremy Ruston
e67eaca030 Revert "Docs - wikitext-macros new v5.3.x syntax (#8033)"
This reverts commit 0fb10da8b3.
2024-03-11 12:13:25 +00:00
Jeremy Ruston
1222bed0de Merge branch 'tiddlywiki-com' 2024-03-10 15:11:03 +00:00
Mario Pietsch
78a09fcf56 Docs - download empty button new syntax - v5.3.x (#8034)
* docs - download empty button new syntax - want to keep stuff like this for the time beeing

* use \procedure instead of \define for consistency
2024-03-10 15:07:56 +00:00
Mario Pietsch
0f395ce81d Add code-body field to doc-styles tiddler (#8054) 2024-03-10 15:07:28 +00:00
Mario Pietsch
b28f420430 Some more tv-macros changed to new syntax. Plus adjusted doc tiddlers (#8056) 2024-03-10 15:06:04 +00:00
Mario Pietsch
0b7914785c Minor adjustments to existing doc tiddlers without changing modified date (#8057) 2024-03-10 15:05:26 +00:00
Jeremy Ruston
967e2b7fef Import variables should not parse with whitespace trim
Fixes #7909
2024-03-10 15:03:52 +00:00
Mario Pietsch
8d36ecd6bc Add list-links to $:/deprecated tag (#8053) 2024-03-10 14:30:21 +00:00
Mario Pietsch
c2b436371b Docs: tiddler-info-source - change sources tab to new syntax and add link to pr-creator (#8029)
* tiddler-info-source - change sources tab to new syntax and add link to pr-creator

* remove class from plain text elements as requested
2024-03-10 11:08:00 +00:00
Mario Pietsch
24e474bd72 Doc-macros, styles and documentation overview tiddler (#8037) 2024-03-10 10:41:09 +00:00
Mario Pietsch
a75d4ca003 Docs - operator macros, templates and filter-run template (#8035) 2024-03-10 10:39:16 +00:00
Mario Pietsch
0fb10da8b3 Docs - wikitext-macros new v5.3.x syntax (#8033) 2024-03-10 10:37:26 +00:00
Mario Pietsch
0202d7b463 Docs - make .from-version and .deprecated-since macros more readable (#8032) 2024-03-10 10:36:49 +00:00
Mario Pietsch
b22570a91f Doc-macros - variable-macros new v5.3.x syntax (#8031)
* doc-macros - variable-macros new v5.3.x syntax

* change modified back to old value
2024-03-10 10:35:31 +00:00
oeyoews
00bd6f8ee8 Remove unnecessary prefix field for highlight plugin (#8048) 2024-03-09 15:45:38 +00:00
Jeremy Ruston
43a2399698 Merge branch 'tiddlywiki-com' 2024-03-09 14:49:55 +00:00
Télumire
35d1609a2b Add a warning for potential image map scaling issues + responsive alternative with SVG (#8044)
* Add a warning for potential image map scaling issues + alternative with SVG

* Update ImageWidget.tid

fix phrasing
2024-03-09 14:39:15 +00:00
Jeremy Ruston
a90b1dbb49 Docs for bags and recipes
Prompted by https://talk.tiddlywiki.org/t/whats-a-bag-and-whats-a-tiddlywebadaptor/9278
2024-03-09 14:24:42 +00:00
Jeremy Ruston
72c4b92a4c Move some docs tiddlers to the correct directories 2024-03-09 14:23:45 +00:00
Simon Huber
bf9eafbad9 Update draggable.js - fix the call to updateDomNodeClasses (#8045)
* Update draggable.js - rename updateDomNodeClasses to assignDomNodeClasses

If I'm not wrong then the "updateDomNodeClasses" is unused and the "assignDomNodeClasses" is missing

This renames "updateDomNodeClasses" to "assignDomNodeClasses"

* Use "updateDomNodeClasses"
2024-03-09 10:00:27 +00:00
Mario Pietsch
28791287b2 Add sha256() function to $tw.utils (#8043) 2024-03-08 17:34:30 +00:00
Mario Pietsch
9082f36008 Docs: Add example for sha256 operator (#8042) 2024-03-08 17:29:17 +00:00
Jeremy Ruston
e64aa6c8f9 Remove accidentally committed dependencies
Fixes #8040
2024-03-07 08:24:51 +00:00
lin onetwo
6f9cabd352 DevDocs: about modern frameworks in TiddlyWiki (#8027)
* docs: abount modern frameworks

(cherry picked from commit 783547bac2d1bfaa20def3eeda0dc10b6b465d8d)

* docs: modified time

(cherry picked from commit c8db907fe273a414768f5292f61986800e092dfe)
2024-03-06 17:35:42 +00:00
Jeremy Ruston
69e828fc30 Fix csvtiddlers macro crash with missing tiddlers
Fixes #8039
2024-03-06 08:36:37 +00:00
Jeremy Ruston
7d25b13970 Merge branch 'tiddlywiki-com' 2024-03-04 14:13:41 +00:00
lin onetwo
bede60d362 Feat: New icon for default layout (#8020)
* feat: icon for default layout

* feat: new icon for default layout

* Update default-layout.tid

* Update default-layout.tid

* Update LayoutSwitcher.tid

* Update PageTemplate.tid
2024-03-04 11:38:29 +00:00
TonyM
f02fafe365 Update RefreshThrottling.tid (#8024)
Change word "preciously" to "previously" as I believe was intend.
2024-03-02 20:03:59 +00:00
Mario Pietsch
4fba206606 move tip to the end of the tiddler so it does not distract reading (#8019)
* move tip to the end of the tiddler so it does not distract reading

* reset modified
2024-02-29 19:26:19 +00:00
Jeremy Ruston
070327cb57 Include $:/tags/Macro on core macros for backwards compatibility
This avoids breaking existing code that expects to be able to import the core macros with just $:/tags/Macro

@pmario - I suggest that future updates use the same approach

Thanks to @ericshulman for reporting the problem
2024-02-29 12:39:41 +00:00
Jeremy Ruston
755a09be10 Tour plugin: Fix selector for "Recent" tab button 2024-02-29 09:43:38 +00:00
Bram Chen
9d874befa4 Update chinese language files (#8016)
* Add chinese captions for new emergency tiddlers download button
2024-02-28 18:05:22 +00:00
Jeremy Ruston
f1effdd2cd Merge branch 'tiddlywiki-com' 2024-02-28 18:04:35 +00:00
Jeremy Ruston
5b2d35e8d1 Revert "Update backtranscludes.tid (#8010)"
This reverts commit 32de6eca22.
2024-02-28 18:04:16 +00:00
Jeremy Ruston
a75fd2a64a Remove forced error in accidentally left in #7966
Thanks @pmario
2024-02-28 12:01:42 +00:00
catter-fly
4ae6f1ffd4 Adjusting saving w/r/t FireFox (#7669) 2024-02-28 11:38:00 +00:00
Mario Pietsch
ace6dbc514 CI: Fix archive output paths (#7919) 2024-02-28 11:35:50 +00:00
etardiff
4cca77b72d Rewrite tag-picker macros as procedures (#7883)
This PR attempts to modernize the tag-picker macros as procedures, as @Jermolene suggested in [#7548 (comment)](https://github.com/Jermolene/TiddlyWiki5/pull/7548#issuecomment-1825458523).

What I changed:

* rewrote macros as procedures/replaced text substitutions with variables
* replaced nested $set and $var widgets with $let widgets/functions
* minor rewrites to reduce redundant code
* some additional linebreaks for clarity

*This is functionally identical to my initial PR, [#7880](https://github.com/Jermolene/TiddlyWiki5/pull/7880)*, minus the extra file I'd accidentally added. Thank you for bearing with me as I learn to navigate GitHub.
2024-02-28 11:32:48 +00:00
Jeremy Ruston
3543fe53ff RSOE: Add emergency tiddlers download button (#7966) 2024-02-28 11:29:32 +00:00
Mario Pietsch
70178dce78 Add more classes to ControlPanel-Settings elements, so they can be styled using relatively simple CSS rules (#8000) 2024-02-28 11:28:27 +00:00
Mario Pietsch
9e6e50eccf Add StoryList to gitignore (#8013) 2024-02-28 11:27:00 +00:00
Jeremy Ruston
898cac7f71 Remove accidentally committed $:/StoryList tiddlers 2024-02-28 11:26:40 +00:00
lin onetwo
32de6eca22 Update backtranscludes.tid (#8010)
* Update backtranscludes.tid

(cherry picked from commit dbce31764937e90ec0d678a29e426b22eacb122b)

* from-version 5.3.4
2024-02-26 14:33:17 +00:00
Jeremy Ruston
09e6117fe2 Update Macedonian language description 2024-02-26 13:13:06 +00:00
Robin Munn
984863065e Fix "sjcl not found" errors in TiddlyDesktop (#8007) 2024-02-26 11:36:46 +00:00
Jeremy Ruston
c947ba4310 Make sure Macedonian is included in the translators edition 2024-02-26 10:19:42 +00:00
Jeremy Ruston
b33cfeab06 Add Macedonian language
Thanks Nikola Dio Petkovski
2024-02-26 10:17:16 +00:00
Jeremy Ruston
540b3ff81e Remove superfluous comma 2024-02-24 09:32:19 +00:00
Jeremy Ruston
c9675092ed Merge branch 'tiddlywiki-com' 2024-02-24 09:27:49 +00:00
Mateusz Wilczek
d29df793a4 Docs: Improve .from-version macro (#7874)
* Docs: Improve `.from-version` macro

* Restore icons in version badges
2024-02-24 09:26:41 +00:00
Mateusz Wilczek
e57123936f Fix spacing in Standard and Filter tabs of Advanced Search (#7889)
* Fix spacing in Standard and Filter tabs of Advanced Search

* Move changed files to appropriate folder

* Restore original title/tags fields
2024-02-23 17:41:12 +00:00
Jeremy Ruston
6d721c728f Confetti Plugin: Don't pass undefined for missing parameters 2024-02-22 17:17:38 +00:00
Jeremy Ruston
ae9250622f Let's have performance instrumentation in the prerelease
I believe it was turned off by accident at some point
2024-02-22 17:17:23 +00:00
Jeremy Ruston
4dd9db3b46 Merge branch 'tiddlywiki-com' 2024-02-19 09:55:34 +00:00
lin onetwo
36fc8170a4 Basic Backtranscludes filter (#6081)
* feat: add transcludes and backtranscludes filter and its relying indexer

* feat: add test about backtranscludes

* docs: add doc about transcludes and backtranscludes Operator

* refactor: merge backlinks and backtranscludes indexer

* fix: test not executed

* fix: latest transclude use $tiddler instead of tiddler

* feat: A tiddler transclude with template will still use the tiddler as result.

* docs: wrong comment
2024-02-18 09:14:23 +00:00
Bram Chen
96e11fa8b0 Update chinese language files (#7993)
* Replace "運算元" (operand) with "參數" (parameter)
2024-02-17 09:35:29 +00:00
Bimba Laszlo
6236e7777c Fix URLs of bimlas plugins (#7994) 2024-02-17 09:34:48 +00:00
Jeremy Ruston
af02349e47 Merge branch 'tiddlywiki-com' 2024-02-16 15:57:34 +00:00
Mario Pietsch
a21e7b2aac $:/core/ui/EditTemplate/tags - rewrite to use v5.3.x syntax (#7981)
* $:/core/ui/EditTemplate/tags - rewrite to use v5.3.x syntax

* tag-macro -- change tag-styles function to make it more readable

* tags EditTemplate - improve code readability

* tags EditTemplate -- use hardcoded style colours as requested
2024-02-16 10:27:51 +00:00
Mario Pietsch
a09106f33b Core-macro-diff-new-syntax (#7986)
* $:/core/macros/diff use v5.3.x syntax and add indentation for better readability -- all tests pass

* diff - set tags: $:/tags/Global
2024-02-14 19:45:11 +01:00
Mario Pietsch
699d8b9416 css-macro -- change tags to $:/tags/Global (#7987)
* $:/core/macros/CSS use v5.3.x syntax

* css-macro -- change tags to $:/tags/Global
2024-02-14 19:44:22 +01:00
Mario Pietsch
53ccc29209 Copy-to-clipboard macro - change tags to $:/tags/Global (#7988)
* copy-to-clipboard-macors -- new v5.3.x syntax

* copy-to-clipboard - change tags to $:/tags/Global
2024-02-14 19:36:32 +01:00
Simon Huber
a3521eb67d Use qualified-preview-state in default body-editor for reuse in preview button (#7795)
* Use qualified-preview-state to reuse in preview button

Somehow the editor-body template and the preview button don't qualify the same showeditpreview anymore

* Update preview.tid to use qualified-preview-state

* Update preview.tid

* Update default.tid

* Update preview.tid
2024-02-14 17:22:54 +01:00
Simon Huber
d4f6befb9b Remove overflow: auto from tiddler preview (#7985)
This removes `overflow: auto` from the tiddler preview.
I'm not sure anymore why it was added.
It causes some problems in the preview with popups for example, see screenshots
2024-02-14 17:21:08 +01:00
Mario Pietsch
a49436160d Improve Filter Syntax documentation (#7368)
* Improve Filter Syntax documentaion / navigation

* update links and missing diagrams

* rename legacy prefix to shortcut prefix

* Update editions/tw5.com/tiddlers/filters/Filter Operators.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Sort Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/Cascade Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* Update editions/tw5.com/tiddlers/filters/syntax/And Filter Run Prefix.tid

Co-authored-by: yaisog <m@rcuswinter.de>

* add most changes a suggested by yaisog

* fix copy / paste from-version

* replace operand with parameter in the docs

* fix typo

* fix typos and improve railroad diagrams consistency

* move "new from version" info for filter run prefixes below the table

* fix typo transclusion and substitution

* Move Filters tiddler to the top level in the TOC

* wip-breadcrumbs

* breadcrumbs & breadcrumbsList macro final

* remove files that do not belong to this PR

* restore release banner

* add simple / story mode to breadcrumbs

* .breadcrumbs macro update comments

* new breadcrumbs CSS, woks with small screens

* make CSS configurable using hidden-settings

* improve CSS fro small screens

* remove the initial: recursiveParentTag macro

* improve location info for breadcrumbs nav. add "alt-text" for Edge ::after element

* breadcrumbs add mode=field

* bc add initial docs

* breadcrumbsField will also respect the story ordering

* add configurable global filterMode setting

* improve arrow CSS for browser zooming

* add bc links use bc-caption if caption field is non-empty

* breadcrumbs improve comments

* breadcrumbs aria-lable uses caption if there is one

* breadcrumbs improve documentation

* breadcrumbs improve docs for sort param

* fix showArrows docs

* remove .bc-link aria-label .. it's not needed if caption is resolved properly

* use subfilter instead of enlist to evaluate the "excluded" variable. Be consistent with toc-macros

* remove breadcrumbs macros - they have their own PR now

* resolve conflict

* add back doc-macros tiddler

* integrate :then filter run prefix

* remove .breadcrumbs macros and their config tiddlers

* fix typos as requested

---------

Co-authored-by: yaisog <m@rcuswinter.de>
2024-02-14 17:20:32 +01:00
lin onetwo
aaad420c3f Docs: add contribution graph to readme (#7980) 2024-02-11 16:15:05 +01:00
eschlon
70f0a52842 Fix incorrect state reference in core/ui/AdvancedSearch/Standard (#7975)
This PR fixes #7973
2024-02-10 15:41:56 +01:00
eschlon
abab9164c5 Signing the CLA (#7974) 2024-02-10 14:45:06 +01:00
Jeremy Ruston
0cf80e824f Remove obsolete banner from Confetti plugin 2024-02-05 22:50:01 +00:00
Jeremy Ruston
b0bb911103 Fix "introduction" edition
Fixes #7965
2024-02-05 17:47:43 +00:00
lin onetwo
111f71bcf5 Add doc xls ppt file type information (#7927)
* fix: add doc xls ppt type

* Add application/vnd.ms-excel
2024-02-05 17:02:10 +00:00
lin onetwo
2b1efac6ee Fix: on Windows, tiddlywiki.files title source shoud use / instead of \ (#7949)
* fix: on Windows, tiddlywiki.files title source shoud use / instead of \

* fix: split path.sep instead of /
2024-02-05 17:00:09 +00:00
Mateusz Wilczek
bc3132ab2c Add explicit docs on temporary tiddlers (#7957) 2024-02-02 17:15:51 +00:00
Jeremy Ruston
94e0f05af5 Merge branch 'tiddlywiki-com' 2024-01-31 15:34:59 +00:00
Jeremy Ruston
eaa21589e6 Fix link to Nicolas Petton's Notebook theme 2024-01-31 14:34:17 +00:00
lin onetwo
207720cb30 Add WASM content type info (#7948)
Allows WASM modules to be loaded
2024-01-27 14:25:30 +00:00
Jeremy Ruston
9bf3c0602d HTTP Requests should return data even if there was an error
The body data is often used for API error messages in the event of failure
2024-01-26 13:37:46 +00:00
Jeremy Ruston
a9f9ffd409 Introduce Tour Plugin and Confetti Plugin, improve Dynannotate Plugin (#7734)
* First commit

* Typo

* Add support for delay parameter

* Add confetti widget

* Add tour plugin

* Add element spotlight to dynannotate plugin

Useful for highlighting on screen elements for the user

* More and bigger confetti by default

* Use new element spotlight to provide hints

* Adjust hint selectors for create tiddler tour step

* Include confetti plugin in prerelease

* Clarify wording of confetti demo

* Don't link TiddlyWiki in the tour panel

* Tweaks to tour buttons

* Mark dependents of the tour plugin

* Add full screen section of tour and tour edition

* Remove Anna Freud references from welcome tiddler

* Build the tour edition in the preview

* Fix typo in build script

* Populate tour edition with solar system data

From Simple English Wikipedia

* Missing tag

* Add page control button to start tour

Also make the tour controls visible in full screen mode

* Refactor to use global procedures to control the tour

* Change "startup-actions" field to "enter-actions" to avoid confusion

* Add a tour logo

* Refactor to allow multiple tours to be loaded at once

* Remove wikification from welcome tour step

* Update docs

* Simplify styles for top bar

* Tours should have a $:/tags/Tour tag

* Tour should autostart in the tour edition, but not in the main wiki

* Better labelling for the main preview

* Fix build process

We build a separate tour.html wiki, but can include the tour in other wikis too

* Remove obsolete text

* Add "using tags" as a separate tour

* Remove old debugging code

* Add tour chooser

* Ensure that the current tour isn't listed as an option in the final step

* Use whitespace trim

Note that the setting is inherited by procedure and widget definitions

* Simplify tour step format

* Remove obsolete state tiddler

Not needed because now we initialise it in startup actions

* Fix gap between navigation buttons

* Clean up tiddler titles within the introduction tour

* Finish allowing the name "TiddlyWiki" to be customised

Some of the code was in the previous commit. Next we'll wire up the user interface

* Clarify docs

* Add a settings pane giving a birds eye view of a tour

* Avoid having to embed confetti in the final step

* Update docs

* Tweak styling of tour chooser dropdown

* Add a button to launch tour steps directly, and give them captions

* Expose custom tour settings

* Use the tour step caption as the heading

* Fix initialisation when jumping to a tour step

* Introduce step about tags

* Improve wording

* Improve styling of task call-to-action and nav buttons

* Adopt new conditional shortcut syntax

* Wording and ordering tweaks

* Fix typos

Thanks @pmario

* Simplify styling of tour overlay

* Use custom palette colours

Makes it easier for people to use their own colour scheme for the tour

* More custom colours

* Tour wording tweaks

* Extends the tour plugin with a condition field (#7861)

* feat: support condition field to determine whether a step should be shown

* feat: add support for overriding the hint text using the field 'hint' from the step tiddler

* fix: roll back tour display procedure for now until an override mechanism has been discussed

* fix: renamed advance-criterion field and associated variables to step-success-filter

* fix: renamed hint field to hint-text and selector to hint-selector

* refactor: to create function to get all tour tiddlers filtered by their condition field

* refactor: rename globals tiddlers to variables and avoid making any of the tour procedures global

* fix: also rename globals.tid file to variables.tid

* docs: cover all tour steps tiddler fields

* fix: improve spacing in Tour HUD

* WIP

---------

Co-authored-by: Jeremy Ruston <174761+Jermolene@users.noreply.github.com>
Co-authored-by: Saq Imtiaz <saq.imtiaz@gmail.com>
2024-01-25 12:53:35 +00:00
Jeremy Ruston
c3de9df84f Merge branch 'tiddlywiki-com' 2024-01-24 14:19:56 +00:00
yaisog
2099e687cc improve the documentation on transclusions (#7914) 2024-01-24 11:40:55 +00:00
418 changed files with 7441 additions and 1924 deletions

1
.gitignore vendored
View File

@@ -8,3 +8,4 @@ node_modules/
/test-results/ /test-results/
/playwright-report/ /playwright-report/
/playwright/.cache/ /playwright/.cache/
$__StoryList.tid

View File

@@ -156,6 +156,28 @@ node $TW5_BUILD_TIDDLYWIKI \
--build index favicon static \ --build index favicon static \
|| exit 1 || exit 1
# /tour.html tour edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/tour \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all tour.html text/plain \
|| exit 1
# /dev/index.html Developer docs
# /dev/favicon.ico Favicon for dev site
# /dev/static.html Static rendering of default tiddlers
# /dev/alltiddlers.html Static rendering of all tiddlers
# /dev/static/* Static single tiddlers
# /dev/static/static.css Static stylesheet
node $TW5_BUILD_TIDDLYWIKI \
./editions/dev \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/dev \
--build index favicon static \
|| exit 1
# /share.html Custom edition for sharing via the URL # /share.html Custom edition for sharing via the URL
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
./editions/share \ ./editions/share \

View File

@@ -177,6 +177,7 @@ document: defaults to current document
eventListeners: array of event listeners (this option won't work until $tw.utils.addEventListeners() has been loaded) eventListeners: array of event listeners (this option won't work until $tw.utils.addEventListeners() has been loaded)
*/ */
$tw.utils.domMaker = function(tag,options) { $tw.utils.domMaker = function(tag,options) {
var options = options || {};
var doc = options.document || document; var doc = options.document || document;
var element = doc.createElementNS(options.namespace || "http://www.w3.org/1999/xhtml",tag); var element = doc.createElementNS(options.namespace || "http://www.w3.org/1999/xhtml",tag);
if(options["class"]) { if(options["class"]) {
@@ -218,9 +219,34 @@ $tw.utils.error = function(err) {
heading = dm("h1",{text: errHeading}), heading = dm("h1",{text: errHeading}),
prompt = dm("div",{text: promptMsg, "class": "tc-error-prompt"}), prompt = dm("div",{text: promptMsg, "class": "tc-error-prompt"}),
message = dm("div",{text: err, "class":"tc-error-message"}), message = dm("div",{text: err, "class":"tc-error-message"}),
button = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}), closeButton = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}),
form = dm("form",{children: [heading,prompt,message,button], "class": "tc-error-form"}); downloadButton = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "download tiddlers" : $tw.language.getString("Buttons/EmergencyDownload/Caption") )})], "class": "tc-error-prompt"}),
form = dm("form",{children: [heading,prompt,downloadButton,message,closeButton], "class": "tc-error-form"});
document.body.insertBefore(form,document.body.firstChild); document.body.insertBefore(form,document.body.firstChild);
downloadButton.addEventListener("click",function(event) {
if($tw && $tw.wiki) {
var tiddlers = [];
$tw.wiki.each(function(tiddler,title) {
tiddlers.push(tiddler.fields);
});
var link = dm("a"),
text = JSON.stringify(tiddlers);
if(Blob !== undefined) {
var blob = new Blob([text], {type: "text/html"});
link.setAttribute("href", URL.createObjectURL(blob));
} else {
link.setAttribute("href","data:text/html," + encodeURIComponent(text));
}
link.setAttribute("download","emergency-tiddlers-" + (new Date()) + ".json");
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
} else {
alert("Emergency tiddler download is not available");
}
event.preventDefault();
return false;
},true);
form.addEventListener("submit",function(event) { form.addEventListener("submit",function(event) {
document.body.removeChild(form); document.body.removeChild(form);
event.preventDefault(); event.preventDefault();
@@ -786,6 +812,7 @@ $tw.utils.Crypto = function() {
} }
return outputText; return outputText;
}; };
$tw.sjcl = sjcl;
this.setPassword = function(newPassword) { this.setPassword = function(newPassword) {
currentPassword = newPassword; currentPassword = newPassword;
this.updateCryptoStateTiddler(); this.updateCryptoStateTiddler();
@@ -1967,10 +1994,10 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
var value = tiddler[name]; var value = tiddler[name];
switch(fieldInfo.source) { switch(fieldInfo.source) {
case "subdirectories": case "subdirectories":
value = path.relative(rootPath, filename).split('/').slice(0, -1); value = path.relative(rootPath, filename).split(path.sep).slice(0, -1);
break; break;
case "filepath": case "filepath":
value = path.relative(rootPath, filename); value = path.relative(rootPath, filename).split(path.sep).join('/');
break; break;
case "filename": case "filename":
value = path.basename(filename); value = path.basename(filename);
@@ -2438,6 +2465,7 @@ $tw.boot.initStartup = function(options) {
$tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]}); $tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]});
$tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]});
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
$tw.utils.registerFileType("application/wasm","base64",".wasm");
$tw.utils.registerFileType("application/font-woff","base64",".woff"); $tw.utils.registerFileType("application/font-woff","base64",".woff");
$tw.utils.registerFileType("application/x-font-ttf","base64",".woff"); $tw.utils.registerFileType("application/x-font-ttf","base64",".woff");
$tw.utils.registerFileType("application/font-woff2","base64",".woff2"); $tw.utils.registerFileType("application/font-woff2","base64",".woff2");
@@ -2452,8 +2480,12 @@ $tw.boot.initStartup = function(options) {
$tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]); $tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]);
$tw.utils.registerFileType("application/enex+xml","utf8",".enex"); $tw.utils.registerFileType("application/enex+xml","utf8",".enex");
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.wordprocessingml.document","base64",".docx"); $tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.wordprocessingml.document","base64",".docx");
$tw.utils.registerFileType("application/msword","base64",".doc");
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","base64",".xlsx"); $tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","base64",".xlsx");
$tw.utils.registerFileType("application/excel","base64",".xls");
$tw.utils.registerFileType("application/vnd.ms-excel","base64",".xls");
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.presentationml.presentation","base64",".pptx"); $tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.presentationml.presentation","base64",".pptx");
$tw.utils.registerFileType("application/mspowerpoint","base64",".ppt");
$tw.utils.registerFileType("text/x-bibtex","utf8",".bib",{deserializerType:"application/x-bibtex"}); $tw.utils.registerFileType("text/x-bibtex","utf8",".bib",{deserializerType:"application/x-bibtex"});
$tw.utils.registerFileType("application/x-bibtex","utf8",".bib"); $tw.utils.registerFileType("application/x-bibtex","utf8",".bib");
$tw.utils.registerFileType("application/epub+zip","base64",".epub"); $tw.utils.registerFileType("application/epub+zip","base64",".epub");

View File

@@ -0,0 +1,7 @@
title: $:/core/images/default-layout
tags: $:/tags/Image
\parameters (size:"22pt")
<svg width=<<size>> height=<<size>> class="tc-image-default-layout tc-image-button" viewBox="0 0 128 128">
<path d="M71.93 72A8.07 8.07 0 0 1 80 80.07v7.86A8.071 8.071 0 0 1 71.93 96H8.07A8.067 8.067 0 0 1 0 87.93v-7.86A8.072 8.072 0 0 1 8.07 72h63.86Zm0 32a8.07 8.07 0 0 1 8.07 8.07v7.86a8.071 8.071 0 0 1-8.07 8.07H8.07A8.067 8.067 0 0 1 0 119.93v-7.86A8.072 8.072 0 0 1 8.07 104h63.86Zm0-104A8.068 8.068 0 0 1 80 8.07v47.86A8.073 8.073 0 0 1 71.93 64H8.07A8.07 8.07 0 0 1 0 55.93V8.07A8.072 8.072 0 0 1 8.07 0h63.86Zm48 0c2.14 0 4.193.85 5.706 2.364A8.067 8.067 0 0 1 128 8.07v111.86c0 2.14-.85 4.193-2.364 5.706A8.067 8.067 0 0 1 119.93 128H96.07c-2.14 0-4.193-.85-5.706-2.364A8.067 8.067 0 0 1 88 119.93V8.07c0-2.14.85-4.193 2.364-5.706A8.067 8.067 0 0 1 96.07 0h23.86ZM116 24h-16a3.995 3.995 0 0 0-2.828 1.172 3.995 3.995 0 0 0 0 5.656A3.995 3.995 0 0 0 100 32h16a3.995 3.995 0 0 0 2.828-1.172 3.995 3.995 0 0 0 0-5.656A3.995 3.995 0 0 0 116 24Z"/>
</svg>

View File

@@ -28,6 +28,7 @@ Encryption/ClearPassword/Caption: clear password
Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption Encryption/ClearPassword/Hint: Clear the password and save this wiki without encryption
Encryption/SetPassword/Caption: set password Encryption/SetPassword/Caption: set password
Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption Encryption/SetPassword/Hint: Set a password for saving this wiki with encryption
EmergencyDownload/Caption: download tiddlers as json
ExportPage/Caption: export all ExportPage/Caption: export all
ExportPage/Hint: Export all tiddlers ExportPage/Hint: Export all tiddlers
ExportTiddler/Caption: export tiddler ExportTiddler/Caption: export tiddler

View File

@@ -9,7 +9,7 @@ config: Data to be inserted into `$tw.config`.
filteroperator: Individual filter operator methods. filteroperator: Individual filter operator methods.
global: Global data to be inserted into `$tw`. global: Global data to be inserted into `$tw`.
info: Publishes system information via the [[$:/temp/info-plugin]] pseudo-plugin. info: Publishes system information via the [[$:/temp/info-plugin]] pseudo-plugin.
isfilteroperator: Operands for the ''is'' filter operator. isfilteroperator: Parameters for the ''is'' filter operator.
library: Generic module type for general purpose JavaScript modules. library: Generic module type for general purpose JavaScript modules.
macro: JavaScript macro definitions. macro: JavaScript macro definitions.
parser: Parsers for different content types. parser: Parsers for different content types.

View File

@@ -30,7 +30,7 @@ Error/DeserializeOperator/UnknownDeserializer: Filter Error: Unknown deserialize
Error/Filter: Filter error Error/Filter: Filter error
Error/FilterSyntax: Syntax error in filter expression Error/FilterSyntax: Syntax error in filter expression
Error/FilterRunPrefix: Filter Error: Unknown prefix for filter run Error/FilterRunPrefix: Filter Error: Unknown prefix for filter run
Error/IsFilterOperator: Filter Error: Unknown operand for the 'is' filter operator Error/IsFilterOperator: Filter Error: Unknown parameter for the 'is' filter operator
Error/FormatFilterOperator: Filter Error: Unknown suffix for the 'format' filter operator Error/FormatFilterOperator: Filter Error: Unknown suffix for the 'format' filter operator
Error/LoadingPluginLibrary: Error loading plugin library Error/LoadingPluginLibrary: Error loading plugin library
Error/NetworkErrorAlert: `<h2>''Network Error''</h2>It looks like the connection to the server has been lost. This may indicate a problem with your network connection. Please attempt to restore network connectivity before continuing.<br><br>''Any unsaved changes will be automatically synchronised when connectivity is restored''.` Error/NetworkErrorAlert: `<h2>''Network Error''</h2>It looks like the connection to the server has been lost. This may indicate a problem with your network connection. Please attempt to restore network connectivity before continuing.<br><br>''Any unsaved changes will be automatically synchronised when connectivity is restored''.`

View File

@@ -18,7 +18,7 @@ exports.info = {
name: "listen", name: "listen",
synchronous: true, synchronous: true,
namedParameterMode: true, namedParameterMode: true,
mandatoryParameters: [], mandatoryParameters: []
}; };
var Command = function(params,commander,callback) { var Command = function(params,commander,callback) {

View File

@@ -0,0 +1,26 @@
/*\
title: $:/core/modules/filters/backtranscludes.js
type: application/javascript
module-type: filteroperator
Filter operator for returning all the backtranscludes from a tiddler
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.backtranscludes = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
$tw.utils.pushTop(results,options.wiki.getTiddlerBacktranscludes(title));
});
return results;
};
})();

View File

@@ -14,12 +14,9 @@ Filter operators for cryptography, using the Stanford JavaScript library
exports.sha256 = function(source,operator,options) { exports.sha256 = function(source,operator,options) {
var results = [], var results = [],
length = parseInt(operator.operand,10) || 20, length = parseInt(operator.operand,10) || 20;
sha256 = function(text) {
return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(text)).substr(0,length);
};
source(function(tiddler,title) { source(function(tiddler,title) {
results.push(sha256(title)); results.push($tw.utils.sha256(title,{length: length}));
}); });
return results; return results;
}; };

View File

@@ -0,0 +1,26 @@
/*\
title: $:/core/modules/filters/transcludes.js
type: application/javascript
module-type: filteroperator
Filter operator for returning all the transcludes from a tiddler
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.transcludes = function(source,operator,options) {
var results = new $tw.utils.LinkedList();
source(function(tiddler,title) {
results.pushTop(options.wiki.getTiddlerTranscludes(title));
});
return results.toArray();
};
})();

View File

@@ -202,7 +202,7 @@ Extended filter operators to manipulate the current list.
} }
if(resultsIndex !== -1) { if(resultsIndex !== -1) {
i = i + step; i = i + step;
nextOperandIndex = (i < opLength ? i : i - opLength); nextOperandIndex = (i < opLength ? i : i % opLength);
if(operands.length > 1) { if(operands.length > 1) {
results.splice(resultsIndex,1,operands[nextOperandIndex]); results.splice(resultsIndex,1,operands[nextOperandIndex]);
} else { } else {

View File

@@ -0,0 +1,119 @@
/*\
title: $:/core/modules/indexers/back-indexer.js
type: application/javascript
module-type: indexer
By parsing the tiddler text, indexes the tiddlers' back links, back transclusions, block level back links.
\*/
function BackIndexer(wiki) {
this.wiki = wiki;
}
BackIndexer.prototype.init = function() {
this.subIndexers = {
link: new BackSubIndexer(this,"extractLinks"),
transclude: new BackSubIndexer(this,"extractTranscludes"),
};
};
BackIndexer.prototype.rebuild = function() {
$tw.utils.each(this.subIndexers,function(subIndexer) {
subIndexer.rebuild();
});
};
BackIndexer.prototype.update = function(updateDescriptor) {
$tw.utils.each(this.subIndexers,function(subIndexer) {
subIndexer.update(updateDescriptor);
});
};
function BackSubIndexer(indexer,extractor) {
this.wiki = indexer.wiki;
this.indexer = indexer;
this.extractor = extractor;
/**
* {
* [target title, e.g. tiddler title being linked to]:
* {
* [source title, e.g. tiddler title that has link syntax in its text]: true
* }
* }
*/
this.index = null;
}
BackSubIndexer.prototype.init = function() {
// lazy init until first lookup
this.index = null;
}
BackSubIndexer.prototype._init = function() {
this.index = Object.create(null);
var self = this;
this.wiki.forEachTiddler(function(sourceTitle,tiddler) {
var newTargets = self._getTarget(tiddler);
$tw.utils.each(newTargets, function(target) {
if(!self.index[target]) {
self.index[target] = Object.create(null);
}
self.index[target][sourceTitle] = true;
});
});
}
BackSubIndexer.prototype.rebuild = function() {
this.index = null;
}
/*
* Get things that is being referenced in the text, e.g. tiddler names in the link syntax.
*/
BackSubIndexer.prototype._getTarget = function(tiddler) {
var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {});
if(parser) {
return this.wiki[this.extractor](parser.tree);
}
return [];
}
BackSubIndexer.prototype.update = function(updateDescriptor) {
// lazy init/update until first lookup
if(!this.index) {
return;
}
var newTargets = [],
oldTargets = [],
self = this;
if(updateDescriptor.old.exists) {
oldTargets = this._getTarget(updateDescriptor.old.tiddler);
}
if(updateDescriptor.new.exists) {
newTargets = this._getTarget(updateDescriptor.new.tiddler);
}
$tw.utils.each(oldTargets,function(target) {
if(self.index[target]) {
delete self.index[target][updateDescriptor.old.tiddler.fields.title];
}
});
$tw.utils.each(newTargets,function(target) {
if(!self.index[target]) {
self.index[target] = Object.create(null);
}
self.index[target][updateDescriptor.new.tiddler.fields.title] = true;
});
}
BackSubIndexer.prototype.lookup = function(title) {
if(!this.index) {
this._init();
}
if(this.index[title]) {
return Object.keys(this.index[title]);
} else {
return [];
}
}
exports.BackIndexer = BackIndexer;

View File

@@ -1,86 +0,0 @@
/*\
title: $:/core/modules/indexers/backlinks-indexer.js
type: application/javascript
module-type: indexer
Indexes the tiddlers' backlinks
\*/
(function(){
/*jslint node: true, browser: true */
/*global modules: false */
"use strict";
function BacklinksIndexer(wiki) {
this.wiki = wiki;
}
BacklinksIndexer.prototype.init = function() {
this.index = null;
}
BacklinksIndexer.prototype.rebuild = function() {
this.index = null;
}
BacklinksIndexer.prototype._getLinks = function(tiddler) {
var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {});
if(parser) {
return this.wiki.extractLinks(parser.tree);
}
return [];
}
BacklinksIndexer.prototype.update = function(updateDescriptor) {
if(!this.index) {
return;
}
var newLinks = [],
oldLinks = [],
self = this;
if(updateDescriptor.old.exists) {
oldLinks = this._getLinks(updateDescriptor.old.tiddler);
}
if(updateDescriptor.new.exists) {
newLinks = this._getLinks(updateDescriptor.new.tiddler);
}
$tw.utils.each(oldLinks,function(link) {
if(self.index[link]) {
delete self.index[link][updateDescriptor.old.tiddler.fields.title];
}
});
$tw.utils.each(newLinks,function(link) {
if(!self.index[link]) {
self.index[link] = Object.create(null);
}
self.index[link][updateDescriptor.new.tiddler.fields.title] = true;
});
}
BacklinksIndexer.prototype.lookup = function(title) {
if(!this.index) {
this.index = Object.create(null);
var self = this;
this.wiki.forEachTiddler(function(title,tiddler) {
var links = self._getLinks(tiddler);
$tw.utils.each(links, function(link) {
if(!self.index[link]) {
self.index[link] = Object.create(null);
}
self.index[link][title] = true;
});
});
}
if(this.index[title]) {
return Object.keys(this.index[title]);
} else {
return [];
}
}
exports.BacklinksIndexer = BacklinksIndexer;
})();

View File

@@ -35,9 +35,11 @@ exports.run = function(filter,format) {
// Collect all the fields // Collect all the fields
for(t=0;t<tiddlers.length; t++) { for(t=0;t<tiddlers.length; t++) {
tiddler = this.wiki.getTiddler(tiddlers[t]); tiddler = this.wiki.getTiddler(tiddlers[t]);
for(f in tiddler.fields) { if(tiddler) {
if(fields.indexOf(f) === -1) { for(f in tiddler.fields) {
fields.push(f); if(fields.indexOf(f) === -1) {
fields.push(f);
}
} }
} }
} }
@@ -60,8 +62,10 @@ exports.run = function(filter,format) {
for(var t=0;t<tiddlers.length; t++) { for(var t=0;t<tiddlers.length; t++) {
row = []; row = [];
tiddler = this.wiki.getTiddler(tiddlers[t]); tiddler = this.wiki.getTiddler(tiddlers[t]);
for(f=0; f<fields.length; f++) { if(tiddler) {
row.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || "" : "")); for(f=0; f<fields.length; f++) {
row.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || "" : ""));
}
} }
output.push(row.join(",")); output.push(row.join(","));
} }

View File

@@ -47,7 +47,11 @@ exports.startup = function() {
headers: getPropertiesWithPrefix(params,"header-"), headers: getPropertiesWithPrefix(params,"header-"),
passwordHeaders: getPropertiesWithPrefix(params,"password-header-"), passwordHeaders: getPropertiesWithPrefix(params,"password-header-"),
queryStrings: getPropertiesWithPrefix(params,"query-"), queryStrings: getPropertiesWithPrefix(params,"query-"),
passwordQueryStrings: getPropertiesWithPrefix(params,"password-query-") passwordQueryStrings: getPropertiesWithPrefix(params,"password-query-"),
basicAuthUsername: params["basic-auth-username"],
basicAuthUsernameFromStore: params["basic-auth-username-from-store"],
basicAuthPassword: params["basic-auth-password"],
basicAuthPasswordFromStore: params["basic-auth-password-from-store"]
}); });
}); });
$tw.rootWidget.addEventListener("tm-http-cancel-all-requests",function(event) { $tw.rootWidget.addEventListener("tm-http-cancel-all-requests",function(event) {

View File

@@ -100,6 +100,10 @@ headers: hashmap of header name to header value to be sent with the request
passwordHeaders: hashmap of header name to password store name to be sent with the request passwordHeaders: hashmap of header name to password store name to be sent with the request
queryStrings: hashmap of query string parameter name to parameter value to be sent with the request queryStrings: hashmap of query string parameter name to parameter value to be sent with the request
passwordQueryStrings: hashmap of query string parameter name to password store name to be sent with the request passwordQueryStrings: hashmap of query string parameter name to password store name to be sent with the request
basicAuthUsername: plain username for basic authentication
basicAuthUsernameFromStore: name of password store entry containing username
basicAuthPassword: plain password for basic authentication
basicAuthPasswordFromStore: name of password store entry containing password
*/ */
function HttpClientRequest(options) { function HttpClientRequest(options) {
var self = this; var self = this;
@@ -128,6 +132,11 @@ function HttpClientRequest(options) {
$tw.utils.each(options.passwordHeaders,function(value,name) { $tw.utils.each(options.passwordHeaders,function(value,name) {
self.requestHeaders[name] = $tw.utils.getPassword(value) || ""; self.requestHeaders[name] = $tw.utils.getPassword(value) || "";
}); });
this.basicAuthUsername = options.basicAuthUsername || (options.basicAuthUsernameFromStore && $tw.utils.getPassword(options.basicAuthUsernameFromStore)) || "";
this.basicAuthPassword = options.basicAuthPassword || (options.basicAuthPasswordFromStore && $tw.utils.getPassword(options.basicAuthPasswordFromStore)) || "";
if(this.basicAuthUsername && this.basicAuthPassword) {
this.requestHeaders.Authorization = "Basic " + $tw.utils.base64Encode(this.basicAuthUsername + ":" + this.basicAuthPassword);
}
} }
HttpClientRequest.prototype.send = function(callback) { HttpClientRequest.prototype.send = function(callback) {
@@ -289,7 +298,7 @@ exports.httpRequest = function(options) {
return; return;
} }
// Something went wrong // Something went wrong
options.callback($tw.language.getString("Error/XMLHttpRequest") + ": " + this.status,null,this); options.callback($tw.language.getString("Error/XMLHttpRequest") + ": " + this.status,this[returnProp],this);
} }
}; };
// Handle progress // Handle progress

View File

@@ -819,6 +819,15 @@ exports.hashString = function(str) {
},0); },0);
}; };
/*
Cryptographic hash function as used by sha256 filter operator
options.length .. number of characters returned defaults to 64
*/
exports.sha256 = function(str, options) {
options = options || {}
return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(str)).substr(0,options.length || 64);
}
/* /*
Base64 utility functions that work in either browser or Node.js Base64 utility functions that work in either browser or Node.js
*/ */
@@ -922,7 +931,7 @@ IE does not have sign function
*/ */
exports.sign = Math.sign || function(x) { exports.sign = Math.sign || function(x) {
x = +x; // convert to a number x = +x; // convert to a number
if (x === 0 || isNaN(x)) { if(x === 0 || isNaN(x)) {
return x; return x;
} }
return x > 0 ? 1 : -1; return x > 0 ? 1 : -1;
@@ -935,7 +944,7 @@ exports.strEndsWith = function(str,ending,position) {
if(str.endsWith) { if(str.endsWith) {
return str.endsWith(ending,position); return str.endsWith(ending,position);
} else { } else {
if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > str.length) { if(typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > str.length) {
position = str.length; position = str.length;
} }
position -= ending.length; position -= ending.length;

View File

@@ -119,7 +119,7 @@ DraggableWidget.prototype.refresh = function(changedTiddlers) {
return true; return true;
} else { } else {
if(changedAttributes["class"]) { if(changedAttributes["class"]) {
this.assignDomNodeClasses(); this.updateDomNodeClasses();
} }
this.assignAttributes(this.domNodes[0],{ this.assignAttributes(this.domNodes[0],{
changedAttributes: changedAttributes, changedAttributes: changedAttributes,
@@ -132,4 +132,4 @@ DraggableWidget.prototype.refresh = function(changedTiddlers) {
exports.draggable = DraggableWidget; exports.draggable = DraggableWidget;
})(); })();

View File

@@ -49,7 +49,7 @@ ImportVariablesWidget.prototype.execute = function(tiddlerList) {
this.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this); this.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this);
// Accumulate the <$set> widgets from each tiddler // Accumulate the <$set> widgets from each tiddler
$tw.utils.each(this.tiddlerList,function(title) { $tw.utils.each(this.tiddlerList,function(title) {
var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true, configTrimWhiteSpace:true}); var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true, configTrimWhiteSpace:false});
if(parser) { if(parser) {
var parseTreeNode = parser.tree[0]; var parseTreeNode = parser.tree[0];
while(parseTreeNode && ["setvariable","set","parameters"].indexOf(parseTreeNode.type) !== -1) { while(parseTreeNode && ["setvariable","set","parameters"].indexOf(parseTreeNode.type) !== -1) {

View File

@@ -42,24 +42,31 @@ Compute the internal state of the widget
*/ */
ParametersWidget.prototype.execute = function() { ParametersWidget.prototype.execute = function() {
var self = this; var self = this;
this.parametersDepth = Math.max(parseInt(this.getAttribute("$depth","1"),10) || 1,1);
// Find the parent transclusions // Find the parent transclusions
var pointer = this.getContainingTransclude(); var pointer = this.parentWidget,
depth = this.parametersDepth;
while(pointer) {
if(pointer instanceof TranscludeWidget) {
depth--;
if(depth <= 0) {
break;
}
}
pointer = pointer.parentWidget;
}
// Process each parameter // Process each parameter
if(pointer) { if(pointer instanceof TranscludeWidget) {
// It's important to remember this, because when we refresh, we'll need to make sure this widget is starting at the same index.
this.initialParameterIndex = pointer.parameterIndex;
// Get the value for each defined parameter // Get the value for each defined parameter
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(self.parseTreeNode),function(attr) { $tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(self.parseTreeNode),function(attr,index) {
var name = attr.name; var name = attr.name;
// If the attribute name starts with $$ then reduce to a single dollar // If the attribute name starts with $$ then reduce to a single dollar
if(name.substr(0,2) === "$$") { if(name.substr(0,2) === "$$") {
name = name.substr(1); name = name.substr(1);
} }
var value = pointer.getTransclusionParameter(name,self.getAttribute(attr.name,"")); var value = pointer.getTransclusionParameter(name,index,self.getAttribute(attr.name,""));
self.setVariable(name,value); self.setVariable(name,value);
}); });
// We remember where we left the unnamed parameter index.
this.finalParameterIndex = pointer.parameterIndex;
// Assign any metaparameters // Assign any metaparameters
$tw.utils.each(pointer.getTransclusionMetaParameters(),function(getValue,name) { $tw.utils.each(pointer.getTransclusionMetaParameters(),function(getValue,name) {
var variableName = self.getAttribute("$" + name); var variableName = self.getAttribute("$" + name);
@@ -77,29 +84,13 @@ Refresh the widget by ensuring our attributes are up to date
*/ */
ParametersWidget.prototype.refresh = function(changedTiddlers) { ParametersWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes(); var changedAttributes = this.computeAttributes();
var pointer = this.getContainingTransclude(); if(Object.keys(changedAttributes).length) {
var currentParameterIndex;
if(pointer) {
currentParameterIndex = pointer.parameterIndex;
}
if(Object.keys(changedAttributes).length || currentParameterIndex !== this.initialParameterIndex) {
this.refreshSelf(); this.refreshSelf();
return true; return true;
} else if(pointer) {
// We set the index for unnamed parameters for our $transclude widget in case any later $parameters show up. They need to be able to confirm their indices are starting in the right place, because if not, they need to refresh.
pointer.parameterIndex = this.finalParameterIndex;
} }
return this.refreshChildren(changedTiddlers); return this.refreshChildren(changedTiddlers);
}; };
ParametersWidget.prototype.getContainingTransclude = function() {
var pointer = this.parentWidget;
while(pointer && !(pointer instanceof TranscludeWidget)) {
pointer = pointer.parentWidget;
}
return pointer;
};
exports.parameters = ParametersWidget; exports.parameters = ParametersWidget;
})(); })();

View File

@@ -358,26 +358,14 @@ TranscludeWidget.prototype.getOrderedTransclusionParameters = function() {
}; };
/* /*
The parameter index indicates is used by internal $parameter widgets to sequentially assign unnamed parameters. Fetch the value of a parameter
*/ */
Object.defineProperty(TranscludeWidget.prototype, 'parameterIndex', { TranscludeWidget.prototype.getTransclusionParameter = function(name,index,defaultValue) {
get: function() { return this.claimedIndices || 0; },
set: function(value) { this.claimedIndices = value; }
});
/*
Fetch the value of a parameter given either its name or index
*/
TranscludeWidget.prototype.getTransclusionParameter = function(name,defaultValue) {
if(name in this.stringParametersByName) { if(name in this.stringParametersByName) {
return this.stringParametersByName[name]; return this.stringParametersByName[name];
} else { } else {
// Let's see if this name was already assigned an index
var index = this.parameterIndex;
var name = "" + index; var name = "" + index;
if(name in this.stringParametersByName) { if(name in this.stringParametersByName) {
// This parameter now corresponds to this index. No other parameters may correspond to it.
this.claimedIndices = index + 1;
return this.stringParametersByName[name]; return this.stringParametersByName[name];
} }
} }
@@ -460,8 +448,6 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/ */
TranscludeWidget.prototype.refresh = function(changedTiddlers) { TranscludeWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes(); var changedAttributes = this.computeAttributes();
// Reset the parameter index so that internal $parameter widgets can double-check their unnamed parameter indices.
this.parameterIndex = 0;
if(($tw.utils.count(changedAttributes) > 0) || (this.transcludeVariableIsFunction && this.functionNeedsRefresh()) || (!this.transcludeVariable && changedTiddlers[this.transcludeTitle] && this.parserNeedsRefresh())) { if(($tw.utils.count(changedAttributes) > 0) || (this.transcludeVariableIsFunction && this.functionNeedsRefresh()) || (!this.transcludeVariable && changedTiddlers[this.transcludeTitle] && this.parserNeedsRefresh())) {
this.refreshSelf(); this.refreshSelf();
return true; return true;

View File

@@ -534,8 +534,8 @@ Return an array of tiddler titles that link to the specified tiddler
*/ */
exports.getTiddlerBacklinks = function(targetTitle) { exports.getTiddlerBacklinks = function(targetTitle) {
var self = this, var self = this,
backlinksIndexer = this.getIndexer("BacklinksIndexer"), backIndexer = this.getIndexer("BackIndexer"),
backlinks = backlinksIndexer && backlinksIndexer.lookup(targetTitle); backlinks = backIndexer && backIndexer.subIndexers.link.lookup(targetTitle);
if(!backlinks) { if(!backlinks) {
backlinks = []; backlinks = [];
@@ -549,6 +549,68 @@ exports.getTiddlerBacklinks = function(targetTitle) {
return backlinks; return backlinks;
}; };
/*
Return an array of tiddler titles that are directly transcluded within the given parse tree
*/
exports.extractTranscludes = function(parseTreeRoot) {
// Count up the transcludes
var transcludes = [],
checkParseTree = function(parseTree, parentNode) {
for(var t=0; t<parseTree.length; t++) {
var parseTreeNode = parseTree[t];
if(parseTreeNode.type === "transclude" && parseTreeNode.attributes.$tiddler && parseTreeNode.attributes.$tiddler.type === "string") {
var value;
// if it is Transclusion with Templates like `{{Index||$:/core/ui/TagTemplate}}`, the `$tiddler` will point to the template. We need to find the actual target tiddler from parent node
if(parentNode && parentNode.type === "tiddler" && parentNode.attributes.tiddler && parentNode.attributes.tiddler.type === "string") {
value = parentNode.attributes.tiddler.value;
} else {
value = parseTreeNode.attributes.$tiddler.value;
}
if(transcludes.indexOf(value) === -1) {
transcludes.push(value);
}
}
if(parseTreeNode.children) {
checkParseTree(parseTreeNode.children, parseTreeNode);
}
}
};
checkParseTree(parseTreeRoot);
return transcludes;
};
/*
Return an array of tiddler titles that are transcluded from the specified tiddler
*/
exports.getTiddlerTranscludes = function(title) {
var self = this;
// We'll cache the transcludes so they only get computed if the tiddler changes
return this.getCacheForTiddler(title,"transcludes",function() {
// Parse the tiddler
var parser = self.parseTiddler(title);
if(parser) {
return self.extractTranscludes(parser.tree);
}
return [];
});
};
/*
Return an array of tiddler titles that transclude to the specified tiddler
*/
exports.getTiddlerBacktranscludes = function(targetTitle) {
var self = this,
backIndexer = this.getIndexer("BackIndexer"),
backtranscludes = backIndexer && backIndexer.subIndexers.transclude.lookup(targetTitle);
if(!backtranscludes) {
backtranscludes = [];
}
return backtranscludes;
};
/* /*
Return a hashmap of tiddler titles that are referenced but not defined. Each value is the number of times the missing tiddler is referenced Return a hashmap of tiddler titles that are referenced but not defined. Each value is the number of times the missing tiddler is referenced
*/ */

View File

@@ -40,10 +40,8 @@ caption: {{$:/language/Search/Filter/Caption}}
<$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/> <$action-sendmessage $message="tm-edit-tiddler" $param={{{ [<__tiddler__>get[text]] }}}/>
</$list></$list> </$list></$list>
\end \end
\whitespace trim \whitespace trim
<<lingo Filter/Hint>> <<lingo Filter/Hint>>
<div class="tc-search tc-advanced-search"> <div class="tc-search tc-advanced-search">
<$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>> <$keyboard key="((input-tab-right))" actions=<<set-next-input-tab>>>
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>> <$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">>>
@@ -65,11 +63,10 @@ caption: {{$:/language/Search/Filter/Caption}}
&#32; &#32;
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list> <$list filter="[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]"><$transclude/></$list>
</div> </div>
<$reveal state="$:/temp/advancedsearch" type="nomatch" text=""> <$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>"> <$set name="resultCount" value="<$count filter={{$:/temp/advancedsearch}}/>">
<div class="tc-search-results"> <div class="tc-search-results">
<<lingo Filter/Matches>> <p><<lingo Filter/Matches>></p>
<$list filter={{$:/temp/advancedsearch}}> <$list filter={{$:/temp/advancedsearch}}>
<span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}> <span class={{{[<currentTiddler>addsuffix[-primaryList]] -[[$:/temp/advancedsearch/selected-item]get[text]] +[then[]else[tc-list-item-selected]] }}}>
<$transclude tiddler="$:/core/ui/ListItemTemplate"/> <$transclude tiddler="$:/core/ui/ListItemTemplate"/>

View File

@@ -54,17 +54,18 @@ caption: {{$:/language/Search/Standard/Caption}}
variable="listItem"> variable="listItem">
<$vars <$vars
userInput={{{ [[$:/temp/advancedsearch]get[text]] }}} userInput={{{ [[$:/temp/advancedsearch]get[text]] }}}
configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}} configTiddler={{{ [[$:/state/advancedsearch/standard/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}
searchListState="$:/temp/advancedsearch/selected-item"> searchListState="$:/temp/advancedsearch/selected-item">
<$list <$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]">
filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]"
emptyMessage="<$list filter='[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]'><$transclude/></$list>">
<$macrocall $name="tabs" <$macrocall $name="tabs"
tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]" tabsList="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"
default={{$:/config/SearchResults/Default}} default={{$:/config/SearchResults/Default}}
actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<currentTab>>/>" actions="<$action-setfield $tiddler='$:/state/advancedsearch/standard/currentTab' text=<<currentTab>>/>"
explicitState="$:/state/tab/search-results/advancedsearch" /> explicitState="$:/state/tab/search-results/advancedsearch" />
</$list> </$list>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]] :else[[]]">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]"><$transclude mode="block"/></$list>
</$list>
</$vars> </$vars>
</$list> </$list>
</$reveal> </$reveal>

View File

@@ -2,10 +2,19 @@ title: $:/core/ui/ControlPanel/Saving/DownloadSaver
tags: $:/tags/ControlPanel/Saving tags: $:/tags/ControlPanel/Saving
caption: {{$:/language/ControlPanel/Saving/DownloadSaver/Caption}} caption: {{$:/language/ControlPanel/Saving/DownloadSaver/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Saving/DownloadSaver/ \define lingo-base() $:/language/ControlPanel/Saving/DownloadSaver/
<div class="tc-control-panel-saving" data-setting-title=<<currentTab>>>
<<lingo Hint>> <<lingo Hint>>
!! <$link to="$:/config/DownloadSaver/AutoSave"><<lingo AutoSave/Hint>></$link> !!.tc-control-panel-accent <$link to="$:/config/DownloadSaver/AutoSave"><<lingo AutoSave/Hint>></$link>
<$checkbox tiddler="$:/config/DownloadSaver/AutoSave" field="text" checked="yes" unchecked="no" default="no"> <<lingo AutoSave/Description>> </$checkbox> <$checkbox tiddler="$:/config/DownloadSaver/AutoSave"
field="text" checked="yes" unchecked="no" default="no"
class="tc-control-panel-item"
>
<span class="tc-tiny-gap-left"><<lingo AutoSave/Description>></span>
</$checkbox>
</div>

View File

@@ -3,14 +3,22 @@ tags: $:/tags/ControlPanel/Saving
caption: {{$:/language/ControlPanel/Saving/General/Caption}} caption: {{$:/language/ControlPanel/Saving/General/Caption}}
list-before: list-before:
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/ \define lingo-base() $:/language/ControlPanel/Settings/
<div class="tc-control-panel-saving" data-setting-title=<<currentTab>>>
{{$:/language/ControlPanel/Saving/General/Hint}} {{$:/language/ControlPanel/Saving/General/Hint}}
!! <$link to="$:/config/AutoSave"><<lingo AutoSave/Caption>></$link> !!.tc-control-panel-accent <$link to="$:/config/AutoSave"><<lingo AutoSave/Caption>></$link>
<<lingo AutoSave/Hint>> <<lingo AutoSave/Hint>>
<$radio tiddler="$:/config/AutoSave" value="yes"> <<lingo AutoSave/Enabled/Description>> </$radio> <$radio tiddler="$:/config/AutoSave" value="yes">
<span class="tc-tiny-gap-left"><<lingo AutoSave/Enabled/Description>></span>
</$radio>
<$radio tiddler="$:/config/AutoSave" value="no"> <<lingo AutoSave/Disabled/Description>> </$radio> <$radio tiddler="$:/config/AutoSave" value="no">
<span class="tc-tiny-gap-left"><<lingo AutoSave/Disabled/Description>></span>
</$radio>
</div>

View File

@@ -2,7 +2,16 @@ title: $:/core/ui/ControlPanel/Settings/CamelCase
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/CamelCase/Caption}} caption: {{$:/language/ControlPanel/Settings/CamelCase/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/CamelCase/ \define lingo-base() $:/language/ControlPanel/Settings/CamelCase/
<<lingo Hint>> <<lingo Hint>>
<$checkbox tiddler="$:/config/WikiParserRules/Inline/wikilink" field="text" checked="enable" unchecked="disable" default="enable"> <$link to="$:/config/WikiParserRules/Inline/wikilink"><<lingo Description>></$link> </$checkbox> <$checkbox tiddler="$:/config/WikiParserRules/Inline/wikilink"
field="text" checked="enable" unchecked="disable" default="enable"
class="tc-control-panel-item"
>
<$link to="$:/config/WikiParserRules/Inline/wikilink" class="tc-tiny-gap-left">
<<lingo Description>>
</$link>
</$checkbox>

View File

@@ -2,13 +2,18 @@ caption: {{$:/language/ControlPanel/Settings/DefaultMoreSidebarTab/Caption}}
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
title: $:/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab title: $:/core/ui/ControlPanel/Settings/DefaultMoreSidebarTab
\define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/
\whitespace trim \whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/
<$link to="$:/config/DefaultMoreSidebarTab"><<lingo Hint>></$link> <$link to="$:/config/DefaultMoreSidebarTab" class="tc-control-panel-item">
<<lingo Hint>>
</$link>
<$select tiddler="$:/config/DefaultMoreSidebarTab"> <$select tiddler="$:/config/DefaultMoreSidebarTab" class="tc-select">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]">
<option value=<<currentTiddler>>><$transclude field="caption"><$text text=<<currentTiddler>>/></$transclude></option> <option value=<<currentTiddler>>><$transclude field="caption">
</$list> <$text text=<<currentTiddler>>/>
</$transclude>
</option>
</$list>
</$select> </$select>

View File

@@ -5,10 +5,16 @@ title: $:/core/ui/ControlPanel/Settings/DefaultSidebarTab
\define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/ \define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/
\whitespace trim \whitespace trim
<$link to="$:/config/DefaultSidebarTab"><<lingo Hint>></$link> <$link to="$:/config/DefaultSidebarTab" class="tc-control-panel-item">
<<lingo Hint>>
</$link>
<$select tiddler="$:/config/DefaultSidebarTab"> <$select tiddler="$:/config/DefaultSidebarTab" class="tc-select">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]">
<option value=<<currentTiddler>>><$transclude field="caption"><$text text=<<currentTiddler>>/></$transclude></option> <option value=<<currentTiddler>>>
</$list> <$transclude field="caption">
<$text text=<<currentTiddler>>/>
</$transclude>
</option>
</$list>
</$select> </$select>

View File

@@ -2,8 +2,15 @@ title: $:/core/ui/ControlPanel/Settings/EditorToolbar
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/EditorToolbar/Caption}} caption: {{$:/language/ControlPanel/Settings/EditorToolbar/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/EditorToolbar/ \define lingo-base() $:/language/ControlPanel/Settings/EditorToolbar/
<<lingo Hint>> <<lingo Hint>>
<$checkbox tiddler="$:/config/TextEditor/EnableToolbar" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/TextEditor/EnableToolbar"><<lingo Description>></$link> </$checkbox> <$checkbox tiddler="$:/config/TextEditor/EnableToolbar"
field="text" checked="yes" unchecked="no" default="yes"
class="tc-control-panel-item"
>
<$link to="$:/config/TextEditor/EnableToolbar" class="tc-tiny-gap-left">
<<lingo Description>>
</$link>
</$checkbox>

View File

@@ -2,9 +2,17 @@ title: $:/core/ui/ControlPanel/Settings/InfoPanelMode
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/InfoPanelMode/Caption}} caption: {{$:/language/ControlPanel/Settings/InfoPanelMode/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/InfoPanelMode/ \define lingo-base() $:/language/ControlPanel/Settings/InfoPanelMode/
<$link to="$:/config/TiddlerInfo/Mode"><<lingo Hint>></$link>
<$radio tiddler="$:/config/TiddlerInfo/Mode" value="popup"> <<lingo Popup/Description>> </$radio> <$link to="$:/config/TiddlerInfo/Mode" class="tc-control-panel-item">
<<lingo Hint>>
</$link>
<$radio tiddler="$:/config/TiddlerInfo/Mode" value="sticky"> <<lingo Sticky/Description>> </$radio> <$radio tiddler="$:/config/TiddlerInfo/Mode" value="popup">
<span class="tc-tiny-gap-left"><<lingo Popup/Description>></span>
</$radio>
<$radio tiddler="$:/config/TiddlerInfo/Mode" value="sticky">
<span class="tc-tiny-gap-left"><<lingo Sticky/Description>></span>
</$radio>

View File

@@ -2,21 +2,25 @@ title: $:/core/ui/ControlPanel/Settings/LinkToBehaviour
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}} caption: {{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}}
\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/
\whitespace trim \whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/
<$link to="$:/config/Navigation/openLinkFromInsideRiver"><<lingo "InsideRiver/Hint">></$link> <$link to="$:/config/Navigation/openLinkFromInsideRiver" class="tc-control-panel-item">
<<lingo "InsideRiver/Hint">>
</$link>
<$select tiddler="$:/config/Navigation/openLinkFromInsideRiver"> <$select tiddler="$:/config/Navigation/openLinkFromInsideRiver" class="tc-select">
<option value="above"><<lingo "OpenAbove">></option> <option value="above"><<lingo "OpenAbove">></option>
<option value="below"><<lingo "OpenBelow">></option> <option value="below"><<lingo "OpenBelow">></option>
<option value="top"><<lingo "OpenAtTop">></option> <option value="top"><<lingo "OpenAtTop">></option>
<option value="bottom"><<lingo "OpenAtBottom">></option> <option value="bottom"><<lingo "OpenAtBottom">></option>
</$select> </$select>
<$link to="$:/config/Navigation/openLinkFromOutsideRiver"><<lingo "OutsideRiver/Hint">></$link> <$link to="$:/config/Navigation/openLinkFromOutsideRiver" class="tc-control-panel-item">
<<lingo "OutsideRiver/Hint">>
</$link>
<$select tiddler="$:/config/Navigation/openLinkFromOutsideRiver"> <$select tiddler="$:/config/Navigation/openLinkFromOutsideRiver" class="tc-select">
<option value="top"><<lingo "OpenAtTop">></option> <option value="top"><<lingo "OpenAtTop">></option>
<option value="bottom"><<lingo "OpenAtBottom">></option> <option value="bottom"><<lingo "OpenAtBottom">></option>
</$select> </$select>

View File

@@ -2,8 +2,12 @@ title: $:/core/ui/ControlPanel/Settings/MissingLinks
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/MissingLinks/Caption}} caption: {{$:/language/ControlPanel/Settings/MissingLinks/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/MissingLinks/ \define lingo-base() $:/language/ControlPanel/Settings/MissingLinks/
<<lingo Hint>> <<lingo Hint>>
<$checkbox tiddler="$:/config/MissingLinks" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/MissingLinks"><<lingo Description>></$link> </$checkbox> <$checkbox tiddler="$:/config/MissingLinks" field="text" checked="yes" unchecked="no" default="yes">
<$link to="$:/config/MissingLinks" class="tc-control-panel-item">
<span class="tc-tiny-gap-left"><<lingo Description>></span>
</$link>
</$checkbox>

View File

@@ -2,12 +2,21 @@ title: $:/core/ui/ControlPanel/Settings/NavigationAddressBar
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/NavigationAddressBar/Caption}} caption: {{$:/language/ControlPanel/Settings/NavigationAddressBar/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/NavigationAddressBar/ \define lingo-base() $:/language/ControlPanel/Settings/NavigationAddressBar/
<$link to="$:/config/Navigation/UpdateAddressBar"><<lingo Hint>></$link> <$link to="$:/config/Navigation/UpdateAddressBar" class="tc-control-panel-item">
<<lingo Hint>>
</$link>
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permaview"> <<lingo Permaview/Description>> </$radio> <$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permaview">
<span class="tc-tiny-gap-left"><<lingo Permaview/Description>></span>
</$radio>
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permalink"> <<lingo Permalink/Description>> </$radio> <$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permalink">
<span class="tc-tiny-gap-left"><<lingo Permalink/Description>></span>
</$radio>
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="no"> <<lingo No/Description>> </$radio> <$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="no">
<span class="tc-tiny-gap-left"><<lingo No/Description>></span>
</$radio>

View File

@@ -2,9 +2,17 @@ title: $:/core/ui/ControlPanel/Settings/NavigationHistory
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/NavigationHistory/Caption}} caption: {{$:/language/ControlPanel/Settings/NavigationHistory/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/NavigationHistory/ \define lingo-base() $:/language/ControlPanel/Settings/NavigationHistory/
<$link to="$:/config/Navigation/UpdateHistory"><<lingo Hint>></$link>
<$radio tiddler="$:/config/Navigation/UpdateHistory" value="yes"> <<lingo Yes/Description>> </$radio> <$link to="$:/config/Navigation/UpdateHistory" class="tc-control-panel-item">
<<lingo Hint>>
</$link>
<$radio tiddler="$:/config/Navigation/UpdateHistory" value="no"> <<lingo No/Description>> </$radio> <$radio tiddler="$:/config/Navigation/UpdateHistory" value="yes">
<span class="tc-tiny-gap-left"><<lingo Yes/Description>></span>
</$radio>
<$radio tiddler="$:/config/Navigation/UpdateHistory" value="no">
<span class="tc-tiny-gap-left"><<lingo No/Description>></span>
</$radio>

View File

@@ -2,9 +2,24 @@ title: $:/core/ui/ControlPanel/Settings/NavigationPermalinkviewMode
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/Caption}} caption: {{$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/NavigationPermalinkviewMode/ \define lingo-base() $:/language/ControlPanel/Settings/NavigationPermalinkviewMode/
<<lingo Hint>> <<lingo Hint>>
<$checkbox tiddler="$:/config/Navigation/Permalinkview/CopyToClipboard" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Navigation/Permalinkview/CopyToClipboard"><<lingo CopyToClipboard/Description>></$link> </$checkbox> <$checkbox tiddler="$:/config/Navigation/Permalinkview/CopyToClipboard"
field="text" checked="yes" unchecked="no" default="yes"
class="tc-control-panel-item"
>
<$link to="$:/config/Navigation/Permalinkview/CopyToClipboard" class="tc-tiny-gap-left">
<<lingo CopyToClipboard/Description>>
</$link>
</$checkbox>
<$checkbox tiddler="$:/config/Navigation/Permalinkview/UpdateAddressBar" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Navigation/Permalinkview/UpdateAddressBar"><<lingo UpdateAddressBar/Description>></$link> </$checkbox> <$checkbox tiddler="$:/config/Navigation/Permalinkview/UpdateAddressBar"
field="text" checked="yes" unchecked="no" default="yes"
class="tc-control-panel-item"
>
<$link to="$:/config/Navigation/Permalinkview/UpdateAddressBar" class="tc-tiny-gap-left">
<<lingo UpdateAddressBar/Description>>
</$link>
</$checkbox>

View File

@@ -2,7 +2,15 @@ title: $:/core/ui/ControlPanel/Settings/PerformanceInstrumentation
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption}} caption: {{$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/PerformanceInstrumentation/ \define lingo-base() $:/language/ControlPanel/Settings/PerformanceInstrumentation/
<<lingo Hint>> <<lingo Hint>>
<$checkbox tiddler="$:/config/Performance/Instrumentation" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Performance/Instrumentation"><<lingo Description>></$link> </$checkbox> <$checkbox tiddler="$:/config/Performance/Instrumentation"
field="text" checked="yes" unchecked="no" default="no"
class="tc-control-panel-item"
>
<$link to="$:/config/Performance/Instrumentation" class="tc-tiny-gap-left">
<<lingo Description>>
</$link>
</$checkbox>

View File

@@ -2,9 +2,17 @@ title: $:/core/ui/ControlPanel/Settings/TitleLinks
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/TitleLinks/Caption}} caption: {{$:/language/ControlPanel/Settings/TitleLinks/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/TitleLinks/ \define lingo-base() $:/language/ControlPanel/Settings/TitleLinks/
<$link to="$:/config/Tiddlers/TitleLinks"><<lingo Hint>></$link>
<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="yes"> <<lingo Yes/Description>> </$radio> <$link to="$:/config/Tiddlers/TitleLinks" class="tc-control-panel-item">
<<lingo Hint>>
</$link>
<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="no"> <<lingo No/Description>> </$radio> <$radio tiddler="$:/config/Tiddlers/TitleLinks" value="yes">
<span class="tc-tiny-gap-left"><<lingo Yes/Description>></span>
</$radio>
<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="no">
<span class="tc-tiny-gap-left"><<lingo No/Description>></span>
</$radio>

View File

@@ -2,12 +2,15 @@ title: $:/core/ui/ControlPanel/Settings/ToolbarButtonStyle
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}} caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}}
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/
\whitespace trim \whitespace trim
<$link to="$:/config/Toolbar/ButtonClass"><<lingo "Hint">></$link> \define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/
<$select tiddler="$:/config/Toolbar/ButtonClass"> <$link to="$:/config/Toolbar/ButtonClass" class="tc-control-panel-item">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ToolbarButtonStyle]]"> <<lingo "Hint">>
<option value={{!!text}}>{{!!caption}}</option> </$link>
</$list>
<$select tiddler="$:/config/Toolbar/ButtonClass" class="tc-select">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ToolbarButtonStyle]]">
<option value={{!!text}}>{{!!caption}}</option>
</$list>
</$select> </$select>

View File

@@ -2,9 +2,24 @@ title: $:/core/ui/ControlPanel/Settings/ToolbarButtons
tags: $:/tags/ControlPanel/Settings tags: $:/tags/ControlPanel/Settings
caption: {{$:/language/ControlPanel/Settings/ToolbarButtons/Caption}} caption: {{$:/language/ControlPanel/Settings/ToolbarButtons/Caption}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtons/ \define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtons/
<<lingo Hint>> <<lingo Hint>>
<$checkbox tiddler="$:/config/Toolbar/Icons" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Toolbar/Icons"><<lingo Icons/Description>></$link> </$checkbox> <$checkbox tiddler="$:/config/Toolbar/Icons"
field="text" checked="yes" unchecked="no" default="yes"
class="tc-control-panel-item"
>
<$link to="$:/config/Toolbar/Icons" class="tc-tiny-gap-left">
<<lingo Icons/Description>>
</$link>
</$checkbox>
<$checkbox tiddler="$:/config/Toolbar/Text" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Toolbar/Text"><<lingo Text/Description>></$link> </$checkbox> <$checkbox tiddler="$:/config/Toolbar/Text"
field="text" checked="yes" unchecked="no" default="no"
class="tc-control-panel-item"
>
<$link to="$:/config/Toolbar/Text" class="tc-tiny-gap-left">
<<lingo Text/Description>>
</$link>
</$checkbox>

View File

@@ -9,9 +9,9 @@ list-before:
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]">
<div style="border-top:1px solid #eee;"> <div class="tc-control-panel-setting" data-setting-title=<<currentTiddler>> style="border-top:1px solid #eee;">
!! <$link><$transclude field="caption"/></$link> !!.tc-control-panel-accent <$link><$transclude field="caption"/></$link>
<$transclude/> <$transclude/>

View File

@@ -1,5 +1,9 @@
title: $:/core/ui/EditTemplate/body/default title: $:/core/ui/EditTemplate/body/default
\function edit-preview-state()
[{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualified-preview-state>] +[get[text]] :else[[no]]
\end
\define config-visibility-title() \define config-visibility-title()
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
\end \end
@@ -10,12 +14,13 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
\whitespace trim \whitespace trim
<$let <$let
editPreviewStateTiddler={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}} qualified-preview-state=<<qualify "$:/state/showeditpreview">>
editPreviewStateTiddler={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualified-preview-state>] }}}
importTitle=<<qualify $:/ImportImage>> importTitle=<<qualify $:/ImportImage>>
importState=<<qualify $:/state/ImportImage>> > importState=<<qualify $:/state/ImportImage>> >
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> > <$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> >
<div> <div>
<div class={{{ [<editPreviewStateTiddler>get[text]match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}> <div class={{{ [<edit-preview-state>match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}>
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/> <$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>

View File

@@ -1,12 +1,18 @@
title: $:/core/ui/EditTemplate/controls title: $:/core/ui/EditTemplate/controls
tags: $:/tags/EditTemplate tags: $:/tags/EditTemplate
\define config-title() \define config-title() $:/config/EditToolbarButtons/Visibility/$(listItem)$
$:/config/EditToolbarButtons/Visibility/$(listItem)$
\end
\whitespace trim \whitespace trim
<div class="tc-tiddler-title tc-tiddler-edit-title"> <div class="tc-tiddler-title tc-tiddler-edit-title">
<$view field="title"/> <$view field="title"/>
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$let tv-config-toolbar-class={{{ [enlist<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]]}}}><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$let></$list></span> <span class="tc-tiddler-controls tc-titlebar">
<div style="clear: both;"></div> <$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem">
<$let tv-config-toolbar-class={{{ [enlist<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]] }}}>
<$reveal type="nomatch" state=<<config-title>> text="hide">
<$transclude $tiddler=<<listItem>>/>
</$reveal>
</$let>
</$list>
</span>
<div style="clear: both;"></div>
</div> </div>

View File

@@ -3,39 +3,63 @@ tags: $:/tags/EditTemplate
\whitespace trim \whitespace trim
\define lingo-base() $:/language/EditTemplate/ \procedure lingo-base() $:/language/EditTemplate/
\define tag-styles() \procedure tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags")
background-color:$(backgroundColor)$; <$wikify name="foregroundColor"
fill:$(foregroundColor)$; text="""<$macrocall $name="contrastcolour"
color:$(foregroundColor)$; target=<<colour>>
fallbackTarget=<<fallbackTarget>>
colourA=<<colourA>>
colourB=<<colourB>>/>
"""
>
<$let backgroundColor=<<colour>> >
<span class="tc-tag-label tc-tag-list-item tc-small-gap-right"
data-tag-title=<<currentTiddler>>
style.color=<<foregroundColor>>
style.fill=<<foregroundColor>>
style.background-color=<<backgroundColor>>
>
<$transclude tiddler=<<icon>>/>
<$view field="title" format="text"/>
<$button class="tc-btn-invisible tc-remove-tag-button"
style.fill=<<foregroundColor>>
>
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="-[{!!title}]"/>
{{$:/core/images/close-button}}
</$button>
</span>
</$let>
</$wikify>
\end \end
\define tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags") \procedure tag-body(colour,palette,icon,tagField:"tags")
\whitespace trim <$macrocall $name="tag-body-inner"
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$"""> colour=`$(colour)$`
<span style=<<tag-styles>> class="tc-tag-label tc-tag-list-item tc-small-gap-right" data-tag-title=<<currentTiddler>>> colourA={{{ [<palette>getindex[foreground]] }}}
<$transclude tiddler="""$icon$"""/><$view field="title" format="text"/> colourB={{{ [<palette>getindex[background]] }}}
<$button class="tc-btn-invisible tc-remove-tag-button" style=<<tag-styles>>><$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="-[{!!title}]"/>{{$:/core/images/close-button}}</$button> fallbackTarget={{{ [<palette>getindex[tag-background]] }}}
</span> icon=<<icon>>
</$vars> tagField=<<tagField>>
/>
\end \end
\define tag-body(colour,palette,icon,tagField:"tags") \procedure edit-tags-template(tagField:"tags")
<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} icon="""$icon$""" tagField=<<__tagField__>>/>
\end
\define edit-tags-template(tagField:"tags")
\whitespace trim
<div class="tc-edit-tags"> <div class="tc-edit-tags">
<$list filter="[list[!!$tagField$]sort[title]]" storyview="pop"> <$list filter="[<currentTiddler>get<tagField>enlist-input[]sort[title]]" storyview="pop">
<$macrocall $name="tag-body" colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} palette={{$:/palette}} icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} tagField=<<__tagField__>>/> <$macrocall $name="tag-body"
</$list> colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}
<$vars tabIndex={{$:/config/EditTabIndex}} cancelPopups="yes"> palette={{$:/palette}}
<$macrocall $name="tag-picker" tagField=<<__tagField__>>/> icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}}
</$vars> tagField=<<tagField>>
/>
</$list>
<$let tabIndex={{$:/config/EditTabIndex}} cancelPopups="yes">
<$macrocall $name="tag-picker" tagField=<<tagField>>/>
</$let>
</div> </div>
\end \end
<$set name="saveTiddler" value=<<currentTiddler>>> <$let saveTiddler=<<currentTiddler>>>
<$macrocall $name="edit-tags-template" tagField=<<tagField>>/> <$macrocall $name="edit-tags-template" tagField=<<tagField>>/>
</$set> </$let>

View File

@@ -10,7 +10,7 @@ shortcuts: ((preview))
\whitespace trim \whitespace trim
<span> <span>
<$transclude $tiddler={{{ [<editPreviewStateTiddler>get[text]match[yes]then[$:/core/images/preview-open]else[$:/core/images/preview-closed]] }}} /> <$transclude $tiddler={{{ [<edit-preview-state>match[yes]then[$:/core/images/preview-open]else[$:/core/images/preview-closed]] }}} />
</span> </span>
<$action-setfield $tiddler=<<editPreviewStateTiddler>> $value={{{ [<editPreviewStateTiddler>get[text]toggle[yes],[no]] }}} /> <$action-setfield $tiddler=<<editPreviewStateTiddler>> $value={{{ [<editPreviewStateTiddler>get[text]toggle[yes],[no]] }}} />
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/> <$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>

View File

@@ -1,17 +1,16 @@
title: $:/core/ui/PageTemplate/pagecontrols title: $:/core/ui/PageTemplate/pagecontrols
\whitespace trim \whitespace trim
\define config-title() \define config-title() $:/config/PageControlButtons/Visibility/$(listItem)$
$:/config/PageControlButtons/Visibility/$(listItem)$
\end
<div class="tc-page-controls"> <div class="tc-page-controls">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]" variable="listItem">
<$set name="hidden" value=<<config-title>>> <$set name="hidden" value=<<config-title>>>
<$list filter="[<hidden>!text[hide]]" storyview="pop" variable="ignore"> <$list filter="[<hidden>!text[hide]]" storyview="pop" variable="ignore">
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"> <$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
<$transclude tiddler=<<listItem>> mode="inline"/> <$transclude tiddler=<<listItem>> mode="inline"/>
</$set> </$set>
</$list> </$list>
</$set> </$set>
</$list> </$list>
</div> </div>

View File

@@ -4,48 +4,41 @@ caption: {{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}
description: {{$:/language/Buttons/More/Hint}} description: {{$:/language/Buttons/More/Hint}}
\whitespace trim \whitespace trim
\define config-title() \define config-title() $:/config/PageControlButtons/Visibility/$(listItem)$
$:/config/PageControlButtons/Visibility/$(listItem)$
\end
<$button popup=<<qualify "$:/state/popup/more">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/core/images/down-arrow}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/More/Caption}}/>
</span>
</$list>
</$button><$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
<div class="tc-drop-down">
<$set name="tv-config-toolbar-icons" value="yes">
<$set name="tv-config-toolbar-text" value="yes">
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]" variable="listItem">
<$reveal type="match" state=<<config-title>> text="hide">
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
<$transclude tiddler=<<listItem>> mode="inline"/>
</$set>
</$reveal>
</$list>
</$set>
</$set>
</$set>
</div>
<$button popup=<<qualify "$:/state/popup/more">>
tooltip={{$:/language/Buttons/More/Hint}}
aria-label={{$:/language/Buttons/More/Caption}}
class=<<tv-config-toolbar-class>>
selectedClass="tc-selected"
>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/core/images/down-arrow}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/More/Caption}}/>
</span>
</$list>
</$button>
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
<div class="tc-drop-down">
<$set name="tv-config-toolbar-icons" value="yes">
<$set name="tv-config-toolbar-text" value="yes">
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]"
variable="listItem"
>
<$reveal type="match" state=<<config-title>> text="hide">
<$set name="tv-config-toolbar-class"
filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"
>
<$transclude tiddler=<<listItem>> mode="inline"/>
</$set>
</$reveal>
</$list>
</$set>
</$set>
</$set>
</div>
</$reveal> </$reveal>

View File

@@ -1,7 +1,7 @@
title: $:/core/ui/PageTemplate title: $:/core/ui/PageTemplate
name: {{$:/language/PageTemplate/Name}} name: {{$:/language/PageTemplate/Name}}
description: {{$:/language/PageTemplate/Description}} description: {{$:/language/PageTemplate/Description}}
icon: $:/core/images/layout-button icon: $:/core/images/default-layout
code-body: yes code-body: yes
\whitespace trim \whitespace trim

View File

@@ -2,31 +2,38 @@ title: $:/core/ui/ViewTemplate/title
tags: $:/tags/ViewTemplate tags: $:/tags/ViewTemplate
\whitespace trim \whitespace trim
\define title-styles() \define title-styles() fill:$(foregroundColor)$;
fill:$(foregroundColor)$;
\end
<div class="tc-tiddler-title"> <div class="tc-tiddler-title">
<div class="tc-titlebar"> <div class="tc-titlebar">
<span class="tc-tiddler-controls"> <span class="tc-tiddler-controls">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]" storyview="pop" variable="listItem"><$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"><$transclude tiddler=<<listItem>>/></$set></$list> <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] :filter[lookup[$:/config/ViewToolbarButtons/Visibility/]!match[hide]]"
</span> storyview="pop"
<$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}> variable="listItem"
<$link> >
<$list filter="[<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] +[!is[blank]]" variable="ignore"> <$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
<$let foregroundColor={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}> <$transclude tiddler=<<listItem>>/>
<span class="tc-tiddler-title-icon" style=<<title-styles>>> </$set>
{{||$:/core/ui/TiddlerIcon}} </$list>
</span> </span>
</$let> <$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}>
</$list> <$link>
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/title/default]] }}} /> <$list filter="[<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] +[!is[blank]]"
</$link> variable="ignore"
</$set> >
</div> <$let foregroundColor={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
<span class="tc-tiddler-title-icon" style=<<title-styles>>>
<$reveal type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tc-tiddler-info tc-popup-handle" animate="yes" retain="yes"> {{||$:/core/ui/TiddlerIcon}}
</span>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfoSegment]!has[draft.of]] [[$:/core/ui/TiddlerInfo]]" variable="listItem"><$transclude tiddler=<<listItem>> mode="block"/></$list> </$let>
</$list>
</$reveal> <$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/title/default]] }}} />
</$link>
</$set>
</div>
<$reveal tag="div" type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tc-tiddler-info tc-popup-handle" animate="yes" retain="yes">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfoSegment]!has[draft.of]] [[$:/core/ui/TiddlerInfo]]" variable="listItem">
<$transclude tiddler=<<listItem>> mode="block"/>
</$list>
</$reveal>
</div> </div>

View File

@@ -4,49 +4,41 @@ caption: {{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}
description: {{$:/language/Buttons/More/Hint}} description: {{$:/language/Buttons/More/Hint}}
\whitespace trim \whitespace trim
\define config-title() \define config-title() $:/config/ViewToolbarButtons/Visibility/$(listItem)$
$:/config/ViewToolbarButtons/Visibility/$(listItem)$
\end <$button popup=<<qualify "$:/state/popup/more">>
<$button popup=<<qualify "$:/state/popup/more">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected"> tooltip={{$:/language/Buttons/More/Hint}}
<$list filter="[<tv-config-toolbar-icons>match[yes]]"> aria-label={{$:/language/Buttons/More/Caption}}
{{$:/core/images/down-arrow}} class=<<tv-config-toolbar-class>>
</$list> selectedClass="tc-selected"
<$list filter="[<tv-config-toolbar-text>match[yes]]"> >
<span class="tc-btn-text"> <$list filter="[<tv-config-toolbar-icons>match[yes]]">
<$text text={{$:/language/Buttons/More/Caption}}/> {{$:/core/images/down-arrow}}
</span> </$list>
</$list> <$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/More/Caption}}/>
</span>
</$list>
</$button> </$button>
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="belowleft" animate="yes"> <$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="belowleft" animate="yes">
<div class="tc-drop-down">
<div class="tc-drop-down"> <$set name="tv-config-toolbar-icons" value="yes">
<$set name="tv-config-toolbar-text" value="yes">
<$set name="tv-config-toolbar-icons" value="yes"> <$set name="tv-config-toolbar-class" value="tc-btn-invisible">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]"
<$set name="tv-config-toolbar-text" value="yes"> variable="listItem"
>
<$set name="tv-config-toolbar-class" value="tc-btn-invisible"> <$reveal type="match" state=<<config-title>> text="hide">
<$set name="tv-config-toolbar-class"
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" variable="listItem"> filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"
>
<$reveal type="match" state=<<config-title>> text="hide"> <$transclude tiddler=<<listItem>> mode="inline"/>
</$set>
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"> </$reveal>
</$list>
<$transclude tiddler=<<listItem>> mode="inline"/> </$set>
</$set>
</$set> </$set>
</div>
</$reveal>
</$list>
</$set>
</$set>
</$set>
</div>
</$reveal> </$reveal>

View File

@@ -1,76 +1,69 @@
title: $:/core/macros/CSS title: $:/core/macros/CSS
tags: $:/tags/Macro tags: $:/tags/Macro $:/tags/Global
\define colour(name) \procedure colour(name)
<$transclude tiddler={{$:/palette}} index="$name$"><$transclude tiddler="$:/palettes/Vanilla" index="$name$"><$transclude tiddler="$:/config/DefaultColourMappings/$name$"/></$transclude></$transclude> \whitespace trim
<$transclude $tiddler={{$:/palette}} $index=`$(name)$`>
<$transclude $tiddler="$:/palettes/Vanilla" $index=`$(name)$`>
<$transclude $tiddler=`$:/config/DefaultColourMappings/$(name)$`/>
</$transclude>
</$transclude>
\end \end
\define color(name) \procedure color(name)
<<colour $name$>> <$macrocall $name=colour name=`$(name)$`/>
\end \end
\define box-shadow(shadow) \function box-shadow(shadow)
`` [[ -webkit-box-shadow: $(shadow)$;
-webkit-box-shadow: $shadow$; -moz-box-shadow: $(shadow)$;
-moz-box-shadow: $shadow$; box-shadow: $(shadow)$;]substitute[]]
box-shadow: $shadow$;
``
\end \end
\define filter(filter) \function filter(filter)
`` [[ -webkit-filter: $(filter)$;
-webkit-filter: $filter$; -moz-filter: $(filter)$;
-moz-filter: $filter$; filter: $(filter)$;]substitute[]]
filter: $filter$;
``
\end \end
\define transition(transition) \function transition(transition)
`` [[ -webkit-transition: $(transition)$;
-webkit-transition: $transition$; -moz-transition: $(transition)$;
-moz-transition: $transition$; transition: $(transition)$;]substitute[]]
transition: $transition$;
``
\end \end
\define transform-origin(origin) \function transform-origin(origin)
`` [[ -webkit-transform-origin: $(origin)$;
-webkit-transform-origin: $origin$; -moz-transform-origin: $(origin)$;
-moz-transform-origin: $origin$; transform-origin: $(origin)$;]substitute[]]
transform-origin: $origin$;
``
\end \end
\define background-linear-gradient(gradient) \function background-linear-gradient(gradient)
`` [[ background-image: linear-gradient($(gradient)$);
background-image: linear-gradient($gradient$); background-image: -o-linear-gradient($(gradient)$);
background-image: -o-linear-gradient($gradient$); background-image: -moz-linear-gradient($(gradient)$);
background-image: -moz-linear-gradient($gradient$); background-image: -webkit-linear-gradient($(gradient)$);
background-image: -webkit-linear-gradient($gradient$); background-image: -ms-linear-gradient($(gradient)$);]substitute[]]
background-image: -ms-linear-gradient($gradient$);
``
\end \end
\define column-count(columns) \function column-count(columns)
`` [[-moz-column-count: $(columns)$;
-moz-column-count: $columns$; -webkit-column-count: $(columns)$;
-webkit-column-count: $columns$; column-count: $(columns)$;]substitute[]]
column-count: $columns$;
``
\end \end
\define datauri(title) \procedure datauri(title)
<$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}} _canonical_uri={{$title$!!_canonical_uri}}/> <$macrocall $name="makedatauri" type={{{ [<title>get[type]] }}} text={{{ [<title>get[text]] }}} _canonical_uri={{{ [<title>get[_canonical_uri]] }}}/>
\end \end
\define if-sidebar(text) \procedure if-sidebar(text)
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes">$text$</$reveal> <$reveal state="$:/state/sidebar" type="match" text="yes" default="yes"><<text>></$reveal>
\end \end
\define if-no-sidebar(text) \procedure if-no-sidebar(text)
<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">$text$</$reveal> <$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes"><<text>></$reveal>
\end \end
\define if-background-attachment(text) \procedure if-background-attachment(text)
<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text="">$text$</$reveal> <$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text=""><<text>></$reveal>
\end \end

View File

@@ -1,20 +1,26 @@
title: $:/core/macros/copy-to-clipboard title: $:/core/macros/copy-to-clipboard
tags: $:/tags/Macro tags: $:/tags/Macro $:/tags/Global
\define copy-to-clipboard(src,class:"tc-btn-invisible",style)
\whitespace trim \whitespace trim
<$button class=<<__class__>> style=<<__style__>> message="tm-copy-to-clipboard" param=<<__src__>> tooltip={{$:/language/Buttons/CopyToClipboard/Hint}}>
{{$:/core/images/copy-clipboard}} \procedure copy-to-clipboard(src,class:"tc-btn-invisible",style)
&#32; <$button message="tm-copy-to-clipboard"
<$text text={{$:/language/Buttons/CopyToClipboard/Caption}}/> param=<<src>>
class=<<class>>
style=<<style>>
tooltip={{$:/language/Buttons/CopyToClipboard/Hint}}
>
{{$:/core/images/copy-clipboard}}
<span class="tc-tiny-gap-left">
<$text text={{$:/language/Buttons/CopyToClipboard/Caption}}/>
</span>
</$button> </$button>
\end \end
\define copy-to-clipboard-above-right(src,class:"tc-btn-invisible",style) \procedure copy-to-clipboard-above-right(src,class:"tc-btn-invisible",style)
\whitespace trim
<div style="position: relative;"> <div style="position: relative;">
<div style="position: absolute; bottom: 0; right: 0;"> <div style="position: absolute; bottom: 0; right: 0;">
<$macrocall $name="copy-to-clipboard" src=<<__src__>> class=<<__class__>> style=<<__style__>>/> <$macrocall $name="copy-to-clipboard" src=<<src>> class=<<class>> style=<<style>>/>
</div> </div>
</div> </div>
\end \end

View File

@@ -1,37 +1,37 @@
title: $:/core/macros/diff title: $:/core/macros/diff
tags: $:/tags/Macro tags: $:/tags/Macro $:/tags/Global
\define compareTiddlerText(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle)
\whitespace trim \whitespace trim
<$set name="source" tiddler=<<__sourceTiddlerTitle__>> subtiddler=<<__sourceSubTiddlerTitle__>>>
<$set name="dest" tiddler=<<__destTiddlerTitle__>> subtiddler=<<__destSubTiddlerTitle__>>> \procedure compareTiddlerText(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle)
<$diff-text source=<<source>> dest=<<dest>>/> <$set name="source" tiddler=<<sourceTiddlerTitle>> subtiddler=<<sourceSubTiddlerTitle>>>
</$set> <$set name="dest" tiddler=<<destTiddlerTitle>> subtiddler=<<destSubTiddlerTitle>>>
<$diff-text source=<<source>> dest=<<dest>>/>
</$set>
</$set> </$set>
\end \end
\define compareTiddlers(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle,exclude) \procedure compareTiddlers(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle,exclude)
\whitespace trim
<table class="tc-diff-tiddlers"> <table class="tc-diff-tiddlers">
<tbody> <tbody>
<$set name="sourceFields" filter="[<__sourceTiddlerTitle__>fields[]sort[]]"> <$set name="sourceFields" filter="[<sourceTiddlerTitle>fields[]sort[]]">
<$set name="destFields" filter="[<__destSubTiddlerTitle__>subtiddlerfields<__destTiddlerTitle__>sort[]]"> <$set name="destFields" filter="[<destSubTiddlerTitle>subtiddlerfields<destTiddlerTitle>sort[]]">
<$list filter="[enlist<sourceFields>] [enlist<destFields>] -[enlist<__exclude__>] +[sort[]]" variable="fieldName"> <$list filter="[enlist<sourceFields>] [enlist<destFields>] -[enlist<exclude>] +[sort[]]" variable="fieldName">
<tr> <tr>
<th> <th>
<$text text=<<fieldName>>/> <$text text=<<fieldName>>/>
</th> </th>
<td> <td>
<$set name="source" tiddler=<<__sourceTiddlerTitle__>> subtiddler=<<__sourceSubTiddlerTitle__>> field=<<fieldName>>> <$set name="source" tiddler=<<sourceTiddlerTitle>> subtiddler=<<sourceSubTiddlerTitle>> field=<<fieldName>>>
<$set name="dest" tiddler=<<__destTiddlerTitle__>> subtiddler=<<__destSubTiddlerTitle__>> field=<<fieldName>>> <$set name="dest" tiddler=<<destTiddlerTitle>> subtiddler=<<destSubTiddlerTitle>> field=<<fieldName>>>
<$diff-text source=<<source>> dest=<<dest>>>&#32;</$diff-text> <$diff-text source=<<source>> dest=<<dest>>>&#32;</$diff-text>
</$set> </$set>
</$set> </$set>
</td> </td>
</tr> </tr>
</$list> </$list>
</$set> </$set>
</$set> </$set>
</tbody> </tbody>
</table> </table>
\end \end

View File

@@ -1,32 +1,33 @@
title: $:/core/macros/tag-picker title: $:/core/macros/tag-picker
tags: $:/tags/Macro tags: $:/tags/Macro $:/tags/Global
first-search-filter: [tags[]!is[system]search:title<userInput>sort[]] first-search-filter: [tags[]!is[system]search:title<userInput>sort[]]
second-search-filter: [tags[]is[system]search:title<userInput>sort[]] second-search-filter: [tags[]is[system]search:title<userInput>sort[]]
\define get-tagpicker-focus-selector() [data-tiddler-title="$(currentTiddlerCSSEscaped)$"] .tc-add-tag-name input \procedure get-tagpicker-focus-selector()
\function currentTiddlerCSSEscaped() [<saveTiddler>escapecss[]]
[data-tiddler-title=`$(currentTiddlerCSSEscaped)$`] .tc-add-tag-name input
\end
\define delete-tag-state-tiddlers() <$action-deletetiddler $filter="[<newTagNameTiddler>] [<storeTitle>] [<tagSelectionState>]"/> \procedure delete-tag-state-tiddlers() <$action-deletetiddler $filter="[<newTagNameTiddler>] [<storeTitle>] [<tagSelectionState>]"/>
\define add-tag-actions(actions,tagField:"tags") \procedure add-tag-actions()
\whitespace trim \whitespace trim
<$set name="tag" value={{{ [<__tiddler__>get[text]] }}}> <$let tag=<<tag>>>
<$list <$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter='+[toggle<tag>trim[]]'/>
filter="[<saveTiddler>!contains:$tagField$<tag>!match[]]" <$list
variable="ignore" filter="[<tag>] :intersection[<saveTiddler>get<tagField>enlist-input[]]"
emptyMessage="<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter='-[<tag>]'/>" variable="ignore"
> emptyMessage="<<actions>>"
<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/> />
<$transclude $variable="__actions__"/> </$let>
</$list>
</$set>
<<delete-tag-state-tiddlers>> <<delete-tag-state-tiddlers>>
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/> <$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
\end \end
\define clear-tags-actions-inner() \procedure clear-tags-actions-inner()
\whitespace trim \whitespace trim
<$list <$list
filter="[<storeTitle>has[text]] [<newTagNameTiddler>has[text]]" filter="[<storeTitle>has[text]] ~[<newTagNameTiddler>has[text]]"
variable="ignore" variable="ignore"
emptyMessage="<<cancel-delete-tiddler-actions 'cancel'>>" emptyMessage="<<cancel-delete-tiddler-actions 'cancel'>>"
> >
@@ -34,144 +35,133 @@ second-search-filter: [tags[]is[system]search:title<userInput>sort[]]
</$list> </$list>
\end \end
\define clear-tags-actions() \procedure clear-tags-actions()
\whitespace trim \whitespace trim
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}> <$let userInput=<<userInput>>>
<$list filter="[<newTagNameTiddler>get[text]!match<userInput>]" emptyMessage="<<clear-tags-actions-inner>>"> <$list
<$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/> filter="[<newTagNameTiddler>get[text]!match<userInput>]"
emptyMessage="<<clear-tags-actions-inner>>"
>
<$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/>
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
</$list> </$list>
</$set> </$let>
\end \end
\define tag-picker-inner(actions,tagField:"tags") \procedure add-button-actions()
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="[<tag>trim[]]"/>
<<actions>>
<<delete-tag-state-tiddlers>>
<$action-sendmessage $message="tm-focus-selector" $param=<<get-tagpicker-focus-selector>>/>
\end
\procedure list-tags(filter, suffix)
\whitespace trim \whitespace trim
<$vars <$list
filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]"
emptyMessage="<div class='tc-search-results'>{{$:/language/Search/Search/TooShort}}</div>" variable="listItem"
>
<$list filter=<<filter>> variable="tag">
<$let
button-classes=`tc-btn-invisible ${ [<tag>addsuffix<suffix>] -[<tagSelectionState>get[text]] :then[[]] ~tc-tag-button-selected }$`
currentTiddler=<<tag>>
>
{{||$:/core/ui/TagPickerTagTemplate}}
</$let>
</$list>
</$list>
\end
\procedure tag-picker-inner()
\whitespace trim
<$let
newTagNameInputTiddlerQualified=<<qualify "$:/temp/NewTagName/input">> newTagNameInputTiddlerQualified=<<qualify "$:/temp/NewTagName/input">>
newTagNameSelectionTiddlerQualified=<<qualify "$:/temp/NewTagName/selected-item">> newTagNameSelectionTiddlerQualified=<<qualify "$:/temp/NewTagName/selected-item">>
fallbackTarget={{$(palette)$##tag-background}} fallbackTarget={{{ [<palette>getindex[tag-background]] }}}
colourA={{$(palette)$##foreground}} colourA={{{ [<palette>getindex[foreground]] }}}
colourB={{$(palette)$##background}} colourB={{{ [<palette>getindex[background]] }}}
storeTitle={{{ [<newTagNameInputTiddler>!match[]] ~[<newTagNameInputTiddlerQualified>] }}}
tagSelectionState={{{ [<newTagNameSelectionTiddler>!match[]] ~[<newTagNameSelectionTiddlerQualified>] }}}
tagAutoComplete=<<qualify "$:/state/popup/tags-auto-complete">>
refreshTitle=<<qualify "$:/temp/NewTagName/refresh">>
nonSystemTagsFilter="[tags[]!is[system]search:title<userInput>sort[]]"
systemTagsFilter="[tags[]is[system]search:title<userInput>sort[]]"
> >
<$vars <div class="tc-edit-add-tag">
storeTitle={{{ [<newTagNameInputTiddler>!match[]] ~[<newTagNameInputTiddlerQualified>] }}} <div>
tagSelectionState={{{ [<newTagNameSelectionTiddler>!match[]] ~[<newTagNameSelectionTiddlerQualified>] }}} <span class="tc-add-tag-name tc-small-gap-right">
> <$transclude
<$vars $variable="keyboard-driven-input"
refreshTitle=<<qualify "$:/temp/NewTagName/refresh">> tiddler=<<newTagNameTiddler>>
nonSystemTagsFilter="[tags[]!is[system]search:title<userInput>sort[]]" storeTitle=<<storeTitle>>
systemTagsFilter="[tags[]is[system]search:title<userInput>sort[]]" refreshTitle=<<refreshTitle>>
> selectionStateTitle=<<tagSelectionState>>
<div class="tc-edit-add-tag"> inputAcceptActions=<<add-tag-actions>>
<div> inputCancelActions=<<clear-tags-actions>>
<span class="tc-add-tag-name tc-small-gap-right"> tag="input"
<$macrocall placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}}
$name="keyboard-driven-input" focusPopup=<<tagAutoComplete>>
tiddler=<<newTagNameTiddler>> class="tc-edit-texteditor tc-popup-handle"
storeTitle=<<storeTitle>> tabindex=<<tabIndex>>
refreshTitle=<<refreshTitle>> focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}}
selectionStateTitle=<<tagSelectionState>> filterMinLength={{$:/config/Tags/MinLength}}
inputAcceptActions="<$macrocall $name='add-tag-actions' actions=<<__actions__>> tagField=<<__tagField__>>/>" cancelPopups=<<cancelPopups>>
inputCancelActions=<<clear-tags-actions>> configTiddlerFilter="[[$:/core/macros/tag-picker]]"
tag="input" />
placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} </span>
focusPopup=<<qualify "$:/state/popup/tags-auto-complete">> <$button popup=<<tagAutoComplete>>
class="tc-edit-texteditor tc-popup-handle" class="tc-btn-invisible tc-btn-dropdown"
tabindex=<<tabIndex>> tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}}
focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}
filterMinLength={{$:/config/Tags/MinLength}} >
cancelPopups=<<cancelPopups>> {{$:/core/images/down-arrow}}
configTiddlerFilter="[[$:/core/macros/tag-picker]]" </$button>
/> <$reveal state=<<storeTitle>> type="nomatch" text="">
</span> <$button actions=<<delete-tag-state-tiddlers>>
<$button popup=<<qualify "$:/state/popup/tags-auto-complete">> class="tc-btn-invisible tc-small-gap tc-btn-dropdown"
class="tc-btn-invisible tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}}
tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}}
aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}} >
{{$:/core/images/close-button}}
</$button>
</$reveal>
<span class="tc-add-tag-button tc-small-gap-left">
<$let tag=<<tag>>>
<$button set=<<newTagNameTiddler>> setTo=""
actions=<<add-button-actions>>
> >
{{$:/core/images/down-arrow}} {{$:/language/EditTemplate/Tags/Add/Button}}
</$button> </$button>
<$reveal state=<<storeTitle>> type="nomatch" text=""> </$let>
<$button class="tc-btn-invisible tc-small-gap tc-btn-dropdown" </span>
tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} </div>
aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}} <div class="tc-block-dropdown-wrapper">
> <$reveal state=<<tagAutoComplete>> type="nomatch" text="">
{{$:/core/images/close-button}}<<delete-tag-state-tiddlers>> <div class="tc-block-dropdown tc-block-tags-dropdown">
</$button> <$let userInput=<<userInput>>>
</$reveal> <$transclude $variable="list-tags" filter=<<nonSystemTagsFilter>> suffix="-primaryList" />
<span class="tc-add-tag-button tc-small-gap-left"> <hr>
<$set name="tag" value={{{ [<newTagNameTiddler>get[text]] }}}> <$transclude $variable="list-tags" filter=<<systemTagsFilter>> suffix="-secondaryList" />
<$button set=<<newTagNameTiddler>> setTo="" class=""> </$let>
<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/>
<$transclude $variable="__actions__"/>
<$set name="currentTiddlerCSSEscaped" value={{{ [<saveTiddler>escapecss[]] }}}>
<<delete-tag-state-tiddlers>><$action-sendmessage $message="tm-focus-selector" $param=<<get-tagpicker-focus-selector>>/>
</$set>
{{$:/language/EditTemplate/Tags/Add/Button}}
</$button>
</$set>
</span>
</div> </div>
<div class="tc-block-dropdown-wrapper"> </$reveal>
<$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default=""> </div>
<div class="tc-block-dropdown tc-block-tags-dropdown"> </div>
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}> </$let>
<$list
filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]"
emptyMessage="<div class='tc-search-results'
>
{{$:/language/Search/Search/TooShort}}</div>" variable="listItem">
<$list filter=<<nonSystemTagsFilter>> variable="tag">
<$list
filter="[<tag>addsuffix[-primaryList]] -[<tagSelectionState>get[text]]"
emptyMessage="<$vars button-classes='tc-btn-invisible tc-tag-button-selected' actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>"
>
<$vars button-classes="tc-btn-invisible"
actions=<<__actions__>>
tagField=<<__tagField__>>
currentTiddler=<<tag>>
>
{{||$:/core/ui/TagPickerTagTemplate}}
</$vars>
</$list>
</$list>
</$list>
<hr>
<$list filter="[<userInput>minlength{$:/config/Tags/MinLength}limit[1]]" emptyMessage="<div class='tc-search-results'>
{{$:/language/Search/Search/TooShort}}</div>" variable="listItem">
<$list filter=<<systemTagsFilter>> variable="tag">
<$list filter="[<tag>addsuffix[-secondaryList]] -[<tagSelectionState>get[text]]"
emptyMessage="<$vars button-classes='tc-btn-invisible tc-tag-button-selected' actions=<<__actions__>> tagField=<<__tagField__>> currentTiddler=<<tag>>>{{||$:/core/ui/TagPickerTagTemplate}}</$vars>"
>
<$vars button-classes="tc-btn-invisible"
actions=<<__actions__>>
tagField=<<__tagField__>>
currentTiddler=<<tag>>
>
{{||$:/core/ui/TagPickerTagTemplate}}
</$vars>
</$list>
</$list>
</$list>
</$set>
</div>
</$reveal>
</div>
</div>
</$vars>
</$vars>
</$vars>
\end \end
\define tag-picker(actions,tagField:"tags") \procedure tag-picker(actions, tagField:"tags")
\function userInput() [<storeTitle>get[text]]
\function tag() [<newTagNameTiddler>get[text]]
\whitespace trim \whitespace trim
<$vars saveTiddler=<<currentTiddler>> palette={{$:/palette}}> <$let
<$list saveTiddler=<<currentTiddler>>
filter="[<newTagNameTiddler>match[]]" palette={{$:/palette}}
emptyMessage="<$macrocall $name='tag-picker-inner' actions=<<__actions__>> tagField=<<__tagField__>>/>" qualified=<<qualify "$:/temp/NewTagName">>
> newTagNameTiddler={{{ [<newTagNameTiddler>!match[]] ~[<qualified>] }}}
<$set name="newTagNameTiddler" value=<<qualify "$:/temp/NewTagName">>> >
<$macrocall $name="tag-picker-inner" actions=<<__actions__>> tagField=<<__tagField__>>/> <$transclude $variable="tag-picker-inner" />
</$set> </$let>
</$list>
</$vars>
\end \end

View File

@@ -16,6 +16,7 @@ Welcome to the developer documentation for TiddlyWiki (https://tiddlywiki.com/).
** [[Adding Babel Polyfill to TiddlyWiki]] ** [[Adding Babel Polyfill to TiddlyWiki]]
** [[TiddlyWiki Drag and Drop Interoperability]] ** [[TiddlyWiki Drag and Drop Interoperability]]
** [[Javascript Widget Tutorial]] ** [[Javascript Widget Tutorial]]
** [[Using TiddlyWiki as a library in another Node.js application]]
* The original developer documentation from https://tiddlywiki.com: * The original developer documentation from https://tiddlywiki.com:
** [[TiddlyWiki for Developers]] ** [[TiddlyWiki for Developers]]
** [[TiddlyWiki Coding Style Guidelines]] ** [[TiddlyWiki Coding Style Guidelines]]

View File

@@ -1,5 +1,5 @@
created: 20190202035524804 created: 20190202035524804
modified: 20221029161501848 modified: 20240302110658300
tags: tags:
title: Javascript Widget Tutorial title: Javascript Widget Tutorial
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@@ -9,21 +9,23 @@ This tutorial provides step-by-step, interactive examples of how to write code f
Intended audience: Intended audience:
# Those who know tiddlywiki well and know programming and javascript and want to write their own widget. I don't make any effort to explain javascript here. For that you will need other resources. # Those who know tiddlywiki well and know programming and javascript and want to write their own widget.
# Those who know tiddlywiki well and don't know javascript, but want to understand more about how tiddlywiki works. You should be able to skim through and interact with the demos and learn something. # Those who know tiddlywiki well and don't know javascript, but want to understand more about how tiddlywiki works. You should be able to skim through and interact with the demos and learn something.
!The tutorial We don't make any effort to explain javascript here. For that you will need other resources, like [[MDN|https://developer.mozilla.org/en-US/docs/Web/JavaScript]].
*[[Undefined widget tutorial]]
*[[Do nothing widget tutorial]]
*[[Hello World widget tutorial]]
*[[Widget refresh tutorial part I]]
*[[Widget refresh tutorial part II]]
*[[Widget refresh tutorial part III]]
*[[Widget attributes tutorial part I]]
*[[Widget attributes tutorial part II]]
*[[Child widgets tutorial]]
! Notes !! The tutorial
* [[Undefined widget tutorial]]
* [[Do nothing widget tutorial]]
* [[Hello World widget tutorial]]
* [[Widget refresh tutorial part I]]
* [[Widget refresh tutorial part II]]
* [[Widget refresh tutorial part III]]
* [[Widget attributes tutorial part I]]
* [[Widget attributes tutorial part II]]
* [[Child widgets tutorial]]
!! Notes
tiddlywiki doesn't support dynamically reloading javascript. If you change a javascript tiddler, then you need to save and reload the wiki before the changes will take affect. tiddlywiki doesn't support dynamically reloading javascript. If you change a javascript tiddler, then you need to save and reload the wiki before the changes will take affect.
@@ -31,7 +33,11 @@ To avoid the need for such reloads, the excellent [[innerwiki plugin|https://tid
Without the need for reloads, a tiddlywiki instance with the [[innerwiki plugin|https://tiddlywiki.com/prerelease/plugins/tiddlywiki/innerwiki/]] installed works great as a playground for interacting with tiddlywiki javascript. Without the need for reloads, a tiddlywiki instance with the [[innerwiki plugin|https://tiddlywiki.com/prerelease/plugins/tiddlywiki/innerwiki/]] installed works great as a playground for interacting with tiddlywiki javascript.
! Other documentation on writing TW widgets !! Other documentation on writing TW widgets
*WidgetModules * WidgetModules
*[[Widgets]] * [[Widgets]]
!! Full API doc
[[Github Pages of TW5-Typed|https://tiddly-gittly.github.io/TW5-Typed/api/classes/modules_widgets.widget]]

View File

@@ -1,5 +1,5 @@
modified: 20160305222940000
created: 20160111034749658 created: 20160111034749658
modified: 20240302110735646
title: Using ES2016 for Writing Plugins title: Using ES2016 for Writing Plugins
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@@ -7,7 +7,15 @@ With the advent of ES2015 (also known as ES6) and the availability of [[Babel.js
Please understand how the PluginMechanism works since this is all about writing a plugin using Babel to compile the output that will be included in the final TiddlyWiki (for example [[TiddlyWiki on Node.js]]). Please understand how the PluginMechanism works since this is all about writing a plugin using Babel to compile the output that will be included in the final TiddlyWiki (for example [[TiddlyWiki on Node.js]]).
!! Installing and Configuring Babel !! Use a framework
It is recommended to use develop toolkit managed by community. For example,
# [[Modern.TiddlyDev|https://tiddly-gittly.github.io/Modern.TiddlyDev/]]
They are known as "~JavaScript Meta-Framework". With them, you can start developing in a few minutes, without hours of configuration and debugging the build steps.
!! Installing and Configuring Babel by yourself
You can install Babel using You can install Babel using
@@ -33,7 +41,9 @@ Inside your plugin project edit the file `.babelrc` and enter the following:
<<.tip "I found it easier to manage my plugins as if they were ''npm'' modules complete with a `package.json` that compiles the output via `npm run build`. See [[npm-scripts documentation|https://docs.npmjs.com/misc/scripts]] for details.">> <<.tip "I found it easier to manage my plugins as if they were ''npm'' modules complete with a `package.json` that compiles the output via `npm run build`. See [[npm-scripts documentation|https://docs.npmjs.com/misc/scripts]] for details.">>
!! Compiling the Output Another benefit of using such a "Meta-Framework" is that you can easily maintain your configuration, you will find it difficult to upgrade those config files after several months.
!!! Compiling the Output
Pick a folder to store the ES2015 JavaScript and a folder to output the TiddlyWiki ready JavaScript. In this example I will use `src` and `lib` respectively. With Babel installed and working I can compile all the JavaScript in the `src` folder to the `lib` folder by running this command: Pick a folder to store the ES2015 JavaScript and a folder to output the TiddlyWiki ready JavaScript. In this example I will use `src` and `lib` respectively. With Babel installed and working I can compile all the JavaScript in the `src` folder to the `lib` folder by running this command:
@@ -43,7 +53,7 @@ $ babel src -d lib
<<.warning "Babel will //not// copy over non-JavaScript files. It is up to the developer to include all the supporting files themselves. Babel only converts the ~JavaScript files (ending in `.js`) from the `src` folder to the `lib` folder.">> <<.warning "Babel will //not// copy over non-JavaScript files. It is up to the developer to include all the supporting files themselves. Babel only converts the ~JavaScript files (ending in `.js`) from the `src` folder to the `lib` folder.">>
!! Imports and Exports !!! Imports and Exports
In a plugin written pre-ES2015 one would `require` a module through TiddlyWiki like so: In a plugin written pre-ES2015 one would `require` a module through TiddlyWiki like so:
@@ -71,7 +81,7 @@ export { MyWidget as mywidget };
It is important to understand that in ES2016 the ''default'' export is not supported in TiddlyWiki. This is mostly because the core code expects specific properties to be attached to the `exports` variable. Bable's `export` conversion plays well with this //except// with the default export. It is important to understand that in ES2016 the ''default'' export is not supported in TiddlyWiki. This is mostly because the core code expects specific properties to be attached to the `exports` variable. Bable's `export` conversion plays well with this //except// with the default export.
!! Classes !!! Classes
In the example of a widget ES2016 plays well with class inheritance. To contrast the typical Widget definition would look something like this: In the example of a widget ES2016 plays well with class inheritance. To contrast the typical Widget definition would look something like this:
@@ -104,7 +114,7 @@ class NameWidget extends Widget {
} }
``` ```
!!! Non Class Modules !!!! Non Class Modules
For non class modules you can use the `export` keyword. Here is a simple [[Startup Module|ModuleType]]: For non class modules you can use the `export` keyword. Here is a simple [[Startup Module|ModuleType]]:
@@ -122,11 +132,11 @@ export const params = {};
export function run() {…} export function run() {…}
``` ```
!! Polyfills !!! Polyfills
ES2015 comes with some features that are part of the JavaScript core objects. These are not supported by all browsers. To use these features in [[most browsers|BrowserCompatibility]] you will need a <<.def "polyfill">>. Babel has a polyfill package that you can include. See [[Adding Babel Polyfill to TiddlyWiki]] for how to accomplish this. ES2015 comes with some features that are part of the JavaScript core objects. These are not supported by all browsers. To use these features in [[most browsers|BrowserCompatibility]] you will need a <<.def "polyfill">>. Babel has a polyfill package that you can include. See [[Adding Babel Polyfill to TiddlyWiki]] for how to accomplish this.
!! Example !!! Example
Here is an example ES2015 plugin/widget that will show the time and update it: Here is an example ES2015 plugin/widget that will show the time and update it:

View File

@@ -0,0 +1,5 @@
title: Using TiddlyWiki as a library in another Node.js application
Node.js applications can include TiddlyWiki as a library so that they can use wikitext rendering.
See the demo at https://github.com/Jermolene/TiddlyWiki5DemoApp

View File

@@ -0,0 +1,6 @@
created: 20240311150859344
modified: 20240311150859344
title: $:/themes/tiddlywiki/vanilla/options/sidebarlayout
type: text/vnd.tiddlywiki
fluid-fixed

View File

@@ -1,6 +0,0 @@
created: 20160511060801385
list: Reference JSONTiddlers
modified: 20160511060801385
title: $:/StoryList
type: text/vnd.tiddlywiki

View File

@@ -47,6 +47,7 @@
"it-IT", "it-IT",
"ja-JP", "ja-JP",
"ko-KR", "ko-KR",
"mk-MK",
"nl-NL", "nl-NL",
"pa-IN", "pa-IN",
"pt-PT", "pt-PT",

View File

@@ -4,17 +4,17 @@ type: application/json
{ {
"newTiddlerPosition": {"x": 360,"y": 100}, "newTiddlerPosition": {"x": 360,"y": 100},
"positions": { "positions": {
" ": {"x": 30,"y": 17,"w": 140,"h": 140, "r": -2}, " ": {"x": 30,"y": 17,"w": 120,"h": 120, "r": -2},
"Tiddlers": {"x": 60,"y": 15,"w": 140,"h": 140, "r": 10}, "Tiddlers": {"x": 60,"y": 15,"w": 120,"h": 120, "r": 10},
"Links": {"x": 90,"y": 13,"w": 140,"h": 140, "r": -7}, "Links": {"x": 90,"y": 13,"w": 120,"h": 120, "r": -7},
"Formatting": {"x": 120,"y": 18,"w": 140,"h": 140, "r": 5}, "Formatting": {"x": 120,"y": 18,"w": 120,"h": 120, "r": 5},
"Images": {"x": 150,"y": 12,"w": 140,"h": 140, "r": -11}, "Images": {"x": 150,"y": 12,"w": 120,"h": 120, "r": -11},
"Audio": {"x": 180,"y": 14,"w": 140,"h": 140, "r": 16}, "Audio": {"x": 180,"y": 14,"w": 120,"h": 120, "r": 16},
"Tags": {"x": 210,"y": 15,"w": 140,"h": 140, "r": 20}, "Tags": {"x": 210,"y": 15,"w": 120,"h": 120, "r": 20},
"Transclusion": {"x": 240,"y": 16,"w": 140,"h": 140, "r": -4}, "Transclusion": {"x": 240,"y": 16,"w": 120,"h": 120, "r": -4},
"Lists": {"x": 275,"y": 13,"w": 140,"h": 140, "r": 6}, "Lists": {"x": 275,"y": 13,"w": 120,"h": 120, "r": 6},
"Customisation": {"x": 310,"y": 19,"w": 140,"h": 140, "r": -5}, "Customisation": {"x": 310,"y": 19,"w": 120,"h": 120, "r": -5},
"Plugins": {"x": 350,"y": 12,"w": 140,"h": 140, "r": 10}, "Plugins": {"x": 350,"y": 12,"w": 120,"h": 120, "r": 10},
"Translations": {"x": 390,"y": 15,"w": 140,"h": 140, "r": 8} "Translations": {"x": 390,"y": 15,"w": 120,"h": 120, "r": 8}
} }
} }

View File

@@ -1,3 +1,3 @@
[ [
{"title": " ", "text": "TiddlyWiki"} {"title": " ", "text": "[[TiddlyWiki]]"}
] ]

View File

@@ -0,0 +1,2 @@
title: $:/config/Performance/Instrumentation
text: yes

View File

@@ -14,7 +14,10 @@
"tiddlywiki/dynannotate", "tiddlywiki/dynannotate",
"tiddlywiki/codemirror", "tiddlywiki/codemirror",
"tiddlywiki/menubar", "tiddlywiki/menubar",
"tiddlywiki/jszip" "tiddlywiki/jszip",
"tiddlywiki/confetti",
"tiddlywiki/dynannotate",
"tiddlywiki/tour"
], ],
"themes": [ "themes": [
"tiddlywiki/vanilla", "tiddlywiki/vanilla",

View File

@@ -12,6 +12,7 @@ title: Output
+ +
title: Definitions title: Definitions
\whitespace trim
<$set name="one" value="elephant"> <$set name="one" value="elephant">
<$set name="two" value="giraffe"> <$set name="two" value="giraffe">
</$set> </$set>

View File

@@ -14,6 +14,7 @@ title: Output
+ +
title: Definitions title: Definitions
\whitespace trim
\define name() Bugs Bunny \define name() Bugs Bunny
\procedure address() \procedure address()
Bunny Hill Bunny Hill

View File

@@ -1,38 +0,0 @@
title: Transclude/Parameterised/ConditionalParameters/Refreshed
description: Parameterised transclusion when conditional parameters are changed by a refresh
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
\procedure elephant(filler)
<$let name={{Canary}}>
<% if [<name>match[yes]] %>
<$parameters A=defaultA>
A/<$text text=<<filler>>/>/<$text text=<<A>>/>/<$text text=<<B>>/>
</$parameters>
<% else %>
<$parameters B=defaultB>
B/<$text text=<<filler>>/>/<$text text=<<A>>/>/<$text text=<<B>>/>
</$parameters>
<% endif %>
\end elephant
-
<<elephant ignore A:myA B:myB>>
&#32;&#32;
<<elephant ignore myA myB>>
+
title: Canary
no
+
title: Actions
<$action-setfield $tiddler="Canary" text="yes"/>
+
title: ExpectedResult
<p>-A/ignore/myA/ A/ignore/myA/</p>

View File

@@ -1,30 +0,0 @@
title: Transclude/Parameterised/ConditionalParameters
description: Parameterised transclusion with conditional parameters
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\procedure elephant(filler)
\whitespace trim
<% if [[no]match[yes]] %>
<$parameters A=defaultA>
A/<$text text=<<filler>>/>/<$text text=<<A>>/>/<$text text=<<B>>/>
</$parameters>
<% else %>
<$parameters B=defaultB>
B/<$text text=<<filler>>/>/<$text text=<<A>>/>/<$text text=<<B>>/>
</$parameters>
<% endif %>
\end elephant
\whitespace trim
-
<<elephant ignore A:myA B:myB>>
&#32;&#32;
<<elephant ignore myB not-used>>
+
title: ExpectedResult
<p>-B/ignore//myB B/ignore//myB</p>

View File

@@ -0,0 +1,34 @@
title: Transclude/Parameterised/Depth
description: Parameterised transclusion using the $depth attribute
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\whitespace trim
<$transclude $tiddler='TiddlerOne' one='Ferret'/>
|
<$transclude $tiddler='TiddlerOne'/>
|
<$transclude $tiddler='TiddlerOne' one='Ferret' $$two="Osprey"/>
|
<$transclude $tiddler='TiddlerOne' $$two="Falcon"/>
+
title: TiddlerOne
\whitespace trim
{{TiddlerTwo}}
+
title: TiddlerTwo
\whitespace trim
<$parameters one='Jaguar' $$two='Piranha' $depth="2">
<$text text=<<one>>/>:<$text text=<<$two>>/>
</$parameters>
<$parameters one='Leopard' $$two='Coelacanth'>
(<$text text=<<one>>/>|<$text text=<<$two>>/>)
</$parameters>
+
title: ExpectedResult
<p>Ferret:Piranha(Leopard|Coelacanth)|Jaguar:Piranha(Leopard|Coelacanth)|Ferret:Osprey(Leopard|Coelacanth)|Jaguar:Falcon(Leopard|Coelacanth)</p>

View File

@@ -1,38 +0,0 @@
title: Transclude/Parameterised/GenesisChangingCount
description: Parameterised transclusion using genesis can handle refreshes that change number of parameters
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\procedure elephant(filler)
\whitespace trim
<$text text=<<filler>>/>-
<$let args={{Canary}}>
<$genesis $type=$parameters $names="[enlist<args>]" $values="[enlist<args>addsuffix[-default]]">
<$text text=`($(argA)$-$(argB)$-$(argC)$)` />
</$genesis>
</$let>
<$parameters other=other-default>
-<$text text=<<other>>/>
\end elephant
-
<<elephant filler argA:myA argB:myB argC:myC other:myOther>>
<<elephant filler myA myB myC myOther>>
+
title: Canary
argA argB
+
title: Actions
<$action-setfield $tiddler="Canary" text="argA argB argC"/>
+
title: ExpectedResult
<p>-
filler-(myA-myB-myC)-myOther
filler-(myA-myB-myC)-myOther
</p>

View File

@@ -1,34 +0,0 @@
title: Transclude/Parameterised/GenesisChangingNames
description: Parameterised transclusion using genesis can handle refreshes that change parameter names
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\procedure elephant(filler)
\whitespace trim
<$let name={{Canary}}>
<$genesis $type=$parameters $names="[<name>]" $values="default">
<$text text=<<First>>/>/<$text text=<<Second>>/>
</$genesis>
</$let>
\end elephant
\whitespace trim
-
<<elephant ignore First:init Second:var>>
-
<<elephant ignore var>>
+
title: Canary
First
+
title: Actions
<$action-setfield $tiddler="Canary" text="Second"/>
+
title: ExpectedResult
<p>-/var-/var</p>

View File

@@ -1,44 +0,0 @@
title: Transclude/Parameterised/NestedParameters/Refreshed
description: Parameterised transclusion with nested parameter widgets and a refresh cycle
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\procedure elephant(first:"one",second:"two")
\whitespace trim
\parameters (third:"three")
<$let variable={{Canary}}>
<$parameters fourth=four>
<$text text=<<first>>/>/<$text text=<<second>>/>/<$text text=<<third>>/>/<$text text=<<fourth>>/>
</$parameters>
</$let>
\end elephant
Begin
<<elephant>>
<<elephant "a" "b" "c" "d">>
<<elephant second:named a c d>>
<<elephant third:3rd second:2nd a d>>
<<elephant fourth:4th>>
<<elephant a fourth:4th>>
+
title: Canary
Else
+
title: Actions
<$action-setfield $tiddler="Canary" text="Something"/>
+
title: ExpectedResult
<p>Begin
one/two/three/four
a/b/c/d
a/named/c/d
a/2nd/3rd/d
one/two/three/4th
a/two/three/4th
</p>

View File

@@ -1,34 +0,0 @@
title: Transclude/Parameterised/NestedParameters
description: Parameterised transclusion with nested parameter widgets
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\procedure elephant(first:"one",second:"two")
\whitespace trim
\parameters (third:"three")
<$parameters fourth=four>
<$text text=<<first>>/>/<$text text=<<second>>/>/<$text text=<<third>>/>/<$text text=<<fourth>>/>
</$parameters>
\end elephant
Begin
<<elephant>>
<<elephant "a" "b" "c" "d">>
<<elephant second:named a c d>>
<<elephant third:3rd second:2nd a d>>
<<elephant fourth:4th>>
<<elephant a fourth:4th>>
+
title: ExpectedResult
<p>Begin
one/two/three/four
a/b/c/d
a/named/c/d
a/2nd/3rd/d
one/two/three/4th
a/two/three/4th
</p>

View File

@@ -0,0 +1,25 @@
title: Transclude/Procedures/Whitespace2
description: Procedures should inherit whitespace settings from definition site
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\procedure testproc()
This is a sentence
\end
\define testmacro()
This is a sentence
\end
This is a sentence
[<<testproc>>]
[<<testmacro>>]
+
title: ExpectedResult
<p>This is a sentence
[This is a sentence ]
[This is a sentence ]
</p>

View File

@@ -0,0 +1,30 @@
title: Transclude/Procedures/Whitespace3
description: Procedures should inherit whitespace settings from definition site
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\import Definitions
This is a sentence
[<<testproc>>]
[<<testmacro>>]
+
title: Definitions
\procedure testproc()
This is a sentence
\end
\define testmacro()
This is a sentence
\end
+
title: ExpectedResult
<p>This is a sentence
[This is a sentence ]
[This is a sentence ]
</p>

View File

@@ -0,0 +1,148 @@
/*\
title: test-backtranscludes.js
type: application/javascript
tags: $:/tags/test-spec
Tests the backtranscludes mechanism.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
describe('Backtranscludes tests', function() {
describe('a tiddler with no transcludes to it', function() {
var wiki = new $tw.Wiki();
wiki.addTiddler({
title: 'TestIncoming',
text: ''});
it('should have no backtranscludes', function() {
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('');
});
});
describe('A tiddler added to the wiki with a transclude to it', function() {
var wiki = new $tw.Wiki();
wiki.addTiddler({
title: 'TestIncoming',
text: 'something'});
wiki.addTiddler({
title: 'TestOutgoing',
text: 'A transclude to {{TestIncoming}}'});
it('should have a backtransclude', function() {
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing');
});
});
describe('A tiddler transclude with template will still use the tiddler as result.', function() {
var wiki = new $tw.Wiki();
wiki.addTiddler({
title: 'TestIncoming',
text: 'something'});
wiki.addTiddler({
title: 'TestOutgoing',
text: 'A transclude to {{TestIncoming||$:/core/ui/TagTemplate}}'});
it('should have a backtransclude', function() {
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing');
});
});
describe('A tiddler that has a transclude added to it later', function() {
it('should have an additional backtransclude', function() {
var wiki = new $tw.Wiki();
wiki.addTiddler({
title: 'TestIncoming',
text: ''});
wiki.addTiddler({
title: 'TestOutgoing',
text: 'A transclude to {{TestIncoming}}'});
wiki.addTiddler({
title: 'TestOutgoing2',
text: 'Nothing yet!'});
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing');
wiki.addTiddler({
title: 'TestOutgoing2',
text: 'Updated with transclude to {{TestIncoming}}'});
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing,TestOutgoing2');
});
});
describe('A tiddler that has a transclude remove from it later', function() {
var wiki = new $tw.Wiki();
wiki.addTiddler({
title: 'TestIncoming',
text: ''});
wiki.addTiddler({
title: 'TestOutgoing',
text: 'A transclude to {{TestIncoming}}'});
it('should have one fewer backtransclude', function() {
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing');
wiki.addTiddler({
title: 'TestOutgoing',
text: 'No transclude to ~TestIncoming'});
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('');
});
});
describe('A tiddler transcludeing to another that gets renamed', function() {
var wiki = new $tw.Wiki();
wiki.addTiddler({
title: 'TestIncoming',
text: ''});
wiki.addTiddler({
title: 'TestOutgoing',
text: 'A transclude to {{TestIncoming}}'});
it('should have its name changed in the backtranscludes', function() {
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing');
wiki.renameTiddler('TestOutgoing', 'TestExtroverted');
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestExtroverted');
});
});
describe('A tiddler transcludeing to another that gets deleted', function() {
var wiki = new $tw.Wiki();
wiki.addTiddler({
title: 'TestIncoming',
text: ''});
wiki.addTiddler({
title: 'TestOutgoing',
text: 'A transclude to {{TestIncoming}}'});
it('should be removed from backtranscludes', function() {
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('TestOutgoing');
wiki.deleteTiddler('TestOutgoing');
expect(wiki.filterTiddlers('TestIncoming +[backtranscludes[]]').join(',')).toBe('');
});
});
});
})();

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,3 @@
title: Asteroid (253) Mathilde Image
type: image/png
tags: Image

View File

@@ -0,0 +1,17 @@
created: 20230720112554020
modified: 20230720112827830
title: Asteroid
type: text/vnd.tiddlywiki
tags: [[Solar System]]
[img class=hero-image [Asteroid (253) Mathilde Image]]
An asteroid is a space rock. It is a small object in the [[Solar System]] that travels around the [[Sun]]. It is like a [[planet|Planet]] but smaller. They range from very small (smaller than a car) to 600 miles (1000 km) across. A few asteroids have asteroid moons.
The name "asteroid" means "like a star" in the ancient Greek language. Asteroids may look like small stars in the sky, but they really do move around the [[Sun]], while stars only seem to move because the [[Earth]] spins. Like [[planets|Planet]], asteroids do not make their own light. Because of this, some people think "asteroids" is not a good name, and think that the name "planetoid" ("like a planet") would be a better name.
Giuseppe Piazzi found the first asteroid, in 1801. He called it Ceres, and it is the biggest object in the asteroid belt. Others, like Juno, Pallas, and Vesta were found later. In the 1850s so many had been found, that they were numbered by a Minor planet designation starting with 1 Ceres. Today, astronomers using computerized telescopes find thousands of asteroids every month. Asteroid impact prediction is one of the purposes.
Asteroids are the leftover rock and other material from the formation of the [[Solar System]]. These rocks were too small to come together to make a [[planet|Planet]]. Some are made of carbon or metal. Depending on what's on the surface, they are classified into various asteroid spectral types including Type M (metal), Type S (stone), and Type C (carbon).
Most asteroids in our [[Solar System]] are in the asteroid belt between [[Mars]] and [[Jupiter]]. Many are not in the main asteroid belt. The ones that come close to [[Earth]] are called Near-Earth asteroids. Many scientists think asteroids striking the [[Earth]] killed off all the dinosaurs and caused some of the other extinction events.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,3 @@
title: Comet Image
type: image/png
tags: Image

View File

@@ -0,0 +1,15 @@
created: 20230720113501352
modified: 20230720113633994
title: Comet
type: text/vnd.tiddlywiki
tags: [[Solar System]]
[img class=hero-image [Comet Image]]
A comet is a ball of mostly ice that moves around in outer space. Comets are often described as "dirty snowballs". They are very different from [[asteroids|Asteroid]]. The orbital inclinations of comets are usually high and not near the ecliptic where most [[solar system|Solar System]] objects are found. Most of them are long-period comets and come from the [[Kuiper belt]]. That is very far away from the [[Sun]], but some of them also come near enough to [[Earth]] for us to see at night.
They have long "tails", because the [[Sun]] melts the ice. A comet's tail does not trail behind it, but points directly away from the [[Sun]], because it is blown by the solar wind. The hard centre of the comet is the nucleus. It is one of the blackest things (lowest albedo) in the [[solar system|Solar System]]. When light shone on the nucleus of Halley's Comet, the comet reflected only 4% of the light back to us.
Periodic comets visit again and again. Non-periodic or single-apparition comets visit only once.
Comets sometimes break up, as Comet Biela did in the 19th century. Comet Shoemaker-Levy 9 broke up, and the pieces hit [[Jupiter]] in 1994. Some comets orbit (go around) together in groups. Astronomers think these comets are broken pieces that used to be one object.

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

View File

@@ -0,0 +1,3 @@
title: Earth Image
type: image/png
tags: Image

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

View File

@@ -0,0 +1,3 @@
title: Earth's Moon Image
type: image/png
tags: Image

View File

@@ -0,0 +1,10 @@
created: 20230720105302348
modified: 20230720105451528
title: Earth's Moon
type: text/vnd.tiddlywiki
[img class=hero-image [Earth's Moon Image]]
The Moon is [[Earth]]'s only natural satellite. We usually see it in the night sky and also during the day. Some other planets also have moons or natural satellites.
Our moon is about one-fourth of the width of the [[Earth]]. Because it is far away it looks small, about half a degree wide. The gravity on the moon is one-sixth of the [[Earth]]'s gravity. It means that something will be one-sixth as heavy on the Moon than on [[Earth]]. The Moon is a rocky and dusty place. It moves slowly away from the [[Earth]] at a rate of 3.8 cm per year, due to the effect of tidal dissipation.

View File

@@ -0,0 +1,21 @@
created: 20230720102439731
modified: 20230720105223869
title: Earth
type: text/vnd.tiddlywiki
tags: Planet [[Rocky]]
[img class=hero-image [Earth Image]]
Earth is the third planet from the [[Sun]] in the [[Solar System]]. It is the only planet known to have life on it. The Earth formed about 4.5 billion years ago. It is one of four rocky planets on the inner side of the [[Solar System]]. The other three are [[Mercury]], [[Venus]], and [[Mars]].
The large mass of the [[Sun]] keeps the Earth in orbit through the force of gravity. Earth also turns around in space, so that different parts face the Sun at different times. Earth goes around the [[Sun]] once (one year) for every 36514 times it turns around (one day).
Earth is the only planet in the [[Solar System]] that has a large amount of liquid water on its surface. About 74% of the surface of Earth is covered by liquid or frozen water. Because of this, people sometimes call it the blue planet.
Because of its water, Earth is home to millions of species of plants and animals which need water to survive. The things that live on Earth have changed its surface greatly. For example, early cyanobacteria changed the air and gave it oxygen. The living part of Earth's surface is called the "biosphere".
Earth is one of the eight planets in the [[Solar System]]. There are also thousands of small bodies which move around the [[Sun]]. The [[Solar System]] is moving through the Orion Arm of the [[Milky Way]] galaxy, and will be for about the next 10,000 years.
Earth is about 150,000,000 kilometres or 93,000,000 miles away from the [[Sun]] (this distance is called an "Astronomical Unit"). It moves on its orbit at an average speed of about 30 km/s (19 mi/s). Earth turns all the way around about 36514 times in the time it takes for Earth to go all the way around the [[Sun]]. To make up this extra bit of a day every year, an additional day is used every four years. This is named a "leap year".
The [[Moon|Earth's Moon]] goes around Earth at an average distance of 400,000 kilometres or 250,000 miles. It is locked to Earth, so that it always has the same half facing Earth; the other half is called the "dark side of the moon". It takes about 2713 days for the [[Moon|Earth's Moon]] to go all the way around Earth, but because Earth is moving around the [[Sun]] at the same time, it takes about 2912 days for the [[Moon|Earth's Moon]] to go from dark to bright to dark again. This is where the word "month" came from, even though most months now have 30 or 31 days.

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

View File

@@ -0,0 +1,3 @@
title: Jupiter Image
type: image/png
tags: Image

View File

@@ -0,0 +1,15 @@
created: 20230720103949854
modified: 20230720104126047
title: Jupiter
type: text/vnd.tiddlywiki
tags: Planet [[Gas Giant]]
[img class=hero-image [Jupiter Image]]
Jupiter is the largest planet in the [[Solar System]]. It is the fifth planet from the [[Sun]]. Jupiter is a gas giant because it is so large, and made mostly of gas. The other gas giants in the Solar System are [[Saturn]], [[Uranus]], and [[Neptune]].
Jupiter's mass is about 318 times the mass of [[Earth]]. This is more than twice the mass of all the other planets in the [[Solar System]] put together.
Jupiter can be seen even without using a telescope. It is the third brightest object in the night sky. Only the [[Earth's Moon]] and [[Venus]] are brighter. The ancient Romans named the planet after their King of the Gods, Jupiter (Latin: Iuppiter).
Jupiter has 95 known moons. About 75 of them are very small—less than five kilometres wide. The four largest moons of Jupiter are Io, Europa, Ganymede, and Callisto. They are called the Galilean moons because Galileo Galilei discovered them. Ganymede is the largest moon in the Solar System. Its diameter is larger than that of the planet [[Mercury]].

View File

@@ -0,0 +1,12 @@
created: 20230720113703253
modified: 20230720113733279
title: Kuiper belt
type: text/vnd.tiddlywiki
The Kuiper belt is an area of the [[Solar System]] beyond the orbit of [[Neptune]] (at 30 astronomical units) to 50 AU from the [[Sun]].
The objects within the Kuiper Belt together with the members of the scattered disk beyond, are together called trans-Neptunian.
Many objects such as dwarf planets in the Kuiper belt are much bigger than the ones in the asteroid belt and are round. At least some Kuiper belt objects are icebound.
The first objects in the Kuiper belt to be found were [[Pluto]] and Charon (moon) but the belt was only identified and named in 1992 when more Kuiper belt objects (KBOs) were found. A few thousand have since been discovered and more than 70,000 KBOs over 100 km (62 mi) in diameter are thought to exist.

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

View File

@@ -0,0 +1,5 @@
created: 20230720103818354
modified: 20230720103822277
title: Mars Image
type: image/png
tags: Image

View File

@@ -0,0 +1,11 @@
created: 20230720103800905
modified: 20230720103915592
title: Mars
type: text/vnd.tiddlywiki
tags: Planet [[Rocky]]
[img class=hero-image [Mars Image]]
Mars is the fourth planet from the [[Sun]] in the [[Solar System]] and the second-smallest planet. Mars is a terrestrial planet with polar ice caps of frozen water and carbon dioxide. It has the largest volcano in the [[Solar System]], and some very large impact craters. Mars is named after the mythological Roman god of war because it appears of red color.
Space probes such as the Viking program landers are the main tools for the exploration of Mars.

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

View File

@@ -0,0 +1,3 @@
title: Mercury Image
type: image/png
tags: Image

View File

@@ -0,0 +1,21 @@
created: 20230720101415532
modified: 20230720101809366
title: Mercury
type: text/vnd.tiddlywiki
tags: Planet [[Rocky]]
[img class=hero-image [Mercury Image]]
Mercury is the smallest planet in the [[Solar System]]. It is the closest planet to the [[Sun]]. It makes one trip around the Sun once every 87.969 days.
Mercury is bright when we can see it from [[Earth]]. It has an apparent magnitude ranging from 2.0 to 5.5. It cannot be seen easily because it is usually too close to the [[Sun]]. Because of this, Mercury can only be seen in the morning or evening twilight or when there is a solar eclipse.
Less is known about Mercury than about other planets of our [[Solar System]]. Even with telescopes only a small, bright crescent can be seen. It is also hard to put a satellite in orbit around it. Two spacecraft have visited Mercury. The first one was Mariner 10. It only made a map of about 45% of the Mercury's surface from 1974 to 1975. The second is the MESSENGER spacecraft, which finished mapping Mercury in March 2013.
Mercury looks like [[Earth's Moon]]. It has many craters and smooth plains. It has no moons and little atmosphere as we know it. However, Mercury does have an extremely thin atmosphere, known as an exosphere. Mercury has a large iron core. Because of this Mercury has a magnetic field about 1% as strong as that of the Earth. It is a very dense planet because its core is large.
Temperature at the surface can be anywhere from about 90 to 700 K (183 °C to 427 °C, 297 °F to 801 °F), with the subsolar point being the hottest and the bottoms of craters near the poles being the coldest.
Known sightings of Mercury date back to at least the first millennium BC. Before the 4th century BC, Greek astronomers thought that Mercury was two different objects: The one that they were only able at sunrise, they called Apollo; the other one that they were only able to see at sunset, they called Hermes. The English name for the planet is from the Romans, who named it after the Roman god Mercury. The symbol for Mercury is based on Hermes' staff.
Even though Mercury is the closest planet to the [[Sun]], it is not the hottest. This is because it has no greenhouse effect. The heat that the [[Sun]] gives it, quickly escapes into space. The hottest planet is [[Venus]].

Some files were not shown because too many files have changed in this diff Show More