@apollion-dsi/tokens 4.3.0 → 4.4.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.
Files changed (2) hide show
  1. package/package.json +4 -5
  2. package/CHANGELOG.md +0 -112
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apollion-dsi/tokens",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "description": "Apollion Design System — Framework-agnostic design tokens",
5
5
  "homepage": "https://github.com/apollion-ds/apollion",
6
6
  "license": "MIT",
@@ -50,8 +50,7 @@
50
50
  "directory": "packages/tokens"
51
51
  },
52
52
  "scripts": {
53
- "build": "node ./esbuild.cjs",
54
- "postbuild": "tsc --emitDeclarationOnly",
53
+ "build": "node ./esbuild.cjs && tsc --emitDeclarationOnly",
55
54
  "check-types": "tsc --noEmit",
56
55
  "lint": "eslint src --quiet",
57
56
  "lint:full": "eslint src",
@@ -71,7 +70,7 @@
71
70
  "zod": "4.4.3"
72
71
  },
73
72
  "devDependencies": {
74
- "@apollion-dsi/core": "4.3.0",
73
+ "@apollion-dsi/core": "workspace:*",
75
74
  "@apollion-dsi/eslint-config": "0.8.0",
76
75
  "@types/culori": "4.0.1",
77
76
  "@types/jest": "30.0.0",
@@ -83,4 +82,4 @@
83
82
  "ts-jest": "^29.4.11",
84
83
  "typescript": "6.0.3"
85
84
  }
86
- }
85
+ }
package/CHANGELOG.md DELETED
@@ -1,112 +0,0 @@
1
- # @apollion-dsi/tokens
2
-
3
- ## 4.3.0
4
-
5
- ## 4.2.0
6
-
7
- ### Minor Changes
8
-
9
- - 12ae4e0: feat(tokens): DTCG 2025.10 remainders — dimension references, per-token metadata, and Resolver (R5)
10
- - **Spacing + composite sub-value references**: `spacing` and `border.width`
11
- now reference primitive scales (`{space.*}`, `{border-width.*}`) instead of
12
- inlining literals. The `space` primitives are built per density via
13
- `createSpacing`, so references resolve correctly under compact/normal/spacious.
14
- - **`$deprecated` + `$description` per token**: populated from a `TOKEN_META`
15
- registry through the IR into the JSON output (a stale-key guard fails the
16
- build if a meta entry points at a non-existent token).
17
- - **DTCG Resolver (R5)**: the JSON surface now emits a single `resolver.json`
18
- plus composable `sets/` (axis-invariant `base` + per-axis colour/spacing sets)
19
- instead of one fully-resolved document per variant — a hard cutover, made
20
- pre-GA. A composition-equivalence test proves `base + colour + spacing`
21
- reproduces the old per-variant document exactly. The CSS and TS surfaces are
22
- unchanged: still per-variant, fully resolved, byte-identical.
23
-
24
- ## 4.1.0
25
-
26
- ### Minor Changes
27
-
28
- - 063e0e9: Align `@apollion-dsi/tokens` DTCG output with the Design Tokens Format Module 2025.10.
29
- - **Structured values:** `color` `$value` is now an OKLch object `{ colorSpace, components, hex, alpha? }` and `dimension` is `{ value, unit }` (was bare hex / length strings).
30
- - **Typed IR:** a single intermediate representation (`src/ir.ts`) drives the JSON/CSS/TS renderers as pure projections.
31
- - **Reference graph:** JSON emits a `color` primitives layer (structural SSOT) and foundation `bg`/`text` colours reference it via DTCG aliases (`{color.primary.base}`), with inline fallback when a resolved value diverges (e.g. surface inversion).
32
- - **Composite tokens:** `border` (dimension / strokeStyle), `typography` (fontFamily / fontWeight / number + dimension) and `shadow` (DTCG shadow composite) now ship; values DTCG cannot model (em `letterSpacing`, `textTransform`, `fontStyle`, `100%` radius) travel in `$extensions` under `com.apollion.*`.
33
-
34
- `@apollion-dsi/core` now exports the `themes/{border,depth,font}` subpaths so tokens consumes them as the single source of truth.
35
-
36
- CSS/TS outputs for the existing `bg`/`text`/`spacing` layers are byte-identical; JSON is the spec-interop surface.
37
-
38
- ## 4.0.0
39
-
40
- ### Major Changes
41
-
42
- - bd7d6cb: # v4.0.0 — OKLch + Dimension + Token Split
43
-
44
- The v4 epic per [ADR-006](../packages/core/docs/adr/ADR-006-v4-oklch-dimension-token-split.md) + [PRD-002](../packages/core/docs/prd/PRD-002-v4-epic-execution.md). DS-from-scratch (Q-G grilling 2026-05-24); no consumer migration. Greenfield adoption via [MIGRATION-v4.md](../packages/core/docs/migration/MIGRATION-v4.md).
45
-
46
- ## Breaking — `@apollion-dsi/core@4.0.0`
47
- - **Root barrel removed.** `import { Button } from '@apollion-dsi/core'` no longer works. Use granular subpaths (`@apollion-dsi/core/elements/button`). ESLint rule flips warn → error. ADR-001 Slice 6 finalized here. ADR-006 §3.7 E7.
48
- - **OKLch palette derivation.** All `mount*Colors` helpers + `getOppositeColor` migrated from `color@5` RGB lerp to `culori@4` OKLch lerp. Validated by `spike/culori-oklch-lerp-parity` (0 unexpected regressions; greyscale 19× more uniform in OKLAB L). ADR-006 §2 B1 + §6 S2.
49
- - **`defaultInputColors.opposite` token value changed.** OKLch hue rotation differs from HSL rotation (the OKLch is the perceptually correct opposite). Audit `theme.colors.opposite.*` consumers.
50
- - **Dimension axis added.** `<ApollionProvider dimension="compact|normal|spacious">` is a new prop; default `normal` preserves v3.x spacing byte-exact. ADR-006 §6 S3.
51
- - **`vendors/Color` eliminated.** Internal `color@5` vendor deleted (zero call-sites after S6 migration). `color` + `@types/color` removed from `package.json#dependencies`. WCAG functions migrated to `culori.wcagContrast` + `culori.wcagLuminance` (100% bit-exact parity per `spike/culori-wcag-parity`).
52
- - **`invertForSurface(theme, surface, mode)` 3-arg signature.** `mode` is additive optional — existing 2-arg calls continue to work; `mode` is a placeholder for future PRD-003 mode-aware inversion. ADR-006 §6 S6.
53
-
54
- ## Minor — `@apollion-dsi/eslint-config`
55
- - `culori` + `zod` added to `VENDORED_V4_LIBS` — must import via `vendors/Culori|Zod`.
56
- - `color` removed from `VENDORED_T2_LIBS` (eliminated).
57
- - `no-restricted-imports` for `'@apollion-dsi/core'` root: `warn` → `error` (per v4 barrel removal above).
58
-
59
- ## Major — `@apollion-dsi/tokens@4.0.0` (first release)
60
-
61
- New package — framework-agnostic design tokens consumed via `runtime/v1` versioned API + `apollion-tokens build` CLI.
62
- - **Strangler Fig builders** duplicated from core (`colors.ts`, `spacing.ts`); Foundation + Surface re-exported. Parity enforced by `__tests__/parity.test.ts`. ADR-006 §3.1 + §6 S4.
63
- - **Atomic + idempotent build CLI.** `apollion-tokens build [--check] [--verbose] --config <path> [--out <dir>]`. Emits `dist/{css,json,ts}/*` + `dist/manifest.json` with sha256 audit trail. Rerun byte-identical. `--check` mode for CI gate. ADR-006 §3.5 + §6 S5.
64
- - **DTCG-compliant JSON output** (tech-radar R1).
65
- - **`as const` TypeScript output** (tech-radar R4).
66
- - **CSS `@property` declarations** (tech-radar R3) + custom properties `--apollion-{layer}-{role}-{variant}`.
67
- - **Sandboxed `apollion.config.mjs` loader** (`node:vm` + zod schema) — threat-model T2+E1 mitigation. ADR-006 §3.8 B3 + §6 S6.
68
- - **Lockstep version** with `@apollion-dsi/core` via `.changeset/config.json#fixed`.
69
-
70
- ## Minor — `@apollion-dsi/scripts`
71
- - `codemods/v4-migrate.mjs` — one-way codemod (Q-G10: no `--revert`; DEX/Jovian/Fanaticofc don't consume v3.x, no legacy to revert). Transforms `invertForSurface` to 3-arg, flags `createTheme` for manual hoist to `apollion.config.mjs`. Transcript JSONL audit log.
72
- - `verify-no-install-scripts.js` — supply-chain hardening; blocks `preinstall`/`install`/`postinstall` in `@apollion-dsi/*` workspaces (threat-model E2 mitigation).
73
-
74
- ## Spike validation (preserved local, NOT merged to main)
75
- - `spike/culori-wcag-parity` — 100.0000% bit-exact culori vs color@5 (262 measurements / 10 palettes). `vendors/Color` elimination LOCKED.
76
- - `spike/culori-oklch-lerp-parity` — 0 unexpected regressions in 68 deltas; greyscale ramp 19× more uniform in OKLAB L. DECISION ✅ PROCEED.
77
-
78
- ### Patch Changes
79
-
80
- - Updated dependencies [032f81c]
81
- - Updated dependencies [32f7a1d]
82
- - Updated dependencies [2dadba5]
83
- - Updated dependencies [820a612]
84
- - Updated dependencies [c056ee3]
85
- - Updated dependencies [d032437]
86
- - Updated dependencies [00e0525]
87
- - Updated dependencies [1c87be8]
88
- - Updated dependencies [d1192da]
89
- - Updated dependencies [3194fba]
90
- - Updated dependencies [f359982]
91
- - Updated dependencies [5d17ebc]
92
- - Updated dependencies [bd7d6cb]
93
- - Updated dependencies [6545751]
94
- - Updated dependencies [36eaf4a]
95
- - Updated dependencies [802828f]
96
- - Updated dependencies [e14469c]
97
- - Updated dependencies [81cd55b]
98
- - Updated dependencies [c57c548]
99
- - Updated dependencies [879eedd]
100
- - Updated dependencies [e2abc9c]
101
- - Updated dependencies [75961a1]
102
- - Updated dependencies [e55019a]
103
- - Updated dependencies [fba9a41]
104
- - Updated dependencies [3a90653]
105
- - Updated dependencies [5fca933]
106
- - Updated dependencies [ea3dc3a]
107
- - Updated dependencies [51f71f6]
108
- - Updated dependencies [0a1baeb]
109
- - Updated dependencies [6d1371e]
110
- - Updated dependencies [e55019a]
111
- - Updated dependencies [29081ae]
112
- - @apollion-dsi/core@4.0.0