mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-07-25 04:58:54 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8d3b409c3 | ||
|
|
3d70015d5b | ||
|
|
55deaf2f11 |
@@ -10,12 +10,12 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "${{ env.NODE_VERSION }}"
|
||||
- run: "./bin/ci-test.sh"
|
||||
- uses: actions/upload-artifact@v7
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report
|
||||
@@ -30,8 +30,8 @@ jobs:
|
||||
TW5_BUILD_MAIN_EDITION: "./editions/prerelease"
|
||||
TW5_BUILD_OUTPUT: "./output/prerelease"
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "${{ env.NODE_VERSION }}"
|
||||
- run: "./bin/ci-pre-build.sh"
|
||||
@@ -62,8 +62,8 @@ jobs:
|
||||
TW5_BUILD_OUTPUT: "./output"
|
||||
TW5_BUILD_ARCHIVE: "./output"
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "${{ env.NODE_VERSION }}"
|
||||
- run: "./bin/ci-pre-build.sh"
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
steps:
|
||||
- name: build-size-check
|
||||
id: get_sizes
|
||||
uses: TiddlyWiki/cerebrus@v8.1
|
||||
uses: TiddlyWiki/cerebrus@v7
|
||||
with:
|
||||
pr_number: ${{ github.event.pull_request.number }}
|
||||
repo: ${{ github.repository }}
|
||||
@@ -52,4 +52,4 @@ jobs:
|
||||
pr_size: '${{ needs.calculate-build-size.outputs.pr_size }}',
|
||||
base_size: '${{ needs.calculate-build-size.outputs.base_size }}'
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Build and check size
|
||||
uses: TiddlyWiki/cerebrus@v8.1
|
||||
uses: TiddlyWiki/cerebrus@v7
|
||||
with:
|
||||
pr_number: ${{ inputs.pr_number }}
|
||||
repo: ${{ github.repository }}
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
steps:
|
||||
# Step 1: Validate PR paths
|
||||
- name: Validate PR Paths
|
||||
uses: TiddlyWiki/cerebrus@v8.1
|
||||
uses: TiddlyWiki/cerebrus@v6
|
||||
with:
|
||||
pr_number: ${{ github.event.pull_request.number }}
|
||||
repo: ${{ github.repository }}
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
# Step 2: Validate change notes
|
||||
- name: Validate Change Notes
|
||||
uses: TiddlyWiki/cerebrus@v8.1
|
||||
uses: TiddlyWiki/cerebrus@v7
|
||||
with:
|
||||
pr_number: ${{ github.event.pull_request.number }}
|
||||
repo: ${{ github.repository }}
|
||||
|
||||
@@ -3,4 +3,3 @@
|
||||
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.5.0.
|
||||
TW5_BUILD_VERSION=v5.4.0
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ git clone --depth=1 --branch=main "https://github.com/TiddlyWiki/tiddlywiki.org-
|
||||
|
||||
# Make the CNAME file that GitHub Pages requires
|
||||
|
||||
# echo "tiddlywiki.org" > $TWORG_BUILD_OUTPUT/CNAME
|
||||
echo "tiddlywiki.org" > $TWORG_BUILD_OUTPUT/CNAME
|
||||
|
||||
# Delete any existing static content
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
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
@@ -217,11 +217,6 @@ exports.generateTiddlerFileInfo = function(tiddler,options) {
|
||||
fileInfo.isEditableFile = true;
|
||||
fileInfo.originalpath = options.fileInfo.originalpath;
|
||||
}
|
||||
// Propagate the pinFilepath flag (so generateTiddlerFilepath can short-circuit
|
||||
// FileSystemPaths and write back to the original location)
|
||||
if(options.fileInfo && !!options.fileInfo.pinFilepath) {
|
||||
fileInfo.pinFilepath = true;
|
||||
}
|
||||
// Check if the tiddler has any unsafe fields that can't be expressed in a .tid or .meta file: containing control characters, or leading/trailing whitespace
|
||||
var hasUnsafeFields = false;
|
||||
$tw.utils.each(tiddler.getFieldStrings(),function(value,fieldName) {
|
||||
@@ -324,16 +319,9 @@ exports.generateTiddlerFilepath = function(title,options) {
|
||||
extension = options.extension || "",
|
||||
originalpath = (options.fileInfo && options.fileInfo.originalpath) ? options.fileInfo.originalpath : "",
|
||||
overwrite = options.fileInfo && options.fileInfo.overwrite || false,
|
||||
pinFilepath = !!(options.fileInfo && options.fileInfo.pinFilepath),
|
||||
filepath;
|
||||
// If the tiddler's filepath is pinned via tiddlywiki.files, the originalpath
|
||||
// wins and the path filters are skipped entirely.
|
||||
if(pinFilepath && originalpath) {
|
||||
var pinnedExt = path.extname(originalpath);
|
||||
filepath = originalpath.substring(0,originalpath.length - pinnedExt.length);
|
||||
}
|
||||
// Check if any of the pathFilters applies
|
||||
if(!filepath && options.pathFilters && options.wiki) {
|
||||
if(options.pathFilters && options.wiki) {
|
||||
$tw.utils.each(options.pathFilters,function(filter) {
|
||||
if(!filepath) {
|
||||
var source = options.wiki.makeTiddlerIterator([title]),
|
||||
@@ -364,10 +352,8 @@ exports.generateTiddlerFilepath = function(title,options) {
|
||||
}
|
||||
// Replace any Unicode control codes
|
||||
filepath = filepath.replace(/[\x00-\x1f\x80-\x9f]/g,"_");
|
||||
// Replace any characters that can't be used in cross-platform filenames.
|
||||
if(!pinFilepath) {
|
||||
filepath = $tw.utils.transliterate(filepath.replace(/<|>|~|\:|\"|\||\?|\*|\^|\\/g,"_"));
|
||||
}
|
||||
// Replace any characters that can't be used in cross-platform filenames
|
||||
filepath = $tw.utils.transliterate(filepath.replace(/<|>|~|\:|\"|\||\?|\*|\^/g,"_"));
|
||||
// Replace any dots or spaces at the end of the extension with the same number of underscores
|
||||
extension = extension.replace(/[\. ]+$/, function (u) { return u.replace(/[\. ]/g, "_");});
|
||||
// Truncate the extension if it is too long
|
||||
|
||||
@@ -9,14 +9,15 @@ Serve tiddlers over http
|
||||
|
||||
"use strict";
|
||||
|
||||
let fs, path, crypto, zlib, URL;
|
||||
let fs, url, path, querystring, crypto, zlib;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -259,8 +260,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 = new URL(request.url, "http://localhost");
|
||||
state.queryParameters = Object.fromEntries(state.urlInfo.searchParams);
|
||||
state.urlInfo = url.parse(request.url);
|
||||
state.queryParameters = querystring.parse(state.urlInfo.query);
|
||||
state.pathPrefix = options.pathPrefix || this.get("path-prefix") || "";
|
||||
// Enable CORS
|
||||
if(this.corsEnable) {
|
||||
|
||||
@@ -255,5 +255,4 @@ 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/Generate/Caption: Click to generate wiki information report
|
||||
WikiInformation/Drag/Caption: Drag this link to copy this tool to another wiki
|
||||
@@ -10,7 +10,7 @@ Advanced/ShadowInfo/Shadow/Hint: The tiddler <$link to=<<infoTiddler>>><$text te
|
||||
Advanced/ShadowInfo/Shadow/Source: It is defined in the plugin <$link to=<<pluginTiddler>>><$text text=<<pluginTiddler>>/></$link>
|
||||
Advanced/ShadowInfo/OverriddenShadow/Hint: It is overridden by an ordinary tiddler
|
||||
Advanced/CascadeInfo/Heading: Cascade Details
|
||||
Advanced/CascadeInfo/Hint: These are the view template segments that are resolved for each of the system view template cascades
|
||||
Advanced/CascadeInfo/Hint: These are the view template segments (tagged <<tag "$:/tags/ViewTemplate">>) using a cascade filter and their resulting template for the current tiddler.
|
||||
Advanced/CascadeInfo/Detail/View: View
|
||||
Advanced/CascadeInfo/Detail/ActiveCascadeFilter: Active cascade filter
|
||||
Advanced/CascadeInfo/Detail/Template: Template
|
||||
|
||||
@@ -78,6 +78,7 @@ class BackgroundActionTracker {
|
||||
fnProcess: (changes) => {
|
||||
if(this.hasChanged) {
|
||||
this.hasChanged = false;
|
||||
console.log("Processing background action", this.title);
|
||||
const tiddler = this.wiki.getTiddler(this.title);
|
||||
let doActions = true;
|
||||
if(tiddler && tiddler.fields.platforms) {
|
||||
@@ -88,7 +89,6 @@ class BackgroundActionTracker {
|
||||
}
|
||||
}
|
||||
if(doActions) {
|
||||
console.log("Processing background action", this.title);
|
||||
this.wiki.invokeActionString(
|
||||
this.actions,
|
||||
null,
|
||||
|
||||
@@ -156,13 +156,14 @@ Fix the height of textarea to fit content
|
||||
FramedEngine.prototype.fixHeight = function() {
|
||||
// Make sure styles are updated
|
||||
this.copyStyles();
|
||||
if(this.widget.editTag === "textarea") {
|
||||
// If .editRows is initialised, it takes precedence
|
||||
if(this.widget.editTag === "textarea" && !this.widget.editRows) {
|
||||
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 if(!this.widget.editRows) {
|
||||
} else {
|
||||
var fixedHeight = parseInt(this.widget.wiki.getTiddlerText(HEIGHT_VALUE_TITLE,"400px"),10);
|
||||
fixedHeight = Math.max(fixedHeight,20);
|
||||
this.domNode.style.height = fixedHeight + "px";
|
||||
|
||||
@@ -100,12 +100,13 @@ SimpleEngine.prototype.getText = function() {
|
||||
Fix the height of textarea to fit content
|
||||
*/
|
||||
SimpleEngine.prototype.fixHeight = function() {
|
||||
if(this.widget.editTag === "textarea") {
|
||||
// If .editRows is initialised, it takes precedence
|
||||
if((this.widget.editTag === "textarea") && !this.widget.editRows) {
|
||||
if(this.widget.editAutoHeight) {
|
||||
if(this.domNode && !this.domNode.isTiddlyWikiFakeDom) {
|
||||
$tw.utils.resizeTextAreaToFit(this.domNode,this.widget.editMinHeight);
|
||||
}
|
||||
} else if(!this.widget.editRows) {
|
||||
} else {
|
||||
var fixedHeight = parseInt(this.widget.wiki.getTiddlerText(HEIGHT_VALUE_TITLE,"400px"),10);
|
||||
fixedHeight = Math.max(fixedHeight,20);
|
||||
this.domNode.style.height = fixedHeight + "px";
|
||||
|
||||
@@ -13,15 +13,14 @@ Export our filter prefix function
|
||||
exports.intersection = function(operationSubFunction) {
|
||||
return function(results,source,widget) {
|
||||
if(results.length !== 0) {
|
||||
const secondRunResults = operationSubFunction(source,widget),
|
||||
secondRunSet = new Set(secondRunResults),
|
||||
firstRunResults = results.toArray();
|
||||
var secondRunResults = operationSubFunction(source,widget);
|
||||
var firstRunResults = results.toArray();
|
||||
results.clear();
|
||||
firstRunResults.forEach((title) => {
|
||||
if(secondRunSet.has(title)) {
|
||||
$tw.utils.each(firstRunResults,function(title) {
|
||||
if(secondRunResults.indexOf(title) !== -1) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -13,28 +13,33 @@ Export our filter prefix function
|
||||
exports.sort = function(operationSubFunction,options) {
|
||||
return function(results,source,widget) {
|
||||
if(results.length > 0) {
|
||||
const suffixes = options.suffixes,
|
||||
var suffixes = options.suffixes,
|
||||
sortType = (suffixes[0] && suffixes[0][0]) ? suffixes[0][0] : "string",
|
||||
invert = suffixes[1] ? suffixes[1].includes("reverse") : false,
|
||||
isCaseSensitive = suffixes[1] ? suffixes[1].includes("casesensitive") : false,
|
||||
invert = suffixes[1] ? (suffixes[1].indexOf("reverse") !== -1) : false,
|
||||
isCaseSensitive = suffixes[1] ? (suffixes[1].indexOf("casesensitive") !== -1) : false,
|
||||
inputTitles = results.toArray(),
|
||||
sortKeys = [],
|
||||
compareFn = $tw.utils.makeCompareFunction(sortType,{defaultType: "string", invert:invert, isCaseSensitive:isCaseSensitive});
|
||||
results.each((title) => {
|
||||
const key = operationSubFunction(
|
||||
options.wiki.makeTiddlerIterator([title]),
|
||||
widget.makeFakeWidgetWithVariables({
|
||||
"currentTiddler": "" + title,
|
||||
"..currentTiddler": widget.getVariable("currentTiddler",{defaultValue:""})
|
||||
})
|
||||
);
|
||||
indexes = new Array(inputTitles.length),
|
||||
compareFn;
|
||||
results.each(function(title) {
|
||||
var key = operationSubFunction(options.wiki.makeTiddlerIterator([title]),widget.makeFakeWidgetWithVariables({
|
||||
"currentTiddler": "" + title,
|
||||
"..currentTiddler": widget.getVariable("currentTiddler",{defaultValue:""})
|
||||
}));
|
||||
sortKeys.push(key[0] || "");
|
||||
});
|
||||
results.clear();
|
||||
// Prepare an array of indexes to sort
|
||||
let indexes = Array.from(inputTitles.keys());
|
||||
indexes.sort((a,b) => compareFn(sortKeys[a],sortKeys[b]));
|
||||
indexes.forEach((index) => {
|
||||
for(var t=0; t<inputTitles.length; t++) {
|
||||
indexes[t] = t;
|
||||
}
|
||||
// Sort the indexes
|
||||
compareFn = $tw.utils.makeCompareFunction(sortType,{defaultType: "string", invert:invert, isCaseSensitive:isCaseSensitive});
|
||||
indexes = indexes.sort(function(a,b) {
|
||||
return compareFn(sortKeys[a],sortKeys[b]);
|
||||
});
|
||||
// Add to results in correct order
|
||||
$tw.utils.each(indexes,function(index) {
|
||||
results.push(inputTitles[index]);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -13,22 +13,37 @@ Filter operator for checking if a title starts with a prefix
|
||||
Export our filter function
|
||||
*/
|
||||
exports.prefix = function(source,operator,options) {
|
||||
const results = [],
|
||||
suffixes = (operator.suffixes || [])[0] || [],
|
||||
caseInsensitive = suffixes.includes("caseinsensitive"),
|
||||
negate = operator.prefix === "!";
|
||||
|
||||
const operand = caseInsensitive ?
|
||||
operator.operand.toLowerCase() :
|
||||
operator.operand;
|
||||
|
||||
source((tiddler,title) => {
|
||||
const value = caseInsensitive ? title.toLowerCase() : title,
|
||||
matches = value.startsWith(operand);
|
||||
if(negate ? !matches : matches) {
|
||||
results.push(title);
|
||||
var results = [],
|
||||
suffixes = (operator.suffixes || [])[0] || [];
|
||||
if(suffixes.indexOf("caseinsensitive") !== -1) {
|
||||
var operand = operator.operand.toLowerCase();
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(title.toLowerCase().substr(0,operand.length) !== operand) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
if(title.toLowerCase().substr(0,operand.length) === operand) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(title.substr(0,operator.operand.length) !== operator.operand) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
if(title.substr(0,operator.operand.length) === operator.operand) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -14,13 +14,13 @@ Export our filter function
|
||||
*/
|
||||
exports.sortsub = function(source,operator,options) {
|
||||
// Compile the subfilter
|
||||
let filterFn = options.wiki.compileFilter(operator.operand);
|
||||
var filterFn = options.wiki.compileFilter(operator.operand);
|
||||
// Collect the input titles and the corresponding sort keys
|
||||
let inputTitles = [],
|
||||
var inputTitles = [],
|
||||
sortKeys = [];
|
||||
source(function(tiddler,title) {
|
||||
inputTitles.push(title);
|
||||
let r = filterFn.call(options.wiki,function(iterator) {
|
||||
var r = filterFn.call(options.wiki,function(iterator) {
|
||||
iterator(options.wiki.getTiddler(title),title);
|
||||
},options.widget.makeFakeWidgetWithVariables({
|
||||
"currentTiddler": "" + title,
|
||||
@@ -29,12 +29,17 @@ exports.sortsub = function(source,operator,options) {
|
||||
sortKeys.push(r[0] || "");
|
||||
});
|
||||
// Rather than sorting the titles array, we'll sort the indexes so that we can consult both arrays
|
||||
let indexes = Array.from(inputTitles.keys());
|
||||
var indexes = new Array(inputTitles.length);
|
||||
for(var t=0; t<inputTitles.length; t++) {
|
||||
indexes[t] = t;
|
||||
}
|
||||
// Sort the indexes
|
||||
let compareFn = $tw.utils.makeCompareFunction(operator.suffix,{defaultType: "string",invert: operator.prefix === "!"});
|
||||
indexes = indexes.sort((a,b) => compareFn(sortKeys[a],sortKeys[b]));
|
||||
var compareFn = $tw.utils.makeCompareFunction(operator.suffix,{defaultType: "string",invert: operator.prefix === "!"});
|
||||
indexes = indexes.sort(function(a,b) {
|
||||
return compareFn(sortKeys[a],sortKeys[b]);
|
||||
});
|
||||
// Make the results array in order
|
||||
let results = [];
|
||||
var results = [];
|
||||
$tw.utils.each(indexes,function(index) {
|
||||
results.push(inputTitles[index]);
|
||||
});
|
||||
|
||||
@@ -91,35 +91,22 @@ function diffLineWordMode(text1,text2,mode) {
|
||||
return diffs;
|
||||
}
|
||||
|
||||
exports.makepatches = function(source, operator, options) {
|
||||
const suffixes = operator.suffixes || [],
|
||||
[modeArg = [], formatArg = []] = suffixes,
|
||||
modeSuffix = modeArg[0] || operator.suffix || "",
|
||||
mode = ["lines", "words"].includes(modeSuffix) ? modeSuffix : "",
|
||||
isJson = formatArg[0] === "json",
|
||||
results = [];
|
||||
|
||||
source((tiddler, title) => {
|
||||
if (isJson) {
|
||||
const diffs = (mode === "lines" || mode === "words")
|
||||
? diffLineWordMode(title, operator.operand, mode)
|
||||
: dmp.diffMain(title, operator.operand);
|
||||
|
||||
const jsonOutput = diffs.map(([typeCode, text]) => ({
|
||||
type: typeCode === 1 ? "insert" : (typeCode === -1 ? "delete" : "equal"),
|
||||
text
|
||||
}));
|
||||
results.push(JSON.stringify(jsonOutput));
|
||||
exports.makepatches = function(source,operator,options) {
|
||||
var suffix = operator.suffix || "",
|
||||
result = [];
|
||||
|
||||
source(function(tiddler,title) {
|
||||
let diffs, patches;
|
||||
if(suffix === "lines" || suffix === "words") {
|
||||
diffs = diffLineWordMode(title,operator.operand,suffix);
|
||||
patches = dmp.patchMake(title,diffs);
|
||||
} else {
|
||||
const patches = (mode === "lines" || mode === "words")
|
||||
? dmp.patchMake(title, diffLineWordMode(title, operator.operand, mode))
|
||||
: dmp.patchMake(title, operator.operand);
|
||||
|
||||
results.push(dmp.patchToText(patches));
|
||||
patches = dmp.patchMake(title,operator.operand);
|
||||
}
|
||||
Array.prototype.push.apply(result,[dmp.patchToText(patches)]);
|
||||
});
|
||||
|
||||
return results;
|
||||
return result;
|
||||
};
|
||||
|
||||
exports.applypatches = makeStringBinaryOperator(
|
||||
@@ -248,4 +235,4 @@ exports.charcode = function(source,operator,options) {
|
||||
}
|
||||
});
|
||||
return [chars.join("")];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -13,12 +13,11 @@ Filter operator returning its operand evaluated as a filter
|
||||
Export our filter function
|
||||
*/
|
||||
exports.subfilter = function(source,operator,options) {
|
||||
const list = options.wiki.filterTiddlers(operator.operand,options.widget,source);
|
||||
var list = options.wiki.filterTiddlers(operator.operand,options.widget,source);
|
||||
if(operator.prefix === "!") {
|
||||
const results = [],
|
||||
listSet = new Set(list);
|
||||
source((tiddler,title) => {
|
||||
if(!listSet.has(title)) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
if(list.indexOf(title) === -1) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -13,27 +13,41 @@ Filter operator for checking if a title ends with a suffix
|
||||
Export our filter function
|
||||
*/
|
||||
exports.suffix = function(source,operator,options) {
|
||||
const results = [],
|
||||
var results = [],
|
||||
suffixes = (operator.suffixes || [])[0] || [];
|
||||
|
||||
if(!operator.operand) {
|
||||
source((tiddler,title) => {
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
return results;
|
||||
}
|
||||
|
||||
const caseInsensitive = suffixes.indexOf("caseinsensitive") !== -1,
|
||||
negate = operator.prefix === "!",
|
||||
operand = caseInsensitive ? operator.operand.toLowerCase() : operator.operand;
|
||||
|
||||
source((tiddler,title) => {
|
||||
const value = caseInsensitive ? title.toLowerCase() : title,
|
||||
matches = value.endsWith(operand);
|
||||
if(negate ? !matches : matches) {
|
||||
results.push(title);
|
||||
} else if(suffixes.indexOf("caseinsensitive") !== -1) {
|
||||
var operand = operator.operand.toLowerCase();
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(title.toLowerCase().substr(-operand.length) !== operand) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
if(title.toLowerCase().substr(-operand.length) === operand) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(title.substr(-operator.operand.length) !== operator.operand) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
if(title.substr(-operator.operand.length) === operator.operand) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -22,11 +22,12 @@ 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
|
||||
const excludeTagSet = new Set(options.wiki.getTiddlersWithTag(operator.operand));
|
||||
tiddlers = options.wiki.getTiddlersWithTag(operator.operand);
|
||||
source(function(tiddler,title) {
|
||||
if(!excludeTagSet.has(title)) {
|
||||
if(tiddlers.indexOf(title) === -1) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
@@ -38,9 +39,9 @@ exports.tag = function(source,operator,options) {
|
||||
return indexedResults;
|
||||
}
|
||||
} else {
|
||||
const includeTagSet = new Set(options.wiki.getTiddlersWithTag(operator.operand));
|
||||
tiddlers = options.wiki.getTiddlersWithTag(operator.operand);
|
||||
source(function(tiddler,title) {
|
||||
if(includeTagSet.has(title)) {
|
||||
if(tiddlers.indexOf(title) !== -1) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -88,11 +88,10 @@ BackSubIndexer.prototype.update = function(updateDescriptor) {
|
||||
var newTargets = [],
|
||||
oldTargets = [],
|
||||
self = this;
|
||||
// System tiddlers are never indexed as sources, matching the _init() scan
|
||||
if(updateDescriptor.old.exists && !this.wiki.isSystemTiddler(updateDescriptor.old.tiddler.fields.title)) {
|
||||
if(updateDescriptor.old.exists) {
|
||||
oldTargets = this._getTarget(updateDescriptor.old.tiddler);
|
||||
}
|
||||
if(updateDescriptor.new.exists && !this.wiki.isSystemTiddler(updateDescriptor.new.tiddler.fields.title)) {
|
||||
if(updateDescriptor.new.exists) {
|
||||
newTargets = this._getTarget(updateDescriptor.new.tiddler);
|
||||
}
|
||||
|
||||
|
||||
@@ -326,8 +326,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;
|
||||
@@ -338,11 +337,6 @@ exports.parseMacroParameterAsAttribute = function(source,pos) {
|
||||
namePos = nameToken && $tw.utils.skipWhiteSpace(source,nameToken.end),
|
||||
separatorToken = nameToken && $tw.utils.parseTokenRegExp(source,namePos,/=|:/y),
|
||||
isNewStyleSeparator = false; // If there is no separator then we don't allow new style values
|
||||
// Colon separator requires a strict identifier name to avoid mis-parsing values like $:/foo
|
||||
if(nameToken && separatorToken && separatorToken.match[0] === ":" && !reStrictIdentifier.test(nameToken.match[1])) {
|
||||
nameToken = null;
|
||||
separatorToken = null;
|
||||
}
|
||||
// If we have a name and a separator then we have a named attribute
|
||||
if(nameToken && separatorToken) {
|
||||
node.name = nameToken.match[1];
|
||||
@@ -528,79 +522,64 @@ exports.parseAttribute = function(source,pos) {
|
||||
pos = token.end;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
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 string literal
|
||||
var stringLiteral = $tw.utils.parseStringLiteral(source,pos);
|
||||
if(stringLiteral) {
|
||||
pos = stringLiteral.end;
|
||||
node.type = "string";
|
||||
node.value = stringLiteral.value;
|
||||
} else {
|
||||
// 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];
|
||||
break;
|
||||
} 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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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";
|
||||
|
||||
@@ -25,7 +25,7 @@ exports.init = function(parser) {
|
||||
};
|
||||
|
||||
exports.parse = function() {
|
||||
var reEnd = /(^|\r?\n)```$/mg;
|
||||
var reEnd = /(\r?\n```$)/mg;
|
||||
var languageStart = this.parser.pos + 3,
|
||||
languageEnd = languageStart + this.match[1].length;
|
||||
// Move past the match
|
||||
|
||||
@@ -31,16 +31,13 @@ exports.parse = function() {
|
||||
reEnd.lastIndex = this.parser.pos;
|
||||
var match = reEnd.exec(this.parser.source),
|
||||
text,
|
||||
start = this.parser.pos,
|
||||
textEnd;
|
||||
start = this.parser.pos;
|
||||
// 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 [{
|
||||
@@ -50,7 +47,7 @@ exports.parse = function() {
|
||||
type: "text",
|
||||
text: text,
|
||||
start: start,
|
||||
end: textEnd
|
||||
end: this.parser.pos
|
||||
}]
|
||||
}];
|
||||
};
|
||||
|
||||
@@ -32,8 +32,7 @@ exports.parse = function() {
|
||||
this.parser.pos = this.matchRegExp.lastIndex;
|
||||
// Create the link unless it is suppressed
|
||||
if(this.match[0].substr(0,1) === "~") {
|
||||
// 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}];
|
||||
return [{type: "text", text: this.match[0].substr(1), start: start, 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.pos;
|
||||
var filterStart = this.parser.source;
|
||||
var match = reMatch.exec(this.parser.source);
|
||||
this.parser.pos = reMatch.lastIndex;
|
||||
// Parse tree nodes to return
|
||||
|
||||
@@ -27,11 +27,9 @@ Parse the most recent match
|
||||
*/
|
||||
exports.parse = function() {
|
||||
// Get the details of the match
|
||||
var linkText = this.match[0],
|
||||
// Start after the suppressing "~" so the span matches the plain text
|
||||
start = this.parser.pos + 1;
|
||||
var linkText = this.match[0];
|
||||
// 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), start: start, end: this.parser.pos}];
|
||||
return [{type: "text", text: linkText.substr(1)}];
|
||||
};
|
||||
|
||||
@@ -40,8 +40,6 @@ exports.startup = function() {
|
||||
// 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",
|
||||
@@ -50,6 +48,8 @@ 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,8 +15,7 @@ var getCellInfo = function(text, start, length, SEPARATOR) {
|
||||
var isCellQuoted = text.charAt(start) === QUOTE;
|
||||
var cellStart = isCellQuoted ? start + 1 : start;
|
||||
|
||||
// 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) {
|
||||
if(text.charAt(i) === SEPARATOR) {
|
||||
return [cellStart, cellStart, false];
|
||||
}
|
||||
|
||||
|
||||
@@ -3,43 +3,18 @@ title: $:/core/modules/utils/deprecated.js
|
||||
type: application/javascript
|
||||
module-type: utils
|
||||
|
||||
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.).
|
||||
Deprecated util functions
|
||||
|
||||
\*/
|
||||
|
||||
exports.logTable = (data) => console.table(data);
|
||||
|
||||
/*
|
||||
Repeats a string
|
||||
*/
|
||||
exports.repeat = function(str,count) {
|
||||
var result = "";
|
||||
for(var t=0;t<count;t++) {
|
||||
result += str;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
exports.repeat = (str,count) => str.repeat(count);
|
||||
|
||||
/*
|
||||
Check if a string starts with another string
|
||||
*/
|
||||
exports.startsWith = function(str,search) {
|
||||
return str.substring(0, search.length) === search;
|
||||
};
|
||||
exports.startsWith = (str,search) => str.startsWith(search);
|
||||
|
||||
/*
|
||||
Check if a string ends with another string
|
||||
*/
|
||||
exports.endsWith = function(str,search) {
|
||||
return str.substring(str.length - search.length) === search;
|
||||
};
|
||||
exports.endsWith = (str,search) => str.endsWith(search);
|
||||
|
||||
/*
|
||||
Trim whitespace from the start and end of a string
|
||||
*/
|
||||
exports.trim = function(str) {
|
||||
if(typeof str === "string") {
|
||||
return str.trim();
|
||||
@@ -54,54 +29,30 @@ exports.sign = Math.sign;
|
||||
|
||||
exports.strEndsWith = (str,ending,position) => str.endsWith(ending,position);
|
||||
|
||||
exports.stringifyNumber = function(num) {
|
||||
return num + "";
|
||||
};
|
||||
exports.stringifyNumber = (num) => num.toString();
|
||||
|
||||
// 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;
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
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.domContains = (a,b) => a.compareDocumentPosition(b) & 16;
|
||||
|
||||
exports.domMatchesSelector = (node,selector) => node.matches(selector);
|
||||
|
||||
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.hasClass = (el,className) => el.classList && el.classList.contains(className);
|
||||
|
||||
exports.addClass = function(el,className) {
|
||||
if(!el.classList) return;
|
||||
splitClasses(className).forEach(function(c) { el.classList.add(c); });
|
||||
el.classList && className && el.classList.add(className);
|
||||
};
|
||||
|
||||
exports.removeClass = function(el,className) {
|
||||
if(!el.classList) return;
|
||||
splitClasses(className).forEach(function(c) { el.classList.remove(c); });
|
||||
el.classList && className && el.classList.remove(className);
|
||||
};
|
||||
|
||||
exports.toggleClass = function(el,className,status) {
|
||||
if(!el.classList) return;
|
||||
splitClasses(className).forEach(function(c) { el.classList.toggle(c,status); });
|
||||
el.classList && className && el.classList.toggle(className, status);
|
||||
};
|
||||
|
||||
exports.getLocationPath = function() {
|
||||
return window.location.toString().split("#")[0];
|
||||
};
|
||||
exports.getLocationPath = () => window.location.origin + window.location.pathname;
|
||||
@@ -77,23 +77,10 @@ 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,11 +82,6 @@ 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];
|
||||
@@ -95,10 +90,6 @@ 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;
|
||||
@@ -115,9 +106,7 @@ var TW_Element = function(tag, namespace) {
|
||||
this.children = [];
|
||||
this._style = {}; // Internal style object
|
||||
this.style = new TW_Style(this); // Proxy for style management
|
||||
// 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";
|
||||
this.namespaceURI = namespace || "http://www.w3.org/1999/xhtml";
|
||||
};
|
||||
|
||||
|
||||
@@ -208,16 +197,7 @@ TW_Element.prototype.addEventListener = function(type,listener,useCapture) {
|
||||
|
||||
Object.defineProperty(TW_Element.prototype, "tagName", {
|
||||
get: function() {
|
||||
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;
|
||||
return this.tag || "";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -243,28 +243,8 @@ exports.slowInSlowOut = function(t) {
|
||||
};
|
||||
|
||||
exports.copyObjectPropertiesSafe = function(object) {
|
||||
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;
|
||||
}
|
||||
const seen = new Set(),
|
||||
isDOMElement = (value) => value instanceof Node || value instanceof Window;
|
||||
|
||||
function safeCopy(obj) {
|
||||
// skip circular references
|
||||
@@ -275,6 +255,10 @@ 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) => {
|
||||
@@ -282,11 +266,7 @@ 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,12 +125,13 @@ 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.tagName && child.tagName.toUpperCase() === "OPTGROUP"){
|
||||
if(child.children.length === 0){
|
||||
child.selected = values.indexOf(child.value) !== -1;
|
||||
} else {
|
||||
// grouped options
|
||||
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,15 +4,13 @@ description: create a new journal tiddler
|
||||
|
||||
\whitespace trim
|
||||
\function get-tags() [<textFieldTags>] [<tagsFieldTags>] +[join[ ]]
|
||||
<$let journalTitle=<<now format={{$:/config/NewJournal/Title}}>>
|
||||
textFieldTags={{$:/config/NewJournal/Tags}}
|
||||
tagsFieldTags={{$:/config/NewJournal/Tags!!tags}}
|
||||
journalText={{$:/config/NewJournal/Text}}
|
||||
>
|
||||
<$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>>/>">
|
||||
<$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,23 +6,28 @@ tags: $:/tags/EditTemplate
|
||||
\procedure lingo-base() $:/language/EditTemplate/
|
||||
|
||||
\procedure tag-body-inner(colour,fallbackTarget,colourA,colourB,icon,tagField:"tags")
|
||||
<$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>>
|
||||
<$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)$; background-color:$(backgroundColor)$; --tp-remove-tag-button-color:$(foregroundColor)$`
|
||||
>
|
||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="-[{!!title}]"/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</span>
|
||||
</$let>
|
||||
<$transclude tiddler=<<icon>>/>
|
||||
<$view field="title" format="text"/>
|
||||
<$button class="tc-btn-invisible tc-remove-tag-button">
|
||||
<$action-listops $tiddler=<<saveTiddler>> $field=<<tagField>> $subfilter="-[{!!title}]"/>
|
||||
{{$:/core/images/close-button}}
|
||||
</$button>
|
||||
</span>
|
||||
</$let>
|
||||
</$wikify>
|
||||
\end
|
||||
|
||||
\procedure tag-body(colour,palette,icon,tagField:"tags")
|
||||
|
||||
@@ -16,13 +16,15 @@ title: $:/core/ui/TagPickerTagTemplate
|
||||
<$set name="backgroundColor"
|
||||
value={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}}
|
||||
>
|
||||
<$let foregroundColor=<<contrastcolour target=<<backgroundColor>> fallbackTarget=<<fallbackTarget>> colourA=<<colourA>> colourB=<<colourB>> >> >
|
||||
<$wikify name="foregroundColor"
|
||||
text="""<$macrocall $name="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>
|
||||
</$let>
|
||||
</$wikify>
|
||||
</$set>
|
||||
</$button>
|
||||
|
||||
@@ -2,7 +2,7 @@ title: $:/core/ui/ViewTemplate/title
|
||||
tags: $:/tags/ViewTemplate
|
||||
|
||||
\whitespace trim
|
||||
\define title-styles() fill:$(foregroundColor)$;
|
||||
\define title-styles() color:$(foregroundColor)$;
|
||||
|
||||
<div class="tc-tiddler-title tc-clearfix">
|
||||
<div class="tc-titlebar">
|
||||
|
||||
@@ -6,6 +6,7 @@ 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}}
|
||||
@@ -15,11 +16,9 @@ description: {{$:/language/Buttons/NewJournalHere/Hint}}
|
||||
<$text text={{$:/language/Buttons/NewJournalHere/Caption}}/>
|
||||
</span>
|
||||
<%endif%>
|
||||
</$wikify>
|
||||
</$button>
|
||||
\end
|
||||
<$let journalTitle=<<now format={{$:/config/NewJournal/Title}}>>
|
||||
journalTags={{$:/config/NewJournal/Tags}}
|
||||
currentTiddlerTag=<<currentTiddler>>
|
||||
>
|
||||
<$let journalTitleTemplate={{$:/config/NewJournal/Title}} journalTags={{$:/config/NewJournal/Tags}} currentTiddlerTag=<<currentTiddler>>>
|
||||
<<journalButton>>
|
||||
</$let>
|
||||
|
||||
@@ -17,10 +17,6 @@ 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>>/>
|
||||
@@ -109,7 +105,7 @@ Click to generate wiki information report
|
||||
|
||||
<$button>
|
||||
<<display-wiki-info-modal>>
|
||||
<<lingo title:"Generate/Caption">>
|
||||
Click to generate wiki information report
|
||||
</$button>
|
||||
|
||||
<$link to="$:/core/ui/ControlPanel/WikiInformation">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/library/v5.5.0/index.html
|
||||
url: https://tiddlywiki.com/library/v5.4.0/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}}
|
||||
|
||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||
|
||||
@@ -3,7 +3,6 @@ tags: $:/tags/Macro
|
||||
|
||||
\define tag-pill-styles()
|
||||
background-color:$(backgroundColor)$;
|
||||
fill:$(foregroundColor)$;
|
||||
color:$(foregroundColor)$;
|
||||
\end
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ tags: $:/tags/Macro
|
||||
style="width:$width$px;height:$height$px;background-color:$background-color$;"
|
||||
></$reveal></div><div
|
||||
class="tc-thumbnail-icon"
|
||||
style="fill:$color$;color:$color$;"
|
||||
style="color:$color$;"
|
||||
>$icon$</div><div class="tc-thumbnail-caption">$caption$</div></div></$link>
|
||||
\end
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@ 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`
|
||||
# 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
|
||||
# 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 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
|
||||
@@ -22,6 +23,7 @@ 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
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
title: $:/editions/dev/github-fork-ribbon
|
||||
tags: $:/tags/PageTemplate
|
||||
caption: ~GitHub ribbon
|
||||
description: ~GitHub ribbon for tw5.com/dev
|
||||
|
||||
<div class="github-fork-ribbon-wrapper right" style><div class="github-fork-ribbon" style="background-color:#DF4848;"><a href="https://github.com/TiddlyWiki/TiddlyWiki5" target="_blank" rel="noopener noreferrer">Find me on ~GitHub</a></div></div>
|
||||
@@ -2,6 +2,7 @@
|
||||
"description": "Developer documentation from https://tiddlywiki.com/dev/",
|
||||
"plugins": [
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/nodewebkitsaver",
|
||||
"tiddlywiki/github-fork-ribbon",
|
||||
"tiddlywiki/menubar",
|
||||
"tiddlywiki/internals",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"description": "A step by step introduction to TiddlyWiki",
|
||||
"plugins": [
|
||||
"tiddlywiki/cecily",
|
||||
"tiddlywiki/codemirror",
|
||||
"tiddlywiki/highlight",
|
||||
"tiddlywiki/katex"
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
created: 20251021142729667
|
||||
modified: 20260327113434425
|
||||
original-modified: 20251021142729667
|
||||
tags:
|
||||
title: Concatenating a text reference to create a URL
|
||||
ja-title: テキスト参照を連結してURL作成
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
!! 変数とテキスト参照を連結してURLを作成する
|
||||
|
||||
<$macrocall $name=wikitext-example src="""<$let hash={{{ [<currentTiddler>encodeuricomponent[]] }}}>
|
||||
<a href=`${ [{!!base-url}] }$#$(hash)$`>これはtiddlywiki.comのTiddlerです</a>
|
||||
</$let>"""/>
|
||||
|
||||
参照: [[置換属性値|Substituted Attribute Values]]
|
||||
@@ -1,15 +0,0 @@
|
||||
created: 20251021142733998
|
||||
modified: 20260327113417322
|
||||
original-modified: 20251021142733998
|
||||
tags:
|
||||
title: Concatenating variables to create a URL
|
||||
ja-title: 変数を連結してURL作成
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
!! 文字列と変数を連結してURLを作成する
|
||||
|
||||
<$macrocall $name=wikitext-example src="""<$let hash={{{ [<currentTiddler>encodeuricomponent[]] }}}>
|
||||
<a href=`http://tiddlywiki.com/#$(hash)$`>これはtiddlywiki.comのTiddlerです</a>
|
||||
</$let>"""/>
|
||||
|
||||
参照: [[置換属性値|Substituted Attribute Values]]
|
||||
@@ -1,91 +0,0 @@
|
||||
code-body: yes
|
||||
created: 20150117184156000
|
||||
modified: 20260217110459190
|
||||
original-modified: 20240716181836632
|
||||
tags: $:/tags/Macro
|
||||
title: $:/editions/tw5.com/wikitext-macros
|
||||
ja-title: $:/editions/tw5.com/wikitext-macros
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\whitespace trim
|
||||
|
||||
\procedure activatePluginTab()
|
||||
<$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Plugins"/>
|
||||
<$action-navigate $to="$:/ControlPanel"/>
|
||||
\end
|
||||
|
||||
\procedure activateTiddlerWindow()
|
||||
<$action-sendmessage $message="tm-open-window" $param=<<currentTiddler>> windowTitle="Side by Side View" width="800" height="600" />
|
||||
\end
|
||||
|
||||
\procedure controlPanel-plugin-link()
|
||||
<$button actions=<<activatePluginTab>> class="tc-btn-invisible tc-tiddlylink">
|
||||
{{$:/core/images/options-button}} ~ControlPanel
|
||||
</$button>
|
||||
\end
|
||||
|
||||
\procedure open-tiddler-in-window()
|
||||
\whitespace notrim
|
||||
<$button actions=<<activateTiddlerWindow>> class="tc-btn-invisible tc-tiddlylink">
|
||||
''この''Tiddlerを新しいウィンドウで開く
|
||||
</$button>
|
||||
\end
|
||||
|
||||
\procedure activateEditionWindow(url)
|
||||
<$action-sendmessage $message="tm-open-external-window" $param=<<url>> windowName="_edition" windowFeatures="width=800 height=600" />
|
||||
\end
|
||||
|
||||
\procedure open-external-window(url)
|
||||
\whitespace notrim
|
||||
<$button actions=<<activateEditionWindow <<url>> class="tc-btn-invisible tc-tiddlylink">
|
||||
''サンプル''を新しいウィンドウで開く
|
||||
</$button>
|
||||
\end
|
||||
|
||||
|
||||
\procedure wikitext-example(src)
|
||||
<div class="doc-example">
|
||||
<$macrocall $name="copy-to-clipboard-above-right" src=<<src>>/>
|
||||
<$codeblock code=<<src>>/>
|
||||
<p>
|
||||
次のように表示されます:
|
||||
</p>
|
||||
<$transclude $variable="src" $mode="block"/>
|
||||
<p>
|
||||
... そして、土台となるHTMLは次のようになります:
|
||||
</p>
|
||||
<$wikify name="html" text=<<src>> output="html">
|
||||
<$codeblock code=<<html>>/>
|
||||
</$wikify>
|
||||
</div>
|
||||
\end
|
||||
|
||||
\procedure wikitext-example-without-html(src)
|
||||
<div class="doc-example">
|
||||
<$macrocall $name="copy-to-clipboard-above-right" src=<<src>>/>
|
||||
<$codeblock code=<<src>>/>
|
||||
<p>
|
||||
次のように表示されます:
|
||||
</p>
|
||||
<$transclude $variable="src" $mode="block"/>
|
||||
</div>
|
||||
\end
|
||||
|
||||
\procedure wikitext-example-table-header() <thead><tr><th/><th>wiki text</th><th>renders as</th></tr></thead>
|
||||
|
||||
\procedure wikitext-example-table-row(id, code)
|
||||
<tr>
|
||||
<th><<id>></th>
|
||||
<td><$codeblock code=<<code>>/></td>
|
||||
<td><$transclude $variable="code" $mode="block"/></td>
|
||||
</tr>
|
||||
\end
|
||||
|
||||
\procedure tw-code(tiddler)
|
||||
<$codeblock language={{{ [<tiddler>get[type]] }}} code={{{ [<tiddler>get[text]] }}}/>
|
||||
\end
|
||||
|
||||
\procedure tw-code-link(tiddler)
|
||||
<$link to=<<tiddler>>/>:
|
||||
<$transclude $variable=tw-code tiddler=<<tiddler>> />
|
||||
\end
|
||||
@@ -11,7 +11,6 @@ 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]]で入手できます:
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
title: Donations
|
||||
ja-title: 寄付
|
||||
tags: About HelloThere
|
||||
modified: 20260406043554401
|
||||
original-modified: 20260403103452943
|
||||
created: 20260403103452943
|
||||
|
||||
<a href="https://opencollective.com/tiddlywiki" class="tc-btn-invisible" target="_blank">
|
||||
{{TiddlyWiki Donation Graphic}}
|
||||
</a>
|
||||
|
||||
TiddlyWikiは無料のオープンソースプロジェクトであり、ホスティング費用を賄い、プロジェクトの継続的な成長を支えるために、皆様からの寛大なご寄付に頼っています。
|
||||
こちらから寄付できます:
|
||||
|
||||
https://opencollective.com/tiddlywiki
|
||||
|
||||
TiddlyWikiの資金調達に関する詳細情報や、プロジェクトを支援する方法については、[[TiddlyWikiへの資金提供|Funding TiddlyWiki]]をご覧ください。
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20140721121924384
|
||||
modified: 20260406052319609
|
||||
modified: 20241002115027813
|
||||
original-modified: 20240925113748341
|
||||
tags: Community
|
||||
title: Forums
|
||||
@@ -7,17 +7,19 @@ ja-title: フォーラム
|
||||
caption: フォーラム
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
! ユーザーフォーラム
|
||||
!!! ユーザー
|
||||
|
||||
!! Talk ~TiddlyWiki
|
||||
|
||||
公式~TiddlyWikiフォーラムとして、Talk ~TiddlyWikiは、~TiddlyWikiについて話し合う場です: ヘルプのリクエスト、新しいリリースやプラグインの[[アナウンス|https://talk.tiddlywiki.org/c/announcements/20]]、新機能の議論、または単にエクスペリエンスを共有するなどできます。関連するWebサイトから参加することも、電子メールで購読することもできます。
|
||||
TiddlyWiki公式フォーラムは、~TiddlyWikiについて話し合う場です。ヘルプのリクエスト、新しいリリースやプラグインの[[アナウンス|https://talk.tiddlywiki.org/c/announcements/20]]、新機能の議論、または単にエクスペリエンスを共有するなどできます。関連するWebサイトから参加することも、電子メールで購読することもできます。
|
||||
|
||||
https://talk.tiddlywiki.org/
|
||||
|
||||
!! Googleグループ
|
||||
その他のフォーラム:
|
||||
|
||||
既存ユーザーの便宜を図るため、オリジナルの~TiddlyWikiグループ(2005年からGoogleグループでホストされている)も引き続き運営しています: https://groups.google.com/group/TiddlyWiki
|
||||
!!! Googleグループ
|
||||
|
||||
<<<
|
||||
既存ユーザーの便宜を図るため、オリジナルの~TiddlyWikiグループ(2005年からGoogleグループでホストされている)も引き続き運営しています。: https://groups.google.com/group/TiddlyWiki
|
||||
<<<
|
||||
|
||||
! 開発者フォーラム
|
||||
|
||||
@@ -25,5 +27,9 @@ https://talk.tiddlywiki.org/
|
||||
|
||||
! その他のフォーラム
|
||||
|
||||
* TiddlyWikiサブレディット: [[/r/TiddlyWiki5|https://www.reddit.com/r/TiddlyWiki5/]]
|
||||
* https://discord.gg/HFFZVQ8 でDiscordでチャット
|
||||
* [[TiddlyWikiサブレディット|https://www.reddit.com/r/TiddlyWiki5/]]
|
||||
* https://discord.gg/HFFZVQ8 でDiscordでチャット
|
||||
|
||||
!! 開発者
|
||||
|
||||
{{Developers}}
|
||||
@@ -1,20 +0,0 @@
|
||||
created: 20140107114355828
|
||||
modified: 20260406000640400
|
||||
original-modified: 20150220160920000
|
||||
tags: Concepts
|
||||
title: TemplateTiddlers
|
||||
ja-title: テンプレートTiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
テンプレートTiddlerは、実際にはTiddlerの一種ではなく、Tiddlerが使用される役割の一つです。
|
||||
|
||||
テンプレートは、[[Wikiテキスト|WikiText]]の断片を再利用する方法です。
|
||||
|
||||
テンプレートを介したトランスクルージョンは、2つのTiddlerを組み合わせることで、[[トランスクルージョン|Transclusion]]の基本機能を拡張します:
|
||||
|
||||
* 表示する[[Wikiテキスト|WikiText]]を含むテンプレートTiddler。[[現在のTiddler|Current Tiddler]]内のフィールドを参照するトランスクルージョンを含めることができます。
|
||||
* フィールドへの参照を解決する際に、現在のTiddlerとして扱われるターゲットTiddler
|
||||
|
||||
テンプレートの最も優れた例は、TiddlyWikiのメインストーリーリバーです。ストーリーリバー内の各Tiddlerは、各フィールドのレンダリング方法を指定するViewTemplateを介してレンダリングされます。
|
||||
|
||||
詳細については、[[テンプレートを使用したトランスクルージョン|Transclusion with Templates]]を参照してください。
|
||||
@@ -1,36 +0,0 @@
|
||||
created: 20130827075900000
|
||||
modified: 20260406013639263
|
||||
original-modified: 20230321130421587
|
||||
tags: Concepts
|
||||
title: TextReference
|
||||
ja-title: テキスト参照
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
[[テキスト参照|TextReference]]は、テキストの断片をTiddlerのフィールドや[[データTiddler|DataTiddlers]]内のインデックスとして記述するための汎用的な方法です。
|
||||
|
||||
状況に応じて、テキスト参照を使用して値を取得したり、変更すべき値を指定したりすることができます。
|
||||
|
||||
[[テキスト参照|TextReference]]はいくつかのパーツから構成されます:
|
||||
|
||||
* 対象Tiddlerのタイトル。省略した場合、デフォルトで[[現在のTiddler|Current Tiddler]]が使用されます
|
||||
* 以下のいずれか:
|
||||
** フィールド名(`!!`でマークされます)
|
||||
** [[データTiddler|DataTiddlers]]内のインデックス名(`##`でマークされます)
|
||||
* フィールドとインデックスの両方が省略された場合、textフィールドがデフォルトとして使用されます
|
||||
|
||||
テキスト参照のほとんどのパーツは省略可能です:
|
||||
|
||||
* `tiddlerTitle` - 指定したTiddlerのtitle[[フィールド|TiddlerFields]]
|
||||
* `tiddlerTitle!!field` - [[Tiddlerのフィールド|TiddlerFields]] (例: `modified`、`modifier`、`type` など)
|
||||
* `!!field` - 現在のTiddlerの[[フィールド|TiddlerFields]]
|
||||
* `tiddlerTitle##propertyIndex` - DataTiddlersから名前付きプロパティを抽出
|
||||
|
||||
テキスト参照は、以下の場所で使用できます:
|
||||
|
||||
* [[フィルタ|Filters]]内の[[間接パラメータ|Filter Parameter]]として (例: `<$list filter="[tag{MyTag!!name}]"/>`)
|
||||
* 要素やウィジェットの[[間接属性|HTML in WikiText]]として (例: `<$widget attrib={{Title!!description}}/>`)
|
||||
* トランスクルージョンショートカットのパラメータとして (例: `{{MyTiddler!!title}}`)
|
||||
* [[Revealウィジェット|RevealWidget]]と[[LinkCatcherウィジェット|LinkCatcherWidget]]の`state`属性として
|
||||
|
||||
<$macrocall $name=".tip" _="""`foo!!bar`のようなテキスト参照と`{{foo!!bar}}`のようなテキスト参照のトランスクルージョンの違いに注意してください"""/>
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
created: 20141129194651420
|
||||
modified: 20260406001216888
|
||||
original-modified: 20240621074019077
|
||||
tags: Concepts Definitions
|
||||
title: Transclusion
|
||||
ja-title: トランスクルージョン
|
||||
|
||||
! 定義
|
||||
|
||||
<<< Wikipedia: [[トランスクルージョン|https://ja.wikipedia.org/wiki/%E3%83%88%E3%83%A9%E3%83%B3%E3%82%B9%E3%82%AF%E3%83%AB%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3]]
|
||||
コンピュータ科学において、トランスクルージョンとは、ハイパーテキストを介した参照によって、電子文書の一部または全部を他の1つまたは複数の文書に組み込むことを指します。
|
||||
<<<
|
||||
|
||||
~TiddlyWikiでは、''トランスクルージョン''とは、あるTiddler "A"を別のTiddler "B"から参照するプロセスであり、"A"の内容が"B"の一部であるかのように見せかけるものです。
|
||||
|
||||
コンテンツをコピー&ペーストすると、同じコンテンツが複数の場所に複製されてしまいます。一方、トランスクルージョンでは、単一のコピーと、Tiddler "A"からコンテンツを挿入する位置を示す特別な指示が"B"に記述されるだけで済みます。
|
||||
|
||||
"A"の内容が変更されると、"B"にも自動的に変更内容が反映されることに注意してください。これにより、コンテンツを1か所に記述し、複数の場所から閲覧できるため、繰り返し使用するコンテンツの管理が容易になります。
|
||||
|
||||
トランスクルージョンの概念は、小さなコンテンツを組み合わせる主要な方法であるため、[[Tiddlerの哲学|Philosophy of Tiddlers]]において重要な役割を果たしています。
|
||||
|
||||
詳細はこちらをご覧ください:
|
||||
|
||||
* [[Wikiテキストでのトランスクルージョン|Transclusion in WikiText]]
|
||||
* [[トランスクルージョンの基本的な使用法|Transclusion Basic Usage]]
|
||||
* [[テンプレートを使用したトランスクルージョン|Transclusion with Templates]]
|
||||
* [[トランスクルージョンと置換|Transclusion and Substitution]]
|
||||
* [[テキスト参照|TextReference]]
|
||||
* [[テンプレートTiddler|TemplateTiddlers]]
|
||||
* [[Transcludeウィジェット|TranscludeWidget]]
|
||||
* [[ハードトランスクルージョンとソフトトランスクルージョン|Hard and Soft Transclusions]]
|
||||
@@ -1,17 +0,0 @@
|
||||
created: 20131205155227468
|
||||
modified: 20260216114242627
|
||||
original-modified: 20230303214711802
|
||||
tags: Concepts Reference
|
||||
title: WikiText
|
||||
ja-title: Wikiテキスト
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
WikiTextは、広範囲のテキストフォーマット、ハイパーテキスト、インタラクティブ機能を入力するための簡潔で表現力豊かな方法です。複雑なユーザーインターフェイスに邪魔されることなく、執筆に集中できます。[[マークダウン|Markdown]]のユーザーにとって使いやすいように設計されていますが、リンクとインタラクティブ機能に重点が置かれています
|
||||
|
||||
[[エディターツールバー|Editor toolbar]]ボタンを使用して、Wikiテキストをテキストフィールドに挿入することもできます
|
||||
|
||||
Wikiテキストの概要については、[[Wikiテキストのフォーマット|Formatting in WikiText]]と[[TiddlyWikiのテキストフォーマット|Formatting text in TiddlyWiki]]を参照してください
|
||||
|
||||
次の要素のWikiテキスト構文がコアに組み込まれています:
|
||||
|
||||
<<list-links filter:"[tag[WikiText]]" class:"multi-columns">>
|
||||
@@ -1,9 +0,0 @@
|
||||
created: 20150221180826000
|
||||
modified: 20260406063958939
|
||||
original-modified: 20150221181700000
|
||||
tags: Definitions
|
||||
title: Base64
|
||||
ja-title: Base64
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.dlink-ex Base64 "https://en.wikipedia.org/wiki/Base64">>は、画像などのバイナリデータをテキスト文字列として表現する方法です
|
||||
@@ -1,9 +0,0 @@
|
||||
created: 20150221120651000
|
||||
modified: 20260406064757649
|
||||
original-modified: 20150221181705000
|
||||
tags: Definitions
|
||||
title: Cascading Style Sheets
|
||||
ja-title: カスケーディングスタイルシート(CSS)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.dlink-ex CSS "https://en.wikipedia.org/wiki/Cascading_Style_Sheets">>は、Webページ上のさまざまな要素の表示スタイルを定義するために使用される標準プレーンテキスト形式です
|
||||
@@ -1,12 +0,0 @@
|
||||
color: #7bb95d
|
||||
created: 20130825145100000
|
||||
modified: 20260406064409034
|
||||
original-modified: 20250104111522881
|
||||
title: Definitions
|
||||
ja-title: 定義
|
||||
tags: Reference
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
これらは、このドキュメントで使用される技術的なワードやフレーズの定義です(TiddlyWiki自体を構成する[[コンセプト|Concepts]]とは異なります)
|
||||
|
||||
<<list-links "[tag[Definitions]]" class:"multi-columns">>
|
||||
@@ -1,13 +0,0 @@
|
||||
created: 20230410105035569
|
||||
modified: 20260406065237731
|
||||
original-modified: 20230410105035569
|
||||
tags: Definitions
|
||||
title: Tiddlyhost
|
||||
ja-title: Tiddlyhost
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<span style="float:right;">[img width=140 [Tiddlyhost Logo]]</span>
|
||||
|
||||
[[Tiddlyhost.com|https://tiddlyhost.com/]]は、Simon Bairdによって作成されたTiddlyWikiのホスティングサービスです。サインアップして電子メールを確認すると、オンライン保存をサポートする"サイト"(つまり、~TiddlyWiki)を作成できます。サイトはプライベートやパブリックにすることができ、オプションでタグ付け可能で検索可能な[[Tiddlyhostハブ|https://tiddlyhost.com/hub]]にサイトをリストし、他のユーザーが見付けられるようにすることもできます。
|
||||
|
||||
[[TiddlySpot|Saving on TiddlySpot]]とは異なり、[[Tiddlyhost|https://tiddlyhost.com]]は安全でオープンソースであり、TiddlyWiki5を適切にサポートしています。また、既存の~TiddlyWikiファイルをアップロードしたり、TiddlyWikiClassicをサポートしたり、~TiddlySpotサイトの所有権を主張したりすることもできます。詳細については、[[FAQ|https://github.com/simonbaird/tiddlyhost/wiki/FAQ]]と[[About|https://tiddlyhost.com/about]]ページをご覧ください。
|
||||
@@ -21,5 +21,3 @@ type: text/vnd.tiddlywiki
|
||||
<<.tip """上に示したように、図に開始線と終了線が1つある場合は、リンクされた上位レベルにさらに情報があることを意味します。パンくずリストはナビゲーションに使用できます""">>
|
||||
|
||||
<<.tip """下位レベルで使用されているように、図に開始点と終了点がない場合は、読みやすさと単純さを高めるために、上位レベルのシンタックス要素が削除されていることを意味します。パンくずリストはナビゲーションに使用できます""">>
|
||||
|
||||
<<.note """フィルタ式の再帰深度は最大300です。この制限を超えて自身を再帰的に呼び出すフィルタ(例えば、<<.olink subfilter>>や<<.olink filter>>演算子を使ったもの)は、エラーメッセージ`/**-- Excessive filter recursion --**/`を返します。これは無限ループを防ぐためです。""">>
|
||||
|
||||
@@ -14,8 +14,6 @@ type: text/vnd.tiddlywiki
|
||||
"{" [: <-"間接"-> /"}以外"/] "}"
|
||||
|
|
||||
"<" [: <-"変数"-> /">以外"/] ">"
|
||||
|
|
||||
"(" [: <-"複数値変数"-> /")以外"/ ] ")" /"v5.4.0"/
|
||||
)
|
||||
"""/>
|
||||
|
||||
@@ -24,7 +22,6 @@ type: text/vnd.tiddlywiki
|
||||
;<<.def ハード>>
|
||||
: `[パラメータ例]`
|
||||
: パラメータは、角括弧内のテキストそのものです。
|
||||
|
||||
;<<.def ソフト>>
|
||||
: <<.def 間接>>
|
||||
:: `{パラメータ例}`
|
||||
@@ -33,9 +30,6 @@ 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>>と同様)。""">>
|
||||
|
||||
@@ -43,8 +37,4 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.1.23">> [[フィルタステップ|Filter Step]]では、`,`文字で区切られた複数のパラメータがサポートされます。
|
||||
|
||||
例えば: `[param1],[param2]`や`<param1>,{param2}`、 `[param1],(param2)`
|
||||
|
||||
---
|
||||
|
||||
<<.warning """`/regexp/(flags)`オペランド構文は非推奨であり、ブラウザのコンソールに警告が表示されます。代わりに<<.olink regexp>>演算子を使用してください。""">>
|
||||
例えば: `[param1],[param2]`や`<param1>,{param2}`
|
||||
|
||||
@@ -6,6 +6,7 @@ title: Filter Run Prefix
|
||||
ja-title: フィルタランプレフィックス
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
There are 2 types of filter run prefixes that are interchangeable; [[named prefixes|Named Filter Run Prefix]] and [[shortcut prefixes|Shortcut Filter Run Prefix]].
|
||||
交換可能なフィルタランプレフィックスには、[[名前付きプレフィックス|Named Filter Run Prefix]]と[[ショートカットプレフィックス|Shortcut Filter Run Prefix]]の2種類があります。
|
||||
|
||||
<$railroad text="""
|
||||
|
||||
@@ -24,13 +24,13 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
多くのステップでは、ステップの実行内容をさらに定義する明示的な<<.def パラメータ>>が必要です。
|
||||
|
||||
<<.def サフィックス>>は、特定のオペレータの意味を拡張する追加テキスト(多くの場合、[[フィールド|TiddlerFields]]名)です。サフィックスは`:`文字で区切られ、各サフィックスグループには、カンマで区切られた複数の値を含めることができます。例えば、`compare:number:gteq`は、最初のサフィックスは`number`で、2番目のサフィックスは`gteq`です。`:sort:string:reverse,casesensitive`は、最初のサフィックスは`string`で、2番目のサフィックスグループには`reverse`と`casesensitive`の両方が含まれます。
|
||||
<<.def サフィックス>>は、特定のオペレータの意味を拡張する追加テキスト(多くの場合、[[フィールド|TiddlerFields]]名)です。
|
||||
|
||||
ステップの<<.def オペレータ>>と<<.def サフィックス>>がすべて//省略//されている場合は、デフォルトで[[title|title Operator]]オペレータが使用されます。サフィックスが存在するが、コロンの前のオペレータ名が空の場合(例: `[:fieldname[value]]`)、オペレータはデフォルトで<<.olink field>>になります。
|
||||
ステップの<<.def オペレータ>>と<<.def サフィックス>>がすべて省略されている場合は、デフォルトで[[title|title Operator]]オペレータが使用されます。
|
||||
|
||||
<<.from-version "5.1.23">> いくつかのステップでは、`,`文字で区切られた複数の<<.def パラメータ>>を受け入れます。
|
||||
|
||||
認識されないオペレータは、<<.olink field>>オペレータのサフィックスであるかのように扱われます。<<.from-version "5.3.0">> ただし、名前に`.`(ドット)文字が含まれる認識されないオペレータは、ユーザー定義のフィルタオペレータとして扱われ、その名前の変数または関数を検索することで解決されます。.
|
||||
認識されないオペレータは、<<.olink field>>オペレータのサフィックスであるかのように扱われます。
|
||||
|
||||
フィルタオペレータはプラグインによって拡張できます。
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ 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>ただし、`+`プレフィックスによってこれを変更できます:
|
||||
|
||||
@@ -46,5 +45,3 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
新しいフィルタランプレフィックスを作成するには、`filterrunprefix`の[[モジュールタイプ|ModuleType]]で
|
||||
[[Javascriptモジュール|Modules]]を作成します。
|
||||
|
||||
コンパイルされたフィルタ式はパフォーマンスのためキャッシュされます。キャッシュには最大2000件のエントリが保存され、この制限を超えるとキャッシュ全体がリセットされます。
|
||||
@@ -17,15 +17,6 @@ type: text/vnd.tiddlywiki
|
||||
[["ラン"|"Filter Run"]]
|
||||
"""/>
|
||||
|
||||
前のランからのフィルタアウトプットは保留されます。`:intersection`フィルタランは、すべてのTiddlerタイトルをインプットとして開始されます。この最後のフィルタランが完了すると、最後のアウトプットが保留アウトプットと比較されます。保留アウトプットと最新アウトプットの両方に表われるタイトルのみを含む新しいアウトプットが生成されます。アウトプットにおけるタイトルの順序は、蓄積された結果から保持されます。
|
||||
|
||||
!! `:and` / `+`との違い
|
||||
|
||||
`:intersection`と`:and` (または `+`)の主な違いは、''インプット''として何を受け取るかです:
|
||||
|
||||
* `:and` / `+`は、''これまでに蓄積された結果''をフィルタランへのインプットとして渡します。ラン内のオペレータは、結果に既に含まれているタイトルのみを表示・操作できます。
|
||||
* `:intersection`は、''すべてのTiddlerタイトル''をフィルタランへのインプットとして渡し(プレフィックスなしのランと同様)、その後、蓄積された結果にも含まれるタイトルのみを保持します。
|
||||
|
||||
これは、`:intersection`がTiddlerプール全体から開始する必要のあるオペレータを使用してタイトルを照合できることを意味します。詳細については、[[交換可能なフィルタランプレフィックス|Interchangeable Filter Run Prefixes]]を参照してください。
|
||||
前のランからのフィルタアウトプットは保留されます。`:intersection`フィルタランは、すべてのTiddlerタイトルをインプットとして開始されます。この最後のフィルタランが完了すると、最後のアウトプットが保留アウトプットと比較されます。保留アウトプットと最新アウトプットの両方に表われるタイトルのみを含む新しいアウトプットが生成されます。
|
||||
|
||||
[[intersectionフィルタランプレフィックス(例)|Intersection Filter Run Prefix (Examples)]]
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
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>]">>
|
||||
@@ -1,32 +0,0 @@
|
||||
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,7 +25,6 @@ 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"]]
|
||||
"""/>
|
||||
|
||||
@@ -36,14 +35,4 @@ 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,10 +23,8 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
* プレフィックス`-`は、アウトプットタイトルがフィルタのアウトプットから<<.em 取り除か>>れます(そのようなTiddlerが存在する場合)
|
||||
|
||||
* プレフィックス`~`<<.from-version "5.1.18">>は、フィルタアウトプットが空リストの場合、ランの結果のタイトルがフィルタアウトプットに[[優先的に追加|Dominant Append]]されます。フィルタアウトプットが空リストでない場合、ランは無視されます。
|
||||
* プレフィックス`~`は、フィルタアウトプットが空リストの場合、ランの結果のタイトルがフィルタアウトプットに[[優先的に追加|Dominant Append]]されます。フィルタアウトプットが空リストでない場合、ランは無視されます。<<.from-version "5.1.18">>
|
||||
|
||||
* プレフィックス`=`<<.from-version "5.1.20">>は、アウトプットタイトルが重複排除されずにフィルタのアウトプットに追加されます。
|
||||
|
||||
* プレフィックス`=>` <<.from-version "5.4.0">>は、これまでのすべてのランの累積結果は、このランの最初の結果が名前となる[[複数値変数|Multi-Valued Variables]]として割り当てられます。その後、累積結果はクリアされます。
|
||||
* プレフィックス`=`は、アウトプットタイトルが重複排除されずにフィルタのアウトプットに追加されます。<<.from-version "5.1.20">>
|
||||
|
||||
{{Interchangeable Filter Run Prefixes}}
|
||||
@@ -2,7 +2,7 @@ created: 20210618133745003
|
||||
from-version: 5.3.0
|
||||
modified: 20250423104147235
|
||||
original-modified: 20230710074225410
|
||||
rp-input: <<.olink all>>のTiddlerタイトル (前回のランのアウトプットが空でない場合にのみ評価されます)
|
||||
rp-input: <<.olink すべて>>のTiddlerタイトル
|
||||
rp-output: フィルタランのアウトプットは、空のリストでない限り、前回までのランのアウトプットを置き換えます(以下を参照)。
|
||||
rp-purpose: フィルタランへのインプットをそのアウトプットで置き換え、インプットがある場合にのみランを評価
|
||||
search:
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
created: 20221009124003601
|
||||
modified: 20260406063825386
|
||||
original-modified: 20240422084850412
|
||||
tags: Concepts [[Core Functions]]
|
||||
title: Functions
|
||||
ja-title: 関数
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
!! イントロダクション
|
||||
|
||||
<<.from-version "5.3.0">> <<.def 関数>> は、 [[フィルタ式|Filter Expression]] を含むテキストの名前付きスニペットです。関数には、関数内で変数として使用できる名前付きパラメータを持つことができます
|
||||
|
||||
関数は通常、 [[プラグマ: \function|Pragma: \function]] で定義されます:
|
||||
|
||||
```
|
||||
\function myfun(param:"2")
|
||||
[<param>multiply[1.5]]
|
||||
\end
|
||||
```
|
||||
|
||||
関数はいくつかの方法で呼び出すことができます:
|
||||
|
||||
* [[Calls]]構文を使用する:
|
||||
** 構文 `<<myfun param:"value">>` を使用して関数を直接トランスクルードする
|
||||
** 構文 `<div class=<<myfun param:"value">>>` を使用してウィジェット属性に関数を割り当てる
|
||||
* 構文 `[function[myfun],[value],...]` を使用して [[関数オペレータ|function Operator]] を介して関数を呼び出す
|
||||
* 構文 `[my.fun[value]]` または `[.myfun[value]]` で、カスタムフィルター演算子として名前にピリオドが含まれる関数を直接呼び出す
|
||||
|
||||
!! 関数の仕組み
|
||||
|
||||
関数は特別な種類の [[変数|Variables]] として実装されています。通常の変数と異なる唯一の点は、パラメータの扱い方法です
|
||||
@@ -0,0 +1,13 @@
|
||||
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: 20260430010447598
|
||||
original-modified: 20260420192600833
|
||||
modified: 20251213104120189
|
||||
original-modified: 20250807084952911
|
||||
tags: Welcome
|
||||
title: HelloThere
|
||||
ja-title: こんにちは
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20150414070451144
|
||||
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
|
||||
list: [[HelloThumbnail - Newsletter]] [[HelloThumbnail - Community Survey 2025]] [[HelloThumbnail - Introduction Video]] [[HelloThumbnail - Grok TiddlyWiki]] [[HelloThumbnail - Latest Version]] [[HelloThumbnail - MultiWikiServer]] [[HelloThumbnail - Twenty Years of TiddlyWiki]] [[HelloThumbnail - Funding]] [[HelloThumbnail - TiddlyWiki Privacy]] [[HelloThumbnail - Marketplace]] [[HelloThumbnail - Intertwingled Innovations]] [[HelloThumbnail - TiddlyWikiLinks]]
|
||||
modified: 20260208115538227
|
||||
original-modified: 20150414070948246
|
||||
title: HelloThumbnail
|
||||
ja-title: ハローサムネイル
|
||||
|
||||
@@ -2,7 +2,7 @@ title: HelloThumbnail - Community Survey 2025
|
||||
ja-title: HelloThumbnail - コミュニティ調査2025
|
||||
tags: HelloThumbnail
|
||||
color: rgb(234, 205, 183)
|
||||
image: Community Survey 2025 Image
|
||||
image: Community Survey 2025
|
||||
caption: コミュニティ調査
|
||||
link: Community Survey 2025
|
||||
ribbon-text: NEW
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
background-color: #EDB431
|
||||
caption: ~TiddlyWikiへのご支援のお願い
|
||||
color: #ff0
|
||||
image: TiddlyWiki Donation Graphic
|
||||
link: Donations
|
||||
tags: HelloThumbnail
|
||||
title: HelloThumbnail - Donations
|
||||
|
||||
~TiddlyWikiを財政的に支援する方法をご覧ください
|
||||
@@ -0,0 +1,10 @@
|
||||
background-color: #EDB431
|
||||
caption: ~TiddlyWikiの資金調達方法
|
||||
color: #ff0
|
||||
image: Funding
|
||||
link: Funding TiddlyWiki
|
||||
tags: HelloThumbnail
|
||||
title: HelloThumbnail - Funding
|
||||
ja-title: HelloThumbnail - 資金調達
|
||||
|
||||
~TiddlyWikiを財政的にサポートする方法を説明しています
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
background-color: #EDB431
|
||||
caption: Intertwingled Innovations
|
||||
color: #ff0
|
||||
image: Intertwingled Innovations Image
|
||||
image: Intertwingled Innovations
|
||||
link: Intertwingled Innovations
|
||||
tags: HelloThumbnail
|
||||
title: HelloThumbnail - Intertwingled Innovations
|
||||
|
||||
@@ -5,7 +5,6 @@ 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,5 +6,6 @@ link: TiddlyWiki Newsletter
|
||||
image: TiddlyWiki Newsletter Badge
|
||||
color: #fff
|
||||
type: text/vnd.tiddlywiki
|
||||
ribbon-text: NEW
|
||||
|
||||
~TiddlyWikiコミュニティからの最も興味深く関連性のあるニュースをまとめた~TiddlyWikiニュースレターを購読できます
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
created: 20170126174506507
|
||||
modified: 20260223105027444
|
||||
original-modified: 20170126211042714
|
||||
tags: [[Hard Linebreaks in WikiText]]
|
||||
title: Hard Linebreaks with CSS
|
||||
ja-title: CSSを使用した強制改行
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWikiバージョン5.1.16以降、`data-`属性を使用してカスタムスタイルを適用できるようになりました。参照: [[カスタムスタイルを適用する方法|How to apply custom styles]]
|
||||
|
||||
[[Custom data-styles]]スタイルシートTiddlerには、次の定義が含まれています:
|
||||
|
||||
```
|
||||
[data-tags*="example-hardlinebreaks"] .tc-tiddler-body {
|
||||
word-break: normal;
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
```
|
||||
|
||||
タグなしでレンダリングすると、"CSSを使用した強制改行 - 例"の内容は次のように表示されます:
|
||||
|
||||
>{{Hard Linebreaks with CSS - Example}}
|
||||
|
||||
----
|
||||
|
||||
TIddlerを開いて、適用されているカスタムCSSルールを確認してください: [[CSSを使用した強制改行 - 例|Hard Linebreaks with CSS - Example]]
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
created: 20170126161803543
|
||||
modified: 20260223105159019
|
||||
original-modified: 20170126211025840
|
||||
tags: example-hardlinebreaks [[Hard Linebreaks in WikiText]]
|
||||
title: Hard Linebreaks with CSS - Example
|
||||
ja-title: CSSを使用した強制改行 - 例
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
次のテキストは、特別な[[Wikiテキスト|WikiText]]構文を使用せずに改行されます。したがって、Wikiテキストのほとんどの機能にアクセスできます
|
||||
|
||||
これは行です
|
||||
そして、これは新しい行です
|
||||
一方で、これはさらに別の行です
|
||||
そして、これは最後の行です
|
||||
この行は別の行です
|
||||
@@ -0,0 +1,19 @@
|
||||
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,9 +0,0 @@
|
||||
caption: プロシージャ呼び出し
|
||||
created: 20221007130006705
|
||||
modified: 20260429105903754
|
||||
original-modified: 20260125212303316
|
||||
title: Procedure Calls
|
||||
ja-title: プロシージャ呼び出し
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.deprecated-since "5.4.0" "Calls">>
|
||||
@@ -1,47 +0,0 @@
|
||||
created: 20221007125701001
|
||||
modified: 20260329104617037
|
||||
original-modified: 20230921180332436
|
||||
tags: WikiText Procedures
|
||||
title: Procedure Definitions
|
||||
ja-title: プロシージャ定義
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
!! 紹介
|
||||
|
||||
このTiddlerでは、[[プロシージャ|Procedures]]を定義するさまざまな方法について説明します。
|
||||
|
||||
!! プロシージャ定義プラグマ
|
||||
|
||||
プロシージャは、Tiddlerの先頭に[[プラグマ: \procedure|Pragma: \procedure]]を記述することで作成できます。定義は、そのプロシージャを定義したTiddlerの残りの部分、およびそのTiddlerをトランスクルードするすべてのTiddlerで使用できます。
|
||||
|
||||
```
|
||||
\procedure my-procedure(param)
|
||||
これはプロシージャのテキストです (param=<<param>>)
|
||||
\end
|
||||
```
|
||||
|
||||
[[プラグマ: \whitespace|Pragma: \whitespace]]の設定は、プロシージャ定義が行われるパースコンテキストから継承されることに注意してください。つまり、複数のプロシージャ定義を含むTiddlerの場合、Tiddlerの先頭に1つのwhitespaceプラグマを記述するだけでよく、プラグマを繰り返す必要なく、設定はプロシージャ定義に自動的に継承されます。
|
||||
|
||||
!! Setウィジェットを使用したプロシージャ定義
|
||||
|
||||
プロシージャは特殊な種類の[[変数|Variables]]として実装されているため、内部的には<<.wlink SetWidget>>ウィジェットによって定義されます。
|
||||
|
||||
```
|
||||
<$set name="my-procedure" value="これはプロシージャのテキストです">
|
||||
...
|
||||
</$set>
|
||||
```
|
||||
|
||||
<<.note """<<.wlink SetWidget>>ウィジェットを使用してプロシージャを定義する際に、現時点ではパラメータを指定することはできません。""">>
|
||||
|
||||
!! プロシージャ定義のインポート
|
||||
|
||||
[[プラグマ: \import|Pragma: \import]]や<<.wlink ImportVariablesWidget>>ウィジェットを使用すると、別のTiddlerからプロシージャ定義をコピーできます。
|
||||
|
||||
!! `$:/tags/Global`タグ
|
||||
|
||||
グローバルプロシージャは、[[システムタグ: $:/tags/Global|SystemTag: $:/tags/Global]]を使用して定義できます。
|
||||
|
||||
[[システムタグ: $:/tags/Global/View|SystemTag: $:/tags/Global/View]]は、メインビューテンプレートとプレビューパネル内でのみ使用可能なプロシージャを定義するために使用します。
|
||||
|
||||
[[システムタグ: $:/tags/Global/View/Body|SystemTag: $:/tags/Global/View/Body]]は、メインビューテンプレートの本文とプレビューパネル内でのみ使用可能なプロシージャを定義するために使用します。
|
||||
@@ -1,26 +0,0 @@
|
||||
created: 20221007130538285
|
||||
modified: 20260329110806303
|
||||
original-modified: 20230419103154329
|
||||
tags: WikiText Procedures
|
||||
title: Procedure Parameter Handling
|
||||
ja-title: プロシージャパラメータの処理
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
!! 紹介
|
||||
|
||||
プロシージャの内容がWiki化されると、[[プロシージャ|Procedures]]パラメータは変数として利用可能になります。
|
||||
|
||||
!! パラメータを変数としてアクセス
|
||||
|
||||
プロシージャをWiki化すると、パラメータを変数としてアクセスできるようになります。
|
||||
|
||||
例えば:
|
||||
|
||||
<$macrocall $name="wikitext-example-without-html" src="""\procedure say-hi(name,address)
|
||||
こんにちは、私は<<name>>です。<<address>>に住んでいます。
|
||||
\end
|
||||
|
||||
<<say-hi name:"Bugs" address:"Rabbit Hole Hill">>
|
||||
"""/>
|
||||
|
||||
パラメータを変数としてアクセスすることは、Wiki化されたプロシージャ内でのみ機能し、例えばプロシージャが属性値として使用される場合には機能しません。
|
||||
@@ -1,66 +0,0 @@
|
||||
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,17 +0,0 @@
|
||||
created: 20140910212931897
|
||||
list: Concepts Definitions WikiText Macros Variables SystemTags Widgets Filters Messages Commands Mechanisms Developers
|
||||
modified: 20260216114219952
|
||||
original-modified: 20180927080640647
|
||||
tags: TableOfContents
|
||||
title: Reference
|
||||
ja-title: リファレンス
|
||||
type: text/vnd.tiddlywiki
|
||||
color: #F45757
|
||||
|
||||
次のトピックでは、TiddlyWikiの正式リファレンスドキュメントを提供します:
|
||||
|
||||
<div class="tc-table-of-contents">
|
||||
|
||||
<<toc-selective-expandable 'Reference'>>
|
||||
|
||||
</div>
|
||||
@@ -1,16 +1,11 @@
|
||||
created: 20130823203800000
|
||||
modified: 20260406053945249
|
||||
original-modified: 20260220093010752
|
||||
modified: 20241226114145100
|
||||
original-modified: 2020051619421803
|
||||
tags: About
|
||||
title: RoadMap
|
||||
ja-title: ロードマップ
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWikiは、オリジナルの[[TiddlyWiki Classic]]のリリースから9年後の2013年に初めてリリースされました。以来41回のリリースを経て、TiddlyWikiは着実に柔軟性と信頼性を高めてきました。将来に向けても、v5.4.x、v5.5.x、そして最終的にはTWXXといった野心的な計画があります。
|
||||
TiddlyWiki 5は現在、多くの人々に信頼されている成熟した安定したプロジェクトです。同時に、開発者とユーザーの幅広いコミュニティのおかげで、さまざまな方向に急速に進化しています。この逆説的な状況が可能なのは、プロジェクトが下位互換性を厳密に維持し、既存の機能に加えて新しい機能を追加しているためです
|
||||
|
||||
バージョン番号はv5.x.0の形式に従っています。~TiddlyWikiは現在v<<version>>であり、現在v5.4.0に向けて取り組んでいます。
|
||||
|
||||
GitHubには詳細なプロジェクト計画が掲載されていますが、主なマイルストーンは以下のとおり計画しています:
|
||||
|
||||
* TiddlyWiki v5.4.0に続き、v5.4.xのリリースが順次行われ、バグ修正や機能の段階的な改善が行われます。重大な後方互換性の問題がある場合は、それらの改善は次リリースのv5.5.0に反映され、軽微な後方互換性の調整が行われます。
|
||||
* 今後、v5.6.0、v5.7.0などのリリースを続け、後方互換性を損なうことなく次のメジャーな再設計をリリースする準備が整うまで続けます。このリリースを~TiddlyWiki XX("~TiddlyWiki Twenty"、またはTWXX)と呼んでいます。
|
||||
正式なロードマップはありませんが、検索と置換、リッチテキスト編集など、まだ完全に実装されていない領域がかなりあります。現在の作業は~GitHub(https://github.com/TiddlyWiki/TiddlyWiki5/)で確認できます
|
||||
@@ -1,12 +1,12 @@
|
||||
created: 20130825160900000
|
||||
modified: 20260430074718157
|
||||
original-modified: 20250617140259415
|
||||
modified: 20251214105948181
|
||||
original-modified: 20241106165307259
|
||||
tags: Features [[Working with TiddlyWiki]]
|
||||
title: Encryption
|
||||
ja-title: 暗号化
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
TiddlyWiki5を単一のHTMLファイルとして使用すると、[[Stanford JavaScript Crypto Library]]を使用してCCMモードのAES 256ビット暗号化でコンテンツを暗号化できます。
|
||||
TiddlyWiki5を単一のHTMLファイルとして使用すると、[[Stanford JavaScript Crypto Library]]を使用してCCMモードのAES 128ビット暗号化でコンテンツを暗号化できます。
|
||||
|
||||
# サイドバーの''ツール''タブに切り替えて、南京錠アイコンのボタンを探します
|
||||
# ボタンに<<.icon $:/core/images/unlocked-padlock>> ''パスワードの設定''と表示されている場合、現在のウィキは暗号化されていません。ボタンをクリックすると、以降の保存を暗号化するために使用されるパスワードの入力を求められます
|
||||
@@ -16,5 +16,5 @@ TiddlyWiki5を単一のHTMLファイルとして使用すると、[[Stanford Jav
|
||||
|
||||
TiddlyWikiには、パスワード/暗号化に関連する、2つの無関係な機能があることに注意してください:
|
||||
|
||||
* [[Tiddlyhost]]に保存するときにパスワードを設定する機能。これは、''コントロールパネル'' <<.icon $:/core/images/options-button>>の"保存"タブで行います。
|
||||
* [[Node.js|TiddlyWiki on Node.js]]のサーバ構成で標準のHTTP基本認証を使用する機能。これは、[[Listenコマンド|ListenCommand]]を使用してコマンドラインで実行されます。SSLと組み合わせると、GoogleやDropboxなどのオンラインサービスで得られるのと同じレベルの暗号化転送が実現されますが、ディスク上のデータは暗号化されません
|
||||
* TiddlySpotに保存するときにパスワードを設定する機能。これは、''コントロールパネル'' <<.icon $:/core/images/options-button>>の"保存"タブで行います。
|
||||
* [[Node.js|TiddlyWiki on Node.js]]のサーバ構成で標準のHTTP基本認証を使用する機能。これは、ServerCommandを使用してコマンドラインで実行されます。SSLと組み合わせると、GoogleやDropboxなどのオンラインサービスで得られるのと同じレベルの暗号化転送が実現されますが、ディスク上のデータは暗号化されません
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
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は、''名前を付けて保存''ダイアログを表示して、ファイルをローカルに保存することに同意するかどうかを確認します。
|
||||
# ブラウザウィンドウを更新して、変更が正しく保存されたことを確認してください
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
created: 20230726143332803
|
||||
modified: 20260404110322627
|
||||
original-modified: 20240619210723396
|
||||
tags: [[Variable Usage]]
|
||||
title: Behaviour of variables invoked via widget attributes
|
||||
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]]}}}/>`の同義になります。他のフィルタ付きトランスクルージョン(つまり、三重中括弧)と同様に、最初の結果以外はすべて破棄されます。最初の結果が属性の値として使用されます。この形式で呼び出された場合でも、ファンクションは再帰的に処理されることに注意してください。つまり、ファンクション内のフィルタ式は別のファンクションを呼び出すことができ、処理は継続されます|
|
||||
|
||||
<<.from-version "5.4.0">> `<<var>>`の代わりに[[複数値変数の属性|Multi-Valued Variable Attribute Values]]構文`((var))`を使用すると、最初の値だけでなく、値のリスト全体が属性に渡されます。これは主に、TranscludeWidgetを介して[[複数値変数|Multi-Valued Variables]]をプロシージャや関数のパラメーターに渡す場合に便利です。
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user