@takazudo/zdtp 0.1.0-next.2 → 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,15 @@
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
+
3
13
  ## 0.1.0-next.2
4
14
 
5
15
  ### Fixed
@@ -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,eAAO,MAAM,uBAAuB,EAAG,aAAsB,CAAC;AA0C9D,MAAM,WAAW,oBAAoB;IACnC,6EAA6E;IAC7E,GAAG,EAAE,SAAS,CAAC;IACf,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD;AAMD,iBAAS,eAAe,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,oBAAoB,gCA4NtF;;AAED,wBAAqC"}
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,eAAO,MAAM,uBAAuB,EAAG,aAAsB,CAAC;AA6B9D,MAAM,WAAW,oBAAoB;IACnC,6EAA6E;IAC7E,GAAG,EAAE,SAAS,CAAC;I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