mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-29 22:30:23 +00:00
Compare commits
38 Commits
utterly-ba
...
wikify-ope
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e47b88dc7 | ||
|
|
48b45f0e35 | ||
|
|
da4f5c64ca | ||
|
|
a0fbd4e0f3 | ||
|
|
77cb8335c1 | ||
|
|
55b680e485 | ||
|
|
80058e7f45 | ||
|
|
9df912a341 | ||
|
|
082654564a | ||
|
|
1480d495b3 | ||
|
|
5e8d6fb790 | ||
|
|
69f149efef | ||
|
|
4060f762e0 | ||
|
|
1519ff638d | ||
|
|
271b8f9e0d | ||
|
|
65afdacdfe | ||
|
|
c409d8414e | ||
|
|
866e55954f | ||
|
|
1e2ce0bc80 | ||
|
|
fbeb8cddc8 | ||
|
|
73e70e77c1 | ||
|
|
4e28742aa6 | ||
|
|
5f551ca46f | ||
|
|
34cf59d31e | ||
|
|
de2cc8637a | ||
|
|
f315567924 | ||
|
|
8bda28afd5 | ||
|
|
48fa2be6ac | ||
|
|
1b605f0b87 | ||
|
|
40d53543dc | ||
|
|
4e6a2ffd60 | ||
|
|
f6a60f51d2 | ||
|
|
897b14a8d6 | ||
|
|
c5b465ec99 | ||
|
|
9c0fff268c | ||
|
|
81d8d67800 | ||
|
|
378b9b3627 | ||
|
|
55cf0b2965 |
50
.github/workflows/pr-check-build-size.yml
vendored
Normal file
50
.github/workflows/pr-check-build-size.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Calculate PR build size
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
calculate-build-size:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: read
|
||||
contents: read
|
||||
outputs:
|
||||
pr_size: ${{ steps.get_sizes.outputs.pr_size }}
|
||||
base_size: ${{ steps.get_sizes.outputs.base_size }}
|
||||
steps:
|
||||
- name: build-size-check
|
||||
id: get_sizes
|
||||
uses: TiddlyWiki/cerebrus@v4
|
||||
with:
|
||||
pr_number: ${{ github.event.pull_request.number }}
|
||||
repo: ${{ github.repository }}
|
||||
base_ref: ${{ github.base_ref }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
mode: size:calc
|
||||
|
||||
dispatch-followup:
|
||||
needs: calculate-build-size
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write # Required to dispatch another workflow
|
||||
pull-requests: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Trigger follow-up workflow
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
workflow_id: 'pr-comment-build-size.yml',
|
||||
ref: 'master',
|
||||
inputs: {
|
||||
pr_number: '${{ github.event.pull_request.number }}',
|
||||
base_ref: '${{ github.event.pull_request.base.ref }}',
|
||||
pr_size: '${{ needs.calculate-build-size.outputs.pr_size }}',
|
||||
base_size: '${{ needs.calculate-build-size.outputs.base_size }}'
|
||||
}
|
||||
});
|
||||
36
.github/workflows/pr-comment-build-size.yml
vendored
Normal file
36
.github/workflows/pr-comment-build-size.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Comment on PR build size (Trusted workflow)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pr_number:
|
||||
required: true
|
||||
type: string
|
||||
base_ref:
|
||||
required: true
|
||||
type: string
|
||||
pr_size:
|
||||
required: true
|
||||
type: string
|
||||
base_size:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
comment-on-pr:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Build and check size
|
||||
uses: TiddlyWiki/cerebrus@v4
|
||||
with:
|
||||
pr_number: ${{ inputs.pr_number }}
|
||||
repo: ${{ github.repository }}
|
||||
base_ref: ${{ inputs.base_ref }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
mode: size:comment
|
||||
pr_size: ${{ inputs.pr_size }}
|
||||
base_size: ${{ inputs.base_size }}
|
||||
18
.github/workflows/pr-path-validation.yml
vendored
Normal file
18
.github/workflows/pr-path-validation.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Validate PR Paths
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
validate-pr:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Validate PR
|
||||
uses: TiddlyWiki/cerebrus@v4
|
||||
with:
|
||||
pr_number: ${{ github.event.pull_request.number }}
|
||||
repo: ${{ github.repository }}
|
||||
base_ref: ${{ github.base_ref }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -105,6 +105,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
fi
|
||||
|
||||
# /index.html Main site
|
||||
# /external-(version).html External core version of main site
|
||||
# /favicon.ico Favicon for main site
|
||||
# /static.html Static rendering of default tiddlers
|
||||
# /alltiddlers.html Static rendering of all tiddlers
|
||||
@@ -117,7 +118,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
--version \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--build favicon static index \
|
||||
--build favicon static index external-js \
|
||||
|| exit 1
|
||||
|
||||
# /empty.html Empty
|
||||
@@ -155,7 +156,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/tour \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all tour.html text/plain \
|
||||
--rendertiddler $:/core/save/all-external-js tour.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
# /share.html Custom edition for sharing via the URL
|
||||
@@ -194,7 +195,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/xlsx-utils \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT/editions/xlsx-utils/ \
|
||||
--build index \
|
||||
--build external \
|
||||
|| exit 1
|
||||
|
||||
# /editions/resumebuilder/index.html Resume builder edition
|
||||
@@ -210,7 +211,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/text-slicer \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT/editions/text-slicer/ \
|
||||
--build index \
|
||||
--build external \
|
||||
|| exit 1
|
||||
|
||||
# /editions/translators/index.html Translators edition
|
||||
@@ -242,7 +243,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/tw5.com-docs \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT/editions/tw5.com-docs/ \
|
||||
--build index \
|
||||
--build external \
|
||||
|| exit 1
|
||||
|
||||
# /editions/twitter-archivist/index.html Twitter Archivist edition
|
||||
@@ -265,7 +266,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/innerwikidemo \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/innerwiki/index.html text/plain \
|
||||
--rendertiddler $:/core/save/all-external-js plugins/tiddlywiki/innerwiki/index.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
# /plugins/tiddlywiki/dynaview/index.html Demo wiki with DynaView plugin
|
||||
@@ -275,7 +276,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/dynaviewdemo \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/dynaview/index.html text/plain \
|
||||
--rendertiddler $:/core/save/all-external-js plugins/tiddlywiki/dynaview/index.html text/plain \
|
||||
--rendertiddler $:/core/save/empty plugins/tiddlywiki/dynaview/empty.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
@@ -289,7 +290,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/katexdemo \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/katex/index.html text/plain \
|
||||
--rendertiddler $:/core/save/all-external-js plugins/tiddlywiki/katex/index.html text/plain \
|
||||
--rendertiddler $:/core/save/empty plugins/tiddlywiki/katex/empty.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
@@ -319,7 +320,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/codemirrordemo \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/codemirror/index.html text/plain \
|
||||
--rendertiddler $:/core/save/all-external-js plugins/tiddlywiki/codemirror/index.html text/plain \
|
||||
--rendertiddler $:/core/save/empty plugins/tiddlywiki/codemirror/empty.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
@@ -329,7 +330,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/markdowndemo \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/markdown/index.html text/plain \
|
||||
--rendertiddler $:/core/save/all-external-js plugins/tiddlywiki/markdown/index.html text/plain \
|
||||
--rendertiddler $:/core/save/empty plugins/tiddlywiki/markdown/empty.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
@@ -339,7 +340,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/classicparserdemo \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/tw2parser/index.html text/plain \
|
||||
--rendertiddler $:/core/save/all-external-js plugins/tiddlywiki/tw2parser/index.html text/plain \
|
||||
--rendertiddler $:/core/save/empty plugins/tiddlywiki/tw2parser/empty.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
@@ -349,7 +350,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/highlightdemo \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/highlight/index.html text/plain \
|
||||
--rendertiddler $:/core/save/all-external-js plugins/tiddlywiki/highlight/index.html text/plain \
|
||||
--rendertiddler $:/core/save/empty plugins/tiddlywiki/highlight/empty.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
@@ -359,7 +360,7 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/geospatialdemo \
|
||||
--load $TW5_BUILD_OUTPUT/build.tid \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all plugins/tiddlywiki/geospatial/index.html text/plain \
|
||||
--rendertiddler $:/core/save/all-external-js plugins/tiddlywiki/geospatial/index.html text/plain \
|
||||
--rendertiddler $:/core/save/empty plugins/tiddlywiki/geospatial/empty.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
|
||||
@@ -2000,7 +2000,7 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
||||
var value = tiddler[name];
|
||||
switch(fieldInfo.source) {
|
||||
case "subdirectories":
|
||||
value = path.relative(rootPath, filename).split(path.sep).slice(0, -1);
|
||||
value = $tw.utils.stringifyList(path.relative(rootPath, filename).split(path.sep).slice(0, -1));
|
||||
break;
|
||||
case "filepath":
|
||||
value = path.relative(rootPath, filename).split(path.sep).join('/');
|
||||
@@ -2021,10 +2021,10 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
||||
value = path.extname(filename);
|
||||
break;
|
||||
case "created":
|
||||
value = new Date(fs.statSync(pathname).birthtime);
|
||||
value = $tw.utils.stringifyDate(new Date(fs.statSync(pathname).birthtime));
|
||||
break;
|
||||
case "modified":
|
||||
value = new Date(fs.statSync(pathname).mtime);
|
||||
value = $tw.utils.stringifyDate(new Date(fs.statSync(pathname).mtime));
|
||||
break;
|
||||
}
|
||||
if(fieldInfo.prefix) {
|
||||
|
||||
@@ -4,12 +4,12 @@ _canonical_uri: The full URI of an external image tiddler
|
||||
author: Name of the author of a plugin
|
||||
bag: The name of the bag from which a tiddler came
|
||||
caption: The text to be displayed on a tab or button
|
||||
class: The CSS class applied to a tiddler when rendering it - see [[Custom styles by user-class]]. Also used for [[Modals]]
|
||||
class: The CSS class applied to a tiddler when rendering it. Also used for Modals
|
||||
code-body: The view template will display the tiddler as code if set to ''yes''
|
||||
color: The CSS color value associated with a tiddler
|
||||
component: The name of the component responsible for an [[alert tiddler|AlertMechanism]]
|
||||
component: The name of the component responsible for an alert tiddler
|
||||
core-version: For a plugin, indicates what version of TiddlyWiki with which it is compatible
|
||||
current-tiddler: Used to cache the top tiddler in a [[history list|HistoryMechanism]]
|
||||
current-tiddler: Used to cache the top tiddler in a history list
|
||||
created: The date a tiddler was created
|
||||
creator: The name of the person who created a tiddler
|
||||
dependents: For a plugin, lists the dependent plugin titles
|
||||
|
||||
@@ -6,7 +6,6 @@ module-type: filteroperator
|
||||
Filter operator for returning all the backtranscludes from a tiddler
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
@@ -19,5 +18,3 @@ exports.backtranscludes = function(source,operator,options) {
|
||||
});
|
||||
return results.makeTiddlerIterator(options.wiki);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -6,7 +6,6 @@ module-type: filteroperator
|
||||
Filter operator for returning all the transcludes from a tiddler
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
@@ -19,5 +18,3 @@ exports.transcludes = function(source,operator,options) {
|
||||
});
|
||||
return results.makeTiddlerIterator(options.wiki);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
37
core/modules/filters/wikify.js
Normal file
37
core/modules/filters/wikify.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/wikify.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator wikifying each string in the input list and returning the result as a list of strings
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.wikify = function(source,operator,options) {
|
||||
var output = operator.operands[0],
|
||||
mode = operator.operands[1],
|
||||
type = operator.operands[2],
|
||||
results = [];
|
||||
source(function(tiddler,title) {
|
||||
var wikifier = new $tw.utils.Wikifier({
|
||||
wiki: options.wiki,
|
||||
widget: options.widget,
|
||||
text: title,
|
||||
type: type,
|
||||
mode: mode,
|
||||
output: output
|
||||
});
|
||||
results.push(wikifier.getResult());
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -10,7 +10,6 @@ This is a <%if [{something}] %>Elephant<%elseif [{else}] %>Pelican<%else%>Crocod
|
||||
```
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
exports.name = "conditional";
|
||||
@@ -113,5 +112,3 @@ exports.parseIfClause = function(filterCondition) {
|
||||
// Return the parse tree node
|
||||
return [listWidget];
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -50,7 +50,7 @@ exports.parse = function() {
|
||||
var reEnd;
|
||||
if(this.match[5]) {
|
||||
// If so, it is a multiline definition and the end of the body is marked with \end
|
||||
reEnd = new RegExp("((:?^|\\r?\\n)[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?(?:$|\\r?\\n))","mg");
|
||||
reEnd = new RegExp("((:?^|\\r?\\n)[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[2]) + ")?\\s*?(?:$|\\r?\\n))","mg");
|
||||
} else {
|
||||
// Otherwise, the end of the definition is marked by the end of the line
|
||||
reEnd = /($|\r?\n)/mg;
|
||||
|
||||
@@ -55,7 +55,7 @@ exports.parse = function() {
|
||||
var reEnd;
|
||||
if(this.match[3]) {
|
||||
// If so, it is a multiline definition and the end of the body is marked with \end
|
||||
reEnd = new RegExp("((?:^|\\r?\\n)[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||
reEnd = new RegExp("((?:^|\\r?\\n)[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?\\s*?(?:$|\\r?\\n))","mg");
|
||||
} else {
|
||||
// Otherwise, the end of the definition is marked by the end of the line
|
||||
reEnd = /($|\r?\n)/mg;
|
||||
|
||||
@@ -6,8 +6,6 @@ module-type: utils
|
||||
Custom errors for TiddlyWiki.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
function TranscludeRecursionError() {
|
||||
Error.apply(this,arguments);
|
||||
this.signatures = Object.create(null);
|
||||
@@ -19,5 +17,3 @@ TranscludeRecursionError.MAX_WIDGET_TREE_DEPTH = 1000;
|
||||
TranscludeRecursionError.prototype = Object.create(Error);
|
||||
|
||||
exports.TranscludeRecursionError = TranscludeRecursionError;
|
||||
|
||||
})();
|
||||
|
||||
@@ -6,7 +6,6 @@ module-type: utils
|
||||
Utilities for working with the TiddlyWiki repository file structure
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
@@ -45,5 +44,3 @@ exports.getAllPlugins = function(options) {
|
||||
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.languagesPath,options.ignoreEnvironmentVariables ? undefined : $tw.config.languagesEnvVar),collectPlugins);
|
||||
return tiddlers;
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
108
core/modules/utils/wikifier.js
Normal file
108
core/modules/utils/wikifier.js
Normal file
@@ -0,0 +1,108 @@
|
||||
/*\
|
||||
title: $:/core/modules/utils/wikifier.js
|
||||
type: application/javascript
|
||||
module-type: utils
|
||||
|
||||
A high level helper class for parsing and wikification
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*
|
||||
Options include:
|
||||
wiki: wiki to be used for wikification
|
||||
widget: optional widget to be used as parent of wikified text
|
||||
text: text to be parsed/wikified
|
||||
type: type of the text
|
||||
mode: inline or block
|
||||
output: text, formattedtext, html, parsetree or widgettree
|
||||
*/
|
||||
function Wikifier(options) {
|
||||
this.wiki = options.wiki || $tw.wiki;
|
||||
this.widget = options.widget || $tw.rootWidget;
|
||||
this.text = options.text || "";
|
||||
this.type = options.type || "";
|
||||
this.mode = options.mode || "block";
|
||||
this.output = options.output || "text";
|
||||
// Create the parse tree
|
||||
this.parser = this.wiki.parseText(this.type,this.text,{
|
||||
parseAsInline: this.mode === "inline"
|
||||
});
|
||||
// Create the widget tree
|
||||
this.widgetNode = this.wiki.makeWidget(this.parser,{
|
||||
document: $tw.fakeDocument,
|
||||
parentWidget: this.widget
|
||||
});
|
||||
// Render the widget tree to the container
|
||||
this.container = $tw.fakeDocument.createElement("div");
|
||||
this.widgetNode.render(this.container,null);
|
||||
};
|
||||
|
||||
Wikifier.prototype.refresh = function(changedTiddlers) {
|
||||
// Refresh the widget tree
|
||||
return this.widgetNode.refresh(changedTiddlers);
|
||||
};
|
||||
|
||||
/*
|
||||
Return the result string
|
||||
*/
|
||||
Wikifier.prototype.getResult = function() {
|
||||
var result;
|
||||
switch(this.output) {
|
||||
case "text":
|
||||
result = this.container.textContent;
|
||||
break;
|
||||
case "formattedtext":
|
||||
result = this.container.formattedTextContent;
|
||||
break;
|
||||
case "html":
|
||||
result = this.container.innerHTML;
|
||||
break;
|
||||
case "parsetree":
|
||||
result = JSON.stringify(this.parser.tree,0,$tw.config.preferences.jsonSpaces);
|
||||
break;
|
||||
case "widgettree":
|
||||
result = JSON.stringify(this.getWidgetTree(),0,$tw.config.preferences.jsonSpaces);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
Return a string of the widget tree
|
||||
*/
|
||||
Wikifier.prototype.getWidgetTree = function() {
|
||||
var copyNode = function(widgetNode,resultNode) {
|
||||
var type = widgetNode.parseTreeNode.type;
|
||||
resultNode.type = type;
|
||||
switch(type) {
|
||||
case "element":
|
||||
resultNode.tag = widgetNode.parseTreeNode.tag;
|
||||
break;
|
||||
case "text":
|
||||
resultNode.text = widgetNode.parseTreeNode.text;
|
||||
break;
|
||||
}
|
||||
if(Object.keys(widgetNode.attributes || {}).length > 0) {
|
||||
resultNode.attributes = {};
|
||||
$tw.utils.each(widgetNode.attributes,function(attr,attrName) {
|
||||
resultNode.attributes[attrName] = widgetNode.getAttribute(attrName);
|
||||
});
|
||||
}
|
||||
if(Object.keys(widgetNode.children || {}).length > 0) {
|
||||
resultNode.children = [];
|
||||
$tw.utils.each(widgetNode.children,function(widgetChildNode) {
|
||||
var node = {};
|
||||
resultNode.children.push(node);
|
||||
copyNode(widgetChildNode,node);
|
||||
});
|
||||
}
|
||||
},
|
||||
results = {};
|
||||
copyNode(this.widgetNode,results);
|
||||
return results;
|
||||
};
|
||||
|
||||
exports.Wikifier = Wikifier;
|
||||
|
||||
})();
|
||||
@@ -6,7 +6,6 @@ module-type: widget
|
||||
Widget to dynamically represent one or more tiddlers
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
@@ -187,5 +186,3 @@ function hasPayloadChanged(a,b) {
|
||||
}
|
||||
|
||||
exports.data = DataWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -6,7 +6,6 @@ module-type: widget
|
||||
Widget to display a test case
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
@@ -160,5 +159,3 @@ TestCaseWidget.prototype.refresh = function(changedTiddlers) {
|
||||
};
|
||||
|
||||
exports["testcase"] = TestCaseWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -36,89 +36,22 @@ Compute the internal state of the widget
|
||||
WikifyWidget.prototype.execute = function() {
|
||||
// Get our parameters
|
||||
this.wikifyName = this.getAttribute("name");
|
||||
this.wikifyText = this.getAttribute("text");
|
||||
this.wikifyType = this.getAttribute("type");
|
||||
this.wikifyMode = this.getAttribute("mode","block");
|
||||
this.wikifyOutput = this.getAttribute("output","text");
|
||||
// Create the parse tree
|
||||
this.wikifyParser = this.wiki.parseText(this.wikifyType,this.wikifyText,{
|
||||
parseAsInline: this.wikifyMode === "inline"
|
||||
});
|
||||
// Create the widget tree
|
||||
this.wikifyWidgetNode = this.wiki.makeWidget(this.wikifyParser,{
|
||||
document: $tw.fakeDocument,
|
||||
parentWidget: this
|
||||
});
|
||||
// Render the widget tree to the container
|
||||
this.wikifyContainer = $tw.fakeDocument.createElement("div");
|
||||
this.wikifyWidgetNode.render(this.wikifyContainer,null);
|
||||
this.wikifyResult = this.getResult();
|
||||
// Create the wikifier
|
||||
this.wikifier = new $tw.utils.Wikifier({
|
||||
wiki: this.wiki,
|
||||
widget: this,
|
||||
text: this.getAttribute("text"),
|
||||
type: this.getAttribute("type"),
|
||||
mode: this.getAttribute("mode","block"),
|
||||
output: this.getAttribute("output","text")
|
||||
});
|
||||
this.wikifyResult = this.wikifier.getResult();
|
||||
// Set context variable
|
||||
this.setVariable(this.wikifyName,this.wikifyResult);
|
||||
// Construct the child widgets
|
||||
this.makeChildWidgets();
|
||||
};
|
||||
|
||||
/*
|
||||
Return the result string
|
||||
*/
|
||||
WikifyWidget.prototype.getResult = function() {
|
||||
var result;
|
||||
switch(this.wikifyOutput) {
|
||||
case "text":
|
||||
result = this.wikifyContainer.textContent;
|
||||
break;
|
||||
case "formattedtext":
|
||||
result = this.wikifyContainer.formattedTextContent;
|
||||
break;
|
||||
case "html":
|
||||
result = this.wikifyContainer.innerHTML;
|
||||
break;
|
||||
case "parsetree":
|
||||
result = JSON.stringify(this.wikifyParser.tree,0,$tw.config.preferences.jsonSpaces);
|
||||
break;
|
||||
case "widgettree":
|
||||
result = JSON.stringify(this.getWidgetTree(),0,$tw.config.preferences.jsonSpaces);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
Return a string of the widget tree
|
||||
*/
|
||||
WikifyWidget.prototype.getWidgetTree = function() {
|
||||
var copyNode = function(widgetNode,resultNode) {
|
||||
var type = widgetNode.parseTreeNode.type;
|
||||
resultNode.type = type;
|
||||
switch(type) {
|
||||
case "element":
|
||||
resultNode.tag = widgetNode.parseTreeNode.tag;
|
||||
break;
|
||||
case "text":
|
||||
resultNode.text = widgetNode.parseTreeNode.text;
|
||||
break;
|
||||
}
|
||||
if(Object.keys(widgetNode.attributes || {}).length > 0) {
|
||||
resultNode.attributes = {};
|
||||
$tw.utils.each(widgetNode.attributes,function(attr,attrName) {
|
||||
resultNode.attributes[attrName] = widgetNode.getAttribute(attrName);
|
||||
});
|
||||
}
|
||||
if(Object.keys(widgetNode.children || {}).length > 0) {
|
||||
resultNode.children = [];
|
||||
$tw.utils.each(widgetNode.children,function(widgetChildNode) {
|
||||
var node = {};
|
||||
resultNode.children.push(node);
|
||||
copyNode(widgetChildNode,node);
|
||||
});
|
||||
}
|
||||
},
|
||||
results = {};
|
||||
copyNode(this.wikifyWidgetNode,results);
|
||||
return results;
|
||||
};
|
||||
|
||||
/*
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
@@ -130,9 +63,9 @@ WikifyWidget.prototype.refresh = function(changedTiddlers) {
|
||||
return true;
|
||||
} else {
|
||||
// Refresh the widget tree
|
||||
if(this.wikifyWidgetNode.refresh(changedTiddlers)) {
|
||||
if(this.wikifier.refresh(changedTiddlers)) {
|
||||
// Check if there was any change
|
||||
var result = this.getResult();
|
||||
var result = this.wikifier.getResult();
|
||||
if(result !== this.wikifyResult) {
|
||||
// If so, save the change
|
||||
this.wikifyResult = result;
|
||||
|
||||
@@ -37,7 +37,7 @@ caption: {{$:/language/Search/Standard/Caption}}
|
||||
inputCancelActions=<<cancel-search-actions>>
|
||||
inputAcceptActions=<<input-accept-actions>>
|
||||
inputAcceptVariantActions=<<input-accept-variant-actions>>
|
||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] :else[{$:/config/SearchResults/Default}]"
|
||||
configTiddlerFilter="[[$:/state/advancedsearch/standard/currentTab]!is[missing]get[text]] :else[{$:/config/SearchResults/Default}]"
|
||||
filterMinLength={{$:/config/Search/MinLength}}/>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
|
||||
@@ -12,7 +12,7 @@ Export the TiddlyWiki core JavaScript code for running with external JavaScript:
|
||||
tooltip="Export the TiddlyWiki core code for running with external JavaScript"
|
||||
aria-label="export TiddlyWiki core"
|
||||
class="tc-btn-big-green">
|
||||
<$action-sendmessage $message='tm-download-file' $param='$:/core/templates/tiddlywiki5.js' filename=<<jsFileName>>/>
|
||||
<$action-sendmessage $message='tm-download-file' $param='$:/core/templates/tiddlywiki5.js' filename=<<jsFileName>> type="application/javascript"/>
|
||||
{{$:/core/images/download-button}}
|
||||
<span class="tc-tiny-gap-left">
|
||||
Download TiddlyWiki core
|
||||
|
||||
@@ -12,7 +12,7 @@ element, and right-click its `src` URI. Save the link as ''$(jsFileName)$''</p>
|
||||
Export the ~TiddlyWiki core ~JavaScript code for running with external ~JavaScript:
|
||||
|
||||
<$button tooltip="Export the ~TiddlyWiki core code for running with external ~JavaScript" aria-label="export TiddlyWiki core" class="tc-btn-big-green">
|
||||
<$list filter="[[$:/boot/boot.js]is[missing]]" variable="ignore" emptyMessage="""<$action-sendmessage $message="tm-download-file" $param="$:/core/templates/tiddlywiki5.js" filename=<<jsFileName>>/>""" >
|
||||
<$list filter="[[$:/boot/boot.js]is[missing]]" variable="ignore" emptyMessage="""<$action-sendmessage $message="tm-download-file" $param="$:/core/templates/tiddlywiki5.js" filename=<<jsFileName>> type="application/javascript"/>""" >
|
||||
<$action-setfield $tiddler=<<qualify "$:/temp/alert">> text=<<noExportMsg>> subtitle="Export ~TiddllyWiki Core"/>
|
||||
<$action-sendmessage $message="tm-modal" $param=<<qualify "$:/temp/alert">>/>
|
||||
</$list>
|
||||
|
||||
4
editions/classicparserdemo/tiddlers/$__coreURL.tid
Normal file
4
editions/classicparserdemo/tiddlers/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -11,6 +11,9 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","classicparserdemo.html","text/plain"]
|
||||
"--rendertiddler","$:/core/save/all","classicparserdemo.html","text/plain"],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","classicparserdemo.html","text/plain"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
4
editions/codemirrordemo/tiddlers/$__coreURL.tid
Normal file
4
editions/codemirrordemo/tiddlers/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -22,6 +22,9 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","codemirrordemo.html","text/plain"]
|
||||
"--rendertiddler","$:/core/save/all","codemirrordemo.html","text/plain"],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","codemirrordemo.html","text/plain"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,5 +28,4 @@ Note that JavaScript macros work on both the client and the server, and so do no
|
||||
|
||||
!! Macro Behaviour
|
||||
|
||||
Macros are just used to return a chunk of wikitext for further processing. They should not make modifications to tiddlers in the wiki store. The reason is that you cannott control when the macro is called; it may be called repeatedly as part of refresh processing. So it is important that macros do not have any other side effects beyond generating their text.
|
||||
|
||||
Macros are just used to return a chunk of wikitext for further processing. They should not make modifications to tiddlers in the wiki store. The reason is that you cannot control when the macro is called; it may be called repeatedly as part of refresh processing. So it is important that macros do not have any other side effects beyond generating their text.
|
||||
|
||||
@@ -34,13 +34,11 @@ Suppose we want to make a filter operator that returns every other tiddler from
|
||||
We make a new tiddler, set its `type` and `module-type` appropriately, and begin writing the code:
|
||||
|
||||
```
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
exports.everyother = function(source, operator, options) {
|
||||
// TODO
|
||||
}
|
||||
})();
|
||||
```
|
||||
|
||||
For the example filter syntax, our function will be called with
|
||||
@@ -54,7 +52,6 @@ As is usually the case, we don't care about `operator.operator` here (since that
|
||||
We could implement the operator by iterating over the input tiddlers and explicitly building a result array of titles:
|
||||
|
||||
```
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
exports.everyother = function(source, operator, options) {
|
||||
@@ -66,7 +63,6 @@ exports.everyother = function(source, operator, options) {
|
||||
});
|
||||
return result;
|
||||
}
|
||||
})();
|
||||
```
|
||||
|
||||
That is, we supply a callback to `source` that negates `include` each time through (in order to grab every other result) and pushes the `title` of every other tiddler onto the result.
|
||||
@@ -74,7 +70,6 @@ That is, we supply a callback to `source` that negates `include` each time throu
|
||||
Alternatively, we can return our own iterator, by returning a function that accepts a similar callback and only calls it on every other tiddler:
|
||||
|
||||
```
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
exports.everyother = function(source, operator, options) {
|
||||
@@ -86,7 +81,6 @@ exports.everyother = function(source, operator, options) {
|
||||
});
|
||||
};
|
||||
}
|
||||
})();
|
||||
```
|
||||
|
||||
Either way, we could interpret the `!` flag on the filter, if present, to mean that we want the //other// half of the tiddlers, by using it to set the initial value of `include`: `var include = operator.prefix !== "!";`
|
||||
|
||||
@@ -40,10 +40,7 @@ module-type: startup
|
||||
YOUR DISCRCRIPTION COMES HERE!
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false, exports: true */
|
||||
"use strict";
|
||||
|
||||
// Export name and synchronous status
|
||||
@@ -63,6 +60,4 @@ exports.startup = function() {
|
||||
});
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
```
|
||||
@@ -11,10 +11,7 @@ The wikitext parser subclassing mechanism makes it possible for custom parsers t
|
||||
Here is an example of a subclass of the checkbox widget that adds logging to the event handler:
|
||||
|
||||
```js
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var WikiParser = require("$:/core/modules/parsers/wikiparser/wikiparser.js")["text/vnd.tiddlywiki"],
|
||||
@@ -38,5 +35,4 @@ var MyCustomWikiParser = function(type,text,options) {
|
||||
|
||||
exports["text/vnd.my-custom-type"] = MyCustomWikiParser;
|
||||
|
||||
})();
|
||||
```
|
||||
|
||||
@@ -26,10 +26,7 @@ module-type: widget-subclass
|
||||
Widget base class
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.baseClass = "checkbox"; // Extend the <$checkbox> widget
|
||||
@@ -50,5 +47,4 @@ exports.prototype.handleChangeEvent = function(event) {
|
||||
console.log("Checkbox status:",this.inputDomNode.checked);
|
||||
};
|
||||
|
||||
})();
|
||||
```
|
||||
|
||||
4
editions/dynaviewdemo/tiddlers/$__coreURL.tid
Normal file
4
editions/dynaviewdemo/tiddlers/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -9,6 +9,9 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"]
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","index.html","text/plain"
|
||||
]
|
||||
}
|
||||
}
|
||||
4
editions/geospatialdemo/tiddlers/$__coreURL.tid
Normal file
4
editions/geospatialdemo/tiddlers/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -15,6 +15,9 @@
|
||||
"build": {
|
||||
"index": [
|
||||
"--render","$:/core/save/all","index.html","text/plain"],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","index.html","text/plain"
|
||||
],
|
||||
"favicon": [],
|
||||
"static": [],
|
||||
"empty": [],
|
||||
|
||||
4
editions/highlightdemo/tiddlers/$__coreURL.tid
Normal file
4
editions/highlightdemo/tiddlers/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -16,6 +16,9 @@
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","highlightdemo.html","text/plain"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
4
editions/innerwikidemo/tiddlers/system/$__coreURL.tid
Normal file
4
editions/innerwikidemo/tiddlers/system/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -19,6 +19,9 @@
|
||||
"--screenshot",
|
||||
"[[$:/plugins/tiddlywiki/innerwiki/examples]]",
|
||||
"4"
|
||||
],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","index.html","text/plain"
|
||||
]
|
||||
}
|
||||
}
|
||||
4
editions/katexdemo/tiddlers/$__coreURL.tid
Normal file
4
editions/katexdemo/tiddlers/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -16,6 +16,9 @@
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","katexdemo.html","text/plain"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
4
editions/markdowndemo/tiddlers/$__coreURL.tid
Normal file
4
editions/markdowndemo/tiddlers/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -13,6 +13,9 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","markdowndemo.html","text/plain"]
|
||||
"--rendertiddler","$:/core/save/all","markdowndemo.html","text/plain"],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","markdowndemo.html","text/plain"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
title: Operators/Wikify/TextMode
|
||||
description: Simple wikify operator
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\parsermode inline
|
||||
<$text text={{{ [subfilter{Filter}] }}}/>
|
||||
+
|
||||
title: Filter
|
||||
|
||||
[{Text}wikify[html],[inline],[text/vnd.tiddlywiki]]
|
||||
+
|
||||
title: Text
|
||||
|
||||
This is ''the text'' that is __wikified__
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
This is <strong>the text</strong> that is <u>wikified</u>
|
||||
@@ -0,0 +1,64 @@
|
||||
title: Operators/Wikify/ParseTreeMode
|
||||
description: Simple wikify operator
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\parsermode inline
|
||||
<$text text={{{ [subfilter{Filter}] }}}/>
|
||||
+
|
||||
title: Filter
|
||||
|
||||
[{Text}wikify[parsetree],[inline],[text/vnd.tiddlywiki]]
|
||||
+
|
||||
title: Text
|
||||
|
||||
This is ''the text'' that is __wikified__
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
[
|
||||
{
|
||||
"type": "text",
|
||||
"text": "This is ",
|
||||
"start": 0,
|
||||
"end": 8
|
||||
},
|
||||
{
|
||||
"type": "element",
|
||||
"tag": "strong",
|
||||
"children": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "the text",
|
||||
"start": 10,
|
||||
"end": 18
|
||||
}
|
||||
],
|
||||
"start": 8,
|
||||
"end": 20,
|
||||
"rule": "bold"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": " that is ",
|
||||
"start": 20,
|
||||
"end": 29
|
||||
},
|
||||
{
|
||||
"type": "element",
|
||||
"tag": "u",
|
||||
"children": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "wikified",
|
||||
"start": 31,
|
||||
"end": 39
|
||||
}
|
||||
],
|
||||
"start": 29,
|
||||
"end": 41,
|
||||
"rule": "underscore"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,21 @@
|
||||
title: Operators/Wikify/TextMode
|
||||
description: Simple wikify operator
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\parsermode inline
|
||||
<$text text={{{ [subfilter{Filter}] }}}/>
|
||||
+
|
||||
title: Filter
|
||||
|
||||
[{Text}wikify[text],[inline],[text/vnd.tiddlywiki]]
|
||||
+
|
||||
title: Text
|
||||
|
||||
This is ''the text'' that is __wikified__
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
This is the text that is wikified
|
||||
@@ -6,12 +6,6 @@ tags: [[$:/tags/test-spec]]
|
||||
Tests <$action-deletefield />.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/* jslint node: true, browser: true */
|
||||
/* eslint-env node, browser, jasmine */
|
||||
/* eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/
|
||||
/* global $tw, require */
|
||||
"use strict";
|
||||
|
||||
describe("<$action-deletefield /> tests", function() {
|
||||
@@ -172,5 +166,3 @@ it("should correctly delete fields", function() {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
@@ -6,7 +6,6 @@ tags: [[$:/tags/test-spec]]
|
||||
Tests the fakedom that Tiddlywiki occasionally uses.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
describe("fakedom tests", function() {
|
||||
@@ -20,5 +19,3 @@ describe("fakedom tests", function() {
|
||||
expect($tw.fakeDocument.createTextNode("text").TEXT_NODE).toBe(3);
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
@@ -6,7 +6,6 @@ tags: [[$:/tags/test-spec]]
|
||||
Tests for integrity of the core plugins, languages, themes and editions
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
if($tw.node) {
|
||||
@@ -47,6 +46,3 @@ if($tw.node) {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})();
|
||||
|
||||
@@ -3,10 +3,7 @@ title: test-widget-event.js
|
||||
type: application/javascript
|
||||
tags: [[$:/tags/test-spec]]
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
describe("Widget Event Listeners", function() {
|
||||
@@ -220,5 +217,3 @@ describe("Widget Event Listeners", function() {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
@@ -6,7 +6,6 @@ tags: [[$:/tags/test-spec]]
|
||||
Tests the wikitext rendering pipeline end-to-end. We also need tests that individually test parsers, rendertreenodes etc., but this gets us started.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
describe("Widget module", function() {
|
||||
@@ -89,4 +88,3 @@ describe("Widget module", function() {
|
||||
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
@@ -116,6 +116,22 @@ describe("WikiText parser tests", function() {
|
||||
);
|
||||
});
|
||||
|
||||
it("should parse macro definitions with end statements followed by spaces", function() {
|
||||
expect(parse("\\define myMacro()\nnothing\n\\end \n")).toEqual(
|
||||
|
||||
[{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"isMacroDefinition":true,"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"start":0,"end":33,"rule":"macrodef"}]
|
||||
|
||||
);
|
||||
});
|
||||
|
||||
it("should parse macro definitions with named end statements followed by spaces", function() {
|
||||
expect(parse("\\define myMacro()\nnothing\n\\end myMacro \n")).toEqual(
|
||||
|
||||
[{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"isMacroDefinition":true,"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"start":0,"end":40,"rule":"macrodef"}]
|
||||
|
||||
);
|
||||
});
|
||||
|
||||
it("should parse procedure definitions with no parameters", function() {
|
||||
expect(parse("\\procedure myMacro()\nnothing\n\\end\n")).toEqual(
|
||||
|
||||
@@ -132,6 +148,22 @@ describe("WikiText parser tests", function() {
|
||||
);
|
||||
});
|
||||
|
||||
it("should parse procedure definitions with end statements followed by spaces", function() {
|
||||
expect(parse("\\procedure myMacro()\nnothing\n\\end \n")).toEqual(
|
||||
|
||||
[{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isProcedureDefinition":true,"start":0,"end":36,"rule":"fnprocdef"}]
|
||||
|
||||
);
|
||||
});
|
||||
|
||||
it("should parse procedure definitions with named end statements followed by spaces", function() {
|
||||
expect(parse("\\procedure myMacro()\nnothing\n\\end myMacro \n")).toEqual(
|
||||
|
||||
[{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isProcedureDefinition":true,"start":0,"end":43,"rule":"fnprocdef"}]
|
||||
|
||||
);
|
||||
});
|
||||
|
||||
it("should parse procedure definitions with parameters", function() {
|
||||
expect(parse("\\procedure myMacro(one,two,three,four:elephant)\nnothing\n\\end\n")).toEqual(
|
||||
|
||||
@@ -155,6 +187,22 @@ describe("WikiText parser tests", function() {
|
||||
);
|
||||
});
|
||||
|
||||
it("should parse function definitions with end statements followed by spaces", function() {
|
||||
expect(parse("\\function myMacro()\nnothing\n\\end \n")).toEqual(
|
||||
|
||||
[{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isFunctionDefinition":true,"start":0,"end":35,"rule":"fnprocdef"}]
|
||||
|
||||
);
|
||||
});
|
||||
|
||||
it("should parse function definitions with named end statements followed by spaces", function() {
|
||||
expect(parse("\\function myMacro()\nnothing\n\\end myMacro \n")).toEqual(
|
||||
|
||||
[{"type":"set","attributes":{"name":{"name":"name","type":"string","value":"myMacro"},"value":{"name":"value","type":"string","value":"nothing"}},"children":[],"params":[],"orderedAttributes":[{"name":"name","type":"string","value":"myMacro"},{"name":"value","type":"string","value":"nothing"}],"isFunctionDefinition":true,"start":0,"end":42,"rule":"fnprocdef"}]
|
||||
|
||||
);
|
||||
});
|
||||
|
||||
it("should parse single line function definitions with no parameters", function() {
|
||||
expect(parse("\\function myMacro() nothing\n")).toEqual(
|
||||
|
||||
|
||||
4
editions/text-slicer/tiddlers/system/$__coreURL.tid
Normal file
4
editions/text-slicer/tiddlers/system/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -13,6 +13,9 @@
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"
|
||||
],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","index.html","text/plain"
|
||||
]
|
||||
}
|
||||
}
|
||||
4
editions/tour/tiddlers/System/$__coreURL.tid
Normal file
4
editions/tour/tiddlers/System/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[tiddlywikicore-$(version)$.js]substitute[]]
|
||||
4
editions/tw5.com-docs/tiddlers/$__coreURL.tid
Normal file
4
editions/tw5.com-docs/tiddlers/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -10,6 +10,9 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--render","$:/core/save/all","index.html","text/plain"]
|
||||
"--render","$:/core/save/all","index.html","text/plain"],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","index.html","text/plain"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
11
editions/tw5.com/tiddlers/HTML Tags.tid
Normal file
11
editions/tw5.com/tiddlers/HTML Tags.tid
Normal file
@@ -0,0 +1,11 @@
|
||||
created: 20250211092107689
|
||||
modified: 20250211092307574
|
||||
tags: Definitions
|
||||
title: HTML Tags
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<<
|
||||
In HTML, a tag is used for creating an element.
|
||||
|
||||
The name of an HTML element is the name that appears at the beginning of the element's start tag and at the end of the element's end tag (if the element has an end tag). For example, the p in the `<p>` start tag and `</p>` end tag is the name of the HTML paragraph element. Note that an element name in an end tag is preceded by a slash character: `</p>`, and that for void elements, the end tag is neither required nor allowed.
|
||||
<<< https://developer.mozilla.org/en-US/docs/Glossary/Tag
|
||||
@@ -1,20 +1,13 @@
|
||||
title: 中文社区 - Chinese Community
|
||||
tags: Community
|
||||
|
||||
# A Chinese community tutorial program that people can edit together:
|
||||
#* Main site: [ext[https://tw-cn.netlify.app/]]
|
||||
#* Accelerated access: [ext[https://tw-cn.cpolar.top/]]
|
||||
#* Alternate: [ext[https://tiddly-wiki-chinese-tutorial.vercel.app]]
|
||||
# Tiddlywiki Chinese Chat Forum: [ext[https://talk.tidgi.fun/topic/6]]
|
||||
# Chinese translation of Tiddlywiki official website [ext[https://bramchen.github.io/tw5-docs/zh-Hans/]]
|
||||
# The best Chinese introductory tutorial for newbies [ext[https://keatonlao.github.io/tiddlywiki-xp/]]
|
||||
|
||||
---
|
||||
|
||||
# 大家可以一起编辑的中文社区教程项目:
|
||||
#* 主站:[ext[https://tw-cn.netlify.app/]]
|
||||
#* 加速访问:[ext[https://tw-cn.cpolar.top/]]
|
||||
#* 备用:[ext[https://tiddly-wiki-chinese-tutorial.vercel.app]]
|
||||
# 太微中文交流论坛:[ext[https://talk.tidgi.fun/topic/6]]
|
||||
# 太微官网汉化版:[ext[https://bramchen.github.io/tw5-docs/zh-Hans/]]
|
||||
# 最适合新手的中文入门教程:[ext[https://keatonlao.github.io/tiddlywiki-xp/]]
|
||||
* 大家可以一起编辑的中文社区教程项目:
|
||||
*# 主站:[ext[https://tw-cn.netlify.app/]]
|
||||
*# 加速访问:[ext[https://tw-cn.cpolar.top/]]
|
||||
*# 备用:[ext[https://tiddly-wiki-chinese-tutorial.vercel.app]]
|
||||
* 太微中文交流论坛:[ext[https://talk.tidgi.fun/topic/6]]
|
||||
* 太微官网汉化版:[ext[https://bramchen.github.io/tw5-docs/zh-Hans/]]
|
||||
* 最适合新手的中文入门教程:[ext[https://keatonlao.github.io/tiddlywiki-xp/]]
|
||||
* TiddlyWiki 爱好者 QQ 群: 946052860
|
||||
*# [ext[点击链接加入群聊【TiddlyWiki爱好者】|https://qm.qq.com/q/13SFxVArlu]]
|
||||
*# [ext[点击链接加入腾讯频道【太微TiddlyWiki】|https://pd.qq.com/s/474hgpll1]]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
breadcrumbs: [[Filter Step]]
|
||||
created: 20140410103123179
|
||||
modified: 20230410114132501
|
||||
modified: 20250302200615061
|
||||
tags: Filters
|
||||
title: Filter Operators
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -21,7 +21,7 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
A <<.def "filter operator">> is a predefined keyword attached to an individual step of a [[filter|Filters]]. It defines the particular action of that step.
|
||||
|
||||
''Important:'' In general, each first [[filter step|Filter Step]] of a [[filter run|Filter Run]] not given any input titles receives the output of <$link to="all Operator">[all[tiddlers]]</$link> as its input.
|
||||
<<.tip """In general, each first [[filter step|Filter Step]] of a [[filter run|Filter Run]] not given any input titles receives the output of <$link to="all Operator">''[all[tiddlers]]''</$link> as its input.""" title:"Important">>
|
||||
|
||||
|
||||
''Table legend:''
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20180111122953142
|
||||
modified: 20181113084151268
|
||||
tags: OfficialPlugins
|
||||
tags: OfficialPlugins [[Plugin Editions]]
|
||||
title: Dynaview Plugin
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
17
editions/tw5.com/tiddlers/plugins/Geospatial Plugin.tid
Normal file
17
editions/tw5.com/tiddlers/plugins/Geospatial Plugin.tid
Normal file
@@ -0,0 +1,17 @@
|
||||
created: 20250302053159467
|
||||
modified: 20250302053316068
|
||||
tags: OfficialPlugins [[Plugin Editions]]
|
||||
title: Geospatial Plugin
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The Geospatial Plugin adds new primitives to the TiddlyWiki platform to enable non-developers to build sophisticated interactive geospatial applications.
|
||||
|
||||
It incorporates a number of third party libraries and online services:
|
||||
|
||||
* [[Leaflet.js|https://leafletjs.com/]], an open source library to display interactive maps
|
||||
* [[Turf.js|https://turfjs.org/]], an open source library to perform geospatial calculations with [[GeoJSON|https://en.wikipedia.org/wiki/GeoJSON]] objects
|
||||
* [[TravelTime|https://traveltime.com/]], a commercial API for [[geocoding|https://traveltime.com/features/geocoding]], [[routing|https://traveltime.com/features/multi-modal-routing]] and [[isochrones|https://traveltime.com/features/isochrones]]
|
||||
* [[Flickr|https://www.flickr.com/services/api/]], a free API for retrieving geotagged photographs
|
||||
* [[OpenLocationCode|https://github.com/google/open-location-code]], Google's open source library for converting to and from Open Location Codes (also known as [[PlusCodes|https://maps.google.com/pluscodes/]])
|
||||
|
||||
Try it out at https://tiddlywiki.com/plugins/tiddlywiki/geospatial/
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20190127104143725
|
||||
modified: 20190127104143725
|
||||
tags: OfficialPlugins
|
||||
tags: OfficialPlugins [[Plugin Editions]]
|
||||
title: Innerwiki Plugin
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20201228143125000
|
||||
modified: 20201228143125000
|
||||
tags: OfficialPlugins
|
||||
modified: 20250302051857380
|
||||
tags: OfficialPlugins [[Plugin Editions]]
|
||||
title: Share Plugin
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -10,3 +10,5 @@ This experimental plugin provides tools to share tiddlers via URLs, comprising:
|
||||
|
||||
* The ability to load a group of tiddlers from the browser location hash at startup
|
||||
* Wizard and templates to create URLs from group of tiddlers
|
||||
|
||||
See the demo at [ext[https://tiddlywiki.com/share|share]]
|
||||
9
editions/tw5.com/tiddlers/plugins/Tour Plugin.tid
Normal file
9
editions/tw5.com/tiddlers/plugins/Tour Plugin.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
created: 20250302052635425
|
||||
modified: 20250302052905312
|
||||
tags: OfficialPlugins [[Plugin Editions]]
|
||||
title: Tour Plugin
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The tour plugin allows interactive learning tours to be created and presented in TiddlyWiki.
|
||||
|
||||
The demo TiddlyWiki interactive tour can be seen at https://tiddlywiki.com/tour
|
||||
@@ -48,6 +48,6 @@ $caption$
|
||||
<<special-button>>
|
||||
""">>
|
||||
|
||||
<<.warning """If macros are nested, textual substitution will only occur for the outermost macro. Thi is because by the time the inner macros are processed all the substitutions will have already occurred""">>
|
||||
<<.warning """If macros are nested, textual substitution will only occur for the outermost macro. This is because by the time the inner macros are processed all the substitutions will have already occurred""">>
|
||||
|
||||
A more formal [[presentation|Macro Definition Syntax]] of this syntax is also available.
|
||||
|
||||
@@ -14,13 +14,8 @@ Planned features include:
|
||||
* Instantaneous synchronisation of changes between the server and all connected clients
|
||||
* Workflow processing on the server, for example to automatically compress images, or to archive webpages
|
||||
|
||||
MWS does require basic knowledge of the command line and Node.js but is designed to be as simple as possible to setup and use. Once downloaded, just two commands are needed to complete the installation and start the server:
|
||||
MWS does require basic knowledge of the command line and Node.js but is designed to be as simple as possible to setup and use. A few simple commands are all that is needed to complete the installation and start the server.
|
||||
|
||||
```
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
MWS is currently under development at ~GitHub but it is already functional and usable:
|
||||
|
||||
MWS is currently [[under development at GitHub|https://github.com/TiddlyWiki/TiddlyWiki5/pull/7915]] but it is already functional and usable. Visit the MWS website for more information:
|
||||
|
||||
! https://mws.tiddlywiki.com/
|
||||
https://github.com/TiddlyWiki/MultiWikiServer/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: action-setfield
|
||||
created: 20141025120850184
|
||||
modified: 20150806171403798
|
||||
modified: 20250322010115457
|
||||
tags: Widgets ActionWidgets
|
||||
title: ActionSetFieldWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -66,3 +66,10 @@ src='<$button>
|
||||
<$action-navigate $to="$:/ControlPanel"/>
|
||||
Go to Control Panel "Appearance" tab
|
||||
</$button>'/>
|
||||
|
||||
Here is an example of a button that will update the value of an existing field in a tiddler
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src='<$button>
|
||||
<$action-setfield $tiddler="Test" existing_field_name="new field value"/>
|
||||
Update Field existing_field_name in tiddler Test
|
||||
</$button>'/>
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: reveal
|
||||
created: 20131024141900000
|
||||
jeremy: tiddlywiki
|
||||
modified: 20240721175716320
|
||||
modified: 20250211091937860
|
||||
tags: Widgets
|
||||
title: RevealWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -28,7 +28,7 @@ The content of the `<$reveal>` widget is displayed according to the rules given
|
||||
|stateTitle |A title containing the state, ''without'' TextReference. Gets preferred over the <<.attr state>> attribute |
|
||||
|stateField |A ''field name'' which is used to look for the state, if the attribute <<.attr stateTitle>> is present |
|
||||
|stateIndex |An ''index'' which is used to look for the state, if the attribute <<.attr stateTitle>> is present |
|
||||
|tag |Overrides the default HTML element tag (`<div>` in block mode or `<span>` in inline mode) |
|
||||
|tag |Overrides the default [[HTML Tags]] (`<div>` in block mode or `<span>` in inline mode) |
|
||||
|type |The type of matching performed: ''match'', ''nomatch'', ''popup'', ''lt'', ''gt'', ''lteq'' or ''gteq'' |
|
||||
|text |The text to match when the type is ''match'', ''nomatch'', ''lt'', ''gt'', ''lteq'' or ''gteq'' |
|
||||
|class |An optional CSS class name to be assigned to the HTML element<br/>» Set to `tc-popup-keep` to make a popup "sticky", so it won't close when you click inside of it|
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
"description": "Documentation from https://tiddlywiki.com",
|
||||
"plugins": [
|
||||
"tiddlywiki/browser-sniff",
|
||||
"tiddlywiki/railroad",
|
||||
"tiddlywiki/internals",
|
||||
"tiddlywiki/menubar",
|
||||
"tiddlywiki/confetti",
|
||||
"tiddlywiki/dynannotate",
|
||||
"tiddlywiki/internals",
|
||||
"tiddlywiki/menubar",
|
||||
"tiddlywiki/railroad",
|
||||
"tiddlywiki/tour"
|
||||
],
|
||||
"themes": [
|
||||
|
||||
4
editions/xlsx-utils/tiddlers/$__coreURL.tid
Normal file
4
editions/xlsx-utils/tiddlers/$__coreURL.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/coreURL
|
||||
tags: $:/tags/Global
|
||||
|
||||
\function coreURL() [[../../tiddlywikicore-$(version)$.js]substitute[]]
|
||||
@@ -12,6 +12,9 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"]
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
|
||||
"external": [
|
||||
"--render","$:/core/save/all-external-js","index.html","text/plain"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -609,3 +609,9 @@ J. Ryan Stinnett, @jryans, 2025/01/04
|
||||
Galen Huntington, @galenhuntington, 2025/01/19
|
||||
|
||||
@Rhys-T, 2025/01/23
|
||||
|
||||
@Rumman157, 2025/03/17
|
||||
|
||||
@bob.jansen@cultconv.com, 2025/03/22
|
||||
|
||||
Matthew Salmon, @matthewsalmon, 2025/04/24
|
||||
|
||||
@@ -6,7 +6,6 @@ module-type: global
|
||||
Confetti manager
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
var confetti = require("$:/plugins/tiddlywiki/confetti/confetti.js");
|
||||
@@ -49,5 +48,3 @@ ConfettiManager.prototype.reset = function () {
|
||||
};
|
||||
|
||||
exports.ConfettiManager = ConfettiManager;
|
||||
|
||||
})();
|
||||
|
||||
@@ -6,7 +6,6 @@ module-type: widget
|
||||
Confetti widget
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
@@ -60,5 +59,3 @@ ConfettiWidget.prototype.refresh = function(changedTiddlers) {
|
||||
};
|
||||
|
||||
exports.confetti = ConfettiWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"name": "Confetti",
|
||||
"description": "Animated confetti effect",
|
||||
"list": "readme",
|
||||
"stability": "STABILITY_1_EXPERIMENTAL"
|
||||
"stability": "STABILITY_2_STABLE"
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ module-type: startup
|
||||
Setup the root widget event handlers
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
// Export name and synchronous status
|
||||
@@ -56,5 +55,3 @@ exports.startup = function() {
|
||||
$tw.confettiManager.reset();
|
||||
});
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -6,7 +6,6 @@ module-type: library
|
||||
Manages the element spotlight effect
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
function ElementSpotlight() {
|
||||
@@ -129,5 +128,3 @@ ElementSpotlight.prototype.shineSpotlight = function(selectors) {
|
||||
};
|
||||
|
||||
exports.ElementSpotlight = ElementSpotlight;
|
||||
|
||||
})();
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
const { ElementSpotlight } = require("./element-spotlight");
|
||||
|
||||
/*\
|
||||
title: $:/plugins/tiddlywiki/dynannotate/startup.js
|
||||
type: application/javascript
|
||||
@@ -8,8 +6,6 @@ module-type: startup
|
||||
Startup the dyannotate background daemon to track the selection
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
"use strict";
|
||||
|
||||
// Export name and synchronous status
|
||||
@@ -56,5 +52,3 @@ exports.startup = function() {
|
||||
$tw.dynannotate.elementSpotlight.shineSpotlight(selectors);
|
||||
});
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"name": "Geospatial Utilities",
|
||||
"description": "Geospatial utilities",
|
||||
"list": "readme docs settings license",
|
||||
"stability": "STABILITY_1_EXPERIMENTAL"
|
||||
"stability": "STABILITY_2_STABLE"
|
||||
}
|
||||
|
||||
@@ -6,9 +6,6 @@ module-type: widget
|
||||
Anchor widget to represent an innerwiki graphical anchor. Clone of the data widget
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
exports.anchor = require("$:/core/modules/widgets/data.js").data;
|
||||
|
||||
})();
|
||||
|
||||
@@ -6,7 +6,6 @@ module-type: widget
|
||||
barcodereader widget for reading barcodes
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
@@ -83,5 +82,3 @@ BarCodeReaderWidget.prototype.refresh = function(changedTiddlers) {
|
||||
};
|
||||
|
||||
exports.barcodereader = BarCodeReaderWidget;
|
||||
|
||||
})();
|
||||
|
||||
@@ -66,7 +66,7 @@ Generate sharing link
|
||||
!! 5 - Export the shared tiddlers
|
||||
|
||||
<$button>
|
||||
<$action-sendmessage $message="tm-download-file" $param="$:/core/templates/exporters/JsonFile" exportFilter={{$:/config/plugins/share/filter}} filename="tiddlers.json"/>
|
||||
<$action-sendmessage $message="tm-download-file" $param="$:/core/templates/exporters/JsonFile" exportFilter={{$:/config/plugins/share/filter}} filename="tiddlers.json" type="application/json"/>
|
||||
Export as JSON
|
||||
</$button>
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"name": "Stacked View",
|
||||
"description": "Stacked card storyview",
|
||||
"list": "readme",
|
||||
"stability": "STABILITY_1_EXPERIMENTAL"
|
||||
"stability": "STABILITY_2_STABLE"
|
||||
}
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
"description": "A tour of TiddlyWiki",
|
||||
"list": "readme docs settings",
|
||||
"dependents": ["$:/plugins/tiddlywiki/confetti","$:/plugins/tiddlywiki/dynannotate"],
|
||||
"stability": "STABILITY_1_EXPERIMENTAL"
|
||||
"stability": "STABILITY_2_STABLE"
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"name": "TW5.com Docs",
|
||||
"description": "Documentation from tiddlywiki.com",
|
||||
"list": "readme",
|
||||
"stability": "STABILITY_1_EXPERIMENTAL"
|
||||
"stability": "STABILITY_2_STABLE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user