@takazudo/zdtp 0.1.0-next.1 → 0.1.0-next.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-next.3
4
+
5
+ ### Features
6
+
7
+ - **Tier-ref selector is now a native `<select>` and reflects live override values.** The custom `role="listbox"` dropdown (with its open/focusedIndex state machine, ARIA plumbing, click-outside handler, and keyboard-nav callbacks) was replaced by a native `<select>`, dropping ~250 lines of UI code. Each `<option>` label now shows `--var-name (resolved-value)` using `resolveTierItemValue()` from the apply pipeline — so when a referenced tier-1 token's value is overridden via its slider/text row, the tier-2 selector's option labels reflect the new value immediately instead of staying stuck on the manifest default. (570a1b1) ([#312](https://github.com/Takazudo/zudo-design-token-panel/issues/312))
8
+
9
+ ### Fixed
10
+
11
+ - **Number inputs no longer overwrite the user's draft mid-keystroke.** `SliderRow` and the generic-tab item editor used to parse-and-clamp on every keystroke, immediately commit the clamped value, and round-trip it back into the input — so typing `2` then `2` (expecting `22`) snapped the input to `6` when the token's `max` was `6`. Out-of-range or empty drafts are now flagged with a `--invalid` red border and held without committing; on blur, an invalid draft reverts to the last known-good value. The slider thumb continues to scrub live. (21d3afa) ([#313](https://github.com/Takazudo/zudo-design-token-panel/issues/313))
12
+
13
+ ## 0.1.0-next.2
14
+
15
+ ### Fixed
16
+
17
+ - **Palette grids ignore the density slider again.** Palette swatch grids
18
+ reflowed on `--tokenpanel-grid-min`, so the density slider (dense/cozy/wide →
19
+ 12rem/18rem/100%) stretched the fixed-size swatch chips into oversized /
20
+ single-column cells. They now reflow on their natural `3.5rem` min, leaving the
21
+ base/semantic rows that density is meant to control untouched.
22
+ - **Token-name tooltip is no longer transparent.** The shared tooltip portals to
23
+ `document.body`, outside `.tokenpanel-shell`, so its chrome tokens resolved to
24
+ nothing and it rendered transparent. `.tokenpanel-tooltip` is now part of the
25
+ token-scope `:where(...)` selector — the same mechanism the color-picker and
26
+ highlight-settings popovers use to resolve chrome tokens outside the shell.
27
+ - **Eye (highlight) toggle now appears on Base color rows.** The Base section's
28
+ background/foreground rows never passed a `cssVar`, so the highlight toggle was
29
+ omitted even though `cluster.baseRoles` maps those roles to real CSS vars. Each
30
+ Base row's eye is now wired to `cluster.baseRoles.background`/`.foreground`, so
31
+ base tokens get the same visibility toggle as palette and semantic tokens. The
32
+ eye is omitted only when the cluster declares no `cssVar` for that role.
33
+
3
34
  ## 0.1.0-next.1
4
35
 
5
36
  ### Fixed — Astro consumers: `@takazudo/zdtp/astro` value import broke real npm installs ([#308](https://github.com/Takazudo/zudo-design-token-panel/issues/308))
@@ -1 +1 @@
1
- {"version":3,"file":"slider-row.d.ts","sourceRoot":"","sources":["../../src/controls/slider-row.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAkC,MAAM,oBAAoB,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,QAAQ,CAAC;IAChB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd;;kCAE8B;IAC9B,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,iBAAS,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,cAAc,gCA6E5D;;AAKD,wBAA+B"}
1
+ {"version":3,"file":"slider-row.d.ts","sourceRoot":"","sources":["../../src/controls/slider-row.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAkC,MAAM,oBAAoB,CAAC;AAQnF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,QAAQ,CAAC;IAChB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd;;kCAE8B;IAC9B,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,iBAAS,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,cAAc,gCA+G5D;;AAKD,wBAA+B"}
@@ -1,9 +1,9 @@
1
1
  import type { TabConfig } from '../tokens/tier-model';
2
2
  /**
3
3
  * Sentinel string passed to `onChange` when the user picks "Literal...".
4
- * The parent component (Wave 5) interprets this as a request to flip the
5
- * item back into its kind-specific editor (slider / text / select) writing a
6
- * literal CSS override.
4
+ * The parent component interprets this as a request to flip the item back
5
+ * into its kind-specific editor (slider / text / select) writing a literal
6
+ * CSS override.
7
7
  */
8
8
  export declare const TIER_REF_LITERAL_SIGNAL: "__literal__";
9
9
  export interface TierRefSelectorProps {
@@ -26,8 +26,14 @@ export interface TierRefSelectorProps {
26
26
  * - Picking "Literal...": `onChange(itemId, TIER_REF_LITERAL_SIGNAL)`
27
27
  */
28
28
  onChange: (itemId: string, next: string) => void;
29
+ /**
30
+ * Returns the resolved (override-aware) preview string for a tier-1 item id.
31
+ * Each option label is formatted as `${item.cssVar} (${truncated preview})`.
32
+ * Pass a wrapper around resolveTierItemValue using the current tweak-state map.
33
+ */
34
+ previewValueFor: (refItemId: string) => string;
29
35
  }
30
- declare function TierRefSelector({ tab, tierId, itemId, value, onChange }: TierRefSelectorProps): import("preact").JSX.Element;
36
+ declare function TierRefSelector({ tab, tierId, itemId, value, onChange, previewValueFor }: TierRefSelectorProps): import("preact").JSX.Element;
31
37
  declare const _default: typeof TierRefSelector;
32
38
  export default _default;
33
39
  //# sourceMappingURL=tier-ref-selector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tier-ref-selector.d.ts","sourceRoot":"","sources":["../../src/controls/tier-ref-selector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAwB,MAAM,sBAAsB,CAAC;AAM5E;;;;;GAKG;AACH,e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