@takazudo/zdtp 0.7.0 → 0.8.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/CHANGELOG.md CHANGED
@@ -8,6 +8,42 @@ The format is based on Keep a Changelog, and release notes are generated from th
8
8
 
9
9
  No unreleased changes yet.
10
10
 
11
+ ## [0.8.0] - 2026-09-12
12
+
13
+ ### Breaking Changes
14
+
15
+ - feat(dashboard): render mode-aware token regions (bd8fb6b). Mode-dependent rows now precede independent rows in separate regions. Independent specimens follow `chrome`, while dependent specimens follow `mode`. **Migration**: update custom DOM/CSS integrations to target `.zdtp-dashboard__region`; set both `mode="dark"` and `chrome="dark"` for uniformly dark output, or compose filtered instances with `include="mode-dependent"` and `include="mode-independent"`.
16
+ - feat(dashboard): derive chrome colors from theme inputs (495af9f). The outer root is transparent and derived chrome paints the header and regions. **Migration**: provide any surrounding page background on your wrapper and customize the four inherited `--zdtp-dashboard-light-bg`, `--zdtp-dashboard-light-fg`, `--zdtp-dashboard-dark-bg`, and `--zdtp-dashboard-dark-fg` inputs instead of relying on the former fixed palette.
17
+ - feat(dashboard): model mode dependence per row (d570b9b). Existing top-level `light-dark()` defaults display and emit the selected side in light/dark snapshots; empty inventory groups are omitted. **Migration**: use `mode="host"` when the declaration should remain a browser-selected pair, and read the authored manifest when you need unfiltered source order or empty groups. The internal model helper's positional-mode overload remains available.
18
+ - feat(zdtp): add scoped import modal flow (a8223ba). Load becomes available after JSON analysis. **Migration**: in UI automation, choose **Analyze** or wait for **Import scope**, select the desired tabs/options, and then choose **Load**.
19
+
20
+ ### Features
21
+
22
+ - feat(zdtp): add mode-dependent token helpers (28cceb8)
23
+ - feat(zdtp): add scoped token import analysis and mode mapping (e2ea25a)
24
+ - feat(zdtp): apply manifest color modes across panel lifecycle (08bfb52)
25
+ - feat(zdtp): render and serialize manifest mode rows (2b501bf)
26
+
27
+ Mode pairs are display-only in the panel. Per-mode editing is tracked in [#953](https://github.com/Takazudo/zudo-design-token-panel/issues/953). Diff-only export retains its comparison against `item.default`; use `includeDefaults: true` for a complete export.
28
+
29
+ ### Fixed
30
+
31
+ - fix: preserve current references during single-side imports (87dc04b)
32
+
33
+ ### Other Changes
34
+
35
+ - test: clean up host adapter alias lifecycle (9361c48)
36
+ - test: drain host adapter autoload lifecycle (d8f7f2c)
37
+ - test(dashboard): guard against hostile host styles (070ae9b)
38
+ - test: verify mode pairs on real browser apply targets (def8853)
39
+ - test: align packed dashboard SSR with region chrome (d836407)
40
+ - test: analyze imports in the browser header workflow (50d1953)
41
+ - docs: cover mode-aware dashboard consumers (b2496d6)
42
+ - docs: capture mode-aware dashboard browser evidence (42ca61a)
43
+ - docs(deps): sync vendored zudo-doc scaffold to v5.21.0 ([#937](https://github.com/Takazudo/zudo-design-token-panel/pull/937)) (a7c56e2)
44
+ - docs(deps): sync pin comment, vendored manifest, and doc prose to 0.7.0 ([#936](https://github.com/Takazudo/zudo-design-token-panel/pull/936)) (7966f0b)
45
+ - chore(deps): bump @takazudo/* registry deps to frozen targets ([#936](https://github.com/Takazudo/zudo-design-token-panel/pull/936)) (af2f40f)
46
+
11
47
  ## [0.7.0] - 2026-09-09
12
48
 
13
49
  ### Breaking Changes
@@ -57,6 +57,8 @@
57
57
  *
58
58
  * For non-color tokens, the sparse maps may retain empty or default-equal
59
59
  * values. Those entries are omitted so Apply matches UI and diff-only export.
60
+ * Explicit `modes` rows are also emitted without an override, so their manifest
61
+ * pair is materialized on disk; existing overrides still take precedence.
60
62
  *
61
63
  * Pure / no IO — safe to import anywhere (browser, Node, tests).
62
64
  */
@@ -1,6 +1,6 @@
1
- import { c as y, g as m, a as w, b, i as P } from "../panel-config-Crn5QJGy.js";
2
- import { g, Z as A } from "../tweak-state-Dhjqig0C.js";
3
- import { s as D, l as E, a as _, i as c, r as f, c as k, b as S, d } from "../autoload-state-CGnis85c.js";
1
+ import { c as y, g as m, a as w, b, i as P } from "../panel-config-DKfob-1r.js";
2
+ import { g, Z as A } from "../tweak-state-BiaKbhXN.js";
3
+ import { s as D, l as E, a as _, i as c, r as f, c as k, b as S, d } from "../autoload-state-CtB0e8mY.js";
4
4
  import { READABLE_STATE_KEY_SUFFIXES as T } from "../constants.js";
5
5
  const u = "tokenpanel-config";
6
6
  function I() {
@@ -1,4 +1,4 @@
1
- import { s as t } from "../panel-config-Crn5QJGy.js";
1
+ import { s as t } from "../panel-config-DKfob-1r.js";
2
2
  import { c as d } from "../color-schemes-CgzOBqGO.js";
3
3
  import { F as r, G as m, a as g, S as z } from "../manifest-DvuKi7I4.js";
4
4
  const e = {
@@ -1,4 +1,4 @@
1
- import { g as n, j as o } from "./panel-config-Crn5QJGy.js";
1
+ import { g as n, j as o } from "./panel-config-DKfob-1r.js";
2
2
  function c() {
3
3
  return typeof document < "u" && document !== null && typeof document.getElementById == "function";
4
4
  }
@@ -69,6 +69,11 @@ export interface ColorClusterDataConfig {
69
69
  label?: string;
70
70
  /** Expected palette size. Used for init + v1 validation. */
71
71
  paletteSize: number;
72
+ /** Manifest mode pairs keyed by palette slot; used to seed dense state. */
73
+ paletteModes?: Record<number, {
74
+ light: string;
75
+ dark: string;
76
+ }>;
72
77
  /** Map of base-role name → CSS custom-property name. Partial: a cluster
73
78
  * declares only the roles it actually has. */
74
79
  baseRoles: Partial<Record<BaseRoleKey, string>>;
@@ -114,8 +119,9 @@ import type { TabConfig } from "../tokens/tier-model.js";
114
119
  /**
115
120
  * Derive a `ColorClusterDataConfig` from a color `TabConfig`.
116
121
  *
117
- * - Palette items: the first tier whose items all have `kind: 'color'` and
118
- * are not `semantic: true`. Each item's `cssVar` becomes a palette slot;
122
+ * - Palette items: the first non-reference, non-semantic tier beginning with
123
+ * a color-kind item or an explicit `modes` pair. Each item's `cssVar`
124
+ * becomes a palette slot;
119
125
  * `paletteCssVarTemplate` is synthesised as `"{item.cssVar}"` with `{n}`
120
126
  * replaced by the slot index. Because item cssVars are explicit (e.g.
121
127
  * `--zfb-palette-0`) rather than template-based, we derive the template
@@ -133,6 +139,8 @@ import type { TabConfig } from "../tokens/tier-model.js";
133
139
  * render) but `semanticDefaults`/`semanticCssNames` are populated from the
134
140
  * semantic tier so the Semantic Tokens section isn't left empty (#463).
135
141
  *
142
+ * - Explicit mode pairs in additional tiers become literal semantic defaults
143
+ * so they participate in the cluster's apply and clear paths as well.
136
144
  * - Metadata comes from `tab.colorExtras` (required on a color tab).
137
145
  *
138
146
  * `tabs` is the panel config's full tabs array, used to resolve a semantic
@@ -1,4 +1,5 @@
1
1
  export { TokenDashboard } from "./token-dashboard.js";
2
2
  export type { TokenDashboardProps, DashboardPreviewKind } from "./token-dashboard.js";
3
- export type { DashboardMode, DashboardChrome } from "./types.js";
3
+ export type { DashboardMode, DashboardInclude, DashboardChrome } from "./types.js";
4
4
  export type { TabConfig, TierConfig, TierItem } from "../tokens/tier-model.js";
5
+ export { splitLightDark, resolveModeSides, isModeDependent } from "../tokens/mode-dependence.js";