mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-07-18 17:48:54 +00:00
Compare commits
92
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93abfab6d9 | ||
|
|
b92b17bb67 | ||
|
|
4bf7e9d192 | ||
|
|
04cd3081e4 | ||
|
|
d27716c1e0 | ||
|
|
7f7f36d986 | ||
|
|
86a4e18134 | ||
|
|
304858c7c5 | ||
|
|
7ececf9e0f | ||
|
|
521e530e11 | ||
|
|
4c29dae4af | ||
|
|
f5317dc225 | ||
|
|
c952450c2e | ||
|
|
1eb7ec4402 | ||
|
|
869557f7d1 | ||
|
|
c9f1154643 | ||
|
|
748f04c9e3 | ||
|
|
d391595836 | ||
|
|
967140a148 | ||
|
|
95e68b0437 | ||
|
|
8ddede1611 | ||
|
|
ceb200b08c | ||
|
|
00e5f48a59 | ||
|
|
ea0e9105bc | ||
|
|
51459815ba | ||
|
|
8c62935a01 | ||
|
|
839fa2417d | ||
|
|
1b8610e4d8 | ||
|
|
ca063cbe90 | ||
|
|
7d4328b2fb | ||
|
|
1ae224ab74 | ||
|
|
c308fc44c4 | ||
|
|
aa3fb85919 | ||
|
|
bd052a33f8 | ||
|
|
bb766c36c3 | ||
|
|
566a341328 | ||
|
|
9316234001 | ||
|
|
c1cb93c9df | ||
|
|
e46361fbc0 | ||
|
|
e730836d6f | ||
|
|
d050dd30cc | ||
|
|
635f6b5e76 | ||
|
|
40d0d542f7 | ||
|
|
a66d9a596c | ||
|
|
23063ea9c8 | ||
|
|
9c1f69e9c1 | ||
|
|
6abfcb631d | ||
|
|
14b11575d0 | ||
|
|
c9b1fbbb76 | ||
|
|
27c568e53e | ||
|
|
0023d3f6fa | ||
|
|
76ebe9d8e9 | ||
|
|
40444eade5 | ||
|
|
fe8723be49 | ||
|
|
56ea0789e1 | ||
|
|
fff648b959 | ||
|
|
e1cff6068c | ||
|
|
6721164f15 | ||
|
|
3c37aa267d | ||
|
|
a603146b3c | ||
|
|
f992f4ffab | ||
|
|
dfedd8594f | ||
|
|
7a80bd4a6f | ||
|
|
82bde9bffc | ||
|
|
ea84baa5a3 | ||
|
|
a4e4d36bf6 | ||
|
|
3ed481b2e2 | ||
|
|
27c60ff58d | ||
|
|
748ef8aa8d | ||
|
|
9cfa5a29fb | ||
|
|
5ea43ce212 | ||
|
|
df6bbbdedf | ||
|
|
37a461323e | ||
|
|
b29da7baac | ||
|
|
9830d4338c | ||
|
|
75b54457ed | ||
|
|
51f322c3c6 | ||
|
|
853af2d848 | ||
|
|
2c1cb33081 | ||
|
|
75267b730a | ||
|
|
3bc78e6641 | ||
|
|
765386a4f9 | ||
|
|
ca8dcb690a | ||
|
|
99a00ab1b4 | ||
|
|
f95966d5bb | ||
|
|
3a20837c96 | ||
|
|
e3e49bb61e | ||
|
|
748969322b | ||
|
|
4611e3569f | ||
|
|
c1e145ca12 | ||
|
|
882504c8d1 | ||
|
|
b8f542458b |
@@ -3,3 +3,4 @@
|
||||
tmp/
|
||||
output/
|
||||
node_modules/
|
||||
.claude/
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
# Default to the current version number for building the plugin library
|
||||
|
||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||
TW5_BUILD_VERSION=v5.4.0
|
||||
TW5_BUILD_VERSION=v5.5.0.
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
|
||||
+60
-8
@@ -1539,8 +1539,8 @@ Register all the module tiddlers that have a module type
|
||||
$tw.Wiki.prototype.defineShadowModules = function() {
|
||||
var self = this;
|
||||
this.eachShadow(function(tiddler,title) {
|
||||
// Don't define the module if it is overidden by an ordinary tiddler
|
||||
if(!self.tiddlerExists(title) && tiddler.hasField("module-type")) {
|
||||
// Don't define the module if it is overidden by an ordinary tiddler, or has already been defined
|
||||
if(!self.tiddlerExists(title) && tiddler.hasField("module-type") && !$tw.utils.hop($tw.modules.titles,title)) {
|
||||
if(tiddler.hasField("draft.of")) {
|
||||
// Report a fundamental problem
|
||||
console.warn(`TiddlyWiki: Plugins should not contain tiddlers with a 'draft.of' field: ${tiddler.fields.title}`);
|
||||
@@ -1971,7 +1971,7 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
||||
});
|
||||
|
||||
// Helper to process a file
|
||||
var processFile = function(filename,isTiddlerFile,fields,isEditableFile,rootPath) {
|
||||
var processFile = function(filename,isTiddlerFile,fields,isEditableFile,rootPath,dynamicStoreId) {
|
||||
var extInfo = $tw.config.fileExtensionInfo[path.extname(filename)],
|
||||
type = (extInfo || {}).type || fields.type || "text/plain",
|
||||
typeInfo = $tw.config.contentTypeInfo[type] || {},
|
||||
@@ -2046,9 +2046,9 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
||||
});
|
||||
});
|
||||
if(isEditableFile) {
|
||||
tiddlers.push({filepath: pathname, hasMetaFile: !!metadata && !isTiddlerFile, isEditableFile: true, tiddlers: fileTiddlers});
|
||||
tiddlers.push({filepath: pathname, hasMetaFile: !!metadata && !isTiddlerFile, isEditableFile: true, dynamicStoreId: dynamicStoreId, tiddlers: fileTiddlers});
|
||||
} else {
|
||||
tiddlers.push({tiddlers: fileTiddlers});
|
||||
tiddlers.push({dynamicStoreId: dynamicStoreId, tiddlers: fileTiddlers});
|
||||
}
|
||||
};
|
||||
// Helper to recursively search subdirectories
|
||||
@@ -2089,6 +2089,31 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
||||
// Process directory specifier
|
||||
var dirPath = path.resolve(filepath,dirSpec.path);
|
||||
if(fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory()) {
|
||||
// Register a dynamic store if requested
|
||||
var dynamicStoreId = null;
|
||||
if(dirSpec.dynamicStore && $tw.boot.dynamicStores) {
|
||||
dynamicStoreId = dirPath;
|
||||
var existing = null;
|
||||
for(var ds=0; ds<$tw.boot.dynamicStores.length; ds++) {
|
||||
if($tw.boot.dynamicStores[ds].id === dynamicStoreId) {
|
||||
existing = $tw.boot.dynamicStores[ds];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!existing) {
|
||||
$tw.boot.dynamicStores.push({
|
||||
id: dynamicStoreId,
|
||||
directory: dirPath,
|
||||
saveFilter: dirSpec.dynamicStore.saveFilter || "",
|
||||
watch: dirSpec.dynamicStore.watch !== false,
|
||||
debounce: dirSpec.dynamicStore.debounce || 400,
|
||||
filesRegExp: dirSpec.filesRegExp || "^.*$",
|
||||
searchSubdirectories: !!dirSpec.searchSubdirectories,
|
||||
isTiddlerFile: !!dirSpec.isTiddlerFile,
|
||||
fields: dirSpec.fields || {}
|
||||
});
|
||||
}
|
||||
}
|
||||
var files = getAllFiles(dirPath, dirSpec.searchSubdirectories),
|
||||
fileRegExp = new RegExp(dirSpec.filesRegExp || "^.*$"),
|
||||
metaRegExp = /^.*\.meta$/;
|
||||
@@ -2097,7 +2122,7 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
||||
filename = path.basename(thisPath);
|
||||
if(filename !== "tiddlywiki.files" && !metaRegExp.test(filename) && fileRegExp.test(filename)) {
|
||||
dirSpec.fields = dirSpec.fields || {};
|
||||
processFile(thisPath,dirSpec.isTiddlerFile,dirSpec.fields,dirSpec.isEditableFile,dirSpec.path);
|
||||
processFile(thisPath,dirSpec.isTiddlerFile,dirSpec.fields,dirSpec.isEditableFile || !!dirSpec.dynamicStore,dirSpec.path,dynamicStoreId);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -2284,6 +2309,24 @@ $tw.loadWikiTiddlers = function(wikiPath,options) {
|
||||
$tw.loadPlugins(wikiInfo.plugins,$tw.config.pluginsPath,$tw.config.pluginsEnvVar);
|
||||
$tw.loadPlugins(wikiInfo.themes,$tw.config.themesPath,$tw.config.themesEnvVar);
|
||||
$tw.loadPlugins(wikiInfo.languages,$tw.config.languagesPath,$tw.config.languagesEnvVar);
|
||||
// Register plugin-provided tiddlerdeserializer and tiddlerserializer modules now,
|
||||
// so they are available when the wiki tiddler files are read from disk below.
|
||||
// We also apply the supporting `utils`, `tiddlerfield`, and `tiddlermethod`
|
||||
// modules so deserializers can call into them (e.g. core's text/html
|
||||
// deserializer needs $tw.utils.extractEncryptedStoreArea).
|
||||
// (All of these steps run again later in execStartup; they are idempotent.)
|
||||
$tw.wiki.readPluginInfo();
|
||||
$tw.wiki.registerPluginTiddlers("plugin");
|
||||
$tw.wiki.unpackPluginTiddlers();
|
||||
$tw.wiki.defineShadowModules();
|
||||
$tw.modules.applyMethods("utils",$tw.utils);
|
||||
if($tw.node) {
|
||||
$tw.modules.applyMethods("utils-node",$tw.utils);
|
||||
}
|
||||
$tw.Tiddler.fieldModules = $tw.modules.getModulesByTypeAsHashmap("tiddlerfield");
|
||||
$tw.modules.applyMethods("tiddlermethod",$tw.Tiddler.prototype);
|
||||
$tw.modules.applyMethods("tiddlerdeserializer",$tw.Wiki.tiddlerDeserializerModules);
|
||||
$tw.modules.applyMethods("tiddlerserializer",$tw.Wiki.tiddlerSerializerModules);
|
||||
// Load the wiki files, registering them as writable
|
||||
var resolvedWikiPath = path.resolve(wikiPath,$tw.config.wikiTiddlersSubDir);
|
||||
$tw.utils.each($tw.loadTiddlersFromPath(resolvedWikiPath),function(tiddlerFile) {
|
||||
@@ -2293,7 +2336,8 @@ $tw.loadWikiTiddlers = function(wikiPath,options) {
|
||||
filepath: tiddlerFile.filepath,
|
||||
type: tiddlerFile.type,
|
||||
hasMetaFile: tiddlerFile.hasMetaFile,
|
||||
isEditableFile: config["retain-original-tiddler-path"] || tiddlerFile.isEditableFile || tiddlerFile.filepath.indexOf($tw.boot.wikiTiddlersPath) !== 0
|
||||
isEditableFile: config["retain-original-tiddler-path"] || tiddlerFile.isEditableFile || tiddlerFile.filepath.indexOf($tw.boot.wikiTiddlersPath) !== 0,
|
||||
dynamicStoreId: tiddlerFile.dynamicStoreId || null
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -2305,7 +2349,10 @@ $tw.loadWikiTiddlers = function(wikiPath,options) {
|
||||
for(var title in $tw.boot.files) {
|
||||
fileInfo = $tw.boot.files[title];
|
||||
if(fileInfo.isEditableFile) {
|
||||
relativePath = path.relative($tw.boot.wikiTiddlersPath,fileInfo.filepath);
|
||||
// For tiddlers loaded from a dynamic store, compute originalpath relative to the store's directory
|
||||
// so that save-time path resolution against that directory yields the correct location.
|
||||
var basePath = fileInfo.dynamicStoreId || $tw.boot.wikiTiddlersPath;
|
||||
relativePath = path.relative(basePath,fileInfo.filepath);
|
||||
fileInfo.originalpath = relativePath;
|
||||
output[title] =
|
||||
path.sep === "/" ?
|
||||
@@ -2431,6 +2478,8 @@ $tw.boot.initStartup = function(options) {
|
||||
if(!$tw.boot.tasks.readBrowserTiddlers) {
|
||||
// For writable tiddler files, a hashmap of title to {filepath:,type:,hasMetaFile:}
|
||||
$tw.boot.files = Object.create(null);
|
||||
// Array of {id, directory, saveFilter, watch, debounce} registered via tiddlywiki.files dynamicStore directives
|
||||
$tw.boot.dynamicStores = [];
|
||||
// System paths and filenames
|
||||
$tw.boot.bootPath = options.bootPath || path.dirname(module.filename);
|
||||
$tw.boot.corePath = path.resolve($tw.boot.bootPath,"../core");
|
||||
@@ -2520,6 +2569,9 @@ $tw.boot.initStartup = function(options) {
|
||||
// Install the tiddler deserializer modules
|
||||
$tw.Wiki.tiddlerDeserializerModules = Object.create(null);
|
||||
$tw.modules.applyMethods("tiddlerdeserializer",$tw.Wiki.tiddlerDeserializerModules);
|
||||
// Install the tiddler serializer modules
|
||||
$tw.Wiki.tiddlerSerializerModules = Object.create(null);
|
||||
$tw.modules.applyMethods("tiddlerserializer",$tw.Wiki.tiddlerSerializerModules);
|
||||
// Call unload handlers in the browser
|
||||
if($tw.browser) {
|
||||
window.onbeforeunload = function(event) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
||||
title: TiddlyWiki Team
|
||||
tags: Community/Team
|
||||
modified: 20260708095630754
|
||||
created: 20260708095630754
|
||||
leader: @BurningTreeC
|
||||
team:
|
||||
|
||||
The TiddlyDesktop development repository is at https://github.com/TiddlyWiki/TiddlyDesktop
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -238,6 +238,10 @@ exports.generateTiddlerFileInfo = function(tiddler,options) {
|
||||
// Save as a .tid file
|
||||
fileInfo.type = "application/x-tiddler";
|
||||
fileInfo.hasMetaFile = false;
|
||||
} else if($tw.Wiki.tiddlerSerializerModules && $tw.Wiki.tiddlerSerializerModules[tiddlerType]) {
|
||||
// A serializer is registered for this content type - save as a single self-contained file
|
||||
fileInfo.type = tiddlerType;
|
||||
fileInfo.hasMetaFile = false;
|
||||
} else {
|
||||
// Save as a text/binary file and a .meta file
|
||||
fileInfo.type = tiddlerType;
|
||||
@@ -416,7 +420,16 @@ Save a tiddler to a file described by the fileInfo:
|
||||
*/
|
||||
exports.saveTiddlerToFile = function(tiddler,fileInfo,callback) {
|
||||
$tw.utils.createDirectory(path.dirname(fileInfo.filepath));
|
||||
if(fileInfo.hasMetaFile) {
|
||||
var serializer = $tw.Wiki.tiddlerSerializerModules && $tw.Wiki.tiddlerSerializerModules[fileInfo.type];
|
||||
if(serializer && !fileInfo.hasMetaFile && fileInfo.type !== "application/x-tiddler" && fileInfo.type !== "application/json") {
|
||||
var typeInfo = $tw.config.contentTypeInfo[fileInfo.type] || {encoding: "utf8"};
|
||||
fs.writeFile(fileInfo.filepath,serializer(tiddler),typeInfo.encoding,function(err) {
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
return callback(null,fileInfo);
|
||||
});
|
||||
} else if(fileInfo.hasMetaFile) {
|
||||
// Save the tiddler as a separate body and meta file
|
||||
var typeInfo = $tw.config.contentTypeInfo[tiddler.fields.type || "text/plain"] || {encoding: "utf8"};
|
||||
fs.writeFile(fileInfo.filepath,tiddler.fields.text || "",typeInfo.encoding,function(err) {
|
||||
@@ -458,7 +471,11 @@ Save a tiddler to a file described by the fileInfo:
|
||||
*/
|
||||
exports.saveTiddlerToFileSync = function(tiddler,fileInfo) {
|
||||
$tw.utils.createDirectory(path.dirname(fileInfo.filepath));
|
||||
if(fileInfo.hasMetaFile) {
|
||||
var serializer = $tw.Wiki.tiddlerSerializerModules && $tw.Wiki.tiddlerSerializerModules[fileInfo.type];
|
||||
if(serializer && !fileInfo.hasMetaFile && fileInfo.type !== "application/x-tiddler" && fileInfo.type !== "application/json") {
|
||||
var typeInfo = $tw.config.contentTypeInfo[fileInfo.type] || {encoding: "utf8"};
|
||||
fs.writeFileSync(fileInfo.filepath,serializer(tiddler),typeInfo.encoding);
|
||||
} else if(fileInfo.hasMetaFile) {
|
||||
// Save the tiddler as a separate body and meta file
|
||||
var typeInfo = $tw.config.contentTypeInfo[tiddler.fields.type || "text/plain"] || {encoding: "utf8"};
|
||||
fs.writeFileSync(fileInfo.filepath,tiddler.fields.text || "",typeInfo.encoding);
|
||||
|
||||
@@ -9,15 +9,14 @@ Serve tiddlers over http
|
||||
|
||||
"use strict";
|
||||
|
||||
let fs, url, path, querystring, crypto, zlib;
|
||||
let fs, path, crypto, zlib, URL;
|
||||
|
||||
if($tw.node) {
|
||||
fs = require("fs"),
|
||||
url = require("url"),
|
||||
path = require("path"),
|
||||
querystring = require("querystring"),
|
||||
crypto = require("crypto"),
|
||||
zlib = require("zlib");
|
||||
URL = require("url").URL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -260,8 +259,8 @@ Server.prototype.requestHandler = function(request,response,options) {
|
||||
state.wiki = options.wiki || self.wiki;
|
||||
state.boot = options.boot || self.boot;
|
||||
state.server = self;
|
||||
state.urlInfo = url.parse(request.url);
|
||||
state.queryParameters = querystring.parse(state.urlInfo.query);
|
||||
state.urlInfo = new URL(request.url, "http://localhost");
|
||||
state.queryParameters = Object.fromEntries(state.urlInfo.searchParams);
|
||||
state.pathPrefix = options.pathPrefix || this.get("path-prefix") || "";
|
||||
// Enable CORS
|
||||
if(this.corsEnable) {
|
||||
|
||||
@@ -255,4 +255,5 @@ ViewTemplateTags/Caption: View Template Tags
|
||||
ViewTemplateTags/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the tags area of a tiddler.
|
||||
WikiInformation/Caption: Wiki Information
|
||||
WikiInformation/Hint: This page summarises high level information about the configuration of this ~TiddlyWiki. It is designed to enable users to quickly share relevant aspects of the configuration of their ~TiddlyWiki with others, for example when seeking help in one of the forums. No private or personal information is included, and nothing is shared without being explicitly copied and pasted elsewhere
|
||||
WikiInformation/Drag/Caption: Drag this link to copy this tool to another wiki
|
||||
WikiInformation/Drag/Caption: Drag this link to copy this tool to another wiki
|
||||
WikiInformation/Generate/Caption: Click to generate wiki information report
|
||||
@@ -156,14 +156,13 @@ Fix the height of textarea to fit content
|
||||
FramedEngine.prototype.fixHeight = function() {
|
||||
// Make sure styles are updated
|
||||
this.copyStyles();
|
||||
// If .editRows is initialised, it takes precedence
|
||||
if(this.widget.editTag === "textarea" && !this.widget.editRows) {
|
||||
if(this.widget.editTag === "textarea") {
|
||||
if(this.widget.editAutoHeight) {
|
||||
if(this.domNode && !this.domNode.isTiddlyWikiFakeDom) {
|
||||
var newHeight = $tw.utils.resizeTextAreaToFit(this.domNode,this.widget.editMinHeight);
|
||||
this.iframeNode.style.height = newHeight + "px";
|
||||
}
|
||||
} else {
|
||||
} else if(!this.widget.editRows) {
|
||||
var fixedHeight = parseInt(this.widget.wiki.getTiddlerText(HEIGHT_VALUE_TITLE,"400px"),10);
|
||||
fixedHeight = Math.max(fixedHeight,20);
|
||||
this.domNode.style.height = fixedHeight + "px";
|
||||
|
||||
@@ -100,13 +100,12 @@ SimpleEngine.prototype.getText = function() {
|
||||
Fix the height of textarea to fit content
|
||||
*/
|
||||
SimpleEngine.prototype.fixHeight = function() {
|
||||
// If .editRows is initialised, it takes precedence
|
||||
if((this.widget.editTag === "textarea") && !this.widget.editRows) {
|
||||
if(this.widget.editTag === "textarea") {
|
||||
if(this.widget.editAutoHeight) {
|
||||
if(this.domNode && !this.domNode.isTiddlyWikiFakeDom) {
|
||||
$tw.utils.resizeTextAreaToFit(this.domNode,this.widget.editMinHeight);
|
||||
}
|
||||
} else {
|
||||
} else if(!this.widget.editRows) {
|
||||
var fixedHeight = parseInt(this.widget.wiki.getTiddlerText(HEIGHT_VALUE_TITLE,"400px"),10);
|
||||
fixedHeight = Math.max(fixedHeight,20);
|
||||
this.domNode.style.height = fixedHeight + "px";
|
||||
|
||||
@@ -22,12 +22,11 @@ exports.tag = function(source,operator,options) {
|
||||
});
|
||||
} else {
|
||||
// Old semantics:
|
||||
var tiddlers;
|
||||
if(operator.prefix === "!") {
|
||||
// Returns a copy of the input if operator.operand is missing
|
||||
tiddlers = options.wiki.getTiddlersWithTag(operator.operand);
|
||||
const excludeTagSet = new Set(options.wiki.getTiddlersWithTag(operator.operand));
|
||||
source(function(tiddler,title) {
|
||||
if(tiddlers.indexOf(title) === -1) {
|
||||
if(!excludeTagSet.has(title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
@@ -39,9 +38,9 @@ exports.tag = function(source,operator,options) {
|
||||
return indexedResults;
|
||||
}
|
||||
} else {
|
||||
tiddlers = options.wiki.getTiddlersWithTag(operator.operand);
|
||||
const includeTagSet = new Set(options.wiki.getTiddlersWithTag(operator.operand));
|
||||
source(function(tiddler,title) {
|
||||
if(tiddlers.indexOf(title) !== -1) {
|
||||
if(includeTagSet.has(title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -88,10 +88,11 @@ BackSubIndexer.prototype.update = function(updateDescriptor) {
|
||||
var newTargets = [],
|
||||
oldTargets = [],
|
||||
self = this;
|
||||
if(updateDescriptor.old.exists) {
|
||||
// System tiddlers are never indexed as sources, matching the _init() scan
|
||||
if(updateDescriptor.old.exists && !this.wiki.isSystemTiddler(updateDescriptor.old.tiddler.fields.title)) {
|
||||
oldTargets = this._getTarget(updateDescriptor.old.tiddler);
|
||||
}
|
||||
if(updateDescriptor.new.exists) {
|
||||
if(updateDescriptor.new.exists && !this.wiki.isSystemTiddler(updateDescriptor.new.tiddler.fields.title)) {
|
||||
newTargets = this._getTarget(updateDescriptor.new.tiddler);
|
||||
}
|
||||
|
||||
|
||||
@@ -327,7 +327,7 @@ exports.parseMacroParameterAsAttribute = function(source,pos) {
|
||||
// Define our regexps
|
||||
var reAttributeName = /([^\/\s>"'`=:]+)/y,
|
||||
reStrictIdentifier = /^[A-Za-z0-9\-_]+$/,
|
||||
reUnquotedAttribute = /((?:(?:>(?!>))|[^\s>"'])+)/y,
|
||||
reUnquotedAttribute = /(?!<<)((?:(?:>(?!>))|[^\s>"'])+)/y,
|
||||
reFilteredValue = /\{\{\{([\S\s]+?)\}\}\}/y,
|
||||
reIndirectValue = /\{\{([^\}]+)\}\}/y,
|
||||
reSubstitutedValue = /(?:```([\s\S]*?)```|`([^`]|[\S\s]*?)`)/y;
|
||||
@@ -528,64 +528,79 @@ exports.parseAttribute = function(source,pos) {
|
||||
pos = token.end;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for a string literal
|
||||
var stringLiteral = $tw.utils.parseStringLiteral(source,pos);
|
||||
if(stringLiteral) {
|
||||
pos = stringLiteral.end;
|
||||
node.type = "string";
|
||||
node.value = stringLiteral.value;
|
||||
} else {
|
||||
do {
|
||||
// Look for a string literal
|
||||
var stringLiteral = $tw.utils.parseStringLiteral(source,pos);
|
||||
if(stringLiteral) {
|
||||
pos = stringLiteral.end;
|
||||
node.type = "string";
|
||||
node.value = stringLiteral.value;
|
||||
break;
|
||||
}
|
||||
|
||||
// Look for a filtered value
|
||||
var filteredValue = $tw.utils.parseTokenRegExp(source,pos,reFilteredValue);
|
||||
if(filteredValue) {
|
||||
pos = filteredValue.end;
|
||||
node.type = "filtered";
|
||||
node.filter = filteredValue.match[1];
|
||||
} else {
|
||||
// Look for an indirect value
|
||||
var indirectValue = $tw.utils.parseTokenRegExp(source,pos,reIndirectValue);
|
||||
if(indirectValue) {
|
||||
pos = indirectValue.end;
|
||||
node.type = "indirect";
|
||||
node.textReference = indirectValue.match[1];
|
||||
} else {
|
||||
// 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 an MVV reference value
|
||||
var mvvReference = $tw.utils.parseMVVReferenceAsTransclusion(source,pos);
|
||||
if(mvvReference) {
|
||||
pos = mvvReference.end;
|
||||
node.type = "macro";
|
||||
node.value = mvvReference;
|
||||
node.isMVV = true;
|
||||
} else {
|
||||
var substitutedValue = $tw.utils.parseTokenRegExp(source,pos,reSubstitutedValue);
|
||||
if(substitutedValue) {
|
||||
pos = substitutedValue.end;
|
||||
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 {
|
||||
node.type = "string";
|
||||
node.value = "true";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Look for an indirect value
|
||||
var indirectValue = $tw.utils.parseTokenRegExp(source,pos,reIndirectValue);
|
||||
if(indirectValue) {
|
||||
pos = indirectValue.end;
|
||||
node.type = "indirect";
|
||||
node.textReference = indirectValue.match[1];
|
||||
break;
|
||||
}
|
||||
|
||||
// Look for a macro invocation value
|
||||
var macroInvocation = $tw.utils.parseMacroInvocationAsTransclusion(source,pos);
|
||||
if(macroInvocation) {
|
||||
pos = macroInvocation.end;
|
||||
node.type = "macro";
|
||||
node.value = macroInvocation;
|
||||
break;
|
||||
}
|
||||
|
||||
// Look for an MVV reference value
|
||||
var mvvReference = $tw.utils.parseMVVReferenceAsTransclusion(source,pos);
|
||||
if(mvvReference) {
|
||||
pos = mvvReference.end;
|
||||
node.type = "macro";
|
||||
node.value = mvvReference;
|
||||
node.isMVV = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// Look for a substituted value
|
||||
var substitutedValue = $tw.utils.parseTokenRegExp(source,pos,reSubstitutedValue);
|
||||
if(substitutedValue) {
|
||||
pos = substitutedValue.end;
|
||||
node.type = "substituted";
|
||||
node.rawValue = substitutedValue.match[1] || substitutedValue.match[2];
|
||||
break;
|
||||
}
|
||||
|
||||
// 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];
|
||||
break;
|
||||
}
|
||||
|
||||
if(source.charAt(pos) === "<" && source.charAt(pos + 1) === "<" && source.indexOf(">>",pos) !== -1) {
|
||||
// Value looks like a macro invocation (starts with << with a closing >> ahead) but does not parse as one. Return null so the enclosing tag fails to parse rather than silently binding the attribute to "true" and treating the remainder as further attributes (restores v5.3.8 behaviour)
|
||||
return null;
|
||||
}
|
||||
|
||||
node.type = "string";
|
||||
node.value = "true";
|
||||
} while(false);
|
||||
} else {
|
||||
// If there is no equals sign or colon, then this is an attribute with no value, defaulting to "true"
|
||||
node.type = "string";
|
||||
|
||||
@@ -31,13 +31,16 @@ exports.parse = function() {
|
||||
reEnd.lastIndex = this.parser.pos;
|
||||
var match = reEnd.exec(this.parser.source),
|
||||
text,
|
||||
start = this.parser.pos;
|
||||
start = this.parser.pos,
|
||||
textEnd;
|
||||
// Process the text
|
||||
if(match) {
|
||||
text = this.parser.source.substring(this.parser.pos,match.index);
|
||||
textEnd = match.index;
|
||||
this.parser.pos = match.index + match[0].length;
|
||||
} else {
|
||||
text = this.parser.source.substr(this.parser.pos);
|
||||
textEnd = this.parser.sourceLength;
|
||||
this.parser.pos = this.parser.sourceLength;
|
||||
}
|
||||
return [{
|
||||
@@ -47,7 +50,7 @@ exports.parse = function() {
|
||||
type: "text",
|
||||
text: text,
|
||||
start: start,
|
||||
end: this.parser.pos
|
||||
end: textEnd
|
||||
}]
|
||||
}];
|
||||
};
|
||||
|
||||
@@ -32,7 +32,8 @@ exports.parse = function() {
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Create the link unless it is suppressed
|
||||
if(this.match[0].substr(0,1) === "~") {
|
||||
return [{type: "text", text: this.match[0].substr(1), start: start, end: this.parser.pos}];
|
||||
// Start after the suppressing "~" so the span matches the plain text
|
||||
return [{type: "text", text: this.match[0].substr(1), start: start + 1, end: this.parser.pos}];
|
||||
} else {
|
||||
return [{
|
||||
type: "element",
|
||||
|
||||
@@ -34,7 +34,7 @@ exports.parse = function() {
|
||||
// Parse the filter terminated by a line break
|
||||
var reMatch = /(.*)(?:$|\r?\n)/mg;
|
||||
reMatch.lastIndex = this.parser.pos;
|
||||
var filterStart = this.parser.source;
|
||||
var filterStart = this.parser.pos;
|
||||
var match = reMatch.exec(this.parser.source);
|
||||
this.parser.pos = reMatch.lastIndex;
|
||||
// Parse tree nodes to return
|
||||
|
||||
@@ -27,9 +27,11 @@ Parse the most recent match
|
||||
*/
|
||||
exports.parse = function() {
|
||||
// Get the details of the match
|
||||
var linkText = this.match[0];
|
||||
var linkText = this.match[0],
|
||||
// Start after the suppressing "~" so the span matches the plain text
|
||||
start = this.parser.pos + 1;
|
||||
// Move past the wikilink
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Return the link without unwikilink character as plain text
|
||||
return [{type: "text", text: linkText.substr(1)}];
|
||||
return [{type: "text", text: linkText.substr(1), start: start, end: this.parser.pos}];
|
||||
};
|
||||
|
||||
@@ -34,12 +34,15 @@ exports.startup = function() {
|
||||
$tw.modules.applyMethods("wikimethod",$tw.Wiki.prototype);
|
||||
$tw.wiki.addIndexersToWiki();
|
||||
$tw.modules.applyMethods("tiddlerdeserializer",$tw.Wiki.tiddlerDeserializerModules);
|
||||
$tw.modules.applyMethods("tiddlerserializer",$tw.Wiki.tiddlerSerializerModules);
|
||||
$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
|
||||
// --------------------------
|
||||
// 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",
|
||||
@@ -48,8 +51,6 @@ exports.startup = function() {
|
||||
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) {
|
||||
|
||||
@@ -15,7 +15,8 @@ var getCellInfo = function(text, start, length, SEPARATOR) {
|
||||
var isCellQuoted = text.charAt(start) === QUOTE;
|
||||
var cellStart = isCellQuoted ? start + 1 : start;
|
||||
|
||||
if(text.charAt(i) === SEPARATOR) {
|
||||
// A quote licenses a separator inside the cell, so only an unquoted cell reads an immediate separator as empty
|
||||
if(!isCellQuoted && text.charAt(cellStart) === SEPARATOR) {
|
||||
return [cellStart, cellStart, false];
|
||||
}
|
||||
|
||||
|
||||
@@ -3,18 +3,43 @@ title: $:/core/modules/utils/deprecated.js
|
||||
type: application/javascript
|
||||
module-type: utils
|
||||
|
||||
Deprecated util functions
|
||||
Deprecated util functions. These preserve the pre-5.4.0 signatures and
|
||||
behaviour for backwards compatibility with plugins and external scripts.
|
||||
Prefer modern alternatives in new code (Array.prototype methods, classList,
|
||||
Math.sign, String.prototype.repeat, etc.).
|
||||
|
||||
\*/
|
||||
|
||||
exports.logTable = (data) => console.table(data);
|
||||
|
||||
exports.repeat = (str,count) => str.repeat(count);
|
||||
/*
|
||||
Repeats a string
|
||||
*/
|
||||
exports.repeat = function(str,count) {
|
||||
var result = "";
|
||||
for(var t=0;t<count;t++) {
|
||||
result += str;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
exports.startsWith = (str,search) => str.startsWith(search);
|
||||
/*
|
||||
Check if a string starts with another string
|
||||
*/
|
||||
exports.startsWith = function(str,search) {
|
||||
return str.substring(0, search.length) === search;
|
||||
};
|
||||
|
||||
exports.endsWith = (str,search) => str.endsWith(search);
|
||||
/*
|
||||
Check if a string ends with another string
|
||||
*/
|
||||
exports.endsWith = function(str,search) {
|
||||
return str.substring(str.length - search.length) === search;
|
||||
};
|
||||
|
||||
/*
|
||||
Trim whitespace from the start and end of a string
|
||||
*/
|
||||
exports.trim = function(str) {
|
||||
if(typeof str === "string") {
|
||||
return str.trim();
|
||||
@@ -29,30 +54,54 @@ exports.sign = Math.sign;
|
||||
|
||||
exports.strEndsWith = (str,ending,position) => str.endsWith(ending,position);
|
||||
|
||||
exports.stringifyNumber = (num) => num.toString();
|
||||
exports.stringifyNumber = function(num) {
|
||||
return num + "";
|
||||
};
|
||||
|
||||
// Returns the fully escaped CSS selector for a tag, e.g.
|
||||
// "$:/tags/Stylesheet" -> "tc-tagged-\%24\%3A\%2Ftags\%2FStylesheet"
|
||||
exports.tagToCssSelector = function(tagName) {
|
||||
return "tc-tagged-" + encodeURIComponent(tagName).replace(/[!"#$%&'()*+,\-./:;<=>?@[\\\]^`{\|}~,]/mg,function(c) {
|
||||
return "\\" + c;
|
||||
});
|
||||
};
|
||||
|
||||
exports.domContains = (a,b) => a.compareDocumentPosition(b) & 16;
|
||||
/*
|
||||
Determines whether element 'a' contains element 'b'.
|
||||
Returns false when a === b (matches the original John Resig semantics).
|
||||
*/
|
||||
exports.domContains = function(a,b) {
|
||||
return a !== b && a.contains(b);
|
||||
};
|
||||
|
||||
exports.domMatchesSelector = (node,selector) => node.matches(selector);
|
||||
|
||||
exports.hasClass = (el,className) => el.classList && el.classList.contains(className);
|
||||
exports.hasClass = function(el,className) {
|
||||
return !!(el && el.classList && el.classList.contains(className));
|
||||
};
|
||||
|
||||
// addClass/removeClass/toggleClass split on whitespace to preserve the
|
||||
// original setAttribute("class", ...) acceptance of "foo bar" as two
|
||||
// classes. Regressed in #9251.
|
||||
function splitClasses(className) {
|
||||
return (typeof className === "string" && className.match(/\S+/g)) || [];
|
||||
}
|
||||
|
||||
exports.addClass = function(el,className) {
|
||||
el.classList && className && el.classList.add(className);
|
||||
if(!el.classList) return;
|
||||
splitClasses(className).forEach(function(c) { el.classList.add(c); });
|
||||
};
|
||||
|
||||
exports.removeClass = function(el,className) {
|
||||
el.classList && className && el.classList.remove(className);
|
||||
if(!el.classList) return;
|
||||
splitClasses(className).forEach(function(c) { el.classList.remove(c); });
|
||||
};
|
||||
|
||||
exports.toggleClass = function(el,className,status) {
|
||||
el.classList && className && el.classList.toggle(className, status);
|
||||
if(!el.classList) return;
|
||||
splitClasses(className).forEach(function(c) { el.classList.toggle(c,status); });
|
||||
};
|
||||
|
||||
exports.getLocationPath = () => window.location.origin + window.location.pathname;
|
||||
exports.getLocationPath = function() {
|
||||
return window.location.toString().split("#")[0];
|
||||
};
|
||||
|
||||
@@ -77,10 +77,23 @@ exports.resizeTextAreaToFit = function(domNode,minHeight) {
|
||||
// Measure the specified minimum height
|
||||
domNode.style.height = minHeight;
|
||||
var measuredHeight = domNode.offsetHeight || parseInt(minHeight,10);
|
||||
// Temporarily force rows=1 during auto-measurement so the intrinsic floor
|
||||
// is one row rather than the HTML default of two; restore afterwards
|
||||
var hadRowsAttr = domNode.hasAttribute("rows"),
|
||||
savedRows = hadRowsAttr ? domNode.getAttribute("rows") : null;
|
||||
if(!hadRowsAttr) {
|
||||
domNode.setAttribute("rows","1");
|
||||
}
|
||||
// Set its height to auto so that it snaps to the correct height
|
||||
domNode.style.height = "auto";
|
||||
// Calculate the revised height
|
||||
var newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,measuredHeight);
|
||||
// Restore the original rows attribute state
|
||||
if(!hadRowsAttr) {
|
||||
domNode.removeAttribute("rows");
|
||||
} else {
|
||||
domNode.setAttribute("rows",savedRows);
|
||||
}
|
||||
// Only try to change the height if it has changed
|
||||
if(newHeight !== domNode.offsetHeight) {
|
||||
domNode.style.height = newHeight + "px";
|
||||
|
||||
@@ -82,6 +82,11 @@ var TW_Style = function(el) {
|
||||
// Return a Proxy to handle direct access to individual style properties
|
||||
return new Proxy(styleObject, {
|
||||
get: function(target, property) {
|
||||
// Real CSSStyleDeclaration returns undefined for non-string keys.
|
||||
// Guards against crashes when consumers probe Symbol.toPrimitive etc.
|
||||
if(typeof property !== "string") {
|
||||
return undefined;
|
||||
}
|
||||
// If the property exists on styleObject, return it (get, set, setProperty methods)
|
||||
if(property in target) {
|
||||
return target[property];
|
||||
@@ -90,6 +95,10 @@ var TW_Style = function(el) {
|
||||
return el._style[$tw.utils.convertStyleNameToPropertyName(property)] || "";
|
||||
},
|
||||
set: function(target, property, value) {
|
||||
// Mirror the get trap: ignore non-string keys instead of crashing.
|
||||
if(typeof property !== "string") {
|
||||
return true;
|
||||
}
|
||||
// Set the property in _style
|
||||
el._style[$tw.utils.convertStyleNameToPropertyName(property)] = value;
|
||||
return true;
|
||||
@@ -106,7 +115,9 @@ var TW_Element = function(tag, namespace) {
|
||||
this.children = [];
|
||||
this._style = {}; // Internal style object
|
||||
this.style = new TW_Style(this); // Proxy for style management
|
||||
this.namespaceURI = namespace || "http://www.w3.org/1999/xhtml";
|
||||
// createElementNS with empty-string or null normalises to null (no namespace) per spec.
|
||||
// https://dom.spec.whatwg.org/#dom-document-createelementns
|
||||
this.namespaceURI = namespace !== undefined ? (namespace || null) : "http://www.w3.org/1999/xhtml";
|
||||
};
|
||||
|
||||
|
||||
@@ -197,7 +208,16 @@ TW_Element.prototype.addEventListener = function(type,listener,useCapture) {
|
||||
|
||||
Object.defineProperty(TW_Element.prototype, "tagName", {
|
||||
get: function() {
|
||||
return this.tag || "";
|
||||
if(!this.tag) {
|
||||
return "";
|
||||
}
|
||||
// HTML elements report uppercase tagName per DOM spec. Other namespaces
|
||||
// preserve case. Fakedom only models HTML documents.
|
||||
// https://dom.spec.whatwg.org/#dom-element-tagname
|
||||
if(this.namespaceURI === "http://www.w3.org/1999/xhtml") {
|
||||
return this.tag.toUpperCase();
|
||||
}
|
||||
return this.tag;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -243,8 +243,28 @@ exports.slowInSlowOut = function(t) {
|
||||
};
|
||||
|
||||
exports.copyObjectPropertiesSafe = function(object) {
|
||||
const seen = new Set(),
|
||||
isDOMElement = (value) => value instanceof Node || value instanceof Window;
|
||||
const seen = new Set();
|
||||
|
||||
function isDOMElement(value) {
|
||||
if(!value || typeof value !== "object") {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Cross-realm DOM nodes
|
||||
if(typeof value.nodeType === "number" &&
|
||||
typeof value.nodeName === "string") {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Cross-realm Window objects
|
||||
if(value.window === value &&
|
||||
value.document &&
|
||||
value.location) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function safeCopy(obj) {
|
||||
// skip circular references
|
||||
@@ -255,10 +275,6 @@ exports.copyObjectPropertiesSafe = function(object) {
|
||||
if(typeof obj !== "object" || obj === null) {
|
||||
return obj;
|
||||
}
|
||||
// skip DOM elements
|
||||
if(isDOMElement(obj)) {
|
||||
return undefined;
|
||||
}
|
||||
// copy arrays, preserving positions
|
||||
if(Array.isArray(obj)) {
|
||||
return obj.map((item) => {
|
||||
@@ -266,7 +282,11 @@ exports.copyObjectPropertiesSafe = function(object) {
|
||||
return value === undefined ? null : value;
|
||||
});
|
||||
}
|
||||
|
||||
// skip DOM elements
|
||||
if(isDOMElement(obj)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
seen.add(obj);
|
||||
const copy = {};
|
||||
let key,
|
||||
|
||||
@@ -22,7 +22,7 @@ Inherit from the base widget class
|
||||
DiffTextWidget.prototype = new Widget();
|
||||
|
||||
DiffTextWidget.prototype.invisibleCharacters = {
|
||||
"\n": "↩︎\n",
|
||||
"\n": "↲\n",
|
||||
"\r": "⇠",
|
||||
"\t": "⇥\t"
|
||||
};
|
||||
|
||||
@@ -125,13 +125,12 @@ SelectWidget.prototype.setSelectValue = function() {
|
||||
values = Array.isArray(value) ? value : $tw.utils.parseStringArray(value);
|
||||
for(var i=0; i < select.children.length; i++){
|
||||
child=select.children[i];
|
||||
if(child.children.length === 0){
|
||||
child.selected = values.indexOf(child.value) !== -1;
|
||||
} else {
|
||||
// grouped options
|
||||
if(child.tagName && child.tagName.toUpperCase() === "OPTGROUP"){
|
||||
for(var y=0; y < child.children.length; y++){
|
||||
child.children[y].selected = values.indexOf(child.children[y].value) !== -1;
|
||||
}
|
||||
} else {
|
||||
child.selected = values.indexOf(child.value) !== -1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -4,13 +4,15 @@ description: create a new journal tiddler
|
||||
|
||||
\whitespace trim
|
||||
\function get-tags() [<textFieldTags>] [<tagsFieldTags>] +[join[ ]]
|
||||
<$let journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}>
|
||||
<$wikify name="journalTitle" text="<$transclude $variable='now' format=<<journalTitleTemplate>>/>">
|
||||
<$let journalTitle=<<now format={{$:/config/NewJournal/Title}}>>
|
||||
textFieldTags={{$:/config/NewJournal/Tags}}
|
||||
tagsFieldTags={{$:/config/NewJournal/Tags!!tags}}
|
||||
journalText={{$:/config/NewJournal/Text}}
|
||||
>
|
||||
<$reveal type="nomatch" state=<<journalTitle>> text="">
|
||||
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text={{{ [<journalTitle>get[]] }}}/>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<journalTitle>> text="">
|
||||
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text=<<journalText>>/>
|
||||
</$reveal>
|
||||
</$wikify>
|
||||
</$let>
|
||||
|
||||
@@ -6,30 +6,23 @@ tags: $:/tags/EditTemplate
|
||||
\procedure lingo-base() $:/language/EditTemplate/
|
||||
|
||||
\procedure tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags")
|
||||
<$wikify name="foregroundColor"
|
||||
text="""<$macrocall $name="contrastcolour"
|
||||
target=<<colour>>
|
||||
fallbackTarget=<<fallbackTarget>>
|
||||
colourA=<<colourA>>
|
||||
colourB=<<colourB>>/>
|
||||
"""
|
||||
>
|
||||
<$let backgroundColor=<<colour>> >
|
||||
<span class="tc-tag-label tc-tag-list-item tc-small-gap-right"
|
||||
data-tag-title=<<currentTiddler>>
|
||||
style=`color:$(foregroundColor)$; fill:$(foregroundColor)$; background-color:$(backgroundColor)$;`
|
||||
<$let foregroundColor=<<contrastcolour target=<<colour>> fallbackTarget=<<fallbackTarget>> colourA=<<colourA>> colourB=<<colourB>> >>
|
||||
backgroundColor=<<colour>>
|
||||
>
|
||||
<span class="tc-tag-label tc-tag-list-item tc-small-gap-right"
|
||||
data-tag-title=<<currentTiddler>>
|
||||
style=`color:$(foregroundColor)$; fill:$(foregroundColor)$; background-color:$(backgroundColor)$;`
|
||||
>
|
||||
<$transclude tiddler=<<icon>>/>
|
||||
<$view field="title" format="text"/>
|
||||
<$button class="tc-btn-invisible tc-remove-tag-button"
|
||||
style.fill=<<foregroundColor>>
|
||||
>
|
||||
<$transclude tiddler=<<icon>>/>
|
||||
<$view field="title" format="text"/>
|
||||
<$button class="tc-btn-invisible tc-remove-tag-button"
|
||||
style.fill=<<foregroundColor>>
|
||||
>
|
||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="-[{!!title}]"/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</span>
|
||||
</$let>
|
||||
</$wikify>
|
||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="-[{!!title}]"/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</span>
|
||||
</$let>
|
||||
\end
|
||||
|
||||
\procedure tag-body(colour,palette,icon,tagField:"tags")
|
||||
|
||||
@@ -16,15 +16,13 @@ title: $:/core/ui/TagPickerTagTemplate
|
||||
<$set name="backgroundColor"
|
||||
value={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}
|
||||
>
|
||||
<$wikify name="foregroundColor"
|
||||
text="""<$macrocall $name="contrastcolour" target=<<backgroundColor>> fallbackTarget=<<fallbackTarget>> colourA=<<colourA>> colourB=<<colourB>>/>"""
|
||||
>
|
||||
<$let foregroundColor=<<contrastcolour target=<<backgroundColor>> fallbackTarget=<<fallbackTarget>> colourA=<<colourA>> colourB=<<colourB>> >> >
|
||||
<span class="tc-tag-label tc-btn-invisible"
|
||||
style=<<tag-pill-styles>>
|
||||
data-tag-title=<<currentTiddler>>
|
||||
>
|
||||
{{||$:/core/ui/TiddlerIcon}}<$view field="title" format="text"/>
|
||||
</span>
|
||||
</$wikify>
|
||||
</$let>
|
||||
</$set>
|
||||
</$button>
|
||||
|
||||
@@ -6,7 +6,6 @@ description: {{$:/language/Buttons/NewJournalHere/Hint}}
|
||||
\whitespace trim
|
||||
\procedure journalButton()
|
||||
<$button tooltip={{$:/language/Buttons/NewJournalHere/Hint}} aria-label={{$:/language/Buttons/NewJournalHere/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$wikify name="journalTitle" text="""<$transclude $variable="now" format=<<journalTitleTemplate>>/>""">
|
||||
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=`[[$(currentTiddlerTag)$]] $(journalTags)$`/>
|
||||
<%if [<tv-config-toolbar-icons>match[yes]] %>
|
||||
{{$:/core/images/new-journal-button}}
|
||||
@@ -16,9 +15,11 @@ description: {{$:/language/Buttons/NewJournalHere/Hint}}
|
||||
<$text text={{$:/language/Buttons/NewJournalHere/Caption}}/>
|
||||
</span>
|
||||
<%endif%>
|
||||
</$wikify>
|
||||
</$button>
|
||||
\end
|
||||
<$let journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{$:/config/NewJournal/Tags}} currentTiddlerTag=<<currentTiddler>>>
|
||||
<$let journalTitle=<<now format={{$:/config/NewJournal/Title}}>>
|
||||
journalTags={{$:/config/NewJournal/Tags}}
|
||||
currentTiddlerTag=<<currentTiddler>>
|
||||
>
|
||||
<<journalButton>>
|
||||
</$let>
|
||||
|
||||
@@ -17,6 +17,10 @@ This page summarises high level information about the configuration of this ~Tid
|
||||
Drag this link to copy this tool to another wiki
|
||||
\end intrinsic-lingo-Drag/Caption
|
||||
|
||||
\procedure intrinsic-lingo-Generate/Caption()
|
||||
Click to generate wiki information report
|
||||
\end intrinsic-lingo-Generate/Caption
|
||||
|
||||
\procedure lingo(title,mode:"inline")
|
||||
<%if [<title>addprefix<lingo-base>is[shadow]] %>
|
||||
<$transclude $tiddler={{{ [<title>addprefix<lingo-base>] }}} $mode=<<mode>>/>
|
||||
@@ -105,7 +109,7 @@ Drag this link to copy this tool to another wiki
|
||||
|
||||
<$button>
|
||||
<<display-wiki-info-modal>>
|
||||
Click to generate wiki information report
|
||||
<<lingo title:"Generate/Caption">>
|
||||
</$button>
|
||||
|
||||
<$link to="$:/core/ui/ControlPanel/WikiInformation">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/library/v5.4.0/index.html
|
||||
url: https://tiddlywiki.com/library/v5.5.0/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}}
|
||||
|
||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||
|
||||
@@ -8,9 +8,8 @@ type: text/vnd.tiddlywiki
|
||||
# Ensure the new release banner image is up to date
|
||||
# Update ''master'' with changes from ''tiddlywiki-com''
|
||||
# Verify the version numbers in [[$:/config/OfficialPluginLibrary]] in `core/wiki/config/OfficialPluginLibrary.tid`
|
||||
# Move the latest release note from the prerelease edition into the tw5.com edition
|
||||
# Adjust the release date and the ''released'' field of the latest release tiddler (eg, [[Release 5.1.3]])
|
||||
# Also adjust the github.com comparison link to point to the tag for the new release
|
||||
# Adjust the release date and the ''released'' field of the release tiddler (eg, [[Release 5.1.3]])
|
||||
# Update the ''release-introduction'' definition with the new release text, and if necessary the ''description'' field of the release tiddler
|
||||
# Adjust the tiddler [[TiddlyWiki Archive]] to include the new version number
|
||||
# Ensure [[TiddlyWiki Releases]] has the new version as the default tab
|
||||
# Adjust the modified time of HelloThere
|
||||
@@ -23,7 +22,6 @@ type: text/vnd.tiddlywiki
|
||||
# Run `./bin/readme-bld.sh` to build the readme files
|
||||
# Commit the new readme files to ''master''
|
||||
# Restore `package.json` to the previous version number
|
||||
# Adjust the link for "GitHub for detailed change history of this release" in the release note
|
||||
# Add the credits for the new release banner to the release note, including a link to the GitHub instance of the image from the commit history
|
||||
|
||||
!! Make New Release
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
"description": "Developer documentation from https://tiddlywiki.com/dev/",
|
||||
"plugins": [
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/nodewebkitsaver",
|
||||
"tiddlywiki/github-fork-ribbon",
|
||||
"tiddlywiki/menubar",
|
||||
"tiddlywiki/internals",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"description": "A step by step introduction to TiddlyWiki",
|
||||
"plugins": [
|
||||
"tiddlywiki/cecily",
|
||||
"tiddlywiki/codemirror",
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/katex"
|
||||
|
||||
@@ -11,6 +11,7 @@ ja-title: TiddlyWikiアーカイブ
|
||||
5.1.20 5.1.21 5.1.22 5.1.23
|
||||
5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7
|
||||
5.3.0 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8
|
||||
5.4.0
|
||||
\end
|
||||
|
||||
TiddlyWikiの古いバージョンは[[アーカイブ|https://github.com/TiddlyWiki/tiddlywiki.com-gh-pages/tree/master/archive]]で入手できます:
|
||||
|
||||
@@ -21,3 +21,5 @@ type: text/vnd.tiddlywiki
|
||||
<<.tip """上に示したように、図に開始線と終了線が1つある場合は、リンクされた上位レベルにさらに情報があることを意味します。パンくずリストはナビゲーションに使用できます""">>
|
||||
|
||||
<<.tip """下位レベルで使用されているように、図に開始点と終了点がない場合は、読みやすさと単純さを高めるために、上位レベルのシンタックス要素が削除されていることを意味します。パンくずリストはナビゲーションに使用できます""">>
|
||||
|
||||
<<.note """フィルタ式の再帰深度は最大300です。この制限を超えて自身を再帰的に呼び出すフィルタ(例えば、<<.olink subfilter>>や<<.olink filter>>演算子を使ったもの)は、エラーメッセージ`/**-- Excessive filter recursion --**/`を返します。これは無限ループを防ぐためです。""">>
|
||||
|
||||
@@ -14,6 +14,8 @@ type: text/vnd.tiddlywiki
|
||||
"{" [: <-"間接"-> /"}以外"/] "}"
|
||||
|
|
||||
"<" [: <-"変数"-> /">以外"/] ">"
|
||||
|
|
||||
"(" [: <-"複数値変数"-> /")以外"/ ] ")" /"v5.4.0"/
|
||||
)
|
||||
"""/>
|
||||
|
||||
@@ -22,6 +24,7 @@ type: text/vnd.tiddlywiki
|
||||
;<<.def ハード>>
|
||||
: `[パラメータ例]`
|
||||
: パラメータは、角括弧内のテキストそのものです。
|
||||
|
||||
;<<.def ソフト>>
|
||||
: <<.def 間接>>
|
||||
:: `{パラメータ例}`
|
||||
@@ -30,6 +33,9 @@ type: text/vnd.tiddlywiki
|
||||
:: `<パラメータ例>`
|
||||
:: パラメータは、山括弧内の[[変数|Variables]]の現在値です。マクロパラメータは、v5.2.0まではサポートされて<<.em いません>>。
|
||||
::<<.from-version "5.2.0">> リテラルマクロパラメータがサポートされています。例: `[<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>]`。
|
||||
: <<.def "複数値変数">>
|
||||
:: `(パラメータ例)`
|
||||
:: <<.from-version "5.4.0">> このパラメータは、丸括弧で囲まれた名前の[[複数値変数|Multi-Valued Variables]]に格納されている値のリスト全体に展開されます。このようにアクセスすると、フィルタ演算子は最初の値だけでなく、すべての値を受け取ります。詳細については、[[複数値変数|Multi-Valued Variables]]を参照してください。
|
||||
|
||||
<<.note """すべての[[フィルタオペレータ|filter Operator]]の後にはパラメータ式が続く必要があります。[[パラメータの無いオペレータ|Operators without parameters]]の場合、その式は空になります(`[<currentTiddler>links[]]`のフィルタオペレータ<<.olink links>>と同様)。""">>
|
||||
|
||||
@@ -37,4 +43,8 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.1.23">> [[フィルタステップ|Filter Step]]では、`,`文字で区切られた複数のパラメータがサポートされます。
|
||||
|
||||
例えば: `[param1],[param2]`や`<param1>,{param2}`
|
||||
例えば: `[param1],[param2]`や`<param1>,{param2}`、 `[param1],(param2)`
|
||||
|
||||
---
|
||||
|
||||
<<.warning """`/regexp/(flags)`オペランド構文は非推奨であり、ブラウザのコンソールに警告が表示されます。代わりに<<.olink regexp>>演算子を使用してください。""">>
|
||||
@@ -24,13 +24,13 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
多くのステップでは、ステップの実行内容をさらに定義する明示的な<<.def パラメータ>>が必要です。
|
||||
|
||||
<<.def サフィックス>>は、特定のオペレータの意味を拡張する追加テキスト(多くの場合、[[フィールド|TiddlerFields]]名)です。
|
||||
<<.def サフィックス>>は、特定のオペレータの意味を拡張する追加テキスト(多くの場合、[[フィールド|TiddlerFields]]名)です。サフィックスは`:`文字で区切られ、各サフィックスグループには、カンマで区切られた複数の値を含めることができます。例えば、`compare:number:gteq`は、最初のサフィックスは`number`で、2番目のサフィックスは`gteq`です。`:sort:string:reverse,casesensitive`は、最初のサフィックスは`string`で、2番目のサフィックスグループには`reverse`と`casesensitive`の両方が含まれます。
|
||||
|
||||
ステップの<<.def オペレータ>>と<<.def サフィックス>>がすべて省略されている場合は、デフォルトで[[title|title Operator]]オペレータが使用されます。
|
||||
ステップの<<.def オペレータ>>と<<.def サフィックス>>がすべて//省略//されている場合は、デフォルトで[[title|title Operator]]オペレータが使用されます。サフィックスが存在するが、コロンの前のオペレータ名が空の場合(例: `[:fieldname[value]]`)、オペレータはデフォルトで<<.olink field>>になります。
|
||||
|
||||
<<.from-version "5.1.23">> いくつかのステップでは、`,`文字で区切られた複数の<<.def パラメータ>>を受け入れます。
|
||||
|
||||
認識されないオペレータは、<<.olink field>>オペレータのサフィックスであるかのように扱われます。
|
||||
認識されないオペレータは、<<.olink field>>オペレータのサフィックスであるかのように扱われます。<<.from-version "5.3.0">> ただし、名前に`.`(ドット)文字が含まれる認識されないオペレータは、ユーザー定義のフィルタオペレータとして扱われ、その名前の変数または関数を検索することで解決されます。.
|
||||
|
||||
フィルタオペレータはプラグインによって拡張できます。
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ type: text/vnd.tiddlywiki
|
||||
|`-[run]` |`:except[run]` |差集合 |... AND NOT ラン |
|
||||
|`~[run]` |`:else[run]` |それ以外 |... ELSE ラン |
|
||||
|`=[run]` |`:all[run]` |重複を排除しない和集合 |... OR ラン |
|
||||
|`=>[run]` |`:let[run]` |<<.from-version "5.4.0">> 結果を変数に割りあてる |... LET ラン |
|
||||
|
||||
ランのインプットは通常、Wiki内の[[隠し|ShadowTiddlers]]Tiddler以外のすべてのTiddlerタイトルのリストです(順不同)。<br>ただし、`+`プレフィックスによってこれを変更できます:
|
||||
|
||||
@@ -45,3 +46,5 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
新しいフィルタランプレフィックスを作成するには、`filterrunprefix`の[[モジュールタイプ|ModuleType]]で
|
||||
[[Javascriptモジュール|Modules]]を作成します。
|
||||
|
||||
コンパイルされたフィルタ式はパフォーマンスのためキャッシュされます。キャッシュには最大2000件のエントリが保存され、この制限を超えるとキャッシュ全体がリセットされます。
|
||||
@@ -17,6 +17,15 @@ type: text/vnd.tiddlywiki
|
||||
[["ラン"|"Filter Run"]]
|
||||
"""/>
|
||||
|
||||
前のランからのフィルタアウトプットは保留されます。`:intersection`フィルタランは、すべてのTiddlerタイトルをインプットとして開始されます。この最後のフィルタランが完了すると、最後のアウトプットが保留アウトプットと比較されます。保留アウトプットと最新アウトプットの両方に表われるタイトルのみを含む新しいアウトプットが生成されます。
|
||||
前のランからのフィルタアウトプットは保留されます。`:intersection`フィルタランは、すべてのTiddlerタイトルをインプットとして開始されます。この最後のフィルタランが完了すると、最後のアウトプットが保留アウトプットと比較されます。保留アウトプットと最新アウトプットの両方に表われるタイトルのみを含む新しいアウトプットが生成されます。アウトプットにおけるタイトルの順序は、蓄積された結果から保持されます。
|
||||
|
||||
!! `:and` / `+`との違い
|
||||
|
||||
`:intersection`と`:and` (または `+`)の主な違いは、''インプット''として何を受け取るかです:
|
||||
|
||||
* `:and` / `+`は、''これまでに蓄積された結果''をフィルタランへのインプットとして渡します。ラン内のオペレータは、結果に既に含まれているタイトルのみを表示・操作できます。
|
||||
* `:intersection`は、''すべてのTiddlerタイトル''をフィルタランへのインプットとして渡し(プレフィックスなしのランと同様)、その後、蓄積された結果にも含まれるタイトルのみを保持します。
|
||||
|
||||
これは、`:intersection`がTiddlerプール全体から開始する必要のあるオペレータを使用してタイトルを照合できることを意味します。詳細については、[[交換可能なフィルタランプレフィックス|Interchangeable Filter Run Prefixes]]を参照してください。
|
||||
|
||||
[[intersectionフィルタランプレフィックス(例)|Intersection Filter Run Prefix (Examples)]]
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
created: 20260222152853141
|
||||
modified: 20260506104906199
|
||||
original-modified: 20260222184916224
|
||||
tags: [[Let Filter Run Prefix]]
|
||||
title: Let Filter Run Prefix (Examples)
|
||||
ja-title: letフィルタランプレフィックス(例)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "3 2 1 4 :let[[myvar]] 6 7 8 [(myvar)sort[]]" "名前付きプレフィックスを使用">>
|
||||
<<.operator-example 2 "3 2 1 4 =>myvar 6 7 8 [(myvar)sort[]]" "短縮形のプレフィックスを使用">>
|
||||
<<.operator-example 3 "3 2 1 4 =>myvar 6 7 8 [<myvar>]" "山括弧は最初の値のみを返却">>
|
||||
<<.operator-example 4 "3 2 1 4 =>mynumbers [(mynumbers)sum[]] [(mynumbers)average[]]">>
|
||||
<<.operator-example 5 '"[0-9]" =>digitsRE abc 123 de45 67fg hij :filter[regexp<digitsRE>]' "角括弧で囲まれた正規表現では、変数パラメータを使用">>
|
||||
<<.operator-example 6 '"[prefix[ca]then[ca]]" "[suffix[at]then[at]]" other =>myfilters cat can bat bug :cascade[(myfilters)]' "[[cascadeフィルタランプレフィックス|Cascade Filter Run Prefix]]で使用するフィルタを定義">>
|
||||
<<.operator-example 7 "[[⁎ ]] [[⁑ ]] [[⁂ ]] :let[[prefixList]] [tag[Learning]first[3]] :map:flat[(prefixList)addsuffix<currentTiddler>]">>
|
||||
@@ -0,0 +1,32 @@
|
||||
created: 20250307212252946
|
||||
from-version: 5.4.0
|
||||
modified: 20260502101033176
|
||||
original-modified: 20250307212252946
|
||||
rp-input: 前回のフィルタランからのすべてのタイトル
|
||||
rp-output: "let"フィルタランプレフィックスからはいつも空のタイトルリストが返されます
|
||||
rp-purpose: 前回のフィルタラン結果のタイトルリストを複数値変数へ代入
|
||||
tags: [[Named Filter Run Prefix]]
|
||||
title: Let Filter Run Prefix
|
||||
ja-title: letフィルタランプレフィックス
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<$railroad text="""
|
||||
\start none
|
||||
\end none
|
||||
( ":let" )
|
||||
[["ラン"|"Filter Run"]]
|
||||
"""/>
|
||||
|
||||
`:let`フィルタランプレフィックスは、前回のフィルタランの結果として得られたタイトルリストを[[他数値変数|Multi-Valued Variables]]に割り当てます。この変数には、フィルタランによって返された最初の結果が名前として付けられます。
|
||||
|
||||
この変数は、[[フィルタ式|Filter Expression]]内の残りの[[フィルタラン|Filter Run]]で使用可能になります。通常の方法で変数にアクセスすると、結果リストの最初の項目のみが返されます(結果リストが空の場合は空の文字列が返されます)。オペランドとして変数名を山括弧ではなく丸括弧で囲むと、結果リスト内のすべての項目が取得できます。
|
||||
|
||||
このプレフィックスには、オプションの[[ショートカット構文|Shortcut Filter Run Prefix]]記号`=>run`があります。例:
|
||||
|
||||
```
|
||||
=[<myfun1>] =[<myfun2>] =>myvar
|
||||
```
|
||||
|
||||
`:let`フィルタランプレフィックスを指定すると、常に現在の結果リストがクリアされます。
|
||||
|
||||
[[letフィルタランプレフィックス(例)|Let Filter Run Prefix (Examples)]]
|
||||
@@ -25,6 +25,7 @@ type: text/vnd.tiddlywiki
|
||||
[[<":or"> |"Or Filter Run Prefix"]] |
|
||||
[[<":reduce"> |"Reduce Filter Run Prefix"]] |
|
||||
[[<":sort"> /"v5.2.0"/ |"Sort Filter Run Prefix"]] |
|
||||
[[<":let"> /"v5.4.0"/ |"Let Filter Run Prefix"]] |
|
||||
[[<":then"> /"v5.3.0"/ |"Then Filter Run Prefix"]]) [[run|"Filter Run"]]
|
||||
"""/>
|
||||
|
||||
@@ -35,4 +36,14 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
<<.tip """フィルタランプレフィックス`:reduce`、`:sort`、`:map`、`:filter`内では、変数<<.var currentTiddler>>は処理中のTiddlerのタイトルに設定されます。<br>サブフィルタ外のcurrentTiddlerの値は、変数<<.var "..currentTiddler">>で使用できます <<.from-version "5.2.0">>""" >>
|
||||
|
||||
!! サフィックス
|
||||
|
||||
名前付きフィルタランプレフィックスは、`:`文字で区切られたサフィックスを受け入れることができ、各サフィックスにはオプションでカンマ区切りの値を含めることができます。一般的な構文は`:prefixname:suffix1:suffix2,...`です。現在、次のプレフィックスがサフィックスを受け入れます:
|
||||
|
||||
|!プレフィックス |!サフィッス |!例 |
|
||||
|`:map` |`flat` — 項目ごとに最初の結果だけでなく、すべての結果を返す |`:map:flat[...]` |
|
||||
|`:sort` |型 (''string'', ''alphanumeric'', ''number'', ''integer'', ''version'', ''date'')とフラグ (''reverse'', ''casesensitive'', ''caseinsensitive'') |`:sort:number:reverse[...]` |
|
||||
|
||||
その他の名前付きプレフィックス(`:all`, `:and`, `:cascade`, `:else`, `:except`, `:filter`, `:intersection`, `:let`, `:or`, `:reduce`, `:then`)は現在サフィックスを受け付けません。
|
||||
|
||||
参照: [[交換可能なフィルターランプレフィックス|Interchangeable Filter Run Prefixes]]
|
||||
|
||||
@@ -11,7 +11,7 @@ type: text/vnd.tiddlywiki
|
||||
<$railroad text="""
|
||||
\start none
|
||||
\end none
|
||||
(-|:"+"|"-"|"~"|"=")
|
||||
(-|:"+"|"-"|"~"|"="|"=>")
|
||||
[["ラン"|"Filter Run"]]
|
||||
"""/>
|
||||
|
||||
@@ -23,8 +23,10 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
* プレフィックス`-`は、アウトプットタイトルがフィルタのアウトプットから<<.em 取り除か>>れます(そのようなTiddlerが存在する場合)
|
||||
|
||||
* プレフィックス`~`は、フィルタアウトプットが空リストの場合、ランの結果のタイトルがフィルタアウトプットに[[優先的に追加|Dominant Append]]されます。フィルタアウトプットが空リストでない場合、ランは無視されます。<<.from-version "5.1.18">>
|
||||
* プレフィックス`~`<<.from-version "5.1.18">>は、フィルタアウトプットが空リストの場合、ランの結果のタイトルがフィルタアウトプットに[[優先的に追加|Dominant Append]]されます。フィルタアウトプットが空リストでない場合、ランは無視されます。
|
||||
|
||||
* プレフィックス`=`は、アウトプットタイトルが重複排除されずにフィルタのアウトプットに追加されます。<<.from-version "5.1.20">>
|
||||
* プレフィックス`=`<<.from-version "5.1.20">>は、アウトプットタイトルが重複排除されずにフィルタのアウトプットに追加されます。
|
||||
|
||||
* プレフィックス`=>` <<.from-version "5.4.0">>は、これまでのすべてのランの累積結果は、このランの最初の結果が名前となる[[複数値変数|Multi-Valued Variables]]として割り当てられます。その後、累積結果はクリアされます。
|
||||
|
||||
{{Interchangeable Filter Run Prefixes}}
|
||||
@@ -2,7 +2,7 @@ created: 20210618133745003
|
||||
from-version: 5.3.0
|
||||
modified: 20250423104147235
|
||||
original-modified: 20230710074225410
|
||||
rp-input: <<.olink すべて>>のTiddlerタイトル
|
||||
rp-input: <<.olink all>>のTiddlerタイトル (前回のランのアウトプットが空でない場合にのみ評価されます)
|
||||
rp-output: フィルタランのアウトプットは、空のリストでない限り、前回までのランのアウトプットを置き換えます(以下を参照)。
|
||||
rp-purpose: フィルタランへのインプットをそのアウトプットで置き換え、インプットがある場合にのみランを評価
|
||||
search:
|
||||
|
||||
@@ -20,8 +20,9 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
関数はいくつかの方法で呼び出すことができます:
|
||||
|
||||
* 構文 `<<myfun param:"value">>` を使用して関数を直接トランスクルードする
|
||||
* 構文 `<div class=<<myfun param:"value">>>` を使用してウィジェット属性に関数を割り当てる
|
||||
* [[Calls]]構文を使用する:
|
||||
** 構文 `<<myfun param:"value">>` を使用して関数を直接トランスクルードする
|
||||
** 構文 `<div class=<<myfun param:"value">>>` を使用してウィジェット属性に関数を割り当てる
|
||||
* 構文 `[function[myfun],[value],...]` を使用して [[関数オペレータ|function Operator]] を介して関数を呼び出す
|
||||
* 構文 `[my.fun[value]]` または `[.myfun[value]]` で、カスタムフィルター演算子として名前にピリオドが含まれる関数を直接呼び出す
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
caption: Internet Explorer
|
||||
created: 20140811172058274
|
||||
modified: 20241029105938082
|
||||
original-modified: 20211114031651879
|
||||
tags: GettingStarted $:/deprecated
|
||||
title: GettingStarted - Internet Explorer
|
||||
ja-title: はじめに - Internet Explorer
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
{{Saving with TiddlyIE}}
|
||||
|
||||
The [[Windows HTA Hack]] describes an alternative method of using TiddlyWiki with Internet Explorer.
|
||||
[[Windows HTAのハック|Windows HTA Hack]]では、Internet ExplorerでTiddlyWikiを使用する別の方法について説明します。
|
||||
@@ -1,8 +1,8 @@
|
||||
created: 20130822170200000
|
||||
icon: $:/core/icon
|
||||
list: [[A Gentle Guide to TiddlyWiki]] [[Discover TiddlyWiki]] [[Some of the things you can do with TiddlyWiki]] [[Ten reasons to switch to TiddlyWiki]] Examples [[What happened to the original TiddlyWiki?]]
|
||||
modified: 20251213104120189
|
||||
original-modified: 20250807084952911
|
||||
modified: 20260430010447598
|
||||
original-modified: 20260420192600833
|
||||
tags: Welcome
|
||||
title: HelloThere
|
||||
ja-title: こんにちは
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20150414070451144
|
||||
list: list: [[HelloThumbnail - Donations]] [[HelloThumbnail - Newsletter]] [[HelloThumbnail - Community Survey 2025]] [[HelloThumbnail - Introduction Video]] [[HelloThumbnail - Grok TiddlyWiki]] [[HelloThumbnail - Latest Version]] [[HelloThumbnail - MultiWikiServer]] [[HelloThumbnail - Twenty Years of TiddlyWiki]] [[HelloThumbnail - TiddlyWiki Privacy]] [[HelloThumbnail - Marketplace]] [[HelloThumbnail - Intertwingled Innovations]] [[HelloThumbnail - TiddlyWikiLinks]]
|
||||
list: [[HelloThumbnail - Latest Version]] [[HelloThumbnail - Donations]] [[HelloThumbnail - Newsletter]] [[HelloThumbnail - Community Survey 2025]] [[HelloThumbnail - Introduction Video]] [[HelloThumbnail - Grok TiddlyWiki]] [[HelloThumbnail - MultiWikiServer]] [[HelloThumbnail - Twenty Years of TiddlyWiki]] [[HelloThumbnail - TiddlyWiki Privacy]] [[HelloThumbnail - Marketplace]] [[HelloThumbnail - Intertwingled Innovations]] [[HelloThumbnail - TiddlyWikiLinks]]
|
||||
modified: 20260406043045066
|
||||
original-modified: 20150414070948246
|
||||
title: HelloThumbnail
|
||||
|
||||
@@ -5,6 +5,7 @@ caption: v<<version>>の新着情報
|
||||
link: Releases
|
||||
image: New Release Banner
|
||||
color: #fff
|
||||
ribbon-text: NEW
|
||||
|
||||
\define prerelease-regexp() [0-9]+\.[0-9]+\.[0-9]+\-prerelease
|
||||
<$list filter="[<version>!regexp<prerelease-regexp>]" variable="ignore">
|
||||
|
||||
@@ -6,6 +6,5 @@ link: TiddlyWiki Newsletter
|
||||
image: TiddlyWiki Newsletter Badge
|
||||
color: #fff
|
||||
type: text/vnd.tiddlywiki
|
||||
ribbon-text: NEW
|
||||
|
||||
~TiddlyWikiコミュニティからの最も興味深く関連性のあるニュースをまとめた~TiddlyWikiニュースレターを購読できます
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
caption: HTA Hack
|
||||
color: #F06292
|
||||
created: 20131212223146250
|
||||
delivery: DIY
|
||||
description: Internet Explorerで変更を手動で直接保存する方法
|
||||
method: save
|
||||
modified: 20241012122755089
|
||||
original-modified: 20200507110355115
|
||||
tags: Saving Windows $:/deprecated
|
||||
title: Windows HTA Hack
|
||||
ja-title: Windows HTAのハック
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.deprecated-since "5.3.6">>
|
||||
Windowsでは、HTMLファイルの拡張子を`*.hta`に名前変更することで、TiddlyWikiを真のローカルアプリケーションに変換できます。その後、''fsosaver''モジュールは~ActiveX ~FileSystemObjectを使用して変更を保存できます。
|
||||
|
||||
この方法の欠点の1つは、TiddlyWikiファイルがUTF-16フォーマットで保存されるため、通常のUTF-8エンコードの場合と比べて2倍の大きさになることです。ただし、別の保存方法でファイルを開いて保存すると、ファイルはUTF-8に再エンコードされます。
|
||||
|
||||
詳細については、Wikipediaを参照してください: https://en.wikipedia.org/wiki/HTML_Application
|
||||
@@ -1,58 +1,9 @@
|
||||
caption: プロシージャ呼び出し
|
||||
created: 20221007130006705
|
||||
modified: 20260327114525571
|
||||
original-modified: 20230419103154329
|
||||
tags: WikiText Procedures
|
||||
modified: 20260429105903754
|
||||
original-modified: 20260125212303316
|
||||
title: Procedure Calls
|
||||
ja-title: プロシージャ呼び出し
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
!! 紹介
|
||||
|
||||
このTiddlerでは、[[プロシージャ|Procedures]]を呼び出すさまざまな方法について説明します。
|
||||
|
||||
!! トランスクルージョンショートカットでのプロシージャ呼び出し
|
||||
|
||||
[[プロシージャ|Procedures]]を呼び出すには、プロシージャ名とパラメータ値を`<<`二重の山括弧で囲みます`>>`。
|
||||
|
||||
```
|
||||
<<my-procedure param:"これはパラメータ値です">>
|
||||
```
|
||||
|
||||
デフォルトでは、パラメータはプロシージャの定義と同じ順序でリストされます。パラメータに名前とコロンを付けることで、異なる順序でリストすることができます。
|
||||
|
||||
パラメータに値が指定されていない場合は、[[プロシージャ定義|Procedure Definitions]]でそのパラメータに指定されているデフォルト値が使用されます。(デフォルト値が定義されていない場合は、パラメータは空白になります。)
|
||||
|
||||
各パラメータ値は、`'`シングルクォーテーション`'`、`"`ダブルクォーテーション`"`、`"""`三重のダブルクォーテーション`"""`、`[[`二重の角括弧`]]`で囲むことができます。三重のダブルクォーテーションを使用すると、値にほぼあらゆる文字列を含めることができます。値にスペース、シングルクォーテーション、ダブルクォーテーションが含まれていない場合は、区切り文字は不要です。
|
||||
|
||||
[[パーサーモード|WikiText parser mode: macro examples]]に関する議論を参照してください。
|
||||
|
||||
!! <<.wlink TranscludeWidget>>ウィジェットでのプロシージャ呼び出し
|
||||
|
||||
ショートカット構文は、トランスクルードするプロシージャの名前を指定する`$variable`属性を持つ<<.wlink TranscludeWidget>>ウィジェットに展開されます。
|
||||
|
||||
```
|
||||
<$transclude $variable="my-procedure" param="これはパラメータ値です"/>
|
||||
```
|
||||
|
||||
ウィジェットは、ショートカット構文よりも柔軟性が高く、動的なパラメータ値を指定することも可能です。
|
||||
|
||||
!! 属性値にプロシージャ呼び出しを割り当て
|
||||
|
||||
プロシージャテキストは、ウィジェットやHTML要素の属性に直接割り当てることができます。プロシージャの結果はWiki化されないため、[[パラメータ処理|Procedure Parameter Handling]]は行われません。
|
||||
|
||||
```
|
||||
<div class=<<myclasses>>>
|
||||
...
|
||||
</div>
|
||||
```
|
||||
|
||||
!! フィルタでのプロシージャ呼び出しの使用
|
||||
|
||||
プロシージャ呼び出しはフィルタ内で使用できます。テキストはWiki化されないため、パラメータは無視されます。
|
||||
|
||||
```
|
||||
<$list filter="[<my-procedure>]">
|
||||
...
|
||||
</$list>
|
||||
```
|
||||
<<.deprecated-since "5.4.0" "Calls">>
|
||||
@@ -0,0 +1,66 @@
|
||||
caption: 呼び出し
|
||||
created: 20221007130006705
|
||||
modified: 20260429224543285
|
||||
original-modified: 20260301030947969
|
||||
tags: WikiText Procedures Functions Macros
|
||||
title: Calls
|
||||
ja-title: 呼び出し
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
!! 紹介
|
||||
|
||||
このTiddlerでは、[[プロシージャ|Procedures]]、[[関数|Functions]]、[[マクロ|Macros]]を呼び出すさまざまな方法について説明します。構文の正式な説明については、[[呼び出し構文|Call Syntax]]を参照してください。
|
||||
|
||||
!! トランスクルージョンショートカットでの呼び出し
|
||||
|
||||
呼び出しを実行するには、呼び出し先の名前とパラメータ値を`<<`二重の山括弧で囲みます`>>`。
|
||||
|
||||
```
|
||||
<<my-procedure param:"これはパラメータ値です">>
|
||||
```
|
||||
|
||||
デフォルトでは、パラメータは定義と同じ順序で解釈されます。パラメータ値に名前と等号を付けることで、異なる順序でリストすることができます。
|
||||
|
||||
パラメータに値が指定されていない場合は、[[プロシージャ定義|Procedure Definitions]]、[[関数定義|Function Definitions]]、[[マクロ定義|Macro Definitions]]でそのパラメータに指定されているデフォルト値が使用されます。(デフォルト値が定義されていない場合は、パラメータは空白になります。)
|
||||
|
||||
各パラメータ値は、`'`シングルクォーテーション`'`、`"`ダブルクォーテーション`"`、`"""`三重のダブルクォーテーション`"""`、`[[`二重の角括弧`]]`で囲むことができます。三重のダブルクォーテーションを使用すると、値にほぼあらゆる文字列を含めることができます。値にスペース、シングルクォーテーション、ダブルクォーテーションが含まれていない場合は、区切り文字は不要です。シングルクォーテーション、または、三重のバッククォーテーションで囲まれた[[置換属性値|Substituted Attribute Values]]もサポートされています。
|
||||
|
||||
[[パーサーモード|WikiText parser mode: macro examples]]に関する議論を参照してください。
|
||||
|
||||
!!! 例
|
||||
|
||||
<<testcase TestCases/Calls/ProcedureStaticAttributes>>
|
||||
|
||||
<<testcase TestCases/Calls/ProcedureDynamicAttributes>>
|
||||
|
||||
!! <<.wlink TranscludeWidget>>ウィジェットを用いた呼び出し
|
||||
|
||||
ショートカット構文は、トランスクルードするプロシージャの名前を指定する`$variable`属性を持つ<<.wlink TranscludeWidget>>ウィジェットに展開されます。
|
||||
|
||||
```
|
||||
<$transclude $variable="my-procedure" param="これはパラメータ値です"/>
|
||||
```
|
||||
|
||||
ウィジェットは、ショートカット構文よりも柔軟性が高く、カスタムウィジェットで上書きすることも可能です。
|
||||
|
||||
!! 呼び出し結果を属性値に割り当てる
|
||||
|
||||
呼び出しから返されるテキストは、ウィジェットやHTML要素の属性に直接割り当てることができます。呼び出しの結果はWiki化されないため、[[パラメータ処理|Procedure Parameter Handling]]は行われません。
|
||||
|
||||
```
|
||||
<div class=<<myclasses>>>
|
||||
...
|
||||
</div>
|
||||
```
|
||||
|
||||
!! フィルタでの呼び出しの使用
|
||||
|
||||
呼び出しはフィルタ内で使用できます。テキストはWiki化されないため、パラメータは無視されます。
|
||||
|
||||
//現在サポートされているのはリテラル文字列パラメータのみであることに注意してください//
|
||||
|
||||
```
|
||||
<$list filter="[<my-procedure>]">
|
||||
...
|
||||
</$list>
|
||||
```
|
||||
@@ -1,12 +1,12 @@
|
||||
created: 20130825160900000
|
||||
modified: 20251214105948181
|
||||
original-modified: 20241106165307259
|
||||
modified: 20260430074718157
|
||||
original-modified: 20250617140259415
|
||||
tags: Features [[Working with TiddlyWiki]]
|
||||
title: Encryption
|
||||
ja-title: 暗号化
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWiki5を単一のHTMLファイルとして使用すると、[[Stanford JavaScript Crypto Library]]を使用してCCMモードのAES 128ビット暗号化でコンテンツを暗号化できます。
|
||||
TiddlyWiki5を単一のHTMLファイルとして使用すると、[[Stanford JavaScript Crypto Library]]を使用してCCMモードのAES 256ビット暗号化でコンテンツを暗号化できます。
|
||||
|
||||
# サイドバーの''ツール''タブに切り替えて、南京錠アイコンのボタンを探します
|
||||
# ボタンに<<.icon $:/core/images/unlocked-padlock>> ''パスワードの設定''と表示されている場合、現在のウィキは暗号化されていません。ボタンをクリックすると、以降の保存を暗号化するために使用されるパスワードの入力を求められます
|
||||
@@ -16,5 +16,5 @@ TiddlyWiki5を単一のHTMLファイルとして使用すると、[[Stanford Jav
|
||||
|
||||
TiddlyWikiには、パスワード/暗号化に関連する、2つの無関係な機能があることに注意してください:
|
||||
|
||||
* TiddlySpotに保存するときにパスワードを設定する機能。これは、''コントロールパネル'' <<.icon $:/core/images/options-button>>の"保存"タブで行います。
|
||||
* [[Node.js|TiddlyWiki on Node.js]]のサーバ構成で標準のHTTP基本認証を使用する機能。これは、ServerCommandを使用してコマンドラインで実行されます。SSLと組み合わせると、GoogleやDropboxなどのオンラインサービスで得られるのと同じレベルの暗号化転送が実現されますが、ディスク上のデータは暗号化されません
|
||||
* [[Tiddlyhost]]に保存するときにパスワードを設定する機能。これは、''コントロールパネル'' <<.icon $:/core/images/options-button>>の"保存"タブで行います。
|
||||
* [[Node.js|TiddlyWiki on Node.js]]のサーバ構成で標準のHTTP基本認証を使用する機能。これは、[[Listenコマンド|ListenCommand]]を使用してコマンドラインで実行されます。SSLと組み合わせると、GoogleやDropboxなどのオンラインサービスで得られるのと同じレベルの暗号化転送が実現されますが、ディスク上のデータは暗号化されません
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
caption: ~TiddlyIE
|
||||
color: #4DB6AC
|
||||
community-author: David Jade
|
||||
created: 20131211220000000
|
||||
delivery: Browser Extension
|
||||
description: Internet Explorer用のブラウザ拡張
|
||||
method: save
|
||||
modified: 20241009114650356
|
||||
original-modified: 20200507201415232
|
||||
tags: [[Internet Explorer]] Saving $:/deprecated
|
||||
title: Saving with TiddlyIE
|
||||
ja-title: TiddlyIEでの保存
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.deprecated-since "5.3.6">>
|
||||
# TiddlyIEアドオンを次の場所からインストールします:
|
||||
#* https://github.com/davidjade/TiddlyIE/releases
|
||||
# Internet Explorerを再起動します。IEはTiddlyIEアドオンを有効にするように要求します。
|
||||
#> //Microsoft Script Runtime//を有効にするプロンプトが表示される場合もあります。
|
||||
# 次のリンクを[[ダウンロード|Download]]し、空のTiddlyWikiを保存します:
|
||||
#> https://tiddlywiki.com/empty.html
|
||||
# ダウンロードしたファイルを見つけます
|
||||
#* ファイル名を変更することもできますが、拡張子`.html`か`.htm`はそのままとしてください
|
||||
# Internet Explorerでファイルを開きます
|
||||
# サイドバーの''新しいTiddlerを作成します'' <<.icon $:/core/images/new-button>>ボタンを使用して、新しいTiddlerを作成してみてください。Tiddlerのコンテンツを入力し、<<.icon $:/core/images/done-button>> ''編集内容を確定します''ボタンをクリックします
|
||||
# サイドバーの<<.icon $:/core/images/save-button-dynamic>> ''Wikiを保存します''ボタンをクリックして変更を保存します。Internet Explorerは、''名前を付けて保存''ダイアログを表示して、ファイルをローカルに保存することに同意するかどうかを確認します。
|
||||
# ブラウザウィンドウを更新して、変更が正しく保存されたことを確認してください
|
||||
|
||||
+4
-2
@@ -3,11 +3,13 @@ modified: 20260404110322627
|
||||
original-modified: 20240619210723396
|
||||
tags: [[Variable Usage]]
|
||||
title: Behaviour of variables invoked via widget attributes
|
||||
ja-title:
|
||||
ja-title: ウィジェット属性を介して呼び出される変数の動作
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|tc-first-col-min-width|k
|
||||
|!宣言方法|!動作|
|
||||
|\define|本文テキストに対してパラメータのテキスト置換が実行されます。それ以上の処理は行われません。テキスト置換後の結果が属性の値として使用されます|
|
||||
|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|本文はそのまま取得され、属性の値として使用されます|
|
||||
|\function|ファンクション(例: .myfun)が`<div class=<<.myfun>>/>`で呼び出されると、`<div class={{{[function[.myfun]]}}}/>`の同義になります。他のフィルタ付きトランスクルージョン(つまり、三重中括弧)と同様に、最初の結果以外はすべて破棄されます。最初の結果が属性の値として使用されます。この形式で呼び出された場合でも、ファンクションは再帰的に処理されることに注意してください。つまり、ファンクション内のフィルタ式は別のファンクションを呼び出すことができ、処理は継続されます|
|
||||
|\function|ファンクション(例: .myfun)が`<div class=<<.myfun>>/>`で呼び出されると、`<div class={{{[function[.myfun]]}}}/>`の同義になります。他のフィルタ付きトランスクルージョン(つまり、三重中括弧)と同様に、最初の結果以外はすべて破棄されます。最初の結果が属性の値として使用されます。この形式で呼び出された場合でも、ファンクションは再帰的に処理されることに注意してください。つまり、ファンクション内のフィルタ式は別のファンクションを呼び出すことができ、処理は継続されます|
|
||||
|
||||
<<.from-version "5.4.0">> `<<var>>`の代わりに[[複数値変数の属性|Multi-Valued Variable Attribute Values]]構文`((var))`を使用すると、最初の値だけでなく、値のリスト全体が属性に渡されます。これは主に、TranscludeWidgetを介して[[複数値変数|Multi-Valued Variables]]をプロシージャや関数のパラメーターに渡す場合に便利です。
|
||||
|
||||
@@ -1,16 +1,46 @@
|
||||
caption: 説明リスト
|
||||
created: 20131205160424246
|
||||
modified: 20260221103246354
|
||||
original-modified: 20251229110936191
|
||||
modified: 20260409111112126
|
||||
original-modified: 20260405082055301
|
||||
tags: WikiText
|
||||
title: Description Lists in WikiText
|
||||
ja-title: Wikiテキストでの説明リスト
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
!! 基本的な構文
|
||||
|
||||
HTML説明リスト(<abbr title="またの名を">別名</abbr> 定義リスト)は次の構文で作成できます:
|
||||
|
||||
<<wikitext-example src:"; 説明する用語
|
||||
: その用語の説明/定義
|
||||
; 別の用語
|
||||
: 別の説明/定義
|
||||
">>
|
||||
">>
|
||||
|
||||
!! 複数の用語と説明
|
||||
|
||||
1つの用語に対して複数の説明を作成することも、1つの説明に対して複数の用語を作成することもできます:
|
||||
|
||||
<<wikitext-example src:"; ねずみ
|
||||
: 体が小さく尾が長い齧歯類
|
||||
: コンピュータを操作するために使用するポインティングデバイス
|
||||
; りんご
|
||||
; なし
|
||||
: バラ科に属する果物の一種
|
||||
">>
|
||||
|
||||
!! 入れ子になった説明リスト
|
||||
|
||||
説明リストはネストして、リストの中にリストを作成することもできます:
|
||||
|
||||
<<wikitext-example src:"; コーヒー
|
||||
: 焙煎したコーヒー豆から作られた飲み物
|
||||
:; ブラックコーヒー
|
||||
:: 添加物を一切使用しないコーヒー
|
||||
:; ミルクコーヒー
|
||||
:: コーヒーにスチームミルクやフォームミルクを加えたもの
|
||||
::; ラテ
|
||||
::: エスプレッソとスチームミルクで作ったコーヒー
|
||||
; ティー
|
||||
: 一般的に茶葉から作られる飲み物
|
||||
">>
|
||||
|
||||
@@ -40,7 +40,7 @@ type: text/vnd.tiddlywiki
|
||||
|`__下線テキスト__`には二重アンダースコアを使用します|`<u>下線テキスト<u>` |
|
||||
|`^^上付き文字^^`テキストには二重サーカムフレックスアクセントを使用します |`<sup>上付き文字</sup>`テキストには二重サーカムフレックスアクセントを使用します |
|
||||
|`,,下付き文字,,`テキストには二重カンマを使用します |`<sub>下付き文字</sub>`テキストには二重カンマを使用します |
|
||||
|`~~取り消し線~~`テキストには二重チルダ記号を使用します |`<strike>取り消し線</strike>`テキストには二重チルダ記号を使用します |
|
||||
|`~~取り消し線~~`テキストには二重チルダ記号を使用します |`<s>取り消し線</s>`テキストには二重チルダ記号を使用します |
|
||||
|```等幅文字` ``には単一のバッククォートを使用します |`<code>等幅文字</code>`には単一のバッククォートを使用します |
|
||||
|`@@ハイライト@@`するには二重@記号を使用します |`<span class="tc-inline-style">ハイライト</span>`するには二重@記号を使用します |
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: リスト
|
||||
created: 20131205160257619
|
||||
modified: 20260225114001626
|
||||
original-modified: 20160607093103220
|
||||
modified: 20260409112505342
|
||||
original-modified: 20260405094604397
|
||||
tags: WikiText Lists
|
||||
title: Lists in WikiText
|
||||
ja-title: Wikiテキストでのリスト
|
||||
@@ -45,6 +45,10 @@ type: text/vnd.tiddlywiki
|
||||
#** そしてもう一つ
|
||||
">>
|
||||
|
||||
! 説明リスト
|
||||
|
||||
{{Description Lists in WikiText}}
|
||||
|
||||
! CSSクラス
|
||||
|
||||
次の表記法を使用して、リストの個々のメンバーにCSSクラスを割り当てることもできます:
|
||||
|
||||
@@ -2,59 +2,8 @@ caption: マクロ呼び出し
|
||||
created: 20150220182252000
|
||||
modified: 20260321104805874
|
||||
original-modified: 20230419103154328
|
||||
tags: WikiText Macros
|
||||
title: Macro Calls
|
||||
ja-title: マクロ呼び出し
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
!! 紹介
|
||||
|
||||
このTiddlerでは、[[マクロ|Macros]]を呼び出すさまざまな方法について説明します。
|
||||
|
||||
!! マクロ呼び出しトランスクルージョンのショートカット
|
||||
|
||||
[[マクロ|Macros]]を呼び出すには、マクロ名とパラメータ値を`<<`二重山括弧`>>`で囲みます。
|
||||
|
||||
```
|
||||
<<mymacro param:"これはパラメータ値です">>
|
||||
```
|
||||
|
||||
デフォルトでは、パラメータはマクロの定義と同じ順序でリストします。パラメータに名前とコロンを付けることで、異なる順序でリストすることも可能です。
|
||||
|
||||
パラメータに値が指定されていない場合は、[[マクロ定義|Macro Definitions]]でそのパラメータに指定されているデフォルト値が代わりに使用されます。(デフォルト値が定義されていない場合は、パラメータはブランクになります。)
|
||||
|
||||
各パラメータ値は、`'`シングルクォーテーション`'`、`"`ダブルクォーテーション`"`、`"""`三重ダブルクォーテーション`"""`、または`[[`二重角括弧`]]`で囲むことができます。三重ダブルクォーテーションを使用すると、値にほぼあらゆる文字列を含めることができます。値にスペース、シングルクォーテーション、ダブルクォーテーションが含まれていない場合は、区切り文字は必要ありません。
|
||||
|
||||
この構文の正式な[[説明|Macro Call Syntax]]も利用可能です。
|
||||
|
||||
[[パーサーモード|WikiText parser mode: macro examples]]に関する[[例|Macro Calls in WikiText (Examples)]]と議論を参照してください。
|
||||
|
||||
!! <<.wlink TranscludeWidget>>ウィジェットを用いたマクロ呼び出し
|
||||
|
||||
ショートカット構文は、トランスクルードするマクロの名前を指定する`$variable`属性を持つ<<.wlink TranscludeWidget>>ウィジェットに展開されます。
|
||||
|
||||
```
|
||||
<$transclude $variable="mymacro" param="これはパラメータ値です"/>
|
||||
```
|
||||
|
||||
ウィジェット自体は、パラメータ値を指定できるなど、ショートカット構文よりも柔軟です。
|
||||
|
||||
!! 属性値にマクロ呼び出しを割り当てる
|
||||
|
||||
マクロの実行結果は、ウィジェットやHTML要素の属性に割り当てることができます。マクロの実行結果はWiki変換されませんが、[[パラメータの置換|Macro Parameter Handling]]は実行されます。
|
||||
|
||||
```
|
||||
<div class=<<myclasses "Horizontal">>>
|
||||
...
|
||||
</div>
|
||||
```
|
||||
|
||||
!! フィルターでマクロ呼び出しを使用する
|
||||
|
||||
マクロ呼び出しはフィルタ内で使用できます:
|
||||
|
||||
```
|
||||
<$list filter="[<mymacro param:'value'>]">
|
||||
...
|
||||
</$list>
|
||||
```
|
||||
<<.deprecated-since "5.4.0" "Calls">>
|
||||
@@ -0,0 +1,39 @@
|
||||
created: 20250208120000000
|
||||
modified: 20260507110511201
|
||||
original-modified: 20250208120000000
|
||||
tags: WikiText [[Widget Attributes]]
|
||||
title: Multi-Valued Variable Attribute Values
|
||||
ja-title: 複数値変数の属性値
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.4.0">> 複数値変数の属性値は、変数名を二重の丸括弧で囲むことで指定できるようになりました。これにより、[[複数値変数|Multi-Valued Variables]]の最初の値だけでなく、すべての値が属性に渡されます。
|
||||
|
||||
```
|
||||
<$transclude $variable="myproc" items=((myvar))/>
|
||||
```
|
||||
|
||||
これは、下位互換性のために最初の値のみを返す[[変数の属性値|Variable Attribute Values]]構文`<<var>>`の複数値版です。この関係は、`<var>`が単一の値を返し、`(var)`がすべての値を返すフィルタオペランドの既存の慣例を反映しています。
|
||||
|
||||
! 複数値変数非対応の属性
|
||||
|
||||
`((var))`が複数値変数をサポートしていないウィジェット属性([[textウィジェット|TextWidget]]の`text`属性など)で使用される場合、最初の値のみが使用されます:
|
||||
|
||||
```
|
||||
<$text text=((myvar))/>
|
||||
```
|
||||
|
||||
! プロシージャに複数値変数を渡す
|
||||
|
||||
この構文の主なユースケースは、複数の値を持つ変数を`$transclude`パイプラインを通してプロシージャや関数に渡すことです:
|
||||
|
||||
```
|
||||
\procedure showItems(itemList)
|
||||
<$text text={{{ [(itemList)join[-]] }}}/>
|
||||
\end
|
||||
|
||||
<$let items={{{ [all[tiddlers]sort[]] }}}>
|
||||
<$transclude $variable="showItems" itemList=((items))/>
|
||||
</$let>
|
||||
```
|
||||
|
||||
この例では、`items`に格納されているTiddlerタイトルの完全なリストが`showItems`プロシージャの`itemList`パラメータに渡されます。
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20220817153236691
|
||||
modified: 20260404112841923
|
||||
modified: 20260409114243582
|
||||
original-modified: 20221010074314452
|
||||
tags: [[Tables in WikiText]]
|
||||
title: Tables in WikiText CSS Utility Classes
|
||||
@@ -81,3 +81,14 @@ full-tiddler-widthである表に、左右の余白を追加するには、`tc-m
|
||||
| セル1|<$edit-text tiddler="$:/temp/test-table-input" tag="input" field="test"/> |
|
||||
|^ [[Tiddlerへのリンク|Link to a tiddler]]<br>さらに詳しい説明|<$edit-text tiddler="$:/temp/test-table-input" field="text"/> |
|
||||
""">>
|
||||
|
||||
!! 行スタイルを交互にした表
|
||||
|
||||
独自のスタイルシートを作成する必要があります。[[スタイルシートの使用|Using Stylesheets]]を参照してください。考え方は、`:nth-of-type(even/odd)`を使用してルールを作成することです。例:
|
||||
|
||||
```
|
||||
.myclass tbody tr:nth-of-type(even) { background-color: <<color tiddler-editor-fields-even>>; }
|
||||
.myclass tbody tr:nth-of-type(odd) { background-color: <<color tiddler-editor-fields-odd>>; }
|
||||
```
|
||||
|
||||
<<.note """~TiddlyWikiは、テーブルの行に`evenRow`クラスと`oddRow`クラスを自動的に適用します。ただし、これらのクラスの使用は推奨されません。行は'even'(想定とは逆)で始まり、ヘッダー、フッター、本文のいずれに表示されるかに関わらず、テーブルのすべての行は単一の結合された行セットとして扱われます。""">>
|
||||
@@ -66,6 +66,28 @@ or, when used with a template, `{{{ [tag[mechanism]]||TemplateTitle }}}` expands
|
||||
|
||||
<<.tip "//Internals//プラグインをインストールすると、生成されたウィジェットツリーをエディターのプレビューペインに表示できます">>
|
||||
|
||||
!! 複数値変数の表示
|
||||
|
||||
<<.from-version "5.4.0">> `((var))`構文をインラインで使用して、[[複数値変数|Multi-Valued Variables]]の値を、デフォルトではカンマとスペースで連結して表示できるようになりました:
|
||||
|
||||
```
|
||||
((myvar))
|
||||
((myvar||:))
|
||||
```
|
||||
|
||||
オプションの`||`区切り文字は、カスタムの区切り文字を指定します。
|
||||
|
||||
!! インラインフィルター表示
|
||||
|
||||
<<.from-version "5.4.0">> `(((filter)))`構文によりフィルタ式の結果をデフォルトではカンマとスペースで連結してインラインで表示します:
|
||||
|
||||
```
|
||||
((( [all[tiddlers]sort[]] )))
|
||||
((( [all[tiddlers]sort[]] ||: )))
|
||||
```
|
||||
|
||||
オプションの`||`区切り文字は、カスタムの区切り文字を指定します。これは、フィルタリングされたトランスクルージョン構文`{{{ }}}`に対応するインライン表示の表現です。
|
||||
|
||||
---
|
||||
|
||||
参照:
|
||||
|
||||
@@ -13,6 +13,7 @@ type: text/vnd.tiddlywiki
|
||||
* [[マクロ/変数のトランスクルージョン|Variable Attribute Values]]
|
||||
* [[フィルター式の結果として|Filtered Attribute Values]]
|
||||
* <<.from-version "5.3.0">> [[指定された文字列に対してフィルタと変数置換を実行した結果として|Substituted Attribute Values]]
|
||||
* <<.from-version "5.4.0">> [[複数値変数の参照として|Multi-Valued Variable Attribute Values]]
|
||||
|
||||
|属性タイプ|構文|h
|
||||
|リテラル |スペースを含まない値には、シングルクォーテーション、ダブルクォーテーション、トリプルクォーテーション、またはクォーテーションなし |
|
||||
@@ -20,9 +21,9 @@ type: text/vnd.tiddlywiki
|
||||
|変数 |マクロまたは変数呼び出しを囲む二重の山括弧 |
|
||||
|フィルタリング結果 |フィルター式を囲む三重の中括弧|
|
||||
|置換結果|置換処理を行うテキストの、単一または三重のバッククォート|
|
||||
|複数値変数 |変数名を囲む二重の丸括弧 |
|
||||
|
||||
|
||||
<$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><$view tiddler=<<currentTiddler>> field=ja-title/></h1></$link>
|
||||
<$transclude mode="block"/>
|
||||
</$list>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/LocalPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: http://127.0.0.1:8080/prerelease/library/v5.4.0/index.html
|
||||
url: http://127.0.0.1:8080/prerelease/library/v5.5.0/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease Local)
|
||||
|
||||
A locally installed version of the official ~TiddlyWiki plugin library at tiddlywiki.com for testing and debugging. //Requires a local web server to share the library//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.4.0/index.html
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.5.0/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease)
|
||||
|
||||
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
created: 20260714055110474
|
||||
modified: 20260714055129225
|
||||
tags:
|
||||
title: TiddlyWiki Pre-release Size Comparison
|
||||
|
||||
|
||||
\function bytes.to.mib(size) [abs[]divide[1048576]fixed[2]addsuffix[ MiB]]
|
||||
\function bytes.to.kib(size) [abs[]divide[1024]fixed[2]addsuffix[ KiB]]
|
||||
\function format.file.size(size) [<size>abs[]compare:number:gteq[1048576]bytes.to.mib<size>] :else[<size>abs[]compare:number:gteq[1024]bytes.to.kib<size>] :else[<size>addsuffix[ bytes]]
|
||||
|
||||
|
||||
\procedure get-wiki-filesize(filepath)
|
||||
\procedure completion-get-json()
|
||||
<!-- Success -->
|
||||
<$list filter="[<status>compare:number:gteq[200]compare:number:lteq[299]]" variable="ignore">
|
||||
<$action-log msg="completed" size={{{ [<data>jsonget[size]] }}}/>
|
||||
<$action-setfield $tiddler=`$:/temp/file-size-comparison/$(filepath)$` text={{{ [<data>jsonget[size]] }}} />
|
||||
</$list>
|
||||
\end completion-get-json
|
||||
|
||||
<$action-sendmessage
|
||||
$message="tm-http-request"
|
||||
url=`https://api.github.com/repos/TiddlyWiki/tiddlywiki.com-gh-pages/contents/$(filepath)$?ref=master`
|
||||
method="GET"
|
||||
oncompletion=<<completion-get-json>>
|
||||
var-filepath=<<filepath>>
|
||||
/>
|
||||
\end get-wiki-filesize
|
||||
|
||||
\procedure get-wiki-filesizes()
|
||||
<$list filter="empty.html prerelease/empty.html" variable="filepath">
|
||||
<$action-log />
|
||||
<<$transclude $variable="get-wiki-filesize" filepath=<<filepath>> >>
|
||||
|
||||
</$list>
|
||||
\end get-wiki-filesizes
|
||||
|
||||
|
||||
<%if [[$:/temp/file-size-comparison/empty.html]is[tiddler]] [[$:/temp/file-size-comparison/prerelease/empty.html]is[tiddler]] :and[count[]match[2]]%>
|
||||
<$let delta={{{ [{$:/temp/file-size-comparison/empty.html}subtract{$:/temp/file-size-comparison/prerelease/empty.html}] }}}
|
||||
message={{{ [<delta>sign[]match[-1]then[Size increased]] :else[<delta>sign[]match[1]then[Size decreased]] :else[[Size has not changed]] }}}
|
||||
>
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="158" height="20" role="img" style.zoom="1.5" aria-label="<$text text=<<message>>/>: <$text text={{{ [format.file.size<delta>] }}} /> bytes">
|
||||
<title><$text text=<<message>>/>: <$text text={{{ [format.file.size<delta>] }}} /></title>
|
||||
<filter id="blur">
|
||||
<feGaussianBlur stdDeviation="16"/>
|
||||
</filter>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="r">
|
||||
<rect width="158" height="20" rx="3"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="93" height="20" fill="#555"/>
|
||||
<rect x="93" width="65" height="20" fill="#67ac09"/>
|
||||
<rect width="158" height="20" fill="url(#s)"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
|
||||
<g transform="scale(.1)">
|
||||
<g aria-hidden="true" fill="#010101">
|
||||
<text x="475" y="150" fill-opacity=".8" filter="url(#blur)" textLength="830"><$text text=<<message>>/></text>
|
||||
<text x="475" y="150" fill-opacity=".3" textLength="830"><$text text=<<message>>/></text>
|
||||
</g>
|
||||
<text x="475" y="140" textLength="830"><$text text=<<message>>/></text>
|
||||
</g>
|
||||
<g transform="scale(.1)">
|
||||
<g aria-hidden="true" fill="#010101">
|
||||
<text x="1245" y="150" fill-opacity=".8" filter="url(#blur)" textLength="550"><$text text={{{ [format.file.size<delta>] }}} /></text>
|
||||
<text x="1245" y="150" fill-opacity=".3" textLength="550"><$text text={{{ [format.file.size<delta>] }}} /></text>
|
||||
</g>
|
||||
<text x="1245" y="140" textLength="550"><$text text={{{ [format.file.size<delta>] }}} /></text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
; Pre-release empty.html
|
||||
: <$text text={{{ [{$:/temp/file-size-comparison/prerelease/empty.html}] }}} /> bytes
|
||||
; <$text text={{{ [tag[ReleaseNotes]sort[released]last[]] }}} /> empty.html
|
||||
: <$text text={{{ [{$:/temp/file-size-comparison/empty.html}] }}} /> bytes
|
||||
|
||||
---
|
||||
|
||||
</$let>
|
||||
<%else %>
|
||||
<$button actions=<<get-wiki-filesizes>> class="tc-btn-big-green">
|
||||
Compare size of empty.html
|
||||
</$button>
|
||||
<%endif%>
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ The pre-release is also available as an [[empty wiki|https://tiddlywiki.com/prer
|
||||
|
||||
</div>
|
||||
|
||||
{{ TiddlyWiki Pre-release Size Comparison }}
|
||||
|
||||
<$list filter="[tag[ReleaseNotes]!has[released]!sort[created]]">
|
||||
<div class="tc-titlebar">
|
||||
<h2 class="tc-title"><$text text=<<currentTiddler>>/></h2>
|
||||
|
||||
@@ -7,7 +7,7 @@ const crossPlatformIndexPath = indexPath.replace(/^\/+/, "");
|
||||
|
||||
test("get started link", async ({ page }) => {
|
||||
// The tests can take a while to run
|
||||
const timeout = 1000 * 30;
|
||||
const timeout = 1000 * 60;
|
||||
test.setTimeout(timeout);
|
||||
|
||||
// Load the generated test TW html
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Fast test runner that boots the test edition and runs selected test specs.
|
||||
Skips the expensive --rendertiddler step from --build index.
|
||||
|
||||
Usage:
|
||||
node test-parser-quick.js [test-files...]
|
||||
|
||||
Examples:
|
||||
node test-parser-quick.js # Run ALL specs
|
||||
node test-parser-quick.js test-wikitext-parser # Run one spec file
|
||||
node test-parser-quick.js test-wikitext-parser test-filters # Run multiple spec files
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var $tw = require("../../boot/boot.js").TiddlyWiki();
|
||||
|
||||
$tw.boot.argv = ["editions/test"];
|
||||
|
||||
// Disable startup modules that aren't needed for tests
|
||||
$tw.boot.disabledStartupModules = [
|
||||
"favicon", "password", "browser-messaging", "info",
|
||||
"render", "rootwidget", "story", "windows"
|
||||
];
|
||||
|
||||
$tw.boot.boot(function() {
|
||||
var args = process.argv.slice(2);
|
||||
var allTests = $tw.wiki.filterTiddlers("[all[tiddlers+shadows]type[application/javascript]tag[$:/tags/test-spec]]");
|
||||
|
||||
// Filter test tiddlers if arguments provided
|
||||
var testsToRun;
|
||||
if(args.length > 0) {
|
||||
testsToRun = allTests.filter(function(title) {
|
||||
return args.some(function(arg) {
|
||||
return title.toLowerCase().indexOf(arg.toLowerCase()) !== -1;
|
||||
});
|
||||
});
|
||||
if(testsToRun.length === 0) {
|
||||
console.error("No test files matched: " + args.join(", "));
|
||||
console.error("Available test files:");
|
||||
allTests.forEach(function(t) { console.error(" " + t); });
|
||||
process.exit(1);
|
||||
}
|
||||
} else {
|
||||
testsToRun = allTests;
|
||||
}
|
||||
|
||||
// Override the test filter to only include our selected tests
|
||||
var titlesSet = Object.create(null);
|
||||
testsToRun.forEach(function(t) { titlesSet[t] = true; });
|
||||
|
||||
var origFilterTiddlers = $tw.wiki.filterTiddlers.bind($tw.wiki);
|
||||
$tw.wiki.filterTiddlers = function(filterString) {
|
||||
var result = origFilterTiddlers.apply(null, arguments);
|
||||
if(filterString.indexOf("$:/tags/test-spec") !== -1) {
|
||||
return result.filter(function(t) { return titlesSet[t]; });
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
console.log("Running " + testsToRun.length + " of " + allTests.length + " test files");
|
||||
|
||||
// Use the jasmine plugin's own runTests function
|
||||
var jasmine = $tw.modules.execute("$:/plugins/tiddlywiki/jasmine/jasmine-plugin.js");
|
||||
jasmine.runTests(function(err) {
|
||||
if(err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
modified: 20260413092032887
|
||||
title: TabFour
|
||||
|
||||
Text tab 4
|
||||
@@ -0,0 +1,5 @@
|
||||
caption: t 1
|
||||
modified: 20260413092032887
|
||||
title: TabOne
|
||||
|
||||
Text tab 1
|
||||
@@ -0,0 +1,6 @@
|
||||
caption: t 3
|
||||
description: desc
|
||||
modified: 20260413092032887
|
||||
title: TabThree
|
||||
|
||||
Text tab 3
|
||||
@@ -0,0 +1,5 @@
|
||||
caption: t 2
|
||||
modified: 20260413092032887
|
||||
title: TabTwo
|
||||
|
||||
Text tab 2
|
||||
@@ -0,0 +1,7 @@
|
||||
code-body: yes
|
||||
modified: 20260413092032887
|
||||
title: body-template
|
||||
|
||||
!! <<currentTab>>
|
||||
|
||||
<$transclude tiddler=<<currentTab>> mode="block"/>
|
||||
@@ -0,0 +1,5 @@
|
||||
code-body: yes
|
||||
modified: 20260413092032887
|
||||
title: button-template
|
||||
|
||||
<$transclude tiddler=<<currentTab>> field="description"><$transclude tiddler=<<currentTab>> field="caption"><$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/></$transclude></$transclude>
|
||||
@@ -0,0 +1,72 @@
|
||||
code-body: yes
|
||||
modified: 20260413092032887
|
||||
title: tabs-macro-definition
|
||||
|
||||
\define tabs-button()
|
||||
\whitespace trim
|
||||
<$button
|
||||
set=<<tabsState>>
|
||||
setTo=<<currentTab>>
|
||||
default=<<__default__>>
|
||||
selectedClass="tc-tab-selected"
|
||||
selectedAria="aria-selected"
|
||||
tooltip={{!!tooltip}}
|
||||
role="tab"
|
||||
data-tab-title=<<currentTab>>
|
||||
>
|
||||
<$tiddler tiddler=<<save-currentTiddler>>>
|
||||
<$set name="tv-wikilinks" value="no">
|
||||
<$transclude tiddler=<<__buttonTemplate__>> mode="inline">
|
||||
<$transclude tiddler=<<currentTab>> field="caption">
|
||||
<$macrocall $name="currentTab" $type="text/plain" $output="text/plain"/>
|
||||
</$transclude>
|
||||
</$transclude>
|
||||
</$set>
|
||||
</$tiddler>
|
||||
<<__actions__>>
|
||||
</$button>
|
||||
\end
|
||||
|
||||
\define tabs-tab()
|
||||
\whitespace trim
|
||||
<$set name="save-currentTiddler" value=<<currentTiddler>>>
|
||||
<$tiddler tiddler=<<currentTab>>>
|
||||
<<tabs-button>>
|
||||
</$tiddler>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define tabs-tab-list()
|
||||
\whitespace trim
|
||||
<$list filter=<<__tabsList__>> variable="currentTab" storyview="pop">
|
||||
<<tabs-tab>>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define tabs-tab-body()
|
||||
\whitespace trim
|
||||
<$list filter=<<__tabsList__>> variable="currentTab">
|
||||
<$reveal type="match" state=<<tabsState>> text=<<currentTab>> default=<<__default__>> retain=<<__retain__>> tag="div">
|
||||
<$transclude tiddler=<<__template__>> mode="block">
|
||||
<$transclude tiddler=<<currentTab>> mode="block"/>
|
||||
</$transclude>
|
||||
</$reveal>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define tabs(tabsList,default,state:"$:/state/tab",class,template,buttonTemplate,retain,actions,explicitState)
|
||||
\whitespace trim
|
||||
<$qualify title=<<__state__>> name="qualifiedState">
|
||||
<$let tabsState={{{ [<__explicitState__>minlength[1]] ~[<qualifiedState>] }}}>
|
||||
<div class={{{ [[tc-tab-set]addsuffix[ ]addsuffix<__class__>] }}} role="tablist">
|
||||
<div class={{{ [[tc-tab-buttons]addsuffix[ ]addsuffix<__class__>] }}}>
|
||||
<<tabs-tab-list>>
|
||||
</div>
|
||||
<div class={{{ [[tc-tab-divider]addsuffix[ ]addsuffix<__class__>] }}}/>
|
||||
<div class={{{ [[tc-tab-content]addsuffix[ ]addsuffix<__class__>] }}} role="tabpanel">
|
||||
<<tabs-tab-body>>
|
||||
</div>
|
||||
</div>
|
||||
</$let>
|
||||
</$qualify>
|
||||
\end
|
||||
@@ -0,0 +1,5 @@
|
||||
modified: 20260413092032887
|
||||
title: test-tabs-horizontal-all
|
||||
|
||||
\import [[tabs-macro-definition]]
|
||||
<<tabs "TabOne TabTwo TabThree TabFour" "TabTwo" "$:/state/test-tab-01" template:"body-template" buttonTemplate:"button-template" explicitState:"$:/state/explicit">>
|
||||
@@ -0,0 +1,5 @@
|
||||
modified: 20260413092032887
|
||||
title: test-tabs-horizontal
|
||||
|
||||
\import [[tabs-macro-definition]]
|
||||
<<tabs "TabOne TabTwo TabThree TabFour" "TabTwo" "$:/state/test-tab-01">>
|
||||
@@ -0,0 +1,5 @@
|
||||
modified: 20260413092032887
|
||||
title: test-tabs-vertical
|
||||
|
||||
\import [[tabs-macro-definition]]
|
||||
<<tabs "TabOne TabTwo TabThree TabFour" "TabTwo" "$:/state/test-tab-02" "tc-vertical">>
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Parse/BackCompat/MacrocallColonNamed
|
||||
description: Macrocall named-parameter syntax using colon continues to work
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<<x d:"hi">>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=hi</p>
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Parse/BackCompat/MacrocallColonNonStrict
|
||||
description: Colon-separator requires a strict identifier name; otherwise value is treated as positional (fix #9788)
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<<x $:/a:"v">>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=<a class="tc-tiddlylink tc-tiddlylink-missing" href="#%24%3A%2Fa">$:/a</a>:</p>
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Parse/BackCompat/MacrocallEqualsNoValue
|
||||
description: Macrocall named parameter with =-separator but no value fails to parse the macro call
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<<x d=>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><<x d="true">></x></p>
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Parse/BackCompat/MacrocallNamedEquals
|
||||
description: Macrocall attribute with =-separator (restored compact call syntax, v5.3.9+)
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<<x d="hello">>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=hello</p>
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Parse/BackCompat/MacrocallFilteredValue
|
||||
description: Macrocall attribute value can be a filtered value {{{...}}}
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<<x d={{{[[hi]]}}}>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=hi</p>
|
||||
@@ -0,0 +1,17 @@
|
||||
title: Parse/BackCompat/MacrocallIndirectValue
|
||||
description: Macrocall attribute value can be an indirect value {{tid!!field}}
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<<x d={{Other!!foo}}>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=FROM-OTHER</p>
|
||||
+
|
||||
title: Other
|
||||
foo: FROM-OTHER
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
title: Parse/BackCompat/MacrocallMvvValue
|
||||
description: Macrocall attribute value can be an MVV reference ((v))
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define d() DEFD
|
||||
\define x(d) got=$d$
|
||||
<<x d=((d))>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=DEFD</p>
|
||||
@@ -0,0 +1,14 @@
|
||||
title: Parse/BackCompat/MacrocallNestedMacroValue
|
||||
description: Macrocall attribute value can be a nested macro invocation
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define d() DEFD
|
||||
\define x(d) got=$d$
|
||||
<<x d=<<d>>>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=DEFD</p>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
title: Parse/BackCompat/MacrocallSubstitutedValue
|
||||
description: Macrocall attribute value can be a substituted value `...`
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<<x d=`hi`>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=hi</p>
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Parse/BackCompat/MacrocallPositionalGt
|
||||
description: Bare > (not followed by >) is permitted in unquoted macrocall positional params
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<<x foo>val>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=foo>val</p>
|
||||
@@ -0,0 +1,17 @@
|
||||
title: Parse/BackCompat/MalformedMultiLineTerminator
|
||||
description: When << value looks like a macro invocation but fails to parse, the enclosing widget tag must fail cleanly so the remainder of the document is not silently reinterpreted (the v5.4 strict parser previously collapsed to attribute="true" and swallowed subsequent lines as stray attributes)
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define d() DEFD
|
||||
\define x(d) got=$d$
|
||||
<$macrocall $name="x" d=<<d> />
|
||||
<$macrocall $name="x" d=<<d> />
|
||||
>>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p><$macrocall $name="x" d=<<d> />
|
||||
<$macrocall $name="x" d=DEFD</d></p>
|
||||
@@ -0,0 +1,14 @@
|
||||
title: Parse/BackCompat/QuotedGtInNestedMacro
|
||||
description: Nested macro invocation in widget attribute can contain > in quoted inner attribute values
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define d() DEFD
|
||||
\define x(d) got=$d$
|
||||
<$macrocall $name="x" d=<<d b="x>y">> />
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=DEFD</p>
|
||||
@@ -0,0 +1,14 @@
|
||||
title: Parse/BackCompat/MalformedNoTerminator
|
||||
description: Widget attribute value starting with << but with no >> ahead falls through to "true" (matches v5.3.8)
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define d() DEFD
|
||||
\define x(d) got=$d$
|
||||
<$macrocall $name="x" d=<<d> />
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=true</p>
|
||||
@@ -0,0 +1,14 @@
|
||||
title: Parse/BackCompat/ValidNestedMacro
|
||||
description: Widget attribute value with well-formed nested macro invocation
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define d() DEFD
|
||||
\define x(d) got=$d$
|
||||
<$macrocall $name="x" d=<<d>> />
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=DEFD</p>
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Parse/BackCompat/WidgetAttrEqualsNoValue
|
||||
description: Widget attribute with trailing equals and no value falls through to "true"
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<$macrocall $name="x" d= />
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=true</p>
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Parse/BackCompat/WidgetAttrMalformedMvv
|
||||
description: Widget attribute value with unclosed ((v) falls through to a string literal
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<$macrocall $name="x" d=((d) />
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=((d)</p>
|
||||
@@ -0,0 +1,14 @@
|
||||
title: Parse/BackCompat/WidgetAttrMvvValue
|
||||
description: Widget attribute value can be an MVV reference ((v))
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define d() DEFD
|
||||
\define x(d) got=$d$
|
||||
<$macrocall $name="x" d=((d)) />
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=DEFD</p>
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Parse/BackCompat/WidgetAttrSubstitutedValue
|
||||
description: Widget attribute value can be a substituted value `...`
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define x(d) got=$d$
|
||||
<$macrocall $name="x" d=`hi` />
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>got=hi</p>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user