1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-06 02:37:14 +00:00

Merge branch 'master' into remove-function-wrapper

This commit is contained in:
pmario 2025-03-16 14:22:00 +01:00
commit b13c4ca2a6
1542 changed files with 20374 additions and 7316 deletions

View File

@ -1,10 +0,0 @@
# Ignore "third party" code whose style we will not change.
/boot/sjcl.js
/core/modules/utils/base64-utf8/base64-utf8.module.js
/core/modules/utils/base64-utf8/base64-utf8.module.min.js
/core/modules/utils/diff-match-patch/diff_match_patch.js
/core/modules/utils/diff-match-patch/diff_match_patch_uncompressed.js
/core/modules/utils/dom/csscolorparser.js
/plugins/tiddlywiki/*/files/
/tmp/
/output/

View File

@ -21,7 +21,7 @@ body:
attributes:
label: To Reproduce
description: "Steps to reproduce the behavior:"
value: |
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
@ -41,7 +41,7 @@ body:
attributes:
label: TiddlyWiki Configuration
description: please complete the following information
value: |
placeholder: |
- Version [e.g. v5.1.24]
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
- Plugins installed [e.g. Freelinks, TiddlyMap]

View File

@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: Discuss feature request
url: https://github.com/Jermolene/TiddlyWiki5/discussions
url: https://github.com/TiddlyWiki/TiddlyWiki5/discussions
about: Open new discussion about new feature
- name: Talk.Tiddlywiki Forum
url: https://talk.tiddlywiki.org

View File

@ -5,17 +5,17 @@ on:
- master
- tiddlywiki-com
env:
NODE_VERSION: "18"
NODE_VERSION: "22"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE_VERSION }}"
- run: "./bin/ci-test.sh"
- uses: actions/upload-artifact@v3
- 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@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- 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@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE_VERSION }}"
- run: "./bin/ci-pre-build.sh"

30
.github/workflows/cla-check.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Check CLA Signature
on:
pull_request_target:
types:
- opened
- reopened
paths-ignore:
- 'licenses/cla-individual.md'
jobs:
check_cla:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: ${{ (github.event.pull_request.user.login != github.repository_owner) }}
steps:
- run: |
if ! curl -s https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/tiddlywiki-com/licenses/cla-individual.md | grep -io "@$USER,"; then
echo "CLA not signed"
gh pr comment "$NUMBER" -b "@$USER It appears that this is your first contribution to the project, welcome.
With apologies for the bureaucracy, please could you prepare a separate PR to the 'tiddlywiki-com' branch with your signature for the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))."
else
echo "CLA already signed"
gh pr comment "$NUMBER" -b "Confirmed: **$USER** has already signed the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
USER: ${{ github.actor }}

70
.github/workflows/cla-signed.yml vendored Normal file
View File

@ -0,0 +1,70 @@
name: CLA Signed
on:
pull_request_target:
types:
- opened
- closed
paths:
- 'licenses/cla-individual.md'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
AUTHOR: ${{ github.event.pull_request.user.login }}
jobs:
# check if PRs updating the CLA are targetting the tiddlywiki-com branch
check-signature-branch:
if: (github.event.pull_request.merged != true) && (github.event.pull_request.user.login != github.repository_owner)
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- run: |
if [[ "$BRANCH" != "tiddlywiki-com" ]]; then
echo "This CLA signature targets the wrong branch: $BRANCH"
gh pr comment "$NUMBER" -b "@$AUTHOR Signatures to the CLA must target the 'tiddlywiki-com' branch."
fi
env:
BRANCH: ${{ github.event.pull_request.base.ref }}
# leave a comment on each open PR by a given author when their signature is added to the CLA
cla-signed:
if: (github.event.pull_request.merged == true) && (github.event.pull_request.user.login != github.repository_owner)
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: List open PRs by user
id: list-prs
uses: actions/github-script@v6
with:
result-encoding: string
script: |
const owner = context.repo.owner,
repo = context.repo.repo,
author = context.payload.pull_request.user.login;
const { data: pullRequests } = await github.rest.pulls.list({
owner: owner,
repo: repo,
state: 'open',
sort: 'created',
direction: 'desc',
per_page: 100
});
const userPullRequests = pullRequests.filter(pr => pr.user.login === author),
prNumbers = userPullRequests.map(pr => pr.number).join(',');
console.log(`Open pull requests by ${author}:${prNumbers}`);
return prNumbers;
- name: Comment open PRs by the same author
run: |
prs=($(echo ${{ steps.list-prs.outputs.result }} | tr "," "\n"))
for number in "${prs[@]}"
do
gh pr comment "$number" -b "**$AUTHOR** has signed the Contributor License Agreement (see [contributing.md](https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/contributing.md))"
done

View File

@ -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.3.3
TW5_BUILD_VERSION=v5.3.7
fi
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
@ -97,7 +97,6 @@ if [ -n "$TW5_BUILD_ARCHIVE" ]; then
node $TW5_BUILD_TIDDLYWIKI \
$TW5_BUILD_MAIN_EDITION \
--verbose \
--version \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_ARCHIVE \
@ -115,7 +114,6 @@ fi
node $TW5_BUILD_TIDDLYWIKI \
$TW5_BUILD_MAIN_EDITION \
--verbose \
--version \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
@ -128,7 +126,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /tiddlywikicore-<version>.js Core plugin javascript
node $TW5_BUILD_TIDDLYWIKI \
./editions/empty \
--verbose \
--output $TW5_BUILD_OUTPUT \
--build empty emptyexternalcore \
|| exit 1
@ -137,7 +134,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /test.html Test edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/test \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all test.html text/plain \
|| exit 1
@ -150,7 +146,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /dev/static/static.css Static stylesheet
node $TW5_BUILD_TIDDLYWIKI \
./editions/dev \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/dev \
--build index favicon static \
@ -159,29 +154,13 @@ node $TW5_BUILD_TIDDLYWIKI \
# /tour.html tour edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/tour \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all tour.html text/plain \
|| exit 1
# /dev/index.html Developer docs
# /dev/favicon.ico Favicon for dev site
# /dev/static.html Static rendering of default tiddlers
# /dev/alltiddlers.html Static rendering of all tiddlers
# /dev/static/* Static single tiddlers
# /dev/static/static.css Static stylesheet
node $TW5_BUILD_TIDDLYWIKI \
./editions/dev \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/dev \
--build index favicon static \
|| exit 1
# /share.html Custom edition for sharing via the URL
node $TW5_BUILD_TIDDLYWIKI \
./editions/share \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--build share \
@ -190,7 +169,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /upgrade.html Custom edition for performing upgrades
node $TW5_BUILD_TIDDLYWIKI \
./editions/upgrade \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--build upgrade \
@ -199,7 +177,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /encrypted.html Copy of the main file encrypted with the password "password"
node $TW5_BUILD_TIDDLYWIKI \
$TW5_BUILD_MAIN_EDITION \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--build encrypted \
@ -215,7 +192,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/xlsx-utils/index.html xlsx-utils edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/xlsx-utils \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/xlsx-utils/ \
--build index \
@ -224,7 +200,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/resumebuilder/index.html Resume builder edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/resumebuilder \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/resumebuilder/ \
--build index \
@ -233,7 +208,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/text-slicer/index.html Text slicer edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/text-slicer \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/text-slicer/ \
--build index \
@ -242,7 +216,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/translators/index.html Translators edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/translators \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/translators/ \
--build index \
@ -251,7 +224,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/introduction/index.html Introduction edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/introduction \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/introduction/ \
--build index \
@ -260,7 +232,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/full/index.html Full edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/full \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/full/ \
--build index \
@ -269,7 +240,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/tw5.com-docs/index.html tiddlywiki.com docs edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/tw5.com-docs \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/tw5.com-docs/ \
--build index \
@ -278,7 +248,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /editions/twitter-archivist/index.html Twitter Archivist edition
node $TW5_BUILD_TIDDLYWIKI \
./editions/twitter-archivist \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/editions/twitter-archivist/ \
--build index \
@ -294,7 +263,6 @@ node $TW5_BUILD_TIDDLYWIKI \
node $TW5_BUILD_TIDDLYWIKI \
./editions/innerwikidemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/innerwiki/index.html text/plain \
@ -305,7 +273,6 @@ node $TW5_BUILD_TIDDLYWIKI \
node $TW5_BUILD_TIDDLYWIKI \
./editions/dynaviewdemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/dynaview/index.html text/plain \
@ -320,7 +287,6 @@ node $TW5_BUILD_TIDDLYWIKI \
node $TW5_BUILD_TIDDLYWIKI \
./editions/katexdemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/katex/index.html text/plain \
@ -331,7 +297,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/tahoelafs/empty.html Empty wiki with Tahoe-LAFS plugin
node $TW5_BUILD_TIDDLYWIKI \
./editions/tahoelafs \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/tahoelafs/index.html text/plain \
@ -342,7 +307,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/d3/empty.html Empty wiki with D3 plugin
node $TW5_BUILD_TIDDLYWIKI \
./editions/d3demo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/d3/index.html text/plain \
@ -353,7 +317,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/codemirror/empty.html Empty wiki with codemirror plugin
node $TW5_BUILD_TIDDLYWIKI \
./editions/codemirrordemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/codemirror/index.html text/plain \
@ -364,7 +327,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/markdown/empty.html Empty wiki with Markdown plugin
node $TW5_BUILD_TIDDLYWIKI \
./editions/markdowndemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/markdown/index.html text/plain \
@ -375,7 +337,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/tw2parser/empty.html Empty wiki with tw2parser plugin
node $TW5_BUILD_TIDDLYWIKI \
./editions/classicparserdemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/tw2parser/index.html text/plain \
@ -386,7 +347,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/highlight/empty.html Empty wiki with highlight plugin
node $TW5_BUILD_TIDDLYWIKI \
./editions/highlightdemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/highlight/index.html text/plain \
@ -397,7 +357,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /plugins/tiddlywiki/geospatial/empty.html Empty wiki with geospatial plugin
node $TW5_BUILD_TIDDLYWIKI \
./editions/geospatialdemo \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all plugins/tiddlywiki/geospatial/index.html text/plain \
@ -425,7 +384,6 @@ rm -rf $TW5_BUILD_OUTPUT/languages/zh-Hant/static/*
# /languages/de-AT/empty.html Empty wiki with de-AT language
node $TW5_BUILD_TIDDLYWIKI \
./editions/de-AT \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/de-AT \
--build favicon empty static index \
@ -435,7 +393,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/de-DE/empty.html Empty wiki with de-DE language
node $TW5_BUILD_TIDDLYWIKI \
./editions/de-DE \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/de-DE \
--build favicon empty static index \
@ -445,7 +402,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/es-ES/empty.html Empty wiki with es-ES language
node $TW5_BUILD_TIDDLYWIKI \
./editions/es-ES \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/es-ES \
--build favicon empty static index \
@ -455,7 +411,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/fr-FR/empty.html Empty wiki with fr-FR language
node $TW5_BUILD_TIDDLYWIKI \
./editions/fr-FR \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/fr-FR \
--build favicon empty static index \
@ -465,7 +420,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/ja-JP/empty.html Empty wiki with ja-JP language
node $TW5_BUILD_TIDDLYWIKI \
./editions/ja-JP \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/ja-JP \
--build empty index \
@ -475,7 +429,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/ko-KR/empty.html Empty wiki with ko-KR language
node $TW5_BUILD_TIDDLYWIKI \
./editions/ko-KR \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/ko-KR \
--build favicon empty static index \
@ -485,7 +438,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/zh-Hans/empty.html Empty wiki with zh-Hans language
node $TW5_BUILD_TIDDLYWIKI \
./editions/zh-Hans \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/zh-Hans \
--build empty index \
@ -495,7 +447,6 @@ node $TW5_BUILD_TIDDLYWIKI \
# /languages/zh-Hant/empty.html Empty wiki with zh-Hant language
node $TW5_BUILD_TIDDLYWIKI \
./editions/zh-Hant \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/languages/zh-Hant \
--build empty index \
@ -509,7 +460,6 @@ node $TW5_BUILD_TIDDLYWIKI \
node $TW5_BUILD_TIDDLYWIKI \
./editions/pluginlibrary \
--verbose \
--load $TW5_BUILD_OUTPUT/build.tid \
--output $TW5_BUILD_OUTPUT/library/$TW5_BUILD_VERSION \
--build library\

View File

@ -7,4 +7,4 @@ npm --force install tiddlywiki || exit 1
# Pull existing GitHub pages content
git clone --depth=1 --branch=master "https://github.com/Jermolene/jermolene.github.io.git" output
git clone --depth=1 --branch=master "https://github.com/TiddlyWiki/tiddlywiki.com-gh-pages.git" output

View File

@ -10,6 +10,6 @@ git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git add -A .
git commit --message "GitHub build: $GITHUB_RUN_NUMBER of $TW5_BUILD_BRANCH ($(date +'%F %T %Z'))"
git remote add deploy "https://$GH_TOKEN@github.com/Jermolene/jermolene.github.io.git" &>/dev/null
git remote add deploy "https://$GH_TOKEN@github.com/TiddlyWiki/tiddlywiki.com-gh-pages.git" &>/dev/null
git push deploy master &>/dev/null
cd ..

View File

@ -15,3 +15,11 @@ node $TW5_BUILD_TIDDLYWIKI \
--output . \
--build readmes \
|| exit 1
# tw.org readmes
node $TW5_BUILD_TIDDLYWIKI \
editions/tw.org \
--verbose \
--output . \
--build readmes \
|| exit 1

View File

@ -232,10 +232,10 @@ $tw.utils.error = function(err) {
var link = dm("a"),
text = JSON.stringify(tiddlers);
if(Blob !== undefined) {
var blob = new Blob([text], {type: "text/html"});
var blob = new Blob([text], {type: "application/json"});
link.setAttribute("href", URL.createObjectURL(blob));
} else {
link.setAttribute("href","data:text/html," + encodeURIComponent(text));
link.setAttribute("href","data:application/json," + encodeURIComponent(text));
}
link.setAttribute("download","emergency-tiddlers-" + (new Date()) + ".json");
document.body.appendChild(link);
@ -386,8 +386,8 @@ $tw.utils.parseDate = function(value) {
parseInt(value.substr(10,2)||"00",10),
parseInt(value.substr(12,2)||"00",10),
parseInt(value.substr(14,3)||"000",10)));
d.setUTCFullYear(year); // See https://stackoverflow.com/a/5870822
return d;
d.setUTCFullYear(year); // See https://stackoverflow.com/a/5870822
return d;
} else if($tw.utils.isDate(value)) {
return value;
} else {
@ -1470,17 +1470,15 @@ $tw.Wiki = function(options) {
// Unpack the currently registered plugins, creating shadow tiddlers for their constituent tiddlers
this.unpackPluginTiddlers = function() {
var self = this;
// Sort the plugin titles by the `plugin-priority` field
pluginTiddlers.sort(function(a,b) {
if("plugin-priority" in a.fields && "plugin-priority" in b.fields) {
return a.fields["plugin-priority"] - b.fields["plugin-priority"];
} else if("plugin-priority" in a.fields) {
// Sort the plugin titles by the `plugin-priority` field, if this field is missing, default to 1
pluginTiddlers.sort(function(a, b) {
var priorityA = "plugin-priority" in a.fields ? a.fields["plugin-priority"] : 1;
var priorityB = "plugin-priority" in b.fields ? b.fields["plugin-priority"] : 1;
if (priorityA !== priorityB) {
return priorityA - priorityB;
} else if (a.fields.title < b.fields.title) {
return -1;
} else if("plugin-priority" in b.fields) {
return +1;
} else if(a.fields.title < b.fields.title) {
return -1;
} else if(a.fields.title === b.fields.title) {
} else if (a.fields.title === b.fields.title) {
return 0;
} else {
return +1;
@ -2465,13 +2463,15 @@ $tw.boot.initStartup = function(options) {
$tw.utils.registerFileType("image/webp","base64",".webp",{flags:["image"]});
$tw.utils.registerFileType("image/heic","base64",".heic",{flags:["image"]});
$tw.utils.registerFileType("image/heif","base64",".heif",{flags:["image"]});
$tw.utils.registerFileType("image/avif","base64",".avif",{flags:["image"]});
$tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]});
$tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]});
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
$tw.utils.registerFileType("application/wasm","base64",".wasm");
$tw.utils.registerFileType("application/font-woff","base64",".woff");
$tw.utils.registerFileType("application/x-font-ttf","base64",".woff");
$tw.utils.registerFileType("application/font-woff2","base64",".woff2");
$tw.utils.registerFileType("font/woff","base64",".woff");
$tw.utils.registerFileType("font/woff2","base64",".woff2");
$tw.utils.registerFileType("font/ttf","base64",".ttf");
$tw.utils.registerFileType("font/otf","base64",".otf");
$tw.utils.registerFileType("audio/ogg","base64",".ogg");
$tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]);
$tw.utils.registerFileType("video/ogg","base64",[".ogm",".ogv",".ogg"]);

View File

@ -21,7 +21,7 @@ $tw.boot = $tw.boot || Object.create(null);
// Detect platforms
if(!("browser" in $tw)) {
$tw.browser = typeof(window) !== "undefined" ? {} : null;
$tw.browser = typeof(window) !== "undefined" && typeof(document) !== "undefined" ? {} : null;
}
if(!("node" in $tw)) {
$tw.node = typeof(process) === "object" ? {} : null;

1
code-of-conduct.md Normal file
View File

@ -0,0 +1 @@
<p>This community exists because TiddlyWiki is more useful when people share and work together.</p><p>This community is a beautiful but fragile thing: a collection of diverse people from all over the planet, united in their interest in the project, and their commitment to helping one another achieve and learn more.</p><p>We try to make the community as broad and welcoming as possible by remembering some basic principles of culture and behaviour.</p><p>These principles guide technical and non-technical decisions, and help contributors and leaders support our project and community.</p><ul><li>We are optimistic and hopeful</li><li>We aim to foster a learning environment that is collaborative and safe for everyone</li><li>We recognise that the motivation for sharing and helping is usually for appreciation, and not financial gain, and so we take care to acknowledge and <strong>thank the people who enrich the community by sharing what they have created</strong></li><li>While we are united in our interest in TiddlyWiki, we differ in every other conceivable way. We choose to focus on what unites us, and <strong>avoid unnecessarily mixing contentious topics like religion and politics</strong></li><li>We treat each other with respect, and start with the assumption that <strong>others are acting in good faith</strong></li><li>We avoid discriminatory language</li><li>We try to use our strength as a community to help others</li><li>We avoid responding when angry or upset because we try to de-escalate conflict</li><li>We make sure we critique ideas, not people</li><li>When we disagree with others we do so graciously, and treat others with dignity and respoect</li><li>We do not tolerate intolerance towards others</li><li>We seek first to understand others, and then to be understood</li><li>We have fun</li></ul><p>Our discussions are in English. It is not the first language of many people in the community, nor do we all share the same cultural background and reference points. So we take care to use language that is clear and unambigous, and avoid cultural references or jokes that will not be widely understood.</p><p>It is not acceptable to make jokes or other comments that discriminate by race, gender, sexuality, or other protected characteristic.</p><p>As an inclusive community, we are committed to making sure that TiddlyWiki is an accessible tool that understands the needs of people with disabilities.</p>

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,3 @@ TiddlyWiki incorporates code from these fine OpenSource projects:
* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]
* [[The Jasmine JavaScript Test Framework|https://jasmine.github.io/]]
* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]
And media from these projects:
* World flag icons from [[Wikipedia|http://commons.wikimedia.org/wiki/Category:SVG_flags_by_country]]

View File

@ -4,7 +4,7 @@ type: text/plain
TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
Copyright (c) 2004-2007, Jeremy Ruston
Copyright (c) 2007-2024, UnaMesa Association
Copyright (c) 2007-2025, UnaMesa Association
All rights reserved.
Redistribution and use in source and binary forms, with or without

5
core/images/discord.tid Normal file
View File

@ -0,0 +1,5 @@
title: $:/core/images/discord
tags: $:/tags/Image
\parameters (size:"22pt")
<svg width=<<size>> height=<<size>> class="tc-image-discord tc-image-button" viewBox="0 -28.5 256 256"><path d="M216.856 16.597A208.502 208.502 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046-19.692-2.961-39.203-2.961-58.533 0-1.832-4.4-4.55-9.933-6.846-14.046a207.809 207.809 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161.094 161.094 0 0 0 79.735 175.3a136.413 136.413 0 0 1-21.846-10.632 108.636 108.636 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a131.66 131.66 0 0 0 5.355 4.237 136.07 136.07 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848 21.142-6.58 42.646-16.637 64.815-33.213 5.316-56.288-9.08-105.09-38.056-148.36ZM85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2c12.867 0 23.236 11.804 23.015 26.2.02 14.375-10.148 26.18-23.015 26.18Zm85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2 0 14.375-10.148 26.18-23.015 26.18Z"/></svg>

View File

@ -0,0 +1,5 @@
title: $:/core/images/input-button
tags: $:/tags/Image
\parameters (size:"22pt")
<svg width=<<size>> height=<<size>> class="tc-image-input-button tc-image-button" viewBox="0 0 22 22"><path d="M1.375 22h19.249c.365 0 .716-.145.973-.404v.001c.258-.257.404-.607.403-.972v-11a1.376 1.376 0 0 0-2.75 0v9.625H2.75V9.625a1.376 1.376 0 0 0-2.75 0v11C0 21.384.617 22 1.375 22Z"/><path d="m9.732 11.904-1.541-1.541a1.375 1.375 0 1 0-1.944 1.944l3.887 3.888c.258.258.608.402.973.402h-.001c.353 0 .705-.134.974-.402l3.888-3.889a1.376 1.376 0 0 0 .001-1.944 1.377 1.377 0 0 0-1.946 0l-1.541 1.542V1.376a1.375 1.375 0 1 0-2.75 0v10.528Z"/></svg>

5
core/images/language.tid Normal file
View File

@ -0,0 +1,5 @@
title: $:/core/images/language
tags: $:/tags/Image
\parameters (size:"22pt")
<svg width=<<size>> height=<<size>> class="tc-image-language tc-image-button" viewBox="0 0 92 92"><path d="M0 0h2480.32v3507.87H0z" style="fill:none" transform="scale(.03696 .02613)"/><path d="M71.508 62.298c-1.243 15.83-16.758 28.344-35.714 28.344-5.713 0-11.113-1.136-15.905-3.158-2.977 2.498-8.618 4.183-15.088 4.183-.929 0-1.84-.034-2.73-.102 4.499-1.5 7.989-4.886 9.298-9.099C4.373 76.918 0 69.016 0 60.246 0 49.773 6.237 40.537 15.729 35.07c1.235 7.764 5.492 14.713 11.724 19.953l-7.269 18.453c-.393.976-.676 1.737-.847 2.285a5.326 5.326 0 0 0-.256 1.591c0 .89.368 1.686 1.103 2.388.736.702 1.583 1.052 2.542 1.052 1.13 0 1.942-.33 2.438-.988.497-.659 1.096-1.93 1.797-3.812l1.797-4.826h15.3l1.797 4.723c.239.582.526 1.254.86 2.015.333.762.646 1.327.936 1.695.291.368.65.659 1.078.873.428.213.942.32 1.54.32a3.586 3.586 0 0 0 2.632-1.09c.727-.728 1.09-1.528 1.09-2.4 0-.84-.384-2.183-1.154-4.031l-3.545-8.755c2.142.3 4.34.455 6.58.455 5.541 0 10.824-.951 15.636-2.674Zm-30.563.247 1.059 2.898H30.76l2.32-6.467a43.152 43.152 0 0 0 7.865 3.569Z"/><path d="M71.778 57.635c-4.793 2.023-10.191 3.157-15.907 3.157-19.767 0-35.793-13.61-35.793-30.396S36.104.001 55.87.001c19.772 0 35.797 13.61 35.797 30.395 0 8.77-4.373 16.674-11.371 22.221 1.309 4.211 4.8 7.6 9.299 9.1-.89.067-1.802.1-2.73.1-6.47 0-12.11-1.686-15.088-4.182Zm-15.59-15.887a44.237 44.237 0 0 0 3.3 2.496c4.284 2.942 9.06 5.381 14.33 7.315l2.334-3.517c-5.134-1.871-9.696-4.125-13.69-6.763a42.558 42.558 0 0 1-3.37-2.483c4.247-4.806 7.374-10.43 9.38-16.869h6.698V17.78h-16.7a47.226 47.226 0 0 0-1.528-2.959 52.943 52.943 0 0 0-2.885-4.562l-4.218 1.554a36.467 36.467 0 0 1 2.971 3.983c.427.661.833 1.323 1.217 1.984H36.394v4.148h6.77a36.878 36.878 0 0 0 5.422 11.56 42.918 42.918 0 0 0 4.591 5.497c-4.687 4.017-10.548 6.932-17.582 8.744l2.247 3.709c7.746-2.44 13.861-5.67 18.347-9.689Zm-9.047-19.82h16.991c-1.86 5.668-4.528 10.402-8 14.204a42.526 42.526 0 0 1-4.247-4.922c-2.126-2.883-3.71-5.977-4.744-9.283Z"/></svg>

View File

@ -80,6 +80,7 @@ NewMarkdown/Caption: new Markdown tiddler
NewMarkdown/Hint: Create a new Markdown tiddler
NewTiddler/Caption: new tiddler
NewTiddler/Hint: Create a new tiddler
OpenControlPanel/Hint: Open control panel
OpenWindow/Caption: open in new window
OpenWindow/Hint: Open tiddler in new window
Palette/Caption: palette
@ -104,6 +105,8 @@ ShowSideBar/Caption: show sidebar
ShowSideBar/Hint: Show sidebar
TagManager/Caption: tag manager
TagManager/Hint: Open tag manager
TestCaseImport/Caption: import tiddlers
TestCaseImport/Hint: Import tiddlers
Timestamp/Caption: timestamps
Timestamp/Hint: Choose whether modifications update timestamps
Timestamp/On/Caption: timestamps are on
@ -130,6 +133,7 @@ Excise/Caption/Replace/Link: link
Excise/Caption/Replace/Transclusion: transclusion
Excise/Caption/Tag: Tag new tiddler with the title of this tiddler
Excise/Caption/TiddlerExists: Warning: tiddler already exists
Excise/DefaultTitle: New Excision
Excise/Hint: Excise the selected text into a new tiddler
Heading1/Caption: heading 1
Heading1/Hint: Apply heading level 1 formatting to lines containing selection

View File

@ -96,6 +96,10 @@ Plugins/PluginWillRequireReload: (requires reload)
Plugins/Plugins/Caption: Plugins
Plugins/Plugins/Hint: Plugins
Plugins/Reinstall/Caption: reinstall
Plugins/Stability/Deprecated: DEPRECATED
Plugins/Stability/Experimental: EXPERIMENTAL
Plugins/Stability/Legacy: LEGACY
Plugins/Stability/Stable: STABLE
Plugins/Themes/Caption: Themes
Plugins/Themes/Hint: Theme plugins
Plugins/Update/Caption: update
@ -171,6 +175,8 @@ Settings/NavigationPermalinkviewMode/UpdateAddressBar/Description: Update addres
Settings/PerformanceInstrumentation/Caption: Performance Instrumentation
Settings/PerformanceInstrumentation/Hint: Displays performance statistics in the browser developer console. Requires reload to take effect
Settings/PerformanceInstrumentation/Description: Enable performance instrumentation
Settings/RecentLimit/Caption: Recent Tab Limit
Settings/RecentLimit/Hint: Maximum number of tiddlers to be displayed under the sidebar "Recent" tab
Settings/ToolbarButtonStyle/Caption: Toolbar Button Style
Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons:
Settings/ToolbarButtonStyle/Styles/Borderless: Borderless
@ -198,6 +204,12 @@ Settings/TitleLinks/Yes/Description: Display tiddler titles as links
Settings/MissingLinks/Caption: Wiki Links
Settings/MissingLinks/Hint: Choose whether to link to tiddlers that do not exist yet
Settings/MissingLinks/Description: Enable links to missing tiddlers
SocialCard/Caption: Social Media Card
SocialCard/Domain/Prompt: Domain name to display for the link (for example, ''tiddlywiki.com'')
SocialCard/Hint: This information is used by social and messaging services to display a preview card for links to this ~TiddlyWiki when hosted online
SocialCard/PreviewUrl/Prompt: Full URL to preview image for this ~TiddlyWiki
SocialCard/PreviewUrl/Preview: Preview image:
SocialCard/Url/Prompt: Full URL of this ~TiddlyWiki
StoryTiddler/Caption: Story Tiddler
StoryTiddler/Hint: This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river.
StoryView/Caption: Story View
@ -235,3 +247,7 @@ ViewTemplateBody/Caption: View Template Body
ViewTemplateBody/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler.
ViewTemplateTitle/Caption: View Template Title
ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler.
ViewTemplateSubtitle/Caption: View Template Subtitle
ViewTemplateSubtitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the subtitle of a tiddler.
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.

View File

@ -65,6 +65,10 @@ sidebar-tab-foreground-selected: Sidebar tab foreground for selected tabs
sidebar-tab-foreground: Sidebar tab foreground
sidebar-tiddler-link-foreground-hover: Sidebar tiddler link foreground hover
sidebar-tiddler-link-foreground: Sidebar tiddler link foreground
stability-stable: Badge for stability level "stable"
stability-experimental: Badge for stability level "experimental"
stability-deprecated: Badge for stability level "deprecated"
stability-legacy: Badge for stability level "legacy"
testcase-accent-level-1: Test case accent colour with no nesting
testcase-accent-level-2: Test case accent colour with 2nd level nesting
testcase-accent-level-3: Test case accent colour with 3rd level nesting or higher

View File

@ -26,6 +26,8 @@ Tags/ClearInput/Caption: clear input
Tags/ClearInput/Hint: Clear tag input
Tags/Dropdown/Caption: tag list
Tags/Dropdown/Hint: Show tag list
Tags/EmptyMessage: No tags found
Tags/EmptyMessage/System: No system tags found
Title/BadCharacterWarning: Warning: avoid using any of the characters <<bad-chars>> in tiddler titles
Title/Exists/Prompt: Target tiddler already exists
Title/Relink/Prompt: Update ''<$text text=<<fromTitle>>/>'' to ''<$text text=<<toTitle>>/>'' in the //tags// and //list// fields of other tiddlers

View File

@ -6,6 +6,8 @@ Filter/Hint: Search via a [[filter expression|https://tiddlywiki.com/static/Filt
Filter/Matches: //<small><<resultCount>> matches</small>//
Matches: //<small><<resultCount>> matches</small>//
Matches/All: All matches:
Matches/NoMatch: //No match//
Matches/NoResult: //No search result//
Matches/Title: Title matches:
Search: Search
Search/TooShort: Search text too short

View File

@ -0,0 +1,7 @@
title: $:/language/Snippets/FunctionDefinition
tags: $:/tags/TextEditor/Snippet
caption: Function definition
\function f.name(param1,param2:"default value") [<param1>!is[blank]else<param2>]
<<f.name>>

View File

@ -0,0 +1,7 @@
title: $:/language/Snippets/ProcedureDefinition
tags: $:/tags/TextEditor/Snippet
caption: Procedure definition
\procedure procName(param1:"default value",param2)
Your text comes here.
\end

View File

@ -1,5 +0,0 @@
title: $:/language/Docs/Types/image/x-icon
description: ICO icon
name: image/x-icon
group: Image
group-sort: 1

View File

@ -0,0 +1,5 @@
title: $:/language/Docs/Types/text/vnd.tiddlywiki-multiple
description: Compound tiddler
name: text/vnd.tiddlywiki-multiple
group: Developer
group-sort: 2

View File

@ -1,13 +0,0 @@
title: $:/languages/en-GB/icon
type: image/svg+xml
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30" width="1200" height="600">
<clipPath id="t">
<path d="M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z"/>
</clipPath>
<path d="M0,0 v30 h60 v-30 z" fill="#00247d"/>
<path d="M0,0 L60,30 M60,0 L0,30" stroke="#fff" stroke-width="6"/>
<path d="M0,0 L60,30 M60,0 L0,30" clip-path="url(#t)" stroke="#cf142b" stroke-width="4"/>
<path d="M30,0 v30 M0,15 h60" stroke="#fff" stroke-width="10"/>
<path d="M30,0 v30 M0,15 h60" stroke="#cf142b" stroke-width="6"/>
</svg>

View File

@ -23,7 +23,7 @@ var Command = function(params,commander) {
Command.prototype.execute = function() {
// Get the build targets defined in the wiki
var buildTargets = $tw.boot.wikiInfo.build;
var buildTargets = $tw.boot.wikiInfo && $tw.boot.wikiInfo.build;
if(!buildTargets) {
return "No build targets defined";
}

View File

@ -7,56 +7,64 @@ Render individual tiddlers and save the results to the specified files
\*/
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var widget = require("$:/core/modules/widgets/widget.js");
exports.info = {
name: "render",
synchronous: true
};
var Command = function(params,commander,callback) {
this.params = params;
this.commander = commander;
this.callback = callback;
};
Command.prototype.execute = function() {
if(this.params.length < 1) {
return "Missing tiddler filter";
}
var self = this,
fs = require("fs"),
path = require("path"),
wiki = this.commander.wiki,
tiddlerFilter = this.params[0],
filenameFilter = this.params[1] || "[is[tiddler]addsuffix[.html]]",
type = this.params[2] || "text/html",
template = this.params[3],
variableList = this.params.slice(4),
tiddlers = wiki.filterTiddlers(tiddlerFilter),
variables = Object.create(null);
while(variableList.length >= 2) {
variables[variableList[0]] = variableList[1];
variableList = variableList.slice(2);
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var widget = require("$:/core/modules/widgets/widget.js");
exports.info = {
name: "render",
synchronous: true
};
var Command = function(params,commander,callback) {
this.params = params;
this.commander = commander;
this.callback = callback;
};
Command.prototype.execute = function() {
if(this.params.length < 1) {
return "Missing tiddler filter";
}
$tw.utils.each(tiddlers,function(title) {
var filepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]);
if(self.commander.verbose) {
console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
}
var parser = wiki.parseTiddler(template || title),
widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}),
container = $tw.fakeDocument.createElement("div");
widgetNode.render(container,null);
var text = type === "text/html" ? container.innerHTML : container.textContent;
$tw.utils.createFileDirectories(filepath);
fs.writeFileSync(filepath,text,"utf8");
});
return null;
};
exports.Command = Command;
var self = this,
fs = require("fs"),
path = require("path"),
wiki = this.commander.wiki,
tiddlerFilter = this.params[0],
filenameFilter = this.params[1] || "[is[tiddler]addsuffix[.html]]",
type = this.params[2] || "text/html",
template = this.params[3],
variableList = this.params.slice(4),
tiddlers = wiki.filterTiddlers(tiddlerFilter),
variables = Object.create(null);
while(variableList.length >= 2) {
variables[variableList[0]] = variableList[1];
variableList = variableList.slice(2);
}
$tw.utils.each(tiddlers,function(title) {
var filenameResults = wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]));
if(filenameResults.length > 0) {
var filepath = path.resolve(self.commander.outputPath,filenameResults[0]);
if(self.commander.verbose) {
console.log("Rendering \"" + title + "\" to \"" + filepath + "\"");
}
var parser = wiki.parseTiddler(template || title),
widgetNode = wiki.makeWidget(parser,{variables: $tw.utils.extend({},variables,{currentTiddler: title,storyTiddler: title})}),
container = $tw.fakeDocument.createElement("div");
widgetNode.render(container,null);
var text = type === "text/html" ? container.innerHTML : container.textContent;
$tw.utils.createFileDirectories(filepath);
fs.writeFileSync(filepath,text,"utf8");
} else {
console.log("Not rendering \"" + title + "\" because the filename filter returned an empty result");
}
});
return null;
};
exports.Command = Command;
})();

View File

@ -30,7 +30,7 @@ exports.textPrimitives.wikiLink = exports.textPrimitives.upperLetter + "+" +
exports.textPrimitives.upperLetter +
exports.textPrimitives.anyLetter + "*";
exports.htmlEntities = {quot:34, dollar:36, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
exports.htmlEntities = {quot:34, dollar:36, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, nobreak:8288, NoBreak:8288, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",");

View File

@ -12,20 +12,27 @@ Text editor operation to excise the selection to a new tiddler
/*global $tw: false */
"use strict";
function isMarkdown(mediaType) {
return mediaType === 'text/markdown' || mediaType === 'text/x-markdown';
}
exports["excise"] = function(event,operation) {
var editTiddler = this.wiki.getTiddler(this.editTitle),
editTiddlerTitle = this.editTitle;
editTiddlerTitle = this.editTitle,
wikiLinks = !isMarkdown(editTiddler.fields.type),
excisionBaseTitle = $tw.language.getString("Buttons/Excise/DefaultTitle");
if(editTiddler && editTiddler.fields["draft.of"]) {
editTiddlerTitle = editTiddler.fields["draft.of"];
}
var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle("New Excision");
var excisionTitle = event.paramObject.title || this.wiki.generateNewTitle(excisionBaseTitle);
this.wiki.addTiddler(new $tw.Tiddler(
this.wiki.getCreationFields(),
this.wiki.getModificationFields(),
{
title: excisionTitle,
text: operation.selection,
tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : []
tags: event.paramObject.tagnew === "yes" ? [editTiddlerTitle] : [],
type: editTiddler.fields.type
}
));
operation.replacement = excisionTitle;
@ -34,7 +41,8 @@ exports["excise"] = function(event,operation) {
operation.replacement = "{{" + operation.replacement+ "}}";
break;
case "link":
operation.replacement = "[[" + operation.replacement+ "]]";
operation.replacement = wikiLinks ? "[[" + operation.replacement+ "]]"
: ("[" + operation.replacement + "](<#" + operation.replacement + ">)");
break;
case "macro":
operation.replacement = "<<" + (event.paramObject.macro || "translink") + " \"\"\"" + operation.replacement + "\"\"\">>";

View File

@ -13,37 +13,125 @@ Text editor operation to wrap the selection with the specified prefix and suffix
"use strict";
exports["wrap-selection"] = function(event,operation) {
if(operation.selStart === operation.selEnd) {
// No selection; check if we're within the prefix/suffix
if(operation.text.substring(operation.selStart - event.paramObject.prefix.length,operation.selStart + event.paramObject.suffix.length) === event.paramObject.prefix + event.paramObject.suffix) {
var o = operation,
prefix = event.paramObject.prefix,
suffix = event.paramObject.suffix,
trimSelection = event.paramObject.trimSelection || "no",
selLength = o.selEnd - o.selStart;
// This function detects, if trailing spaces are part of the selection __and__ if the user wants to handle them
// Returns "yes", "start", "end", "no" (default)
// yes .. there are trailing spaces at both ends
// start .. there are trailing spaces at the start
// end .. there are trailing spaces at the end
// no .. no trailing spaces are taken into account
var trailingSpaceAt = function(sel) {
var _start,
_end,
result;
// trimSelection is a user parameter, which this evaluations takes into account
switch(trimSelection) {
case "end":
result = (sel.trimEnd().length !== selLength) ? "end" : "no";
break;
case "yes":
_start = sel.trimStart().length !== selLength;
_end = sel.trimEnd().length !== selLength;
result = (_start && _end) ? "yes" : (_start) ? "start" : (_end) ? "end" : "no";
break;
case "start":
result = (sel.trimStart().length !== selLength) ? "start" : "no";
break;
default:
result = "no";
break;
}
return result;
}
function togglePrefixSuffix() {
if(o.text.substring(o.selStart - prefix.length, o.selStart + suffix.length) === prefix + suffix) {
// Remove the prefix and suffix
operation.cutStart = operation.selStart - event.paramObject.prefix.length;
operation.cutEnd = operation.selEnd + event.paramObject.suffix.length;
operation.replacement = "";
operation.newSelStart = operation.cutStart;
operation.newSelEnd = operation.newSelStart;
o.cutStart = o.selStart - prefix.length;
o.cutEnd = o.selEnd + suffix.length;
o.replacement = "";
o.newSelStart = o.cutStart;
o.newSelEnd = o.newSelStart;
} else {
// Wrap the cursor instead
operation.cutStart = operation.selStart;
operation.cutEnd = operation.selEnd;
operation.replacement = event.paramObject.prefix + event.paramObject.suffix;
operation.newSelStart = operation.selStart + event.paramObject.prefix.length;
operation.newSelEnd = operation.newSelStart;
o.cutStart = o.selStart;
o.cutEnd = o.selEnd;
o.replacement = prefix + suffix;
o.newSelStart = o.selStart + prefix.length;
o.newSelEnd = o.newSelStart;
}
} else if(operation.text.substring(operation.selStart,operation.selStart + event.paramObject.prefix.length) === event.paramObject.prefix && operation.text.substring(operation.selEnd - event.paramObject.suffix.length,operation.selEnd) === event.paramObject.suffix) {
}
// options: lenPrefix, lenSuffix
function removePrefixSuffix(options) {
options = options || {};
var _lenPrefix = options.lenPrefix || 0;
var _lenSuffix = options.lenSuffix || 0;
o.cutStart = o.selStart - _lenPrefix;
o.cutEnd = o.selEnd + _lenSuffix;
o.replacement = (_lenPrefix || _lenSuffix) ? o.selection : o.selection.substring(prefix.length, o.selection.length - suffix.length);
o.newSelStart = o.cutStart;
o.newSelEnd = o.cutStart + o.replacement.length;
}
function addPrefixSuffix() {
// remove trailing space if requested
switch(trailingSpaceAt(o.selection)) {
case "no":
// has no trailing spaces
o.cutStart = o.selStart;
o.cutEnd = o.selEnd;
o.replacement = prefix + o.selection + suffix;
o.newSelStart = o.selStart;
o.newSelEnd = o.selStart + o.replacement.length;
break;
case "yes":
// handle both ends
o.cutStart = o.selEnd - (o.selection.trimStart().length);
o.cutEnd = o.selection.trimEnd().length + o.selStart;
o.replacement = prefix + o.selection.trim() + suffix;
o.newSelStart = o.cutStart;
o.newSelEnd = o.cutStart + o.replacement.length;
break;
case "start":
// handle leading
o.cutStart = o.selEnd - (o.selection.trimStart().length);
o.cutEnd = o.selEnd;
o.replacement = prefix + o.selection.trimStart() + suffix;
o.newSelStart = o.cutStart;
o.newSelEnd = o.cutStart + o.replacement.length;
break;
case "end":
// handle trailing
o.cutStart = o.selStart;
o.cutEnd = o.selection.trimEnd().length + o.selStart;
o.replacement = prefix + o.selection.trimEnd() + suffix;
o.newSelStart = o.selStart;
o.newSelEnd = o.selStart + o.replacement.length;
break;
}
}
if(o.selStart === o.selEnd) {
// No selection; Create prefix and suffix. Set cursor in between them: ""|""
togglePrefixSuffix();
} else if(o.text.substring(o.selStart, o.selStart + prefix.length) === prefix &&
o.text.substring(o.selEnd - suffix.length,o.selEnd) === suffix) {
// Prefix and suffix are already present, so remove them
operation.cutStart = operation.selStart;
operation.cutEnd = operation.selEnd;
operation.replacement = operation.selection.substring(event.paramObject.prefix.length,operation.selection.length - event.paramObject.suffix.length);
operation.newSelStart = operation.selStart;
operation.newSelEnd = operation.selStart + operation.replacement.length;
removePrefixSuffix();
} else if(o.text.substring(o.selStart - prefix.length, o.selStart) === prefix &&
o.text.substring(o.selEnd, o.selEnd + suffix.length) === suffix) {
// Prefix and suffix are present BUT not selected -> remove them
removePrefixSuffix({"lenPrefix": prefix.length, "lenSuffix": suffix.length});
} else {
// Add the prefix and suffix
operation.cutStart = operation.selStart;
operation.cutEnd = operation.selEnd;
operation.replacement = event.paramObject.prefix + operation.selection + event.paramObject.suffix;
operation.newSelStart = operation.selStart;
operation.newSelEnd = operation.selStart + operation.replacement.length;
addPrefixSuffix();
}
};

View File

@ -16,11 +16,11 @@ Filter operator for returning all the backtranscludes from a tiddler
Export our filter function
*/
exports.backtranscludes = function(source,operator,options) {
var results = [];
var results = new $tw.utils.LinkedList();
source(function(tiddler,title) {
$tw.utils.pushTop(results,options.wiki.getTiddlerBacktranscludes(title));
results.pushTop(options.wiki.getTiddlerBacktranscludes(title));
});
return results;
return results.makeTiddlerIterator(options.wiki);
};
})();

View File

@ -17,8 +17,8 @@ Export our filter functions
exports.decodebase64 = function(source,operator,options) {
var results = [];
var binary = operator.suffixes && operator.suffixes.indexOf("binary") !== -1;
var urlsafe = operator.suffixes && operator.suffixes.indexOf("urlsafe") !== -1;
var binary = operator.suffixes && operator.suffixes[0].indexOf("binary") !== -1;
var urlsafe = operator.suffixes && operator.suffixes[0].indexOf("urlsafe") !== -1;
source(function(tiddler,title) {
results.push($tw.utils.base64Decode(title,binary,urlsafe));
});
@ -27,8 +27,8 @@ exports.decodebase64 = function(source,operator,options) {
exports.encodebase64 = function(source,operator,options) {
var results = [];
var binary = operator.suffixes && operator.suffixes.indexOf("binary") !== -1;
var urlsafe = operator.suffixes && operator.suffixes.indexOf("urlsafe") !== -1;
var binary = operator.suffixes && operator.suffixes[0].indexOf("binary") !== -1;
var urlsafe = operator.suffixes && operator.suffixes[0].indexOf("urlsafe") !== -1;
source(function(tiddler,title) {
results.push($tw.utils.base64Encode(title,binary,urlsafe));
});

View File

@ -17,19 +17,24 @@ Export our filter function
*/
exports.function = function(source,operator,options) {
var functionName = operator.operands[0],
params = [];
params = [],
results;
$tw.utils.each(operator.operands.slice(1),function(param) {
params.push({value: param});
});
// console.log(`Calling ${functionName} with params ${JSON.stringify(params)}`);
var variableInfo = options.widget && options.widget.getVariableInfo && options.widget.getVariableInfo(functionName,{params: params, source: source});
if(variableInfo && variableInfo.srcVariable && variableInfo.srcVariable.isFunctionDefinition) {
return variableInfo.resultList ? variableInfo.resultList : [variableInfo.text];
results = variableInfo.resultList ? variableInfo.resultList : [variableInfo.text];
}
// Return the input list if the function wasn't found
var results = [];
source(function(tiddler,title) {
results.push(title);
});
if(!results) {
results = [];
source(function(tiddler,title) {
results.push(title);
});
}
// console.log(`function ${functionName} with params ${JSON.stringify(params)} results: ${JSON.stringify(results)}`);
return results;
};

View File

@ -128,7 +128,7 @@ exports.minall = makeNumericReducingOperator(
exports.median = makeNumericArrayOperator(
function(values) {
var len = values.length, median;
values.sort();
values.sort(function(a,b) {return a-b});
if(len % 2) {
// Odd, return the middle number
median = values[(len - 1) / 2];

View File

@ -18,9 +18,16 @@ Export our filter function
exports.moduleproperty = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
var value = require(title)[operator.operand || ""];
if(value !== undefined) {
results.push(value);
try {
var value = require(title)[operator.operand || ""];
if(value !== undefined) {
if(typeof value !== "string") {
value = JSON.stringify(value);
}
results.push(value);
}
} catch(e) {
// Do nothing. It probably wasn't a module.
}
});
results.sort();

View File

@ -20,7 +20,7 @@ exports.transcludes = function(source,operator,options) {
source(function(tiddler,title) {
results.pushTop(options.wiki.getTiddlerTranscludes(title));
});
return results.toArray();
return results.makeTiddlerIterator(options.wiki);
};
})();

View File

@ -75,7 +75,7 @@ BackSubIndexer.prototype._getTarget = function(tiddler) {
}
var parser = this.wiki.parseText(tiddler.fields.type, tiddler.fields.text, {});
if(parser) {
return this.wiki[this.extractor](parser.tree);
return this.wiki[this.extractor](parser.tree, tiddler.fields.title);
}
return [];
}

View File

@ -16,19 +16,21 @@ exports.name = "unusedtitle";
exports.params = [
{name: "baseName"},
{name: "separator"},
{name: "template"}
{name: "template"},
{name: "startCount"}
];
/*
Run the macro
*/
exports.run = function(baseName,separator,template) {
exports.run = function(baseName,separator,template,startCount) {
separator = separator || " ";
startCount = startCount || 0;
if(!baseName) {
baseName = $tw.language.getString("DefaultNewTiddlerTitle");
}
// $tw.wiki.generateNewTitle = function(baseTitle,options)
// options.prefix must be a string!
return this.wiki.generateNewTitle(baseName, {"prefix": separator, "template": template});
// options.prefix must be a string!
return this.wiki.generateNewTitle(baseName, {"prefix": separator, "template": template, "startCount": startCount}).trim();
};

View File

@ -40,6 +40,7 @@ exports["image/gif"] = ImageParser;
exports["image/webp"] = ImageParser;
exports["image/heic"] = ImageParser;
exports["image/heif"] = ImageParser;
exports["image/avif"] = ImageParser;
exports["image/x-icon"] = ImageParser;
exports["image/vnd.microsoft.icon"] = ImageParser;

View File

@ -6,7 +6,7 @@ module-type: wikirule
Conditional shortcut syntax
```
This is a <% if [{something}] %>Elephant<% elseif [{else}] %>Pelican<% else %>Crocodile<% endif %>
This is a <%if [{something}] %>Elephant<%elseif [{else}] %>Pelican<%else%>Crocodile<%endif%>
```
\*/
@ -27,7 +27,7 @@ exports.init = function(parser) {
};
exports.findNextMatch = function(startPos) {
// Look for the next <% if shortcut
// Look for the next <%if shortcut
this.matchRegExp.lastIndex = startPos;
this.match = this.matchRegExp.exec(this.parser.source);
// If not found then return no match

View File

@ -93,11 +93,12 @@ var processRow = function(prevColumns) {
}
// Check whether this is a heading cell
var cell;
var start = this.parser.pos;
if(chr === "!") {
this.parser.pos++;
cell = {type: "element", tag: "th", children: []};
cell = {type: "element", tag: "th", start: start, children: []};
} else {
cell = {type: "element", tag: "td", children: []};
cell = {type: "element", tag: "td", start: start, children: []};
}
tree.push(cell);
// Record information about this cell
@ -121,6 +122,7 @@ var processRow = function(prevColumns) {
}
// Move back to the closing `|`
this.parser.pos--;
cell.end = this.parser.pos;
}
col++;
cellRegExp.lastIndex = this.parser.pos;
@ -169,12 +171,13 @@ exports.parse = function() {
rowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true});
} else {
// Create the row
var theRow = {type: "element", tag: "tr", children: []};
var theRow = {type: "element", tag: "tr", children: [], start: rowMatch.index};
$tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? "oddRow" : "evenRow");
rowContainer.children.push(theRow);
// Process the row
theRow.children = processRow.call(this,prevColumns);
this.parser.pos = rowMatch.index + rowMatch[0].length;
theRow.end = this.parser.pos;
// Increment the row count
rowCount++;
}

View File

@ -46,8 +46,10 @@ function SaverHandler(options) {
// Filter the changes so that we only count changes to tiddlers that we care about
var filteredChanges = self.filterFn.call(self.wiki,function(iterator) {
$tw.utils.each(changes,function(change,title) {
var tiddler = self.wiki.getTiddler(title);
iterator(tiddler,title);
if(change.normal) {
var tiddler = self.wiki.getTiddler(title);
iterator(tiddler,title);
}
});
});
// Adjust the number of changes
@ -95,6 +97,7 @@ function SaverHandler(options) {
if($tw.browser) {
$tw.rootWidget.addEventListener("tm-save-wiki",function(event) {
self.saveWiki({
wiki: event.widget.wiki,
template: event.param,
downloadType: "text/plain",
variables: event.paramObject
@ -102,6 +105,7 @@ function SaverHandler(options) {
});
$tw.rootWidget.addEventListener("tm-download-file",function(event) {
self.saveWiki({
wiki: event.widget.wiki,
method: "download",
template: event.param,
downloadType: "text/plain",
@ -147,20 +151,22 @@ Save the wiki contents. Options are:
method: "save", "autosave" or "download"
template: the tiddler containing the template to save
downloadType: the content type for the saved file
wiki: optional wiki, overriding the default wiki specified in the constructor
*/
SaverHandler.prototype.saveWiki = function(options) {
options = options || {};
var self = this,
wiki = options.wiki || this.wiki,
method = options.method || "save";
// Ignore autosave if disabled
if(method === "autosave" && ($tw.config.disableAutoSave || this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes")) {
if(method === "autosave" && ($tw.config.disableAutoSave || wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes")) {
return false;
}
var variables = options.variables || {},
template = (options.template ||
this.wiki.getTiddlerText("$:/config/SaveWikiButton/Template","$:/core/save/all")).trim(),
wiki.getTiddlerText("$:/config/SaveWikiButton/Template","$:/core/save/all")).trim(),
downloadType = options.downloadType || "text/plain",
text = this.wiki.renderTiddler(downloadType,template,options),
text = wiki.renderTiddler(downloadType,template,options),
callback = function(err) {
if(err) {
alert($tw.language.getString("Error/WhileSaving") + ":\n\n" + err);
@ -179,7 +185,7 @@ SaverHandler.prototype.saveWiki = function(options) {
// Call the highest priority saver that supports this method
for(var t=this.savers.length-1; t>=0; t--) {
var saver = this.savers[t];
if(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback,{variables: {filename: variables.filename}})) {
if(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback,{variables: {filename: variables.filename, type: variables.type}})) {
this.logger.log("Saving wiki with method",method,"through saver",saver.info.name);
return true;
}

View File

@ -22,6 +22,7 @@ DownloadSaver.prototype.save = function(text,method,callback,options) {
options = options || {};
// Get the current filename
var filename = options.variables.filename;
var type = options.variables.type;
if(!filename) {
var p = document.location.pathname.lastIndexOf("/");
if(p !== -1) {
@ -32,13 +33,16 @@ DownloadSaver.prototype.save = function(text,method,callback,options) {
if(!filename) {
filename = "tiddlywiki.html";
}
if(!type) {
type = "text/html";
}
// Set up the link
var link = document.createElement("a");
if(Blob !== undefined) {
var blob = new Blob([text], {type: "text/html"});
var blob = new Blob([text], {type: type});
link.setAttribute("href", URL.createObjectURL(blob));
} else {
link.setAttribute("href","data:text/html," + encodeURIComponent(text));
link.setAttribute("href","data:" + type + "," + encodeURIComponent(text));
}
link.setAttribute("download",filename);
document.body.appendChild(link);

View File

@ -20,7 +20,7 @@ Retrieve ETag if available
*/
var retrieveETag = function(self) {
var headers = {
Accept: "*/*;charset=UTF-8"
Accept: "*/*"
};
$tw.utils.httpRequest({
url: self.uri(),
@ -48,14 +48,14 @@ var PutSaver = function(wiki) {
var self = this;
var uri = this.uri();
// Async server probe. Until probe finishes, save will fail fast
// See also https://github.com/Jermolene/TiddlyWiki5/issues/2276
// See also https://github.com/TiddlyWiki/TiddlyWiki5/issues/2276
$tw.utils.httpRequest({
url: uri,
type: "OPTIONS",
callback: function(err,data,xhr) {
// Check DAV header http://www.webdav.org/specs/rfc2518.html#rfc.section.9.1
if(!err) {
self.serverAcceptsPuts = xhr.status === 200 && !!xhr.getResponseHeader("dav");
self.serverAcceptsPuts = xhr.status >= 200 && xhr.status < 300 && !!xhr.getResponseHeader("dav");
}
}
});

View File

@ -24,7 +24,7 @@ exports.handler = function(request,response,state) {
response.end();
} else {
// Redirect to the root wiki if login worked
var location = ($tw.syncadaptor && $tw.syncadaptor.host)? $tw.syncadaptor.host: "/";
var location = ($tw.syncadaptor && $tw.syncadaptor.host)? $tw.syncadaptor.host: `${state.pathPrefix}/`;
response.writeHead(302,{
Location: location
});

View File

@ -61,7 +61,7 @@ exports.startup = function() {
// Collect the shadow tiddlers of any modified plugins
$tw.utils.each(changes.modifiedPlugins,function(pluginTitle) {
var pluginInfo = $tw.wiki.getPluginInfo(pluginTitle);
if(pluginInfo) {
if(pluginInfo && pluginInfo.tiddlers) {
$tw.utils.each(Object.keys(pluginInfo.tiddlers),function(title) {
changedShadowTiddlers[title] = false;
});
@ -75,7 +75,7 @@ exports.startup = function() {
$tw.wiki.unpackPluginTiddlers();
// Queue change events for the changed shadow tiddlers
$tw.utils.each(Object.keys(changedShadowTiddlers),function(title) {
$tw.wiki.enqueueTiddlerEvent(title,changedShadowTiddlers[title]);
$tw.wiki.enqueueTiddlerEvent(title,changedShadowTiddlers[title], true);
});
}
}

View File

@ -52,7 +52,9 @@ exports.startup = function() {
basicAuthUsername: params["basic-auth-username"],
basicAuthUsernameFromStore: params["basic-auth-username-from-store"],
basicAuthPassword: params["basic-auth-password"],
basicAuthPasswordFromStore: params["basic-auth-password-from-store"]
basicAuthPasswordFromStore: params["basic-auth-password-from-store"],
bearerAuthToken: params["bearer-auth-token"],
bearerAuthTokenFromStore: params["bearer-auth-token-from-store"]
});
});
$tw.rootWidget.addEventListener("tm-http-cancel-all-requests",function(event) {
@ -75,8 +77,9 @@ exports.startup = function() {
$tw.rootWidget.addEventListener("tm-copy-to-clipboard",function(event) {
$tw.utils.copyToClipboard(event.param,{
successNotification: event.paramObject && event.paramObject.successNotification,
failureNotification: event.paramObject && event.paramObject.failureNotification
});
failureNotification: event.paramObject && event.paramObject.failureNotification,
plainText: event.paramObject && event.paramObject.plainText
},event.paramObject && event.paramObject.type);
});
// Install the tm-focus-selector message
$tw.rootWidget.addEventListener("tm-focus-selector",function(event) {

View File

@ -67,14 +67,6 @@ exports.startup = function() {
wiki: $tw.wiki,
document: $tw.browser ? document : $tw.fakeDocument
});
// Execute any startup actions
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction");
if($tw.browser) {
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Browser");
}
if($tw.node) {
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Node");
}
// Kick off the language manager and switcher
$tw.language = new $tw.Language();
$tw.languageSwitcher = new $tw.PluginSwitcher({
@ -88,8 +80,10 @@ exports.startup = function() {
if($tw.browser) {
var pluginTiddler = $tw.wiki.getTiddler(plugins[0]);
if(pluginTiddler) {
document.documentElement.setAttribute("lang",pluginTiddler.getFieldString("name"));
document.documentElement.setAttribute("dir",pluginTiddler.getFieldString("text-direction") || "auto");
} else {
document.documentElement.setAttribute("lang","en-GB");
document.documentElement.removeAttribute("dir");
}
}
@ -115,6 +109,14 @@ exports.startup = function() {
handlerMethod: "handleKeydownEvent"
}]);
}
// Execute any startup actions
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction");
if($tw.browser) {
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Browser");
}
if($tw.node) {
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Node");
}
// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup
$tw.wiki.clearTiddlerEventQueue();
// Find a working syncadaptor

View File

@ -30,12 +30,8 @@ ClassicStoryView.prototype.navigateTo = function(historyInfo) {
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
return;
}
if(duration) {
// Scroll the node into view
this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
} else {
targetElement.scrollIntoView();
}
// Scroll the node into view
this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
};
ClassicStoryView.prototype.insert = function(widget) {
@ -82,6 +78,10 @@ ClassicStoryView.prototype.remove = function(widget) {
removeElement = function() {
widget.removeChildDomNodes();
};
// Blur the focus if it is within the descendents of the node we are removing
if($tw.utils.domContains(targetElement,targetElement.ownerDocument.activeElement)) {
targetElement.ownerDocument.activeElement.blur();
}
// Abandon if the list entry isn't a DOM element (it might be a text node)
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
removeElement();

View File

@ -40,10 +40,10 @@ exports.getFieldString = function(field,defaultValue) {
};
/*
Get the value of a field as a list
Get the value of a field as an array / list
*/
exports.getFieldList = function(field) {
var value = this.fields[field];
var value = this.getFieldString(field,null);
// Check for a missing field
if(value === undefined || value === null) {
return [];

View File

@ -12,7 +12,7 @@ Upgrader module that suppresses certain system tiddlers that shouldn't be import
/*global $tw: false */
"use strict";
var DONT_IMPORT_LIST = ["$:/Import"],
var DONT_IMPORT_LIST = ["$:/Import", "$:/build"],
UNSELECT_PREFIX_LIST = ["$:/temp/","$:/state/","$:/StoryList","$:/HistoryList"],
WARN_IMPORT_PREFIX_LIST = ["$:/core/modules/"];

View File

@ -268,8 +268,10 @@ exports.copyStyles = function(srcDomNode,dstDomNode) {
/*
Copy plain text to the clipboard on browsers that support it
*/
exports.copyToClipboard = function(text,options) {
options = options || {};
exports.copyToClipboard = function(text,options,type) {
var text = text || "";
var options = options || {};
var type = type || "text/plain";
var textArea = document.createElement("textarea");
textArea.style.position = "fixed";
textArea.style.top = 0;
@ -282,10 +284,16 @@ exports.copyToClipboard = function(text,options) {
textArea.style.outline = "none";
textArea.style.boxShadow = "none";
textArea.style.background = "transparent";
textArea.value = text;
document.body.appendChild(textArea);
textArea.select();
textArea.setSelectionRange(0,text.length);
textArea.addEventListener("copy",function(event) {
event.preventDefault();
if (options.plainText) {
event.clipboardData.setData("text/plain",options.plainText);
}
event.clipboardData.setData(type,text);
});
var succeeded = false;
try {
succeeded = document.execCommand("copy");

View File

@ -104,6 +104,8 @@ basicAuthUsername: plain username for basic authentication
basicAuthUsernameFromStore: name of password store entry containing username
basicAuthPassword: plain password for basic authentication
basicAuthPasswordFromStore: name of password store entry containing password
bearerAuthToken: plain text token for bearer authentication
bearerAuthTokenFromStore: name of password store entry contain bear authorization token
*/
function HttpClientRequest(options) {
var self = this;
@ -135,8 +137,11 @@ function HttpClientRequest(options) {
});
this.basicAuthUsername = options.basicAuthUsername || (options.basicAuthUsernameFromStore && $tw.utils.getPassword(options.basicAuthUsernameFromStore)) || "";
this.basicAuthPassword = options.basicAuthPassword || (options.basicAuthPasswordFromStore && $tw.utils.getPassword(options.basicAuthPasswordFromStore)) || "";
this.bearerAuthToken = options.bearerAuthToken || (options.bearerAuthTokenFromStore && $tw.utils.getPassword(options.bearerAuthTokenFromStore)) || "";
if(this.basicAuthUsername && this.basicAuthPassword) {
this.requestHeaders.Authorization = "Basic " + $tw.utils.base64Encode(this.basicAuthUsername + ":" + this.basicAuthPassword);
} else if(this.bearerAuthToken) {
this.requestHeaders.Authorization = "Bearer " + this.bearerAuthToken;
}
}
@ -211,11 +216,11 @@ HttpClientRequest.prototype.send = function(callback) {
if(lengthComputable) {
setBinding(self.bindProgress,"" + Math.floor((loaded/total) * 100))
}
self.wiki.invokeActionString(self.progressActions,undefined,{
self.wiki.invokeActionString(self.progressActions,undefined,$tw.utils.extend({},self.variables,{
lengthComputable: lengthComputable ? "yes" : "no",
loaded: loaded,
total: total
},{parentWidget: $tw.rootWidget});
}),{parentWidget: $tw.rootWidget});
}
});
}

View File

@ -29,10 +29,14 @@ exports.getEditionInfo = function() {
for(var entryIndex=0; entryIndex<entries.length; entryIndex++) {
var entry = entries[entryIndex];
// Check if directories have a valid tiddlywiki.info
if(!editionInfo[entry] && $tw.utils.isDirectory(path.resolve(editionPath,entry))) {
var info = $tw.utils.parseJSONSafe(fs.readFileSync(path.resolve(editionPath,entry,"tiddlywiki.info"),"utf8"),null);
if(info) {
editionInfo[entry] = info;
// Check if the entry is a hidden directory
if((entry.charAt(0) !== ".") && !editionInfo[entry] && $tw.utils.isDirectory(path.resolve(editionPath,entry))) {
var file=path.resolve(editionPath,entry,"tiddlywiki.info");
if(fs.existsSync(file)) {
var info = $tw.utils.parseJSONSafe(fs.readFileSync(file,"utf8"),null);
if(info) {
editionInfo[entry] = info;
}
}
}
}

View File

@ -56,36 +56,64 @@ Object.defineProperty(TW_TextNode.prototype, "formattedTextContent", {
}
});
var TW_Element = function(tag,namespace) {
var TW_Style = function(el) {
// Define the internal style object
var styleObject = {
// Method to get the entire style object
get: function() {
return el._style;
},
// Method to set styles using a string (e.g. "color:red; background-color:blue;")
set: function(str) {
var self = this;
str = str || "";
$tw.utils.each(str.split(";"),function(declaration) {
var parts = declaration.split(":"),
name = $tw.utils.trim(parts[0]),
value = $tw.utils.trim(parts[1]);
if(name && value) {
el._style[$tw.utils.convertStyleNameToPropertyName(name)] = value;
}
});
},
// Method to set a specific property without transforming the property name, such as a custom property
setProperty: function(name, value) {
el._style[name] = value;
}
};
// Return a Proxy to handle direct access to individual style properties
return new Proxy(styleObject, {
get: function(target, property) {
// If the property exists on styleObject, return it (get, set, setProperty methods)
if (property in target) {
return target[property];
}
// Otherwise, return the corresponding property from _style
return el._style[$tw.utils.convertStyleNameToPropertyName(property)] || "";
},
set: function(target, property, value) {
// Set the property in _style
el._style[$tw.utils.convertStyleNameToPropertyName(property)] = value;
return true;
}
});
};
var TW_Element = function(tag, namespace) {
bumpSequenceNumber(this);
this.isTiddlyWikiFakeDom = true;
this.tag = tag;
this.attributes = {};
this.isRaw = false;
this.children = [];
this._style = {};
this._style = {}; // Internal style object
this.style = new TW_Style(this); // Proxy for style management
this.namespaceURI = namespace || "http://www.w3.org/1999/xhtml";
};
Object.setPrototypeOf(TW_Element.prototype,TW_Node.prototype);
Object.defineProperty(TW_Element.prototype, "style", {
get: function() {
return this._style;
},
set: function(str) {
var self = this;
str = str || "";
$tw.utils.each(str.split(";"),function(declaration) {
var parts = declaration.split(":"),
name = $tw.utils.trim(parts[0]),
value = $tw.utils.trim(parts[1]);
if(name && value) {
self._style[$tw.utils.convertStyleNameToPropertyName(name)] = value;
}
});
}
});
Object.setPrototypeOf(TW_Element.prototype,TW_Node.prototype);
Object.defineProperty(TW_Element.prototype, "nodeType", {
get: function() {
@ -105,7 +133,7 @@ TW_Element.prototype.setAttribute = function(name,value) {
throw "Cannot setAttribute on a raw TW_Element";
}
if(name === "style") {
this.style = value;
this.style.set(value);
} else {
this.attributes[name] = value + "";
}

View File

@ -238,7 +238,7 @@ exports.generateTiddlerFileInfo = function(tiddler,options) {
} else {
// Save as a .tid or a text/binary file plus a .meta file
var tiddlerType = tiddler.fields.type || "text/vnd.tiddlywiki";
if(tiddlerType === "text/vnd.tiddlywiki" || tiddler.hasField("_canonical_uri")) {
if(tiddlerType === "text/vnd.tiddlywiki" || tiddlerType === "text/vnd.tiddlywiki-multiple" || tiddler.hasField("_canonical_uri")) {
// Save as a .tid file
fileInfo.type = "application/x-tiddler";
fileInfo.hasMetaFile = false;

View File

@ -924,7 +924,7 @@ exports.transliterate = function(str) {
};
exports.transliterateToSafeASCII = function(str) {
return str.replace(/[^\x00-\x7F]/g,function(ch) {
return str.replace(/[^\x20-\x7F]/g,function(ch) {
return exports.transliterationPairs[ch] || ""
});
};

View File

@ -330,16 +330,18 @@ exports.formatTitleString = function(template,options) {
}]
];
while(t.length){
var matchString = "";
var matchString = "",
found = false;
$tw.utils.each(matches, function(m) {
var match = m[0].exec(t);
if(match) {
found = true;
matchString = m[1].call(null,match);
t = t.substr(match[0].length);
return false;
}
});
if(matchString) {
if(found) {
result += matchString;
} else {
result += t.charAt(0);

View File

@ -42,6 +42,9 @@ BrowseWidget.prototype.render = function(parent,nextSibling) {
if(this.tooltip) {
domNode.setAttribute("title",this.tooltip);
}
if(this.tabIndex) {
domNode.setAttribute("tabindex", this.tabIndex);
}
// Nw.js supports "nwsaveas" to force a "save as" dialogue that allows a new or existing file to be selected
if(this.nwsaveas) {
domNode.setAttribute("nwsaveas",this.nwsaveas);
@ -56,6 +59,9 @@ BrowseWidget.prototype.render = function(parent,nextSibling) {
if(this.nwdirectory) {
domNode.setAttribute("nwdirectory",this.nwdirectory);
}
if(this.isDisabled === "yes") {
domNode.setAttribute("disabled", true);
}
// Add a click event handler
domNode.addEventListener("change",function (event) {
if(self.message) {
@ -94,6 +100,8 @@ BrowseWidget.prototype.execute = function() {
this.accept = this.getAttribute("accept");
this.webkitdirectory = this.getAttribute("webkitdirectory");
this.nwdirectory = this.getAttribute("nwdirectory");
this.tabIndex = this.getAttribute("tabindex");
this.isDisabled = this.getAttribute("disabled", "no");
};
/*

View File

@ -47,6 +47,9 @@ CheckboxWidget.prototype.render = function(parent,nextSibling) {
if(isChecked === undefined && this.checkboxIndeterminate === "yes") {
this.inputDomNode.indeterminate = true;
}
if(this.tabIndex) {
this.inputDomNode.setAttribute("tabindex", this.tabIndex);
}
if(this.isDisabled === "yes") {
this.inputDomNode.setAttribute("disabled",true);
}
@ -154,7 +157,7 @@ CheckboxWidget.prototype.getValue = function() {
if(this.checkboxTag) {
return false;
}
if(this.checkboxField) {
if(this.checkboxField || this.checkboxIndex) {
if(this.checkboxDefault === this.checkboxChecked) {
return true;
}
@ -305,6 +308,7 @@ CheckboxWidget.prototype.execute = function() {
this.checkboxClass = this.getAttribute("class","");
this.checkboxInvertTag = this.getAttribute("invertTag","");
this.isDisabled = this.getAttribute("disabled","no");
this.tabIndex = this.getAttribute();
// Make the child widgets
this.makeChildWidgets();
};
@ -314,7 +318,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/
CheckboxWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.tiddler || changedAttributes.tag || changedAttributes.invertTag || changedAttributes.field || changedAttributes.index || changedAttributes.listField || changedAttributes.listIndex || changedAttributes.filter || changedAttributes.checked || changedAttributes.unchecked || changedAttributes["default"] || changedAttributes.indeterminate || changedAttributes["class"] || changedAttributes.disabled) {
if(changedAttributes.tiddler || changedAttributes.tag || changedAttributes.invertTag || changedAttributes.field || changedAttributes.index || changedAttributes.listField || changedAttributes.listIndex || changedAttributes.filter || changedAttributes.checked || changedAttributes.unchecked || changedAttributes["default"] || changedAttributes.indeterminate || changedAttributes["class"] || changedAttributes.disabled || changedAttributes.tabindex) {
this.refreshSelf();
return true;
} else {

View File

@ -75,7 +75,9 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
}
});
// Deal with $tiddler, $filter or $compound-tiddler attributes
var tiddlers = [],title;
var tiddlers = [],
compoundTiddlers,
title;
if(this.hasAttribute("$tiddler")) {
title = this.getAttribute("$tiddler");
if(title) {
@ -91,7 +93,9 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
var titles = this.wiki.filterTiddlers(filter);
$tw.utils.each(titles,function(title) {
var tiddler = self.wiki.getTiddler(title);
tiddlers.push(tiddler);
if(tiddler) {
tiddlers.push(tiddler);
}
});
}
}
@ -101,8 +105,17 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
tiddlers.push.apply(tiddlers,this.extractCompoundTiddler(title));
}
}
if(this.hasAttribute("$compound-filter")) {
filter = this.getAttribute("$compound-filter");
if(filter) {
compoundTiddlers = this.wiki.filterTiddlers(filter);
$tw.utils.each(compoundTiddlers, function(title){
tiddlers.push.apply(tiddlers,self.extractCompoundTiddler(title));
});
}
}
// Return the literal item if none of the special attributes were used
if(!this.hasAttribute("$tiddler") && !this.hasAttribute("$filter") && !this.hasAttribute("$compound-tiddler")) {
if(!this.hasAttribute("$tiddler") && !this.hasAttribute("$filter") && !this.hasAttribute("$compound-tiddler") && !this.hasAttribute("$compound-filter")) {
if(Object.keys(item).length > 0 && !!item.title) {
return [new $tw.Tiddler(item)];
} else {
@ -110,7 +123,6 @@ DataWidget.prototype.computeDataTiddlerValues = function() {
}
} else {
// Apply the item fields to each of the tiddlers
delete item.title; // Do not overwrite the title
if(Object.keys(item).length > 0) {
$tw.utils.each(tiddlers,function(tiddler,index) {
tiddlers[index] = new $tw.Tiddler(tiddler,item);

View File

@ -125,11 +125,23 @@ DroppableWidget.prototype.handleDropEvent = function(event) {
// Remove highlighting
$tw.utils.removeClass(this.domNodes[0],"tc-dragover");
// Try to import the various data types we understand
$tw.utils.importDataTransfer(dataTransfer,null,function(fieldsArray) {
fieldsArray.forEach(function(fields) {
self.performActions(fields.title || fields.text,event);
if(this.droppableActions) {
$tw.utils.importDataTransfer(dataTransfer,null,function(fieldsArray) {
fieldsArray.forEach(function(fields) {
self.performActions(fields.title || fields.text,event);
});
});
});
}
// Send a TitleList to performListActions
if(this.droppableListActions) {
$tw.utils.importDataTransfer(dataTransfer,null,function(fieldsArray) {
var titleList = [];
fieldsArray.forEach(function(fields) {
titleList.push(fields.title || fields.text);
});
self.performListActions($tw.utils.stringifyList(titleList),event);
});
}
// Tell the browser that we handled the drop
event.preventDefault();
// Stop the drop ripple up to any parent handlers
@ -137,6 +149,13 @@ DroppableWidget.prototype.handleDropEvent = function(event) {
return false;
};
DroppableWidget.prototype.performListActions = function(titleList,event) {
if(this.droppableListActions) {
var modifierKey = $tw.keyboardManager.getEventModifierKeyDescriptor(event);
this.invokeActionString(this.droppableListActions,this,event,{actionTiddlerList: titleList, modifier: modifierKey});
}
};
DroppableWidget.prototype.performActions = function(title,event) {
if(this.droppableActions) {
var modifierKey = $tw.keyboardManager.getEventModifierKeyDescriptor(event);
@ -149,6 +168,7 @@ Compute the internal state of the widget
*/
DroppableWidget.prototype.execute = function() {
this.droppableActions = this.getAttribute("actions");
this.droppableListActions = this.getAttribute("listActions");
this.droppableEffect = this.getAttribute("effect","copy");
this.droppableTag = this.getAttribute("tag");
this.droppableEnable = (this.getAttribute("enable") || "yes") === "yes";
@ -168,7 +188,8 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/
DroppableWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.tag || changedAttributes.enable || changedAttributes.disabledClass || changedAttributes.actions || changedAttributes.effect) {
if(changedAttributes.tag || changedAttributes.enable || changedAttributes.disabledClass ||
changedAttributes.actions|| changedAttributes.listActions || changedAttributes.effect) {
this.refreshSelf();
return true;
} else {

View File

@ -48,6 +48,9 @@ EditShortcutWidget.prototype.render = function(parent,nextSibling) {
if(this.shortcutAriaLabel) {
this.inputNode.setAttribute("aria-label",this.shortcutAriaLabel);
}
if(this.isDisabled === "yes") {
this.inputNode.setAttribute("disabled", true);
}
// Assign the current shortcut
this.updateInputNode();
// Add event handlers
@ -77,6 +80,7 @@ EditShortcutWidget.prototype.execute = function() {
this.shortcutTooltip = this.getAttribute("tooltip");
this.shortcutAriaLabel = this.getAttribute("aria-label");
this.shortcutFocus = this.getAttribute("focus");
this.isDisabled = this.getAttribute("disabled", "no");
};
/*
@ -138,7 +142,7 @@ Selectively refreshes the widget if needed. Returns true if the widget needed re
*/
EditShortcutWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.placeholder || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.style || changedAttributes.tooltip || changedAttributes["aria-label"] || changedAttributes.focus) {
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.placeholder || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.style || changedAttributes.tooltip || changedAttributes["aria-label"] || changedAttributes.focus || changedAttributes.disabled) {
this.refreshSelf();
return true;
} else if(changedTiddlers[this.shortcutTiddler]) {

View File

@ -43,15 +43,6 @@ EditWidget.prototype.execute = function() {
// Get our parameters
this.editTitle = this.getAttribute("tiddler",this.getVariable("currentTiddler"));
this.editField = this.getAttribute("field","text");
this.editIndex = this.getAttribute("index");
this.editClass = this.getAttribute("class");
this.editPlaceholder = this.getAttribute("placeholder");
this.editTabIndex = this.getAttribute("tabindex");
this.editFocus = this.getAttribute("focus","");
this.editCancelPopups = this.getAttribute("cancelPopups","");
this.editInputActions = this.getAttribute("inputActions");
this.editRefreshTitle = this.getAttribute("refreshTitle");
this.editAutoComplete = this.getAttribute("autocomplete");
// Choose the appropriate edit widget
this.editorType = this.getEditorType();
// Make the child widgets
@ -89,8 +80,8 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
*/
EditWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
// Refresh if an attribute has changed, or the type associated with the target tiddler has changed
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || (this.getEditorType() !== this.editorType)) {
// Refresh if the editor type has changed
if(changedAttributes.tiddler || changedAttributes.field || (this.getEditorType() !== this.editorType)) {
this.refreshSelf();
return true;
} else {

View File

@ -24,6 +24,10 @@ Inherit from the base widget class
*/
FillWidget.prototype = new Widget();
FillWidget.prototype.execute = function() {
// Do nothing. Make no child widgets. $Fill widgets should be invisible when naturally encountered. Instead, their parseTreeNodes are made available to $slot widgets that want it.
};
exports.fill = FillWidget;

View File

@ -23,15 +23,21 @@ Inherit from the base widget class
*/
GenesisWidget.prototype = new Widget();
GenesisWidget.prototype.computeAttributes = function(options) {
options = options || Object.create(null);
options.filterFn = function(name) {
// Only compute our own attributes which start with a single dollar
return name.charAt(0) === "$" && name.charAt(1) !== "$";
}
return Widget.prototype.computeAttributes.call(this,options);
};
/*
Render this widget into the DOM
*/
GenesisWidget.prototype.render = function(parent,nextSibling) {
this.parentDomNode = parent;
this.computeAttributes({filterFn: function(name) {
// Only compute our own attributes which start with a single dollar
return name.charAt(0) === "$" && name.charAt(1) !== "$";
}});
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
};
@ -65,6 +71,16 @@ GenesisWidget.prototype.execute = function() {
children: this.parseTreeNode.children || [],
isNotRemappable: !this.genesisRemappable
}];
// Apply attributes in $names/$values
this.attributeNames = [];
this.attributeValues = [];
if(this.genesisNames && this.genesisValues) {
this.attributeNames = this.wiki.filterTiddlers(self.genesisNames,this);
this.attributeValues = this.wiki.filterTiddlers(self.genesisValues,this);
$tw.utils.each(this.attributeNames,function(varname,index) {
$tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],varname,self.attributeValues[index] || "");
});
}
// Apply explicit attributes
$tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(this.parseTreeNode),function(attribute) {
var name = attribute.name;
@ -79,16 +95,6 @@ GenesisWidget.prototype.execute = function() {
}
$tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],$tw.utils.extend({},attribute,{name: name}));
});
// Apply attributes in $names/$values
this.attributeNames = [];
this.attributeValues = [];
if(this.genesisNames && this.genesisValues) {
this.attributeNames = this.wiki.filterTiddlers(self.genesisNames,this);
this.attributeValues = this.wiki.filterTiddlers(self.genesisValues,this);
$tw.utils.each(this.attributeNames,function(varname,index) {
$tw.utils.addAttributeToParseTreeNode(parseTreeNodes[0],varname,self.attributeValues[index] || "");
});
}
// Construct the child widgets
this.makeChildWidgets(parseTreeNodes);
};

View File

@ -96,13 +96,15 @@ KeyboardWidget.prototype.execute = function() {
this.param = this.getAttribute("param","");
this.key = this.getAttribute("key","");
this.tag = this.getAttribute("tag","");
this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);
if(this.key.substr(0,2) === "((" && this.key.substr(-2,2) === "))") {
this.shortcutTiddlers = [];
var name = this.key.substring(2,this.key.length -2);
$tw.utils.each($tw.keyboardManager.lookupNames,function(platformDescriptor) {
self.shortcutTiddlers.push("$:/config/" + platformDescriptor + "/" + name);
});
if($tw.keyboardManager) {
this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);
if(this.key.substr(0,2) === "((" && this.key.substr(-2,2) === "))") {
this.shortcutTiddlers = [];
var name = this.key.substring(2,this.key.length -2);
$tw.utils.each($tw.keyboardManager.lookupNames,function(platformDescriptor) {
self.shortcutTiddlers.push("$:/config/" + platformDescriptor + "/" + name);
});
}
}
// Make child widgets
this.makeChildWidgets();
@ -126,7 +128,7 @@ KeyboardWidget.prototype.refresh = function(changedTiddlers) {
this.assignDomNodeClasses();
}
// Update the keyInfoArray if one of its shortcut-config-tiddlers has changed
if(this.shortcutTiddlers && $tw.utils.hopArray(changedTiddlers,this.shortcutTiddlers)) {
if(this.shortcutTiddlers && $tw.utils.hopArray(changedTiddlers,this.shortcutTiddlers) && $tw.keyboardManager) {
this.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);
}
return this.refreshChildren(changedTiddlers);

View File

@ -184,7 +184,7 @@ NavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {
// Place a tiddler in edit mode
NavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {
var editTiddler = $tw.hooks.invokeHook("th-editing-tiddler",event),
win = event.event && event.event.view ? event.event.view : window;
win = event.event && event.event.view ? event.event.view : window;
if(!editTiddler) {
return false;
}
@ -277,6 +277,8 @@ NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {
}
// Get the current value of the tiddler we're editing
var tiddler = this.wiki.getTiddler(targetTitle);
var defaultType = this.wiki.getTiddlerText("$:/config/DefaultMissingType", "").trim();
var defaultFields = { type: defaultType };
// Save the initial value of the draft tiddler
draftTitle = this.generateDraftTitle(targetTitle);
var draftTiddler = new $tw.Tiddler({
@ -288,7 +290,8 @@ NavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {
"draft.title": targetTitle,
"draft.of": targetTitle
},
this.wiki.getModificationFields()
this.wiki.getModificationFields(),
tiddler === null || tiddler === undefined ? defaultFields : {}
);
this.wiki.addTiddler(draftTiddler);
return draftTiddler;
@ -306,7 +309,7 @@ NavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {
var title = event.param || event.tiddlerTitle,
tiddler = this.wiki.getTiddler(title),
storyList = this.getStoryList(),
win = event.event && event.event.view ? event.event.view : window;
win = event.event && event.event.view ? event.event.view : window;
// Replace the original tiddler with the draft
if(tiddler) {
var draftTitle = (tiddler.fields["draft.title"] || "").trim(),
@ -412,7 +415,8 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
event = $tw.hooks.invokeHook("th-new-tiddler", event);
// Get the story details
var storyList = this.getStoryList(),
templateTiddler, additionalFields, title, draftTitle, existingTiddler;
templateTiddler, additionalFields, title, draftTitle, existingTiddler,
templateHasTags = false;
// Get the template tiddler (if any)
if(typeof event.param === "string") {
// Get the template tiddler
@ -457,8 +461,10 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
// Merge tags
mergedTags = $tw.utils.pushTop(mergedTags,$tw.utils.parseStringArray(additionalFields.tags));
}
var additionalFieldsHasTags = !!(additionalFields && (additionalFields.tags === ""));
if(templateTiddler && templateTiddler.fields.tags) {
// Merge tags
templateHasTags = true;
mergedTags = $tw.utils.pushTop(mergedTags,templateTiddler.fields.tags);
}
// Save the draft tiddler
@ -474,7 +480,8 @@ NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {
{
title: draftTitle,
"draft.of": title,
tags: mergedTags
// If template or additionalFields have "tags" even if empty a tags field will be created.
tags: ((mergedTags.length > 0) || templateHasTags || additionalFieldsHasTags) ? mergedTags : undefined
},this.wiki.getModificationFields());
this.wiki.addTiddler(draftTiddler);
// Update the story to insert the new draft at the top and remove any existing tiddler

View File

@ -47,6 +47,9 @@ RadioWidget.prototype.render = function(parent,nextSibling) {
if(isChecked) {
this.inputDomNode.checked = true;
}
if(this.tabIndex) {
this.inputDomNode.setAttribute("tabindex", this.tabIndex);
}
if(this.isDisabled === "yes") {
this.inputDomNode.setAttribute("disabled",true);
}
@ -111,6 +114,7 @@ RadioWidget.prototype.execute = function() {
this.radioClass = this.getAttribute("class","");
this.radioDefault = this.getAttribute("default");
this.isDisabled = this.getAttribute("disabled","no");
this.tabIndex = this.getAttribute("tabindex");
this.radioActions = this.getAttribute("actions","");
// Make the child widgets
this.makeChildWidgets();

View File

@ -46,6 +46,9 @@ RangeWidget.prototype.render = function(parent,nextSibling) {
if(this.increment){
this.inputDomNode.setAttribute("step", this.increment);
}
if(this.tabIndex) {
this.inputDomNode.setAttribute("tabindex", this.tabIndex);
}
if(this.isDisabled === "yes") {
this.inputDomNode.setAttribute("disabled",true);
}
@ -164,6 +167,7 @@ RangeWidget.prototype.execute = function() {
this.defaultValue = this.getAttribute("default","");
this.elementClass = this.getAttribute("class","");
this.isDisabled = this.getAttribute("disabled","no");
this.tabIndex = this.getAttribute("tabindex");
// Actions since 5.1.23
// Next 2 only fire once!
this.actionsMouseDown = this.getAttribute("actionsStart","");

View File

@ -53,6 +53,9 @@ SelectWidget.prototype.render = function(parent,nextSibling) {
if(this.selectMultiple) {
domNode.setAttribute("multiple","multiple");
}
if(this.isDisabled === "yes") {
domNode.setAttribute("disabled", true);
}
if(this.selectSize) {
domNode.setAttribute("size",this.selectSize);
}
@ -172,6 +175,7 @@ SelectWidget.prototype.execute = function() {
this.selectTabindex = this.getAttribute("tabindex");
this.selectTooltip = this.getAttribute("tooltip");
this.selectFocus = this.getAttribute("focus");
this.isDisabled = this.getAttribute("disabled","no");
// Make the child widgets
this.makeChildWidgets();
};
@ -182,7 +186,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of
SelectWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
// If we're using a different tiddler/field/index then completely refresh ourselves
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tooltip || changedAttributes.tabindex) {
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.tooltip || changedAttributes.tabindex || changedAttributes.disabled) {
this.refreshSelf();
return true;
} else {

View File

@ -33,6 +33,7 @@ TestCaseWidget.prototype.render = function(parent,nextSibling) {
this.execute();
// Create container DOM node
var domNode = this.document.createElement("div");
domNode.setAttribute("class", "tc-test-case " + this.testcaseClass);
this.domNodes.push(domNode);
parent.insertBefore(domNode,nextSibling);
// Render the children into a hidden DOM node
@ -145,6 +146,7 @@ TestCaseWidget.prototype.execute = function() {
this.testcaseTestActions = this.getAttribute("testActions");
this.testcaseTestExpectedResult = this.getAttribute("testExpectedResult");
this.testcaseHideIfPass = this.getAttribute("testHideIfPass");
this.testcaseClass = this.getAttribute("class","");
};
/*

View File

@ -101,6 +101,7 @@ TranscludeWidget.prototype.execute = function() {
}
this.sourceText = target.text;
this.parserType = target.type;
this._canonical_uri = target._canonical_uri;
// Set the legacy transclusion context variables only if we're not transcluding a variable
if(!this.transcludeVariable) {
var recursionMarker = this.makeRecursionMarker();
@ -228,7 +229,8 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
});
return {
text: parserInfo.text,
type: parserInfo.type
type: parserInfo.type,
_canonical_uri: parserInfo._canonical_uri
};
}
};
@ -455,8 +457,11 @@ TranscludeWidget.prototype.makeRecursionMarker = function() {
TranscludeWidget.prototype.parserNeedsRefresh = function() {
// Doesn't need to consider transcluded variables because a parent variable can't change once a widget has been created
var parserInfo = this.wiki.getTextReferenceParserInfo(this.transcludeTitle,this.transcludeField,this.transcludeIndex,{subTiddler:this.transcludeSubTiddler});
return (this.sourceText === undefined || parserInfo.sourceText !== this.sourceText || parserInfo.parserType !== this.parserType)
var parserInfo = this.wiki.getTextReferenceParserInfo(this.transcludeTitle,this.transcludeField,this.transcludeIndex,{
subTiddler: this.transcludeSubTiddler,
defaultType: this.transcludeType
});
return (this.sourceText === undefined || parserInfo.sourceText !== this.sourceText || parserInfo.parserType !== this.parserType || parserInfo._canonical_uri !== this._canonical_uri);
};
TranscludeWidget.prototype.functionNeedsRefresh = function() {

View File

@ -335,7 +335,7 @@ Widget.prototype.makeFakeWidgetWithVariables = function(variables) {
};
} else {
opts = opts || {};
opts.variables = $tw.utils.extend(variables,opts.variables);
opts.variables = $tw.utils.extend({},variables,opts.variables);
return self.getVariableInfo(name,opts);
};
},
@ -428,6 +428,11 @@ Widget.prototype.assignAttributes = function(domNode,options) {
destPrefix = options.destPrefix || "",
EVENT_ATTRIBUTE_PREFIX = "on";
var assignAttribute = function(name,value) {
// Process any CSS custom properties
if(name.substr(0,2) === "--" && name.length > 2) {
domNode.style.setProperty(name,value);
return;
}
// Process any style attributes before considering sourcePrefix and destPrefix
if(name.substr(0,6) === "style." && name.length > 6) {
domNode.style[$tw.utils.unHyphenateCss(name.substr(6))] = value;

View File

@ -141,12 +141,15 @@ This method should be called after the changes it describes have been made to th
title: Title of tiddler
isDeleted: defaults to false (meaning the tiddler has been created or modified),
true if the tiddler has been deleted
isShadow: defaults to false (meaning the change applies to the normal tiddler),
true if the tiddler being changed is a shadow tiddler
*/
exports.enqueueTiddlerEvent = function(title,isDeleted) {
exports.enqueueTiddlerEvent = function(title,isDeleted,isShadow) {
// Record the touch in the list of changed tiddlers
this.changedTiddlers = this.changedTiddlers || Object.create(null);
this.changedTiddlers[title] = this.changedTiddlers[title] || Object.create(null);
this.changedTiddlers[title][isDeleted ? "deleted" : "modified"] = true;
this.changedTiddlers[title][isShadow ? "shadow" : "normal"] = true;
// Increment the change count
this.changeCount = this.changeCount || Object.create(null);
if($tw.utils.hop(this.changeCount,title)) {
@ -194,18 +197,23 @@ options.prefix must be a string
*/
exports.generateNewTitle = function(baseTitle,options) {
options = options || {};
var c = 0,
title = baseTitle,
template = options.template,
var title = baseTitle,
template = options.template || "",
// test if .startCount is a positive integer. If not set to 0
c = (parseInt(options.startCount,10) > 0) ? parseInt(options.startCount,10) : 0,
prefix = (typeof(options.prefix) === "string") ? options.prefix : " ";
if(template) {
// "count" is important to avoid an endless loop in while(...)!!
template = (/\$count:?(\d+)?\$/i.test(template)) ? template : template + "$count$";
title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":c});
// .formatTitleString() expects strings as input
title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":c+""});
while(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) {
title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":(++c)});
title = $tw.utils.formatTitleString(template,{"base":baseTitle,"separator":prefix,"counter":(++c)+""});
}
} else {
if (c > 0) {
title = baseTitle + prefix + c;
}
while(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) {
title = baseTitle + prefix + (++c);
}
@ -551,28 +559,45 @@ exports.getTiddlerBacklinks = function(targetTitle) {
/*
Return an array of tiddler titles that are directly transcluded within the given parse tree
Return an array of tiddler titles that are directly transcluded within the given parse tree. `title` is the tiddler being parsed, we will ignore its self-referential transclusions, only return
*/
exports.extractTranscludes = function(parseTreeRoot) {
exports.extractTranscludes = function(parseTreeRoot, title) {
// Count up the transcludes
var transcludes = [],
checkParseTree = function(parseTree, parentNode) {
for(var t=0; t<parseTree.length; t++) {
var parseTreeNode = parseTree[t];
if(parseTreeNode.type === "transclude" && parseTreeNode.attributes.$tiddler && parseTreeNode.attributes.$tiddler.type === "string") {
var value;
// if it is Transclusion with Templates like `{{Index||$:/core/ui/TagTemplate}}`, the `$tiddler` will point to the template. We need to find the actual target tiddler from parent node
if(parentNode && parentNode.type === "tiddler" && parentNode.attributes.tiddler && parentNode.attributes.tiddler.type === "string") {
value = parentNode.attributes.tiddler.value;
} else {
value = parseTreeNode.attributes.$tiddler.value;
if(parseTreeNode.type === "transclude") {
if(parseTreeNode.attributes.$tiddler) {
if(parseTreeNode.attributes.$tiddler.type === "string") {
var value;
// if it is Transclusion with Templates like `{{Index||$:/core/ui/TagTemplate}}`, the `$tiddler` will point to the template. We need to find the actual target tiddler from parent node
if(parentNode && parentNode.type === "tiddler" && parentNode.attributes.tiddler && parentNode.attributes.tiddler.type === "string") {
// Empty value (like `{{!!field}}`) means self-referential transclusion.
value = parentNode.attributes.tiddler.value || title;
} else {
value = parseTreeNode.attributes.$tiddler.value;
}
}
} else if(parseTreeNode.attributes.tiddler) {
if (parseTreeNode.attributes.tiddler.type === "string") {
// Old transclude widget usage
value = parseTreeNode.attributes.tiddler.value;
}
} else if(parseTreeNode.attributes.$field && parseTreeNode.attributes.$field.type === "string") {
// Empty value (like `<$transclude $field='created'/>`) means self-referential transclusion.
value = title;
} else if(parseTreeNode.attributes.field && parseTreeNode.attributes.field.type === "string") {
// Old usage with Empty value (like `<$transclude field='created'/>`)
value = title;
}
if(transcludes.indexOf(value) === -1 && value !== undefined) {
transcludes.push(value);
// Deduplicate the result.
if(value && transcludes.indexOf(value) === -1) {
$tw.utils.pushTop(transcludes,value);
}
}
if(parseTreeNode.children) {
checkParseTree(parseTreeNode.children, parseTreeNode);
checkParseTree(parseTreeNode.children,parseTreeNode);
}
}
};
@ -591,7 +616,8 @@ exports.getTiddlerTranscludes = function(title) {
// Parse the tiddler
var parser = self.parseTiddler(title);
if(parser) {
return self.extractTranscludes(parser.tree);
// this will ignore self-referential transclusions from `title`
return self.extractTranscludes(parser.tree,title);
}
return [];
});
@ -1108,6 +1134,7 @@ exports.getTextReferenceParserInfo = function(title,field,index,options) {
if(tiddler.fields.type) {
parserInfo.parserType = tiddler.fields.type;
}
parserInfo._canonical_uri = tiddler.fields._canonical_uri;
}
} else if(field) {
if(field === "title") {

View File

@ -33,6 +33,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
footnote-target-background: #ecf2ff
foreground: #333333
highlight-background: #ffff00
highlight-foreground: #000000

View File

@ -33,6 +33,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
footnote-target-background: #ecf2ff
foreground: #333353
highlight-background: #ffff00
highlight-foreground: #000000

View File

@ -33,6 +33,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
footnote-target-background: #ecf2ff
foreground: #333333
highlight-background: #ffff00
highlight-foreground: #000000

View File

@ -1,7 +1,7 @@
title: $:/palettes/ContrastLight
name: Contrast (Light)
color-scheme: light
description: High contrast and unambiguous (light version)
title: $:/palettes/ContrastDark
name: Contrast (Dark)
color-scheme: dark
description: High contrast and unambiguous (dark version)
tags: $:/tags/Palette
type: application/x-tiddler-dictionary
@ -9,7 +9,7 @@ alert-background: #f00
alert-border: <<colour background>>
alert-highlight: <<colour foreground>>
alert-muted-foreground: #800
background: #fff
background: #000
blockquote-bar: <<colour muted-foreground>>
button-background: <<colour background>>
button-foreground: <<colour foreground>>
@ -33,7 +33,8 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #00a
external-link-foreground: #00e
foreground: #000
footnote-target-background: #4c4c4c
foreground: #fff
highlight-background: #ffff00
highlight-foreground: #000000
message-background: <<colour foreground>>
@ -82,8 +83,8 @@ tab-foreground: <<colour background>>
table-border: #dddddd
table-footer-background: #a8a8a8
table-header-background: #f0f0f0
tag-background: #000
tag-foreground: #fff
tag-background: #fff
tag-foreground: #000
tiddler-background: <<colour background>>
tiddler-border: <<colour foreground>>
tiddler-controls-foreground-hover: #ddd

View File

@ -1,7 +1,7 @@
title: $:/palettes/ContrastDark
name: Contrast (Dark)
color-scheme: dark
description: High contrast and unambiguous (dark version)
title: $:/palettes/ContrastLight
name: Contrast (Light)
color-scheme: light
description: High contrast and unambiguous (light version)
tags: $:/tags/Palette
type: application/x-tiddler-dictionary
@ -9,7 +9,7 @@ alert-background: #f00
alert-border: <<colour background>>
alert-highlight: <<colour foreground>>
alert-muted-foreground: #800
background: #000
background: #fff
blockquote-bar: <<colour muted-foreground>>
button-background: <<colour background>>
button-foreground: <<colour foreground>>
@ -33,7 +33,8 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #00a
external-link-foreground: #00e
foreground: #fff
footnote-target-background: #e5e5e5
foreground: #000
highlight-background: #ffff00
highlight-foreground: #000000
message-background: <<colour foreground>>
@ -82,8 +83,8 @@ tab-foreground: <<colour background>>
table-border: #dddddd
table-footer-background: #a8a8a8
table-header-background: #f0f0f0
tag-background: #fff
tag-foreground: #000
tag-background: #000
tag-foreground: #fff
tiddler-background: <<colour background>>
tiddler-border: <<colour foreground>>
tiddler-controls-foreground-hover: #ddd

View File

@ -31,6 +31,7 @@ external-link-background: transparent
external-link-foreground-hover:
external-link-foreground-visited: #BF5AF2
external-link-foreground: #32D74B
footnote-target-background: #747474
foreground: #FFFFFF
highlight-background: #ffff78
highlight-foreground: #000000

View File

@ -35,6 +35,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
footnote-target-background: #ecf2ff
foreground: #333333
highlight-background: #ffff00
highlight-foreground: #000000

View File

@ -39,6 +39,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #313163
external-link-foreground: #555592
footnote-target-background: #fff7d9
foreground: #2D2A23
highlight-background: #ffff00
highlight-foreground: #000000

View File

@ -0,0 +1,212 @@
color-scheme: dark
description: An inky color scheme for prose and code
name: FlexokiDark
tags: $:/tags/Palette
title: $:/palettes/FlexokiDark
type: application/x-tiddler-dictionary
flexoki-paper: #FFFCF0
flexoki-999: #100F0F
flexoki-950: #1C1B1A
flexoki-900: #282726
flexoki-850: #343331
flexoki-800: #403E3C
flexoki-700: #575653
flexoki-600: #6c6b66
flexoki-500: #878580
flexoki-300: #B7B5AC
flexoki-200: #CECDC3
flexoki-150: #DAD8CE
flexoki-100: #E6E4D9
flexoki-050: #F2F0E5
flexoki-red-600: #AF3029
flexoki-red-400: #D14D41
flexoki-orange-600: #BC5215
flexoki-orange-400: #DA702C
flexoki-yellow-900: #4D3A0B
flexoki-yellow-600: #AD8301
flexoki-yellow-400: #D0A215
flexoki-yellow-100: #FCEEB8
flexoki-green-600: #66800B
flexoki-green-400: #879A39
flexoki-cyan-950: #142625
flexoki-cyan-600: #227d77
flexoki-cyan-400: #3AA99F
flexoki-cyan-050: #EBF2E7
flexoki-blue-600: #205EA6
flexoki-blue-400: #4385BE
flexoki-purple-600: #5E409D
flexoki-purple-400: #8B7EC8
flexoki-magenta-600: #A02F6F
flexoki-magenta-400: #CE5D97
flexoki-bg: <<colour flexoki-999>>
flexoki-tx-2: <<colour flexoki-500>>
flexoki-tx-3: <<colour flexoki-700>>
flexoki-ui-3: <<colour flexoki-800>>
flexoki-ui-2: <<colour flexoki-850>>
flexoki-ui: <<colour flexoki-900>>
flexoki-bg-2: <<colour flexoki-950>>
flexoki-tx: <<colour flexoki-300>>
flexoki-re: <<colour flexoki-red-400>>
flexoki-or: <<colour flexoki-orange-400>>
flexoki-ye: <<colour flexoki-yellow-400>>
flexoki-gr: <<colour flexoki-green-400>>
flexoki-cy: <<colour flexoki-cyan-400>>
flexoki-bl: <<colour flexoki-blue-400>>
flexoki-pu: <<colour flexoki-purple-400>>
flexoki-ma: <<colour flexoki-magenta-400>>
flexoki-re-2: <<colour flexoki-red-600>>
flexoki-or-2: <<colour flexoki-orange-600>>
flexoki-ye-2: <<colour flexoki-yellow-600>>
flexoki-gr-2: <<colour flexoki-green-600>>
flexoki-cy-2: <<colour flexoki-cyan-600>>
flexoki-bl-2: <<colour flexoki-blue-600>>
flexoki-pu-2: <<colour flexoki-purple-600>>
flexoki-ma-2: <<colour flexoki-magenta-600>>
alert-background: <<colour flexoki-yellow-900>>
alert-border: <<colour flexoki-ye>>
alert-highlight: <<colour flexoki-re>>
alert-muted-foreground: <<colour flexoki-ye>>
background: #100F0F
blockquote-bar: <<colour flexoki-ma-2>>
button-background: <<colour flexoki-bg-2>>
button-foreground: <<colour flexoki-paper>>
button-border: <<colour flexoki-600>>
code-background: <<colour background>>
code-border: <<colour flexoki-tx>>
code-foreground: <<colour flexoki-tx>>
diff-delete-background: <<colour flexoki-re>>
diff-delete-foreground: <<colour flexoki-bg-2>>
diff-equal-background:
diff-equal-foreground: inherit
diff-insert-background: <<colour flexoki-gr>>
diff-insert-foreground: <<colour flexoki-bg-2>>
diff-invisible-background: <<colour flexoki-ye>>
diff-invisible-foreground: <<colour flexoki-bg-2>>
dirty-indicator: <<colour flexoki-re>>
download-background: <<colour flexoki-cy-2>>
download-foreground: <<colour background>>
dragger-background: <<colour background>>
dragger-foreground: <<colour foreground>>
dropdown-background: <<colour background>>
dropdown-border: <<colour flexoki-ui-3>>
dropdown-tab-background-selected: <<colour flexoki-ui>>
dropdown-tab-background: <<colour flexoki-ui-3>>
dropzone-background: <<colour flexoki-gr>>
external-link-background-hover: inherit
external-link-background-visited: inherit
external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: <<colour flexoki-bl>>
external-link-foreground: <<colour flexoki-bl>>
footnote-target-background: <<colour flexoki-bg-2>>
foreground: #CECDC3
highlight-background: <<colour flexoki-yellow-900>>
highlight-foreground: inherit
menubar-background: <<colour primary>>
menubar-foreground: <<colour flexoki-paper>>
message-background: <<colour background>>
message-border: <<colour foreground>>
message-foreground: <<colour foreground>>
modal-backdrop: <<colour foreground>>
modal-background: <<colour background>>
modal-border: <<colour flexoki-ui-3>>
modal-footer-background: <<colour flexoki-ui-2>>
modal-footer-border: <<colour flexoki-ui-3>>
modal-header-border: <<colour flexoki-ui-3>>
muted-foreground: <<colour flexoki-tx-2>>
network-activity-foreground: <<colour flexoki-cy>>
notification-background: <<colour flexoki-bg>>
notification-border: <<colour flexoki-paper>>
page-background: <<colour flexoki-bg-2>>
pre-background: <<colour flexoki-bg-2>>
pre-border: <<colour flexoki-ui-2>>
primary: <<colour flexoki-cy>>
selection-background: <<colour primary>>
selection-foreground: <<colour background>>
select-tag-background: <<colour flexoki-bg>>
select-tag-foreground: <<colour flexoki-paper>>
sidebar-button-foreground: <<colour foreground>>
sidebar-controls-foreground-hover: <<colour flexoki-tx>>
sidebar-controls-foreground: <<colour flexoki-tx-3>>
sidebar-foreground-shadow: transparent
sidebar-foreground: <<colour flexoki-tx>>
sidebar-muted-foreground-hover: <<colour flexoki-tx>>
sidebar-muted-foreground: <<colour flexoki-tx-3>>
sidebar-tab-background-selected: <<colour flexoki-bg-2>>
sidebar-tab-background: <<colour flexoki-ui-2>>
sidebar-tab-border-selected: <<colour tab-border-selected>>
sidebar-tab-border: <<colour tab-border>>
sidebar-tab-divider: <<colour tab-divider>>
sidebar-tab-foreground-selected:
sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: <<colour flexoki-tx>>
sidebar-tiddler-link-foreground: <<colour flexoki-tx-2>>
site-title-foreground: <<colour tiddler-title-foreground>>
stability-stable: <<colour flexoki-gr>>
stability-experimental: <<colour flexoki-ye>>
stability-deprecated: <<colour flexoki-re>>
stability-legacy: <<colour flexoki-bl>>
static-alert-foreground: #aaaaaa
tab-background-selected: <<colour background>>
tab-background: <<colour flexoki-bg-2>>
tab-border-selected: <<colour flexoki-ui-3>>
tab-border: <<colour flexoki-ui>>
tab-divider: <<colour flexoki-ui-2>>
tab-foreground-selected: <<colour tab-foreground>>
tab-foreground: <<colour flexoki-tx-2>>
table-border: <<colour flexoki-ui-2>>
table-footer-background: <<colour flexoki-ui>>
table-header-background: <<colour flexoki-ui>>
tag-background: #D0A215
tag-foreground: #100F0F
testcase-accent-level-1: <<colour flexoki-bl-2>>
testcase-accent-level-2: <<colour flexoki-ye-2>>
testcase-accent-level-3: <<colour flexoki-gr-2>>
tiddler-background: <<colour background>>
tiddler-border: <<colour flexoki-ui-2>>
tiddler-controls-foreground-hover: <<colour flexoki-tx-3>>
tiddler-controls-foreground-selected: <<colour flexoki-tx-2>>
tiddler-controls-foreground: <<colour flexoki-tx-3>>
tiddler-editor-background: <<colour flexoki-bg-2>>
tiddler-editor-border-image: #ffffff
tiddler-editor-border: <<colour flexoki-ui-2>>
tiddler-editor-fields-even: <<colour flexoki-ui-3>>
tiddler-editor-fields-odd: <<colour flexoki-ui-2>>
tiddler-info-background: <<colour flexoki-ui>>
tiddler-info-border: <<colour flexoki-ui>>
tiddler-info-tab-background: <<colour flexoki-ui>>
tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: <<colour flexoki-tx-3>>
tiddler-title-foreground: <<colour flexoki-ma>>
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button: <<colour flexoki-re>>
toolbar-cancel-button:
toolbar-done-button:
untagged-background: <<colour flexoki-tx-3>>
very-muted-foreground: <<colour flexoki-600>>
wikilist-background: <<colour flexoki-ui>>
wikilist-item: <<colour flexoki-black>>
wikilist-info: <<colour flexoki-paper>>
wikilist-title: <<colour flexoki-tx-2>>
wikilist-title-svg: <<colour wikilist-title>>
wikilist-url: <<colour flexoki-tx-3>>
wikilist-button-open: <<colour flexoki-gr>>
wikilist-button-open-hover: <<colour flexoki-gr-2>>
wikilist-button-reveal: <<colour flexoki-cy>>
wikilist-button-reveal-hover: <<colour flexoki-cy-2>>
wikilist-button-remove: <<colour flexoki-re>>
wikilist-button-remove-hover: <<colour flexoki-re-2>>
wikilist-toolbar-background: <<colour flexoki-ui-2>>
wikilist-toolbar-foreground: <<colour flexoki-600>>
wikilist-droplink-dragover: <<colour flexoki-pu>>
wikilist-button-background: <<colour flexoki-tx-3>>
wikilist-button-foreground: <<colour flexoki-paper>>

View File

@ -0,0 +1,214 @@
title: $:/palettes/FlexokiLight
name: FlexokiLight
description: An inky color scheme for prose and code
tags: $:/tags/Palette
type: application/x-tiddler-dictionary
color-scheme: light
flexoki-black: #100F0F
flexoki-paper: #FFFCF0
flexoki-950: #1C1B1A
flexoki-900: #282726
flexoki-850: #343331
flexoki-800: #403E3C
flexoki-700: #575653
flexoki-600: #6F6E69
flexoki-500: #878580
flexoki-300: #B7B5AC
flexoki-200: #CECDC3
flexoki-150: #DAD8CE
flexoki-100: #E6E4D9
flexoki-050: #F2F0E5
flexoki-red-600: #AF3029
flexoki-red-400: #D14D41
flexoki-orange-600: #BC5215
flexoki-orange-400: #DA702C
flexoki-yellow-900: #4D3A0B
flexoki-yellow-600: #AD8301
flexoki-yellow-400: #D0A215
flexoki-yellow-100: #FCEEB8
flexoki-green-600: #66800B
flexoki-green-400: #879A39
flexoki-cyan-950: #142625
flexoki-cyan-600: #24837B
flexoki-cyan-400: #3AA99F
flexoki-cyan-050: #EBF2E7
flexoki-blue-600: #205EA6
flexoki-blue-400: #4385BE
flexoki-purple-600: #5E409D
flexoki-purple-400: #8B7EC8
flexoki-magenta-600: #A02F6F
flexoki-magenta-400: #CE5D97
flexoki-tx: <<colour flexoki-black>>
flexoki-tx-2: <<colour flexoki-600>>
flexoki-tx-3: <<colour flexoki-300>>
flexoki-ui-3: <<colour flexoki-200>>
flexoki-ui-2: <<colour flexoki-150>>
flexoki-ui: <<colour flexoki-100>>
flexoki-bg-2: <<colour flexoki-050>>
flexoki-bg: <<colour flexoki-paper>>
flexoki-re: <<colour flexoki-red-400>>
flexoki-or: <<colour flexoki-orange-400>>
flexoki-ye: <<colour flexoki-yellow-400>>
flexoki-gr: <<colour flexoki-green-400>>
flexoki-cy: <<colour flexoki-cyan-400>>
flexoki-bl: <<colour flexoki-blue-400>>
flexoki-pu: <<colour flexoki-purple-400>>
flexoki-ma: <<colour flexoki-magenta-400>>
flexoki-re-2: <<colour flexoki-red-600>>
flexoki-or-2: <<colour flexoki-orange-600>>
flexoki-ye-2: <<colour flexoki-yellow-600>>
flexoki-gr-2: <<colour flexoki-green-600>>
flexoki-cy-2: <<colour flexoki-cyan-600>>
flexoki-bl-2: <<colour flexoki-blue-600>>
flexoki-pu-2: <<colour flexoki-purple-600>>
flexoki-ma-2: <<colour flexoki-magenta-600>>
alert-background: <<colour flexoki-yellow-100>>
alert-border: <<colour flexoki-ye-2>>
alert-highlight: <<colour flexoki-re-2>>
alert-muted-foreground: <<colour flexoki-tx-2>>
background: #FFFCF0
blockquote-bar: <<colour flexoki-magenta-600>>
button-background: <<colour flexoki-bg-2>>
button-foreground: <<colour flexoki-black>>
button-border: <<colour flexoki-500>>
code-background: <<colour flexoki-bg>>
code-border: <<colour flexoki-tx>>
code-foreground: <<colour flexoki-tx>>
diff-delete-background: <<colour flexoki-re-2>>
diff-delete-foreground: <<colour flexoki-paper>>
diff-equal-background:
diff-equal-foreground: <<colour foreground>>
diff-insert-background: <<colour flexoki-gr-2>>
diff-insert-foreground: <<colour flexoki-paper>>
diff-invisible-background: <<colour flexoki-ye-2>>
diff-invisible-foreground: <<colour flexoki-paper>>
dirty-indicator: <<colour flexoki-red-600>>
download-background: <<colour flexoki-gr>>
download-foreground: <<colour background>>
dragger-background: <<colour foreground>>
dragger-foreground: <<colour background>>
dropdown-background: <<colour background>>
dropdown-border: <<colour muted-foreground>>
dropdown-tab-background-selected: <<colour background>>
dropdown-tab-background: <<colour flexoki-bg-2>>
dropzone-background: <<colour flexoki-gr>>
external-link-background-hover: inherit
external-link-background-visited: inherit
external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: <<colour flexoki-bl>>
external-link-foreground: <<colour flexoki-bl>>
footnote-target-background: <<colour flexoki-bg-2>>
foreground: #100F0F
highlight-background: <<colour flexoki-yellow-100>>
highlight-foreground: inherit
menubar-background: <<colour primary>>
menubar-foreground: <<colour flexoki-paper>>
message-background: <<colour flexoki-bg>>
message-border: <<colour flexoki-black>>
message-foreground: <<colour flexoki-black>>
modal-backdrop: <<colour foreground>>
modal-background: <<colour background>>
modal-border: <<colour flexoki-tx-3>>
modal-footer-background: <<colour flexoki-bg>>
modal-footer-border: <<colour flexoki-tx-3>>
modal-header-border: <<colour flexoki-tx-3>>
muted-foreground: <<colour flexoki-500>>
network-activity-foreground: <<colour flexoki-cy-2>>
notification-background: <<colour flexoki-bg>>
notification-border: <<color flexoki-black>>
page-background: <<colour flexoki-bg-2>>
pre-background: <<colour flexoki-bg-2>>
pre-border: <<colour flexoki-ui-2>>
primary: <<colour flexoki-cy-2>>
selection-background: <<colour flexoki-cy-2>>
selection-foreground: <<colour background>>
select-tag-background: <<colour flexoki-bg>>
select-tag-foreground: <<color flexoki-black>>
sidebar-button-foreground: <<colour foreground>>
sidebar-controls-foreground-hover: <<colour flexoki-tx>>
sidebar-controls-foreground: <<colour flexoki-tx-3>>
sidebar-foreground-shadow: transparent
sidebar-foreground: <<colour flexoki-300>>
sidebar-muted-foreground-hover: <<colour flexoki-700>>
sidebar-muted-foreground: <<colour flexoki-200>>
sidebar-tab-background-selected: <<colour flexoki-bg-2>>
sidebar-tab-background: <<colour flexoki-ui>>
sidebar-tab-border-selected: <<colour tab-border-selected>>
sidebar-tab-border: <<colour tab-border>>
sidebar-tab-divider: <<colour flexoki-100>>
sidebar-tab-foreground-selected:
sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: <<colour flexoki-500>>
sidebar-tiddler-link-foreground: <<colour flexoki-700>>
site-title-foreground: <<colour tiddler-title-foreground>>
stability-stable: <<colour flexoki-green-600>>
stability-experimental: <<colour flexoki-yellow-600>>
stability-deprecated: <<colour flexoki-red-600>>
stability-legacy: <<colour flexoki-blue-600>>
static-alert-foreground: <<colour flexoki-tx-3>>
tab-background-selected: <<colour background>>
tab-background: <<colour flexoki-bg-2>>
tab-border-selected: <<colour flexoki-ui-3>>
tab-border: <<colour flexoki-ui>>
tab-divider: <<colour flexoki-ui-2>>
tab-foreground-selected: <<colour tab-foreground>>
tab-foreground: <<colour flexoki-tx>>
table-border: <<colour flexoki-ui-2>>
table-footer-background: <<colour flexoki-tx-3>>
table-header-background: <<colour flexoki-bg-2>>
tag-background: #AD8301
tag-foreground: #FFFCF0
testcase-accent-level-1: <<colour flexoki-blue-400>>
testcase-accent-level-2: <<colour flexoki-yellow-400>>
testcase-accent-level-3: <<colour flexoki-green-400>>
tiddler-background: <<colour background>>
tiddler-border: <<colour background>>
tiddler-controls-foreground-hover: <<colour flexoki-tx-3>>
tiddler-controls-foreground-selected: <<colour flexoki-tx-2>>
tiddler-controls-foreground: <<colour flexoki-ui-3>>
tiddler-editor-background: <<colour flexoki-bg-2>>
tiddler-editor-border-image: #ffffff
tiddler-editor-border: <<colour flexoki-ui-2>>
tiddler-editor-fields-even: <<colour flexoki-ui-3>>
tiddler-editor-fields-odd: <<colour flexoki-ui-2>>
tiddler-info-background: <<colour flexoki-bg-2>>
tiddler-info-border: <<colour flexoki-200>>
tiddler-info-tab-background: <<colour flexoki-bg>>
tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: <<colour flexoki-tx-3>>
tiddler-title-foreground: <<colour flexoki-magenta-600>>
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button: <<colour flexoki-re-2>>
toolbar-cancel-button:
toolbar-done-button:
untagged-background: <<colour flexoki-tx-3>>
very-muted-foreground: <<colour flexoki-500>>
wikilist-background: <<colour flexoki-ui>>
wikilist-item: <<colour flexoki-paper>>
wikilist-info: <<colour flexoki-black>>
wikilist-title: <<colour flexoki-tx-2>>
wikilist-title-svg: <<colour wikilist-title>>
wikilist-url: <<colour flexoki-tx-3>>
wikilist-button-open: <<colour flexoki-gr-2>>
wikilist-button-open-hover: <<colour flexoki-gr>>
wikilist-button-reveal: <<colour flexoki-cy-2>>
wikilist-button-reveal-hover: <<colour flexoki-cy>>
wikilist-button-remove: <<colour flexoki-re-2>>
wikilist-button-remove-hover: <<colour flexoki-re>>
wikilist-toolbar-background: <<colour flexoki-ui-2>>
wikilist-toolbar-foreground: <<colour flexoki-500>>
wikilist-droplink-dragover: <<colour flexoki-pu>>
wikilist-button-background: <<colour flexoki-tx-3>>
wikilist-button-foreground: <<colour flexoki-black>>

View File

@ -21,9 +21,9 @@ diff-delete-foreground: <<colour foreground>>
diff-equal-background:
diff-equal-foreground: <<colour foreground>>
diff-insert-background: #b8bb26
diff-insert-foreground: <<colour foreground>>
diff-invisible-background:
diff-invisible-foreground: <<colour muted-foreground>>
diff-insert-foreground: <<colour background>>
diff-invisible-background: #ffff97
diff-invisible-foreground: #444347
dirty-indicator: #fb4934
download-background: #b8bb26
download-foreground: <<colour background>>
@ -40,6 +40,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #d3869b
external-link-foreground: #8ec07c
footnote-target-background: #665c54
foreground: #fbf1c7
highlight-background: #ffff79
highlight-foreground: #000000
@ -82,6 +83,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: #458588
sidebar-tiddler-link-foreground: #98971a
site-title-foreground: <<colour tiddler-title-foreground>>
stability-deprecated: #cc241d
stability-experimental: #d79921
stability-legacy: #458588
stability-stable: #98971a
static-alert-foreground: #B48EAD
tab-background-selected: #ebdbb2
tab-background: #665c54

View File

@ -21,8 +21,8 @@ diff-delete-foreground: <<colour foreground>>
diff-equal-background:
diff-equal-foreground: <<colour foreground>>
diff-insert-background: #A3BE8C
diff-insert-foreground: <<colour foreground>>
diff-invisible-background:
diff-insert-foreground: <<colour background>>
diff-invisible-background: #f9f3b5
diff-invisible-foreground: <<colour muted-foreground>>
dirty-indicator: #BF616A
download-background: #A3BE8C
@ -40,6 +40,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #5E81AC
external-link-foreground: #8FBCBB
footnote-target-background: #2E3440
foreground: #d8dee9
highlight-background: #ffff78
highlight-foreground: #000000
@ -82,6 +83,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: #A3BE8C
sidebar-tiddler-link-foreground: #81A1C1
site-title-foreground: <<colour tiddler-title-foreground>>
stability-deprecated: #bf616a
stability-experimental: #d08770
stability-legacy: #88c0d0
stability-stable: #a3be8c
static-alert-foreground: #B48EAD
tab-background-selected: #ECEFF4
tab-background: #4C566A

View File

@ -33,6 +33,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
footnote-target-background: #ecf2ff
foreground: #333333
highlight-background: #ffff00
highlight-foreground: #000000

View File

@ -125,12 +125,21 @@ foreground: #657b83
tiddler-link-foreground: <<colour primary>>
alert-border: #b99e2f
diff-delete-background: <<colour red>>
diff-delete-foreground: <<colour background>>
diff-equal-background: inherit
diff-equal-foreground: inherit
diff-insert-background: <<colour green>>
diff-insert-foreground: <<colour background>>
diff-invisible-background: <<colour yellow>>
diff-invisible-foreground: <<colour background>>
dirty-indicator: #ff0000
dropzone-background: rgba(0,200,0,0.7)
external-link-background-hover: inherit
external-link-background-visited: inherit
external-link-background: inherit
external-link-foreground-hover: inherit
footnote-target-background: #ded8c5
highlight-background: #ffff00
highlight-foreground: #000000
message-border: #cfd6e6
@ -141,6 +150,10 @@ sidebar-controls-foreground-hover:
sidebar-muted-foreground-hover:
sidebar-tab-background: #ded8c5
sidebar-tiddler-link-foreground-hover:
stability-deprecated: <<colour red>>
stability-experimental: <<colour yellow>>
stability-legacy: <<colour blue>>
stability-stable: <<colour green>>
static-alert-foreground: #aaaaaa
tab-border: #cccccc
modal-footer-border: <<colour tab-border>>

View File

@ -18,7 +18,15 @@ button-foreground: #93a1a1
code-background: #073642
code-border: #586e75
code-foreground: #93a1a1
dirty-indicator: inherit
diff-delete-background: #dc322f
diff-delete-foreground: #eee8d5
diff-equal-background: inherit
diff-equal-foreground: inherit
diff-insert-background: #859900
diff-insert-foreground: #073642
diff-invisible-background: #b58900
diff-invisible-foreground: #eee8d5
dirty-indicator: #dc322f
download-background: #859900
download-foreground: #073642
dragger-background: #073642
@ -34,6 +42,7 @@ external-link-background-visited: inherit
external-link-foreground: #268bd2
external-link-foreground-hover:
external-link-foreground-visited: #268bd2
footnote-target-background: #073642
foreground: #839496
highlight-background: #ffff78
highlight-foreground: #000000
@ -72,6 +81,10 @@ sidebar-tab-foreground-selected: #93a1a1
sidebar-tiddler-link-foreground: #2aa198
sidebar-tiddler-link-foreground-hover: #eee8d5
site-title-foreground: #d33682
stability-deprecated: #dc322f
stability-experimental: #b58900
stability-legacy: #268bd2
stability-stable: #859900
static-alert-foreground: #93a1a1
tab-background: #073642
tab-background-selected: #002b36

View File

@ -18,7 +18,15 @@ button-foreground: #586e75
code-background: #eee8d5
code-border: #93a1a1
code-foreground: #586e75
dirty-indicator: inherit
diff-delete-background: #dc322f
diff-delete-foreground: #eee8d5
diff-equal-background: inherit
diff-equal-foreground: inherit
diff-insert-background: #859900
diff-insert-foreground: #eee8d5
diff-invisible-background: #b58900
diff-invisible-foreground: #eee8d5
dirty-indicator: #dc322f
download-background: #859900
download-foreground: #eee8d5
dragger-background: #eee8d5
@ -34,6 +42,7 @@ external-link-background-visited: inherit
external-link-foreground: #268bd2
external-link-foreground-hover: inherit
external-link-foreground-visited: #268bd2
footnote-target-background: #eee8d5
foreground: #657b83
highlight-background: #ffff00
highlight-foreground: #000000
@ -72,6 +81,10 @@ sidebar-tab-foreground-selected: #586e75
sidebar-tiddler-link-foreground: #2aa198
sidebar-tiddler-link-foreground-hover: #002b36
site-title-foreground: #d33682
stability-deprecated: #dc322f
stability-experimental: #b58900
stability-legacy: #268bd2
stability-stable: #859900
static-alert-foreground: #586e75
tab-background: #eee8d5
tab-background-selected: #fdf6e3

View File

@ -33,6 +33,7 @@ external-link-background: transparent
external-link-foreground-hover:
external-link-foreground-visited:
external-link-foreground:
footnote-target-background: #ececec
foreground: rgba(0, 0, 0, 0.87)
highlight-background: #ffff00
highlight-foreground: #000000

View File

@ -33,6 +33,7 @@ external-link-background: transparent
external-link-foreground-hover:
external-link-foreground-visited: #7c318c
external-link-foreground: #9e3eb3
footnote-target-background: #494949
foreground: rgba(255, 255, 255, 0.7)
highlight-background: #ffff78
highlight-foreground: #000000

View File

@ -19,13 +19,13 @@ code-background: rgba(0,0,0,0.03)
code-border: rgba(0,0,0,0.08)
code-foreground: rgb(255, 94, 94)
diff-delete-background: #ffc9c9
diff-delete-foreground: <<colour foreground>>
diff-delete-foreground: <<colour background>>
diff-equal-background:
diff-equal-foreground: <<colour foreground>>
diff-insert-background: #aaefad
diff-insert-foreground: <<colour foreground>>
diff-invisible-background:
diff-invisible-foreground: <<colour muted-foreground>>
diff-insert-foreground: <<colour background>>
diff-invisible-background: #fdfcbd
diff-invisible-foreground: <<colour background>>
dirty-indicator: rgb(255, 94, 94)
download-background: #19a974
download-foreground: rgb(38, 38, 38)
@ -42,6 +42,7 @@ external-link-background-visited: inherit
external-link-foreground: rgb(179, 179, 255)
external-link-foreground-hover: inherit
external-link-foreground-visited: rgb(153, 153, 255)
footnote-target-background: <<colour tag-foreground>>
foreground: rgb(179, 179, 179)
highlight-background: #ffff78
highlight-foreground: #000000

View File

@ -32,7 +32,7 @@ dragger-background: <<colour foreground>>
dragger-foreground: <<colour background>>
dropdown-background: <<colour background>>
dropdown-border: <<colour muted-foreground>>
dropdown-tab-background-selected: #fff
dropdown-tab-background-selected: #ffffff
dropdown-tab-background: #ececec
dropzone-background: rgba(0,200,0,0.7)
external-link-background-hover: inherit
@ -41,6 +41,7 @@ external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
footnote-target-background: #ecf2ff
foreground: #333333
highlight-background: #ffff00
highlight-foreground: #000000
@ -53,7 +54,7 @@ modal-border: #999999
modal-footer-background: #f5f5f5
modal-footer-border: #dddddd
modal-header-border: #eeeeee
muted-foreground: #bbb
muted-foreground: #bbbbbb
network-activity-foreground: #448844
notification-background: #ffffdd
notification-border: #999999
@ -82,6 +83,10 @@ sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: #444444
sidebar-tiddler-link-foreground: #999999
site-title-foreground: <<colour tiddler-title-foreground>>
stability-stable: #008000
stability-experimental: #c07c00
stability-deprecated: #ff0000
stability-legacy: #0000ff
static-alert-foreground: #aaaaaa
tab-background-selected: #ffffff
tab-background: #d8d8d8
@ -93,9 +98,9 @@ tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
table-header-background: #f0f0f0
tag-background: #ec6
tag-background: #eecc66
tag-foreground: #ffffff
testcase-accent-level-1: #84C5E6
testcase-accent-level-1: #c1eaff
testcase-accent-level-2: #E3B740
testcase-accent-level-3: #5FD564
tiddler-background: <<colour background>>
@ -127,11 +132,11 @@ toolbar-done-button:
untagged-background: #999999
very-muted-foreground: #888888
wikilist-background: #e5e5e5
wikilist-item: #fff
wikilist-info: #000
wikilist-title: #666
wikilist-item: #ffffff
wikilist-info: #000000
wikilist-title: #666666
wikilist-title-svg: <<colour wikilist-title>>
wikilist-url: #aaa
wikilist-url: #aaaaaa
wikilist-button-open: #4fb82b
wikilist-button-open-hover: green
wikilist-button-reveal: #5778d8
@ -139,7 +144,7 @@ wikilist-button-reveal-hover: blue
wikilist-button-remove: #d85778
wikilist-button-remove-hover: red
wikilist-toolbar-background: #d3d3d3
wikilist-toolbar-foreground: #888
wikilist-toolbar-foreground: #888888
wikilist-droplink-dragover: rgba(255,192,192,0.5)
wikilist-button-background: #acacac
wikilist-button-foreground: #000
wikilist-button-foreground: #000000

View File

@ -2,5 +2,6 @@ title: $:/core/templates/exporters/CsvFile
tags: $:/tags/Exporter
description: {{$:/language/Exporters/CsvFile}}
extension: .csv
file-type: text/csv
<$macrocall $name="csvtiddlers" filter=<<exportFilter>> format="quoted-comma-sep" $output="text/raw"/>

Some files were not shown because too many files have changed in this diff Show More