Introduce an improved but temporary cache invalidation method for palettes

This commit is contained in:
Jeremy Ruston
2025-01-26 17:54:47 +00:00
parent d2bbc56c78
commit 317e1245c8
4 changed files with 87 additions and 2 deletions

View File

@@ -0,0 +1,40 @@
title: Operators/Palettes/Accumulate
description: Recursively accumulate palette definitions
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]
title: Output
\import [subfilter{$:/core/config/GlobalImportFilter}]
\parsermode inline
<$text text={{{ [accumulate-palette-entries[MyPalette]] }}}/>
+
title: $:/palette
MyPalette
+
title: MyPalette
name: My Palette
description: My custom palette
tags: $:/tags/Palette
type: application/x-tiddler-dictionary
palette-import: MyOtherPalette
color-scheme: light
page-background: <<colour custom>>
custom: #f4e4d4
+
title: MyOtherPalette
name: My Other Palette
description: My other custom palette
tags: $:/tags/Palette
type: application/x-tiddler-dictionary
color-scheme: light
page-background: #d4e4f4
background: red
+
title: ExpectedResult
["page-background:#d4e4f4","background:red","page-background:&lt;&lt;colour custom&gt;&gt;","custom:#f4e4d4"]{"title":"MyPalette","name":"My Palette","description":"My custom palette","tags":"$:/tags/Palette","type":"application/x-tiddler-dictionary","palette-import":"MyOtherPalette","color-scheme":"light","text":"page-background: &lt;&lt;colour custom&gt;&gt;\ncustom: #f4e4d4"}

View File

@@ -1,6 +1,6 @@
title: Operators/Palettes/BasicLookup
description: Compute the
description: Basic palette lookups
type: text/vnd.tiddlywiki-multiple
tags: [[$:/tags/wiki-test-spec]]