@unpunnyfuns/swatchbook-blocks 0.64.0 → 0.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +41 -8
- package/dist/index.mjs +322 -204
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +124 -121
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -80,6 +80,13 @@ interface ProjectSnapshot {
|
|
|
80
80
|
activeTheme: string;
|
|
81
81
|
activeAxes: Readonly<Record<string, string>>;
|
|
82
82
|
cssVarPrefix: string;
|
|
83
|
+
/**
|
|
84
|
+
* Project-wide baseline for the row-indicator strip from
|
|
85
|
+
* `config.indicators`. Sits between the hard-coded indicator defaults
|
|
86
|
+
* and a block's `indicators` prop. Optional — hand-built snapshots
|
|
87
|
+
* (tests, MDX) omit it and blocks fall back to the bare defaults.
|
|
88
|
+
*/
|
|
89
|
+
indicators?: Readonly<Record<string, boolean>>;
|
|
83
90
|
diagnostics: readonly VirtualDiagnosticShape[];
|
|
84
91
|
css: string;
|
|
85
92
|
/**
|
|
@@ -99,11 +106,14 @@ interface ProjectSnapshot {
|
|
|
99
106
|
/** The default tuple — `{ axis: axis.default }` for every axis. */
|
|
100
107
|
defaultTuple: Record<string, string>;
|
|
101
108
|
/**
|
|
102
|
-
* Pre-built `resolveAt(tuple)` accessor. The addon's preview
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
109
|
+
* Pre-built `resolveAt(tuple)` accessor. The addon's preview decorator
|
|
110
|
+
* instantiates this once per iframe lifetime. When present, use-project
|
|
111
|
+
* prefers it over building its own from `tokenGraph`, so it MUST preserve
|
|
112
|
+
* alias provenance — back it with `resolveAllWithProvenanceAt`, not the raw
|
|
113
|
+
* leaf `resolveAllAt`, or axis-varying aliases silently lose their chain /
|
|
114
|
+
* reverse refs / description at non-default tuples. Hand-built snapshots
|
|
115
|
+
* (tests, MDX) can omit this; blocks then fall back to a provenance-aware
|
|
116
|
+
* graph-backed resolver built from `tokenGraph`.
|
|
107
117
|
*/
|
|
108
118
|
resolveAt?: (tuple: Record<string, string>) => Record<string, VirtualTokenShape>;
|
|
109
119
|
}
|
|
@@ -226,6 +236,18 @@ declare function ColorPalette({
|
|
|
226
236
|
sortDir
|
|
227
237
|
}: ColorPaletteProps): ReactElement;
|
|
228
238
|
//#endregion
|
|
239
|
+
//#region src/indicators/resolve.d.ts
|
|
240
|
+
/** The individually-toggleable indicators in the row strip. `alias` covers the whole alias unit (forward chain + reverse count). */
|
|
241
|
+
type IndicatorName = 'alias' | 'variance' | 'gamut' | 'deprecation' | 'description' | 'composes';
|
|
242
|
+
/**
|
|
243
|
+
* Consumer-facing indicator config for the strip-hosting blocks:
|
|
244
|
+
* - `true` — every indicator on (including the opt-in `description`)
|
|
245
|
+
* - `false` — every indicator off
|
|
246
|
+
* - object — per-key override layered over the defaults
|
|
247
|
+
* - omitted — the defaults
|
|
248
|
+
*/
|
|
249
|
+
type IndicatorsProp = boolean | Partial<Record<IndicatorName, boolean>>;
|
|
250
|
+
//#endregion
|
|
229
251
|
//#region src/ColorTable.d.ts
|
|
230
252
|
interface ColorTableProps {
|
|
231
253
|
/**
|
|
@@ -279,6 +301,8 @@ interface ColorTableProps {
|
|
|
279
301
|
variants?: Record<string, string>;
|
|
280
302
|
/** Disambiguates persisted UI state for two identical-prop tables on a page. */
|
|
281
303
|
id?: string;
|
|
304
|
+
/** Configure the per-row indicator strip. See `IndicatorsProp`. Gamut stays in the Value cell, so it is not part of this strip. */
|
|
305
|
+
indicators?: IndicatorsProp;
|
|
282
306
|
}
|
|
283
307
|
declare function ColorTable({
|
|
284
308
|
filter,
|
|
@@ -288,7 +312,8 @@ declare function ColorTable({
|
|
|
288
312
|
searchable,
|
|
289
313
|
onSelect,
|
|
290
314
|
variants,
|
|
291
|
-
id
|
|
315
|
+
id,
|
|
316
|
+
indicators
|
|
292
317
|
}: ColorTableProps): ReactElement;
|
|
293
318
|
//#endregion
|
|
294
319
|
//#region src/Diagnostics.d.ts
|
|
@@ -603,6 +628,8 @@ interface TokenSnapshot {
|
|
|
603
628
|
readonly diagnostics: readonly VirtualDiagnosticShape[];
|
|
604
629
|
readonly css: string;
|
|
605
630
|
readonly cssVarPrefix: string;
|
|
631
|
+
/** Project-wide baseline for the row-indicator strip from `config.indicators`. */
|
|
632
|
+
readonly indicators: Readonly<Record<string, boolean>>;
|
|
606
633
|
readonly listing: Readonly<Record<string, VirtualTokenListingShape>>;
|
|
607
634
|
readonly tokenGraph: VirtualTokenGraph;
|
|
608
635
|
readonly defaultTuple: Record<string, string>;
|
|
@@ -805,6 +832,8 @@ interface TokenNavigatorProps {
|
|
|
805
832
|
* props otherwise.
|
|
806
833
|
*/
|
|
807
834
|
id?: string;
|
|
835
|
+
/** Configure the per-row indicator strip. See `IndicatorsProp`. */
|
|
836
|
+
indicators?: IndicatorsProp;
|
|
808
837
|
}
|
|
809
838
|
declare function TokenNavigator({
|
|
810
839
|
root,
|
|
@@ -812,7 +841,8 @@ declare function TokenNavigator({
|
|
|
812
841
|
initiallyExpanded,
|
|
813
842
|
searchable,
|
|
814
843
|
onSelect,
|
|
815
|
-
id
|
|
844
|
+
id,
|
|
845
|
+
indicators
|
|
816
846
|
}: TokenNavigatorProps): ReactElement;
|
|
817
847
|
//#endregion
|
|
818
848
|
//#region src/TokenTable.d.ts
|
|
@@ -855,6 +885,8 @@ interface TokenTableProps {
|
|
|
855
885
|
onSelect?(path: string): void;
|
|
856
886
|
/** Disambiguates persisted UI state for two identical-prop tables on a page. */
|
|
857
887
|
id?: string;
|
|
888
|
+
/** Configure the per-row indicator strip. See `IndicatorsProp`. */
|
|
889
|
+
indicators?: IndicatorsProp;
|
|
858
890
|
}
|
|
859
891
|
declare function TokenTable({
|
|
860
892
|
filter,
|
|
@@ -864,7 +896,8 @@ declare function TokenTable({
|
|
|
864
896
|
sortDir,
|
|
865
897
|
searchable,
|
|
866
898
|
onSelect,
|
|
867
|
-
id
|
|
899
|
+
id,
|
|
900
|
+
indicators
|
|
868
901
|
}: TokenTableProps): ReactElement;
|
|
869
902
|
//#endregion
|
|
870
903
|
//#region src/TypographyScale.d.ts
|