mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-02-22 01:49:49 +00:00
Compare commits
50 Commits
v5.3.0
...
bind-scrol
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1018a9eb40 | ||
|
|
ce30e64a71 | ||
|
|
3e213569e2 | ||
|
|
4bdac09872 | ||
|
|
c1ff85c205 | ||
|
|
afcbac5e86 | ||
|
|
1a92fd5dc0 | ||
|
|
e60232e0cb | ||
|
|
ad6e09f1cb | ||
|
|
3ddb852a16 | ||
|
|
b000f20283 | ||
|
|
160cc0e9a9 | ||
|
|
fd8b8f62da | ||
|
|
61a08cbd7b | ||
|
|
0fd6b986a0 | ||
|
|
0a4cfa1164 | ||
|
|
04e971c3c6 | ||
|
|
963887c8c4 | ||
|
|
aef76fa25f | ||
|
|
4124bbdfb3 | ||
|
|
98ff6b67fd | ||
|
|
9b2af13596 | ||
|
|
7182dbf244 | ||
|
|
f61d244410 | ||
|
|
284669544b | ||
|
|
b54a88ce83 | ||
|
|
3bd8c5d50d | ||
|
|
3a90c37816 | ||
|
|
ff7214ff56 | ||
|
|
8e9d8d4fef | ||
|
|
a7bafd8840 | ||
|
|
a6779efb1c | ||
|
|
ec00dc5042 | ||
|
|
08bad90e51 | ||
|
|
9a1d7085b8 | ||
|
|
feb797701f | ||
|
|
34ef27fbc0 | ||
|
|
f517497fe7 | ||
|
|
eff158b1ae | ||
|
|
6954fbee51 | ||
|
|
6c7c21a87b | ||
|
|
29b5b064d6 | ||
|
|
02f6d850d5 | ||
|
|
7597f5af77 | ||
|
|
0c64b58cfb | ||
|
|
39f342a943 | ||
|
|
a6722e9735 | ||
|
|
42d4c5d5ab | ||
|
|
04e771ccbf | ||
|
|
57d85d4f64 |
@@ -5,7 +5,7 @@
|
|||||||
# Default to the current version number for building the plugin library
|
# Default to the current version number for building the plugin library
|
||||||
|
|
||||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||||
TW5_BUILD_VERSION=v5.3.0
|
TW5_BUILD_VERSION=v5.3.1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||||
|
|||||||
@@ -596,11 +596,11 @@ $tw.utils.evalGlobal = function(code,context,filename,sandbox,allowGlobals) {
|
|||||||
// Add the code prologue and epilogue
|
// Add the code prologue and epilogue
|
||||||
code = [
|
code = [
|
||||||
"(function(" + contextNames.join(",") + ") {",
|
"(function(" + contextNames.join(",") + ") {",
|
||||||
" (function(){\n" + code + "\n;})();",
|
" (function(){" + code + "\n;})();\n",
|
||||||
(!$tw.browser && sandbox && !allowGlobals) ? globalCheck : "",
|
(!$tw.browser && sandbox && !allowGlobals) ? globalCheck : "",
|
||||||
" return exports;\n",
|
"\nreturn exports;\n",
|
||||||
"})"
|
"})"
|
||||||
].join("\n");
|
].join("");
|
||||||
|
|
||||||
// Compile the code into a function
|
// Compile the code into a function
|
||||||
var fn;
|
var fn;
|
||||||
@@ -1150,7 +1150,7 @@ $tw.Wiki = function(options) {
|
|||||||
shadowTiddlerTitles = null,
|
shadowTiddlerTitles = null,
|
||||||
getShadowTiddlerTitles = function() {
|
getShadowTiddlerTitles = function() {
|
||||||
if(!shadowTiddlerTitles) {
|
if(!shadowTiddlerTitles) {
|
||||||
shadowTiddlerTitles = Object.keys(shadowTiddlers);
|
shadowTiddlerTitles = Object.keys(shadowTiddlers).sort(function(a,b) {return a.localeCompare(b);});
|
||||||
}
|
}
|
||||||
return shadowTiddlerTitles;
|
return shadowTiddlerTitles;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
title: $:/core/images/new-journal-button
|
title: $:/core/images/new-journal-button
|
||||||
tags: $:/tags/Image
|
tags: $:/tags/Image
|
||||||
|
|
||||||
<$parameters size="22pt" day=<<now "DD">>>
|
<$parameters size="22pt" day=<<now "DD">>><svg width=<<size>> height=<<size>> class="tc-image-new-journal-button tc-image-button" viewBox="0 0 128 128"><g fill-rule="evenodd"><path d="M102.545 112.818v11.818c0 1.306 1.086 2.364 2.425 2.364h6.06c1.34 0 2.425-1.058 2.425-2.364v-11.818h12.12c1.34 0 2.425-1.058 2.425-2.363v-5.91c0-1.305-1.085-2.363-2.424-2.363h-12.121V90.364c0-1.306-1.086-2.364-2.425-2.364h-6.06c-1.34 0-2.425 1.058-2.425 2.364v11.818h-12.12c-1.34 0-2.425 1.058-2.425 2.363v5.91c0 1.305 1.085 2.363 2.424 2.363h12.121zM60.016 4.965c-4.781-2.76-10.897-1.118-13.656 3.66L5.553 79.305A9.993 9.993 0 009.21 92.963l51.04 29.468c4.78 2.76 10.897 1.118 13.655-3.66l40.808-70.681a9.993 9.993 0 00-3.658-13.656L60.016 4.965zm-3.567 27.963a6 6 0 106-10.393 6 6 0 00-6 10.393zm31.697 17.928a6 6 0 106-10.392 6 6 0 00-6 10.392z"/><text class="tc-fill-background" font-family="Helvetica" font-size="47.172" font-weight="bold" transform="rotate(30 25.742 95.82)"><tspan x="42" y="77.485" text-anchor="middle"><$text text=<<day>>/></tspan></text></g></svg></$parameters>
|
||||||
<svg width=<<size>> height=<<size>> class="tc-image-new-journal-button tc-image-button" viewBox="0 0 128 128"><g fill-rule="evenodd"><path d="M102.545 112.818v11.818c0 1.306 1.086 2.364 2.425 2.364h6.06c1.34 0 2.425-1.058 2.425-2.364v-11.818h12.12c1.34 0 2.425-1.058 2.425-2.363v-5.91c0-1.305-1.085-2.363-2.424-2.363h-12.121V90.364c0-1.306-1.086-2.364-2.425-2.364h-6.06c-1.34 0-2.425 1.058-2.425 2.364v11.818h-12.12c-1.34 0-2.425 1.058-2.425 2.363v5.91c0 1.305 1.085 2.363 2.424 2.363h12.121zM60.016 4.965c-4.781-2.76-10.897-1.118-13.656 3.66L5.553 79.305A9.993 9.993 0 009.21 92.963l51.04 29.468c4.78 2.76 10.897 1.118 13.655-3.66l40.808-70.681a9.993 9.993 0 00-3.658-13.656L60.016 4.965zm-3.567 27.963a6 6 0 106-10.393 6 6 0 00-6 10.393zm31.697 17.928a6 6 0 106-10.392 6 6 0 00-6 10.392z"/><text class="tc-fill-background" font-family="Helvetica" font-size="47.172" font-weight="bold" transform="rotate(30 25.742 95.82)"><tspan x="42" y="77.485" text-anchor="middle"><$text text=<<day>>/></tspan></text></g></svg>
|
|
||||||
</$parameters>
|
|
||||||
@@ -35,7 +35,7 @@ Instantiate parse rule
|
|||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
// Regexp to match
|
// Regexp to match
|
||||||
this.matchRegExp = /^\\(function|procedure|widget)\s+([^(\s]+)\((\s*([^)]*))?\)(\s*\r?\n)?/mg;
|
this.matchRegExp = /\\(function|procedure|widget)\s+([^(\s]+)\((\s*([^)]*))?\)(\s*\r?\n)?/mg;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -53,7 +53,7 @@ exports.parse = function() {
|
|||||||
var reEnd;
|
var reEnd;
|
||||||
if(this.match[5]) {
|
if(this.match[5]) {
|
||||||
// If so, the end of the body is marked with \end
|
// If so, the end of the body is marked with \end
|
||||||
reEnd = new RegExp("(\\r?\\n\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, the end of the definition is marked by the end of the line
|
// Otherwise, the end of the definition is marked by the end of the line
|
||||||
reEnd = /($|\r?\n)/mg;
|
reEnd = /($|\r?\n)/mg;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Instantiate parse rule
|
|||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
// Regexp to match
|
// Regexp to match
|
||||||
this.matchRegExp = /^\\parameters\s*\(([^)]*)\)(\s*\r?\n)?/mg;
|
this.matchRegExp = /\\parameters\s*\(([^)]*)\)(\s*\r?\n)?/mg;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ exports.startup = function() {
|
|||||||
url: params.url,
|
url: params.url,
|
||||||
method: params.method,
|
method: params.method,
|
||||||
body: params.body,
|
body: params.body,
|
||||||
|
binary: params.binary,
|
||||||
oncompletion: params.oncompletion,
|
oncompletion: params.oncompletion,
|
||||||
onprogress: params.onprogress,
|
onprogress: params.onprogress,
|
||||||
bindStatus: params["bind-status"],
|
bindStatus: params["bind-status"],
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ exports.startup = function() {
|
|||||||
if($tw.browser) {
|
if($tw.browser) {
|
||||||
$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));
|
$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));
|
||||||
$tw.browser.isFirefox = !!document.mozFullScreenEnabled;
|
$tw.browser.isFirefox = !!document.mozFullScreenEnabled;
|
||||||
|
// 2023-07-21 Edge returns UA below. So we use "isChromeLike"
|
||||||
|
//'mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/114.0.0.0 safari/537.36 edg/114.0.1823.82'
|
||||||
|
$tw.browser.isChromeLike = navigator.userAgent.toLowerCase().indexOf("chrome") > -1;
|
||||||
|
$tw.browser.hasTouch = !!window.matchMedia && window.matchMedia("(pointer: coarse)").matches;
|
||||||
|
$tw.browser.isMobileChrome = $tw.browser.isChromeLike && $tw.browser.hasTouch;
|
||||||
}
|
}
|
||||||
// Platform detection
|
// Platform detection
|
||||||
$tw.platform = {};
|
$tw.platform = {};
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ exports.makeDraggable = function(options) {
|
|||||||
if(dataTransfer.setDragImage) {
|
if(dataTransfer.setDragImage) {
|
||||||
if(dragImageType === "pill") {
|
if(dragImageType === "pill") {
|
||||||
dataTransfer.setDragImage(dragImage.firstChild,-16,-16);
|
dataTransfer.setDragImage(dragImage.firstChild,-16,-16);
|
||||||
} else if (dragImageType === "blank") {
|
} else if(dragImageType === "blank") {
|
||||||
dragImage.removeChild(dragImage.firstChild);
|
dragImage.removeChild(dragImage.firstChild);
|
||||||
dataTransfer.setDragImage(dragImage,0,0);
|
dataTransfer.setDragImage(dragImage,0,0);
|
||||||
} else {
|
} else {
|
||||||
@@ -106,7 +106,9 @@ exports.makeDraggable = function(options) {
|
|||||||
dataTransfer.setData("text/vnd.tiddler",jsonData);
|
dataTransfer.setData("text/vnd.tiddler",jsonData);
|
||||||
dataTransfer.setData("text/plain",titleString);
|
dataTransfer.setData("text/plain",titleString);
|
||||||
dataTransfer.setData("text/x-moz-url","data:text/vnd.tiddler," + encodeURIComponent(jsonData));
|
dataTransfer.setData("text/x-moz-url","data:text/vnd.tiddler," + encodeURIComponent(jsonData));
|
||||||
} else {
|
}
|
||||||
|
// If browser is Chrome-like and has a touch-input device do NOT .setData
|
||||||
|
if(!($tw.browser.isMobileChrome)) {
|
||||||
dataTransfer.setData("URL","data:text/vnd.tiddler," + encodeURIComponent(jsonData));
|
dataTransfer.setData("URL","data:text/vnd.tiddler," + encodeURIComponent(jsonData));
|
||||||
}
|
}
|
||||||
dataTransfer.setData("Text",titleString);
|
dataTransfer.setData("Text",titleString);
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ wiki: wiki to be used for executing action strings
|
|||||||
url: URL for request
|
url: URL for request
|
||||||
method: method eg GET, POST
|
method: method eg GET, POST
|
||||||
body: text of request body
|
body: text of request body
|
||||||
|
binary: set to "yes" to force binary processing of response payload
|
||||||
oncompletion: action string to be invoked on completion
|
oncompletion: action string to be invoked on completion
|
||||||
onprogress: action string to be invoked on progress updates
|
onprogress: action string to be invoked on progress updates
|
||||||
bindStatus: optional title of tiddler to which status ("pending", "complete", "error") should be written
|
bindStatus: optional title of tiddler to which status ("pending", "complete", "error") should be written
|
||||||
@@ -106,10 +107,11 @@ function HttpClientRequest(options) {
|
|||||||
this.wiki = options.wiki;
|
this.wiki = options.wiki;
|
||||||
this.completionActions = options.oncompletion;
|
this.completionActions = options.oncompletion;
|
||||||
this.progressActions = options.onprogress;
|
this.progressActions = options.onprogress;
|
||||||
this.bindStatus = options["bind-status"];
|
this.bindStatus = options["bindStatus"];
|
||||||
this.bindProgress = options["bind-progress"];
|
this.bindProgress = options["bindProgress"];
|
||||||
this.method = options.method || "GET";
|
this.method = options.method || "GET";
|
||||||
this.body = options.body || "";
|
this.body = options.body || "";
|
||||||
|
this.binary = options.binary || "";
|
||||||
this.variables = options.variables;
|
this.variables = options.variables;
|
||||||
var url = options.url;
|
var url = options.url;
|
||||||
$tw.utils.each(options.queryStrings,function(value,name) {
|
$tw.utils.each(options.queryStrings,function(value,name) {
|
||||||
@@ -132,7 +134,7 @@ HttpClientRequest.prototype.send = function(callback) {
|
|||||||
var self = this,
|
var self = this,
|
||||||
setBinding = function(title,text) {
|
setBinding = function(title,text) {
|
||||||
if(title) {
|
if(title) {
|
||||||
this.wiki.addTiddler(new $tw.Tiddler({title: title, text: text}));
|
self.wiki.addTiddler(new $tw.Tiddler({title: title, text: text}));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if(this.url) {
|
if(this.url) {
|
||||||
@@ -156,6 +158,8 @@ HttpClientRequest.prototype.send = function(callback) {
|
|||||||
type: this.method,
|
type: this.method,
|
||||||
headers: this.requestHeaders,
|
headers: this.requestHeaders,
|
||||||
data: this.body,
|
data: this.body,
|
||||||
|
returnProp: this.binary === "" ? "responseText" : "response",
|
||||||
|
responseType: this.binary === "" ? "text" : "arraybuffer",
|
||||||
callback: function(err,data,xhr) {
|
callback: function(err,data,xhr) {
|
||||||
var hasSucceeded = xhr.status >= 200 && xhr.status < 300,
|
var hasSucceeded = xhr.status >= 200 && xhr.status < 300,
|
||||||
completionCode = hasSucceeded ? "complete" : "error",
|
completionCode = hasSucceeded ? "complete" : "error",
|
||||||
@@ -175,6 +179,16 @@ HttpClientRequest.prototype.send = function(callback) {
|
|||||||
data: (data || "").toString(),
|
data: (data || "").toString(),
|
||||||
headers: JSON.stringify(headers)
|
headers: JSON.stringify(headers)
|
||||||
};
|
};
|
||||||
|
/* Convert data from binary to base64 */
|
||||||
|
if (xhr.responseType === "arraybuffer") {
|
||||||
|
var binary = "",
|
||||||
|
bytes = new Uint8Array(data),
|
||||||
|
len = bytes.byteLength;
|
||||||
|
for (var i=0; i<len; i++) {
|
||||||
|
binary += String.fromCharCode(bytes[i]);
|
||||||
|
}
|
||||||
|
resultVariables.data = window.btoa(binary);
|
||||||
|
}
|
||||||
self.wiki.addTiddler(new $tw.Tiddler(self.wiki.getTiddler(requestTrackerTitle),{
|
self.wiki.addTiddler(new $tw.Tiddler(self.wiki.getTiddler(requestTrackerTitle),{
|
||||||
status: completionCode,
|
status: completionCode,
|
||||||
}));
|
}));
|
||||||
@@ -212,6 +226,7 @@ Make an HTTP request. Options are:
|
|||||||
callback: function invoked with (err,data,xhr)
|
callback: function invoked with (err,data,xhr)
|
||||||
progress: optional function invoked with (lengthComputable,loaded,total)
|
progress: optional function invoked with (lengthComputable,loaded,total)
|
||||||
returnProp: string name of the property to return as first argument of callback
|
returnProp: string name of the property to return as first argument of callback
|
||||||
|
responseType: "text" or "arraybuffer"
|
||||||
*/
|
*/
|
||||||
exports.httpRequest = function(options) {
|
exports.httpRequest = function(options) {
|
||||||
var type = options.type || "GET",
|
var type = options.type || "GET",
|
||||||
@@ -264,6 +279,7 @@ exports.httpRequest = function(options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
request.responseType = options.responseType || "text";
|
||||||
// Set up the state change handler
|
// Set up the state change handler
|
||||||
request.onreadystatechange = function() {
|
request.onreadystatechange = function() {
|
||||||
if(this.readyState === 4) {
|
if(this.readyState === 4) {
|
||||||
|
|||||||
@@ -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});
|
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) {
|
||||||
|
|||||||
@@ -171,6 +171,42 @@ ScrollableWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
parent.insertBefore(this.outerDomNode,nextSibling);
|
parent.insertBefore(this.outerDomNode,nextSibling);
|
||||||
this.renderChildren(this.innerDomNode,null);
|
this.renderChildren(this.innerDomNode,null);
|
||||||
this.domNodes.push(this.outerDomNode);
|
this.domNodes.push(this.outerDomNode);
|
||||||
|
// If the scroll position is bound to a tiddler
|
||||||
|
if(this.scrollableBind) {
|
||||||
|
// After a delay for rendering, scroll to the bound position
|
||||||
|
setTimeout(this.updateScrollPositionFromBoundTiddler.bind(this),50);
|
||||||
|
// Save scroll position on DOM scroll event
|
||||||
|
this.outerDomNode.addEventListener("scroll",function(event) {
|
||||||
|
var existingTiddler = self.wiki.getTiddler(self.scrollableBind),
|
||||||
|
newTiddlerFields = {
|
||||||
|
title: self.scrollableBind,
|
||||||
|
"scroll-left": self.outerDomNode.scrollLeft.toString(),
|
||||||
|
"scroll-top": self.outerDomNode.scrollTop.toString()
|
||||||
|
};
|
||||||
|
if(!existingTiddler || (existingTiddler.fields["scroll-left"] !== newTiddlerFields["scroll-left"] || existingTiddler.fields["scroll-top"] !== newTiddlerFields["scroll-top"])) {
|
||||||
|
self.wiki.addTiddler(new $tw.Tiddler(existingTiddler,newTiddlerFields));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ScrollableWidget.prototype.updateScrollPositionFromBoundTiddler = function() {
|
||||||
|
var tiddler = this.wiki.getTiddler(this.scrollableBind);
|
||||||
|
if(tiddler) {
|
||||||
|
var scrollLeftTo = this.outerDomNode.scrollLeft;
|
||||||
|
if(parseFloat(tiddler.fields["scroll-left"]).toString() === tiddler.fields["scroll-left"]) {
|
||||||
|
scrollLeftTo = parseFloat(tiddler.fields["scroll-left"]);
|
||||||
|
}
|
||||||
|
var scrollTopTo = this.outerDomNode.scrollTop;
|
||||||
|
if(parseFloat(tiddler.fields["scroll-top"]).toString() === tiddler.fields["scroll-top"]) {
|
||||||
|
scrollTopTo = parseFloat(tiddler.fields["scroll-top"]);
|
||||||
|
}
|
||||||
|
this.outerDomNode.scrollTo({
|
||||||
|
top: scrollTopTo,
|
||||||
|
left: scrollLeftTo,
|
||||||
|
behavior: "instant"
|
||||||
|
})
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -178,6 +214,7 @@ Compute the internal state of the widget
|
|||||||
*/
|
*/
|
||||||
ScrollableWidget.prototype.execute = function() {
|
ScrollableWidget.prototype.execute = function() {
|
||||||
// Get attributes
|
// Get attributes
|
||||||
|
this.scrollableBind = this.getAttribute("bind");
|
||||||
this.fallthrough = this.getAttribute("fallthrough","yes");
|
this.fallthrough = this.getAttribute("fallthrough","yes");
|
||||||
this["class"] = this.getAttribute("class");
|
this["class"] = this.getAttribute("class");
|
||||||
// Make child widgets
|
// Make child widgets
|
||||||
@@ -193,6 +230,9 @@ ScrollableWidget.prototype.refresh = function(changedTiddlers) {
|
|||||||
this.refreshSelf();
|
this.refreshSelf();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if(changedAttributes.bind || changedTiddlers[this.getAttribute("bind")]) {
|
||||||
|
this.updateScrollPositionFromBoundTiddler();
|
||||||
|
}
|
||||||
return this.refreshChildren(changedTiddlers);
|
return this.refreshChildren(changedTiddlers);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ SelectWidget.prototype.execute = function() {
|
|||||||
this.selectDefault = this.getAttribute("default");
|
this.selectDefault = this.getAttribute("default");
|
||||||
this.selectMultiple = this.getAttribute("multiple", false);
|
this.selectMultiple = this.getAttribute("multiple", false);
|
||||||
this.selectSize = this.getAttribute("size");
|
this.selectSize = this.getAttribute("size");
|
||||||
|
this.selectTabindex = this.getAttribute("tabindex");
|
||||||
this.selectTooltip = this.getAttribute("tooltip");
|
this.selectTooltip = this.getAttribute("tooltip");
|
||||||
this.selectFocus = this.getAttribute("focus");
|
this.selectFocus = this.getAttribute("focus");
|
||||||
// Make the child widgets
|
// Make the child widgets
|
||||||
@@ -162,6 +163,9 @@ SelectWidget.prototype.execute = function() {
|
|||||||
if(this.selectSize) {
|
if(this.selectSize) {
|
||||||
$tw.utils.addAttributeToParseTreeNode(selectNode,"size",this.selectSize);
|
$tw.utils.addAttributeToParseTreeNode(selectNode,"size",this.selectSize);
|
||||||
}
|
}
|
||||||
|
if(this.selectTabindex) {
|
||||||
|
$tw.utils.addAttributeToParseTreeNode(selectNode,"tabindex",this.selectTabindex);
|
||||||
|
}
|
||||||
if(this.selectTooltip) {
|
if(this.selectTooltip) {
|
||||||
$tw.utils.addAttributeToParseTreeNode(selectNode,"title",this.selectTooltip);
|
$tw.utils.addAttributeToParseTreeNode(selectNode,"title",this.selectTooltip);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,27 +41,43 @@ TranscludeWidget.prototype.execute = function() {
|
|||||||
this.collectAttributes();
|
this.collectAttributes();
|
||||||
this.collectStringParameters();
|
this.collectStringParameters();
|
||||||
this.collectSlotFillParameters();
|
this.collectSlotFillParameters();
|
||||||
// Get the parse tree nodes that we are transcluding
|
// Determine whether we're being used in inline or block mode
|
||||||
var target = this.getTransclusionTarget(),
|
var parseAsInline = !this.parseTreeNode.isBlock;
|
||||||
parseTreeNodes = target.parseTreeNodes;
|
if(this.transcludeMode === "inline") {
|
||||||
this.sourceText = target.text;
|
parseAsInline = true;
|
||||||
this.parserType = target.type;
|
} else if(this.transcludeMode === "block") {
|
||||||
this.parseAsInline = target.parseAsInline;
|
parseAsInline = false;
|
||||||
|
}
|
||||||
|
// Set 'thisTiddler'
|
||||||
|
this.setVariable("thisTiddler",this.transcludeTitle);
|
||||||
|
var parseTreeNodes, target;
|
||||||
// Process the transclusion according to the output type
|
// Process the transclusion according to the output type
|
||||||
switch(this.transcludeOutput || "text/html") {
|
switch(this.transcludeOutput || "text/html") {
|
||||||
case "text/html":
|
case "text/html":
|
||||||
// No further processing required
|
// Return the parse tree nodes of the target
|
||||||
|
target = this.parseTransclusionTarget(parseAsInline);
|
||||||
|
this.parseAsInline = target.parseAsInline;
|
||||||
|
parseTreeNodes = target.parseTreeNodes;
|
||||||
break;
|
break;
|
||||||
case "text/raw":
|
case "text/raw":
|
||||||
// Just return the raw text
|
// Just return the raw text
|
||||||
parseTreeNodes = [{type: "text", text: this.sourceText}];
|
target = this.getTransclusionTarget();
|
||||||
|
parseTreeNodes = [{type: "text", text: target.text}];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// text/plain
|
// "text/plain" is the plain text result of wikifying the text
|
||||||
var plainText = this.wiki.renderText("text/plain",this.parserType,this.sourceText,{parentWidget: this});
|
target = this.parseTransclusionTarget(parseAsInline);
|
||||||
parseTreeNodes = [{type: "text", text: plainText}];
|
var widgetNode = this.wiki.makeWidget(target.parser,{
|
||||||
|
parentWidget: this,
|
||||||
|
document: $tw.fakeDocument
|
||||||
|
});
|
||||||
|
var container = $tw.fakeDocument.createElement("div");
|
||||||
|
widgetNode.render(container,null);
|
||||||
|
parseTreeNodes = [{type: "text", text: container.textContent}];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
this.sourceText = target.text;
|
||||||
|
this.parserType = target.type;
|
||||||
// Set the legacy transclusion context variables only if we're not transcluding a variable
|
// Set the legacy transclusion context variables only if we're not transcluding a variable
|
||||||
if(!this.transcludeVariable) {
|
if(!this.transcludeVariable) {
|
||||||
var recursionMarker = this.makeRecursionMarker();
|
var recursionMarker = this.makeRecursionMarker();
|
||||||
@@ -158,17 +174,44 @@ TranscludeWidget.prototype.collectSlotFillParameters = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Get transcluded parse tree nodes as an object {parser:,text:,type:}
|
Get transcluded details as an object {text:,type:}
|
||||||
*/
|
*/
|
||||||
TranscludeWidget.prototype.getTransclusionTarget = function() {
|
TranscludeWidget.prototype.getTransclusionTarget = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
// Determine whether we're being used in inline or block mode
|
var text;
|
||||||
var parseAsInline = !this.parseTreeNode.isBlock;
|
// Return the text and type of the target
|
||||||
if(this.transcludeMode === "inline") {
|
if(this.hasAttribute("$variable")) {
|
||||||
parseAsInline = true;
|
if(this.transcludeVariable) {
|
||||||
} else if(this.transcludeMode === "block") {
|
// Transcluding a variable
|
||||||
parseAsInline = false;
|
var variableInfo = this.getVariableInfo(this.transcludeVariable,{params: this.getOrderedTransclusionParameters()});
|
||||||
|
text = variableInfo.text;
|
||||||
|
return {
|
||||||
|
text: variableInfo.text,
|
||||||
|
type: this.transcludeType
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Transcluding a text reference
|
||||||
|
var parserInfo = this.wiki.getTextReferenceParserInfo(
|
||||||
|
this.transcludeTitle,
|
||||||
|
this.transcludeField,
|
||||||
|
this.transcludeIndex,
|
||||||
|
{
|
||||||
|
subTiddler: this.transcludeSubTiddler,
|
||||||
|
defaultType: this.transcludeType
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
text: parserInfo.text,
|
||||||
|
type: parserInfo.type
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get transcluded parse tree nodes as an object {text:,type:,parseTreeNodes:,parseAsInline:}
|
||||||
|
*/
|
||||||
|
TranscludeWidget.prototype.parseTransclusionTarget = function(parseAsInline) {
|
||||||
|
var self = this;
|
||||||
var parser;
|
var parser;
|
||||||
// Get the parse tree
|
// Get the parse tree
|
||||||
if(this.hasAttribute("$variable")) {
|
if(this.hasAttribute("$variable")) {
|
||||||
@@ -234,7 +277,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
|||||||
}
|
}
|
||||||
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
|
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
|
||||||
});
|
});
|
||||||
} else if(srcVariable && (srcVariable.isMacroDefinition || !srcVariable.isFunctionDefinition)) {
|
} else if(srcVariable && !srcVariable.isFunctionDefinition) {
|
||||||
// For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"
|
// For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"
|
||||||
parser = {
|
parser = {
|
||||||
tree: [
|
tree: [
|
||||||
@@ -265,27 +308,14 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
|
|||||||
defaultType: this.transcludeType
|
defaultType: this.transcludeType
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Set 'thisTiddler'
|
|
||||||
this.setVariable("thisTiddler",this.transcludeTitle);
|
|
||||||
// Return the parse tree
|
// Return the parse tree
|
||||||
if(parser) {
|
return {
|
||||||
return {
|
parser: parser,
|
||||||
parser: parser,
|
parseTreeNodes: parser ? parser.tree : (this.slotFillParseTrees["ts-missing"] || []),
|
||||||
parseTreeNodes: parser.tree,
|
parseAsInline: parseAsInline,
|
||||||
parseAsInline: parseAsInline,
|
text: parser && parser.source,
|
||||||
text: parser.source,
|
type: parser && parser.type
|
||||||
type: parser.type
|
};
|
||||||
};
|
|
||||||
} else {
|
|
||||||
// If there's no parse tree then return the missing slot value
|
|
||||||
return {
|
|
||||||
parser: null,
|
|
||||||
parseTreeNodes: (this.slotFillParseTrees["ts-missing"] || []),
|
|
||||||
parseAsInline: parseAsInline,
|
|
||||||
text: null,
|
|
||||||
type: null
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -719,44 +719,23 @@ Widget.prototype.findFirstDomNode = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Entry into destroy procedure
|
Remove any DOM nodes created by this widget or its children
|
||||||
*/
|
|
||||||
Widget.prototype.destroyChildren = function() {
|
|
||||||
$tw.utils.each(this.children,function(childWidget) {
|
|
||||||
childWidget.destroy();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/*
|
|
||||||
Legacy entry into destroy procedure
|
|
||||||
*/
|
*/
|
||||||
Widget.prototype.removeChildDomNodes = function() {
|
Widget.prototype.removeChildDomNodes = function() {
|
||||||
this.destroy();
|
// If this widget has directly created DOM nodes, delete them and exit. This assumes that any child widgets are contained within the created DOM nodes, which would normally be the case
|
||||||
};
|
|
||||||
/*
|
|
||||||
Default destroy
|
|
||||||
*/
|
|
||||||
Widget.prototype.destroy = function() {
|
|
||||||
// call children to remove their resources
|
|
||||||
this.destroyChildren();
|
|
||||||
// remove our resources
|
|
||||||
this.children = [];
|
|
||||||
this.removeLocalDomNodes();
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
Remove any DOM nodes created by this widget
|
|
||||||
*/
|
|
||||||
Widget.prototype.removeLocalDomNodes = function() {
|
|
||||||
// If this widget has directly created DOM nodes, delete them and exit.
|
|
||||||
if(this.domNodes.length > 0) {
|
if(this.domNodes.length > 0) {
|
||||||
$tw.utils.each(this.domNodes,function(domNode) {
|
$tw.utils.each(this.domNodes,function(domNode) {
|
||||||
domNode.parentNode.removeChild(domNode);
|
domNode.parentNode.removeChild(domNode);
|
||||||
});
|
});
|
||||||
this.domNodes = [];
|
this.domNodes = [];
|
||||||
|
} else {
|
||||||
|
// Otherwise, ask the child widgets to delete their DOM nodes
|
||||||
|
$tw.utils.each(this.children,function(childWidget) {
|
||||||
|
childWidget.removeChildDomNodes();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Invoke the action widgets that are descendents of the current widget.
|
Invoke the action widgets that are descendents of the current widget.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1086,7 +1086,7 @@ exports.getSubstitutedText = function(text,widget,options) {
|
|||||||
output = $tw.utils.replaceString(output,new RegExp("\\$" + $tw.utils.escapeRegExp(substitute.name) + "\\$","mg"),substitute.value);
|
output = $tw.utils.replaceString(output,new RegExp("\\$" + $tw.utils.escapeRegExp(substitute.name) + "\\$","mg"),substitute.value);
|
||||||
});
|
});
|
||||||
// Substitute any variable references with their values
|
// Substitute any variable references with their values
|
||||||
return output.replace(/\$\((\w+)\)\$/g, function(match,varname) {
|
return output.replace(/\$\(([^\)\$]+)\)\$/g, function(match,varname) {
|
||||||
return widget.getVariable(varname,{defaultValue: ""})
|
return widget.getVariable(varname,{defaultValue: ""})
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
code-body: yes
|
||||||
title: $:/core/ui/AlertTemplate
|
title: $:/core/ui/AlertTemplate
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
code-body: yes
|
||||||
title: $:/core/ui/EditTemplate
|
title: $:/core/ui/EditTemplate
|
||||||
|
|
||||||
\define delete-edittemplate-state-tiddlers()
|
\define delete-edittemplate-state-tiddlers()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
title: $:/core/ui/ImportPreviews/Text
|
title: $:/core/ui/ImportPreviews/Text
|
||||||
tags: $:/tags/ImportPreview
|
tags: $:/tags/ImportPreview
|
||||||
caption: {{$:/language/Import/Listing/Preview/Text}}
|
caption: {{$:/language/Import/Listing/Preview/Text}}
|
||||||
|
code-body: yes
|
||||||
|
|
||||||
<$transclude tiddler=<<currentTiddler>> subtiddler=<<payloadTiddler>> mode="block"/>
|
<$transclude tiddler=<<currentTiddler>> subtiddler=<<payloadTiddler>> mode="block"/>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
title: $:/core/ui/PageStylesheet
|
title: $:/core/ui/PageStylesheet
|
||||||
|
code-body: yes
|
||||||
|
|
||||||
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ title: $:/core/ui/PageTemplate
|
|||||||
name: {{$:/language/PageTemplate/Name}}
|
name: {{$:/language/PageTemplate/Name}}
|
||||||
description: {{$:/language/PageTemplate/Description}}
|
description: {{$:/language/PageTemplate/Description}}
|
||||||
icon: $:/core/images/layout-button
|
icon: $:/core/images/layout-button
|
||||||
|
code-body: yes
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
title: $:/core/ui/RootTemplate
|
title: $:/core/ui/RootTemplate
|
||||||
|
code-body: yes
|
||||||
|
|
||||||
<$transclude tiddler={{{ [{$:/layout}has[text]] ~[[$:/core/ui/PageTemplate]] }}} mode="inline"/>
|
<$transclude tiddler={{{ [{$:/layout}has[text]] ~[[$:/core/ui/PageTemplate]] }}} mode="inline"/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
title: $:/core/ui/StoryTiddlerTemplate
|
title: $:/core/ui/StoryTiddlerTemplate
|
||||||
|
code-body: yes
|
||||||
|
|
||||||
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/StoryTiddlerTemplateFilter]!is[draft]get[text]] :and[has[title]else[$:/core/ui/ViewTemplate]] }}} />
|
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/StoryTiddlerTemplateFilter]!is[draft]get[text]] :and[has[title]else[$:/core/ui/ViewTemplate]] }}} />
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
title: $:/core/ui/ViewTemplate
|
title: $:/core/ui/ViewTemplate
|
||||||
|
code-body: yes
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
\define folded-state()
|
\define folded-state()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
title: $:/core/ui/ViewTemplate/body/default
|
title: $:/core/ui/ViewTemplate/body/default
|
||||||
|
code-body: yes
|
||||||
|
|
||||||
<$transclude>
|
<$transclude>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
title: $:/config/OfficialPluginLibrary
|
title: $:/config/OfficialPluginLibrary
|
||||||
tags: $:/tags/PluginLibrary
|
tags: $:/tags/PluginLibrary
|
||||||
url: https://tiddlywiki.com/library/v5.3.0/index.html
|
url: https://tiddlywiki.com/library/v5.3.1/index.html
|
||||||
caption: {{$:/language/OfficialPluginLibrary}}
|
caption: {{$:/language/OfficialPluginLibrary}}
|
||||||
|
|
||||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ title: $:/config/ViewTemplateBodyFilters/
|
|||||||
tags: $:/tags/ViewTemplateBodyFilter
|
tags: $:/tags/ViewTemplateBodyFilter
|
||||||
|
|
||||||
stylesheet: [tag[$:/tags/Stylesheet]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]]
|
stylesheet: [tag[$:/tags/Stylesheet]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]]
|
||||||
system: [prefix[$:/boot/]] [prefix[$:/config/]] [prefix[$:/core/macros]] [prefix[$:/core/save/]] [prefix[$:/core/templates/]] [prefix[$:/core/ui/]split[/]count[]compare:number:eq[4]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/info/]] [prefix[$:/temp/]] +[!is[image]limit[1]then[$:/core/ui/ViewTemplate/body/code]]
|
core-ui-tags: [tag[$:/tags/PageTemplate]] [tag[$:/tags/EditTemplate]] [tag[$:/tags/ViewTemplate]] [tag[$:/tags/KeyboardShortcut]] [tag[$:/tags/ImportPreview]] [tag[$:/tags/EditPreview]][tag[$:/tags/EditorToolbar]] [tag[$:/tags/Actions]] :then[[$:/core/ui/ViewTemplate/body/code]]
|
||||||
|
system: [prefix[$:/boot/]] [prefix[$:/config/]] [prefix[$:/core/macros]] [prefix[$:/core/save/]] [prefix[$:/core/templates/]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/info/]] [prefix[$:/temp/]] +[!is[image]limit[1]then[$:/core/ui/ViewTemplate/body/code]]
|
||||||
code-body: [field:code-body[yes]then[$:/core/ui/ViewTemplate/body/code]]
|
code-body: [field:code-body[yes]then[$:/core/ui/ViewTemplate/body/code]]
|
||||||
import: [field:plugin-type[import]then[$:/core/ui/ViewTemplate/body/import]]
|
import: [field:plugin-type[import]then[$:/core/ui/ViewTemplate/body/import]]
|
||||||
plugin: [has[plugin-type]then[$:/core/ui/ViewTemplate/body/plugin]]
|
plugin: [has[plugin-type]then[$:/core/ui/ViewTemplate/body/plugin]]
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ tags: $:/tags/Macro
|
|||||||
|
|
||||||
\define toc-caption()
|
\define toc-caption()
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<span class="tc-toc-caption">
|
<span class="tc-toc-caption tc-tiny-gap-left">
|
||||||
<$set name="tv-wikilinks" value="no">
|
<$set name="tv-wikilinks" value="no">
|
||||||
<$transclude field="caption">
|
<$transclude field="caption">
|
||||||
<$view field="title"/>
|
<$view field="title"/>
|
||||||
@@ -145,7 +145,7 @@ tags: $:/tags/Macro
|
|||||||
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
|
||||||
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item">
|
||||||
<li class=<<toc-item-class>>>
|
<li class=<<toc-item-class>>>
|
||||||
<$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>">
|
<$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="""<$button class="tc-btn-invisible">{{$:/core/images/blank}}</$button><span class="toc-item-muted"><<toc-caption>></span>""">
|
||||||
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
|
||||||
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
|
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
|
||||||
<$transclude tiddler=<<toc-closed-icon>> />
|
<$transclude tiddler=<<toc-closed-icon>> />
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
title: $:/tags/ViewTemplateBodyFilter
|
title: $:/tags/ViewTemplateBodyFilter
|
||||||
list: $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/code-body $:/config/ViewTemplateBodyFilters/stylesheet $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/default
|
list: $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/code-body $:/config/ViewTemplateBodyFilters/stylesheet $:/config/ViewTemplateBodyFilters/core-ui-advanced-search $:/config/ViewTemplateBodyFilters/core-ui-tags $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/default
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"tiddlers": [
|
"tiddlers": [
|
||||||
{
|
{
|
||||||
"file": "../../../tw5.com/tiddlers/images/New Release Banner.jpg",
|
"file": "../../../tw5.com/tiddlers/images/New Release Banner.png",
|
||||||
"fields": {
|
"fields": {
|
||||||
"type": "image/jpeg",
|
"type": "image/jpeg",
|
||||||
"title": "New Release Banner",
|
"title": "New Release Banner",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
caption: 5.3.1
|
caption: 5.3.1
|
||||||
created: 20230701133439630
|
created: 20230720215100983
|
||||||
modified: 20230701133439630
|
modified: 20230720215100983
|
||||||
tags: ReleaseNotes
|
tags: ReleaseNotes
|
||||||
title: Release 5.3.1
|
title: Release 5.3.1
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@@ -9,6 +9,10 @@ type: text/vnd.tiddlywiki
|
|||||||
|
|
||||||
! Overview of v5.3.1
|
! Overview of v5.3.1
|
||||||
|
|
||||||
|
! Bug Fixes and Reversions of v5.3.0 Changes
|
||||||
|
|
||||||
|
* Reverted adding the `widget.destroy()` method because of performance concerns (see https://github.com/Jermolene/TiddlyWiki5/pull/7468)
|
||||||
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7647">> inefficiency when transcluding with the ''$output'' attribute set to `text/plain`
|
||||||
|
|
||||||
! Plugin Improvements
|
! Plugin Improvements
|
||||||
|
|
||||||
@@ -18,7 +22,8 @@ type: text/vnd.tiddlywiki
|
|||||||
|
|
||||||
Improvements to the following translations:
|
Improvements to the following translations:
|
||||||
|
|
||||||
*
|
* Chinese
|
||||||
|
* Polish
|
||||||
|
|
||||||
! Usability Improvements
|
! Usability Improvements
|
||||||
|
|
||||||
@@ -26,7 +31,7 @@ Improvements to the following translations:
|
|||||||
|
|
||||||
! Widget Improvements
|
! Widget Improvements
|
||||||
|
|
||||||
*
|
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7594">> ''tabindex'' attribute to SelectWidget
|
||||||
|
|
||||||
! Filter improvements
|
! Filter improvements
|
||||||
|
|
||||||
@@ -34,23 +39,41 @@ Improvements to the following translations:
|
|||||||
|
|
||||||
! Hackability Improvements
|
! Hackability Improvements
|
||||||
|
|
||||||
*
|
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7611">> ImportVariablesWidget and [[Pragma: \import]] to trim whitespace when parsing tiddlers
|
||||||
|
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/9b2af1359614f4ad5afd05be7cf9853909334592"> [[WidgetMessage: tm-http-request]] to handle binary responses ([[demo|WidgetMessage: tm-http-request Example - Random Dog]])
|
||||||
|
|
||||||
! Bug Fixes
|
! Bug Fixes
|
||||||
|
|
||||||
*
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7627">> table of contents indentation
|
||||||
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7595">> bindStatus and bindProgress parameters of [[WidgetMessage: tm-http-request]]
|
||||||
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7606">> attribute substitution to handle variables containing non-word characters
|
||||||
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7624">> the pragmas introduced in v5.3.0 so that they can be indented with whitespace
|
||||||
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7619">> size of tiddler icons
|
||||||
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7622">> drag and drop from Chrome-like browsers to Firefox
|
||||||
|
|
||||||
! Node.js Improvements
|
! Node.js Improvements
|
||||||
|
|
||||||
*
|
*
|
||||||
|
|
||||||
! Performance Improvements
|
! Developer Improvements
|
||||||
|
|
||||||
*
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/6c7c21a87bdb0d8a00df1c14eea18912164e0b57">> overeager onload handler in Jasmine plugin
|
||||||
|
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/08bad90e51c45233a196333e101bbbf6ecf702ce">> ordering of shadow tiddler listings to not reflect order of insertion
|
||||||
|
|
||||||
|
Currently shadow tiddler ordering depends upon the order in which the shadows appear in the plugin JSON
|
||||||
|
|
||||||
! Acknowledgements
|
! Acknowledgements
|
||||||
|
|
||||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
||||||
|
|
||||||
<<.contributors """
|
<<.contributors """
|
||||||
|
AnthonyMuscio
|
||||||
|
btheado
|
||||||
|
CrossEye
|
||||||
|
flibbles
|
||||||
|
hffqyd
|
||||||
|
pmario
|
||||||
|
saqimtiaz
|
||||||
|
stevesunypoly
|
||||||
|
twMat
|
||||||
""">>
|
""">>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
title: $:/config/LocalPluginLibrary
|
title: $:/config/LocalPluginLibrary
|
||||||
tags: $:/tags/PluginLibrary
|
tags: $:/tags/PluginLibrary
|
||||||
url: http://127.0.0.1:8080/prerelease/library/v5.2.2/index.html
|
url: http://127.0.0.1:8080/prerelease/library/v5.3.1/index.html
|
||||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease Local)
|
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease Local)
|
||||||
|
|
||||||
A locally installed version of the official ~TiddlyWiki plugin library at tiddlywiki.com for testing and debugging. //Requires a local web server to share the library//
|
A locally installed version of the official ~TiddlyWiki plugin library at tiddlywiki.com for testing and debugging. //Requires a local web server to share the library//
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
title: $:/config/OfficialPluginLibrary
|
title: $:/config/OfficialPluginLibrary
|
||||||
tags: $:/tags/PluginLibrary
|
tags: $:/tags/PluginLibrary
|
||||||
url: https://tiddlywiki.com/prerelease/library/v5.3.0/index.html
|
url: https://tiddlywiki.com/prerelease/library/v5.3.1/index.html
|
||||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease)
|
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease)
|
||||||
|
|
||||||
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
|
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
title: $:/my-scroll-position
|
||||||
|
scroll-left: 0
|
||||||
|
scroll-top: 100
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
title: Functions/Function/Indented
|
||||||
|
description: Indented function definition
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
\function .dividebysomething(factor:0.5)
|
||||||
|
[divide<factor>]
|
||||||
|
\end
|
||||||
|
|
||||||
|
\function multiplebysomething(first:ignored,factor:2)
|
||||||
|
[multiply<factor>multiply[2].dividebysomething[0.25]]
|
||||||
|
\end
|
||||||
|
|
||||||
|
<$text text={{{ [[4]function[multiplebysomething]] }}}/>
|
||||||
|
|
|
||||||
|
<$text text={{{ [[6]function[multiplebysomething],[ignored],[4]] }}}/>
|
||||||
|
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>64|192</p>
|
||||||
@@ -33,4 +33,4 @@ $param$ with a ''buffalo''
|
|||||||
+
|
+
|
||||||
title: ExpectedResult
|
title: ExpectedResult
|
||||||
|
|
||||||
<p>Going to lunch with a ''buffalo''</p><p>Going to breakfastwith a<strong>buffalo</strong></p><p>Going to dinner with a <strong>buffalo</strong></p>Going to lunch with a buffalo with a buffaloGoing to dinner with a buffalo
|
<p>Going to lunch with a ''buffalo''</p><p>Going to breakfastwith a<strong>buffalo</strong></p><p>Going to dinner with a <strong>buffalo</strong></p>Going to lunch with a ''buffalo''Going to breakfastwith abuffaloGoing to dinner with a buffalo
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
title: ImportVariables/WithSetWidgets
|
||||||
|
description: Import variables defined with a set widget
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
\import Definitions
|
||||||
|
<$text text=<<one>>/>,
|
||||||
|
<$text text=<<two>>/>
|
||||||
|
+
|
||||||
|
title: Definitions
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
<$set name="one" value="elephant">
|
||||||
|
<$set name="two" value="giraffe">
|
||||||
|
</$set>
|
||||||
|
</$set>
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>elephant,giraffe</p>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
title: ImportVariables/WithSetWidgets2
|
||||||
|
description: Import variables defined with a set widget without whitespace pragma
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
\import Definitions
|
||||||
|
<$text text=<<one>>/>,
|
||||||
|
<$text text=<<two>>/>
|
||||||
|
+
|
||||||
|
title: Definitions
|
||||||
|
|
||||||
|
<$set name="one" value="elephant">
|
||||||
|
<$set name="two" value="giraffe">
|
||||||
|
</$set>
|
||||||
|
</$set>
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>elephant,giraffe</p>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
title: ImportVariables/WithSetWidgetsAndMacros
|
||||||
|
description: Import variables defined with a set widget without whitespace pragma
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
\import Definitions
|
||||||
|
<$text text=<<name>>/>,
|
||||||
|
<$text text=<<address>>/>,
|
||||||
|
<$text text=<<one>>/>,
|
||||||
|
<$text text=<<two>>/>
|
||||||
|
+
|
||||||
|
title: Definitions
|
||||||
|
|
||||||
|
\define name() Bugs Bunny
|
||||||
|
\procedure address()
|
||||||
|
Bunny Hill
|
||||||
|
\end
|
||||||
|
|
||||||
|
<$set name="one" value="elephant">
|
||||||
|
<$set name="two" value="giraffe">
|
||||||
|
</$set>
|
||||||
|
</$set>
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>Bugs Bunny,Bunny Hill,elephant,giraffe</p>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
title: Procedures/Nested/Indented
|
||||||
|
description: Nested Procedures that are indented
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
\procedure alpha(x)
|
||||||
|
\procedure beta(y)
|
||||||
|
<$text text=<<y>>/>
|
||||||
|
\end beta
|
||||||
|
<$transclude $variable="beta" y={{{ [<x>addprefix<x>] }}}/>
|
||||||
|
\end alpha
|
||||||
|
|
||||||
|
<<alpha "Elephant">>
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>ElephantElephant</p>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
title: Procedures/TrailingNewlines
|
||||||
|
description: Trailing newlines in procedures must not be dropped
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\procedure inner()
|
||||||
|
Paragraph 1
|
||||||
|
|
||||||
|
Paragraph 2
|
||||||
|
\end
|
||||||
|
\procedure outer()
|
||||||
|
<$macrocall $name=inner />
|
||||||
|
|
||||||
|
\end
|
||||||
|
<<outer>>
|
||||||
|
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>Paragraph 1</p><p>Paragraph 2</p>
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
title: Transclude/CustomWidget/Simple/Indented
|
||||||
|
description: Custom widget definition indented
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
<$transclude $tiddler='TiddlerOne' one='Ferret'>
|
||||||
|
</$transclude>
|
||||||
|
+
|
||||||
|
title: TiddlerOne
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
<!-- Define the <$my.widget> widget by defining a transcludable variable with that name -->
|
||||||
|
\widget $my.widget(one:'Jaguar')
|
||||||
|
\whitespace trim
|
||||||
|
<$text text=<<one>>/>
|
||||||
|
<$slot $name="ts-raw">
|
||||||
|
Whale
|
||||||
|
</$slot>
|
||||||
|
\end
|
||||||
|
<$my.widget one="Dingo">
|
||||||
|
Crocodile
|
||||||
|
</$my.widget>
|
||||||
|
<$my.widget one="BumbleBee">
|
||||||
|
Squirrel
|
||||||
|
</$my.widget>
|
||||||
|
<$my.widget/>
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>DingoCrocodileBumbleBeeSquirrelJaguarWhale</p>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
title: Transclude/Parameterised/Shortcut/ParametersIndented
|
||||||
|
description: Simple parameterised transclusion using the parameters pragma (indented)
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
<$transclude $tiddler='TiddlerOne' one='Ferret'/>
|
||||||
|
<$transclude $tiddler='TiddlerOne'/>
|
||||||
|
+
|
||||||
|
title: TiddlerOne
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
\parameters(one:'Jaguar')
|
||||||
|
<$text text=<<one>>/>
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>FerretJaguar</p>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
title: Procedures/Double/Underscore
|
||||||
|
description: Checking that procedures don't expose parameters as variables wrapped in double underscores
|
||||||
|
type: text/vnd.tiddlywiki-multiple
|
||||||
|
tags: [[$:/tags/wiki-test-spec]]
|
||||||
|
|
||||||
|
title: Output
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
\procedure mamacro(one:"red",two:"green")
|
||||||
|
It is $one$ and $two$<<__one__>><<__two__>>.
|
||||||
|
\end
|
||||||
|
|
||||||
|
<$macrocall $name="mamacro"/>
|
||||||
|
|
||||||
|
<$transclude $variable="mamacro"/>
|
||||||
|
|
||||||
|
<$transclude $variable="mamacro" one="orange"/>
|
||||||
|
|
||||||
|
<$transclude $variable="mamacro" 0="pink"/>
|
||||||
|
|
||||||
|
<$transclude $variable="mamacro" one="purple" 1="pink"/>
|
||||||
|
|
||||||
|
+
|
||||||
|
title: ExpectedResult
|
||||||
|
|
||||||
|
<p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p>
|
||||||
@@ -6,14 +6,16 @@ tags: [[$:/tags/wiki-test-spec]]
|
|||||||
title: Output
|
title: Output
|
||||||
|
|
||||||
\whitespace trim
|
\whitespace trim
|
||||||
<$let project="TiddlyWiki" disabled="true">
|
<$set name="var with spaces" value="spaces">
|
||||||
|
<$let project="TiddlyWiki" disabled="true" var-with-dashes="dashes">
|
||||||
<div class=`$(project)$
|
<div class=`$(project)$
|
||||||
${ [[Hello]addsuffix[There]] }$` attrib=`myvalue` otherattrib=`$(1)$` blankattrib=`` quoted="here" disabled=```$(disabled)$```>
|
${ [[Hello]addsuffix[There]] }$` attrib=`myvalue` otherattrib=`$(1)$` blankattrib=`` quoted="here" disabled=```$(disabled)$``` dashes=`$(var-with-dashes)$` spaces=`$(var with spaces)$`>
|
||||||
</div>
|
</div>
|
||||||
</$let>
|
</$let>
|
||||||
|
</$set>
|
||||||
|
|
||||||
+
|
+
|
||||||
title: ExpectedResult
|
title: ExpectedResult
|
||||||
|
|
||||||
<p><div attrib="myvalue" blankattrib="" class="TiddlyWiki
|
<p><div attrib="myvalue" blankattrib="" class="TiddlyWiki
|
||||||
HelloThere" disabled="true" otherattrib="" quoted="here"></div></p>
|
HelloThere" dashes="dashes" disabled="true" otherattrib="" quoted="here" spaces="spaces"></div></p>
|
||||||
@@ -397,8 +397,8 @@ Tests the filtering mechanism.
|
|||||||
expect(wiki.filterTiddlers("[all[shadows]tag[two]]").join(",")).toBe("$:/TiddlerFive");
|
expect(wiki.filterTiddlers("[all[shadows]tag[two]]").join(",")).toBe("$:/TiddlerFive");
|
||||||
expect(wiki.filterTiddlers("[all[shadows+tiddlers]tag[two]]").join(",")).toBe("$:/TiddlerFive,$:/TiddlerTwo,Tiddler Three");
|
expect(wiki.filterTiddlers("[all[shadows+tiddlers]tag[two]]").join(",")).toBe("$:/TiddlerFive,$:/TiddlerTwo,Tiddler Three");
|
||||||
expect(wiki.filterTiddlers("[all[tiddlers+shadows]tag[two]]").join(",")).toBe("$:/TiddlerTwo,Tiddler Three,$:/TiddlerFive");
|
expect(wiki.filterTiddlers("[all[tiddlers+shadows]tag[two]]").join(",")).toBe("$:/TiddlerTwo,Tiddler Three,$:/TiddlerFive");
|
||||||
expect(wiki.filterTiddlers("[all[shadows+tiddlers]]").join(",")).toBe("$:/TiddlerFive,TiddlerSix,TiddlerSeventh,Tiddler8,$:/ShadowPlugin,$:/TiddlerTwo,a fourth tiddler,filter regexp test,has filter,hasList,one,Tiddler Three,TiddlerOne");
|
expect(wiki.filterTiddlers("[all[shadows+tiddlers]]").join(",")).toBe("$:/TiddlerFive,Tiddler8,TiddlerSeventh,TiddlerSix,$:/ShadowPlugin,$:/TiddlerTwo,a fourth tiddler,filter regexp test,has filter,hasList,one,Tiddler Three,TiddlerOne");
|
||||||
expect(wiki.filterTiddlers("[all[tiddlers+shadows]]").join(",")).toBe("$:/ShadowPlugin,$:/TiddlerTwo,a fourth tiddler,filter regexp test,has filter,hasList,one,Tiddler Three,TiddlerOne,$:/TiddlerFive,TiddlerSix,TiddlerSeventh,Tiddler8");
|
expect(wiki.filterTiddlers("[all[tiddlers+shadows]]").join(",")).toBe("$:/ShadowPlugin,$:/TiddlerTwo,a fourth tiddler,filter regexp test,has filter,hasList,one,Tiddler Three,TiddlerOne,$:/TiddlerFive,Tiddler8,TiddlerSeventh,TiddlerSix");
|
||||||
expect(wiki.filterTiddlers("[all[tiddlers]tag[two]]").join(",")).toBe("$:/TiddlerTwo,Tiddler Three");
|
expect(wiki.filterTiddlers("[all[tiddlers]tag[two]]").join(",")).toBe("$:/TiddlerTwo,Tiddler Three");
|
||||||
expect(wiki.filterTiddlers("[all[orphans+tiddlers+tags]]").join(",")).toBe("$:/ShadowPlugin,$:/TiddlerTwo,a fourth tiddler,filter regexp test,has filter,hasList,Tiddler Three,TiddlerOne,two,one");
|
expect(wiki.filterTiddlers("[all[orphans+tiddlers+tags]]").join(",")).toBe("$:/ShadowPlugin,$:/TiddlerTwo,a fourth tiddler,filter regexp test,has filter,hasList,Tiddler Three,TiddlerOne,two,one");
|
||||||
});
|
});
|
||||||
@@ -420,10 +420,10 @@ Tests the filtering mechanism.
|
|||||||
|
|
||||||
it("should handle the tagging operator", function() {
|
it("should handle the tagging operator", function() {
|
||||||
expect(wiki.filterTiddlers("[[one]tagging[]sort[title]]").join(",")).toBe("Tiddler Three,Tiddler8,TiddlerOne,TiddlerSeventh");
|
expect(wiki.filterTiddlers("[[one]tagging[]sort[title]]").join(",")).toBe("Tiddler Three,Tiddler8,TiddlerOne,TiddlerSeventh");
|
||||||
expect(wiki.filterTiddlers("[[one]tagging[]]").join(",")).toBe("Tiddler Three,TiddlerOne,TiddlerSeventh,Tiddler8");
|
expect(wiki.filterTiddlers("[[one]tagging[]]").join(",")).toBe("Tiddler Three,TiddlerOne,Tiddler8,TiddlerSeventh");
|
||||||
expect(wiki.filterTiddlers("[[two]tagging[]sort[title]]").join(",")).toBe("$:/TiddlerFive,$:/TiddlerTwo,Tiddler Three");
|
expect(wiki.filterTiddlers("[[two]tagging[]sort[title]]").join(",")).toBe("$:/TiddlerFive,$:/TiddlerTwo,Tiddler Three");
|
||||||
var fakeWidget = {wiki: wiki, getVariable: function(name) {return name === "currentTiddler" ? "one": undefined;}};
|
var fakeWidget = {wiki: wiki, getVariable: function(name) {return name === "currentTiddler" ? "one": undefined;}};
|
||||||
expect(wiki.filterTiddlers("[all[current]tagging[]]",fakeWidget).join(",")).toBe("Tiddler Three,TiddlerOne,TiddlerSeventh,Tiddler8");
|
expect(wiki.filterTiddlers("[all[current]tagging[]]",fakeWidget).join(",")).toBe("Tiddler Three,TiddlerOne,Tiddler8,TiddlerSeventh");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should handle the untagged operator", function() {
|
it("should handle the untagged operator", function() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
caption: TiddlyStow (experimental)
|
caption: ~TiddlyStow (experimental)
|
||||||
color: #FF8A65
|
color: #FF8A65
|
||||||
created: 20230403170650008
|
created: 20230403170650008
|
||||||
delivery: Saver
|
delivery: Saver
|
||||||
@@ -13,4 +13,4 @@ url: https://github.com/btheado/tiddlystow
|
|||||||
''Link:'' {{!!url}}
|
''Link:'' {{!!url}}
|
||||||
|
|
||||||
Tiddlystow saves TiddlyWiki files locally using the browser file system API (Chrome-based browsers currently).
|
Tiddlystow saves TiddlyWiki files locally using the browser file system API (Chrome-based browsers currently).
|
||||||
This is a simple web page for loading a local TiddlyWiki file and storing it back to the same local file requiring no plugins or extensions.
|
This is a simple web page for loading a local TiddlyWiki file and storing it back to the same local file requiring no plugins or extensions.
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
caption: Fourth-Caption
|
||||||
created: 20150221194405000
|
created: 20150221194405000
|
||||||
modified: 20211114013601188
|
modified: 20211114013601188
|
||||||
tags: Contents [[Table-of-Contents Demonstrations]]
|
tags: Contents [[Table-of-Contents Demonstrations]]
|
||||||
title: Fourth
|
title: Fourth
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
<<.toc-lorem>>
|
<<.toc-lorem>>
|
||||||
|
|||||||
@@ -2,5 +2,15 @@ created: 20150221194423000
|
|||||||
modified: 20211114013601189
|
modified: 20211114013601189
|
||||||
tags: SecondThree [[Table-of-Contents Demonstrations]]
|
tags: SecondThree [[Table-of-Contents Demonstrations]]
|
||||||
title: SecondThreeThree
|
title: SecondThreeThree
|
||||||
|
toc-link: no
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
|
''Important''
|
||||||
|
|
||||||
|
It's important that this tiddler has no "child" to be able to visually test every possible toc code-path.
|
||||||
|
|
||||||
|
* This tiddler has a field ''toc-link: no''
|
||||||
|
* Do not tag any other tiddler with the title of this one
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<<.toc-lorem>>
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
caption: Third-Caption
|
||||||
created: 20150221194436000
|
created: 20150221194436000
|
||||||
list: ThirdOne ThirdTwo ThirdThree
|
list: ThirdOne ThirdTwo ThirdThree
|
||||||
modified: 20211114013601191
|
modified: 20211114013601191
|
||||||
tags: Contents [[Table-of-Contents Demonstrations]]
|
tags: Contents [[Table-of-Contents Demonstrations]]
|
||||||
title: Third
|
title: Third
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
<<.toc-lorem>>
|
<<.toc-lorem>>
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ The <<.op substitute>> operator replaces any placeholders in the input titles in
|
|||||||
# variables
|
# variables
|
||||||
|
|
||||||
|placeholder syntax|description|h
|
|placeholder syntax|description|h
|
||||||
|`$n$`|Text substitution of a parameter provided to the operator, where n is the position of the parameter starting with 1 for the first parameter. Unmatched placeholders pass through unchanged.|
|
|`$n$`|Text substitution of a parameter provided to the operator, where n is the position of the parameter starting with 1 for the first parameter. Unmatched placeholders pass through unchanged. |
|
||||||
|`$(varname)$`|Text substitution of a variable. Undefined variables are replaced with an empty string.|
|
|`$(varname)$`|Text substitution of a variable. Undefined variables are replaced with an empty string. |
|
||||||
|`${ filter expression }$`|Text substitution with the first result of evaluating the filter expression. |
|
|`${ filter expression }$`|Text substitution of the first result of evaluating a filter expression. In other words, if the filter returns multiple titles only the first one will be used. |
|
||||||
|
|
||||||
<<.tip """Placeholders that contain square bracket characters are not valid filter syntax when used directly in a filter expression. However they can be provided as input to the <$macrocall $name=".op" _="substitute"/> operator as text references or variables""">>
|
<<.tip """Placeholders that contain square bracket characters are not valid filter syntax when used directly in a filter expression. However they can be provided as input to the <$macrocall $name=".op" _="substitute"/> operator as text references or variables""">>
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB |
BIN
editions/tw5.com/tiddlers/images/New Release Banner.png
Normal file
BIN
editions/tw5.com/tiddlers/images/New Release Banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
@@ -1,3 +1,3 @@
|
|||||||
title: New Release Banner
|
title: New Release Banner
|
||||||
type: image/jpeg
|
type: image/png
|
||||||
tags: picture
|
tags: picture
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
title: WidgetMessage: tm-http-request Example - Random Dog
|
||||||
|
tags: $:/tags/Global
|
||||||
|
|
||||||
|
\procedure download-dog(url)
|
||||||
|
|
||||||
|
\procedure completion-download-dog()
|
||||||
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
|
<$action-log msg="In completion-download-dog"/>
|
||||||
|
<$action-log/>
|
||||||
|
<!-- Success -->
|
||||||
|
<$list filter="[<status>compare:number:gteq[200]compare:number:lteq[299]]" variable="ignore">
|
||||||
|
<!-- Create the dog tiddler -->
|
||||||
|
<$action-createtiddler
|
||||||
|
$basetitle=`$:/RandomDog/$(title)$`
|
||||||
|
text=<<data>>
|
||||||
|
tags="$:/tags/RandomDog"
|
||||||
|
type={{{ [<headers>jsonget[content-type]] }}}
|
||||||
|
credits="https://random.dog/"
|
||||||
|
>
|
||||||
|
<$action-log msg="Created tiddler" title=<<createTiddler-title>>/>
|
||||||
|
</$createtiddler>
|
||||||
|
</$list>
|
||||||
|
\end completion-download-dog
|
||||||
|
|
||||||
|
<$action-sendmessage
|
||||||
|
$message="tm-http-request"
|
||||||
|
url=<<url>>
|
||||||
|
method="GET"
|
||||||
|
binary="yes"
|
||||||
|
oncompletion=<<completion-download-dog>>
|
||||||
|
var-title=<<url>>
|
||||||
|
/>
|
||||||
|
\end download-dog
|
||||||
|
|
||||||
|
\procedure get-random-dog()
|
||||||
|
|
||||||
|
\procedure completion-get-json()
|
||||||
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
|
<$action-log msg="In completion-get-json"/>
|
||||||
|
<$action-log/>
|
||||||
|
<!-- Success -->
|
||||||
|
<$list filter="[<status>compare:number:gteq[200]compare:number:lteq[299]]" variable="ignore">
|
||||||
|
<!-- Download the dog -->
|
||||||
|
<$macrocall $name="download-dog" url={{{ [<data>jsonget[url]] }}}/>
|
||||||
|
</$list>
|
||||||
|
\end completion-get-json
|
||||||
|
|
||||||
|
<$action-sendmessage
|
||||||
|
$message="tm-http-request"
|
||||||
|
url="https://random.dog/woof.json"
|
||||||
|
method="GET"
|
||||||
|
oncompletion=<<completion-get-json>>
|
||||||
|
/>
|
||||||
|
\end get-random-dog
|
||||||
|
|
||||||
|
!! Random Dogs
|
||||||
|
|
||||||
|
This demo uses the API of the website https://random.dog/ to import a random dog image or video.
|
||||||
|
|
||||||
|
<$button actions=<<get-random-dog>>>
|
||||||
|
Import a random dog image or video
|
||||||
|
</$button>
|
||||||
|
|
||||||
|
<$list filter="[tag[$:/tags/RandomDog]limit[1]]" variable="ignore">
|
||||||
|
|
||||||
|
!! Imported Tiddlers
|
||||||
|
|
||||||
|
<$button>
|
||||||
|
<$action-deletetiddler $filter="[tag[$:/tags/RandomDog]]"/>
|
||||||
|
Delete all imported random dogs
|
||||||
|
</$button>
|
||||||
|
|
||||||
|
Export all imported random dogs: <$macrocall $name="exportButton" exportFilter="[tag[$:/tags/RandomDog]]" lingoBase="$:/language/Buttons/ExportTiddlers/"/>
|
||||||
|
|
||||||
|
</$list>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<$list filter="[tag[$:/tags/RandomDog]!sort[modified]]">
|
||||||
|
<li>
|
||||||
|
<$link>
|
||||||
|
<$text text=<<currentTiddler>>/>
|
||||||
|
</$link>
|
||||||
|
<div style="width:300px;height:300px;">
|
||||||
|
<$transclude $tiddler=<<currentTiddler>>/>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</$list>
|
||||||
|
</ol>
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
title: WidgetMessage: tm-http-request Example - Zotero
|
title: WidgetMessage: tm-http-request Example - Zotero
|
||||||
tags: $:/tags/Macro
|
tags: $:/tags/Global
|
||||||
|
|
||||||
\procedure select-zotero-group()
|
\procedure select-zotero-group()
|
||||||
Specify the Zotero group ID to import
|
Specify the Zotero group ID to import
|
||||||
<$edit-text tiddler="$:/config/zotero-group" tag="input"/> or
|
<$edit-text tiddler="$:/config/zotero-group" tag="input"/> or
|
||||||
<$select tiddler="$:/config/zotero-group">
|
<$select tiddler="$:/config/zotero-group">
|
||||||
<option value="4813312">com216</option>
|
<option value="4813312">com216</option>
|
||||||
<option value="4913310">pos252</option>
|
<option value="4914891">steve-sunypoly</option>
|
||||||
<option value="4747244">idt575</option>
|
<option value="4747244">idt575</option>
|
||||||
</$select>
|
</$select>
|
||||||
\end
|
\end
|
||||||
@@ -16,6 +16,7 @@ Specify the Zotero group ID to import
|
|||||||
$basetitle={{{ =[[_zotero_import ]] =[<item>jsonget[key]] =[[ ]] =[<item>jsonget[title]] +[join[]] }}}
|
$basetitle={{{ =[[_zotero_import ]] =[<item>jsonget[key]] =[[ ]] =[<item>jsonget[title]] +[join[]] }}}
|
||||||
text={{{ [<item>jsonget[title]] }}}
|
text={{{ [<item>jsonget[title]] }}}
|
||||||
tags="$:/tags/ZoteroImport"
|
tags="$:/tags/ZoteroImport"
|
||||||
|
zotero-group={{$:/config/zotero-group}}
|
||||||
>
|
>
|
||||||
<$action-setmultiplefields $tiddler=<<createTiddler-title>> $fields="[<item>jsonindexes[]addprefix[zotero-]]" $values="[<item>jsonindexes[]] :map[<item>jsonget<currentTiddler>else[.XXXXX.]]"/>
|
<$action-setmultiplefields $tiddler=<<createTiddler-title>> $fields="[<item>jsonindexes[]addprefix[zotero-]]" $values="[<item>jsonindexes[]] :map[<item>jsonget<currentTiddler>else[.XXXXX.]]"/>
|
||||||
<$list filter="[<item>jsonindexes[creators]]" variable="creatorIndex">
|
<$list filter="[<item>jsonindexes[creators]]" variable="creatorIndex">
|
||||||
@@ -33,7 +34,7 @@ Specify the Zotero group ID to import
|
|||||||
\procedure zotero-get-items(start:"0",limit:"25")
|
\procedure zotero-get-items(start:"0",limit:"25")
|
||||||
|
|
||||||
\procedure completion()
|
\procedure completion()
|
||||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
\import [subfilter{$:/core/config/GlobalImportFilter}]
|
||||||
<$action-log msg="In completion"/>
|
<$action-log msg="In completion"/>
|
||||||
<$action-log/>
|
<$action-log/>
|
||||||
<!-- Success -->
|
<!-- Success -->
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
caption: tm-http-request
|
caption: tm-http-request
|
||||||
created: 20230429161453032
|
created: 20230429161453032
|
||||||
modified: 20230429161453032
|
modified: 20230717104212742
|
||||||
tags: Messages
|
tags: Messages
|
||||||
title: WidgetMessage: tm-http-request
|
title: WidgetMessage: tm-http-request
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@@ -18,6 +18,7 @@ The following parameters are used:
|
|||||||
|!Name |!Description |
|
|!Name |!Description |
|
||||||
|method |HTTP method (eg "GET", "POST") |
|
|method |HTTP method (eg "GET", "POST") |
|
||||||
|body |String data to be sent with the request |
|
|body |String data to be sent with the request |
|
||||||
|
|binary |<<.from-version "5.3.1">> Set to "yes" to cause the response body to be treated as binary data and returned in base64 format |
|
||||||
|query-* |Query string parameters with string values |
|
|query-* |Query string parameters with string values |
|
||||||
|header-* |Headers with string values |
|
|header-* |Headers with string values |
|
||||||
|password-header-* |Headers with values taken from the password store |
|
|password-header-* |Headers with values taken from the password store |
|
||||||
@@ -49,3 +50,4 @@ Note that the state tiddler $:/state/http-requests contains a number representin
|
|||||||
!! Examples
|
!! Examples
|
||||||
|
|
||||||
* [[Zotero's|https://www.zotero.org/]] API for retrieving reference items: [[WidgetMessage: tm-http-request Example - Zotero]]
|
* [[Zotero's|https://www.zotero.org/]] API for retrieving reference items: [[WidgetMessage: tm-http-request Example - Zotero]]
|
||||||
|
* [[Random Dog's|https://random.dog/]] API for retrieving random pictures of dogs showing how to retrieve binary data: [[WidgetMessage: tm-http-request Example - Random Dogs]]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
created: 20220917112416666
|
created: 20220917112416666
|
||||||
modified: 20230419103154329
|
modified: 20230721064409436
|
||||||
tags: Concepts [[WikiText Parser Modes]]
|
tags: Concepts [[WikiText Parser Modes]]
|
||||||
title: Pragmas
|
title: Pragmas
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@@ -8,6 +8,8 @@ A <<.def pragma>> is a special component of WikiText that provides control over
|
|||||||
|
|
||||||
Pragmas occupy lines that start with `\`. They can only appear at the start of the text of a tiddler, but blank lines and comments are allowed between them. If a pragma appears in the main body of the text, it is treated as if it was ordinary text.
|
Pragmas occupy lines that start with `\`. They can only appear at the start of the text of a tiddler, but blank lines and comments are allowed between them. If a pragma appears in the main body of the text, it is treated as if it was ordinary text.
|
||||||
|
|
||||||
|
<<.from-version "5.2.6">> Pragmas can have preceding optional whitespace characters.
|
||||||
|
|
||||||
The following pragmas are available:
|
The following pragmas are available:
|
||||||
|
|
||||||
<<list-links "[tag[Pragmas]]">>
|
<<list-links "[tag[Pragmas]]">>
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ tags: About
|
|||||||
title: Releases
|
title: Releases
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
New releases of TiddlyWiki and TiddlyDesktop are announced via the [[official discussion groups|Forums]] and [[Twitter|https://twitter.com/TiddlyWiki]] (you can also subscribe to an Atom/RSS feed of [[TiddlyWiki releases from GitHub|https://github.com/jermolene/tiddlywiki5/releases.atom]])
|
New releases of TiddlyWiki and TiddlyDesktop are announced via the [[official discussion groups|Forums]] and [[Twitter|https://twitter.com/TiddlyWiki]]
|
||||||
|
|
||||||
<<tabs "[[TiddlyWiki Releases]] [[TiddlyDesktop Releases]]" "TiddlyWiki Releases" "$:/state/tab">>
|
<<tabs "[[TiddlyWiki Releases]] [[TiddlyDesktop Releases]]" "TiddlyWiki Releases" "$:/state/tab">>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ tags: Releases
|
|||||||
title: TiddlyWiki Releases
|
title: TiddlyWiki Releases
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
Here are the details of recent releases of TiddlyWiki5. See [[TiddlyWiki5 Versioning]] for details of how releases are named. Note that archived versions of release source files are available at https://github.com/Jermolene/TiddlyWiki5/releases
|
Here are the details of recent releases of TiddlyWiki5. See [[TiddlyWiki5 Versioning]] for details of how releases are named.
|
||||||
|
|
||||||
If you are using node.js, you can also install prior versions like this:
|
If you are using node.js, you can also install prior versions like this:
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
caption: tw5-server
|
caption: tw5server
|
||||||
color: #70c9a0
|
color: #70c9a0
|
||||||
community-author: hffqyd
|
community-author: hffqyd
|
||||||
created: 20230302011710789
|
created: 20230302011710789
|
||||||
@@ -10,27 +10,23 @@ tags: Android Chrome Firefox [[Internet Explorer]] Linux Mac Opera Safari Saving
|
|||||||
title: Saving via a Minimal Web Server
|
title: Saving via a Minimal Web Server
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
A local server for TiddlyWiki5 that saves and backups wikis, inspired by
|
A local mini binary server for TiddlyWiki5 that saves and backups wikis and uploads files for TiddlyWiki, inspired by
|
||||||
[[tw5-server.rb | https://gist.github.com/jimfoltz/ee791c1bdd30ce137bc23cce826096da]].
|
[[tw5-server.rb | https://gist.github.com/jimfoltz/ee791c1bdd30ce137bc23cce826096da]].
|
||||||
|
|
||||||
tw5-server provides features of:
|
tw5server provides features of:
|
||||||
|
|
||||||
* Server for TiddlyWiki5, as well as other files (e.g. images used in TW5 `[img[images/*.png]]`);
|
* Server for TiddlyWiki5, as well as other files (e.g. images used in TW5 `[img[images/*.png]]`);
|
||||||
* Easy to save wiki via browsers;
|
* Easy to save wiki via browsers;
|
||||||
* Backup wiki in compress format (.gz), to save disk space;
|
* Backup wiki in compress format (.gz), to save disk space;
|
||||||
* Auto clean backups: keep one newest per previous month, keep all backups in current month.
|
* Auto clean backups: keep one newest per previous month, keep all backups in current month.
|
||||||
* Upload files/images to server, for use in tiddlywiki as external links.
|
* Upload files/images to server via pressing button or drag-and-drop, for use in tiddlywiki as external links.
|
||||||
* Offer binary executable for Linux, macos and windows.
|
* Offer binary executable for Linux, macos, Android and windows.
|
||||||
|
|
||||||
Download executable script and binary at the github.com [[tw5-server|https://github.com/hffqyd/tw5-server]].
|
Download executable binary at the github.com [[tw5-server|https://github.com/hffqyd/tw5-server]].
|
||||||
|
|
||||||
! Usage
|
! Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# python script:
|
|
||||||
python tw5-server.py -p 8000 -d ./ -b backup_dir
|
|
||||||
|
|
||||||
# binary file:
|
|
||||||
tw5server -a:192.168.0.10 -p:8000 -d:./ -b:backup
|
tw5server -a:192.168.0.10 -p:8000 -d:./ -b:backup
|
||||||
|
|
||||||
-h usage help
|
-h usage help
|
||||||
@@ -44,6 +40,7 @@ Backups auto-clean strategy:
|
|||||||
Keep all backups in current month, keep only the newest one for previous months.
|
Keep all backups in current month, keep only the newest one for previous months.
|
||||||
```
|
```
|
||||||
|
|
||||||
In Unix/Linux, just excute `./tw5-server.py` (with `chmod +x tw5-server.py`).
|
In Unix/Linux, maybe first `chmod +x tw5server`), then run it.
|
||||||
|
For Android version, run it in Termux, or some other terminals.
|
||||||
|
|
||||||
Then go to http://localhost:8000 (or other address:port specified in command) in your web browser, and click on your wiki html file.
|
Then go to http://localhost:8000 (or other address:port specified in command) in your web browser, and click on your wiki html file.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
caption: scrollable
|
caption: scrollable
|
||||||
created: 20140324223413403
|
created: 20140324223413403
|
||||||
modified: 20220620115347910
|
modified: 20230731100903977
|
||||||
tags: Widgets
|
tags: Widgets
|
||||||
title: ScrollableWidget
|
title: ScrollableWidget
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@@ -16,12 +16,15 @@ The content of the `<$scrollable>` widget is displayed within a pair of wrapper
|
|||||||
|!Attribute |!Description |
|
|!Attribute |!Description |
|
||||||
|class |The CSS class(es) to be applied to the outer DIV |
|
|class |The CSS class(es) to be applied to the outer DIV |
|
||||||
|fallthrough |See below |
|
|fallthrough |See below |
|
||||||
|
|bind |<<.from-version "5.3.2">> Optional title of tiddler to which the scroll position should be bound |
|
||||||
|
|
||||||
|
Binding the scroll position to a tiddler automatically copies the scroll coordinates into the `scroll-left` and `scroll-top` fields as scrolling occurs. Conversely, setting those field values will automatically cause the scrollable to scroll if it can.
|
||||||
|
|
||||||
<$macrocall $name=".note" _="""If a scrollable widget can't handle the `tm-scroll` message because the inner DIV fits within the outer DIV, then by default the message falls through to the parent widget. Setting the ''fallthrough'' attribute to `no` prevents this behaviour."""/>
|
<$macrocall $name=".note" _="""If a scrollable widget can't handle the `tm-scroll` message because the inner DIV fits within the outer DIV, then by default the message falls through to the parent widget. Setting the ''fallthrough'' attribute to `no` prevents this behaviour."""/>
|
||||||
|
|
||||||
! Examples
|
! Examples
|
||||||
|
|
||||||
This example requires the following CSS definitions from [[$:/_tw5.com-styles]]:
|
These examples require the following CSS definitions from [[$:/_tw5.com-styles]]:
|
||||||
|
|
||||||
```
|
```
|
||||||
.tc-scrollable-demo {
|
.tc-scrollable-demo {
|
||||||
@@ -33,6 +36,8 @@ This example requires the following CSS definitions from [[$:/_tw5.com-styles]]:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
!! Simple Usage
|
||||||
|
|
||||||
This wiki text shows how to display a list within the scrollable widget:
|
This wiki text shows how to display a list within the scrollable widget:
|
||||||
|
|
||||||
<<wikitext-example-without-html "<$scrollable class='tc-scrollable-demo'>
|
<<wikitext-example-without-html "<$scrollable class='tc-scrollable-demo'>
|
||||||
@@ -46,3 +51,23 @@ This wiki text shows how to display a list within the scrollable widget:
|
|||||||
</$scrollable>
|
</$scrollable>
|
||||||
">>
|
">>
|
||||||
|
|
||||||
|
!! Binding scroll position to a tiddler
|
||||||
|
|
||||||
|
[[Current scroll position|$:/my-scroll-position]]: {{$:/my-scroll-position!!scroll-left}}, {{$:/my-scroll-position!!scroll-top}}
|
||||||
|
|
||||||
|
<$button>
|
||||||
|
<$action-setfield $tiddler="$:/my-scroll-position" scroll-left="100" scroll-top="100"/>
|
||||||
|
Set current scroll position to 100,100
|
||||||
|
</$button>
|
||||||
|
|
||||||
|
<<wikitext-example-without-html "<$scrollable class='tc-scrollable-demo' bind='$:/my-scroll-position'>
|
||||||
|
<$list filter='[tag[Reference]]'>
|
||||||
|
|
||||||
|
<$view field='title'/>: <$list filter='[all[current]links[]sort[title]]' storyview='pop'>
|
||||||
|
<$link><$view field='title'/></$link>
|
||||||
|
</$list>
|
||||||
|
|
||||||
|
</$list>
|
||||||
|
</$scrollable>
|
||||||
|
">>
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ The content of the `<$select>` widget should be one or more HTML `<option>` or `
|
|||||||
|size |The number of rows to display in multiple selection mode |
|
|size |The number of rows to display in multiple selection mode |
|
||||||
|actions |A string containing ActionWidgets to be triggered when the key combination is detected |
|
|actions |A string containing ActionWidgets to be triggered when the key combination is detected |
|
||||||
|focus |<<.from-version "5.2.4">> Optional. Set to "yes" to automatically focus the HTML select element after creation |
|
|focus |<<.from-version "5.2.4">> Optional. Set to "yes" to automatically focus the HTML select element after creation |
|
||||||
|
|tabindex |<<.from-version "5.3.1">> Optional. Sets the `tabindex` attribute of the HTML select element to the given value |
|
||||||
! Examples
|
! Examples
|
||||||
|
|
||||||
!! Simple Lists
|
!! Simple Lists
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ That's it.
|
|||||||
<a id="#Bottom_of_tiddler"></a>
|
<a id="#Bottom_of_tiddler"></a>
|
||||||
```
|
```
|
||||||
|
|
||||||
*Add an <<.attr id>> attribute to any HTML5 tag and place a single `#` before the 'address' value. <a href="##Suggestions%0">Here are some suggestions of tags you can use.</a>
|
*Add an <<.attr id>> attribute to any HTML5 tag and place a single `#` before the 'address' value. <a href=<<qualify "##Suggestions-for-elements">>>Here are some suggestions of tags you can use.</a>
|
||||||
* Place this code at the target location. E.g. at the bottom of the tiddler.
|
* Place this code at the target location. E.g. at the bottom of the tiddler.
|
||||||
|
|
||||||
''Step 2: Create a link to the target anchor''
|
''Step 2: Create a link to the target anchor''
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Attributes of HTML elements and widgets can be specified in several different wa
|
|||||||
|
|
||||||
* [[a literal string|Literal Attribute Values]]
|
* [[a literal string|Literal Attribute Values]]
|
||||||
* [[a transclusion of a textReference|Transcluded Attribute Values]]
|
* [[a transclusion of a textReference|Transcluded Attribute Values]]
|
||||||
* [[a transclusion of a macro/variable|Transcluded Attribute Values]]
|
* [[a transclusion of a macro/variable|Variable Attribute Values]]
|
||||||
* [[as the result of a filter expression|Filtered Attribute Values]]
|
* [[as the result of a filter expression|Filtered Attribute Values]]
|
||||||
* <<.from-version "5.3.0">> [[as the result of performing filter and variable substitutions on the given string|Substituted Attribute Values]]
|
* <<.from-version "5.3.0">> [[as the result of performing filter and variable substitutions on the given string|Substituted Attribute Values]]
|
||||||
|
|
||||||
|
|||||||
@@ -4,16 +4,29 @@ description: Zapisuje wiki do nowego folderu
|
|||||||
<<.from-version "5.1.20">> Zapisuje obecną wiki do nowego folderu wliczając tiddlery, wtyczki i konfigurację:
|
<<.from-version "5.1.20">> Zapisuje obecną wiki do nowego folderu wliczając tiddlery, wtyczki i konfigurację:
|
||||||
|
|
||||||
```
|
```
|
||||||
--savewikifolder <wikifolderpath> [<filter>]
|
--savewikifolder <wikifolderpath> [<filter>] [ [<name>=<value>] ]
|
||||||
```
|
```
|
||||||
|
|
||||||
* Docelowy folder musi być pusty lub nieistnieć
|
* Docelowy folder musi być pusty lub nie istnieć
|
||||||
* `filter` określa które tiddlery będą skopiowane, domyślnie to `[all[tiddlers]]`
|
* Argument `filter` określa które tiddlery będą skopiowane, domyślnie to `[all[tiddlers]]`
|
||||||
* Wtyczki z oficjalnej biblioteki wtyczek są zamieniane na odnośniki do tych wtyczek w pliku `tiddlywiki.info`
|
* Wtyczki z oficjalnej biblioteki wtyczek są zamieniane na odnośniki do tych wtyczek w pliku `tiddlywiki.info`
|
||||||
* Własne wtyczki zostają wypakowane do osobnych folderów
|
* Własne wtyczki zostają wypakowane do osobnych folderów
|
||||||
|
|
||||||
|
Wspierane argumenty:
|
||||||
|
|
||||||
|
* ''filter'': wyrażenie filtra określające które tiddlery mają być uwzględnione w zapisanej wiki
|
||||||
|
* ''explodePlugins'': domyślna wartość to `yes`:
|
||||||
|
** `yes` rozdzieli wtyczki na osobne pliki tiddlerów i zapisze je do podfolderu z wtyczkami
|
||||||
|
** `no` każda wtyczka będzie zapisana jako jeden zbiorczy plik w formacie JSON w folderze z tiddlerami
|
||||||
|
|
||||||
Typowe zastosowanie to konwersja pliku TiddlyWiki w formie pliku HTML do formatu folderu:
|
Typowe zastosowanie to konwersja pliku TiddlyWiki w formie pliku HTML do formatu folderu:
|
||||||
|
|
||||||
```
|
```
|
||||||
tiddlywiki --load ./mywiki.html --savewikifolder ./mywikifolder
|
tiddlywiki --load ./mojawiki.html --savewikifolder ./folderwiki
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Zapisanie wtyczek jako zwykłych tiddlerów:
|
||||||
|
|
||||||
|
```
|
||||||
|
tiddlywiki --load ./mojawiki.html --savewikifolder ./folderwiki explodePlugins=no
|
||||||
|
```
|
||||||
@@ -15,7 +15,11 @@ description: 将维基保存到一个新的维基文件夹
|
|||||||
支持以下选项:
|
支持以下选项:
|
||||||
|
|
||||||
* ''filter'':定义要包含在输出中的条目的筛选器操作符。
|
* ''filter'':定义要包含在输出中的条目的筛选器操作符。
|
||||||
* ''explodePlugins'':设置为 "no" 以将插件保存到目标维基文件夹的 tiddlers 目录中,以抑制破坏插件到其组成的影子条目中(默认为 "yes")。
|
* ''explodePlugins'': 默认为 "yes"
|
||||||
|
** ''yes'' 将 "分解" 插件为单独的条目文件,并将其保存到维基文件夹内的插件目录中
|
||||||
|
** ''no'' 将抑制分解插件到其组成的条目文件中。它将把插件保存为 tiddlers 文件夹中的单个 JSON 条目
|
||||||
|
|
||||||
|
请注意,两个 ''explodePlugins'' 选项都会生成构建完全相同的原始维基的维基文件夹。区别在于插件在维基文件夹中的表示方式。
|
||||||
|
|
||||||
常见的用法是将一个 TiddlyWiki HTML 文件转换成维基文件夹:
|
常见的用法是将一个 TiddlyWiki HTML 文件转换成维基文件夹:
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,11 @@ description: 將維基儲存到一個新的維基資料夾
|
|||||||
支援以下選項:
|
支援以下選項:
|
||||||
|
|
||||||
* ''filter'':定義要包含在輸出中的條目的篩選器運算子。
|
* ''filter'':定義要包含在輸出中的條目的篩選器運算子。
|
||||||
* ''explodePlugins'':設定為 "no" 以將插件儲存到目標維基資料夾的 tiddlers 目錄中,以抑制破壞插件到其組成的影子條目中(預設為 "yes")。
|
* ''explodePlugins'': 預設為 "yes"
|
||||||
|
** ''yes'' 將 "分解" 插件為單獨的條目檔案,並將其儲存到維基資料夾內的插件目錄中
|
||||||
|
** ''no'' 將抑制分解插件到其組成的條目檔案中。它將把插件儲存為 tiddlers 資料夾中的單個 JSON 條目
|
||||||
|
|
||||||
|
請注意,兩個 ''explodePlugins'' 選項都會產生構建完全相同的原始維基的維基資料夾。區別在於插件在維基資料夾中的表示方式。
|
||||||
|
|
||||||
常見的用法是將一個 TiddlyWiki HTML 檔案轉換成維基資料夾:
|
常見的用法是將一個 TiddlyWiki HTML 檔案轉換成維基資料夾:
|
||||||
|
|
||||||
|
|||||||
@@ -537,3 +537,5 @@ Tavin Cole, @tavin, 2023/05/25
|
|||||||
WhiteFall, @Zacharia2, 2023/06/04
|
WhiteFall, @Zacharia2, 2023/06/04
|
||||||
|
|
||||||
@oeyoews, 2023/06/30
|
@oeyoews, 2023/06/30
|
||||||
|
|
||||||
|
@catter-fly, 2023/07/27
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "tiddlywiki",
|
"name": "tiddlywiki",
|
||||||
"preferGlobal": "true",
|
"preferGlobal": "true",
|
||||||
"version": "5.3.0",
|
"version": "5.3.1-prerelease",
|
||||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||||
"description": "a non-linear personal web notebook",
|
"description": "a non-linear personal web notebook",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ title: $:/plugins/tiddlywiki/googleanalytics/googleanalytics.js
|
|||||||
type: application/javascript
|
type: application/javascript
|
||||||
module-type: startup
|
module-type: startup
|
||||||
|
|
||||||
Runs Google Analytics with the account number in the tiddler `$:/GoogleAnalyticsAccount` and the domain name in `$:/GoogleAnalyticsDomain`
|
Runs Google Analytics with the measurement ID in the tiddler `$:/GoogleAnalyticsMeasurementID`
|
||||||
|
|
||||||
\*/
|
\*/
|
||||||
(function(){
|
(function(){
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
title: $:/plugins/tiddlywiki/googleanalytics/settings
|
title: $:/plugins/tiddlywiki/googleanalytics/settings
|
||||||
|
|
||||||
You have only two value to set, only the first is mandatory:
|
''[[Google Analytics Measurement ID|$:/GoogleAnalyticsMeasurementID]]'': (mandatory) a code of the form `G-XXXXXXXXXX` where X are digits or uppercase letters<br/><$edit-text tiddler="$:/GoogleAnalyticsMeasurementID" default="" tag="input"/>
|
||||||
|
|
||||||
# ''[[Google Analytics Measurement ID|$:/GoogleAnalyticsMeasurementID]]'': (mandatory) a code of the form `G-XXXXXXXXXX` where X are digits or uppercase letters<br/><$edit-text tiddler="$:/GoogleAnalyticsMeasurementID" default="" tag="input"/>
|
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,12 @@ exports.runTests = function(callback,specFilter) {
|
|||||||
if($tw.browser) {
|
if($tw.browser) {
|
||||||
window.jasmineRequire = jasmineCore;
|
window.jasmineRequire = jasmineCore;
|
||||||
$tw.modules.execute("$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine-html.js");
|
$tw.modules.execute("$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/jasmine-html.js");
|
||||||
|
// Prevent jasmine-core/boot.js from installing its own onload handler. We'll execute it explicitly when everything is ready
|
||||||
|
var previousOnloadHandler = window.onload;
|
||||||
|
window.onload = function() {};
|
||||||
$tw.modules.execute("$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/boot.js");
|
$tw.modules.execute("$:/plugins/tiddlywiki/jasmine/jasmine-core/jasmine-core/boot.js");
|
||||||
|
var jasmineOnloadHandler = window.onload;
|
||||||
|
window.onload = function() {};
|
||||||
jasmine = window.jasmine;
|
jasmine = window.jasmine;
|
||||||
} else {
|
} else {
|
||||||
// Add missing properties to `jasmineCore` in order to call the Jasmine
|
// Add missing properties to `jasmineCore` in order to call the Jasmine
|
||||||
@@ -144,9 +149,11 @@ exports.runTests = function(callback,specFilter) {
|
|||||||
// Iterate through all the test modules
|
// Iterate through all the test modules
|
||||||
var tests = $tw.wiki.filterTiddlers(TEST_TIDDLER_FILTER);
|
var tests = $tw.wiki.filterTiddlers(TEST_TIDDLER_FILTER);
|
||||||
$tw.utils.each(tests,evalInContext);
|
$tw.utils.each(tests,evalInContext);
|
||||||
// In a browser environment, jasmine-core/boot.js calls `execute()` for us.
|
// In a browser environment, we use jasmine-core/boot.js to call `execute()` for us.
|
||||||
// In Node.js, we call it manually.
|
// In Node.js, we call it manually.
|
||||||
if(!$tw.browser) {
|
if($tw.browser) {
|
||||||
|
jasmineOnloadHandler();
|
||||||
|
} else {
|
||||||
nodeJasmineWrapper.execute(null,specFilter);
|
nodeJasmineWrapper.execute(null,specFilter);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ var jasmine = require("./jasmine-plugin.js");
|
|||||||
exports.name = "jasmine";
|
exports.name = "jasmine";
|
||||||
|
|
||||||
if($tw.browser) {
|
if($tw.browser) {
|
||||||
// Jasmine is run automatically on the browser, so always add it here.
|
|
||||||
exports.startup = jasmine.runTests;
|
exports.startup = jasmine.runTests;
|
||||||
|
exports.before = ["render"];
|
||||||
|
exports.after = ["story"];
|
||||||
} else {
|
} else {
|
||||||
// However, if we're on node.js, the tests are explciitly run with the
|
// However, if we're on node.js, the tests are explciitly run with the
|
||||||
// --test command. This didn't used to be the case, so if they're
|
// --test command. This didn't used to be the case, so if they're
|
||||||
|
|||||||
@@ -580,7 +580,7 @@ button svg, button img, label svg, label img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
button:disabled.tc-btn-invisible {
|
button:disabled.tc-btn-invisible {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
color: <<colour muted-foreground>>;
|
color: <<colour muted-foreground>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1172,6 +1172,11 @@ button.tc-btn-invisible.tc-remove-tag-button {
|
|||||||
margin-right: .1em;
|
margin-right: .1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tc-tiddler-title-icon svg {
|
||||||
|
width: 0.9em;
|
||||||
|
height: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
.tc-system-title-prefix {
|
.tc-system-title-prefix {
|
||||||
color: <<colour muted-foreground>>;
|
color: <<colour muted-foreground>>;
|
||||||
}
|
}
|
||||||
@@ -2774,15 +2779,11 @@ input.tc-palette-manager-colour-input {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tc-table-of-contents button {
|
.tc-table-of-contents button,
|
||||||
|
.tc-table-of-contents .toc-item-muted {
|
||||||
color: <<colour sidebar-foreground>>;
|
color: <<colour sidebar-foreground>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
button + .tc-toc-caption,
|
|
||||||
button > .tc-toc-caption{
|
|
||||||
margin-left: .25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tc-table-of-contents svg {
|
.tc-table-of-contents svg {
|
||||||
width: 0.7em;
|
width: 0.7em;
|
||||||
height: 0.7em;
|
height: 0.7em;
|
||||||
|
|||||||
Reference in New Issue
Block a user