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

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,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0-next.1
4
+
5
+ ### Breaking Changes
6
+
7
+ - **Removed the `min` and `max` properties from `TokenDef` and `TierValueKind` (`'length'` | `'number'` variants).** The panel no longer renders an `<input type="range">` slider on numeric token rows — they are now plain unconstrained number inputs. The mid-keystroke clamp and on-blur clamp logic added in [#313](https://github.com/Takazudo/zudo-design-token-panel/pull/313) are gone; values commit as typed, and the `aria-invalid` / red-border styling for out-of-range values is removed. Real-world use proved sliders too restrictive for a developer tool — devs want to type arbitrary values freely (including deliberately out-of-spec or experimental ones). **Migration**: remove every `min: ...` and `max: ...` field from your token manifests. The internal color-picker `SliderConfig.min` / `.max` (OKLCH/HSL axis bounds) is unrelated and unchanged. (a9b768e, [#325](https://github.com/Takazudo/zudo-design-token-panel/issues/325), [#328](https://github.com/Takazudo/zudo-design-token-panel/pull/328))
8
+
9
+ ### Other Changes
10
+
11
+ - Strip `min` / `max` from 35+ test fixture files. (b8ef56e)
12
+ - Rewrite the [#313](https://github.com/Takazudo/zudo-design-token-panel/pull/313) clamp-regression tests to assert the new free-input contract — value commits as typed, no `aria-invalid` on out-of-range numeric input. (9798e07)
13
+ - Update `packages/zdtp/README.md` and `packages/zdtp/PORTABLE-CONTRACT.md` to drop slider-describing prose and the min/max examples. (e210a2d)
14
+ - Update doc-site reference pages (`token-manifest.mdx`, `architecture.mdx`, `configure-panel.mdx`) to drop the min/max examples and slider-UI prose. (9262585)
15
+
3
16
  ## 0.1.0-next.3
4
17
 
5
18
  ### Features
package/README.md CHANGED
@@ -258,7 +258,7 @@ const spacingTier: TierConfig = {
258
258
  label: 'Spacing M',
259
259
  group: 'hsp',
260
260
  default: '1rem',
261
- type: { kind: 'length', min: 0, max: 4, step: 0.0625, unit: 'rem' },
261
+ type: { kind: 'length', step: 0.0625, unit: 'rem' },
262
262
  },
263
263
  ],
264
264
  };
@@ -480,8 +480,8 @@ spec; this section is the consumer-oriented summary.
480
480
 
481
481
  ```ts
482
482
  export type TierValueKind =
483
- | { kind: 'length'; min: number; max: number; step: number; unit: string }
484
- | { kind: 'number'; min: number; max: number; step: number }
483
+ | { kind: 'length'; step: number; unit: string }
484
+ | { kind: 'number'; step: number }
485
485
  | { kind: 'select'; options: readonly string[] }
486
486
  | { kind: 'text' }
487
487
  | { kind: 'cursor' }
@@ -555,7 +555,7 @@ export const spacingTab: TabConfig = {
555
555
  label: 'Spacing M',
556
556
  group: 'hsp',
557
557
  default: '1rem',
558
- type: { kind: 'length', min: 0, max: 4, step: 0.0625, unit: 'rem' },
558
+ type: { kind: 'length', step: 0.0625, unit: 'rem' },
559
559
  },
560
560
  ],
561
561
  },
@@ -11,7 +11,7 @@ import type { TokenDef } from '../tokens/manifest';
11
11
  * number input go read-only so the user can't accidentally de-pill via typing.
12
12
  *
13
13
  * When the checkbox is OFF the row behaves as a normal `SliderRow` — the user
14
- * can drag or type any value in the manifest's min/max range.
14
+ * can type any numeric value in the number input (unconstrained free input).
15
15
  *
16
16
  * Toggling between modes preserves the last custom value (kept in a ref so we
17
17
  * don't round-trip it through state / persistence) — this is the "without data
@@ -3,10 +3,6 @@ import { type TokenDef } from '../tokens/manifest';
3
3
  * One manifest-driven token row:
4
4
  *
5
5
  * [label] ... [ 1.25 rem] ← label + number input (unit suffix inside)
6
- * [=========o==================] ← full-width range slider
7
- *
8
- * Range input and number input are two-way bound: dragging the slider fills
9
- * the number input live, and typing a value moves the slider once it parses.
10
6
  *
11
7
  * The parent owns the persisted value (stored as a string like `"1.25rem"`);
12
8
  * this row keeps a local "draft" string only for the number input, so users
@@ -24,8 +20,8 @@ export interface SliderRowProps {
24
20
  /** Current persisted value (or the token's default if no override). */
25
21
  value: string;
26
22
  /** Called with the row's `token.id` and the new CSS string (e.g.
27
- * `"0.75rem"`) whenever the user commits a change via slider or a
28
- * parseable number input. */
23
+ * `"0.75rem"`) whenever the user commits a change via a parseable
24
+ * number input. */
29
25
  onChange: (id: string, next: string) => void;
30
26
  }
31
27
  declare function SliderRow({ token, value, onChange }: SliderRowProps): import("preact").JSX.Element;
@@ -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;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
+ {"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;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,QAAQ,CAAC;IAChB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd;;wBAEoB;IACpB,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,gCAqE5D;;AAKD,wBAA+B"}