1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-13 10:50:27 +00:00

Merge branch 'master' into geospatial-plugin

This commit is contained in:
jeremy@jermolene.com 2023-06-21 09:38:57 +01:00
commit 5b4c0244a1
19 changed files with 48 additions and 20 deletions

View File

@ -107,7 +107,7 @@ node $TW5_BUILD_TIDDLYWIKI \
# /empty.html Empty # /empty.html Empty
# /empty.hta For Internet Explorer # /empty.hta For Internet Explorer
node $TW5_BUILD_TIDDLYWIKI \ node $TW5_BUILD_TIDDLYWIKI \
$TW5_BUILD_MAIN_EDITION \ ./editions/empty \
--verbose \ --verbose \
--output $TW5_BUILD_OUTPUT \ --output $TW5_BUILD_OUTPUT \
--build empty \ --build empty \

View File

@ -178,7 +178,6 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
srcVariable = variableInfo && variableInfo.srcVariable; srcVariable = variableInfo && variableInfo.srcVariable;
if(variableInfo.text) { if(variableInfo.text) {
if(srcVariable.isFunctionDefinition) { if(srcVariable.isFunctionDefinition) {
// Function to return parameters by name or position
var result = (variableInfo.resultList ? variableInfo.resultList[0] : variableInfo.text) || ""; var result = (variableInfo.resultList ? variableInfo.resultList[0] : variableInfo.text) || "";
parser = { parser = {
tree: [{ tree: [{
@ -235,7 +234,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
} }
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"]) $tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
}); });
} else { } else if(srcVariable.isMacroDefinition || !srcVariable.isFunctionDefinition) {
// For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__" // For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"
parser = { parser = {
tree: [ tree: [

View File

@ -3,6 +3,7 @@ tags: $:/tags/Exporter
description: {{$:/language/Exporters/StaticRiver}} description: {{$:/language/Exporters/StaticRiver}}
extension: .html extension: .html
\define tv-config-static() yes
\define tv-wikilink-template() #$uri_encoded$ \define tv-wikilink-template() #$uri_encoded$
\define tv-config-toolbar-icons() no \define tv-config-toolbar-icons() no
\define tv-config-toolbar-text() no \define tv-config-toolbar-text() no

View File

@ -1,6 +1,7 @@
title: $:/core/templates/server/static.tiddler.html title: $:/core/templates/server/static.tiddler.html
\whitespace trim \whitespace trim
\define tv-config-static() yes
\define tv-wikilink-template() $uri_encoded$ \define tv-wikilink-template() $uri_encoded$
\import [subfilter{$:/core/config/GlobalImportFilter}] \import [subfilter{$:/core/config/GlobalImportFilter}]
<html> <html>

View File

@ -1,6 +1,7 @@
title: $:/core/templates/static.template.html title: $:/core/templates/static.template.html
type: text/vnd.tiddlywiki-html type: text/vnd.tiddlywiki-html
\define tv-config-static() yes
\define tv-wikilink-template() static/$uri_doubleencoded$.html \define tv-wikilink-template() static/$uri_doubleencoded$.html
\define tv-config-toolbar-icons() no \define tv-config-toolbar-icons() no
\define tv-config-toolbar-text() no \define tv-config-toolbar-text() no

View File

@ -1,6 +1,7 @@
title: $:/core/templates/static.tiddler.html title: $:/core/templates/static.tiddler.html
\define tv-wikilink-template() $uri_doubleencoded$.html \define tv-wikilink-template() $uri_doubleencoded$.html
\define tv-config-static() yes
\define tv-config-toolbar-icons() no \define tv-config-toolbar-icons() no
\define tv-config-toolbar-text() no \define tv-config-toolbar-text() no
\define tv-config-toolbar-class() tc-btn-invisible \define tv-config-toolbar-class() tc-btn-invisible

View File

@ -83,7 +83,6 @@ Improvements to the following translations:
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7529">> size of buttons in dropdown for editor "link" toolbar button * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7529">> size of buttons in dropdown for editor "link" toolbar button
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/8e132948b6bec623d81d300fbe6dc3a0307bcc6d">> crash when transcluding a lazily loaded tiddler as an attribute value * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/8e132948b6bec623d81d300fbe6dc3a0307bcc6d">> crash when transcluding a lazily loaded tiddler as an attribute value
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7462">> DiffTextWidget crash with missing or empty attributes * <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7462">> DiffTextWidget crash with missing or empty attributes
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7448">> CheckboxWidget to avoid writing to date fields
! Developer Improvements ! Developer Improvements

View File

@ -1066,7 +1066,11 @@ Tests the filtering mechanism.
}); });
it("should handle the deserializers operator", function() { it("should handle the deserializers operator", function() {
expect(wiki.filterTiddlers("[deserializers[]]").join(",")).toBe("application/javascript,application/json,application/x-tiddler,application/x-tiddler-html-div,application/x-tiddlers,text/css,text/html,text/plain"); var expectedDeserializers = ["application/javascript","application/json","application/x-tiddler","application/x-tiddler-html-div","application/x-tiddlers","text/css","text/html","text/plain"];
if($tw.browser) {
expectedDeserializers.unshift("(DOM)");
}
expect(wiki.filterTiddlers("[deserializers[]]").join(",")).toBe(expectedDeserializers.join(","));
}); });
it("should handle the charcode operator", function() { it("should handle the charcode operator", function() {

View File

@ -9,9 +9,13 @@ tags: Concepts
<$button actions=<<actions>>>$text$</$button> <$button actions=<<actions>>>$text$</$button>
\end \end
ShadowTiddlers are tiddlers that are loaded from within [[Plugins]]. Unlike ordinary tiddlers, they don't appear in most lists. ShadowTiddlers are tiddlers that are loaded from [[Plugins]] at the wiki startup. Unlike ordinary tiddlers, they don't appear in most lists.
ShadowTiddlers can be overridden with an ordinary tiddler of the same name. If that tiddler is subsequently deleted then the original shadow tiddler is automatically restored. !! Overriding Shadow Tiddlers to modify plugins
A ShadowTiddler can be overridden with an ordinary tiddler of the same name. This leaves the shadow tiddler intact but the plugin will use the overriding tiddler in its place, effectively allowing users to modify the behaviour of plugins.
Users are cautioned against overriding shadow tiddlers because if the shadow tiddler is changed in a plugin update, the overriding tiddler may no longer perform as intended. To remedy this, the overriding tiddler may be modified or deleted. If the overriding tiddler is deleted, then the plugin falls back to using the original shadow tiddler.
!! Overridden Shadow Tiddlers !! Overridden Shadow Tiddlers

View File

@ -5,13 +5,13 @@ title: Using Excise
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
! Excise text ! Excise text
From the EditorToolbar you can export selected text to a new tiddler and insert a [[link|Linking in WikiText]] [[Transclusion]] or [[macro|Macros]] in its place. Click ''Excise text'' (<<.icon $:/core/images/excise>>), input name of the new tiddler, and choose excise method. From the EditorToolbar you can export selected text to a new tiddler and insert a [[link|Linking in WikiText]], [[Transclusion]] or [[macro|Macros]] in its place. Click ''Excise text'' (<<.icon $:/core/images/excise>>), input name of the new tiddler, and choose excise method.
!! How to excise text !! How to excise text
# Highlight the relevant piece of text # Highlight the relevant piece of text
# Click ''Excise text'' (<<.icon $:/core/images/excise>>) # Click ''Excise text'' (<<.icon $:/core/images/excise>>)
# Give the new tiddler a title. # Give the new tiddler a title.
# Chosse if the new tiddler will be tagged with the title of the current tiddler (see note below). # Choose if the new tiddler will be tagged with the title of the current tiddler (see note below).
# Choose replacing method: [[link|Linking in WikiText]], [[transclusion|Transclusion]], or [[macro|Macros]]. # Choose replacing method: [[link|Linking in WikiText]], [[transclusion|Transclusion]], or [[macro|Macros]].
# Click the ''{{$:/language/Buttons/Excise/Caption/Excise}}'' button # Click the ''{{$:/language/Buttons/Excise/Caption/Excise}}'' button

View File

@ -1,17 +1,17 @@
created: 20150117152607000 created: 20150117152607000
modified: 20220227210111054 modified: 20230617183916622
tags: $:/tags/Macro tags: $:/tags/Macro
title: $:/editions/tw5.com/operator-macros title: $:/editions/tw5.com/operator-macros
\define .operator-examples(op,text:"Examples") <$link to="$op$ Operator (Examples)">$text$</$link> \define .operator-examples(op,text:"Examples") <$link to="$op$ Operator (Examples)">$text$</$link>
\define .operator-example-tryit-actions() <$action-setfield $tiddler=<<.state>> text="show" filter=<<__eg__>>/> \procedure .operator-example-tryit-actions() <$action-setfield $tiddler=<<.state>> text="show" filter=<<eg>>/>
\define .operator-example(n,eg,ie) \procedure .operator-example(n,eg,ie)
<div class="doc-example"> <div class="doc-example">
<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state"> <$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix<n>]" variable=".state">
<$reveal state=<<.state>> type="nomatch" text="show"> <$reveal state=<<.state>> type="nomatch" text="show">
`$eg$` <code><$text text=<<eg>>/></code>
<$macrocall $name=".if" cond="""$ie$""" then="""<dd>&rarr; $ie$</dd>"""/> <$macrocall $name=".if" cond=<<ie>> then={{{[[<dd>&rarr; ]addsuffix<ie>addsuffix[</dd>]]}}}/>
<dl> <dl>
<dd><$button actions=<<.operator-example-tryit-actions>>>Try it</$button></dd> <dd><$button actions=<<.operator-example-tryit-actions>>>Try it</$button></dd>
</dl> </dl>
@ -21,7 +21,7 @@ title: $:/editions/tw5.com/operator-macros
<dl> <dl>
<dd> <dd>
<$button set=<<.state>> setTo="">Hide</$button> <$button set=<<.state>> setTo="">Hide</$button>
<$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<<__eg__>>> <$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<<eg>>>
<$button actions=<<.operator-example-tryit-actions>>>Reset</$button> <$button actions=<<.operator-example-tryit-actions>>>Reset</$button>
</$reveal> </$reveal>
</dd> </dd>

View File

@ -151,4 +151,4 @@ Below is an example macro, procedure and function definition. All three forms o
*''variables'' - \define, <<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget, \function all create variables. If the same name is used, then later define will overwrite earlier defined *''variables'' - \define, <<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget, \function all create variables. If the same name is used, then later define will overwrite earlier defined
*''<<.op function>> filter operator parameter'' - only variables defined using \function can be called using the <<.olink function>> operator *''<<.op function>> filter operator parameter'' - only variables defined using \function can be called using the <<.olink function>> operator
*''filter operators'' - only the [[javascript defined filter operators|Filter Operators]] and variables defined using \function with name containing a dot can be called *''filter operators'' - only the [[javascript defined filter operators|Filter Operators]] and variables defined using \function with name containing a dot can be called
*''widgets'' - variables defined using \widget can be invoked using `<$widget/>` syntax ONLY if the name starts a dollar sign (to override existing javascript defined widgets) or double dollar sign (to define [[custom widgets|Custom Widgets]]). Without the dollar sign prefix, defining variables using \widget is no different than using \procedure. *''widgets'' - variables defined using \widget can be invoked using `<$widget/>` syntax ONLY if the name starts a dollar sign. Without the dollar sign prefix, defining variables using \widget is no different than using \procedure.

View File

@ -0,0 +1,10 @@
created: 20230617085524754
modified: 20230617085524754
title: tv-config-static Variable
tags: Variables [[Core Variables]] [[Configuration Variables]]
type: text/vnd.tiddlywiki
caption: tv-config-static
<<.from-version "5.3.0">> The <<.def tv-config-static>> [[variable|Variables]] is set to `yes` within static rendering templates, and is unset in other contexts.
It is useful for selectively hiding or showing content depending on whether a rendering is static or interactive.

View File

@ -67,6 +67,8 @@ More/Caption: więcej
More/Hint: Więcej akcji More/Hint: Więcej akcji
NewHere/Caption: nowy tiddler tu NewHere/Caption: nowy tiddler tu
NewHere/Hint: Stwórz nowego tiddlera otagowanego tym tiddlerem NewHere/Hint: Stwórz nowego tiddlera otagowanego tym tiddlerem
NetworkActivity/Caption: ruch sieciowy
NetworkActivity/Hint: Anuluj cały ruch sieciowy
NewJournal/Caption: nowy dziennik NewJournal/Caption: nowy dziennik
NewJournal/Hint: Tworzy nowego tiddlera o typie dziennika NewJournal/Hint: Tworzy nowego tiddlera o typie dziennika
NewJournalHere/Caption: nowy dziennik tu NewJournalHere/Caption: nowy dziennik tu

View File

@ -25,6 +25,8 @@ Encryption/RepeatPassword: Powtórz hasło
Encryption/PasswordNoMatch: Hasła się nie zgadzają Encryption/PasswordNoMatch: Hasła się nie zgadzają
Encryption/SetPassword: Ustaw hasło Encryption/SetPassword: Ustaw hasło
Error/Caption: Bład Error/Caption: Bład
Error/DeserializeOperator/MissingOperand: Błąd filtra: Nie podano argumentu dla operatora 'deserialize'
Error/DeserializeOperator/UnknownDeserializer: Błąd filtra: Podano nieznany deserializator jako argument dla operatora 'deserialize'
Error/Filter: Bład filtra Error/Filter: Bład filtra
Error/FilterSyntax: Bład składniowy filtra Error/FilterSyntax: Bład składniowy filtra
Error/FilterRunPrefix: Bład filtra: Nieznany prefiks dla filtra 'run' Error/FilterRunPrefix: Bład filtra: Nieznany prefiks dla filtra 'run'

View File

@ -1,3 +1,3 @@
title: $:/SiteTitle title: $:/SiteTitle
Moja ~TiddlyWiki Moja TiddlyWiki

View File

@ -533,3 +533,5 @@ Yukai Chou, @muzimuzhi, 2023-04-07
Carmine Guida, @carmineguida, 2023-05-17 Carmine Guida, @carmineguida, 2023-05-17
Tavin Cole, @tavin, 2023/05/25 Tavin Cole, @tavin, 2023/05/25
WhiteFall, @Zacharia2, 2023/06/04

View File

@ -200,7 +200,7 @@ function tw_filteredtranscludeinline(state,silent) {
} }
// based on markdown-it html_block() // based on markdown-it html_block()
var WidgetTagRegEx = [/^<\/?\$[a-zA-Z0-9\-\$]+(?=(\s|\/?>|$))/, /^$/]; var WidgetTagRegEx = [/^<\/?\$[a-zA-Z0-9\-\$\.]+(?=(\s|\/?>|$))/, /^$/];
function tw_block(state,startLine,endLine,silent) { function tw_block(state,startLine,endLine,silent) {
var i, nextLine, token, lineText, var i, nextLine, token, lineText,
pos = state.bMarks[startLine] + state.tShift[startLine], pos = state.bMarks[startLine] + state.tShift[startLine],
@ -364,7 +364,7 @@ function tw_prettyextlink(state,silent) {
return true; return true;
} }
var TWCloseTagRegEx = /<\/\$[A-Za-z0-9\-\$]+\s*>/gm; var TWCloseTagRegEx = /<\/\$[A-Za-z0-9\-\$\.]+\s*>/gm;
function extendHtmlInline(origRule) { function extendHtmlInline(origRule) {
return function(state,silent) { return function(state,silent) {
if(origRule(state,silent)) { if(origRule(state,silent)) {

View File

@ -42,6 +42,7 @@ tags: $:/tags/PageTemplate
</ul> </ul>
\end \end
<$list filter="[<tv-config-static>!match[yes]]" variable="ignore">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/MenuBar]!has[draft.of]] -[all[tiddlers+shadows]tag[$:/tags/TopLeftBar]limit[1]then[]else[$:/plugins/tiddlywiki/menubar/items/topleftbar]] -[all[tiddlers+shadows]tag[$:/tags/TopRightBar]limit[1]then[]else[$:/plugins/tiddlywiki/menubar/items/toprightbar]] +[limit[1]]" variable="listItem"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/MenuBar]!has[draft.of]] -[all[tiddlers+shadows]tag[$:/tags/TopLeftBar]limit[1]then[]else[$:/plugins/tiddlywiki/menubar/items/topleftbar]] -[all[tiddlers+shadows]tag[$:/tags/TopRightBar]limit[1]then[]else[$:/plugins/tiddlywiki/menubar/items/toprightbar]] +[limit[1]]" variable="listItem">
<nav class="tc-menubar tc-adjust-top-of-scroll"> <nav class="tc-menubar tc-adjust-top-of-scroll">
<div class="tc-menubar-narrow"> <div class="tc-menubar-narrow">
@ -66,3 +67,4 @@ tags: $:/tags/PageTemplate
</$list> </$list>
</nav> </nav>
</$list> </$list>
</$list>