Revert "Migrate some old macros to new syntax (#8768)"

This reverts commit 2801eee905.
This commit is contained in:
Jeremy Ruston
2025-07-18 09:58:06 +01:00
committed by GitHub
parent 89030c4d4b
commit 94049bfd4e
6 changed files with 115 additions and 102 deletions
+22 -19
View File
@@ -1,55 +1,58 @@
title: $:/core/macros/colour-picker title: $:/core/macros/colour-picker
tags: $:/tags/Macro tags: $:/tags/Macro
\procedure colour-picker-update-recent() \define colour-picker-update-recent()
<$action-listops <$action-listops
$tiddler="$:/config/ColourPicker/Recent" $tiddler="$:/config/ColourPicker/Recent"
$subfilter="[<colour-picker-value>] [list[$:/config/ColourPicker/Recent]remove<colour-picker-value>] +[limit[8]]" $subfilter="$(colour-picker-value)$ [list[$:/config/ColourPicker/Recent]remove[$(colour-picker-value)$]] +[limit[8]]"
/> />
\end \end
\procedure colour-picker-inner(actions) \define colour-picker-inner(actions)
<$button tag="a" tooltip=<<colour-picker-value>>> <$button tag="a" tooltip="""$(colour-picker-value)$""">
<<colour-picker-update-recent>> $(colour-picker-update-recent)$
<$transclude $variable="actions"/> <$transclude $variable="__actions__"/>
<span style.display="inline-block" style.backgroundColor=<<colour-picker-value>> style.width="100%" style.height="100%" style.borderRadius="50%"/>
<span style="display:inline-block; background-color: $(colour-picker-value)$; width: 100%; height: 100%; border-radius: 50%;"/>
</$button> </$button>
\end \end
\define colour-picker-recent-inner(actions)
\whitespace trim \whitespace trim
\procedure colour-picker-recent-inner(actions) <$set name="colour-picker-value" value="$(recentColour)$">
<$set name="colour-picker-value" value=<<recentColour>>> <$macrocall $name="colour-picker-inner" actions=<<__actions__>>/>
<$transclude $variable="colour-picker-inner" actions=<<actions>>/>
</$set> </$set>
\end \end
\procedure colour-picker-recent(actions) \define colour-picker-recent(actions)
\whitespace trim
{{$:/language/ColourPicker/Recent}}<$list filter="[list[$:/config/ColourPicker/Recent]]" variable="recentColour"> {{$:/language/ColourPicker/Recent}}<$list filter="[list[$:/config/ColourPicker/Recent]]" variable="recentColour">
&#32; &#32;
<$transclude $variable="colour-picker-recent-inner" actions=<<actions>>/> <$macrocall $name="colour-picker-recent-inner" actions=<<__actions__>>/>
</$list> </$list>
\end \end
\procedure colour-picker(actions) \define colour-picker(actions)
\whitespace trim
<div class="tc-colour-chooser"> <div class="tc-colour-chooser">
<$transclude $variable="colour-picker-recent" actions=<<actions>>/> <$macrocall $name="colour-picker-recent" actions=<<__actions__>>/>
--- ---
<$list filter="LightPink Pink Crimson LavenderBlush PaleVioletRed HotPink DeepPink MediumVioletRed Orchid Thistle Plum Violet Magenta Fuchsia DarkMagenta Purple MediumOrchid DarkViolet DarkOrchid Indigo BlueViolet MediumPurple MediumSlateBlue SlateBlue DarkSlateBlue Lavender GhostWhite Blue MediumBlue MidnightBlue DarkBlue Navy RoyalBlue CornflowerBlue LightSteelBlue LightSlateGrey SlateGrey DodgerBlue AliceBlue SteelBlue LightSkyBlue SkyBlue DeepSkyBlue LightBlue PowderBlue CadetBlue Azure LightCyan PaleTurquoise Cyan Aqua DarkTurquoise DarkSlateGrey DarkCyan Teal MediumTurquoise LightSeaGreen Turquoise Aquamarine MediumAquamarine MediumSpringGreen MintCream SpringGreen MediumSeaGreen SeaGreen Honeydew LightGreen PaleGreen DarkSeaGreen LimeGreen Lime ForestGreen Green DarkGreen Chartreuse LawnGreen GreenYellow DarkOliveGreen YellowGreen OliveDrab Beige LightGoldenrodYellow Ivory LightYellow Yellow Olive DarkKhaki LemonChiffon PaleGoldenrod Khaki Gold Cornsilk Goldenrod DarkGoldenrod FloralWhite OldLace Wheat Moccasin Orange PapayaWhip BlanchedAlmond NavajoWhite AntiqueWhite Tan BurlyWood Bisque DarkOrange Linen Peru PeachPuff SandyBrown Chocolate SaddleBrown Seashell Sienna LightSalmon Coral OrangeRed DarkSalmon Tomato MistyRose Salmon Snow LightCoral RosyBrown IndianRed Red Brown FireBrick DarkRed Maroon White WhiteSmoke Gainsboro LightGrey Silver DarkGrey Grey DimGrey Black" variable="colour-picker-value"> <$list filter="LightPink Pink Crimson LavenderBlush PaleVioletRed HotPink DeepPink MediumVioletRed Orchid Thistle Plum Violet Magenta Fuchsia DarkMagenta Purple MediumOrchid DarkViolet DarkOrchid Indigo BlueViolet MediumPurple MediumSlateBlue SlateBlue DarkSlateBlue Lavender GhostWhite Blue MediumBlue MidnightBlue DarkBlue Navy RoyalBlue CornflowerBlue LightSteelBlue LightSlateGrey SlateGrey DodgerBlue AliceBlue SteelBlue LightSkyBlue SkyBlue DeepSkyBlue LightBlue PowderBlue CadetBlue Azure LightCyan PaleTurquoise Cyan Aqua DarkTurquoise DarkSlateGrey DarkCyan Teal MediumTurquoise LightSeaGreen Turquoise Aquamarine MediumAquamarine MediumSpringGreen MintCream SpringGreen MediumSeaGreen SeaGreen Honeydew LightGreen PaleGreen DarkSeaGreen LimeGreen Lime ForestGreen Green DarkGreen Chartreuse LawnGreen GreenYellow DarkOliveGreen YellowGreen OliveDrab Beige LightGoldenrodYellow Ivory LightYellow Yellow Olive DarkKhaki LemonChiffon PaleGoldenrod Khaki Gold Cornsilk Goldenrod DarkGoldenrod FloralWhite OldLace Wheat Moccasin Orange PapayaWhip BlanchedAlmond NavajoWhite AntiqueWhite Tan BurlyWood Bisque DarkOrange Linen Peru PeachPuff SandyBrown Chocolate SaddleBrown Seashell Sienna LightSalmon Coral OrangeRed DarkSalmon Tomato MistyRose Salmon Snow LightCoral RosyBrown IndianRed Red Brown FireBrick DarkRed Maroon White WhiteSmoke Gainsboro LightGrey Silver DarkGrey Grey DimGrey Black" variable="colour-picker-value">
&#32; &#32;
<$transclude $variable="colour-picker-inner" actions=<<actions>>/> <$macrocall $name="colour-picker-inner" actions=<<__actions__>>/>
</$list> </$list>
--- ---
<$edit-text tiddler="$:/config/ColourPicker/New" tag="input" default="" placeholder="" class="tc-tiny-gap-right"/> <$edit-text tiddler="$:/config/ColourPicker/New" tag="input" default="" placeholder=""/>
&#32;
<$edit-text tiddler="$:/config/ColourPicker/New" type="color" tag="input"/> <$edit-text tiddler="$:/config/ColourPicker/New" type="color" tag="input"/>
<$set name="colour-picker-value" value={{$:/config/ColourPicker/New}}> <$set name="colour-picker-value" value={{$:/config/ColourPicker/New}}>
<%if [{$:/config/ColourPicker/New}!is[blank]] %> <$macrocall $name="colour-picker-inner" actions=<<__actions__>>/>
<$transclude $variable="colour-picker-inner" actions=<<actions>>/>
<%endif%>
</$set> </$set>
</div> </div>
+1 -1
View File
@@ -1,7 +1,7 @@
title: $:/core/macros/dumpvariables title: $:/core/macros/dumpvariables
tags: $:/tags/Macro tags: $:/tags/Macro
\procedure dumpvariables() \define dumpvariables()
\whitespace trim \whitespace trim
<ul> <ul>
<$list filter="[variables[]]" variable="varname"> <$list filter="[variables[]]" variable="varname">
+16 -13
View File
@@ -1,36 +1,39 @@
created: 20170715180840889
modified: 20170715180914005
tags: $:/tags/Macro tags: $:/tags/Macro
title: $:/core/macros/image-picker title: $:/core/macros/image-picker
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
\procedure image-picker-thumbnail(actions) \define image-picker-thumbnail(actions)
<$button tag="a" tooltip=<<imageTitle>>><$transclude $variable="actions"/><$transclude tiddler=<<imageTitle>>/></$button> <$button tag="a" tooltip="""$(imageTitle)$"""><$transclude $variable="__actions__"/><$transclude tiddler=<<imageTitle>>/></$button>
\end \end
\procedure image-picker-list(filter,actions) \define image-picker-list(filter,actions)
\whitespace trim \whitespace trim
<$list filter=<<filter>> variable="imageTitle"> <$list filter="""$filter$""" variable="imageTitle">
<$transclude $variable="image-picker-thumbnail" actions=<<actions>>/> <$macrocall $name="image-picker-thumbnail" actions=<<__actions__>>/>
&#32; &#32;
</$list> </$list>
\end \end
\procedure image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]$subfilter$sort[title]]",subfilter:"") \define image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]$subfilter$sort[title]]",subfilter:"")
\whitespace trim \whitespace trim
<div class="tc-image-chooser"> <div class="tc-image-chooser">
<$let state-system=<<qualify "$:/state/image-picker/system">> tv-filter={{{ [<filter>search-replace[$subfilter$],<subfilter>] }}}> <$vars state-system=<<qualify "$:/state/image-picker/system">>>
<$checkbox tiddler=<<state-system>> field="text" checked="show" unchecked="hide" default="hide"> <$checkbox tiddler=<<state-system>> field="text" checked="show" unchecked="hide" default="hide">
<span class="tc-tiny-gap-left">{{$:/language/SystemTiddlers/Include/Prompt}}</span> &#32;
{{$:/language/SystemTiddlers/Include/Prompt}}
</$checkbox> </$checkbox>
<$reveal state=<<state-system>> type="match" text="hide" default="hide" tag="div"> <$reveal state=<<state-system>> type="match" text="hide" default="hide" tag="div">
<$transclude $variable="image-picker-list" filter=`$(tv-filter)$ +[!is[system]]` actions=<<actions>>/> <$macrocall $name="image-picker-list" filter="""$filter$ +[!is[system]]""" actions=<<__actions__>>/>
</$reveal> </$reveal>
<$reveal state=<<state-system>> type="nomatch" text="hide" default="hide" tag="div"> <$reveal state=<<state-system>> type="nomatch" text="hide" default="hide" tag="div">
<$transclude $variable="image-picker-list" filter=<<tv-filter>> actions=<<actions>>/> <$macrocall $name="image-picker-list" filter="""$filter$""" actions=<<__actions__>>/>
</$reveal> </$reveal>
</$let> </$vars>
</div> </div>
\end \end
\procedure image-picker-include-tagged-images(actions) \define image-picker-include-tagged-images(actions)
<$transclude $variable="image-picker" filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]" actions=<<actions>>/> <$macrocall $name="image-picker" filter="[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]" actions=<<__actions__>>/>
\end \end
+39 -36
View File
@@ -1,18 +1,14 @@
title: $:/core/macros/list title: $:/core/macros/list
tags: $:/tags/Macro tags: $:/tags/Macro
\procedure list-links-draggable-drop-actions() \define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage,field:"caption")
<$action-listops $tiddler=<<targetTiddler>> $field=<<targetField>> $subfilter="+[insertbefore<actionTiddler>,<currentTiddler>]"/>
\end
\whitespace trim \whitespace trim
\procedure list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage,field:"caption") <$genesis $type=<<__type__>> class=<<__class__>>>
<$genesis $type=<<type>> class=<<class>>> <$list filter=<<__filter__>> emptyMessage=<<__emptyMessage__>>>
<$list filter=<<filter>> emptyMessage=<<emptyMessage>>> <$genesis $type=<<__subtype__>>>
<$genesis $type=<<subtype>>>
<$link to={{!!title}}> <$link to={{!!title}}>
<$let tv-wikilinks="no"> <$let tv-wikilinks="no">
<$transclude field=<<field>>> <$transclude field=<<__field__>>>
<$view field="title"/> <$view field="title"/>
</$transclude> </$transclude>
</$let> </$let>
@@ -22,19 +18,24 @@ tags: $:/tags/Macro
</$genesis> </$genesis>
\end \end
\procedure list-links-draggable(tiddler,field:"list",emptyMessage,type:"ul",subtype:"li",class:"",itemTemplate) \define list-links-draggable-drop-actions()
<$action-listops $tiddler=<<targetTiddler>> $field=<<targetField>> $subfilter="+[insertbefore<actionTiddler>,<currentTiddler>]"/>
\end
\define list-links-draggable(tiddler,field:"list",emptyMessage,type:"ul",subtype:"li",class:"",itemTemplate)
\whitespace trim
<span class="tc-links-draggable-list"> <span class="tc-links-draggable-list">
<$let targetTiddler=<<tiddler>> targetField=<<field>>> <$vars targetTiddler="""$tiddler$""" targetField="""$field$""">
<$genesis $type=<<type>> class=<<class>>> <$genesis $type=<<__type__>> class="$class$">
<$list filter="[<tiddler>get<field>enlist-input[]]" emptyMessage=<<emptyMessage>>> <$list filter="[list[$tiddler$!!$field$]]" emptyMessage=<<__emptyMessage__>>>
<$droppable <$droppable
actions=<<list-links-draggable-drop-actions>> actions=<<list-links-draggable-drop-actions>>
tag=<<subtype>> tag="""$subtype$"""
enable=<<tv-enable-drag-and-drop>> enable=<<tv-enable-drag-and-drop>>
> >
<div class="tc-droppable-placeholder"/> <div class="tc-droppable-placeholder"/>
<div> <div>
<$transclude tiddler=<<itemTemplate>>> <$transclude tiddler="""$itemTemplate$""">
<$link to={{!!title}}> <$link to={{!!title}}>
<$let tv-wikilinks="no"> <$let tv-wikilinks="no">
<$transclude field="caption"> <$transclude field="caption">
@@ -59,48 +60,50 @@ tags: $:/tags/Macro
</$droppable> </$droppable>
</$tiddler> </$tiddler>
</$genesis> </$genesis>
</$let> </$vars>
</span> </span>
\end \end
\procedure list-tagged-draggable-drop-actions(tag) \define list-tagged-draggable-drop-actions(tag)
\whitespace trim
<!-- Save the current ordering of the tiddlers with this tag --> <!-- Save the current ordering of the tiddlers with this tag -->
<$set name="order" filter="[<tag>tagging[]]"> <$set name="order" filter="[<__tag__>tagging[]]">
<!-- Remove any list-after or list-before fields from the tiddlers with this tag --> <!-- Remove any list-after or list-before fields from the tiddlers with this tag -->
<$list filter="[<tag>tagging[]]"> <$list filter="[<__tag__>tagging[]]">
<$action-deletefield $field="list-before"/> <$action-deletefield $field="list-before"/>
<$action-deletefield $field="list-after"/> <$action-deletefield $field="list-after"/>
</$list> </$list>
<!-- Save the new order to the Tag Tiddler --> <!-- Save the new order to the Tag Tiddler -->
<$action-listops $tiddler=<<tag>> $field="list" $filter="+[enlist<order>] +[insertbefore<actionTiddler>,<currentTiddler>]"/> <$action-listops $tiddler=<<__tag__>> $field="list" $filter="+[enlist<order>] +[insertbefore<actionTiddler>,<currentTiddler>]"/>
<!-- Make sure the newly added item has the right tag --> <!-- Make sure the newly added item has the right tag -->
<!-- Removing this line makes dragging tags within the dropdown work as intended --> <!-- Removing this line makes dragging tags within the dropdown work as intended -->
<!--<$action-listops $tiddler=<<actionTiddler>> $tags=<<tag>>/>--> <!--<$action-listops $tiddler=<<actionTiddler>> $tags=<<__tag__>>/>-->
<!-- Using the following 5 lines as replacement makes dragging titles from outside into the dropdown apply the tag --> <!-- Using the following 5 lines as replacement makes dragging titles from outside into the dropdown apply the tag -->
<$list filter="[<actionTiddler>!contains:tags<tag>]"> <$list filter="[<actionTiddler>!contains:tags<__tag__>]">
<$fieldmangler tiddler=<<actionTiddler>>> <$fieldmangler tiddler=<<actionTiddler>>>
<$action-sendmessage $message="tm-add-tag" $param=<<tag>>/> <$action-sendmessage $message="tm-add-tag" $param=<<__tag__>>/>
</$fieldmangler> </$fieldmangler>
</$list> </$list>
</$set> </$set>
\end \end
\procedure list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div",storyview:"") \define list-tagged-draggable(tag,subFilter,emptyMessage,itemTemplate,elementTag:"div",storyview:"")
\whitespace trim
<span class="tc-tagged-draggable-list"> <span class="tc-tagged-draggable-list">
<$set name="tag" value=<<tag>>> <$set name="tag" value=<<__tag__>>>
<$list <$list
filter=`[<tag>tagging[]$(subFilter)$]` filter="[<__tag__>tagging[]$subFilter$]"
emptyMessage=<<emptyMessage>> emptyMessage=<<__emptyMessage__>>
storyview=<<storyview>> storyview=<<__storyview__>>
> >
<$genesis $type=<<elementTag>> class="tc-menu-list-item"> <$genesis $type=<<__elementTag__>> class="tc-menu-list-item">
<$droppable <$droppable
actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<tag>>/>""" actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>"""
enable=<<tv-enable-drag-and-drop>> enable=<<tv-enable-drag-and-drop>>
> >
<$genesis $type=<<elementTag>> class="tc-droppable-placeholder"/> <$genesis $type=<<__elementTag__>> class="tc-droppable-placeholder"/>
<$genesis $type=<<elementTag>>> <$genesis $type=<<__elementTag__>>>
<$transclude tiddler=<<itemTemplate>>> <$transclude tiddler="""$itemTemplate$""">
<$link to={{!!title}}> <$link to={{!!title}}>
<$let tv-wikilinks="no"> <$let tv-wikilinks="no">
<$transclude field="caption"> <$transclude field="caption">
@@ -115,11 +118,11 @@ tags: $:/tags/Macro
</$list> </$list>
<$tiddler tiddler=""> <$tiddler tiddler="">
<$droppable <$droppable
actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<tag>>/>""" actions="""<$macrocall $name="list-tagged-draggable-drop-actions" tag=<<__tag__>>/>"""
enable=<<tv-enable-drag-and-drop>> enable=<<tv-enable-drag-and-drop>>
> >
<$genesis $type=<<elementTag>> class="tc-droppable-placeholder"/> <$genesis $type=<<__elementTag__>> class="tc-droppable-placeholder"/>
<$genesis $type=<<elementTag>> style="height:0.5em;"/> <$genesis $type=<<__elementTag__>> style="height:0.5em;"/>
</$droppable> </$droppable>
</$tiddler> </$tiddler>
</$set> </$set>
+13 -13
View File
@@ -1,28 +1,28 @@
title: $:/core/macros/translink title: $:/core/macros/translink
tags: $:/tags/Macro tags: $:/tags/Macro
\procedure translink(title,mode:"block") \define translink(title,mode:"block")
\whitespace trim \whitespace trim
<%if [<mode>match[block]] %> <$list filter="[<__mode__>match[block]]">
<div class="tc-translink"> <div class="tc-translink">
<div> <div>
<$link to=<<title>>> <$link to="""$title$""">
<h1><$text text=<<title>>/></h1> <h1><$text text="""$title$"""/></h1>
</$link> </$link>
<$transclude tiddler=<<title>> mode="block"> <$transclude tiddler="""$title$""" mode="block">
<$set name="currentTiddler" value=<<title>>><$transclude tiddler="$:/language/MissingTiddler/Hint"/></$set> <$set name="currentTiddler" value="""$title$"""><$transclude tiddler="$:/language/MissingTiddler/Hint"/></$set>
</$transclude> </$transclude>
</div> </div>
</div> </div>
<%endif%> </$list>
<%if [<mode>match[inline]] %> <$list filter="[<__mode__>match[inline]]">
<span class="tc-translink"> <span class="tc-translink">
<$link to=<<title>> class="tc-tiny-gap-right"> <$link to="""$title$""">
<$text text=<<title>>/> <$text text="""$title$"""/>
</$link> </$link>
(<$transclude tiddler=<<title>> mode="inline"> &#32;(<$transclude tiddler="""$title$""" mode="inline">
<$set name="currentTiddler" value=<<title>>><$transclude tiddler="$:/language/MissingTiddler/Hint"/></$set> <$set name="currentTiddler" value="""$title$"""><$transclude tiddler="$:/language/MissingTiddler/Hint"/></$set>
</$transclude>) </$transclude>)
</span> </span>
<%endif%> </$list>
\end \end
+24 -20
View File
@@ -1,58 +1,62 @@
title: $:/core/macros/tree title: $:/core/macros/tree
tags: $:/tags/Macro tags: $:/tags/Macro
\procedure leaf-link(full-title,chunk,separator: "/") \define leaf-link(full-title,chunk,separator: "/")
<$link to=<<full-title>>><$text text=<<chunk>>/></$link> <$link to=<<__full-title__>>><$text text=<<__chunk__>>/></$link>
\end \end
\define leaf-node(prefix,chunk)
\whitespace trim \whitespace trim
\procedure leaf-node(prefix,chunk)
<li> <li>
<$list filter="[<prefix>addsuffix<chunk>is[shadow]] [<prefix>addsuffix<chunk>is[tiddler]]" variable="full-title"> <$list filter="[<__prefix__>addsuffix<__chunk__>is[shadow]] [<__prefix__>addsuffix<__chunk__>is[tiddler]]" variable="full-title">
<$list filter="[<full-title>removeprefix<prefix>]" variable="chunk"> <$list filter="[<full-title>removeprefix<__prefix__>]" variable="chunk">
<span class="tc-tiny-gap-right">{{$:/core/images/file}}</span><$transclude $variable="leaf-link" full-title=<<full-title>> chunk=<<chunk>>/> <span>{{$:/core/images/file}}</span>&#32;<$macrocall $name="leaf-link" full-title=<<full-title>> chunk=<<chunk>>/>
</$list> </$list>
</$list> </$list>
</li> </li>
\end \end
\procedure branch-node(prefix,chunk,separator: "/") \define branch-node(prefix,chunk,separator: "/")
\whitespace trim
<li> <li>
<$set name="reveal-state" value={{{ [[$:/state/tree/]addsuffix<prefix>addsuffix<chunk>] }}}> <$set name="reveal-state" value={{{ [[$:/state/tree/]addsuffix<__prefix__>addsuffix<__chunk__>] }}}>
<$reveal type="nomatch" stateTitle=<<reveal-state>> text="show"> <$reveal type="nomatch" stateTitle=<<reveal-state>> text="show">
<$button setTitle=<<reveal-state>> setTo="show" class="tc-btn-invisible"> <$button setTitle=<<reveal-state>> setTo="show" class="tc-btn-invisible">
{{$:/core/images/folder}}&#32;<$text text=<<chunk>>/> {{$:/core/images/folder}}&#32;<$text text=<<__chunk__>>/>
</$button> </$button>
</$reveal> </$reveal>
<$reveal type="match" stateTitle=<<reveal-state>> text="show"> <$reveal type="match" stateTitle=<<reveal-state>> text="show">
<$button setTitle=<<reveal-state>> setTo="hide" class="tc-btn-invisible"> <$button setTitle=<<reveal-state>> setTo="hide" class="tc-btn-invisible">
{{$:/core/images/folder}}&#32;<$text text=<<chunk>>/> {{$:/core/images/folder}}&#32;<$text text=<<__chunk__>>/>
</$button> </$button>
</$reveal> </$reveal>
<span class="tc-tiny-gap-left">(<$count filter="[all[shadows+tiddlers]removeprefix<prefix>removeprefix<chunk>] -[<prefix>addsuffix<chunk>]"/>)</span> &#32;
<span>(<$count filter="[all[shadows+tiddlers]removeprefix<__prefix__>removeprefix<__chunk__>] -[<__prefix__>addsuffix<__chunk__>]"/>)</span>
<$reveal type="match" stateTitle=<<reveal-state>> text="show"> <$reveal type="match" stateTitle=<<reveal-state>> text="show">
<$transclude $variable="tree-node" prefix={{{ [<prefix>addsuffix<chunk>] }}} separator=<<separator>>/> <$macrocall $name="tree-node" prefix={{{ [<__prefix__>addsuffix<__chunk__>] }}} separator=<<__separator__>>/>
</$reveal> </$reveal>
</$set> </$set>
</li> </li>
\end \end
\procedure tree-node(prefix,separator: "/") \define tree-node(prefix,separator: "/")
\whitespace trim
<ol> <ol>
<$list filter="[all[shadows+tiddlers]removeprefix<prefix>splitbefore<separator>sort[]!suffix<separator>]" variable="chunk"> <$list filter="[all[shadows+tiddlers]removeprefix<__prefix__>splitbefore<__separator__>sort[]!suffix<__separator__>]" variable="chunk">
<$transclude $variable="leaf-node" prefix=<<prefix>> chunk=<<chunk>> separator=<<separator>>/> <$macrocall $name="leaf-node" prefix=<<__prefix__>> chunk=<<chunk>> separator=<<__separator__>>/>
</$list> </$list>
<$list filter="[all[shadows+tiddlers]removeprefix<prefix>splitbefore<separator>sort[]suffix<separator>]" variable="chunk"> <$list filter="[all[shadows+tiddlers]removeprefix<__prefix__>splitbefore<__separator__>sort[]suffix<__separator__>]" variable="chunk">
<$transclude $variable="branch-node" prefix=<<prefix>> chunk=<<chunk>> separator=<<separator>>/> <$macrocall $name="branch-node" prefix=<<__prefix__>> chunk=<<chunk>> separator=<<__separator__>>/>
</$list> </$list>
</ol> </ol>
\end \end
\procedure tree(prefix: "$:/",separator: "/") \define tree(prefix: "$:/",separator: "/")
\whitespace trim
<div class="tc-tree"> <div class="tc-tree">
<span><$text text=<<prefix>>/></span> <span><$text text=<<__prefix__>>/></span>
<div> <div>
<$transclude $variable="tree-node" prefix=<<prefix>> separator=<<separator>>/> <$macrocall $name="tree-node" prefix=<<__prefix__>> separator=<<__separator__>>/>
</div> </div>
</div> </div>
\end \end