mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-02-17 15:39:50 +00:00
Compare commits
17 Commits
tm-save-do
...
debugging-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d14826032 | ||
|
|
909149a347 | ||
|
|
a2543cfd4a | ||
|
|
b713d13c5a | ||
|
|
bb05bd8817 | ||
|
|
42a908e1c9 | ||
|
|
70689a6de4 | ||
|
|
64ee20edd2 | ||
|
|
0177f09823 | ||
|
|
643cabf9c8 | ||
|
|
5cf3fcd843 | ||
|
|
67f13c585d | ||
|
|
1bbb7fd53b | ||
|
|
599933c34d | ||
|
|
b1ccb82e0a | ||
|
|
ea648c7d15 | ||
|
|
a3a4e91751 |
@@ -10,6 +10,10 @@ Advanced/ShadowInfo/Shadow/Hint: The tiddler <$link to=<<infoTiddler>>><$text te
|
||||
Advanced/ShadowInfo/Shadow/Source: It is defined in the plugin <$link to=<<pluginTiddler>>><$text text=<<pluginTiddler>>/></$link>
|
||||
Advanced/ShadowInfo/OverriddenShadow/Hint: It is overridden by an ordinary tiddler
|
||||
Advanced/CascadeInfo/Heading: Cascade Details
|
||||
Advanced/CascadeInfo/Hint: These are the view template segments (tagged <<tag "$:/tags/ViewTemplate">>) using a cascade filter and their resulting template for the current tiddler.
|
||||
Advanced/CascadeInfo/Detail/View: View
|
||||
Advanced/CascadeInfo/Detail/ActiveCascadeFilter: Active cascade filter
|
||||
Advanced/CascadeInfo/Detail/Template: Template
|
||||
Fields/Caption: Fields
|
||||
List/Caption: List
|
||||
List/Empty: This tiddler does not have a list
|
||||
|
||||
116
core/modules/background-actions.js
Normal file
116
core/modules/background-actions.js
Normal file
@@ -0,0 +1,116 @@
|
||||
/*\
|
||||
title: $:/core/modules/background-actions.js
|
||||
type: application/javascript
|
||||
module-type: global
|
||||
|
||||
Class to dispatch actions when filters change
|
||||
|
||||
\*/
|
||||
|
||||
"use strict";
|
||||
|
||||
class BackgroundActionDispatcher {
|
||||
constructor(filterTracker, wiki) {
|
||||
this.filterTracker = filterTracker;
|
||||
this.wiki = wiki;
|
||||
this.nextTrackedFilterId = 1;
|
||||
this.trackedFilters = new Map(); // Use Map for better key management
|
||||
// Track the filter for the background actions
|
||||
this.filterTracker.track({
|
||||
filterString: "[all[tiddlers+shadows]tag[$:/tags/BackgroundAction]!is[draft]]",
|
||||
fnEnter: title => this.trackFilter(title),
|
||||
fnLeave: (title, enterValue) => this.untrackFilter(enterValue),
|
||||
fnChange: (title, enterValue) => {
|
||||
this.untrackFilter(enterValue);
|
||||
return this.trackFilter(title);
|
||||
},
|
||||
fnProcess: changes => this.process(changes)
|
||||
});
|
||||
}
|
||||
|
||||
trackFilter(title) {
|
||||
const tiddler = this.wiki.getTiddler(title);
|
||||
const id = this.nextTrackedFilterId++;
|
||||
const tracker = new BackgroundActionTracker({
|
||||
wiki: this.wiki,
|
||||
title,
|
||||
trackFilter: tiddler.fields["track-filter"],
|
||||
actions: tiddler.fields.text
|
||||
});
|
||||
this.trackedFilters.set(id, tracker);
|
||||
return id;
|
||||
}
|
||||
|
||||
untrackFilter(enterValue) {
|
||||
const tracker = this.trackedFilters.get(enterValue);
|
||||
if(tracker) {
|
||||
tracker.destroy();
|
||||
}
|
||||
this.trackedFilters.delete(enterValue);
|
||||
}
|
||||
|
||||
process(changes) {
|
||||
for(const tracker of this.trackedFilters.values()) {
|
||||
tracker.process(changes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Represents an individual tracked filter. Options include:
|
||||
wiki: wiki to use
|
||||
title: title of the tiddler being tracked
|
||||
trackFilter: filter string to track changes
|
||||
actions: actions to be executed when the filter changes
|
||||
*/
|
||||
class BackgroundActionTracker {
|
||||
constructor({wiki, title, trackFilter, actions}) {
|
||||
this.wiki = wiki;
|
||||
this.title = title;
|
||||
this.trackFilter = trackFilter;
|
||||
this.actions = actions;
|
||||
this.filterTracker = new $tw.FilterTracker(this.wiki);
|
||||
this.hasChanged = false;
|
||||
this.trackerID = this.filterTracker.track({
|
||||
filterString: this.trackFilter,
|
||||
fnEnter: () => { this.hasChanged = true; },
|
||||
fnLeave: () => { this.hasChanged = true; },
|
||||
fnProcess: changes => {
|
||||
if(this.hasChanged) {
|
||||
this.hasChanged = false;
|
||||
console.log("Processing background action", this.title);
|
||||
const tiddler = this.wiki.getTiddler(this.title);
|
||||
let doActions = true;
|
||||
if(tiddler && tiddler.fields.platforms) {
|
||||
doActions = false;
|
||||
const platforms = $tw.utils.parseStringArray(tiddler.fields.platforms);
|
||||
if(($tw.browser && platforms.includes("browser")) || ($tw.node && platforms.includes("node"))) {
|
||||
doActions = true;
|
||||
}
|
||||
}
|
||||
if(doActions) {
|
||||
this.wiki.invokeActionString(
|
||||
this.actions,
|
||||
null,
|
||||
{
|
||||
currentTiddler: this.title
|
||||
},{
|
||||
parentWidget: $tw.rootWidget
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
process(changes) {
|
||||
this.filterTracker.handleChangeEvent(changes);
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.filterTracker.untrack(this.trackerID);
|
||||
}
|
||||
}
|
||||
|
||||
exports.BackgroundActionDispatcher = BackgroundActionDispatcher;
|
||||
106
core/modules/filter-tracker.js
Normal file
106
core/modules/filter-tracker.js
Normal file
@@ -0,0 +1,106 @@
|
||||
/*\
|
||||
title: $:/core/modules/filter-tracker.js
|
||||
type: application/javascript
|
||||
module-type: global
|
||||
|
||||
Class to track the results of a filter string
|
||||
|
||||
\*/
|
||||
|
||||
"use strict";
|
||||
|
||||
class FilterTracker {
|
||||
constructor(wiki) {
|
||||
this.wiki = wiki;
|
||||
this.trackers = new Map();
|
||||
this.nextTrackerId = 1;
|
||||
}
|
||||
|
||||
handleChangeEvent(changes) {
|
||||
this.processTrackers();
|
||||
this.processChanges(changes);
|
||||
}
|
||||
|
||||
/*
|
||||
Add a tracker to the filter tracker. Returns null if any of the parameters are invalid, or a tracker id if the tracker was added successfully. Options include:
|
||||
filterString: the filter string to track
|
||||
fnEnter: function to call when a title enters the filter results. Called even if the tiddler does not actually exist. Called as (title), and should return a truthy value that is stored in the tracker as the "enterValue"
|
||||
fnLeave: function to call when a title leaves the filter results. Called as (title,enterValue)
|
||||
fnChange: function to call when a tiddler changes in the filter results. Only called for filter results that identify a tiddler or shadow tiddler. Called as (title,enterValue), and may optionally return a replacement enterValue
|
||||
fnProcess: function to call each time the tracker is processed, after any enter, leave or change functions are called. Called as (changes)
|
||||
*/
|
||||
track(options = {}) {
|
||||
const {
|
||||
filterString,
|
||||
fnEnter,
|
||||
fnLeave,
|
||||
fnChange,
|
||||
fnProcess
|
||||
} = options;
|
||||
const id = this.nextTrackerId++;
|
||||
const tracker = {
|
||||
id,
|
||||
filterString,
|
||||
fnEnter,
|
||||
fnLeave,
|
||||
fnChange,
|
||||
fnProcess,
|
||||
previousResults: [],
|
||||
resultValues: {}
|
||||
};
|
||||
this.trackers.set(id, tracker);
|
||||
// Process the tracker
|
||||
this.processTracker(id);
|
||||
return id;
|
||||
}
|
||||
|
||||
untrack(id) {
|
||||
this.trackers.delete(id);
|
||||
}
|
||||
|
||||
processTrackers() {
|
||||
for(const id of this.trackers.keys()) {
|
||||
this.processTracker(id);
|
||||
}
|
||||
}
|
||||
|
||||
processTracker(id) {
|
||||
const tracker = this.trackers.get(id);
|
||||
if(!tracker) return;
|
||||
const results = [];
|
||||
// Evaluate the filter and remove duplicate results
|
||||
$tw.utils.each(this.wiki.filterTiddlers(tracker.filterString), title => {
|
||||
$tw.utils.pushTop(results, title);
|
||||
});
|
||||
// Process the newly entered results
|
||||
results.forEach(title => {
|
||||
if(!tracker.previousResults.includes(title) && !tracker.resultValues[title] && tracker.fnEnter) {
|
||||
tracker.resultValues[title] = tracker.fnEnter(title) || true;
|
||||
}
|
||||
});
|
||||
// Process the results that have just left
|
||||
tracker.previousResults.forEach(title => {
|
||||
if(!results.includes(title) && tracker.resultValues[title] && tracker.fnLeave) {
|
||||
tracker.fnLeave(title, tracker.resultValues[title]);
|
||||
delete tracker.resultValues[title];
|
||||
}
|
||||
});
|
||||
// Update the previous results
|
||||
tracker.previousResults = results;
|
||||
}
|
||||
|
||||
processChanges(changes) {
|
||||
for(const tracker of this.trackers.values()) {
|
||||
Object.keys(changes).forEach(title => {
|
||||
if(title && tracker.previousResults.includes(title) && tracker.fnChange) {
|
||||
tracker.resultValues[title] = tracker.fnChange(title, tracker.resultValues[title]) || tracker.resultValues[title];
|
||||
}
|
||||
});
|
||||
if(tracker.fnProcess) {
|
||||
tracker.fnProcess(changes);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.FilterTracker = FilterTracker;
|
||||
67
core/modules/info/mediaquerytracker.js
Normal file
67
core/modules/info/mediaquerytracker.js
Normal file
@@ -0,0 +1,67 @@
|
||||
/*\
|
||||
title: $:/core/modules/info/mediaquerytracker.js
|
||||
type: application/javascript
|
||||
module-type: info
|
||||
|
||||
Initialise $:/info/ tiddlers derived from media queries via
|
||||
|
||||
\*/
|
||||
|
||||
"use strict";
|
||||
|
||||
exports.getInfoTiddlerFields = function(updateInfoTiddlersCallback) {
|
||||
if($tw.browser) {
|
||||
// Functions to start and stop tracking a particular media query tracker tiddler
|
||||
function track(title) {
|
||||
var result = {},
|
||||
tiddler = $tw.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
var mediaQuery = tiddler.fields["media-query"],
|
||||
infoTiddler = tiddler.fields["info-tiddler"],
|
||||
infoTiddlerAlt = tiddler.fields["info-tiddler-alt"];
|
||||
if(mediaQuery && infoTiddler) {
|
||||
// Evaluate and track the media query
|
||||
result.mqList = window.matchMedia(mediaQuery);
|
||||
function getResultTiddlers() {
|
||||
var value = result.mqList.matches ? "yes" : "no",
|
||||
tiddlers = [];
|
||||
tiddlers.push({title: infoTiddler, text: value});
|
||||
if(infoTiddlerAlt) {
|
||||
tiddlers.push({title: infoTiddlerAlt, text: value});
|
||||
}
|
||||
return tiddlers;
|
||||
};
|
||||
updateInfoTiddlersCallback(getResultTiddlers());
|
||||
result.handler = function(event) {
|
||||
updateInfoTiddlersCallback(getResultTiddlers());
|
||||
};
|
||||
result.mqList.addEventListener("change",result.handler);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function untrack(enterValue) {
|
||||
if(enterValue.mqList && enterValue.handler) {
|
||||
enterValue.mqList.removeEventListener("change",enterValue.handler);
|
||||
}
|
||||
}
|
||||
// Track media query tracker tiddlers
|
||||
function fnEnter(title) {
|
||||
return track(title);
|
||||
}
|
||||
function fnLeave(title,enterValue) {
|
||||
untrack(enterValue);
|
||||
}
|
||||
function fnChange(title,enterValue) {
|
||||
untrack(enterValue);
|
||||
return track(title);
|
||||
}
|
||||
$tw.filterTracker.track({
|
||||
filterString: "[all[tiddlers+shadows]tag[$:/tags/MediaQueryTracker]!is[draft]]",
|
||||
fnEnter: fnEnter,
|
||||
fnLeave: fnLeave,
|
||||
fnChange: fnChange
|
||||
});
|
||||
}
|
||||
return [];
|
||||
};
|
||||
@@ -33,13 +33,6 @@ exports.getInfoTiddlerFields = function(updateInfoTiddlersCallback) {
|
||||
// Screen size
|
||||
infoTiddlerFields.push({title: "$:/info/browser/screen/width", text: window.screen.width.toString()});
|
||||
infoTiddlerFields.push({title: "$:/info/browser/screen/height", text: window.screen.height.toString()});
|
||||
// Dark mode through event listener on MediaQueryList
|
||||
var mqList = window.matchMedia("(prefers-color-scheme: dark)"),
|
||||
getDarkModeTiddler = function() {return {title: "$:/info/darkmode", text: mqList.matches ? "yes" : "no"};};
|
||||
infoTiddlerFields.push(getDarkModeTiddler());
|
||||
mqList.addListener(function(event) {
|
||||
updateInfoTiddlersCallback([getDarkModeTiddler()]);
|
||||
});
|
||||
// Language
|
||||
infoTiddlerFields.push({title: "$:/info/browser/language", text: navigator.language || ""});
|
||||
}
|
||||
|
||||
@@ -143,7 +143,14 @@ exports.parseParameterDefinition = function(paramString,options) {
|
||||
var paramInfo = {name: paramMatch[1]},
|
||||
defaultValue = paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5];
|
||||
if(defaultValue !== undefined) {
|
||||
paramInfo["default"] = defaultValue;
|
||||
// Check for an MVV reference ((varname))
|
||||
var mvvDefaultMatch = /^\(\(([^)|]+)\)\)$/.exec(defaultValue);
|
||||
if(mvvDefaultMatch) {
|
||||
paramInfo.defaultType = "multivalue-variable";
|
||||
paramInfo.defaultVariable = mvvDefaultMatch[1];
|
||||
} else {
|
||||
paramInfo["default"] = defaultValue;
|
||||
}
|
||||
}
|
||||
params.push(paramInfo);
|
||||
// Look for the next parameter
|
||||
@@ -247,6 +254,46 @@ exports.parseMacroInvocationAsTransclusion = function(source,pos) {
|
||||
return node;
|
||||
};
|
||||
|
||||
/*
|
||||
Look for an MVV (multi-valued variable) reference as a transclusion, i.e. ((varname)) or ((varname params))
|
||||
Returns null if not found, or a parse tree node of type "transclude" with isMVV: true
|
||||
*/
|
||||
exports.parseMVVReferenceAsTransclusion = function(source,pos) {
|
||||
var node = {
|
||||
type: "transclude",
|
||||
isMVV: true,
|
||||
start: pos,
|
||||
attributes: {},
|
||||
orderedAttributes: []
|
||||
};
|
||||
// Define our regexps
|
||||
var reVarName = /([^\s>"'=:)]+)/g;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for a double opening parenthesis
|
||||
var token = $tw.utils.parseTokenString(source,pos,"((");
|
||||
if(!token) {
|
||||
return null;
|
||||
}
|
||||
pos = token.end;
|
||||
// Get the variable name
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,reVarName);
|
||||
if(!token) {
|
||||
return null;
|
||||
}
|
||||
$tw.utils.addAttributeToParseTreeNode(node,"$variable",token.match[1]);
|
||||
pos = token.end;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for a double closing parenthesis
|
||||
token = $tw.utils.parseTokenString(source,pos,"))");
|
||||
if(!token) {
|
||||
return null;
|
||||
}
|
||||
node.end = token.end;
|
||||
return node;
|
||||
};
|
||||
|
||||
/*
|
||||
Parse macro parameters as attributes. Returns the position after the last attribute
|
||||
*/
|
||||
@@ -321,19 +368,20 @@ exports.parseMacroParameterAsAttribute = function(source,pos) {
|
||||
node.type = "indirect";
|
||||
node.textReference = indirectValue.match[1];
|
||||
} else {
|
||||
// Look for a unquoted value
|
||||
var unquotedValue = $tw.utils.parseTokenRegExp(source,pos,reUnquotedAttribute);
|
||||
if(unquotedValue) {
|
||||
pos = unquotedValue.end;
|
||||
node.type = "string";
|
||||
node.value = unquotedValue.match[1];
|
||||
// Look for a macro invocation value
|
||||
var macroInvocation = $tw.utils.parseMacroInvocationAsTransclusion(source,pos);
|
||||
if(macroInvocation && isNewStyleSeparator) {
|
||||
pos = macroInvocation.end;
|
||||
node.type = "macro";
|
||||
node.value = macroInvocation;
|
||||
} else {
|
||||
// Look for a macro invocation value
|
||||
var macroInvocation = $tw.utils.parseMacroInvocationAsTransclusion(source,pos);
|
||||
if(macroInvocation && isNewStyleSeparator) {
|
||||
pos = macroInvocation.end;
|
||||
// Look for an MVV reference value
|
||||
var mvvReference = $tw.utils.parseMVVReferenceAsTransclusion(source,pos);
|
||||
if(mvvReference && isNewStyleSeparator) {
|
||||
pos = mvvReference.end;
|
||||
node.type = "macro";
|
||||
node.value = macroInvocation;
|
||||
node.value = mvvReference;
|
||||
node.isMVV = true;
|
||||
} else {
|
||||
var substitutedValue = $tw.utils.parseTokenRegExp(source,pos,reSubstitutedValue);
|
||||
if(substitutedValue && isNewStyleSeparator) {
|
||||
@@ -341,6 +389,14 @@ exports.parseMacroParameterAsAttribute = function(source,pos) {
|
||||
node.type = "substituted";
|
||||
node.rawValue = substitutedValue.match[1] || substitutedValue.match[2];
|
||||
} else {
|
||||
// Look for a unquoted value
|
||||
var unquotedValue = $tw.utils.parseTokenRegExp(source,pos,reUnquotedAttribute);
|
||||
if(unquotedValue) {
|
||||
pos = unquotedValue.end;
|
||||
node.type = "string";
|
||||
node.value = unquotedValue.match[1];
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -471,19 +527,20 @@ exports.parseAttribute = function(source,pos) {
|
||||
node.type = "indirect";
|
||||
node.textReference = indirectValue.match[1];
|
||||
} else {
|
||||
// Look for a unquoted value
|
||||
var unquotedValue = $tw.utils.parseTokenRegExp(source,pos,reUnquotedAttribute);
|
||||
if(unquotedValue) {
|
||||
pos = unquotedValue.end;
|
||||
node.type = "string";
|
||||
node.value = unquotedValue.match[1];
|
||||
// Look for a macro invocation value
|
||||
var macroInvocation = $tw.utils.parseMacroInvocationAsTransclusion(source,pos);
|
||||
if(macroInvocation) {
|
||||
pos = macroInvocation.end;
|
||||
node.type = "macro";
|
||||
node.value = macroInvocation;
|
||||
} else {
|
||||
// Look for a macro invocation value
|
||||
var macroInvocation = $tw.utils.parseMacroInvocationAsTransclusion(source,pos);
|
||||
if(macroInvocation) {
|
||||
pos = macroInvocation.end;
|
||||
// Look for an MVV reference value
|
||||
var mvvReference = $tw.utils.parseMVVReferenceAsTransclusion(source,pos);
|
||||
if(mvvReference) {
|
||||
pos = mvvReference.end;
|
||||
node.type = "macro";
|
||||
node.value = macroInvocation;
|
||||
node.value = mvvReference;
|
||||
node.isMVV = true;
|
||||
} else {
|
||||
var substitutedValue = $tw.utils.parseTokenRegExp(source,pos,reSubstitutedValue);
|
||||
if(substitutedValue) {
|
||||
@@ -491,8 +548,16 @@ exports.parseAttribute = function(source,pos) {
|
||||
node.type = "substituted";
|
||||
node.rawValue = substitutedValue.match[1] || substitutedValue.match[2];
|
||||
} else {
|
||||
node.type = "string";
|
||||
node.value = "true";
|
||||
// Look for a unquoted value
|
||||
var unquotedValue = $tw.utils.parseTokenRegExp(source,pos,reUnquotedAttribute);
|
||||
if(unquotedValue) {
|
||||
pos = unquotedValue.end;
|
||||
node.type = "string";
|
||||
node.value = unquotedValue.match[1];
|
||||
} else {
|
||||
node.type = "string";
|
||||
node.value = "true";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ Instantiate parse rule
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
// 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;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
95
core/modules/parsers/wikiparser/rules/mvvdisplayinline.js
Normal file
95
core/modules/parsers/wikiparser/rules/mvvdisplayinline.js
Normal file
@@ -0,0 +1,95 @@
|
||||
/*\
|
||||
title: $:/core/modules/parsers/wikiparser/rules/mvvdisplayinline.js
|
||||
type: application/javascript
|
||||
module-type: wikirule
|
||||
|
||||
Wiki rule for inline display of multi-valued variables and filter results.
|
||||
|
||||
Variable display: ((varname)) or ((varname||separator))
|
||||
Filter display: (((filter))) or (((filter||separator)))
|
||||
|
||||
The default separator is ", " (comma space).
|
||||
|
||||
\*/
|
||||
|
||||
"use strict";
|
||||
|
||||
exports.name = "mvvdisplayinline";
|
||||
exports.types = {inline: true};
|
||||
|
||||
exports.init = function(parser) {
|
||||
this.parser = parser;
|
||||
};
|
||||
|
||||
exports.findNextMatch = function(startPos) {
|
||||
var source = this.parser.source;
|
||||
var nextStart = startPos;
|
||||
while((nextStart = source.indexOf("((",nextStart)) >= 0) {
|
||||
if(source.charAt(nextStart + 2) === "(") {
|
||||
// Filter mode: (((filter))) or (((filter||sep)))
|
||||
var match = /^\(\(\(([\s\S]+?)\)\)\)/.exec(source.substring(nextStart));
|
||||
if(match) {
|
||||
// Check for separator: split on last || before )))
|
||||
var inner = match[1];
|
||||
var sepIndex = inner.lastIndexOf("||");
|
||||
if(sepIndex >= 0) {
|
||||
this.nextMatch = {
|
||||
type: "filter",
|
||||
filter: inner.substring(0,sepIndex),
|
||||
separator: inner.substring(sepIndex + 2),
|
||||
start: nextStart,
|
||||
end: nextStart + match[0].length
|
||||
};
|
||||
} else {
|
||||
this.nextMatch = {
|
||||
type: "filter",
|
||||
filter: inner,
|
||||
separator: ", ",
|
||||
start: nextStart,
|
||||
end: nextStart + match[0].length
|
||||
};
|
||||
}
|
||||
return nextStart;
|
||||
}
|
||||
} else {
|
||||
// Variable mode: ((varname)) or ((varname||sep))
|
||||
var match = /^\(\(([^()|]+?)(?:\|\|([^)]*))?\)\)/.exec(source.substring(nextStart));
|
||||
if(match) {
|
||||
this.nextMatch = {
|
||||
type: "variable",
|
||||
varName: match[1],
|
||||
separator: match[2] !== undefined ? match[2] : ", ",
|
||||
start: nextStart,
|
||||
end: nextStart + match[0].length
|
||||
};
|
||||
return nextStart;
|
||||
}
|
||||
}
|
||||
nextStart += 2;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
/*
|
||||
Parse the most recent match
|
||||
*/
|
||||
exports.parse = function() {
|
||||
var match = this.nextMatch;
|
||||
this.nextMatch = null;
|
||||
this.parser.pos = match.end;
|
||||
var filter, sep = match.separator;
|
||||
if(match.type === "variable") {
|
||||
filter = "[(" + match.varName + ")join[" + sep + "]]";
|
||||
} else {
|
||||
filter = match.filter + " +[join[" + sep + "]]";
|
||||
}
|
||||
return [{
|
||||
type: "text",
|
||||
attributes: {
|
||||
text: {name: "text", type: "filtered", filter: filter}
|
||||
},
|
||||
orderedAttributes: [
|
||||
{name: "text", type: "filtered", filter: filter}
|
||||
]
|
||||
}];
|
||||
};
|
||||
@@ -13,6 +13,11 @@ Load core modules
|
||||
exports.name = "load-modules";
|
||||
exports.synchronous = true;
|
||||
|
||||
// Set to `true` to enable performance instrumentation
|
||||
var PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE = "$:/config/Performance/Instrumentation";
|
||||
|
||||
var widget = require("$:/core/modules/widgets/widget.js");
|
||||
|
||||
exports.startup = function() {
|
||||
// Load modules
|
||||
$tw.modules.applyMethods("utils",$tw.utils);
|
||||
@@ -31,6 +36,27 @@ exports.startup = function() {
|
||||
$tw.modules.applyMethods("tiddlerdeserializer",$tw.Wiki.tiddlerDeserializerModules);
|
||||
$tw.macros = $tw.modules.getModulesByTypeAsHashmap("macro");
|
||||
$tw.wiki.initParsers();
|
||||
// --------------------------
|
||||
// The rest of the startup process here is not strictly to do with loading modules, but are needed before other startup
|
||||
// modules are executed. It is easier to put them here than to introduce a new startup module
|
||||
// --------------------------
|
||||
// Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers
|
||||
$tw.rootWidget = new widget.widget({
|
||||
type: "widget",
|
||||
children: []
|
||||
},{
|
||||
wiki: $tw.wiki,
|
||||
document: $tw.browser ? document : $tw.fakeDocument
|
||||
});
|
||||
// Set up the performance framework
|
||||
$tw.perf = new $tw.Performance($tw.wiki.getTiddlerText(PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE,"no") === "yes");
|
||||
// Kick off the filter tracker
|
||||
$tw.filterTracker = new $tw.FilterTracker($tw.wiki);
|
||||
$tw.wiki.addEventListener("change",function(changes) {
|
||||
$tw.filterTracker.handleChangeEvent(changes);
|
||||
});
|
||||
// Kick off the background action dispatcher
|
||||
$tw.backgroundActionDispatcher = new $tw.BackgroundActionDispatcher($tw.filterTracker,$tw.wiki);
|
||||
if($tw.node) {
|
||||
$tw.Commander.initCommands();
|
||||
}
|
||||
|
||||
@@ -14,11 +14,6 @@ exports.name = "startup";
|
||||
exports.after = ["load-modules"];
|
||||
exports.synchronous = true;
|
||||
|
||||
// Set to `true` to enable performance instrumentation
|
||||
var PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE = "$:/config/Performance/Instrumentation";
|
||||
|
||||
var widget = require("$:/core/modules/widgets/widget.js");
|
||||
|
||||
exports.startup = function() {
|
||||
// Minimal browser detection
|
||||
if($tw.browser) {
|
||||
@@ -54,16 +49,6 @@ exports.startup = function() {
|
||||
}
|
||||
// Initialise version
|
||||
$tw.version = $tw.utils.extractVersionInfo();
|
||||
// Set up the performance framework
|
||||
$tw.perf = new $tw.Performance($tw.wiki.getTiddlerText(PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE,"no") === "yes");
|
||||
// Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers
|
||||
$tw.rootWidget = new widget.widget({
|
||||
type: "widget",
|
||||
children: []
|
||||
},{
|
||||
wiki: $tw.wiki,
|
||||
document: $tw.browser ? document : $tw.fakeDocument
|
||||
});
|
||||
// Kick off the language manager and switcher
|
||||
$tw.language = new $tw.Language();
|
||||
$tw.languageSwitcher = new $tw.PluginSwitcher({
|
||||
|
||||
@@ -86,7 +86,7 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) {
|
||||
classes.push(this.linkClasses);
|
||||
}
|
||||
} else if(this.overrideClasses !== "") {
|
||||
classes.push(this.overrideClasses)
|
||||
classes.push(this.overrideClasses);
|
||||
}
|
||||
if(classes.length > 0) {
|
||||
domNode.setAttribute("class",classes.join(" "));
|
||||
@@ -97,7 +97,7 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) {
|
||||
if(wikilinkTransformFilter) {
|
||||
// Use the filter to construct the href
|
||||
wikiLinkText = this.wiki.filterTiddlers(wikilinkTransformFilter,this,function(iterator) {
|
||||
iterator(self.wiki.getTiddler(self.to),self.to)
|
||||
iterator(self.wiki.getTiddler(self.to),self.to);
|
||||
})[0];
|
||||
} else {
|
||||
// Expand the tv-wikilink-template variable to construct the href
|
||||
@@ -121,12 +121,12 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) {
|
||||
var tooltipWikiText = this.tooltip || this.getVariable("tv-wikilink-tooltip");
|
||||
if(tooltipWikiText) {
|
||||
var tooltipText = this.wiki.renderText("text/plain","text/vnd.tiddlywiki",tooltipWikiText,{
|
||||
parseAsInline: true,
|
||||
variables: {
|
||||
currentTiddler: this.to
|
||||
},
|
||||
parentWidget: this
|
||||
});
|
||||
parseAsInline: true,
|
||||
variables: {
|
||||
currentTiddler: this.to
|
||||
},
|
||||
parentWidget: this
|
||||
});
|
||||
domNode.setAttribute("title",tooltipText);
|
||||
}
|
||||
if(this.role) {
|
||||
@@ -135,7 +135,7 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) {
|
||||
this.assignAttributes(domNode,{
|
||||
sourcePrefix: "aria-",
|
||||
destPrefix: "aria-"
|
||||
})
|
||||
});
|
||||
// Add a click event handler
|
||||
$tw.utils.addEventListeners(domNode,[
|
||||
{name: "click", handlerObject: this, handlerMethod: "handleClickEvent"},
|
||||
@@ -145,6 +145,8 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) {
|
||||
$tw.utils.makeDraggable({
|
||||
domNode: domNode,
|
||||
dragTiddlerFn: function() {return self.to;},
|
||||
startActions: self.startActions,
|
||||
endActions: self.endActions,
|
||||
widget: this
|
||||
});
|
||||
} else if(this.draggable === "no") {
|
||||
@@ -203,6 +205,8 @@ LinkWidget.prototype.execute = function() {
|
||||
this.overrideClasses = this.getAttribute("overrideClass");
|
||||
this.tabIndex = this.getAttribute("tabindex");
|
||||
this.draggable = this.getAttribute("draggable","yes");
|
||||
this.startActions = this.getAttribute("startactions");
|
||||
this.endActions = this.getAttribute("endactions");
|
||||
this.linkTag = this.getAttribute("tag","a");
|
||||
// Determine the link characteristics
|
||||
this.isMissing = !this.wiki.tiddlerExists(this.to);
|
||||
|
||||
@@ -61,7 +61,9 @@ ParametersWidget.prototype.execute = function() {
|
||||
if(name.substr(0,2) === "$$") {
|
||||
name = name.substr(1);
|
||||
}
|
||||
var value = pointer.getTransclusionParameter(name,index,self.getAttribute(attr.name,""));
|
||||
var defaultValue = (self.multiValuedAttributes && self.multiValuedAttributes[attr.name])
|
||||
|| self.getAttribute(attr.name,"");
|
||||
var value = pointer.getTransclusionParameter(name,index,defaultValue);
|
||||
self.setVariable(name,value);
|
||||
});
|
||||
// Assign any metaparameters
|
||||
@@ -80,7 +82,8 @@ ParametersWidget.prototype.execute = function() {
|
||||
if(name.substr(0,2) === "$$") {
|
||||
name = name.substr(1);
|
||||
}
|
||||
var value = self.getAttribute(attr.name,"");
|
||||
var value = (self.multiValuedAttributes && self.multiValuedAttributes[attr.name])
|
||||
|| self.getAttribute(attr.name,"");
|
||||
self.setVariable(name,value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -158,8 +158,10 @@ Collect string parameters
|
||||
TranscludeWidget.prototype.collectStringParameters = function() {
|
||||
var self = this;
|
||||
this.stringParametersByName = Object.create(null);
|
||||
this.multiValuedParametersByName = Object.create(null);
|
||||
if(!this.legacyMode) {
|
||||
$tw.utils.each(this.attributes,function(value,name) {
|
||||
var attrName = name; // Save original attribute name for MVV lookup
|
||||
if(name.charAt(0) === "$") {
|
||||
if(name.charAt(1) === "$") {
|
||||
// Attributes starting $$ represent parameters starting with a single $
|
||||
@@ -170,6 +172,9 @@ TranscludeWidget.prototype.collectStringParameters = function() {
|
||||
}
|
||||
}
|
||||
self.stringParametersByName[name] = value;
|
||||
if(self.multiValuedAttributes && self.multiValuedAttributes[attrName]) {
|
||||
self.multiValuedParametersByName[name] = self.multiValuedAttributes[attrName];
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -313,7 +318,16 @@ TranscludeWidget.prototype.parseTransclusionTarget = function(parseAsInline) {
|
||||
if(name.charAt(0) === "$") {
|
||||
name = "$" + name;
|
||||
}
|
||||
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
|
||||
if(param.defaultType === "multivalue-variable") {
|
||||
// Construct MVV attribute for the default
|
||||
var mvvNode = {type: "transclude", isMVV: true, attributes: {}, orderedAttributes: []};
|
||||
$tw.utils.addAttributeToParseTreeNode(mvvNode,"$variable",param.defaultVariable);
|
||||
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],{
|
||||
name: name, type: "macro", isMVV: true, value: mvvNode
|
||||
});
|
||||
} else {
|
||||
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"]);
|
||||
}
|
||||
});
|
||||
} 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__"
|
||||
@@ -364,7 +378,11 @@ TranscludeWidget.prototype.getOrderedTransclusionParameters = function() {
|
||||
// Collect the parameters
|
||||
for(var name in this.stringParametersByName) {
|
||||
var value = this.stringParametersByName[name];
|
||||
result.push({name: name, value: value});
|
||||
var param = {name: name, value: value};
|
||||
if(this.multiValuedParametersByName[name]) {
|
||||
param.multiValue = this.multiValuedParametersByName[name];
|
||||
}
|
||||
result.push(param);
|
||||
}
|
||||
// Sort numerical parameter names first
|
||||
result.sort(function(a,b) {
|
||||
@@ -394,10 +412,16 @@ Fetch the value of a parameter
|
||||
*/
|
||||
TranscludeWidget.prototype.getTransclusionParameter = function(name,index,defaultValue) {
|
||||
if(name in this.stringParametersByName) {
|
||||
if(this.multiValuedParametersByName[name]) {
|
||||
return this.multiValuedParametersByName[name];
|
||||
}
|
||||
return this.stringParametersByName[name];
|
||||
} else {
|
||||
var name = "" + index;
|
||||
if(name in this.stringParametersByName) {
|
||||
if(this.multiValuedParametersByName[name]) {
|
||||
return this.multiValuedParametersByName[name];
|
||||
}
|
||||
return this.stringParametersByName[name];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,19 +381,31 @@ filterFn: only include attributes where filterFn(name) returns true
|
||||
Widget.prototype.computeAttributes = function(options) {
|
||||
options = options || {};
|
||||
var changedAttributes = {},
|
||||
self = this;
|
||||
self = this,
|
||||
newMultiValuedAttributes = Object.create(null);
|
||||
$tw.utils.each(this.parseTreeNode.attributes,function(attribute,name) {
|
||||
if(options.filterFn) {
|
||||
if(!options.filterFn(name)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
var value = self.computeAttribute(attribute);
|
||||
if(self.attributes[name] !== value) {
|
||||
var value = self.computeAttribute(attribute),
|
||||
multiValue = null;
|
||||
if($tw.utils.isArray(value)) {
|
||||
multiValue = value;
|
||||
newMultiValuedAttributes[name] = multiValue;
|
||||
value = value[0] || "";
|
||||
}
|
||||
var changed = (self.attributes[name] !== value);
|
||||
if(!changed && multiValue && self.multiValuedAttributes) {
|
||||
changed = !$tw.utils.isArrayEqual(self.multiValuedAttributes[name] || [], multiValue);
|
||||
}
|
||||
if(changed) {
|
||||
self.attributes[name] = value;
|
||||
changedAttributes[name] = true;
|
||||
}
|
||||
});
|
||||
this.multiValuedAttributes = newMultiValuedAttributes;
|
||||
return changedAttributes;
|
||||
};
|
||||
|
||||
@@ -431,7 +443,7 @@ Widget.prototype.computeAttribute = function(attribute,options) {
|
||||
});
|
||||
// Invoke the macro
|
||||
var variableInfo = this.getVariableInfo(macroName,{params: params});
|
||||
if(options.asList) {
|
||||
if(options.asList || attribute.isMVV) {
|
||||
value = variableInfo.resultList;
|
||||
} else {
|
||||
value = variableInfo.text;
|
||||
|
||||
@@ -103,9 +103,9 @@ title: $:/core/ui/EditTemplate/body/toolbar/button
|
||||
<$set
|
||||
|
||||
name="buttonClasses"
|
||||
value={{!!button-classes}}
|
||||
value={{{ [subfilter{!!button-classes}] :and[join[ ]] }}}
|
||||
|
||||
><<toolbar-button>></$set>
|
||||
\end
|
||||
|
||||
<<toolbar-button-outer>>
|
||||
<<toolbar-button-outer>>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/core/Filters/StoryList
|
||||
tags: $:/tags/Filter
|
||||
filter: [list[$:/StoryList]] -$:/AdvancedSearch
|
||||
filter: [<tv-story-list>is[variable]then<tv-story-list>else[$:/StoryList]] =>storylist [list<storylist>] -$:/AdvancedSearch
|
||||
description: {{$:/language/Filters/StoryList}}
|
||||
|
||||
|
||||
@@ -2,37 +2,42 @@ title: $:/core/ui/TiddlerInfo/Advanced/CascadeInfo
|
||||
tags: $:/tags/TiddlerInfo/Advanced
|
||||
|
||||
\define lingo-base() $:/language/TiddlerInfo/Advanced/CascadeInfo/
|
||||
|
||||
<$let infoTiddler=<<currentTiddler>>>
|
||||
|
||||
''<<lingo Heading>>''
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
<table class="tc-max-width">
|
||||
<thead>
|
||||
<$list filter="[[View]] [[Active Cascade Filter]] [[Template]]" variable="heading">
|
||||
<th><<heading>></th>
|
||||
</$list>
|
||||
</thead>
|
||||
<$list filter="[[$:/tags/ViewTemplate]tagging[]]" variable="ViewTemplate">
|
||||
<tr>
|
||||
<$let
|
||||
view={{{ [<ViewTemplate>]+[split[/]last[]] }}}
|
||||
tagFilter=`$:/tags/ViewTemplate${ [<view>titlecase[]] }$Filter`
|
||||
activeCascadeFilterTiddler={{{ [all[shadows+tiddlers]tag<tagFilter>!is[draft]]:filter[<storyTiddler>subfilter{!!text}]+[first[]] }}}
|
||||
activeCascadeFilter={{{ [<activeCascadeFilterTiddler>get[text]] }}}
|
||||
activeTemplateTiddler={{{ [<currentTiddler>]:cascade[all[shadows+tiddlers]tag<tagFilter>!is[draft]get[text]] }}}
|
||||
>
|
||||
<%if [<activeCascadeFilterTiddler>!is[blank]]%>
|
||||
<td>
|
||||
<$link to=<<ViewTemplate>> ><<view>></$link>
|
||||
</td>
|
||||
<td>
|
||||
<$link to=<<activeCascadeFilterTiddler>> />
|
||||
</td>
|
||||
<td style="text-align:center;">
|
||||
<$link class="tc-btn-invisible" to=<<activeTemplateTiddler>>><$button class="tc-btn-invisible">{{$:/core/images/file}}</$button></$link>
|
||||
</td>
|
||||
<%endif%>
|
||||
</$let>
|
||||
</tr>
|
||||
</$list>
|
||||
<thead>
|
||||
<$list filter="[[View]] [[ActiveCascadeFilter]] [[Template]]" variable="th">
|
||||
<th><$transclude $variable="lingo" title=`Detail/$(th)$`/></th>
|
||||
</$list>
|
||||
</thead>
|
||||
<$list filter="[[$:/tags/ViewTemplate]tagging[]]" variable="ViewTemplate">
|
||||
<tr>
|
||||
<$let
|
||||
view={{{ [<ViewTemplate>]+[split[/]last[]] }}}
|
||||
tagFilter=`$:/tags/ViewTemplate${ [<view>titlecase[]] }$Filter`
|
||||
activeCascadeFilterTiddler={{{ [all[shadows+tiddlers]tag<tagFilter>!is[draft]]:filter[<storyTiddler>subfilter{!!text}]+[first[]] }}}
|
||||
activeCascadeFilter={{{ [<activeCascadeFilterTiddler>get[text]] }}}
|
||||
activeTemplateTiddler={{{ [<currentTiddler>]:cascade[all[shadows+tiddlers]tag<tagFilter>!is[draft]get[text]] }}}
|
||||
>
|
||||
<%if [<activeCascadeFilterTiddler>!is[blank]]%>
|
||||
<td>
|
||||
<$link to=<<ViewTemplate>> ><<view>></$link>
|
||||
</td>
|
||||
<td>
|
||||
<$link to=<<activeCascadeFilterTiddler>> />
|
||||
</td>
|
||||
<td style="text-align:center;">
|
||||
<$link class="tc-btn-invisible" to=<<activeTemplateTiddler>>>
|
||||
<$button class="tc-btn-invisible">{{$:/core/images/file}}</$button>
|
||||
</$link>
|
||||
</td>
|
||||
<%endif%>
|
||||
</$let>
|
||||
</tr>
|
||||
</$list>
|
||||
</table>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
title: $:/core/wiki/config/MediaQueryTrackers/DarkLightPreferred
|
||||
tags: $:/tags/MediaQueryTracker
|
||||
media-query: (prefers-color-scheme: dark)
|
||||
info-tiddler: $:/info/browser/darkmode
|
||||
info-tiddler-alt: $:/info/darkmode
|
||||
@@ -122,15 +122,15 @@ tags: $:/tags/Macro
|
||||
\whitespace trim
|
||||
\procedure keyboard-driven-input-actions()
|
||||
<%if [<event-key-descriptor>match[((input-accept))]] %>
|
||||
<<inputAcceptActions>>
|
||||
<$transclude $variable=inputAcceptActions $fillignore=yes />
|
||||
<%elseif [<event-key-descriptor>match[((input-accept-variant))]] %>
|
||||
<<inputAcceptVariantActions>>
|
||||
<$transclude $variable=inputAcceptVariantActions $fillignore=yes />
|
||||
<%elseif [<event-key-descriptor>match[((input-up))]] %>
|
||||
<<input-next-actions-before>>
|
||||
<$transclude $variable=input-next-actions-before $fillignore=yes />
|
||||
<%elseif [<event-key-descriptor>match[((input-down))]] %>
|
||||
<<input-next-actions-after>>
|
||||
<$transclude $variable=input-next-actions-after $fillignore=yes />
|
||||
<%elseif [<event-key-descriptor>match[((input-cancel))]] %>
|
||||
<<inputCancelActions>>
|
||||
<$transclude $variable=inputCancelActions $fillignore=yes />
|
||||
<%endif%>
|
||||
\end keyboard-driven-input-actions
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ tags: $:/tags/Macro
|
||||
<$action-listops $tiddler=<<targetTiddler>> $field=<<targetField>> $subfilter="+[insertbefore<actionTiddler>,<currentTiddler>]"/>
|
||||
\end
|
||||
|
||||
\define list-links-draggable(tiddler,field:"list",emptyMessage,type:"ul",subtype:"li",class:"",itemTemplate, displayField:"caption")
|
||||
\define list-links-draggable(tiddler,field:"list",emptyMessage,type:"ul",subtype:"li",class:"",itemTemplate,displayField:"caption",startactions,endactions)
|
||||
\whitespace trim
|
||||
<$set name="_tiddler" value="""$tiddler$""" emptyValue=<<currentTiddler>> >
|
||||
<$let field-reference={{{ [<_tiddler>] "!!" [[$field$]] +[join[]] }}}
|
||||
@@ -39,8 +39,11 @@ tags: $:/tags/Macro
|
||||
>
|
||||
<div class="tc-droppable-placeholder"/>
|
||||
<div>
|
||||
<$transclude tiddler="""$itemTemplate$""">
|
||||
<$link to={{!!title}}>
|
||||
<$transclude tiddler=<<__itemTemplate__>>>
|
||||
<$link to={{!!title}}
|
||||
startactions=<<__startactions__>>
|
||||
endactions=<<__endactions__>>
|
||||
>
|
||||
<$let tv-wikilinks="no">
|
||||
<$transclude field=<<__displayField__>>>
|
||||
<$view field="title"/>
|
||||
@@ -92,7 +95,7 @@ tags: $:/tags/Macro
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div",storyview:"",displayField:"title")
|
||||
\define list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div",storyview:"",displayField:"title",startactions,endactions)
|
||||
\whitespace trim
|
||||
<span class="tc-tagged-draggable-list">
|
||||
<$set name="tag" value=<<__tag__>>>
|
||||
@@ -108,8 +111,11 @@ tags: $:/tags/Macro
|
||||
>
|
||||
<$genesis $type=<<__elementTag__>> class="tc-droppable-placeholder"/>
|
||||
<$genesis $type=<<__elementTag__>>>
|
||||
<$transclude tiddler="""$itemTemplate$""">
|
||||
<$link to={{!!title}}>
|
||||
<$transclude tiddler=<<__itemTemplate__>>>
|
||||
<$link to={{!!title}}
|
||||
startactions=<<__startactions__>>
|
||||
endactions=<<__endactions__>>
|
||||
>
|
||||
<$let tv-wikilinks="no">
|
||||
<$transclude field=<<__displayField__>>>
|
||||
<$view field="title"/>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
title: MultiValuedVariables/AttributeFirstValue
|
||||
description: ((var)) on non-MVV-aware widget attribute returns first value only
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$let items={{{ [all[tiddlers]sort[]] }}}>
|
||||
<$text text=((items))/>
|
||||
</$let>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>$:/core</p>
|
||||
+
|
||||
@@ -0,0 +1,19 @@
|
||||
title: MultiValuedVariables/DefaultParameterMVV
|
||||
description: Procedure default parameter value using ((var)) syntax to provide MVV default
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\procedure showItems(itemList:((defaults)))
|
||||
<$text text={{{ [(itemList)join[-]] }}}/>
|
||||
\end
|
||||
<$let defaults={{{ [all[tiddlers]sort[]] }}}>
|
||||
<<showItems>>
|
||||
</$let>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>$:/core-ExpectedResult-Output</p>
|
||||
+
|
||||
@@ -0,0 +1,16 @@
|
||||
title: MultiValuedVariables/InlineDisplay
|
||||
description: ((var)) in inline wikitext displays MVV with default comma-space separator
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$let items={{{ [all[tiddlers]sort[]] }}}>
|
||||
((items))
|
||||
</$let>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>$:/core, ExpectedResult, Output</p>
|
||||
+
|
||||
@@ -0,0 +1,16 @@
|
||||
title: MultiValuedVariables/InlineDisplaySeparator
|
||||
description: ((var||separator)) in inline wikitext displays MVV with custom separator
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$let items={{{ [all[tiddlers]sort[]] }}}>
|
||||
((items||:))
|
||||
</$let>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>$:/core:ExpectedResult:Output</p>
|
||||
+
|
||||
@@ -0,0 +1,14 @@
|
||||
title: MultiValuedVariables/InlineFilterDisplay
|
||||
description: (((filter))) in inline wikitext displays filter results with default comma-space separator
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
((([all[tiddlers]sort[]])))
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>$:/core, ExpectedResult, Output</p>
|
||||
+
|
||||
@@ -0,0 +1,14 @@
|
||||
title: MultiValuedVariables/InlineFilterDisplaySeparator
|
||||
description: (((filter||separator))) in inline wikitext displays filter results with custom separator
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
((([all[tiddlers]sort[]]||:)))
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>$:/core:ExpectedResult:Output</p>
|
||||
+
|
||||
@@ -0,0 +1,19 @@
|
||||
title: MultiValuedVariables/TranscludeParameter
|
||||
description: Multi-valued variable passed as procedure parameter via ((var)) syntax
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\procedure showItems(itemList)
|
||||
<$text text={{{ [(itemList)join[-]] }}}/>
|
||||
\end
|
||||
<$let items={{{ [all[tiddlers]sort[]] }}}>
|
||||
<$transclude $variable="showItems" itemList=((items))/>
|
||||
</$let>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>$:/core-ExpectedResult-Output</p>
|
||||
+
|
||||
@@ -0,0 +1,17 @@
|
||||
title: MultiValuedVariables/TranscludeParameterFunction
|
||||
description: Multi-valued variable passed as function parameter via ((var)) in $transclude
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\function showItems(itemList) [(itemList)sort[]join[-]]
|
||||
<$let items={{{ [all[tiddlers]] }}}>
|
||||
<$transclude $variable="showItems" itemList=((items))/>
|
||||
</$let>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>$:/core-ExpectedResult-Output</p>
|
||||
+
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20201216182347597
|
||||
modified: 20211018102328148
|
||||
modified: 20260206104319886
|
||||
tags:
|
||||
title: How to create dynamic editor toolbar buttons
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -91,6 +91,9 @@ This tiddler contains all the necessary elements that are important for toolbar
|
||||
; shortcuts
|
||||
: This is the [[Keyboard Shortcut Descriptor]] eg: `((temp-bold))`
|
||||
|
||||
; button-classes <<.from-version "5.4.0">>
|
||||
: Additional CSS classes applied to the created button, definable as a list or filter expression
|
||||
|
||||
<<<
|
||||
|
||||
!! Disabled State
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: list-links-draggable
|
||||
created: 20170328204925306
|
||||
modified: 20211214141650488
|
||||
modified: 20260206131823536
|
||||
tags: Macros [[Core Macros]]
|
||||
title: list-links-draggable Macro
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -31,9 +31,16 @@ The <<.def list-links-draggable>> [[macro|Macros]] renders the ListField of a ti
|
||||
; itemTemplate
|
||||
: Optional title of a tiddler to use as the template for rendering list items
|
||||
|
||||
;displayField
|
||||
: <<.from-version 5.4.0>> Optional name of the field to display when the list is rendered. Defaults to the "caption" field; if "caption" is not present, the "title" field is used instead
|
||||
; displayField <<.from-version 5.4.0>>
|
||||
: Optional name of the field to display when the list is rendered. Defaults to the "caption" field; if "caption" is not present, the "title" field is used instead
|
||||
|
||||
; startactions <<.from-version "5.4.0">>
|
||||
: Optional action string that gets invoked when link ''dragging starts''
|
||||
: <<.var actionTiddler>> variable is available in this action
|
||||
|
||||
; endactions <<.from-version "5.4.0">>
|
||||
: Optional action string that gets invoked when link ''dragging ends''
|
||||
: <<.var actionTiddler>> variable is available in this action
|
||||
|
||||
If the `itemTemplate` parameter is not provided then the list items are rendered as simple links. Within the `itemTemplate`, the [[currentTiddler Variable]] refers to the current list item.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: list-tagged-draggable
|
||||
created: 20170329092723939
|
||||
modified: 20180109171254045
|
||||
modified: 20260206131803841
|
||||
tags: Macros [[Core Macros]]
|
||||
title: list-tagged-draggable Macro
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -9,19 +9,30 @@ The <<.def list-tagged-draggable>> [[macro|Macros]] renders the tiddlers with a
|
||||
|
||||
!! Parameters
|
||||
|
||||
;tag
|
||||
; tag
|
||||
: The title of the tag
|
||||
;subFilter
|
||||
|
||||
; subFilter
|
||||
: An optional subfilter to filter out unwanted items (eg `!tag[done]`)
|
||||
;itemTemplate
|
||||
|
||||
; itemTemplate
|
||||
: Optional title of a tiddler to use as the template for rendering list items
|
||||
;emptyMessage
|
||||
|
||||
; emptyMessage
|
||||
: Optional wikitext to display if there are no tiddlers with the specified tag
|
||||
|
||||
;displayField
|
||||
: <<.from-version 5.4.0>> Optional name of the field to display when the list is rendered. Defaults to `title` field.
|
||||
; displayField <<.from-version 5.4.0>>
|
||||
: Optional name of the field to display when the list is rendered. Defaults to `title` field
|
||||
|
||||
Note that the [[ordering|Order of Tagged Tiddlers]] is accomplished by assigning a new list to the `list` field of the tag tiddler. Any `list-before` or `list-after` fields on any of the other tiddlers carrying the tag are also removed to ensure the `list` field is respected.
|
||||
; startactions <<.from-version "5.4.0">>
|
||||
: Optional action string that gets invoked when link ''dragging starts''
|
||||
: <<.var actionTiddler>> variable is available in this action.
|
||||
|
||||
; endactions <<.from-version "5.4.0">>
|
||||
: Optional action string that gets invoked when link ''dragging ends''
|
||||
: <<.var actionTiddler>> variable is available in this action
|
||||
|
||||
Note that the [[ordering|Order of Tagged Tiddlers]] is accomplished by assigning a new list to the `list` field of the tag tiddler. Any `list-before` or `list-after` fields on any of the other tiddlers carrying the tag are also removed to ensure the `list` field is respected
|
||||
|
||||
If the `itemTemplate` parameter is not provided then the list items are rendered as simple links. Within the `itemTemplate`, the [[currentTiddler Variable]] refers to the current list item.
|
||||
|
||||
|
||||
28
editions/tw5.com/tiddlers/mechanisms/Background Actions.tid
Normal file
28
editions/tw5.com/tiddlers/mechanisms/Background Actions.tid
Normal file
@@ -0,0 +1,28 @@
|
||||
title: Background Actions
|
||||
created: 20250212154426403
|
||||
modified: 20250212154426403
|
||||
tags: Mechanisms
|
||||
|
||||
Background actions are performed whenever there are changes to the results of a filter.
|
||||
|
||||
They can be useful for hooking into existing functionality by tracking changes to the tiddler store.
|
||||
|
||||
The following example tracks changes to the story list, reusing itself as the text of a notification at the same time:
|
||||
|
||||
<<.demo-tiddler """
|
||||
title: SampleBackgroundAction: Story Change
|
||||
tags: $:/tags/BackgroundAction
|
||||
track-filter: [list[$:/StoryList]]
|
||||
|
||||
<$action-sendmessage $message="tm-notify" $param="SampleBackgroundAction: Story Change" list={{$:/StoryList!!list}}/>
|
||||
|
||||
Story List:
|
||||
|
||||
<ol>
|
||||
<$list filter="[enlist<list>]">
|
||||
<li>
|
||||
<$text text=<<currentTiddler>>/>
|
||||
</li>
|
||||
</$list>
|
||||
</ol>
|
||||
""">>
|
||||
@@ -4,8 +4,8 @@ tags: Mechanisms
|
||||
title: InfoMechanism
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define example(name)
|
||||
<$transclude tiddler="""$:/info/url/$name$""" mode="inline"/>
|
||||
\procedure example(name)
|
||||
<$text text={{{ [[$:/info/url/]addsuffix<name>get[text]] }}} />
|
||||
\end
|
||||
|
||||
System tiddlers in the namespace `$:/info/` are used to expose information about the system (including the current browser) so that WikiText applications can adapt themselves to available features.
|
||||
@@ -19,6 +19,8 @@ System tiddlers in the namespace `$:/info/` are used to expose information about
|
||||
|[[$:/info/browser/language]] |<<.from-version "5.1.20">> Language as reported by browser (note that some browsers report two character codes such as `en` while others report full codes such as `en-GB`) |
|
||||
|[[$:/info/browser/screen/width]] |Screen width in pixels |
|
||||
|[[$:/info/browser/screen/height]] |Screen height in pixels |
|
||||
|[[$:/info/browser/darkmode]] |<<.from-version "5.4.0">> Is dark mode preferred? ("yes" or "no") |
|
||||
|[[$:/info/darkmode]] |<<.deprecated-since "5.4.0">> Alias for $:/info/browser/darkmode |
|
||||
|`$:/info/browser/window/*` |<<.from-version "5.4.0">> Tiddlers reporting window dimensions, updated when the windows are resized |
|
||||
|[[$:/info/node]] |Running under [[Node.js]]? ("yes" or "no") |
|
||||
|[[$:/info/url/full]] |<<.from-version "5.1.14">> Full URL of wiki (eg, ''<<example full>>'') |
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Media Query Tracker Mechanism
|
||||
tags: Mechanisms
|
||||
created: 20250212154426403
|
||||
modified: 20250212154426403
|
||||
|
||||
|
||||
<<.from-version "5.4.0">> The media query tracker mechanism allows you to define [[custom CSS media queries|https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries]] to be bound to a specified [[info|InfoMechanism]] tiddler. The info tiddler will be dynamically update to reflect the current state of the media query.
|
||||
|
||||
Adding or modifying a tiddler tagged $:/tags/MediaQueryTracker takes effect immediately.
|
||||
|
||||
The media queries are always applied against the main window. This is relevant for viewport related media queries such as `min-width` which will always respect the main window and ignore the sizes of any external windows.
|
||||
|
||||
The core includes a media query tracker that is used for tracking the operating system dark/light setting. See $:/core/wiki/config/MediaQueryTrackers/DarkLightPreferred for details.
|
||||
@@ -22,6 +22,6 @@ There is also a single line form for shorter functions:
|
||||
\function <function-name>(<param-name>[:<param-default-value>],<param-name>[:<param-default-value>]...) <single-line-definition-text>
|
||||
```
|
||||
|
||||
The first line of the definition specifies the function name and any parameters. Each parameter has a name and, optionally, a default value that is used if no value is supplied on a particular call to the function. The lines that follow contain the text of the function (i.e. the snippet represented by the function name), until `\end` appears on a line by itself:
|
||||
The first line of the definition specifies the function name and any parameters. Each parameter has a name and, optionally, a default value that is used if no value is supplied on a particular call to the function. <<.from-version "5.4.0">> The default value can also be a [[multi-valued variable reference|Multi-Valued Variables]] using the `((var))` syntax (e.g. `\function show(items:((defaults)))`). The lines that follow contain the text of the function (i.e. the snippet represented by the function name), until `\end` appears on a line by itself:
|
||||
|
||||
See [[Functions]] for more details.
|
||||
@@ -22,7 +22,7 @@ There is also a single line form for shorter procedures:
|
||||
\procedure <procedure-name>(<param-name>[:<param-default-value>],<param-name>[:<param-default-value>]...) <single-line-definition-text>
|
||||
```
|
||||
|
||||
The first line of the definition specifies the procedure name and any parameters. Each parameter has a name and, optionally, a default value that is used if no value is supplied on a particular call to the procedure. The lines that follow contain the text of the procedure text (i.e. the snippet represented by the procedure name), until `\end` appears on a line by itself:
|
||||
The first line of the definition specifies the procedure name and any parameters. Each parameter has a name and, optionally, a default value that is used if no value is supplied on a particular call to the procedure. <<.from-version "5.4.0">> The default value can also be a [[multi-valued variable reference|Multi-Valued Variables]] using the `((var))` syntax (e.g. `\procedure show(items:((defaults)))`). The lines that follow contain the text of the procedure text (i.e. the snippet represented by the procedure name), until `\end` appears on a line by itself:
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: enhancement
|
||||
change-category: hackability
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8972 https://github.com/TiddlyWiki/TiddlyWiki5/pull/9614
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8972 https://github.com/TiddlyWiki/TiddlyWiki5/pull/9614 https://github.com/TiddlyWiki/TiddlyWiki5/pull/9645
|
||||
github-contributors: Jermolene saqimtiaz
|
||||
|
||||
This PR introduces a new filter run prefix `:let` that assigns the result of the filter run to a variable that is made available for the remaining filter runs of the filter expression. It solves the problem that previously it was impossible to compute values for filter operator parameters; parameters could only be a literal string, text reference or variable reference.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
change-category: internal
|
||||
change-category: developer
|
||||
change-type: enhancement
|
||||
created: 20260120153052332
|
||||
description: Adds a destroy method for widgets allowing for clean up of resources when a widget is removed.
|
||||
|
||||
@@ -4,5 +4,5 @@ release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: performance
|
||||
change-category: internal
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9118
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9119
|
||||
github-contributors: Leilei332
|
||||
|
||||
@@ -4,5 +4,5 @@ release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: deprecation
|
||||
change-category: internal
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9118
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9131
|
||||
github-contributors: Leilei332
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
title: $:/changenotes/5.4.0/#9177
|
||||
description: Add Display Field to list-tagged-draggable and list-links-draggable
|
||||
description: Add Display Field to list-tagged-draggable and list-links-draggable macros
|
||||
release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: enhancement
|
||||
change-category: usability
|
||||
change-category: hackability
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9177
|
||||
github-contributors: kookma
|
||||
|
||||
|
||||
@@ -7,4 +7,4 @@ change-category: internal
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9235 https://github.com/TiddlyWiki/TiddlyWiki5/pull/9325
|
||||
github-contributors: Leilei332
|
||||
|
||||
Removes nested `<span class="tc-keyboard">` element in core search field.
|
||||
Removes nested `<span class="tc-keyboard">` element in core search field.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
change-category: usability
|
||||
change-category: hackability
|
||||
change-type: enhancement
|
||||
created: 20251115012214040
|
||||
description: list-links-draggable defaults to currentTiddler if tiddler parameter is missing
|
||||
|
||||
@@ -4,7 +4,7 @@ release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: enhancement
|
||||
change-category: internal
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9287
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9287 https://github.com/TiddlyWiki/TiddlyWiki5/pull/9657
|
||||
github-contributors: Jermolene
|
||||
|
||||
Doing so enables us to filter and group changes. For example, we could show all the breaking changes between two releases.
|
||||
|
||||
@@ -3,7 +3,7 @@ description: Add the prevailing mimetype for CSV parser
|
||||
release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: enhancement
|
||||
change-category: internal
|
||||
change-category: developer
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9445
|
||||
github-contributors: EvidentlyCube
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ description: Import UI now conditionally displays file-type-specific import opti
|
||||
tags: $:/tags/ChangeNote
|
||||
release: 5.4.0
|
||||
change-type: enhancement
|
||||
change-category: hackability
|
||||
change-category: usability
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9465
|
||||
github-contributors: linonetwo
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@ tags: $:/tags/ChangeNote
|
||||
change-type: bugfix
|
||||
change-category: internal
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9570
|
||||
github-contributors: jermolene
|
||||
github-contributors: Jermolene
|
||||
|
||||
Fixes issue whereby transcluding a _canonical_uri tiddler with a missing image did not assign the progress classes `tc-image-loading`, `tc-image-loaded` and `tc-image-error`.
|
||||
@@ -0,0 +1,13 @@
|
||||
title: $:/changenotes/5.4.0/#9585
|
||||
created: 20260106174849522
|
||||
modified: 20260106174849522
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: enhancement
|
||||
change-category: hackability
|
||||
description: The button classes of Editor toolbar buttons can now be evaluated as filter expressions
|
||||
release: 5.4.0
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9585
|
||||
github-contributors: BurningTreeC
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
This change lets you define the button-classes of Editor toolbar buttons as filters for flexible styling
|
||||
@@ -1,7 +1,7 @@
|
||||
change-category: widget
|
||||
change-type: enhancement
|
||||
created: 20260125124838970
|
||||
description: adds support for pointer capture and enabling/disabling the widget
|
||||
description: Adds support for pointer capture and enabling/disabling to the EventCatcherWidget.
|
||||
github-contributors: saqimtiaz
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9609
|
||||
modified: 20260125202924515
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
change-category: usability
|
||||
change-category: hackability
|
||||
change-type: enhancement
|
||||
created: 20260124121646761
|
||||
description: The simple toc macro now supports a level parameter
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
change-category: hackability
|
||||
change-type: enhancement
|
||||
created: 20260126125300
|
||||
description: Add start- and endactions to link-widget, list-links-draggable and list-tagged-draggable macros
|
||||
github-contributors: pmario
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9621
|
||||
modified: 20260126125300
|
||||
release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
title: $:/changenotes/5.4.0/#9621
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -3,8 +3,9 @@ description: Add "Cascade Details" to the Advanced tab of the Tiddler Info panel
|
||||
tags: $:/tags/ChangeNote
|
||||
release: 5.4.0
|
||||
change-type: enhancement
|
||||
change-category: hackability
|
||||
github-links: https://github.com/Jermolene/TiddlyWiki5/pull/9634
|
||||
change-category: usability
|
||||
github-links: https://github.com/Jermolene/TiddlyWiki5/pull/9634 https://github.com/Jermolene/TiddlyWiki5/pull/9643
|
||||
github-contributors: DesignThinkerer
|
||||
|
||||
The Tiddler Info panel's `Advanced` tab now displays the templates and filters used to render the current tiddler.
|
||||
|
||||
The Tiddler Info panel's `Advanced` tab now displays the templates and filters used to render the current tiddler.
|
||||
|
||||
14
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9641.tid
Normal file
14
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9641.tid
Normal file
@@ -0,0 +1,14 @@
|
||||
title: $:/changenotes/5.4.0/#9641
|
||||
description: Background actions and media query tracking
|
||||
tags: $:/tags/ChangeNote
|
||||
release: 5.4.0
|
||||
change-type: enhancement
|
||||
change-category: hackability
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9641
|
||||
github-contributors: Jermolene
|
||||
|
||||
Introduces [[Background Actions]] that are triggered whenever there is a change to the results of a specified filter.
|
||||
|
||||
Building on that, it also introduces a new [[Media Query Tracker Mechanism]] that can track the results of any CSS media query (not just dark mode), storing the results in a shadow `$:/info/...` tiddler
|
||||
|
||||
These improvements were cherrypicked from [[#8702 - Colour Handling Improvements|https://github.com/TiddlyWiki/TiddlyWiki5/pull/8702]] when it was deferred until v5.5.0.
|
||||
@@ -0,0 +1,8 @@
|
||||
title: $:/changenotes/5.4.0/#9655
|
||||
description: Update German translation
|
||||
release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: enhancement
|
||||
change-category: translation
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9655
|
||||
github-contributors: pmario
|
||||
10
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9660.tid
Normal file
10
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9660.tid
Normal file
@@ -0,0 +1,10 @@
|
||||
title: $:/changenotes/5.4.0/#9660
|
||||
description: Fix info panel overflow
|
||||
tags: $:/tags/ChangeNote
|
||||
release: 5.4.0
|
||||
change-type: enhancement
|
||||
change-category: theme
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9660
|
||||
github-contributors: DesignThinkerer
|
||||
|
||||
Remove `overflow: hidden` from the `.tc-tiddler-info` style definition. This allows popups and dropdowns triggered from within the tiddler info panel to extend beyond its boundaries rather than being clipped.
|
||||
@@ -7,9 +7,9 @@ type: text/vnd.tiddlywiki
|
||||
description: Under development
|
||||
|
||||
\procedure release-introduction()
|
||||
Release v5.4.0 is an important release because it deliberately and forensically loosens backwards compatibility where needed to allow significant new features and fundamental improvements to be made.
|
||||
Release v5.4.0 deliberately and forensically loosens backwards compatibility to clear the path for significant new features and fundamental improvements to be made in the future.
|
||||
|
||||
''Please note that this release note is not yet fully completed, please see the change history on ~GitHub for the full list of changes included in this release.''
|
||||
''Please note that there are some changes that do not yet change notes, please see the change history on ~GitHub for the full list of changes.''
|
||||
|
||||
See the [[project plan|https://github.com/orgs/TiddlyWiki/projects/4]] for full details.
|
||||
\end release-introduction
|
||||
|
||||
@@ -3,7 +3,7 @@ description: Draft title internationalization
|
||||
release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: enhancement
|
||||
change-category: internal
|
||||
change-category: translation
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8891
|
||||
github-contributors: Leilei332
|
||||
|
||||
|
||||
@@ -53,3 +53,13 @@ Impact note fields:
|
||||
* `description` - a brief description of the impact
|
||||
* `impact-type` - the type of impact; see [[here|Release Notes and Changes]] for valid values
|
||||
* `text` - description of the impact if required
|
||||
|
||||
! Summary Lists
|
||||
|
||||
Summary sections are curated via lists stored in fields on the tiddler `$:/tw5.com/releases/info/summary-lists`.
|
||||
|
||||
Each field is named `<section>/<release>` and contains a list of change note tiddler titles, for example:
|
||||
|
||||
* `highlights/5.4.0`
|
||||
* `big-bug-fixes/5.4.0`
|
||||
* `clearing-the-decks/5.4.0`
|
||||
|
||||
@@ -1,35 +1,75 @@
|
||||
title: $:/tw5.com/releases/info/
|
||||
|
||||
category-order: translation plugin usability theme hackability widget filters performance nodejs internal developer
|
||||
categories/internal/caption: Internal
|
||||
categories/translation/caption: Translation
|
||||
categories/plugin/caption: Plugin
|
||||
categories/widget/caption: Widget
|
||||
categories/usability/caption: Usability
|
||||
categories/theme/caption: Theme
|
||||
categories/hackability/caption: Hackability
|
||||
categories/nodejs/caption: Node.js
|
||||
categories/performance/caption: Performance
|
||||
categories/developer/caption: Developer
|
||||
categories/filters/caption: Filters
|
||||
change-types/bugfix/caption: Bugfix
|
||||
category-order: translation usability hackability performance widget filters plugin theme nodejs developer internal
|
||||
|
||||
summary-section-order: highlights big-bug-fixes clearing-the-decks
|
||||
change-type-order: feature enhancement performance bugfix deprecation security
|
||||
impact-type-order: compatibility-break deprecation pluginisation
|
||||
tab-order: [[Summary]] [[Change Types]] [[Change Categories]] [[Impacts]]
|
||||
categories/developer/singular: Developer
|
||||
categories/developer/plural: Developer
|
||||
categories/filters/singular: Filters
|
||||
categories/filters/plural: Filters
|
||||
categories/hackability/singular: Hackability
|
||||
categories/hackability/plural: Hackability
|
||||
categories/internal/singular: Internal
|
||||
categories/internal/plural: Internal
|
||||
categories/nodejs/singular: Node.js
|
||||
categories/nodejs/plural: Node.js
|
||||
categories/performance/singular: Performance
|
||||
categories/performance/plural: Performance
|
||||
categories/plugin/singular: Plugin
|
||||
categories/plugin/plural: Plugins
|
||||
categories/theme/singular: Theme
|
||||
categories/theme/plural: Theming
|
||||
categories/translation/singular: Translation
|
||||
categories/translation/plural: Translation
|
||||
categories/usability/singular: Usability
|
||||
categories/usability/plural: Usability
|
||||
categories/widget/singular: Widget
|
||||
categories/widget/plural: Widgets
|
||||
change-types/bugfix/singular: Bugfix
|
||||
change-types/bugfix/colour: #ffe246
|
||||
change-types/feature/caption: Feature
|
||||
change-types/feature/colour: #91ba66
|
||||
change-types/enhancement/caption: Enhancement
|
||||
change-types/enhancement/colour: #cba5ff
|
||||
change-types/deprecation/caption: Deprecation
|
||||
change-types/bugfix/plural: Bugfixes
|
||||
change-types/deprecation/singular: Deprecation
|
||||
change-types/deprecation/colour: #ff9d6c
|
||||
change-types/security/caption: Security
|
||||
change-types/security/colour: #ff6666
|
||||
change-types/performance/caption: Performance
|
||||
change-types/deprecation/plural: Deprecations
|
||||
change-types/enhancement/singular: Enhancement
|
||||
change-types/enhancement/colour: #cba5ff
|
||||
change-types/enhancement/plural: Enhancements
|
||||
change-types/feature/singular: Feature
|
||||
change-types/feature/colour: #91ba66
|
||||
change-types/feature/plural: Features
|
||||
change-types/performance/singular: Performance
|
||||
change-types/performance/colour: #c2c7ff
|
||||
impact-types/deprecation/caption: Deprecation
|
||||
impact-types/deprecation/colour/foreground: #882222
|
||||
impact-types/deprecation/colour/background: #ffdddd
|
||||
impact-types/compatibility-break/caption: Compatibility Break
|
||||
impact-types/compatibility-break/colour/foreground: #228822
|
||||
change-types/performance/plural: Performance
|
||||
change-types/security/singular: Security
|
||||
change-types/security/colour: #ff6666
|
||||
change-types/security/plural: Security
|
||||
impact-types/compatibility-break/singular: Compatibility Break
|
||||
impact-types/compatibility-break/colour/background: #ddffdd
|
||||
impact-types/pluginisation/caption: Pluginisation
|
||||
impact-types/pluginisation/colour/foreground: #222288
|
||||
impact-types/compatibility-break/colour/foreground: #228822
|
||||
impact-types/compatibility-break/plural: Compatibility Breaks
|
||||
impact-types/deprecation/singular: Deprecation
|
||||
impact-types/deprecation/colour/background: #ffdddd
|
||||
impact-types/deprecation/colour/foreground: #882222
|
||||
impact-types/deprecation/plural: Deprecations
|
||||
impact-types/pluginisation/singular: Pluginisation
|
||||
impact-types/pluginisation/colour/background: #ddddff
|
||||
impact-types/pluginisation/colour/foreground: #222288
|
||||
impact-types/pluginisation/plural: Pluginisations
|
||||
summary-sections/big-bug-fixes/plural: Big Bug Fixes
|
||||
summary-sections/clearing-the-decks/plural: Clearing the Decks
|
||||
summary-sections/highlights/plural: Highlights
|
||||
summary-sections/highlights/default-state: open
|
||||
categories/translation/colour: #7ec8e3
|
||||
categories/usability/colour: #f4a261
|
||||
categories/hackability/colour: #9b8ec4
|
||||
categories/performance/colour: #87ceeb
|
||||
categories/widget/colour: #e78ac3
|
||||
categories/filters/colour: #8cc56d
|
||||
categories/plugin/colour: #f0c674
|
||||
categories/theme/colour: #d4a76a
|
||||
categories/nodejs/colour: #77bb66
|
||||
categories/developer/colour: #6baed6
|
||||
categories/internal/colour: #b0b0b0
|
||||
|
||||
@@ -48,69 +48,295 @@ tags: $:/tags/Global
|
||||
</span>
|
||||
\end impact-pill
|
||||
|
||||
\procedure change-list()
|
||||
\procedure release-section-toggle(state,default)
|
||||
\whitespace trim
|
||||
<div class="doc-release-note">
|
||||
<$list filter="[enlist{$:/tw5.com/releases/info/category-order}]" variable="category">
|
||||
<%if [tag[$:/tags/ChangeNote]] :filter[{!!release}match<release>] :filter[{!!change-category}match<category>] %>
|
||||
<div class="doc-release-note-heading">
|
||||
<h2 class="doc-change-note-category">
|
||||
<$text text={{{ [[$:/tw5.com/releases/info/categories/]addsuffix<category>addsuffix[/caption]get[text]] }}} />
|
||||
</h2>
|
||||
</div>
|
||||
<$list filter="[tag[$:/tags/ChangeNote]] :filter[{!!release}match<release>] :filter[{!!change-category}match<category>sort[description]]" variable="change">
|
||||
<div class="doc-change-note-item">
|
||||
<h3 class="doc-change-note-heading">
|
||||
<$link
|
||||
to="Release Notes and Changes"
|
||||
class="doc-link-badge"
|
||||
style.backgroundColor={{{ [<change>get[change-type]addprefix[$:/tw5.com/releases/info/change-types/]addsuffix[/colour]get[text]] }}}
|
||||
>
|
||||
<$text text={{{ [<change>get[change-type]addprefix[$:/tw5.com/releases/info/change-types/]addsuffix[/caption]get[text]] }}}/>
|
||||
</$link> <$transclude $tiddler=<<change>> $field="description" $mode="inline"/></h3>
|
||||
<div class="doc-change-note-info-list">
|
||||
<$list filter="[tag[$:/tags/ImpactNote]] :filter[{!!changenote}match<change>] +[sort[description]]" variable="impact" counter="impactCount">
|
||||
<div class="doc-change-note-info-list-item-caption">
|
||||
<%if [<impactCount>match[1]] %>
|
||||
Impact:
|
||||
<%endif%>
|
||||
</div>
|
||||
<div class="doc-change-note-info-list-item-description">
|
||||
<div class="doc-change-note-info-list-item-description-summary">
|
||||
<$transclude $variable="impact-pill" $mode="inline" impact-type={{{ [<impact>get[impact-type]] }}}/>
|
||||
<$text text=": "/>
|
||||
<$transclude $tiddler=<<impact>> $field="description" $mode="inline"/>
|
||||
</div>
|
||||
<div class="doc-change-note-info-list-item-description-details">
|
||||
<$transclude $tiddler=<<impact>> $field="text" $mode="block"/>
|
||||
</div>
|
||||
</div>
|
||||
</$list>
|
||||
<div class="doc-change-note-info-list-item-caption">
|
||||
<$text text="GitHub: "/>
|
||||
</div>
|
||||
<div class="doc-change-note-info-list-item-description">
|
||||
<$list filter="[<change>get[github-links]enlist-input[]]" variable="link">
|
||||
<a
|
||||
href=<<link>>
|
||||
class="doc-github-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{{$:/core/images/github}}
|
||||
</a>
|
||||
</$list>
|
||||
</div>
|
||||
</div>
|
||||
<div class="doc-change-note-description">
|
||||
<$transclude $tiddler=<<change>> $mode="block"/>
|
||||
</div>
|
||||
</div>
|
||||
</$list>
|
||||
<%endif%>
|
||||
<$reveal type="nomatch" state=<<state>> text="open" default=<<default>> tag="span">
|
||||
<$action-setfield $tiddler=<<state>> $field="text" $value="open"/>
|
||||
<span class="doc-release-section-toggle">{{$:/core/images/right-arrow}}</span>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<state>> text="open" default=<<default>> tag="span">
|
||||
<$action-setfield $tiddler=<<state>> $field="text" $value="close"/>
|
||||
<span class="doc-release-section-toggle">{{$:/core/images/down-arrow}}</span>
|
||||
</$reveal>
|
||||
\end release-section-toggle
|
||||
|
||||
\procedure change-note-type-badge()
|
||||
\whitespace trim
|
||||
<$link
|
||||
to="Release Notes and Changes"
|
||||
class="doc-link-badge"
|
||||
style.backgroundColor={{{ [<change>get[change-type]addprefix[$:/tw5.com/releases/info/change-types/]addsuffix[/colour]get[text]] }}}
|
||||
>
|
||||
<$text text={{{ [<change>get[change-type]addprefix[$:/tw5.com/releases/info/change-types/]addsuffix[/singular]get[text]] }}}/>
|
||||
</$link>
|
||||
\end change-note-type-badge
|
||||
|
||||
\procedure change-note-category-badge()
|
||||
\whitespace trim
|
||||
<$link
|
||||
to="Release Notes and Changes"
|
||||
class="doc-link-badge"
|
||||
style.backgroundColor={{{ [<change>get[change-category]addprefix[$:/tw5.com/releases/info/categories/]addsuffix[/colour]get[text]] }}}
|
||||
>
|
||||
<$text text={{{ [<change>get[change-category]addprefix[$:/tw5.com/releases/info/categories/]addsuffix[/singular]get[text]] }}}/>
|
||||
</$link>
|
||||
\end change-note-category-badge
|
||||
|
||||
\procedure change-note-heading()
|
||||
\whitespace trim
|
||||
<h3 class="doc-change-note-heading"
|
||||
style.backgroundColor={{{ [<change>get[change-type]addprefix[$:/tw5.com/releases/info/change-types/]addsuffix[/colour]get[text]addsuffix[40]] }}}
|
||||
>
|
||||
<%if [<show-type-badge>!match[no]] %><<change-note-type-badge>><%endif%>
|
||||
<%if [<show-category-badge>match[yes]] %><<change-note-category-badge>><%endif%>
|
||||
<%if [<show-tiddler-link>match[yes]] %><$link to=<<change>> class="doc-change-note-description-link"><$transclude $tiddler=<<change>> $field="description" $mode="inline"/></$link><%else%><$transclude $tiddler=<<change>> $field="description" $mode="inline"/><%endif%>
|
||||
</h3>
|
||||
\end change-note-heading
|
||||
|
||||
\procedure change-note-impacts()
|
||||
\whitespace trim
|
||||
<$list filter="[tag[$:/tags/ImpactNote]] :filter[{!!changenote}match<change>] +[sort[description]]" variable="impact" counter="impactCount">
|
||||
<div class="doc-change-note-info-list-item-caption">
|
||||
<%if [<impactCount>match[1]] %>Impact:<%endif%>
|
||||
</div>
|
||||
<div class="doc-change-note-info-list-item-description">
|
||||
<div class="doc-change-note-info-list-item-description-summary">
|
||||
<$transclude $variable="impact-pill" $mode="inline" impact-type={{{ [<impact>get[impact-type]] }}}/>
|
||||
<$text text=": "/>
|
||||
<%if [<show-tiddler-link>match[yes]] %><$link to=<<impact>> class="doc-change-note-description-link"><$transclude $tiddler=<<impact>> $field="description" $mode="inline"/></$link><%else%><$transclude $tiddler=<<impact>> $field="description" $mode="inline"/><%endif%>
|
||||
</div>
|
||||
<div class="doc-change-note-info-list-item-description-details">
|
||||
<$transclude $tiddler=<<impact>> $field="text" $mode="block"/>
|
||||
</div>
|
||||
</div>
|
||||
</$list>
|
||||
\end change-note-impacts
|
||||
|
||||
\procedure change-note-github-links()
|
||||
\whitespace trim
|
||||
<div class="doc-change-note-info-list-item-caption">
|
||||
<$text text="GitHub: "/>
|
||||
</div>
|
||||
<div class="doc-change-note-info-list-item-description">
|
||||
<$list filter="[<change>get[github-links]enlist-input[]]" variable="link">
|
||||
<a href=<<link>> class="doc-github-link" target="_blank" rel="noopener noreferrer">
|
||||
{{$:/core/images/github}}
|
||||
</a>
|
||||
</$list>
|
||||
</div>
|
||||
\end change-list
|
||||
\end change-note-github-links
|
||||
|
||||
\procedure change-note-info()
|
||||
\whitespace trim
|
||||
<div class="doc-change-note-info-list">
|
||||
<%if [<show-change-impacts>!match[no]] %><<change-note-impacts>><%endif%>
|
||||
<<change-note-github-links>>
|
||||
</div>
|
||||
\end change-note-info
|
||||
|
||||
\procedure change-note-description()
|
||||
\whitespace trim
|
||||
<div class="doc-change-note-description">
|
||||
<$transclude $tiddler=<<change>> $mode="block"/>
|
||||
</div>
|
||||
\end change-note-description
|
||||
|
||||
\procedure change-note-item()
|
||||
\whitespace trim
|
||||
<div class="doc-change-note-item">
|
||||
<<change-note-heading>>
|
||||
<<change-note-info>>
|
||||
<<change-note-description>>
|
||||
</div>
|
||||
\end change-note-item
|
||||
|
||||
\procedure change-note-list(filter)
|
||||
\whitespace trim
|
||||
<$list
|
||||
filter=<<filter>>
|
||||
variable="change"
|
||||
emptyMessage="<div class='doc-change-note-empty'>No curated changes yet.</div>"
|
||||
>
|
||||
<<change-note-item>>
|
||||
</$list>
|
||||
\end change-note-list
|
||||
|
||||
\procedure summary-section()
|
||||
\whitespace trim
|
||||
<$let
|
||||
summaryState={{{ [<release>addprefix[$:/state/release/summary/]addsuffix[/]addsuffix<summary-key>] }}}
|
||||
summaryDefault={{{ [[$:/tw5.com/releases/info/summary-sections/]addsuffix<summary-key>addsuffix[/default-state]get[text]] }}}
|
||||
summaryListTiddler="$:/tw5.com/releases/info/summary-lists"
|
||||
summaryListField={{{ [<summary-key>addsuffix[/]addsuffix<release>] }}}
|
||||
>
|
||||
<$let summaryFilter="[<summaryListTiddler>get<summaryListField>enlist-input[]]">
|
||||
<div class="doc-release-section">
|
||||
<$button class="tc-btn-invisible doc-release-section-summary">
|
||||
<$macrocall $name="release-section-toggle" state=<<summaryState>> default=<<summaryDefault>>/>
|
||||
<span class="doc-release-section-summary-text">
|
||||
<$text text={{{ [[$:/tw5.com/releases/info/summary-sections/]addsuffix<summary-key>addsuffix[/plural]get[text]] }}} />
|
||||
<$text text=" "/><span class="doc-release-section-count">(<$text text={{{ [<summaryListTiddler>get<summaryListField>enlist-input[]] +[count[]] }}}/>)</span>
|
||||
</span>
|
||||
</$button>
|
||||
<$reveal type="match" state=<<summaryState>> text="open" default=<<summaryDefault>> tag="div" class="doc-release-section-body">
|
||||
<$macrocall $name="change-note-list" filter=<<summaryFilter>>/>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$let>
|
||||
</$let>
|
||||
\end summary-section
|
||||
|
||||
\procedure summary-tab()
|
||||
\whitespace trim
|
||||
<$let show-type-badge="yes" show-category-badge="yes" show-change-impacts="yes" show-tiddler-link="yes">
|
||||
<div class="doc-release-summary">
|
||||
<$list filter="[enlist{$:/tw5.com/releases/info/summary-section-order}]" variable="summary-key">
|
||||
<div class="doc-release-summary-section">
|
||||
<$macrocall $name="summary-section"/>
|
||||
</div>
|
||||
</$list>
|
||||
</div>
|
||||
</$let>
|
||||
\end summary-tab
|
||||
|
||||
\procedure change-type-section()
|
||||
\whitespace trim
|
||||
<$let changeTypeState={{{ [<release>addprefix[$:/state/release/change-type/]addsuffix[/]addsuffix<change-type>] }}}>
|
||||
<div class="doc-release-section">
|
||||
<$button class="tc-btn-invisible doc-release-section-summary"
|
||||
style.backgroundColor={{{ [[$:/tw5.com/releases/info/change-types/]addsuffix<change-type>addsuffix[/colour]get[text]addsuffix[40]] }}}
|
||||
>
|
||||
<$macrocall $name="release-section-toggle" state=<<changeTypeState>>/>
|
||||
<span class="doc-release-section-summary-text">
|
||||
<$text text={{{ [[$:/tw5.com/releases/info/change-types/]addsuffix<change-type>addsuffix[/plural]get[text]] }}} />
|
||||
<$text text=" "/><span class="doc-release-section-count">(<$text text={{{ [tag[$:/tags/ChangeNote]] :filter[{!!release}match<release>] :filter[{!!change-type}match<change-type>] +[count[]] }}}/>)</span>
|
||||
</span>
|
||||
</$button>
|
||||
<$reveal type="match" state=<<changeTypeState>> text="open" tag="div" class="doc-release-section-body">
|
||||
<$let typeFilter="[tag[$:/tags/ChangeNote]] :filter[{!!release}match<release>] :filter[{!!change-type}match<change-type>] +[sort[description]]">
|
||||
<$macrocall $name="change-note-list" filter=<<typeFilter>>/>
|
||||
</$let>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$let>
|
||||
\end change-type-section
|
||||
|
||||
\procedure change-types-tab()
|
||||
\whitespace trim
|
||||
<$let show-type-badge="no" show-category-badge="yes" show-change-impacts="yes" show-tiddler-link="yes">
|
||||
<$list filter="[enlist{$:/tw5.com/releases/info/change-type-order}]" variable="change-type">
|
||||
<<change-type-section>>
|
||||
</$list>
|
||||
</$let>
|
||||
\end change-types-tab
|
||||
|
||||
\procedure change-category-section()
|
||||
\whitespace trim
|
||||
<$let changeCategoryState={{{ [<release>addprefix[$:/state/release/change-category/]addsuffix[/]addsuffix<category>] }}}>
|
||||
<div class="doc-release-section">
|
||||
<$button class="tc-btn-invisible doc-release-section-summary"
|
||||
style.backgroundColor={{{ [[$:/tw5.com/releases/info/categories/]addsuffix<category>addsuffix[/colour]get[text]addsuffix[40]] }}}
|
||||
>
|
||||
<$macrocall $name="release-section-toggle" state=<<changeCategoryState>>/>
|
||||
<span class="doc-release-section-summary-text">
|
||||
<$text text={{{ [[$:/tw5.com/releases/info/categories/]addsuffix<category>addsuffix[/plural]get[text]] }}} />
|
||||
<$text text=" "/><span class="doc-release-section-count">(<$text text={{{ [tag[$:/tags/ChangeNote]] :filter[{!!release}match<release>] :filter[{!!change-category}match<category>] +[count[]] }}}/>)</span>
|
||||
</span>
|
||||
</$button>
|
||||
<$reveal type="match" state=<<changeCategoryState>> text="open" tag="div" class="doc-release-section-body">
|
||||
<$let categoryFilter="[tag[$:/tags/ChangeNote]] :filter[{!!release}match<release>] :filter[{!!change-category}match<category>] +[sort[description]]">
|
||||
<$macrocall $name="change-note-list" filter=<<categoryFilter>>/>
|
||||
</$let>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$let>
|
||||
\end change-category-section
|
||||
|
||||
\procedure change-categories-tab()
|
||||
\whitespace trim
|
||||
<$let show-type-badge="yes" show-category-badge="no" show-change-impacts="yes" show-tiddler-link="yes">
|
||||
<$list filter="[enlist{$:/tw5.com/releases/info/category-order}]" variable="category">
|
||||
<<change-category-section>>
|
||||
</$list>
|
||||
</$let>
|
||||
\end change-categories-tab
|
||||
|
||||
\procedure impact-change-note()
|
||||
\whitespace trim
|
||||
<$let change={{{ [<impact>get[changenote]] }}} show-change-impacts="no">
|
||||
<<change-note-item>>
|
||||
</$let>
|
||||
\end impact-change-note
|
||||
|
||||
\procedure impact-note-item()
|
||||
\whitespace trim
|
||||
<div class="doc-impact-note-item">
|
||||
<h3 class="doc-impact-note-heading"
|
||||
style.backgroundColor={{{ [<impact>get[impact-type]addprefix[$:/tw5.com/releases/info/impact-types/]addsuffix[/colour/background]get[text]] }}}
|
||||
>
|
||||
<$transclude $variable="impact-pill" $mode="inline" impact-type={{{ [<impact>get[impact-type]] }}}/>
|
||||
<$text text=": "/>
|
||||
<%if [<show-tiddler-link>match[yes]] %><$link to=<<impact>> class="doc-change-note-description-link"><$transclude $tiddler=<<impact>> $field="description" $mode="inline"/></$link><%else%><$transclude $tiddler=<<impact>> $field="description" $mode="inline"/><%endif%>
|
||||
</h3>
|
||||
<div class="doc-impact-note-details">
|
||||
<$transclude $tiddler=<<impact>> $field="text" $mode="block"/>
|
||||
</div>
|
||||
<<impact-change-note>>
|
||||
</div>
|
||||
\end impact-note-item
|
||||
|
||||
\procedure impact-type-section()
|
||||
\whitespace trim
|
||||
<$let impactTypeState={{{ [<release>addprefix[$:/state/release/impact-type/]addsuffix[/]addsuffix<impact-type>] }}}>
|
||||
<div class="doc-release-section">
|
||||
<$button class="tc-btn-invisible doc-release-section-summary"
|
||||
style.backgroundColor={{{ [[$:/tw5.com/releases/info/impact-types/]addsuffix<impact-type>addsuffix[/colour/background]get[text]] }}}
|
||||
>
|
||||
<$macrocall $name="release-section-toggle" state=<<impactTypeState>>/>
|
||||
<span class="doc-release-section-summary-text">
|
||||
<$text text={{{ [[$:/tw5.com/releases/info/impact-types/]addsuffix<impact-type>addsuffix[/plural]get[text]] }}} />
|
||||
<$text text=" "/><span class="doc-release-section-count">(<$text text={{{ [tag[$:/tags/ImpactNote]] :filter[{!!impact-type}match<impact-type>] :filter[{!!changenote}get[release]match<release>] +[count[]] }}}/>)</span>
|
||||
</span>
|
||||
</$button>
|
||||
<$reveal type="match" state=<<impactTypeState>> text="open" tag="div" class="doc-release-section-body">
|
||||
<$list
|
||||
filter="[tag[$:/tags/ImpactNote]] :filter[{!!impact-type}match<impact-type>] :filter[{!!changenote}get[release]match<release>] +[sort[description]]"
|
||||
variable="impact"
|
||||
>
|
||||
<<impact-note-item>>
|
||||
</$list>
|
||||
</$reveal>
|
||||
</div>
|
||||
</$let>
|
||||
\end impact-type-section
|
||||
|
||||
\procedure impacts-tab()
|
||||
\whitespace trim
|
||||
<$let show-tiddler-link="yes">
|
||||
<$list filter="[enlist{$:/tw5.com/releases/info/impact-type-order}]" variable="impact-type">
|
||||
<<impact-type-section>>
|
||||
</$list>
|
||||
</$let>
|
||||
\end impacts-tab
|
||||
|
||||
\procedure credits-tab()
|
||||
\whitespace trim
|
||||
<div class="doc-release-credits">
|
||||
A warm thank you to the developers who have contributed to this release:
|
||||
<<acknowledgements>>
|
||||
</div>
|
||||
\end credits-tab
|
||||
|
||||
\procedure release-tabs()
|
||||
\whitespace trim
|
||||
<$macrocall
|
||||
$name="tabs"
|
||||
tabsList="[enlist{$:/tw5.com/releases/info/tab-order}]"
|
||||
default="Summary"
|
||||
class="doc-release-tabs"
|
||||
template="$:/tw5.com/releases/tab-template"
|
||||
/>
|
||||
\end release-tabs
|
||||
|
||||
\procedure acknowledgements()
|
||||
<ol class="doc-github-contributors">
|
||||
@@ -136,21 +362,13 @@ See <<github-release-changes-link>> and [[other releases|TiddlyWiki Releases]].
|
||||
|
||||
<<banner-credits>>
|
||||
|
||||
! Introduction
|
||||
|
||||
<$transclude $variable="release-introduction" $mode="block"/>
|
||||
|
||||
! Changes
|
||||
<<release-tabs>>
|
||||
|
||||
<$transclude $variable="change-list" $mode="inline"/>
|
||||
! Credits
|
||||
|
||||
<!-- Acknowledgement list -->
|
||||
|
||||
! Acknowledgements
|
||||
|
||||
A warm thank you to the developers who have contributed to this release:
|
||||
|
||||
<<acknowledgements>>
|
||||
<<credits-tab>>
|
||||
|
||||
</$let>
|
||||
\end releasenote
|
||||
|
||||
@@ -5,6 +5,57 @@ type: text/vnd.tiddlywiki
|
||||
.doc-release-note {
|
||||
}
|
||||
|
||||
.tc-tab-set.doc-release-tabs {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.doc-release-summary-section {
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
|
||||
.doc-release-section {
|
||||
border: 1px solid #e8e8e8;
|
||||
border-radius: 0.5em;
|
||||
margin: 0.75em 0;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.doc-release-section-summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.5em 0.75em;
|
||||
font-weight: 600;
|
||||
background: #f1f1f1;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
border: none;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
border-radius: 0.5em 0.5em 0 0;
|
||||
}
|
||||
|
||||
.doc-release-section-toggle {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.doc-release-section-summary-text {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.doc-release-section-count {
|
||||
font-weight: normal;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.doc-release-credits {
|
||||
margin: 0.75em 0;
|
||||
}
|
||||
|
||||
.doc-release-section-body {
|
||||
padding: 0.5em 0.75em;
|
||||
}
|
||||
|
||||
.doc-release-note-heading {
|
||||
}
|
||||
|
||||
@@ -84,3 +135,56 @@ type: text/vnd.tiddlywiki
|
||||
padding: 0.25em;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.doc-impact-note-item {
|
||||
border: 1px solid #e8e8e8;
|
||||
border-radius: 0.5em;
|
||||
margin: 0.5em 0;
|
||||
padding: 0.5em;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.doc-impact-note-heading {
|
||||
font-weight: 600;
|
||||
margin: 0 0 0.25em 0;
|
||||
padding: 0.25em 0.5em;
|
||||
border-radius: 0.25em;
|
||||
}
|
||||
|
||||
.doc-impact-note-item > .doc-change-note-item {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.doc-impact-note-details {
|
||||
font-size: 0.9em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.doc-impact-note-change {
|
||||
display: flex;
|
||||
gap: 0.5em;
|
||||
align-items: baseline;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.doc-impact-note-change-caption {
|
||||
text-transform: uppercase;
|
||||
font-size: 0.7em;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.doc-impact-note-change-link {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.doc-change-note-description-link {
|
||||
font-weight: inherit;
|
||||
color: inherit;
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
|
||||
.doc-change-note-description-link:hover {
|
||||
text-decoration-style: solid;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
title: $:/tw5.com/releases/info/summary-lists
|
||||
type: text/vnd.tiddlywiki
|
||||
highlights/5.4.0: [[$:/changenotes/5.4.0/#9055]] [[$:/changenotes/5.4.0/#9641]] [[$:/changenotes/5.4.0/#8972]]
|
||||
big-bug-fixes/5.4.0: [[$:/changenotes/5.4.0/#9259]]
|
||||
clearing-the-decks/5.4.0:
|
||||
@@ -0,0 +1,14 @@
|
||||
title: $:/tw5.com/releases/tab-template
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<%if [<currentTab>match[Summary]] %>
|
||||
<<summary-tab>>
|
||||
<%elseif [<currentTab>match[Change Types]] %>
|
||||
<<change-types-tab>>
|
||||
<%elseif [<currentTab>match[Change Categories]] %>
|
||||
<<change-categories-tab>>
|
||||
<%elseif [<currentTab>match[Impacts]] %>
|
||||
<<impacts-tab>>
|
||||
<%elseif [<currentTab>match[Credits]] %>
|
||||
<<credits-tab>>
|
||||
<%endif%>
|
||||
@@ -0,0 +1,6 @@
|
||||
title: $:/tw5.com/releases/ViewTemplate/body/changenote
|
||||
|
||||
\whitespace trim
|
||||
<$let change=<<currentTiddler>> show-type-badge="yes" show-category-badge="yes" show-change-impacts="yes">
|
||||
<<change-note-item>>
|
||||
</$let>
|
||||
@@ -0,0 +1,6 @@
|
||||
title: $:/tw5.com/releases/ViewTemplateBodyFilters
|
||||
tags: $:/tags/ViewTemplateBodyFilter
|
||||
list-before:
|
||||
|
||||
[tag[$:/tags/ChangeNote]then[$:/tw5.com/releases/ViewTemplate/body/changenote]]
|
||||
[tag[$:/tags/ImpactNote]then[$:/tw5.com/releases/ViewTemplate/body/impactnote]]
|
||||
@@ -0,0 +1,6 @@
|
||||
title: $:/tw5.com/releases/ViewTemplate/body/impactnote
|
||||
|
||||
\whitespace trim
|
||||
<$let impact=<<currentTiddler>> show-tiddler-link="yes">
|
||||
<<impact-note-item>>
|
||||
</$let>
|
||||
@@ -1,6 +0,0 @@
|
||||
created: 20230726145210484
|
||||
modified: 20260130210336084
|
||||
title: Behaviour of called variables depends on how the variable was declared
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
See [[Behaviour of called variables depends on how the variable was declared]].
|
||||
@@ -8,4 +8,6 @@ type: text/vnd.tiddlywiki
|
||||
|!how declared|!behaviour|
|
||||
|\define|Textual substitution of parameters is performed on the body text. No further processing takes place. The result after textual substitution is used as the attribute's value|
|
||||
|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Body text is retrieved as-is and used as the attribute's value.|
|
||||
|\function|When a function (e.g. `.myfun`) is invoked as `<div class=<<.myfun>>/>`, it is a synonym for `<div class={{{[function[.myfun]]}}}/>`. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded. That first result is used as the attribute's value. Note that functions are recursively processed even when invoked in this form. In other words a filter expression in a function can invoke another function and the processing will continue|
|
||||
|\function|When a function (e.g. `.myfun`) is invoked as `<div class=<<.myfun>>/>`, it is a synonym for `<div class={{{[function[.myfun]]}}}/>`. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded. That first result is used as the attribute's value. Note that functions are recursively processed even when invoked in this form. In other words a filter expression in a function can invoke another function and the processing will continue|
|
||||
|
||||
<<.from-version "5.4.0">> Using the [[multi-valued variable attribute|Multi-Valued Variable Attribute Values]] syntax `((var))` instead of `<<var>>` passes the complete list of values to the attribute rather than just the first value. This is primarily useful for passing [[multi-valued variables|Multi-Valued Variables]] to procedure and function parameters via the TranscludeWidget.
|
||||
@@ -59,14 +59,57 @@ For example:
|
||||
```
|
||||
\function myfunc(tiddlers) [(tiddlers)sort[]]
|
||||
|
||||
<$let varname={{{ [all[tiddlers]limit[50]] }}}>
|
||||
<$let varname={{{ [all[tiddlers]limit[50]] }}}>
|
||||
<$text text={{{ [function[myfunc],(varname)] +[join[-]] }}}/>
|
||||
</$let>
|
||||
```
|
||||
|
||||
! Examples
|
||||
!! Passing Multi-Valued Variables to Procedures and Functions
|
||||
|
||||
For example:
|
||||
<<.from-version "5.4.0">> Multi-valued variables can be passed to procedures and functions using the `((var))` syntax in [[widget attributes|Multi-Valued Variable Attribute Values]]. This is the multi-valued counterpart of the `<<var>>` syntax:
|
||||
|
||||
```
|
||||
\procedure showItems(itemList)
|
||||
<$text text={{{ [(itemList)join[-]] }}}/>
|
||||
\end
|
||||
|
||||
<$let items={{{ [all[tiddlers]sort[]] }}}>
|
||||
<$transclude $variable="showItems" itemList=((items))/>
|
||||
</$let>
|
||||
```
|
||||
|
||||
The `((var))` syntax can also be used in procedure and function parameter defaults:
|
||||
|
||||
```
|
||||
\procedure showItems(itemList:((defaults)))
|
||||
<$text text={{{ [(itemList)join[-]] }}}/>
|
||||
\end
|
||||
```
|
||||
|
||||
! Displaying Multi-Valued Variables
|
||||
|
||||
<<.from-version "5.4.0">> Multi-valued variables can be displayed inline in wikitext using the `((var))` syntax. The values are joined with a comma and space by default:
|
||||
|
||||
```
|
||||
<$let items={{{ [all[tiddlers]sort[]] }}}>
|
||||
((items))
|
||||
</$let>
|
||||
```
|
||||
|
||||
A custom separator can be specified using the `||` delimiter:
|
||||
|
||||
```
|
||||
((items||:))
|
||||
```
|
||||
|
||||
A similar syntax with triple round brackets is available for displaying the results of a filter expression:
|
||||
|
||||
```
|
||||
((( [all[tiddlers]sort[]] )))
|
||||
((( [all[tiddlers]sort[]] ||: )))
|
||||
```
|
||||
|
||||
! Examples
|
||||
|
||||
```
|
||||
<$let varname={{{ [all[tiddlers]sort[]] }}}>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: link
|
||||
created: 20131024141900000
|
||||
modified: 20250720025154474
|
||||
modified: 20260206131722044
|
||||
tags: Widgets
|
||||
title: LinkWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -27,6 +27,8 @@ The content of the link widget is rendered within the `<a>` tag representing the
|
||||
|data-* |<<.from-version "5.3.2">> Optional [[data attributes|https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes]] to be assigned to the HTML element |
|
||||
|style.* |<<.from-version "5.3.2">> Optional [[CSS properties|https://developer.mozilla.org/en-US/docs/Web/CSS/Reference]] to be assigned to the HTML element |
|
||||
|aria-* |<<.from-version "5.4.0">> Optional [[ARIA attributes|https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes]] to be assigned to the HTML element |
|
||||
|startactions |<<.from-version "5.4.0">> Optional action string that gets invoked when ''dragging starts''. The <<.var actionTiddler>> variable is available in this action.|
|
||||
|endactions |<<.from-version "5.4.0">> Optional action string that gets invoked when ''dragging ends''. The <<.var actionTiddler>> variable is available in this action. |
|
||||
|
||||
The draggable functionality is equivalent to using the DraggableWidget with the ''tiddler'' attribute set to the link target.
|
||||
|
||||
@@ -67,6 +69,19 @@ A useful convention is to set the tooltip like this:
|
||||
|
||||
This causes the tooltip to be the ''tooltip'' field of the target tiddler. If the field isn't present, then the title is used instead.
|
||||
|
||||
! Action Variables
|
||||
|
||||
<<.from-version "5.4.0">> The <<.var actionTiddler>> variable is available to <<.param startaction>> and <<.param endaction>>.
|
||||
|
||||
To see all variables available to an action you can use this code and see the variables in the browser dev-console (F12)
|
||||
|
||||
<<wikitext-example-without-html """\procedure endActions()
|
||||
<$action-log/>
|
||||
\end
|
||||
|
||||
<$link to=HelloThere endactions=<<endActions>>>drag me!</$link>
|
||||
""">>
|
||||
|
||||
! CSS Classes
|
||||
|
||||
The link widget automatically determines and applies the following classes to links:
|
||||
@@ -95,7 +110,7 @@ The following process is used to generate the `href` attribute of the generated
|
||||
# If <<.vlink tv-wikilink-template>> is defined it is treated as a specialised macro body that can perform limited conversion of the target tiddler title to the `href` value
|
||||
# Otherwise, the target tiddler title is URI encoded to create the `href`
|
||||
|
||||
! Configuration variables
|
||||
! Configuration Variables
|
||||
|
||||
* <<.vlink tv-wikilinks>>
|
||||
* <<.vlink tv-filter-export-link>>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
created: 20250208120000000
|
||||
modified: 20250208120000000
|
||||
tags: WikiText [[Widget Attributes]]
|
||||
title: Multi-Valued Variable Attribute Values
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.4.0">> Multi-valued variable attribute values are indicated with double round brackets around the variable name. This passes the complete list of values of a [[multi-valued variable|Multi-Valued Variables]] to the attribute, rather than just the first value.
|
||||
|
||||
```
|
||||
<$transclude $variable="myproc" items=((myvar))/>
|
||||
```
|
||||
|
||||
This is the multi-valued counterpart to the [[Variable Attribute Values]] syntax `<<var>>`, which only returns the first value for backwards compatibility. The relationship mirrors the existing convention in filter operands where `<var>` returns a single value and `(var)` returns all values.
|
||||
|
||||
! Non-MVV-Aware Attributes
|
||||
|
||||
When `((var))` is used on a widget attribute that does not support multi-valued variables (such as the `text` attribute of the TextWidget), only the first value is used:
|
||||
|
||||
```
|
||||
<$text text=((myvar))/>
|
||||
```
|
||||
|
||||
! Passing Multi-Valued Variables to Procedures
|
||||
|
||||
The primary use case for this syntax is passing multi-valued variables through the `$transclude` pipeline to procedures and functions:
|
||||
|
||||
```
|
||||
\procedure showItems(itemList)
|
||||
<$text text={{{ [(itemList)join[-]] }}}/>
|
||||
\end
|
||||
|
||||
<$let items={{{ [all[tiddlers]sort[]] }}}>
|
||||
<$transclude $variable="showItems" itemList=((items))/>
|
||||
</$let>
|
||||
```
|
||||
|
||||
In this example, the complete list of tiddler titles stored in `items` is passed to the `itemList` parameter of the `showItems` procedure.
|
||||
@@ -62,6 +62,28 @@ or, when used with a template, `{{{ [tag[mechanism]]||TemplateTitle }}}` expands
|
||||
|
||||
<<.tip "Install the //Internals// plugin to enable the display of the generated widget tree in the preview pane of the editor">>
|
||||
|
||||
!! Multi-Valued Variable Display
|
||||
|
||||
<<.from-version "5.4.0">> The `((var))` syntax can be used inline to display the values of a [[multi-valued variable|Multi-Valued Variables]], joined with a comma and space by default:
|
||||
|
||||
```
|
||||
((myvar))
|
||||
((myvar||:))
|
||||
```
|
||||
|
||||
The optional `||` delimiter specifies a custom separator string.
|
||||
|
||||
!! Inline Filter Display
|
||||
|
||||
<<.from-version "5.4.0">> The `(((filter)))` syntax displays the results of a filter expression inline, joined with a comma and space by default:
|
||||
|
||||
```
|
||||
((( [all[tiddlers]sort[]] )))
|
||||
((( [all[tiddlers]sort[]] ||: )))
|
||||
```
|
||||
|
||||
The optional `||` delimiter specifies a custom separator string. This is the inline display counterpart to the filtered transclusion `{{{ }}}` syntax.
|
||||
|
||||
---
|
||||
|
||||
See also:
|
||||
|
||||
@@ -11,6 +11,7 @@ Attributes of [[HTML elements|HTML in WikiText]] and widgets can be specified in
|
||||
* [[a transclusion of a macro/variable|Variable 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.4.0">> [[as a multi-valued variable reference|Multi-Valued Variable Attribute Values]]
|
||||
|
||||
|attribute type|syntax|h
|
||||
|literal |single, double or triple quotes or no quotes for values without spaces |
|
||||
@@ -18,9 +19,10 @@ Attributes of [[HTML elements|HTML in WikiText]] and widgets can be specified in
|
||||
|variable |double angle brackets around a macro or variable invocation |
|
||||
|filtered |triple curly braces around a filter expression|
|
||||
|substituted|single or triple backticks around the text to be processed for substitutions|
|
||||
|multi-valued variable |double round brackets around a variable name |
|
||||
|
||||
|
||||
<$list filter="[[Literal Attribute Values]] [[Transcluded Attribute Values]] [[Variable Attribute Values]] [[Filtered Attribute Values]] [[Substituted Attribute Values]]">
|
||||
<$list filter="[[Literal Attribute Values]] [[Transcluded Attribute Values]] [[Variable Attribute Values]] [[Filtered Attribute Values]] [[Substituted Attribute Values]] [[Multi-Valued Variable Attribute Values]]">
|
||||
<$link><h1><$text text=<<currentTiddler>>/></h1></$link>
|
||||
<$transclude mode="block"/>
|
||||
</$list>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"tiddlywiki/confetti",
|
||||
"tiddlywiki/dynannotate",
|
||||
"tiddlywiki/tour",
|
||||
"tiddlywiki/dom-to-image"
|
||||
"tiddlywiki/internals",
|
||||
"tiddlywiki/menubar",
|
||||
"tiddlywiki/railroad"
|
||||
|
||||
@@ -58,7 +58,7 @@ js.configs.recommended,
|
||||
"array-callback-return": "off",
|
||||
"@stylistic/array-element-newline": "off",
|
||||
"arrow-body-style": "error",
|
||||
"@stylistic/arrow-parens": ["error", "as-needed"],
|
||||
"@stylistic/arrow-parens": ["error", "always"],
|
||||
"@stylistic/arrow-spacing": ["error", {
|
||||
after: true,
|
||||
before: true,
|
||||
|
||||
@@ -6,6 +6,7 @@ Appearance/Caption: Design
|
||||
Appearance/Hint: Möglichkeiten um das Aussehen Ihres ~TiddlyWikis anzupassen.
|
||||
Basics/AnimDuration/Prompt: Dauer der Animation
|
||||
Basics/AutoFocus/Prompt: Standard Fokus Feld für neue Tiddler
|
||||
Basics/AutoFocusEdit/Prompt: Standard Fokus Feld für bestehende Tiddler
|
||||
Basics/Caption: Basis
|
||||
Basics/DefaultTiddlers/BottomHint: Verwenden Sie [[doppelte eckige Klammern]] für Titel mit Leerzeichen oder wählen Sie {{Offene Tiddler beim Laden wiederherstellen.||$:/snippets/retain-story-ordering-button}}
|
||||
Basics/DefaultTiddlers/Prompt: Standard-Tiddler
|
||||
@@ -96,12 +97,12 @@ Plugins/PluginWillRequireReload: ("reload" ist nötig)
|
||||
Plugins/Plugins/Caption: Plugins
|
||||
Plugins/Plugins/Hint: Erweiterungen
|
||||
Plugins/Reinstall/Caption: erneut installieren
|
||||
Plugins/Themes/Caption: Themes
|
||||
Plugins/Themes/Hint: Theme Erweiterungen
|
||||
Plugins/Stability/Deprecated: ABGEKÜNDIGT
|
||||
Plugins/Stability/Experimental: EXPERIMENTELL
|
||||
Plugins/Stability/Legacy: VERALTET
|
||||
Plugins/Stability/Stable: STABIL
|
||||
Plugins/Themes/Caption: Themes
|
||||
Plugins/Themes/Hint: Theme Erweiterungen
|
||||
Plugins/Update/Caption: aktualisieren
|
||||
Plugins/Updates/Caption: Aktualisieren
|
||||
Plugins/Updates/Hint: Verfügbare Erweiterungen zu bereits installierten "Plugins"
|
||||
@@ -252,3 +253,6 @@ ViewTemplateSubtitle/Caption: View Template Subtitle
|
||||
ViewTemplateSubtitle/Hint: Diese Filter-Kaskade wird vom "View Template" dazu verwendet, um den "Sub-Titel" für den Tidddler Kopf auszuwählen.
|
||||
ViewTemplateTags/Caption: View Template Tags
|
||||
ViewTemplateTags/Hint: Diese Filter-Kaskade wird vom "View Template" dazu verwendet, um das Template für den Tag auszuwählen
|
||||
WikiInformation/Caption: Wiki Information
|
||||
WikiInformation/Hint: Diese Seite generiert eine Zusammenfassung wichtiger Informationen über dieses Wiki. Diese Seite kann dazu benutzt werden um Wiki Informationen mit anderen Usern auszutauschen. Zum Beispiel: Um Hilfe im TW Talk Forum zu bekommen. Es wereden ''keine'' privaten oder persönliche Daten erfasst. Keine Daten verlassen den Computer, ausser sie werden aktiv kopiert.
|
||||
WikiInformation/Drag/Caption: Ziehe diesen Link in ein anderes Wiki um die Daten zu kopieren
|
||||
4
languages/de-DE/Draft.multids
Normal file
4
languages/de-DE/Draft.multids
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/language/Draft/
|
||||
|
||||
Attribution: Entwurf: '<<draft-title>>' von {{$:/status/UserName}}
|
||||
Title: Entwurf: '<<draft-title>>'
|
||||
@@ -1,5 +1,6 @@
|
||||
title: $:/language/
|
||||
|
||||
Alerts: Hinweis
|
||||
AboveStory/ClassicPlugin/Warning: Es scheint, Sie möchten ein Plugin verwenden, dass für [[TiddlyWiki Classic|https://tiddlywiki.com/#TiddlyWikiClassic]] entwickelt wurde. Diese Plugins können jedoch mit ~TiddlyWiki Version 5 nicht verwendet werden. ~TiddlyWiki Classic plugin erkannt:
|
||||
BinaryWarning/Prompt: Dieser Tiddler enthält binäre Daten.
|
||||
ClassicWarning/Hint: Dieser Tiddler wurde im TiddlyWiki Classic Format erstellt. Dieses Format ist nur teilweise kompatibel mit TiddlyWiki Version 5. Mehr Info finden Sie unter: https://tiddlywiki.com/static/Upgrading.html
|
||||
|
||||
@@ -9,6 +9,11 @@ Advanced/ShadowInfo/NotShadow/Hint: Der Tiddler: <$link to=<<infoTiddler>>><$tex
|
||||
Advanced/ShadowInfo/Shadow/Hint: Der Tiddler: <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> ist ein Schatten-Tiddler.
|
||||
Advanced/ShadowInfo/Shadow/Source: Er ist definiert im Plugin: <$link to=<<pluginTiddler>>><$text text=<<pluginTiddler>>/></$link>.
|
||||
Advanced/ShadowInfo/OverriddenShadow/Hint: Der originale Schatten-Tiddler wurde durch diesen Tiddler überschrieben. Wenn Sie diesen Tiddler löschen, wird der originale Schatten-Tiddler wieder aktiv. Erstellen Sie vorher eventuell eine Sicherungskopie!
|
||||
Advanced/CascadeInfo/Heading: Kascade Details
|
||||
Advanced/CascadeInfo/Hint: ViewTemplate Kaskade - Filter Segmente getagged: <<tag "$:/tags/ViewTemplate">>.
|
||||
Advanced/CascadeInfo/Detail/View: Ansicht
|
||||
Advanced/CascadeInfo/Detail/ActiveCascadeFilter: Filter - Aktive Kascade
|
||||
Advanced/CascadeInfo/Detail/Template: Template
|
||||
Fields/Caption: Felder
|
||||
List/Caption: Liste
|
||||
List/Empty: Dieser Tiddler hat kein "list" Feld.
|
||||
|
||||
@@ -13,6 +13,12 @@ var TEST_WIKI_TIDDLER_FILTER = "[all[tiddlers+shadows]type[text/vnd.tiddlywiki-m
|
||||
|
||||
var widget = require("$:/core/modules/widgets/widget.js");
|
||||
|
||||
// List any wikitext tests that you want to debug here
|
||||
// Code can then check for the value of $tw.debugWikiTextTests to decide whether to trigger the debugger
|
||||
var debugTitles = [
|
||||
// "MultiValuedVariables/TranscludeParameterDirectly"
|
||||
];
|
||||
|
||||
describe("Wiki-based tests", function() {
|
||||
|
||||
// Step through the test tiddlers
|
||||
@@ -39,6 +45,10 @@ describe("Wiki-based tests", function() {
|
||||
throw "Missing 'Output' tiddler";
|
||||
}
|
||||
if(wiki.tiddlerExists("ExpectedResult")) {
|
||||
// Set the debug flag if this is one of the tests we're interested in
|
||||
if(debugTitles.indexOf(title) !== -1) {
|
||||
$tw.debugWikiTextTests = true;
|
||||
}
|
||||
// Construct the widget node
|
||||
var text = "{{Output}}\n\n";
|
||||
var widgetNode = createWidgetNode(parseText(text,wiki),wiki);
|
||||
@@ -51,6 +61,8 @@ describe("Wiki-based tests", function() {
|
||||
widgetNode.invokeActionString(wiki.getTiddlerText("Actions"));
|
||||
refreshWidgetNode(widgetNode,wrapper);
|
||||
}
|
||||
// Clear the debug flag
|
||||
$tw.debugWikiTextTests = false;
|
||||
// Test the rendering
|
||||
expect(wrapper.innerHTML).toBe(wiki.getTiddlerText("ExpectedResult"));
|
||||
}
|
||||
|
||||
@@ -1108,7 +1108,6 @@ button.tc-btn-invisible.tc-remove-tag-button {
|
||||
{{$:/themes/tiddlywiki/vanilla/sticky}}
|
||||
|
||||
.tc-tiddler-info {
|
||||
overflow: hidden;
|
||||
padding: 14px 42px 14px 42px;
|
||||
background-color: <<colour tiddler-info-background>>;
|
||||
border-top: 1px solid <<colour tiddler-info-border>>;
|
||||
|
||||
Reference in New Issue
Block a user