title: $:/PaletteManager \define lingo-base() $:/language/ControlPanel/Palette/Editor/ \define describePaletteColour(colour) <$transclude tiddler="$:/language/Docs/PaletteColours/$colour$"><$text text="$colour$"/> \end \define edit-colour-placeholder() edit $(colourName)$ \end \define colour-tooltip(showhide) $showhide$ editor for $(newColourName)$ \define resolve-colour(macrocall) \import $:/core/macros/utils \whitespace trim <$wikify name="name" text="""$macrocall$"""> <> \end \define delete-colour-index-actions() <$action-setfield $index=<>/> \define palette-manager-colour-row-segment() \whitespace trim <$edit-text index=<> tag="input" placeholder=<> default=""/>
<$edit-text index=<> type="color" tag="input" class="tc-palette-manager-colour-input"/> <$list filter="[getindexremoveprefix[<<]removesuffix[>>]] [getindexremoveprefix[<$]removesuffix[/>]]" variable="ignore"> <$set name="state" value={{{ [[$:/state/palettemanager/]addsuffixaddsuffix[/]addsuffix] }}}> <$wikify name="newColourName" text="""<$macrocall $name="resolve-colour" macrocall={{{ [getindex] }}}/>"""> <$reveal state=<> type="nomatch" text="show"> <$button tooltip=<> aria-label=<> class="tc-btn-invisible" set=<> setTo="show">{{$:/core/images/down-arrow}}<$text text=<> class="tc-small-gap-left"/>
<$reveal state=<> type="match" text="show"> <$button tooltip=<> aria-label=<> class="tc-btn-invisible" actions="""<$action-deletetiddler $tiddler=<>/>""">{{$:/core/images/up-arrow}}<$text text=<> class="tc-small-gap-left"/>
<$reveal state=<> type="match" text="show"> <$set name="colourName" value=<>>
<>

\end \define palette-manager-colour-row() \whitespace trim <$button tooltip={{$:/language/ControlPanel/Palette/Editor/Delete/Hint}} aria-label={{$:/language/ControlPanel/Palette/Editor/Delete/Hint}} class="tc-btn-invisible" actions=<>> {{$:/core/images/delete-button}} ''<$macrocall $name="describePaletteColour" colour=<>/>''
<$macrocall $name="colourName" $output="text/plain"/> <> \end \define palette-manager-table() \whitespace trim <$list filter="[all[shadows+tiddlers]tag[$:/tags/Palette]indexes[]]" variable="colourName"> <$list filter="[indexes[]removeprefixsuffix[]]" variable="ignore" emptyMessage=""" <$list filter="[{$:/state/palettemanager/showexternal}removeprefix[yes]suffix[]]" variable="ignore"> <> """> <>
\end <$set name="currentTiddler" value={{$:/palette}}> <> <$link to={{$:/palette}}><$macrocall $name="currentTiddler" $output="text/plain"/> <$list filter="[all[current]is[shadow]is[tiddler]]" variable="listItem"> <> <$button message="tm-delete-tiddler" param={{$:/palette}}><> <$list filter="[all[current]is[shadow]!is[tiddler]]" variable="listItem"> <> <$button message="tm-new-tiddler" param={{$:/palette}}><> <$checkbox tiddler="$:/state/palettemanager/showexternal" field="text" checked="yes" unchecked="no"><> <>