@takazudo/zdtp 0.1.0-next.3 → 0.2.0-next.2
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 +19 -0
- package/README.md +4 -4
- package/dist/controls/pill-slider-row.d.ts +1 -1
- package/dist/controls/select-row.d.ts.map +1 -1
- package/dist/controls/slider-row.d.ts +2 -6
- package/dist/controls/slider-row.d.ts.map +1 -1
- package/dist/controls/text-row.d.ts.map +1 -1
- package/dist/controls/token-label.d.ts +17 -0
- package/dist/controls/token-label.d.ts.map +1 -0
- package/dist/index.js +1411 -1461
- package/dist/panel.d.ts.map +1 -1
- package/dist/tabs/_generic-item-editor.d.ts +1 -3
- package/dist/tabs/_generic-item-editor.d.ts.map +1 -1
- package/dist/tabs/color-tab.d.ts.map +1 -1
- package/dist/tabs/font-tab.d.ts.map +1 -1
- package/dist/tabs/generic-tab.d.ts.map +1 -1
- package/dist/tabs/size-tab.d.ts.map +1 -1
- package/dist/tabs/spacing-tab.d.ts.map +1 -1
- package/dist/tokens/manifest.d.ts +3 -7
- package/dist/tokens/manifest.d.ts.map +1 -1
- package/dist/tokens/tier-model.d.ts +0 -4
- package/dist/tokens/tier-model.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0-next.2
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- **Token-name tooltip parity across all tabs (Size / Font / Spacing / Easing / GenericTab).** The Color tab already showed a rich custom tooltip with the full token name on hover; every other tab fell back to the native HTML `title` attribute. A new shared `TokenLabel` component renders the same `.tokenpanel-tooltip` primitive at every token-name display site. `TooltipProvider` was lifted from `color-tab.tsx` to `panel.tsx` so all tabs share a single provider. (559c59f, 426e9c6, 84f5981, [#330](https://github.com/Takazudo/zudo-design-token-panel/issues/330), [#337](https://github.com/Takazudo/zudo-design-token-panel/pull/337))
|
|
8
|
+
|
|
9
|
+
## 0.2.0-next.1
|
|
10
|
+
|
|
11
|
+
### Breaking Changes
|
|
12
|
+
|
|
13
|
+
- **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))
|
|
14
|
+
|
|
15
|
+
### Other Changes
|
|
16
|
+
|
|
17
|
+
- Strip `min` / `max` from 35+ test fixture files. (b8ef56e)
|
|
18
|
+
- 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)
|
|
19
|
+
- Update `packages/zdtp/README.md` and `packages/zdtp/PORTABLE-CONTRACT.md` to drop slider-describing prose and the min/max examples. (e210a2d)
|
|
20
|
+
- Update doc-site reference pages (`token-manifest.mdx`, `architecture.mdx`, `configure-panel.mdx`) to drop the min/max examples and slider-UI prose. (9262585)
|
|
21
|
+
|
|
3
22
|
## 0.1.0-next.3
|
|
4
23
|
|
|
5
24
|
### 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',
|
|
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';
|
|
484
|
-
| { kind: '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',
|
|
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
|
|
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-row.d.ts","sourceRoot":"","sources":["../../src/controls/select-row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"select-row.d.ts","sourceRoot":"","sources":["../../src/controls/select-row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGnD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,QAAQ,CAAC;IAChB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,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,gCAqC5D;;AAID,wBAA+B"}
|
|
@@ -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
|
|
28
|
-
*
|
|
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;
|
|
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;AAGnF;;;;;;;;;;;;;;;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,gCAmE5D;;AAKD,wBAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-row.d.ts","sourceRoot":"","sources":["../../src/controls/text-row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"text-row.d.ts","sourceRoot":"","sources":["../../src/controls/text-row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAInD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,QAAQ,CAAC;IAChB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd;gBACY;IACZ,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,iBAAS,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,YAAY,gCAqCxD;;AAID,wBAA6B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface TokenLabelProps {
|
|
2
|
+
cssVar: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Renders a token-name label with the shared rich tooltip.
|
|
8
|
+
* Replaces bare `<span title={cssVar}>` usages across all tabs so every
|
|
9
|
+
* token-name display site uses the same `.tokenpanel-tooltip` primitive.
|
|
10
|
+
*
|
|
11
|
+
* The optional `label` sub-label is shown only when it differs from `cssVar`
|
|
12
|
+
* (avoids redundant repetition for tokens whose label IS the cssVar).
|
|
13
|
+
*/
|
|
14
|
+
declare function TokenLabelInner({ cssVar, label, className }: TokenLabelProps): import("preact").JSX.Element;
|
|
15
|
+
export declare const TokenLabel: typeof TokenLabelInner;
|
|
16
|
+
export default TokenLabel;
|
|
17
|
+
//# sourceMappingURL=token-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-label.d.ts","sourceRoot":"","sources":["../../src/controls/token-label.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,iBAAS,eAAe,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,eAAe,gCAUrE;AAED,eAAO,MAAM,UAAU,wBAAwB,CAAC;AAChD,eAAe,UAAU,CAAC"}
|