1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-02-18 16:09:52 +00:00

Compare commits

..

84 Commits

Author SHA1 Message Date
Jeremy Ruston
535581cf81 Merge branch 'master' into confetti-plugin 2024-01-25 12:52:27 +00:00
Jeremy Ruston
0710054e64 WIP 2024-01-25 12:52:17 +00:00
Saq Imtiaz
a7d469ae99 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
2023-12-06 11:13:48 +00:00
Jeremy Ruston
547582c1e7 Tour wording tweaks 2023-10-24 12:52:24 +01:00
Jeremy Ruston
e40b83f141 More custom colours 2023-10-19 08:59:07 +01:00
Jeremy Ruston
518c23d06d Use custom palette colours
Makes it easier for people to use their own colour scheme for the tour
2023-10-17 16:47:27 +01:00
Jeremy Ruston
a2f4e71080 Simplify styling of tour overlay 2023-10-17 16:00:55 +01:00
Jeremy Ruston
10fad328dd Merge branch 'master' into confetti-plugin 2023-10-17 11:56:06 +01:00
Jeremy Ruston
d7a58a01b9 Merge branch 'master' into confetti-plugin 2023-10-16 18:32:50 +01:00
Jeremy Ruston
b8fdb320dc Merge branch 'master' into confetti-plugin 2023-10-16 14:31:13 +01:00
Jeremy Ruston
fd5c073654 Fix typos
Thanks @pmario
2023-10-16 11:30:18 +01:00
Jeremy Ruston
343839b4d4 Wording and ordering tweaks 2023-10-15 17:36:30 +01:00
Jeremy Ruston
94e27ccc48 Adopt new conditional shortcut syntax 2023-10-15 13:06:59 +01:00
Jeremy Ruston
80c52d071e Merge branch 'master' into confetti-plugin 2023-10-14 09:54:53 +01:00
Jeremy Ruston
cd2b375d80 Improve styling of task call-to-action and nav buttons 2023-10-13 10:18:01 +01:00
Jeremy Ruston
9eac359a5d Improve wording 2023-10-13 09:06:35 +01:00
Jeremy Ruston
9b6570f420 Introduce step about tags 2023-10-12 18:10:12 +01:00
Jeremy Ruston
906cb8f92b Fix initialisation when jumping to a tour step 2023-10-05 14:10:00 +01:00
Jeremy Ruston
6f46775e94 Use the tour step caption as the heading 2023-10-05 13:50:02 +01:00
Jeremy Ruston
aa3f931721 Expose custom tour settings 2023-10-05 13:40:33 +01:00
Jeremy Ruston
0213f1ab8f Add a button to launch tour steps directly, and give them captions 2023-10-05 13:12:19 +01:00
Jeremy Ruston
1351109119 Tweak styling of tour chooser dropdown 2023-10-03 18:41:09 +01:00
Jeremy Ruston
3254684dd6 Update docs 2023-10-03 18:40:48 +01:00
Jeremy Ruston
29575d01bf Avoid having to embed confetti in the final step 2023-10-03 18:22:57 +01:00
Jeremy Ruston
b1eece2a93 Add a settings pane giving a birds eye view of a tour 2023-10-03 16:23:30 +01:00
Jeremy Ruston
1c6fba6108 Merge branch 'master' into confetti-plugin 2023-10-03 10:04:09 +01:00
Jeremy Ruston
c3167d5368 Clarify docs 2023-09-29 09:48:43 +01:00
Jeremy Ruston
184e30afb8 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
2023-09-27 14:28:35 +01:00
Jeremy Ruston
44d322868f Clean up tiddler titles within the introduction tour 2023-09-27 14:22:44 +01:00
Jeremy Ruston
455a51f671 Merge branch 'master' into confetti-plugin 2023-09-27 14:09:00 +01:00
Jeremy Ruston
5ea2243fd9 Fix gap between navigation buttons 2023-09-22 14:53:51 +01:00
Jeremy Ruston
5a4470e6ed Remove obsolete state tiddler
Not needed because now we initialise it in startup actions
2023-09-22 14:53:39 +01:00
Jeremy Ruston
d460f9f066 Simplify tour step format 2023-09-22 10:55:39 +01:00
Jeremy Ruston
ef5b3a8840 Use whitespace trim
Note that the setting is inherited by procedure and widget definitions
2023-09-21 11:31:23 +01:00
Jeremy Ruston
4ef8ce3caa Ensure that the current tour isn't listed as an option in the final step 2023-09-21 10:24:34 +01:00
Jeremy Ruston
6088fd7d95 Add tour chooser 2023-09-21 09:59:28 +01:00
Jeremy Ruston
c7cac0f7ea Remove old debugging code 2023-09-20 15:27:53 +01:00
Jeremy Ruston
7b1701583f Add "using tags" as a separate tour 2023-09-20 15:27:39 +01:00
Jeremy Ruston
804e253f93 Remove obsolete text 2023-09-20 15:27:21 +01:00
Jeremy Ruston
7c619da913 Merge branch 'master' into confetti-plugin 2023-09-20 12:59:39 +01:00
Jeremy Ruston
4e938fad00 Merge branch 'master' into confetti-plugin 2023-09-11 18:57:02 +01:00
Jeremy Ruston
943dcd7567 Fix build process
We build a separate tour.html wiki, but can include the tour in other wikis too
2023-09-11 09:26:58 +01:00
Jeremy Ruston
783a5be00e Better labelling for the main preview 2023-09-11 09:14:42 +01:00
Jeremy Ruston
4792d241c4 Tour should autostart in the tour edition, but not in the main wiki 2023-09-10 18:27:01 +01:00
Jeremy Ruston
06af391773 Tours should have a $:/tags/Tour tag 2023-09-10 17:23:48 +01:00
Jeremy Ruston
0656580439 Simplify styles for top bar 2023-09-10 17:23:31 +01:00
Jeremy Ruston
a4d74be3d8 Update docs 2023-09-10 17:23:18 +01:00
Jeremy Ruston
701a038559 Remove wikification from welcome tour step 2023-09-10 17:23:05 +01:00
Jeremy Ruston
dd9b4dc787 Refactor to allow multiple tours to be loaded at once 2023-09-10 15:23:05 +01:00
Jeremy Ruston
4f026e45a8 Add a tour logo 2023-09-10 12:29:11 +01:00
Jeremy Ruston
d2fbbc408a Change "startup-actions" field to "enter-actions" to avoid confusion 2023-09-10 11:34:34 +01:00
Jeremy Ruston
c9d8806682 Refactor to use global procedures to control the tour 2023-09-10 11:28:23 +01:00
Jeremy Ruston
d28cf74115 Add page control button to start tour
Also make the tour controls visible in full screen mode
2023-09-10 11:00:55 +01:00
Jeremy Ruston
d332baabe7 Merge branch 'master' into confetti-plugin 2023-09-09 16:10:42 +01:00
Jeremy Ruston
d29ed6a5de Merge branch 'master' into confetti-plugin 2023-08-30 09:48:15 +01:00
Jeremy Ruston
0c5c673ddc Merge branch 'master' into confetti-plugin 2023-08-21 22:46:56 +01:00
Jeremy Ruston
1721203a69 Missing tag 2023-07-20 15:55:21 +01:00
Jeremy Ruston
3d0a015ae5 Populate tour edition with solar system data
From Simple English Wikipedia
2023-07-20 13:15:55 +01:00
Jeremy Ruston
080ca5ed31 Fix typo in build script 2023-07-20 09:51:11 +01:00
Jeremy Ruston
abcd2f110f Build the tour edition in the preview 2023-07-20 09:38:44 +01:00
Jeremy Ruston
cf9864ebe3 Remove Anna Freud references from welcome tiddler 2023-07-20 09:38:33 +01:00
Jeremy Ruston
1aef8405bd Add full screen section of tour and tour edition 2023-07-20 08:45:44 +01:00
Jeremy Ruston
d419161686 Merge branch 'master' into confetti-plugin 2023-07-20 08:45:33 +01:00
jeremy@jermolene.com
9d2bab0ae3 Merge branch 'master' into confetti-plugin 2023-06-01 15:30:31 +01:00
jeremy@jermolene.com
40fd941394 Merge branch 'master' into confetti-plugin 2023-06-01 15:22:57 +01:00
jeremy@jermolene.com
8fd4da607d Mark dependents of the tour plugin 2023-05-29 14:44:22 +01:00
jeremy@jermolene.com
62d0c197eb Tweaks to tour buttons 2023-05-10 10:14:26 +01:00
jeremy@jermolene.com
1c3dd6b39b Don't link TiddlyWiki in the tour panel 2023-05-10 10:14:15 +01:00
jeremy@jermolene.com
36041cf38b Clarify wording of confetti demo 2023-05-10 10:13:45 +01:00
jeremy@jermolene.com
87c2fb390a Include confetti plugin in prerelease 2023-05-10 10:13:36 +01:00
jeremy@jermolene.com
f9cf5764ff Merge branch 'master' into confetti-plugin 2023-05-10 10:12:56 +01:00
jeremy@jermolene.com
55a52c9d8d Merge branch 'master' into confetti-plugin 2023-05-04 09:45:37 +01:00
jeremy@jermolene.com
0c67269a20 Merge branch 'master' into confetti-plugin 2023-04-12 13:33:11 +01:00
jeremy@jermolene.com
74258d66b8 Adjust hint selectors for create tiddler tour step 2023-04-12 13:33:08 +01:00
jeremy@jermolene.com
5fe542a05b Use new element spotlight to provide hints 2023-02-01 21:14:29 +00:00
jeremy@jermolene.com
0bc6decefb Merge branch 'master' into confetti-plugin 2023-02-01 19:06:10 +00:00
jeremy@jermolene.com
8169e43087 More and bigger confetti by default 2023-02-01 17:12:28 +00:00
jeremy@jermolene.com
1d32ef44e5 Add element spotlight to dynannotate plugin
Useful for highlighting on screen elements for the user
2023-02-01 17:12:06 +00:00
jeremy@jermolene.com
75af83174b Merge branch 'master' into confetti-plugin 2023-01-24 12:40:52 +00:00
jeremy@jermolene.com
f4f37460b8 Add tour plugin 2023-01-16 19:56:39 +00:00
jeremy@jermolene.com
5b9f464f26 Add confetti widget 2023-01-16 19:45:05 +00:00
jeremy@jermolene.com
9676706052 Add support for delay parameter 2023-01-16 11:05:10 +00:00
jeremy@jermolene.com
c977baebca Typo 2023-01-15 21:59:07 +00:00
jeremy@jermolene.com
8a1ec1d055 First commit 2023-01-15 21:41:54 +00:00
288 changed files with 3247 additions and 4579 deletions

1
.gitignore vendored
View File

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

View File

@@ -177,7 +177,6 @@ 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"]) {
@@ -219,34 +218,9 @@ $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"}),
closeButton = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}), button = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}),
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,message,button], "class": "tc-error-form"});
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();
@@ -812,7 +786,6 @@ $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();
@@ -1994,10 +1967,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(path.sep).slice(0, -1); value = path.relative(rootPath, filename).split('/').slice(0, -1);
break; break;
case "filepath": case "filepath":
value = path.relative(rootPath, filename).split(path.sep).join('/'); value = path.relative(rootPath, filename);
break; break;
case "filename": case "filename":
value = path.basename(filename); value = path.basename(filename);
@@ -2465,7 +2438,6 @@ $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");
@@ -2480,12 +2452,8 @@ $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

@@ -1,7 +0,0 @@
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,7 +28,6 @@ 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: Parameters for the ''is'' filter operator. isfilteroperator: Operands 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 parameter for the 'is' filter operator Error/IsFilterOperator: Filter Error: Unknown operand 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

@@ -1,26 +0,0 @@
/*\
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,9 +14,12 @@ 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($tw.utils.sha256(title,{length: length})); results.push(sha256(title));
}); });
return results; return results;
}; };

View File

@@ -1,26 +0,0 @@
/*\
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

@@ -1,119 +0,0 @@
/*\
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

@@ -0,0 +1,86 @@
/*\
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,11 +35,9 @@ 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]);
if(tiddler) { for(f in tiddler.fields) {
for(f in tiddler.fields) { if(fields.indexOf(f) === -1) {
if(fields.indexOf(f) === -1) { fields.push(f);
fields.push(f);
}
} }
} }
} }
@@ -62,10 +60,8 @@ 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]);
if(tiddler) { for(f=0; f<fields.length; f++) {
for(f=0; f<fields.length; f++) { row.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || "" : ""));
row.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || "" : ""));
}
} }
output.push(row.join(",")); output.push(row.join(","));
} }

View File

@@ -47,11 +47,7 @@ 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,10 +100,6 @@ 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;
@@ -132,11 +128,6 @@ 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) {
@@ -298,7 +289,7 @@ exports.httpRequest = function(options) {
return; return;
} }
// Something went wrong // Something went wrong
options.callback($tw.language.getString("Error/XMLHttpRequest") + ": " + this.status,this[returnProp],this); options.callback($tw.language.getString("Error/XMLHttpRequest") + ": " + this.status,null,this);
} }
}; };
// Handle progress // Handle progress

View File

@@ -819,15 +819,6 @@ 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
*/ */
@@ -931,7 +922,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;
@@ -944,7 +935,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.updateDomNodeClasses(); this.assignDomNodeClasses();
} }
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:false}); var parser = widgetPointer.wiki.parseTiddler(title,{parseAsInline:true, configTrimWhiteSpace:true});
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

@@ -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,
backIndexer = this.getIndexer("BackIndexer"), backlinksIndexer = this.getIndexer("BacklinksIndexer"),
backlinks = backIndexer && backIndexer.subIndexers.link.lookup(targetTitle); backlinks = backlinksIndexer && backlinksIndexer.lookup(targetTitle);
if(!backlinks) { if(!backlinks) {
backlinks = []; backlinks = [];
@@ -549,68 +549,6 @@ 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,8 +40,10 @@ 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">>>
@@ -63,10 +65,11 @@ 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">
<p><<lingo Filter/Matches>></p> <<lingo Filter/Matches>>
<$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,18 +54,17 @@ caption: {{$:/language/Search/Standard/Caption}}
variable="listItem"> variable="listItem">
<$vars <$vars
userInput={{{ [[$:/temp/advancedsearch]get[text]] }}} userInput={{{ [[$:/temp/advancedsearch]get[text]] }}}
configTiddler={{{ [[$:/state/advancedsearch/standard/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}} configTiddler={{{ [[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}] }}}
searchListState="$:/temp/advancedsearch/selected-item"> searchListState="$:/temp/advancedsearch/selected-item">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]"> <$list
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,19 +2,10 @@ 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>>
!!.tc-control-panel-accent <$link to="$:/config/DownloadSaver/AutoSave"><<lingo AutoSave/Hint>></$link> !! <$link to="$:/config/DownloadSaver/AutoSave"><<lingo AutoSave/Hint>></$link>
<$checkbox tiddler="$:/config/DownloadSaver/AutoSave" <$checkbox tiddler="$:/config/DownloadSaver/AutoSave" field="text" checked="yes" unchecked="no" default="no"> <<lingo AutoSave/Description>> </$checkbox>
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,22 +3,14 @@ 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}}
!!.tc-control-panel-accent <$link to="$:/config/AutoSave"><<lingo AutoSave/Caption>></$link> !! <$link to="$:/config/AutoSave"><<lingo AutoSave/Caption>></$link>
<<lingo AutoSave/Hint>> <<lingo AutoSave/Hint>>
<$radio tiddler="$:/config/AutoSave" value="yes"> <$radio tiddler="$:/config/AutoSave" value="yes"> <<lingo AutoSave/Enabled/Description>> </$radio>
<span class="tc-tiny-gap-left"><<lingo AutoSave/Enabled/Description>></span>
</$radio>
<$radio tiddler="$:/config/AutoSave" value="no"> <$radio tiddler="$:/config/AutoSave" value="no"> <<lingo AutoSave/Disabled/Description>> </$radio>
<span class="tc-tiny-gap-left"><<lingo AutoSave/Disabled/Description>></span>
</$radio>
</div>

View File

@@ -2,16 +2,7 @@ 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" <$checkbox tiddler="$:/config/WikiParserRules/Inline/wikilink" field="text" checked="enable" unchecked="disable" default="enable"> <$link to="$:/config/WikiParserRules/Inline/wikilink"><<lingo Description>></$link> </$checkbox>
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,18 +2,13 @@ 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
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/ \define lingo-base() $:/language/ControlPanel/Settings/DefaultMoreSidebarTab/
\whitespace trim
<$link to="$:/config/DefaultMoreSidebarTab" class="tc-control-panel-item"> <$link to="$:/config/DefaultMoreSidebarTab"><<lingo Hint>></$link>
<<lingo Hint>>
</$link>
<$select tiddler="$:/config/DefaultMoreSidebarTab" class="tc-select"> <$select tiddler="$:/config/DefaultMoreSidebarTab">
<$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"> <option value=<<currentTiddler>>><$transclude field="caption"><$text text=<<currentTiddler>>/></$transclude></option>
<$text text=<<currentTiddler>>/> </$list>
</$transclude>
</option>
</$list>
</$select> </$select>

View File

@@ -5,16 +5,10 @@ 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" class="tc-control-panel-item"> <$link to="$:/config/DefaultSidebarTab"><<lingo Hint>></$link>
<<lingo Hint>>
</$link>
<$select tiddler="$:/config/DefaultSidebarTab" class="tc-select"> <$select tiddler="$:/config/DefaultSidebarTab">
<$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>>> <option value=<<currentTiddler>>><$transclude field="caption"><$text text=<<currentTiddler>>/></$transclude></option>
<$transclude field="caption"> </$list>
<$text text=<<currentTiddler>>/>
</$transclude>
</option>
</$list>
</$select> </$select>

View File

@@ -2,15 +2,8 @@ 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" <$checkbox tiddler="$:/config/TextEditor/EnableToolbar" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/TextEditor/EnableToolbar"><<lingo Description>></$link> </$checkbox>
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,17 +2,9 @@ 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>
<$link to="$:/config/TiddlerInfo/Mode" class="tc-control-panel-item"> <$radio tiddler="$:/config/TiddlerInfo/Mode" value="popup"> <<lingo Popup/Description>> </$radio>
<<lingo Hint>>
</$link>
<$radio tiddler="$:/config/TiddlerInfo/Mode" value="popup"> <$radio tiddler="$:/config/TiddlerInfo/Mode" value="sticky"> <<lingo Sticky/Description>> </$radio>
<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,25 +2,21 @@ 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}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/ \define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/
\whitespace trim
<$link to="$:/config/Navigation/openLinkFromInsideRiver" class="tc-control-panel-item"> <$link to="$:/config/Navigation/openLinkFromInsideRiver"><<lingo "InsideRiver/Hint">></$link>
<<lingo "InsideRiver/Hint">>
</$link>
<$select tiddler="$:/config/Navigation/openLinkFromInsideRiver" class="tc-select"> <$select tiddler="$:/config/Navigation/openLinkFromInsideRiver">
<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" class="tc-control-panel-item"> <$link to="$:/config/Navigation/openLinkFromOutsideRiver"><<lingo "OutsideRiver/Hint">></$link>
<<lingo "OutsideRiver/Hint">>
</$link>
<$select tiddler="$:/config/Navigation/openLinkFromOutsideRiver" class="tc-select"> <$select tiddler="$:/config/Navigation/openLinkFromOutsideRiver">
<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,12 +2,8 @@ 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"> <$checkbox tiddler="$:/config/MissingLinks" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/MissingLinks"><<lingo Description>></$link> </$checkbox>
<$link to="$:/config/MissingLinks" class="tc-control-panel-item">
<span class="tc-tiny-gap-left"><<lingo Description>></span>
</$link>
</$checkbox>

View File

@@ -2,21 +2,12 @@ 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" class="tc-control-panel-item"> <$link to="$:/config/Navigation/UpdateAddressBar"><<lingo Hint>></$link>
<<lingo Hint>>
</$link>
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permaview"> <$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permaview"> <<lingo Permaview/Description>> </$radio>
<span class="tc-tiny-gap-left"><<lingo Permaview/Description>></span>
</$radio>
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permalink"> <$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="permalink"> <<lingo Permalink/Description>> </$radio>
<span class="tc-tiny-gap-left"><<lingo Permalink/Description>></span>
</$radio>
<$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="no"> <$radio tiddler="$:/config/Navigation/UpdateAddressBar" value="no"> <<lingo No/Description>> </$radio>
<span class="tc-tiny-gap-left"><<lingo No/Description>></span>
</$radio>

View File

@@ -2,17 +2,9 @@ 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>
<$link to="$:/config/Navigation/UpdateHistory" class="tc-control-panel-item"> <$radio tiddler="$:/config/Navigation/UpdateHistory" value="yes"> <<lingo Yes/Description>> </$radio>
<<lingo Hint>>
</$link>
<$radio tiddler="$:/config/Navigation/UpdateHistory" value="yes"> <$radio tiddler="$:/config/Navigation/UpdateHistory" value="no"> <<lingo No/Description>> </$radio>
<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,24 +2,9 @@ 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" <$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>
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" <$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>
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,15 +2,7 @@ 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" <$checkbox tiddler="$:/config/Performance/Instrumentation" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Performance/Instrumentation"><<lingo Description>></$link> </$checkbox>
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,17 +2,9 @@ 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>
<$link to="$:/config/Tiddlers/TitleLinks" class="tc-control-panel-item"> <$radio tiddler="$:/config/Tiddlers/TitleLinks" value="yes"> <<lingo Yes/Description>> </$radio>
<<lingo Hint>>
</$link>
<$radio tiddler="$:/config/Tiddlers/TitleLinks" value="yes"> <$radio tiddler="$:/config/Tiddlers/TitleLinks" value="no"> <<lingo No/Description>> </$radio>
<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,15 +2,12 @@ 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}}
\whitespace trim
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/ \define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/
\whitespace trim
<$link to="$:/config/Toolbar/ButtonClass"><<lingo "Hint">></$link>
<$link to="$:/config/Toolbar/ButtonClass" class="tc-control-panel-item"> <$select tiddler="$:/config/Toolbar/ButtonClass">
<<lingo "Hint">> <$list filter="[all[shadows+tiddlers]tag[$:/tags/ToolbarButtonStyle]]">
</$link> <option value={{!!text}}>{{!!caption}}</option>
</$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,24 +2,9 @@ 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" <$checkbox tiddler="$:/config/Toolbar/Icons" field="text" checked="yes" unchecked="no" default="yes"> <$link to="$:/config/Toolbar/Icons"><<lingo Icons/Description>></$link> </$checkbox>
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" <$checkbox tiddler="$:/config/Toolbar/Text" field="text" checked="yes" unchecked="no" default="no"> <$link to="$:/config/Toolbar/Text"><<lingo Text/Description>></$link> </$checkbox>
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 class="tc-control-panel-setting" data-setting-title=<<currentTiddler>> style="border-top:1px solid #eee;"> <div style="border-top:1px solid #eee;">
!!.tc-control-panel-accent <$link><$transclude field="caption"/></$link> !! <$link><$transclude field="caption"/></$link>
<$transclude/> <$transclude/>

View File

@@ -1,9 +1,5 @@
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
@@ -14,13 +10,12 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
\whitespace trim \whitespace trim
<$let <$let
qualified-preview-state=<<qualify "$:/state/showeditpreview">> editPreviewStateTiddler={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<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={{{ [<edit-preview-state>match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}> <div class={{{ [<editPreviewStateTiddler>get[text]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,18 +1,12 @@
title: $:/core/ui/EditTemplate/controls title: $:/core/ui/EditTemplate/controls
tags: $:/tags/EditTemplate tags: $:/tags/EditTemplate
\define config-title() $:/config/EditToolbarButtons/Visibility/$(listItem)$ \define config-title()
$:/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"> <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>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"> <div style="clear: both;"></div>
<$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,63 +3,39 @@ tags: $:/tags/EditTemplate
\whitespace trim \whitespace trim
\procedure lingo-base() $:/language/EditTemplate/ \define lingo-base() $:/language/EditTemplate/
\procedure tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags") \define tag-styles()
<$wikify name="foregroundColor" background-color:$(backgroundColor)$;
text="""<$macrocall $name="contrastcolour" fill:$(foregroundColor)$;
target=<<colour>> color:$(foregroundColor)$;
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
\procedure tag-body(colour,palette,icon,tagField:"tags") \define tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags")
<$macrocall $name="tag-body-inner" \whitespace trim
colour=`$(colour)$` <$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
colourA={{{ [<palette>getindex[foreground]] }}} <span style=<<tag-styles>> class="tc-tag-label tc-tag-list-item tc-small-gap-right" data-tag-title=<<currentTiddler>>>
colourB={{{ [<palette>getindex[background]] }}} <$transclude tiddler="""$icon$"""/><$view field="title" format="text"/>
fallbackTarget={{{ [<palette>getindex[tag-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>
icon=<<icon>> </span>
tagField=<<tagField>> </$vars>
/>
\end \end
\procedure edit-tags-template(tagField:"tags") \define tag-body(colour,palette,icon,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="[<currentTiddler>get<tagField>enlist-input[]sort[title]]" storyview="pop"> <$list filter="[list[!!$tagField$]sort[title]]" storyview="pop">
<$macrocall $name="tag-body" <$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__>>/>
colour={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} </$list>
palette={{$:/palette}} <$vars tabIndex={{$:/config/EditTabIndex}} cancelPopups="yes">
icon={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} <$macrocall $name="tag-picker" tagField=<<__tagField__>>/>
tagField=<<tagField>> </$vars>
/>
</$list>
<$let tabIndex={{$:/config/EditTabIndex}} cancelPopups="yes">
<$macrocall $name="tag-picker" tagField=<<tagField>>/>
</$let>
</div> </div>
\end \end
<$let saveTiddler=<<currentTiddler>>> <$set name="saveTiddler" value=<<currentTiddler>>>
<$macrocall $name="edit-tags-template" tagField=<<tagField>>/> <$macrocall $name="edit-tags-template" tagField=<<tagField>>/>
</$let> </$set>

View File

@@ -10,7 +10,7 @@ shortcuts: ((preview))
\whitespace trim \whitespace trim
<span> <span>
<$transclude $tiddler={{{ [<edit-preview-state>match[yes]then[$:/core/images/preview-open]else[$:/core/images/preview-closed]] }}} /> <$transclude $tiddler={{{ [<editPreviewStateTiddler>get[text]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,16 +1,17 @@
title: $:/core/ui/PageTemplate/pagecontrols title: $:/core/ui/PageTemplate/pagecontrols
\whitespace trim \whitespace trim
\define config-title() $:/config/PageControlButtons/Visibility/$(listItem)$ \define config-title()
$:/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,41 +4,48 @@ 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() $:/config/PageControlButtons/Visibility/$(listItem)$ \define config-title()
$:/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/default-layout icon: $:/core/images/layout-button
code-body: yes code-body: yes
\whitespace trim \whitespace trim

View File

@@ -2,38 +2,31 @@ title: $:/core/ui/ViewTemplate/title
tags: $:/tags/ViewTemplate tags: $:/tags/ViewTemplate
\whitespace trim \whitespace trim
\define title-styles() fill:$(foregroundColor)$; \define title-styles()
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]]" <$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>
storyview="pop" </span>
variable="listItem" <$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}>
> <$link>
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]"> <$list filter="[<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] +[!is[blank]]" variable="ignore">
<$transclude tiddler=<<listItem>>/> <$let foregroundColor={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}>
</$set> <span class="tc-tiddler-title-icon" style=<<title-styles>>>
</$list> {{||$:/core/ui/TiddlerIcon}}
</span> </span>
<$set name="tv-wikilinks" value={{$:/config/Tiddlers/TitleLinks}}> </$let>
<$link> </$list>
<$list filter="[<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] +[!is[blank]]" <$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/title/default]] }}} />
variable="ignore" </$link>
> </$set>
<$let foregroundColor={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}> </div>
<span class="tc-tiddler-title-icon" style=<<title-styles>>>
{{||$:/core/ui/TiddlerIcon}} <$reveal type="nomatch" text="" default="" state=<<tiddlerInfoState>> class="tc-tiddler-info tc-popup-handle" animate="yes" retain="yes">
</span>
</$let> <$list filter="[all[shadows+tiddlers]tag[$:/tags/TiddlerInfoSegment]!has[draft.of]] [[$:/core/ui/TiddlerInfo]]" variable="listItem"><$transclude tiddler=<<listItem>> mode="block"/></$list>
</$list>
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/title/default]] }}} /> </$reveal>
</$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,41 +4,49 @@ 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() $:/config/ViewToolbarButtons/Visibility/$(listItem)$ \define config-title()
$:/config/ViewToolbarButtons/Visibility/$(listItem)$
<$button popup=<<qualify "$:/state/popup/more">> \end
tooltip={{$:/language/Buttons/More/Hint}} <$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">
aria-label={{$:/language/Buttons/More/Caption}} <$list filter="[<tv-config-toolbar-icons>match[yes]]">
class=<<tv-config-toolbar-class>> {{$:/core/images/down-arrow}}
selectedClass="tc-selected" </$list>
> <$list filter="[<tv-config-toolbar-text>match[yes]]">
<$list filter="[<tv-config-toolbar-icons>match[yes]]"> <span class="tc-btn-text">
{{$:/core/images/down-arrow}} <$text text={{$:/language/Buttons/More/Caption}}/>
</$list> </span>
<$list filter="[<tv-config-toolbar-text>match[yes]]"> </$list>
<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">
<$set name="tv-config-toolbar-icons" value="yes"> <div class="tc-drop-down">
<$set name="tv-config-toolbar-text" value="yes">
<$set name="tv-config-toolbar-class" value="tc-btn-invisible"> <$set name="tv-config-toolbar-icons" value="yes">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]"
variable="listItem" <$set name="tv-config-toolbar-text" value="yes">
>
<$reveal type="match" state=<<config-title>> text="hide"> <$set name="tv-config-toolbar-class" value="tc-btn-invisible">
<$set name="tv-config-toolbar-class"
filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]" <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" variable="listItem">
>
<$transclude tiddler=<<listItem>> mode="inline"/> <$reveal type="match" state=<<config-title>> text="hide">
</$set>
</$reveal> <$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
</$list>
</$set> <$transclude tiddler=<<listItem>> mode="inline"/>
</$set>
</$set> </$set>
</div>
</$reveal>
</$list>
</$set>
</$set>
</$set>
</div>
</$reveal> </$reveal>

View File

@@ -1,69 +1,76 @@
title: $:/core/macros/CSS title: $:/core/macros/CSS
tags: $:/tags/Macro $:/tags/Global tags: $:/tags/Macro
\procedure colour(name) \define colour(name)
\whitespace trim <$transclude tiddler={{$:/palette}} index="$name$"><$transclude tiddler="$:/palettes/Vanilla" index="$name$"><$transclude tiddler="$:/config/DefaultColourMappings/$name$"/></$transclude></$transclude>
<$transclude $tiddler={{$:/palette}} $index=`$(name)$`>
<$transclude $tiddler="$:/palettes/Vanilla" $index=`$(name)$`>
<$transclude $tiddler=`$:/config/DefaultColourMappings/$(name)$`/>
</$transclude>
</$transclude>
\end \end
\procedure color(name) \define color(name)
<$macrocall $name=colour name=`$(name)$`/> <<colour $name$>>
\end \end
\function box-shadow(shadow) \define box-shadow(shadow)
[[ -webkit-box-shadow: $(shadow)$; ``
-moz-box-shadow: $(shadow)$; -webkit-box-shadow: $shadow$;
box-shadow: $(shadow)$;]substitute[]] -moz-box-shadow: $shadow$;
box-shadow: $shadow$;
``
\end \end
\function filter(filter) \define filter(filter)
[[ -webkit-filter: $(filter)$; ``
-moz-filter: $(filter)$; -webkit-filter: $filter$;
filter: $(filter)$;]substitute[]] -moz-filter: $filter$;
filter: $filter$;
``
\end \end
\function transition(transition) \define transition(transition)
[[ -webkit-transition: $(transition)$; ``
-moz-transition: $(transition)$; -webkit-transition: $transition$;
transition: $(transition)$;]substitute[]] -moz-transition: $transition$;
transition: $transition$;
``
\end \end
\function transform-origin(origin) \define transform-origin(origin)
[[ -webkit-transform-origin: $(origin)$; ``
-moz-transform-origin: $(origin)$; -webkit-transform-origin: $origin$;
transform-origin: $(origin)$;]substitute[]] -moz-transform-origin: $origin$;
transform-origin: $origin$;
``
\end \end
\function background-linear-gradient(gradient) \define background-linear-gradient(gradient)
[[ background-image: linear-gradient($(gradient)$); ``
background-image: -o-linear-gradient($(gradient)$); background-image: linear-gradient($gradient$);
background-image: -moz-linear-gradient($(gradient)$); background-image: -o-linear-gradient($gradient$);
background-image: -webkit-linear-gradient($(gradient)$); background-image: -moz-linear-gradient($gradient$);
background-image: -ms-linear-gradient($(gradient)$);]substitute[]] background-image: -webkit-linear-gradient($gradient$);
background-image: -ms-linear-gradient($gradient$);
``
\end \end
\function column-count(columns) \define column-count(columns)
[[-moz-column-count: $(columns)$; ``
-webkit-column-count: $(columns)$; -moz-column-count: $columns$;
column-count: $(columns)$;]substitute[]] -webkit-column-count: $columns$;
column-count: $columns$;
``
\end \end
\procedure datauri(title) \define datauri(title)
<$macrocall $name="makedatauri" type={{{ [<title>get[type]] }}} text={{{ [<title>get[text]] }}} _canonical_uri={{{ [<title>get[_canonical_uri]] }}}/> <$macrocall $name="makedatauri" type={{$title$!!type}} text={{$title$}} _canonical_uri={{$title$!!_canonical_uri}}/>
\end \end
\procedure if-sidebar(text) \define 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
\procedure if-no-sidebar(text) \define 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
\procedure if-background-attachment(text) \define 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,26 +1,20 @@
title: $:/core/macros/copy-to-clipboard title: $:/core/macros/copy-to-clipboard
tags: $:/tags/Macro $:/tags/Global tags: $:/tags/Macro
\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}}>
\procedure copy-to-clipboard(src,class:"tc-btn-invisible",style) {{$:/core/images/copy-clipboard}}
<$button message="tm-copy-to-clipboard" &#32;
param=<<src>> <$text text={{$:/language/Buttons/CopyToClipboard/Caption}}/>
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
\procedure copy-to-clipboard-above-right(src,class:"tc-btn-invisible",style) \define 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/Global tags: $:/tags/Macro
\define compareTiddlerText(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle)
\whitespace trim \whitespace trim
<$set name="source" tiddler=<<__sourceTiddlerTitle__>> subtiddler=<<__sourceSubTiddlerTitle__>>>
\procedure compareTiddlerText(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle) <$set name="dest" tiddler=<<__destTiddlerTitle__>> subtiddler=<<__destSubTiddlerTitle__>>>
<$set name="source" tiddler=<<sourceTiddlerTitle>> subtiddler=<<sourceSubTiddlerTitle>>> <$diff-text source=<<source>> dest=<<dest>>/>
<$set name="dest" tiddler=<<destTiddlerTitle>> subtiddler=<<destSubTiddlerTitle>>> </$set>
<$diff-text source=<<source>> dest=<<dest>>/>
</$set>
</$set> </$set>
\end \end
\procedure compareTiddlers(sourceTiddlerTitle,sourceSubTiddlerTitle,destTiddlerTitle,destSubTiddlerTitle,exclude) \define 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,33 +1,32 @@
title: $:/core/macros/tag-picker title: $:/core/macros/tag-picker
tags: $:/tags/Macro $:/tags/Global tags: $:/tags/Macro
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[]]
\procedure get-tagpicker-focus-selector() \define get-tagpicker-focus-selector() [data-tiddler-title="$(currentTiddlerCSSEscaped)$"] .tc-add-tag-name input
\function currentTiddlerCSSEscaped() [<saveTiddler>escapecss[]]
[data-tiddler-title=`$(currentTiddlerCSSEscaped)$`] .tc-add-tag-name input
\end
\procedure delete-tag-state-tiddlers() <$action-deletetiddler $filter="[<newTagNameTiddler>] [<storeTitle>] [<tagSelectionState>]"/> \define delete-tag-state-tiddlers() <$action-deletetiddler $filter="[<newTagNameTiddler>] [<storeTitle>] [<tagSelectionState>]"/>
\procedure add-tag-actions() \define add-tag-actions(actions,tagField:"tags")
\whitespace trim \whitespace trim
<$let tag=<<tag>>> <$set name="tag" value={{{ [<__tiddler__>get[text]] }}}>
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter='+[toggle<tag>trim[]]'/> <$list
<$list filter="[<saveTiddler>!contains:$tagField$<tag>!match[]]"
filter="[<tag>] :intersection[<saveTiddler>get<tagField>enlist-input[]]" variable="ignore"
variable="ignore" emptyMessage="<$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter='-[<tag>]'/>"
emptyMessage="<<actions>>" >
/> <$action-listops $tiddler=<<saveTiddler>> $field=<<__tagField__>> $subfilter="[<tag>trim[]]"/>
</$let> <$transclude $variable="__actions__"/>
</$list>
</$set>
<<delete-tag-state-tiddlers>> <<delete-tag-state-tiddlers>>
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/> <$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
\end \end
\procedure clear-tags-actions-inner() \define 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'>>"
> >
@@ -35,133 +34,144 @@ second-search-filter: [tags[]is[system]search:title<userInput>sort[]]
</$list> </$list>
\end \end
\procedure clear-tags-actions() \define clear-tags-actions()
\whitespace trim \whitespace trim
<$let userInput=<<userInput>>> <$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
<$list <$list filter="[<newTagNameTiddler>get[text]!match<userInput>]" emptyMessage="<<clear-tags-actions-inner>>">
filter="[<newTagNameTiddler>get[text]!match<userInput>]" <$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
emptyMessage="<<clear-tags-actions-inner>>"
>
<$action-setfield $tiddler=<<newTagNameTiddler>> text=<<userInput>>/>
<$action-setfield $tiddler=<<refreshTitle>> text="yes"/>
</$list> </$list>
</$let> </$set>
\end \end
\procedure add-button-actions() \define tag-picker-inner(actions,tagField:"tags")
<$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
<$list <$vars
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>getindex[tag-background]] }}} fallbackTarget={{$(palette)$##tag-background}}
colourA={{{ [<palette>getindex[foreground]] }}} colourA={{$(palette)$##foreground}}
colourB={{{ [<palette>getindex[background]] }}} colourB={{$(palette)$##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[]]"
> >
<div class="tc-edit-add-tag"> <$vars
<div> storeTitle={{{ [<newTagNameInputTiddler>!match[]] ~[<newTagNameInputTiddlerQualified>] }}}
<span class="tc-add-tag-name tc-small-gap-right"> tagSelectionState={{{ [<newTagNameSelectionTiddler>!match[]] ~[<newTagNameSelectionTiddlerQualified>] }}}
<$transclude >
$variable="keyboard-driven-input" <$vars
tiddler=<<newTagNameTiddler>> refreshTitle=<<qualify "$:/temp/NewTagName/refresh">>
storeTitle=<<storeTitle>> nonSystemTagsFilter="[tags[]!is[system]search:title<userInput>sort[]]"
refreshTitle=<<refreshTitle>> systemTagsFilter="[tags[]is[system]search:title<userInput>sort[]]"
selectionStateTitle=<<tagSelectionState>> >
inputAcceptActions=<<add-tag-actions>> <div class="tc-edit-add-tag">
inputCancelActions=<<clear-tags-actions>> <div>
tag="input" <span class="tc-add-tag-name tc-small-gap-right">
placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} <$macrocall
focusPopup=<<tagAutoComplete>> $name="keyboard-driven-input"
class="tc-edit-texteditor tc-popup-handle" tiddler=<<newTagNameTiddler>>
tabindex=<<tabIndex>> storeTitle=<<storeTitle>>
focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}} refreshTitle=<<refreshTitle>>
filterMinLength={{$:/config/Tags/MinLength}} selectionStateTitle=<<tagSelectionState>>
cancelPopups=<<cancelPopups>> inputAcceptActions="<$macrocall $name='add-tag-actions' actions=<<__actions__>> tagField=<<__tagField__>>/>"
configTiddlerFilter="[[$:/core/macros/tag-picker]]" inputCancelActions=<<clear-tags-actions>>
/> tag="input"
</span> placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}}
<$button popup=<<tagAutoComplete>> focusPopup=<<qualify "$:/state/popup/tags-auto-complete">>
class="tc-btn-invisible tc-btn-dropdown" class="tc-edit-texteditor tc-popup-handle"
tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} tabindex=<<tabIndex>>
aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}} focus={{{ [{$:/config/AutoFocus}match[tags]then[true]] ~[[false]] }}}
> filterMinLength={{$:/config/Tags/MinLength}}
{{$:/core/images/down-arrow}} cancelPopups=<<cancelPopups>>
</$button> configTiddlerFilter="[[$:/core/macros/tag-picker]]"
<$reveal state=<<storeTitle>> type="nomatch" text=""> />
<$button actions=<<delete-tag-state-tiddlers>> </span>
class="tc-btn-invisible tc-small-gap tc-btn-dropdown" <$button popup=<<qualify "$:/state/popup/tags-auto-complete">>
tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}} class="tc-btn-invisible tc-btn-dropdown"
aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}} tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}}
> 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>>
> >
{{$:/language/EditTemplate/Tags/Add/Button}} {{$:/core/images/down-arrow}}
</$button> </$button>
</$let> <$reveal state=<<storeTitle>> type="nomatch" text="">
</span> <$button class="tc-btn-invisible tc-small-gap tc-btn-dropdown"
</div> tooltip={{$:/language/EditTemplate/Tags/ClearInput/Hint}}
<div class="tc-block-dropdown-wrapper"> aria-label={{$:/language/EditTemplate/Tags/ClearInput/Caption}}
<$reveal state=<<tagAutoComplete>> type="nomatch" text=""> >
<div class="tc-block-dropdown tc-block-tags-dropdown"> {{$:/core/images/close-button}}<<delete-tag-state-tiddlers>>
<$let userInput=<<userInput>>> </$button>
<$transclude $variable="list-tags" filter=<<nonSystemTagsFilter>> suffix="-primaryList" /> </$reveal>
<hr> <span class="tc-add-tag-button tc-small-gap-left">
<$transclude $variable="list-tags" filter=<<systemTagsFilter>> suffix="-secondaryList" /> <$set name="tag" value={{{ [<newTagNameTiddler>get[text]] }}}>
</$let> <$button set=<<newTagNameTiddler>> setTo="" class="">
<$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>
</$reveal> <div class="tc-block-dropdown-wrapper">
</div> <$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> type="nomatch" text="" default="">
</div> <div class="tc-block-dropdown tc-block-tags-dropdown">
</$let> <$set name="userInput" value={{{ [<storeTitle>get[text]] }}}>
<$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
\procedure tag-picker(actions, tagField:"tags") \define tag-picker(actions,tagField:"tags")
\function userInput() [<storeTitle>get[text]]
\function tag() [<newTagNameTiddler>get[text]]
\whitespace trim \whitespace trim
<$let <$vars saveTiddler=<<currentTiddler>> palette={{$:/palette}}>
saveTiddler=<<currentTiddler>> <$list
palette={{$:/palette}} filter="[<newTagNameTiddler>match[]]"
qualified=<<qualify "$:/temp/NewTagName">> emptyMessage="<$macrocall $name='tag-picker-inner' actions=<<__actions__>> tagField=<<__tagField__>>/>"
newTagNameTiddler={{{ [<newTagNameTiddler>!match[]] ~[<qualified>] }}} >
> <$set name="newTagNameTiddler" value=<<qualify "$:/temp/NewTagName">>>
<$transclude $variable="tag-picker-inner" /> <$macrocall $name="tag-picker-inner" actions=<<__actions__>> tagField=<<__tagField__>>/>
</$let> </$set>
</$list>
</$vars>
\end \end

View File

@@ -16,7 +16,6 @@ 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: 20240302110658300 modified: 20221029161501848
tags: tags:
title: Javascript Widget Tutorial title: Javascript Widget Tutorial
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@@ -9,23 +9,21 @@ 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. # 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 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.
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]]. !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]]
!! The tutorial ! Notes
* [[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.
@@ -33,11 +31,7 @@ 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,15 +7,7 @@ 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]]).
!! Use a framework !! Installing and Configuring Babel
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
@@ -41,9 +33,7 @@ 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.">>
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
!!! 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:
@@ -53,7 +43,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:
@@ -81,7 +71,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:
@@ -114,7 +104,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]]:
@@ -132,11 +122,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

@@ -1,5 +0,0 @@
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

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

View File

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

View File

@@ -47,7 +47,6 @@
"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": 120,"h": 120, "r": -2}, " ": {"x": 30,"y": 17,"w": 140,"h": 140, "r": -2},
"Tiddlers": {"x": 60,"y": 15,"w": 120,"h": 120, "r": 10}, "Tiddlers": {"x": 60,"y": 15,"w": 140,"h": 140, "r": 10},
"Links": {"x": 90,"y": 13,"w": 120,"h": 120, "r": -7}, "Links": {"x": 90,"y": 13,"w": 140,"h": 140, "r": -7},
"Formatting": {"x": 120,"y": 18,"w": 120,"h": 120, "r": 5}, "Formatting": {"x": 120,"y": 18,"w": 140,"h": 140, "r": 5},
"Images": {"x": 150,"y": 12,"w": 120,"h": 120, "r": -11}, "Images": {"x": 150,"y": 12,"w": 140,"h": 140, "r": -11},
"Audio": {"x": 180,"y": 14,"w": 120,"h": 120, "r": 16}, "Audio": {"x": 180,"y": 14,"w": 140,"h": 140, "r": 16},
"Tags": {"x": 210,"y": 15,"w": 120,"h": 120, "r": 20}, "Tags": {"x": 210,"y": 15,"w": 140,"h": 140, "r": 20},
"Transclusion": {"x": 240,"y": 16,"w": 120,"h": 120, "r": -4}, "Transclusion": {"x": 240,"y": 16,"w": 140,"h": 140, "r": -4},
"Lists": {"x": 275,"y": 13,"w": 120,"h": 120, "r": 6}, "Lists": {"x": 275,"y": 13,"w": 140,"h": 140, "r": 6},
"Customisation": {"x": 310,"y": 19,"w": 120,"h": 120, "r": -5}, "Customisation": {"x": 310,"y": 19,"w": 140,"h": 140, "r": -5},
"Plugins": {"x": 350,"y": 12,"w": 120,"h": 120, "r": 10}, "Plugins": {"x": 350,"y": 12,"w": 140,"h": 140, "r": 10},
"Translations": {"x": 390,"y": 15,"w": 120,"h": 120, "r": 8} "Translations": {"x": 390,"y": 15,"w": 140,"h": 140, "r": 8}
} }
} }

View File

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

View File

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

View File

@@ -12,7 +12,6 @@ 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,7 +14,6 @@ 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,25 +0,0 @@
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

@@ -1,30 +0,0 @@
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

@@ -1,148 +0,0 @@
/*\
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('');
});
});
});
})();

View File

@@ -22,7 +22,6 @@
"it-IT", "it-IT",
"ja-JP", "ja-JP",
"ko-KR", "ko-KR",
"mk-MK",
"nl-NL", "nl-NL",
"pa-IN", "pa-IN",
"pl-PL", "pl-PL",

View File

@@ -0,0 +1,3 @@
list: HelloThere
title: $:/StoryList
type: text/vnd.tiddlywiki

View File

@@ -0,0 +1,5 @@
created: 20220728145919904
list: Brackets Base64 HelloThere GettingStarted Community
modified: 20220728145919904
title: $:/StoryList
type: text/vnd.tiddlywiki

View File

@@ -1,12 +0,0 @@
created: 20240313100515958
modified: 20240313103959789
tags: Editions
title: TiddlyWiki Docs PR Maker
''~TiddlyWiki Docs PR Maker'' is a special edition of tiddlywiki.com designed to help you contribute to and improve the documentation made by [[@saqimtiaz|https://github.com/saqimtiaz/]].
https://saqimtiaz.github.io/tw5-docs-pr-maker/
All changes made to the documentation can be very easily submitted to GitHub -- the pull request will be automatically made, hence the "PR Maker" name of the edition.
You will need to create a free ~GitHub account and sign the [[Contributor License Agreement]] before using the Docs PR Maker. You can find more details about contributing to the documentation [[here|Improving TiddlyWiki Documentation]].

View File

@@ -8,7 +8,6 @@ There are several resources for developers to learn more about TiddlyWiki and to
* [[tiddlywiki.com/dev|https://tiddlywiki.com/dev]] is the official developer documentation * [[tiddlywiki.com/dev|https://tiddlywiki.com/dev]] is the official developer documentation
* Get involved in the [[development on GitHub|https://github.com/Jermolene/TiddlyWiki5]] * Get involved in the [[development on GitHub|https://github.com/Jermolene/TiddlyWiki5]]
** [img[https://repobeats.axiom.co/api/embed/5a3bb51fd1ebe84a2da5548f78d2d74e456cebf3.svg]]
** [[Discussions|https://github.com/Jermolene/TiddlyWiki5/discussions]] are for Q&A and open-ended discussion ** [[Discussions|https://github.com/Jermolene/TiddlyWiki5/discussions]] are for Q&A and open-ended discussion
** [[Issues|https://github.com/Jermolene/TiddlyWiki5/issues]] are for raising bug reports and proposing specific, actionable new ideas ** [[Issues|https://github.com/Jermolene/TiddlyWiki5/issues]] are for raising bug reports and proposing specific, actionable new ideas
* The older ~TiddlyWikiDev Google Group is now closed in favour of [[GitHub Discussions|https://github.com/Jermolene/TiddlyWiki5/discussions]] but remains a useful archive: https://groups.google.com/group/TiddlyWikiDev * The older ~TiddlyWikiDev Google Group is now closed in favour of [[GitHub Discussions|https://github.com/Jermolene/TiddlyWiki5/discussions]] but remains a useful archive: https://groups.google.com/group/TiddlyWikiDev

View File

@@ -1,5 +1,5 @@
created: 20140820151051019 created: 20140820151051019
modified: 20240313114828368 modified: 20190115165616599
tags: Community tags: Community
title: Improving TiddlyWiki Documentation title: Improving TiddlyWiki Documentation
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@@ -8,29 +8,9 @@ Anyone can submit improvements to the TiddlyWiki documentation that appears on h
<<.warning """If you already know GitHub, note that documentation updates must be directed to the `tiddlywiki-com` branch""">> <<.warning """If you already know GitHub, note that documentation updates must be directed to the `tiddlywiki-com` branch""">>
! Before you start editing
# Read and observe the [[Documentation Style Guide]] # Read and observe the [[Documentation Style Guide]]
# Create an account on https://github.com if you don't already have one # Create an account on https://github.com if you don't already have one
# If you haven't done so already, sign the [[Contributor License Agreement]] as described in [[Signing the Contributor License Agreement]] # If you haven't done so already, sign the [[Contributor License Agreement]] as described in [[Signing the Contributor License Agreement]]
! Editing and submitting your edits
You can choose to edit the documentation using the [[TiddlyWiki Docs PR Maker]] or directly in ~GitHub. The first method is especially recommended for users not familiar with ~GitHub.
!! Using [[Docs PR Maker|TiddlyWiki Docs PR Maker]] edition
# Go to https://saqimtiaz.github.io/tw5-docs-pr-maker/ or click the link displayed in the ribbon underneath the title when editing a tiddler on tiddlywiki.com
# Go through the quick introduction where you will need to provide your ~GitHub username and a ~GitHub access token (you will be guided in creating one)
# Edit or create tiddlers to update the documentation, the wiki will keep track of all changes
# Click the "Submit updates" button and check if all the tiddlers that you edited are included in the submission; if not, drag them into the box
# Provide a concise title and description of your changes (see the rules about titling pull requests in [[contribution guidelines|Contributing]])
# Submit your changes:
** "Save as draft" will create a //draft// pull request, this is useful if you don't want the changes to be merged //yet//, because you want to work on it later or discuss it first
** "Submit documentation update" will create a pull request, which will be immediately available for review and merging
!! Using ~GitHub
# On https://tiddlywiki.com, click "edit" on the tiddler you want to improve # On https://tiddlywiki.com, click "edit" on the tiddler you want to improve
# You should see a pink banner with the text: //Can you help us improve this documentation? Find out how to edit this tiddler on ~GitHub// # You should see a pink banner with the text: //Can you help us improve this documentation? Find out how to edit this tiddler on ~GitHub//
# Click on the external link ...''this tiddler on ~GitHub'' # Click on the external link ...''this tiddler on ~GitHub''

View File

@@ -3,7 +3,7 @@ modified: 20210106151027439
tags: [[Community Plugins]] tags: [[Community Plugins]]
title: Disqus comments plugin by bimlas title: Disqus comments plugin by bimlas
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
url: https://bimlas.github.io/tw5-disqus/ url: https://bimlas.gitlab.io/tw5-disqus/
Use this plugin to give your visitors the opportunity to comment on your tiddlers without changing the wiki itself. Use this plugin to give your visitors the opportunity to comment on your tiddlers without changing the wiki itself.

View File

@@ -3,7 +3,7 @@ modified: 20210106151027488
tags: [[Community Plugins]] tags: [[Community Plugins]]
title: Kin filter operator by bimlas title: Kin filter operator by bimlas
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
url: https://bimlas.github.io/tw5-kin-filter/ url: https://bimlas.gitlab.io/tw5-kin-filter/
The purpose of the kin operator with examples: The purpose of the kin operator with examples:

View File

@@ -3,7 +3,7 @@ modified: 20210106151027508
tags: [[Community Plugins]] tags: [[Community Plugins]]
title: Locator plugin by bimlas title: Locator plugin by bimlas
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
url: https://bimlas.github.io/tw5-locator/ url: https://bimlas.gitlab.io/tw5-locator/
For those who use many tags or store many different topics in a common wiki the Locator plugin is a table of contents widget and an enhanced search engine that gives you the opportunity to filter results by related tags. Unlike table of contents, standard search and list of tags, this plugin offers these features in an organic, collaborative way. For those who use many tags or store many different topics in a common wiki the Locator plugin is a table of contents widget and an enhanced search engine that gives you the opportunity to filter results by related tags. Unlike table of contents, standard search and list of tags, this plugin offers these features in an organic, collaborative way.

View File

@@ -1,9 +1,9 @@
created: 20210101154635213 created: 20210101154635213
modified: 20240131143350890 modified: 20210110210929321
tags: [[Community Themes]] tags: [[Community Themes]]
title: "Notebook theme" by Nicolas Petton title: "Notebook theme" by Nicolas Petton
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
url: https://saqimtiaz.github.io/sq-tw/notebook.html url: https://nicolas.petton.fr/tw/notebook.html
Notebook is a clean, uncluttered theme for ~TiddlyWiki. Notebook is a clean, uncluttered theme for ~TiddlyWiki.

View File

@@ -1,42 +0,0 @@
created: 20240309135835396
modified: 20240309142156125
tags: Concepts
title: Bags and Recipes
type: text/vnd.tiddlywiki
The bags and recipes model is a reference architecture for how tiddlers can be shared between multiple wikis. It was first introduced by TiddlyWeb in 2008.
The principles of bags and recipes can be simply stated:
# Tiddlers are stored in named "bags"
# Bags have access controls that determines which users can read or write to them
# Recipes are named lists of bags, ordered from lowest priority to highest
# The tiddlers within a recipe are accumulated in turn from each bag in the recipe in order of increasing priority. Thus, if there are multiple tiddlers with the same title in different bags then the one from the highest priority bag will be used as the recipe tiddler
# Wikis are composed by splicing the tiddlers from the corresponding recipe into the standard TW5 HTML template
A very simple example of the recipe/bag model might be for a single user who maintains the following bags:
* ''recipes'' - tiddlers related to cooking recipes
* ''work'' - tiddlers related to work
* ''app'' - common tiddlers for customising TiddlyWiki
Those bags would be used with the following recipes:
* ''recipes'' --> recipes, app - wiki for working with recipes, with common custom components
* ''work'' --> work, app - wiki for working with work, with common custom components
* ''app'' --> app - wiki for maintaining custom components
All of this will work dynamically, so changes to the app bag will instantly ripple into the affected hosted wikis.
A more complex example might be for a teacher working with a group of students:
* ''student-{name}'' bag for each students work
* ''teacher-course'' bag for the coursework, editable by the teacher
* ''teacher-tools'' bag for custom tools used by the teacher
Those bags would be exposed through the following hosted wikis:
* ''student-{name}'' hosted wiki for each students work, including the coursework material
* ''teacher-course'' hosted wiki for the coursework, editable by the teacher
* ''teacher'' hosted wiki for the teacher, bringing together all the bags, giving them an overview of all the students work

View File

@@ -1,7 +1,7 @@
created: 20130827080000000 created: 20130827080000000
list: [[Introduction to filter notation]] [[Filter Syntax]] list: [[Introduction to filter notation]] [[Filter Syntax]]
modified: 20230710074511095 modified: 20220316145511797
tags: Reference Concepts TableOfContents tags: Reference Concepts
title: Filters title: Filters
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@@ -15,7 +15,7 @@ You can think of TiddlyWiki as a database in which the records are tiddlers. A d
A <<.def filter>> is a concise notation for selecting a particular [[set of tiddlers|Title Selection]], known as its <<.def "output">>. Whenever ~TiddlyWiki encounters a filter, it calculates the output. Further work can then be done with just those tiddlers, such as [[counting|CountWidget]] or [[listing|ListWidget]] them. A <<.def filter>> is a concise notation for selecting a particular [[set of tiddlers|Title Selection]], known as its <<.def "output">>. Whenever ~TiddlyWiki encounters a filter, it calculates the output. Further work can then be done with just those tiddlers, such as [[counting|CountWidget]] or [[listing|ListWidget]] them.
The following example passes a filter to the <<.mlink list-links>> macro. It displays a list of all tiddlers using the <<.olink2 tag tag>> <<.word Filters>>: The following example passes a filter to the <<.mlink list-links>> macro to display a list of all tiddlers whose titles are <<.olink2 tagged tag>> with the word <<.word Filters>>:
<<wikitext-example-without-html """<<list-links "[tag[Filters]]">>""" >> <<wikitext-example-without-html """<<list-links "[tag[Filters]]">>""" >>

View File

@@ -1,8 +0,0 @@
created: 20240202112358997
modified: 20240202120248326
tags: Concepts
title: Temporary Tiddlers
Temporary tiddlers are tiddlers that will be discarded when TiddlyWiki is saved. Under default configuration of the SavingMechanism (more specifically, the filter in [[$:/core/save/all]]), these are tiddlers prefixed with `$:/temp/`. This prefix makes them SystemTiddlers as well.
One example usage of temporary tiddlers is storing the search queries. The query typed in the [[$:/AdvancedSearch]] is stored in [[$:/temp/advancedsearch]].

View File

@@ -1,5 +1,5 @@
created: 20130827075900000 created: 20130827075900000
modified: 20230321130421587 modified: 20161216173541948
tags: Concepts tags: Concepts
title: TextReference title: TextReference
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@@ -27,7 +27,7 @@ Text references can be used in several places:
* As [[indirect parameters|Filter Parameter]] within [[Filters]] (eg, `<$list filter="[tag{MyTag!!name}]"/>`) * As [[indirect parameters|Filter Parameter]] within [[Filters]] (eg, `<$list filter="[tag{MyTag!!name}]"/>`)
* As [[indirect attributes|HTML in WikiText]] of an element or widget (eg, `<$widget attrib={{Title!!description}}/>`) * As [[indirect attributes|HTML in WikiText]] of an element or widget (eg, `<$widget attrib={{Title!!description}}/>`)
* As the parameter of a shortcut transclusion (eg, `{{MyTiddler!!title}}`) * As the operand of a shortcut transclusion (eg, `{{MyTiddler!!title}}`)
* As the `state` attribute of the RevealWidget and the LinkCatcherWidget * As the `state` attribute of the RevealWidget and the LinkCatcherWidget
<$macrocall $name=".tip" _="""Note the distinction between a text reference such as `foo!!bar` and a transclusion of a text reference such as `{{foo!!bar}}`"""/> <$macrocall $name=".tip" _="""Note the distinction between a text reference such as `foo!!bar` and a transclusion of a text reference such as `{{foo!!bar}}`"""/>

View File

@@ -1,9 +0,0 @@
created: 20230319131443509
modified: 20230319132235520
tags: Definitions
title: Legacy
type: text/vnd.tiddlywiki
>Legacy code is old computer source code that is no longer supported on the standard hardware and environments, and is a codebase that is in some respect obsolete or supporting something obsolete. Legacy code may be written in programming languages, use frameworks and external libraries, or use architecture and patterns that are no longer considered modern, increasing the mental burden and ramp-up time for software engineers who work on the codebase.
>
>https://en.wikipedia.org/wiki/Legacy_system

View File

@@ -2,9 +2,8 @@ created: 201308300841
modified: 20170127221451610 modified: 20170127221451610
tags: Definitions tags: Definitions
title: TiddlyWeb title: TiddlyWeb
type: text/vnd.tiddlywiki
TiddlyWeb is a reference implementation for an interface to put [[Tiddlers]] on the web using the [[Bags and Recipes]] model. TiddlyWeb is a reference implementation for an interface to put [[Tiddlers]] on the web.
It was created by a team led by Chris Dent at [[Osmosoft]] under [[BT]] from 2008 to 2012. It was created by a team led by Chris Dent at [[Osmosoft]] under [[BT]] from 2008 to 2012.
@@ -17,3 +16,5 @@ Other implementations of the API include:
* [[TiddlyWiki App Engine Server|https://github.com/rsc/tiddly]], a 300-line Go implementation from Russ Cox * [[TiddlyWiki App Engine Server|https://github.com/rsc/tiddly]], a 300-line Go implementation from Russ Cox
* [[TiddlyWiki 5 server module|https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/commands/server.js]], the bare-bones subset of the API implemented in TiddlyWiki version 5 for Node.js * [[TiddlyWiki 5 server module|https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/commands/server.js]], the bare-bones subset of the API implemented in TiddlyWiki version 5 for Node.js
* [[tiddly-wiki-server|https://github.com/nathanielknight/tiddly-wiki-server]], an implementation based on Rust and SQLite * [[tiddly-wiki-server|https://github.com/nathanielknight/tiddly-wiki-server]], an implementation based on Rust and SQLite
As of early 2017, none is currently as complete as TiddlyWeb itself.

View File

@@ -1,9 +0,0 @@
created: 20240309100338678
modified: 20240309135821423
tags: Definitions
title: TiddlyWebAdaptor
type: text/vnd.tiddlywiki
TiddlyWebAdaptor is a component of [[TiddlyWiki on Node.js]]. It provides the means to synchronise changes to tiddlers from the browser to a server, and from the server to the browser. It can be found in the plugin [[$:/plugins/tiddlywiki/tiddlyweb]].
TiddlyWebAdaptor was designed to be compatible both with TiddlyWeb and with TiddlyWiki's own built-in server mechanism. The [[Bags and Recipes]] model is fully supported by [[TiddlyWeb]], but TiddlyWiki's built-in server only supports a simplified model with a single bag and a single recipe.

View File

@@ -1,10 +1,10 @@
created: 20190802113703788 created: 20190802113703788
modified: 20230711082337975 modified: 20230501175143648
tags: Filters tags: Filters
title: Conditional Operators title: Conditional Operators
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
<<.from-version "5.1.20">> The conditional filter operators allow ''if-then-else'' logic to be expressed within filters. <<.from-version "5.1.20">>The conditional filter operators allow for ''if-then-else'' logic to be expressed within filters.
The foundation is the convention that an empty list can be used to represent the Boolean value <<.value false>> and a list with at one (or more) entries to represent <<.value true>>. The foundation is the convention that an empty list can be used to represent the Boolean value <<.value false>> and a list with at one (or more) entries to represent <<.value true>>.
@@ -25,8 +25,6 @@ The <<.olink else>> operator can be used to apply a defaults for missing values.
<<.operator-example 2 "[[HelloThere]get[custom-field]else[default-value]]">> <<.operator-example 2 "[[HelloThere]get[custom-field]else[default-value]]">>
''Filter Run Prefixes'' ! Filter Run Prefixes
The [[:then|Then Filter Run Prefix]] and [[:else|Else Filter Run Prefix]] named filter run prefixes serve a similar purpose as the conditional operators. The [[:then|:then Filter Run Prefix]] and [[:else|:else Filter Run Prefix]] filter run prefixes serve a similar purpose as the conditional operators. Refer to their documentation for more information.
Also see: [[Named Filter Run Prefix]]

View File

@@ -1,6 +1,5 @@
breadcrumbs: [[Filter Step]]
created: 20140410103123179 created: 20140410103123179
modified: 20230410114132501 modified: 20211217141224284
tags: Filters tags: Filters
title: Filter Operators title: Filter Operators
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@@ -19,19 +18,13 @@ type: text/vnd.tiddlywiki
<tr class="doc-table-subheading"><th colspan="5" align="center">$_$</th></tr> <tr class="doc-table-subheading"><th colspan="5" align="center">$_$</th></tr>
\end \end
A <<.def "filter operator">> is a predefined keyword attached to an individual step of a [[filter|Filters]]. It defines the particular action of that step. A <<.def "filter operator">> is a predefined keyword attached to an individual [[step|Filter Step]] of a [[filter|Filters]]. It defines the particular action of that step.
''Important:'' In general, each first [[filter step|Filter Step]] of a [[filter run|Filter Run]] not given any input titles receives the output of <$link to="all Operator">[all[tiddlers]]</$link> as its input. ''Important:'' Each first [[step|Filter Step]] of a [[filter run|Filter Run]] not given any input titles receives the output of <$link to="all Operator">[all[tiddlers]]</$link> as its input.
The following table lists all core operators, the most common ones marked ✓. The `!` column indicates whether an operator allows ''negation'' using the <$link to="Filter Step"><code>!</code> prefix</$link>. For specifics as to each operator's negated output please refer to its documentation.
''Table legend:'' Most steps process the [[selection of titles|Title Selection]] that are supplied as their input, but a few [[construct an entirely new selection|Selection Constructors]] instead, as indicated by the last column. A `C?` indicates it might construct a new selection, depending on usage. For specifics as to each operator's selection creation please refer to its documentation.
|tc-table-no-border tc-first-col-min-width|k
|^ ✓|^... |,Used to mark the most common ones |
|^ `!`|^... |,The column indicates whether an operator allows ''negation'' using the <$link to="Filter Step"><code>!</code> prefix</$link>.<br>For specifics as to each operator's negated output please refer to its documentation |
|^ `C`|^... |,Most steps process the [[selection of titles|Title Selection]] that are supplied as their input, but a few [[construct an entirely new selection|Selection Constructors]] instead, as indicated by the last column.<br>A `C?` indicates it might construct a new selection, depending on usage. For specifics as to each operator's selection creation please refer to its documentation |
The following table lists all core operators:
<table> <table>
<tr> <tr>
@@ -56,6 +49,6 @@ The following table lists all core operators:
<<.operator-rows "[tag[Filter Operators]!tag[Order Operators]!tag[Mathematics Operators]!tag[String Operators]!tag[Tag Operators]tag[Special Operators]sort[]]">> <<.operator-rows "[tag[Filter Operators]!tag[Order Operators]!tag[Mathematics Operators]!tag[String Operators]!tag[Tag Operators]tag[Special Operators]sort[]]">>
</table> </table>
A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameter]]. A typical step is written as `[operator[parameter]]`, although not all of the operators need a [[parameter|Filter Parameter]].
For the exact rules, see [[Filter Syntax]]. For the exact rules, see [[Filter Syntax]].

View File

@@ -1,5 +1,5 @@
created: 20190206140446821 created: 20190206140446821
modified: 20230321133008898 modified: 20220330133748666
tags: Filters tags: Filters
title: Mathematics Operators title: Mathematics Operators
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@@ -22,7 +22,7 @@ The mathematics operators take three different forms:
** <<.inline-operator-example "=1 =2 =3 =4 +[negate[]]">> ** <<.inline-operator-example "=1 =2 =3 =4 +[negate[]]">>
** <<.inline-operator-example "=1.2 =2.4 =3.6 =4.8 +[trunc[]]">> ** <<.inline-operator-example "=1.2 =2.4 =3.6 =4.8 +[trunc[]]">>
** <<.inline-operator-example "=1.2 =2.4 =3.6 =4.8 +[round[]]">> ** <<.inline-operator-example "=1.2 =2.4 =3.6 =4.8 +[round[]]">>
* ''Binary operators'' apply an operation and parameter to each number in the input list (e.g. add, multiply, remainder) * ''Binary operators'' apply an operation and operand to each number in the input list (e.g. add, multiply, remainder)
** <<.inline-operator-example "=1 =2 =3 =4 +[add[3]]">> ** <<.inline-operator-example "=1 =2 =3 =4 +[add[3]]">>
** <<.inline-operator-example "=1 =2 =3 =4 +[multiply[8]]">> ** <<.inline-operator-example "=1 =2 =3 =4 +[multiply[8]]">>
* ''Reducing operators'' apply an operation to all of the numbers in the input list, returning a single result (e.g. sum, product) * ''Reducing operators'' apply an operation to all of the numbers in the input list, returning a single result (e.g. sum, product)

View File

@@ -1,11 +1,11 @@
caption: add caption: add
created: 20190206140446821 created: 20190206140446821
modified: 20230321130647487 modified: 20190611125053329
op-input: a [[selection of titles|Title Selection]] op-input: a [[selection of titles|Title Selection]]
op-output: the input as numbers, but with <<.place N>> added to each one op-output: the input as numbers, but with <<.place N>> added to each one
op-parameter: a number op-parameter: a number
op-parameter-name: N op-parameter-name: N
op-purpose: treating each input title as a number, add to each the numeric value of the parameter op-purpose: treating each input title as a number, add to each the numeric value of the operand
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: add Operator title: add Operator
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki

View File

@@ -1,6 +1,6 @@
caption: all caption: all
created: 20140410103123179 created: 20140410103123179
modified: 20230321131457669 modified: 20211217135719266
op-input: ignored, unless the parameter is empty op-input: ignored, unless the parameter is empty
op-output: the titles that belong to all the specified categories op-output: the titles that belong to all the specified categories
op-parameter: zero or more categories op-parameter: zero or more categories
@@ -9,14 +9,10 @@ tags: [[Filter Operators]] [[Common Operators]] [[Selection Constructors]] [[Sel
title: all Operator title: all Operator
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
The parameter specifies zero or more fundamental categories using the following [[filter step|Filter Step]] syntax: The parameter specifies zero or more fundamental categories using the following syntax:
<$railroad text=""" <$railroad text="""
\start none [{: ("current" | "missing" |: "orphans" | "shadows" | "tags" | "tiddlers" ) +"+" }]
\end none
<-"all"-> ( "[" | "<" | "{" )
[{: ("current" | "missing" |: "orphans" | "shadows" | "tags" | "tiddlers" ) +"+" }]
( "]" | ">" | "}" )
"""/> """/>
|!Category |!Members |!Sorted | |!Category |!Members |!Sorted |
@@ -29,7 +25,7 @@ The parameter specifies zero or more fundamental categories using the following
If the parameter specifies more than one category, they are processed from left to right. The overall output is initially empty, and each category's output is [[dominantly appended|Dominant Append]] to it in turn. Unrecognised categories contribute nothing to the output. If the parameter specifies more than one category, they are processed from left to right. The overall output is initially empty, and each category's output is [[dominantly appended|Dominant Append]] to it in turn. Unrecognised categories contribute nothing to the output.
As a special case, if the parameter is empty, the output is simply a copy of the input. This can be useful when the parameter is a [[soft parameter|Filter Parameter]]. As a special case, if the parameter is empty, the output is simply a copy of the input. This can be useful when the parameter is [[soft|Filter Parameter]].
The <<.olink is>> operator is similar, but its scope is restricted to its input. The <<.olink is>> operator is similar, but its scope is restricted to its input.

View File

@@ -1,9 +1,9 @@
caption: append caption: append
created: 20151017145358368 created: 20151017145358368
modified: 20230321131631510 modified: 20151108051540981
op-input: a list of items op-input: a list of items
op-neg-output: a list with items appended from the tail of the parameter array op-neg-output: a list with items appended from the tail of the operand array
op-output: a list with items appended from the head of the parameter array op-output: a list with items appended from the head of the operand array
op-parameter: the array of items to be appended to the tail of the list op-parameter: the array of items to be appended to the tail of the list
op-parameter-name: list op-parameter-name: list
op-purpose: append a range of items from an array to the list op-purpose: append a range of items from an array to the list

View File

@@ -1,13 +0,0 @@
created: 20211002204500000
tags: [[Filter Operators]]
title: backtranscludes Operator
type: text/vnd.tiddlywiki
caption: backtranscludes
op-purpose: find the titles that transcludes to each input title
op-input: a [[selection of titles|Title Selection]]
op-parameter: none
op-output: any non-[[system|SystemTiddlers]] titles that contain [[transclusion|Transclusion]] to the input titles
Each input title is processed in turn. The corresponding tiddler's list of backtranscludes is generated, sorted alphabetically by title, and then [[dominantly appended|Dominant Append]] to the operator's overall output.
<<.operator-examples "backtranscludes">>

View File

@@ -2,7 +2,7 @@ caption: charcode
created: 20210622214425635 created: 20210622214425635
modified: 20210622214425635 modified: 20210622214425635
op-input: ignored op-input: ignored
op-output: a string formed from concatenating the characters specified by the numeric codes given in the parameter(s) op-output: a string formed from concatenating the characters specified by the numeric codes given in the operand(s)
op-parameter: numeric character code op-parameter: numeric character code
op-parameter-name: C op-parameter-name: C
op-purpose: generates string characters from their numeric character codes op-purpose: generates string characters from their numeric character codes
@@ -12,6 +12,6 @@ type: text/vnd.tiddlywiki
<<.from-version "5.2.0">> <<.from-version "5.2.0">>
This operator returns a string formed from concatenating the characters specified by the numeric codes given in one or more parameters. It is useful for generating special characters such as tab (`charcode[9]`) or new line (`charcode[13],[10]`). This operator returns a string formed from concatenating the characters specified by the numeric codes given in one or more operands. It is useful for generating special characters such as tab (`charcode[9]`) or new line (`charcode[13],[10]`).
<<.operator-examples "charcode">> <<.operator-examples "charcode">>

View File

@@ -4,7 +4,7 @@ tags: [[Filter Operators]] [[Mathematics Operators]] [[String Operators]] [[Nega
title: compare Operator title: compare Operator
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
caption: compare caption: compare
op-purpose: filter the input by comparing each item against the parameter op-purpose: filter the input by comparing each item against the operand
op-input: a [[selection of titles|Title Selection]] op-input: a [[selection of titles|Title Selection]]
op-suffix: the <<.op compare>> operator uses a rich suffix, see below for details op-suffix: the <<.op compare>> operator uses a rich suffix, see below for details
op-parameter: the value to compare op-parameter: the value to compare
@@ -16,7 +16,7 @@ op-neg-output: those input titles <<.em not>> matching the specified comparison
The <<.op compare>> operator uses an extended syntax to specify all the options: The <<.op compare>> operator uses an extended syntax to specify all the options:
``` ```
[compare:<type>:<mode>[<parameter>]] [compare:<type>:<mode>[<operand>]]
``` ```
The ''type'' can be: The ''type'' can be:

View File

@@ -4,7 +4,7 @@ modified: 20201118192136472
op-input: a list of items op-input: a list of items
op-output: the input list with the titles specified in the parameter toggled in a cyclical manner op-output: the input list with the titles specified in the parameter toggled in a cyclical manner
op-parameter: the <<.op cycle>> operator accepts 1 or 2 parameters, see below for details op-parameter: the <<.op cycle>> operator accepts 1 or 2 parameters, see below for details
op-purpose: toggle the titles specified in the first parameter in a cyclical manner op-purpose: toggle in the input, the titles specified in the first operand in a cyclical manner
tags: [[Filter Operators]] [[Listops Operators]] [[Order Operators]] tags: [[Filter Operators]] [[Listops Operators]] [[Order Operators]]
title: cycle Operator title: cycle Operator
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki

View File

@@ -5,7 +5,7 @@ op-input: a [[selection of titles|Title Selection]]
op-output: the input as numbers, but with each one divided by <<.place N>> op-output: the input as numbers, but with each one divided by <<.place N>>
op-parameter: a number op-parameter: a number
op-parameter-name: N op-parameter-name: N
op-purpose: treating each input title as a number, divide it by the numeric value of the parameter op-purpose: treating each input title as a number, divide them by the numeric value of the operand
tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]] tags: [[Filter Operators]] [[Mathematics Operators]] [[Binary Mathematics Operators]]
title: divide Operator title: divide Operator
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki

View File

@@ -7,14 +7,14 @@ op-neg-output: those input titles that are <<.em not>> listed in <<.place L>>
op-output: the titles stored as a [[title list|Title List]] at <<.place L>> op-output: the titles stored as a [[title list|Title List]] at <<.place L>>
op-parameter: a [[title list|Title List]] op-parameter: a [[title list|Title List]]
op-parameter-name: L op-parameter-name: L
op-purpose: select titles from the parameter interpreted as a [[title list|Title List]] op-purpose: select titles from the operand interpreted as a [[title list|Title List]]
op-suffix: <<.from-version "5.1.20">> `dedupe` (the default) to remove duplicates, `raw` to leave duplicates untouched op-suffix: <<.from-version "5.1.20">> `dedupe` (the default) to remove duplicates, `raw` to leave duplicates untouched
op-suffix-name: D op-suffix-name: D
tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]] tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]]
title: enlist Operator title: enlist Operator
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
<<.tip """Literal filter parameters cannot contain square brackets but you can work around the issue by using a variable. ''Learn more at:'' [[SetWidget]] documentation under the heading "Filtered List Variable Assignment" """>> <<.tip """Literal filter operands cannot contain square brackets but you can work around the issue by using a variable. ''Learn more at:'' [[SetWidget]] documentation under the heading "Filtered List Variable Assignment" """>>
``` ```
<$set name="myList" value="first [[second with a space]] third"> <$set name="myList" value="first [[second with a space]] third">

View File

@@ -12,7 +12,7 @@ type: text/vnd.tiddlywiki
<<.from-version "5.1.23">> <<.from-version "5.1.23">>
<<.tip " Compare with [[enlist|enlist Operator]] operator that interprets its parameter as a title list">> <<.tip " Compare with [[enlist|enlist Operator]] operator that interprets its operand as a title list">>
``` ```
<$vars days={{{ [[Days of the Week]get[list]] }}}> <$vars days={{{ [[Days of the Week]get[list]] }}}>

View File

@@ -1,7 +0,0 @@
tags: [[backtranscludes Operator]] [[Operator Examples]]
title: backtranscludes Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[Motovun Jack.jpg]backtranscludes[]]">>
<<.operator-example 2 "[[Transclusion]backtranscludes[]]">>

View File

@@ -1,5 +1,5 @@
created: 20151017151508135 created: 20151017151508135
modified: 20230321130446467 modified: 20151108051743531
tags: [[Operator Examples]] [[prepend Operator]] tags: [[Operator Examples]] [[prepend Operator]]
title: prepend Operator (Examples) title: prepend Operator (Examples)
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
@@ -10,6 +10,6 @@ The operator may be used to prepend a number of items to the list.
<<.operator-example 1 "[list[Days of the Week]prepend[Yesterday Today Tomorrow]]">> <<.operator-example 1 "[list[Days of the Week]prepend[Yesterday Today Tomorrow]]">>
The parameter may list only items without spaces -- to include items with spaces, use a reference to an array, e.g. prepend the last three short days of the week to the list The operand may list only items without spaces -- to include items with spaces, use a reference to an array e.g. prepend the last three short days of the week to the list
<<.operator-example 2 "[list[Days of the Week]!prepend:3{Days of the Week!!short}]">> <<.operator-example 2 "[list[Days of the Week]!prepend:3{Days of the Week!!short}]">>

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