@apollion-dsi/tokens 4.9.1 → 4.11.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/README.md +10 -18
- package/lib/build.cjs +6 -6
- package/lib/build.esm.js +6 -6
- package/lib/cli.mjs +7 -7
- package/package.json +5 -10
- package/src/ir.ts +21 -0
- package/CHANGELOG.md +0 -162
package/README.md
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Framework-agnostic design tokens for Apollion Design System v4+.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@apollion-dsi/tokens)
|
|
6
|
+
|
|
7
|
+
**Status:** ✅ GA since 4.2.0 (v4). Versioned in lockstep with `@apollion-dsi/core`.
|
|
6
8
|
|
|
7
9
|
## Versioned API
|
|
8
10
|
|
|
9
11
|
Single public entry: `@apollion-dsi/tokens/runtime/v1`.
|
|
10
12
|
|
|
11
|
-
Future major surface changes go to `runtime/v2`, `runtime/v3`, etc. — `v1` is preserved indefinitely (Strangler Fig
|
|
13
|
+
Future major surface changes go to `runtime/v2`, `runtime/v3`, etc. — `v1` is preserved indefinitely (Strangler Fig).
|
|
12
14
|
|
|
13
15
|
```ts
|
|
14
16
|
import { TOKENS_RUNTIME_API_VERSION } from '@apollion-dsi/tokens/runtime/v1';
|
|
@@ -30,26 +32,16 @@ Tokens em JSON estruturado — values are **structured objects**, not shorthand
|
|
|
30
32
|
|
|
31
33
|
## Coupling to `@apollion-dsi/core`
|
|
32
34
|
|
|
33
|
-
Hard rule
|
|
35
|
+
Hard rule:
|
|
34
36
|
|
|
35
37
|
- `core` declares `@apollion-dsi/tokens` in `optionalDependencies` (NOT `dependencies`).
|
|
36
38
|
- Consumer that does not opt into `apollion.config.mjs#output.runtime: true` never installs tokens.
|
|
37
|
-
- Lockstep version enforced via `.changeset/config.json#fixed` array from `4.0.0
|
|
39
|
+
- Lockstep version enforced via the `.changeset/config.json#fixed` array from `4.0.0`.
|
|
38
40
|
|
|
39
|
-
##
|
|
41
|
+
## Documentation
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
| ------------------------------------ | ---------- | ------------------------------------------------- |
|
|
43
|
-
| S1 — scaffold + versioned API | ✅ shipped | `runtime/v1` namespace, esbuild ESM/CJS dual emit |
|
|
44
|
-
| S2 — culori vendor + OKLch lerp | ✅ shipped | `vendors/Culori` in core; OKLch palette |
|
|
45
|
-
| S3 — Dimension axis | ✅ shipped | `compact/normal/spacious` multipliers |
|
|
46
|
-
| S4 — Foundation/Surface builders | ✅ shipped | Strangler Fig parity with core |
|
|
47
|
-
| S5 — atomic+idempotent build CLI | ✅ shipped | `apollion-tokens build` + `dist/manifest.json` |
|
|
48
|
-
| S6 — Config-First + sandboxed loader | ✅ shipped | `apollion.config.mjs` + zod schema |
|
|
49
|
-
| S7 — release `4.0.0` | ✅ shipped | lockstep changesets with core |
|
|
43
|
+
Official docs: <https://www.apollion.com.br>
|
|
50
44
|
|
|
51
|
-
##
|
|
45
|
+
## License
|
|
52
46
|
|
|
53
|
-
|
|
54
|
-
- [PRD-002 — v4 epic execution](../core/docs/prd/PRD-002-v4-epic-execution.md)
|
|
55
|
-
- [`packages/core/docs/v4-baseline-review.md`](../core/docs/v4-baseline-review.md)
|
|
47
|
+
MIT.
|
package/lib/build.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var F=Object.defineProperty;var Xe=Object.getOwnPropertyDescriptor;var Ye=Object.getOwnPropertyNames;var qe=Object.prototype.hasOwnProperty;var s=(e,n)=>F(e,"name",{value:n,configurable:!0});var Ke=(e,n)=>{for(var o in n)F(e,o,{get:n[o],enumerable:!0})},Ze=(e,n,o,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of Ye(n))!qe.call(e,t)&&t!==o&&F(e,t,{get:()=>n[t],enumerable:!(r=Xe(n,t))||r.enumerable});return e};var Qe=e=>Ze(F({},"__esModule",{value:!0}),e);var Cn={};Ke(Cn,{build:()=>wn,check:()=>Tn});module.exports=Qe(Cn);var g=require("node:fs/promises"),ze=require("node:os"),D=require("node:path");var C=require("@apollion-dsi/core/themes/border"),P=require("@apollion-dsi/core/themes/depth"),R=require("@apollion-dsi/core/themes/font"),q=require("@apollion-dsi/core/themes/spacing"),v=require("culori");var te=require("@apollion-dsi/core/themes/dimension");function j({multiplier:e=.25,alias:n},o){let r=o!==void 0?te.DIMENSION_MULTIPLIERS[o]:e;return(...t)=>t.map(i=>{let a=typeof i=="string"?n[i]:i;return`${r*a}rem`}).join(" ")}s(j,"createSpacing");var X={"bg.primary":{description:"Primary action surface \u2014 the brand\u2019s dominant call-to-action background."},"bg.secondary":{description:"Secondary action surface \u2014 supporting actions paired with the primary."},"bg.danger":{description:"Destructive / error surface \u2014 irreversible or failing actions."},"bg.success":{description:"Positive confirmation surface \u2014 completed or healthy states."},"bg.info":{description:"Informational surface \u2014 neutral, non-blocking notices.",deprecated:"Use bg.information once the foundation role is renamed (tracked for S6)."},"text.on-primary":{description:"Text/icon colour with guaranteed contrast over bg.primary."},"text.on-danger":{description:"Text/icon colour with guaranteed contrast over bg.danger."},"space.medium":{description:"Base spacing step (1rem at normal density) \u2014 the layout rhythm unit."},"space.large":{description:"Comfortable spacing step \u2014 section padding and card gutters."},"spacing.md":{description:"Medium foundation spacing alias \u2014 references the space.medium primitive."},"spacing.lg":{description:"Large foundation spacing alias \u2014 references the space.large primitive."},"border.radius.md":{description:"Default card corner radius."},"border.width.thin":{description:"Hairline border \u2014 dividers and default input outlines."},"border.width.regular":{description:"Standard emphasis border \u2014 focused/active controls."}};function Y(e){let n=Object.keys(X).filter(o=>!e.has(o));if(n.length>0)throw new Error(`token-meta: ${n.length} stale TOKEN_META key(s) resolve to no IR node: ${n.join(", ")}. Update src/token-meta.ts to match the current IR paths.`)}s(Y,"assertTokenMetaResolves");var en=(0,v.converter)("oklch");function h(e){return typeof e.type=="string"&&"value"in e}s(h,"isToken");function I(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}s(I,"kebab");function se(e){return e.split(".").map(I).join(".")}s(se,"kebabPath");function V(e){return e.kind==="ref"?e.resolved.raw:e.raw}s(V,"rawValue");function M(e,n){return Number(e.toFixed(n))||0}s(M,"round");function K(e){let n=en((0,v.parse)(e));if(!n)return{kind:"color",raw:e,components:[0,0,0],hex:"#000000"};let o=[M(n.l,4),M(n.c,4),M(n.h??0,2)],r=(0,v.formatHex)(n)??"#000000";return n.alpha!==void 0&&n.alpha!==1?{kind:"color",raw:e,components:o,alpha:M(n.alpha,4),hex:r}:{kind:"color",raw:e,components:o,hex:r}}s(K,"toColorValue");var ae=/^(-?(?:\d+\.?\d*|\.\d+))(px|rem)$/;function T(e){let n=ae.exec(e.trim());if(n)return{kind:"dimension",raw:e,value:Number(n[1]),unit:n[2]};let o=Number.parseFloat(e);return{kind:"dimension",raw:e,value:Number.isFinite(o)?o:0,unit:"rem"}}s(T,"toDimensionValue");function y(e){return{type:"color",value:K(e)}}s(y,"colorToken");function ie(e){let n={};for(let[o,r]of Object.entries(e))n[o]=y(r);return n}s(ie,"recordColorGroup");var nn=["main","opposite","complementary","primary","secondary","tertiary","success","danger","warning","information"];function ce(e){let n={};for(let o of nn){let r=e[o];n[o]={base:y(r.base),dark:y(r.dark),action:y(r.action),active:y(r.active),light:y(r.light)}}return n.grayscale=ie(e.grayscale),n.neutral=ie(e.neutral),n.baseDark=y(e.baseDark??"#000000"),n.baseLight=y(e.baseLight??"#ffffff"),n.deepDark=y(e.deepDark??"#000000"),n.deepLight=y(e.deepLight??"#ffffff"),n}s(ce,"buildColorPrimitives");function le(e){let n=j(q.defaultInputSpacing,e),o={};for(let r of Object.keys(q.defaultInputSpacing.alias))o[r]={type:"dimension",value:T(n(r))};return o}s(le,"buildSpacePrimitives");function de(){let e={};for(let[n,o]of Object.entries(C.defaultInputBorder.borderWidth))e[n]={type:"dimension",value:T(o)};return e}s(de,"buildBorderWidthPrimitives");function on(e,n){return{color:ce(e),space:le(n),borderWidth:de()}}s(on,"buildPrimitives");var ue={primary:"color.primary.base",secondary:"color.secondary.base",tertiary:"color.tertiary.base",success:"color.success.base",danger:"color.danger.base",warning:"color.warning.base",info:"color.information.base"},pe={onPrimary:"color.baseLight",onSecondary:"color.baseLight",onTertiary:"color.baseDark",onSuccess:"color.baseLight",onDanger:"color.baseLight",onWarning:"color.baseDark",onInfo:"color.baseLight"};function rn(e,n){let o=e;for(let r of n.split(".").slice(1))if(o&&typeof o=="object"&&r in o)o=o[r];else return;return typeof o=="string"?o:void 0}s(rn,"lookupPrimitive");function A(e,n,o){let r={};for(let[t,i]of Object.entries(e)){let a=o[t],c=a?rn(n,a):void 0;r[t]=a&&c===i?{type:"color",value:{kind:"ref",path:a,resolved:K(i)}}:y(i)}return r}s(A,"colorRefGroup");var fe={xs:"space.xs",sm:"space.small",md:"space.medium",lg:"space.large",xl:"space.xl",xxl:"space.xxl"},tn={none:"border-width.none",thin:"border-width.thin",regular:"border-width.regular",great:"border-width.great",bold:"border-width.bold"};function sn(e,n){let o=n.split("."),r=o[0]==="border-width"?"borderWidth":o[0],t=e[r];for(let i of o.slice(1))if(t&&!h(t)&&i in t)t=t[i];else return;return t&&h(t)&&t.value.kind==="dimension"?t.value.raw:void 0}s(sn,"lookupDimensionPrimitive");function Z(e,n,o){let r={};for(let[t,i]of Object.entries(e)){let a=o[t],c=a?sn(n,a):void 0;r[t]=a&&c===i?{type:"dimension",value:{kind:"ref",path:a,resolved:T(i)}}:{type:"dimension",value:T(i)}}return r}s(Z,"dimensionRefGroup");function me(e){let n={},o={};for(let[i,a]of Object.entries(C.defaultInputBorder.borderRadius))ae.test(a)?n[i]={type:"dimension",value:T(a)}:o[i]=a;let r=Z(C.defaultInputBorder.borderWidth,e,tn),t={};for(let[i,a]of Object.entries(C.defaultInputBorder.borderStyle))t[i]={type:"strokeStyle",value:{kind:"strokeStyle",raw:a,style:a}};return{group:{radius:n,width:r,style:t},extensions:o}}s(me,"buildBorder");function ge(e){let n=(0,R.createFont)(R.defaultInputFont,e),o={};for(let[c,u]of Object.entries(R.defaultInputFont.fontFamily)){let f=u.replace(/;\s*$/,"").trim();o[c]={type:"fontFamily",value:{kind:"fontFamily",raw:f,family:f}}}let r={};for(let[c,u]of Object.entries(n.fontSize))r[c]={type:"dimension",value:T(u)};let t={};for(let[c,u]of Object.entries(R.defaultInputFont.fontWeight))t[c]={type:"fontWeight",value:{kind:"fontWeight",raw:`${u}`,weight:u}};let i={};for(let[c,u]of Object.entries(R.defaultInputFont.lineHeight))i[c]={type:"number",value:{kind:"number",raw:`${u}`,number:u}};let a={letterSpacing:R.defaultInputFont.letterSpacing,textTransform:R.defaultInputFont.textTransform,fontStyle:R.defaultInputFont.fontStyle};return{group:{family:o,size:r,weight:t,lineHeight:i},extensions:a}}s(ge,"buildFont");var an=/rgba?\([^)]*\)|#[0-9a-fA-F]+|[a-zA-Z]+$/;function cn(e){let n=e.trim(),o=n.startsWith("inset");o&&(n=n.slice(5).trim());let r=n.match(an),t=r?r[0]:"#000000",a=(r?n.slice(0,r.index).trim():n).split(/\s+/).filter(Boolean),c=s(u=>T(a[u]??"0px"),"dim");return{kind:"shadow",raw:e,shadow:{color:K(t),offsetX:c(0),offsetY:c(1),blur:c(2),spread:c(3),inset:o}}}s(cn,"parseShadow");function ye(e){let n=(0,P.createDeth)(e),o={};for(let r of Object.keys(P.levelValues))o[r]={type:"shadow",value:cn(n(r))};return o}s(ye,"buildShadow");function N(e,n,o){let r={};for(let[t,i]of Object.entries(e)){let a=n?`${n}.${I(t)}`:I(t);if(h(i)){o.add(a);let c=X[a];r[t]=c&&(c.description!==void 0||c.deprecated!==void 0)?{...i,...c.description!==void 0?{description:c.description}:{},...c.deprecated!==void 0?{deprecated:c.deprecated}:{}}:i}else r[t]=N(i,a,o)}return r}s(N,"decorateGroup");function ln(e){let n=new Set,o=N(e.primitives,"",n),r=N(e.groups,"",n);return Y(n),{...e,primitives:o,groups:r}}s(ln,"decorateMeta");function L(e,n){return N(e,"",n)}s(L,"decorateSlice");function he(e,n,o){for(let[r,t]of Object.entries(e)){let i=n?`${n}.${I(r)}`:I(r);h(t)?o.add(i):he(t,i,o)}}s(he,"collectPaths");function be(e){let n=new Set;for(let o of e)he(o.groups,"",n);Y(n)}s(be,"assertSlicesMetaComplete");function Re(){let e=de(),o=me({borderWidth:e}),r={};Object.keys(o.extensions).length>0&&(r["com.apollion.border"]={radius:o.extensions});let t=new Set;return{groups:L({"border-width":e,border:o.group},t),extensions:r}}s(Re,"buildBaseIR");function Ie(e){let n=ge(e),o=new Set;return{groups:L({font:n.group},o),extensions:{"com.apollion.font":n.extensions}}}s(Ie,"buildFontIR");function ke(e,n){let o=ce(n),r=new Set;return{groups:L({color:o,bg:A(e.bg,n,ue),text:A(e.text,n,pe),shadow:ye(n)},r),extensions:{}}}s(ke,"buildColorIR");function Se(e,n){let o=le(n),r={space:o},t=new Set;return{groups:L({space:o,spacing:Z(e.spacing,r,fe)},t),extensions:{}}}s(Se,"buildSpacingIR");function dn(e,n,o){let r={brand:o.brand,mode:o.mode,surface:o.surface,dimension:o.dimension},t=on(n,o.dimension),i=me(t),a=ge(o.dimension),c={"com.apollion.variant":r,"com.apollion.font":a.extensions};Object.keys(i.extensions).length>0&&(c["com.apollion.border"]={radius:i.extensions});let u={description:`Apollion DS tokens \u2014 DTCG 2025.10. Variant: ${r.brand}/${r.mode}/${r.surface}/${r.dimension}.`,meta:r,primitives:t,groups:{bg:A(e.bg,n,ue),text:A(e.text,n,pe),spacing:Z(e.spacing,t,fe),border:i.group,font:a.group,shadow:ye(n)},extensions:c};return ln(u)}s(dn,"buildIR");var xe=dn;var un="/* Generated by apollion-tokens build \u2014 DO NOT EDIT. See apollion.config.mjs. */";function De(e,n,o){for(let[r,t]of Object.entries(e)){let i=[...n,I(r)];h(t)?o.push(` --apollion-${i.join("-")}: ${V(t.value)};`):De(t,i,o)}}s(De,"emitVars");function we(e,n,o){for(let[r,t]of Object.entries(e)){let i=[...n,I(r)];h(t)?t.type==="color"&&o.push(` @property --apollion-${i.join("-")} { syntax: '<color>'; inherits: true; initial-value: ${V(t.value)}; }`):we(t,i,o)}}s(we,"emitProperties");function Te(e){let{brand:n,mode:o,surface:r,dimension:t}=e.meta,i=[un,""];return i.push(`/* Variant: brand=${n} mode=${o} surface=${r} dimension=${t} */`,"",":root {"),De(e.groups,[],i),i.push("}",""),i.push("@supports (background: paint(squircle)) or (color: oklch(0% 0 0)) {"),we(e.groups,[],i),i.push("}",""),i.join(`
|
|
2
|
-
`)}s(
|
|
3
|
-
`}s(B,"renderSet");function
|
|
4
|
-
`}s(
|
|
5
|
-
`)}s(
|
|
6
|
-
`}s(
|
|
1
|
+
"use strict";var F=Object.defineProperty;var qe=Object.getOwnPropertyDescriptor;var Ke=Object.getOwnPropertyNames;var Ze=Object.prototype.hasOwnProperty;var s=(e,n)=>F(e,"name",{value:n,configurable:!0});var Qe=(e,n)=>{for(var o in n)F(e,o,{get:n[o],enumerable:!0})},en=(e,n,o,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of Ke(n))!Ze.call(e,t)&&t!==o&&F(e,t,{get:()=>n[t],enumerable:!(r=qe(n,t))||r.enumerable});return e};var nn=e=>en(F({},"__esModule",{value:!0}),e);var $n={};Qe($n,{build:()=>vn,check:()=>Cn});module.exports=nn($n);var g=require("node:fs/promises"),Ye=require("node:os"),D=require("node:path");var C=require("@apollion-dsi/core/themes/border"),se=require("@apollion-dsi/core/themes/colors"),P=require("@apollion-dsi/core/themes/depth"),R=require("@apollion-dsi/core/themes/font"),q=require("@apollion-dsi/core/themes/spacing"),v=require("culori");var ie=require("@apollion-dsi/core/themes/dimension");function j({multiplier:e=.25,alias:n},o){let r=o!==void 0?ie.DIMENSION_MULTIPLIERS[o]:e;return(...t)=>t.map(i=>{let a=typeof i=="string"?n[i]:i;return`${r*a}rem`}).join(" ")}s(j,"createSpacing");var X={"bg.primary":{description:"Primary action surface \u2014 the brand\u2019s dominant call-to-action background."},"bg.secondary":{description:"Secondary action surface \u2014 supporting actions paired with the primary."},"bg.danger":{description:"Destructive / error surface \u2014 irreversible or failing actions."},"bg.success":{description:"Positive confirmation surface \u2014 completed or healthy states."},"bg.info":{description:"Informational surface \u2014 neutral, non-blocking notices.",deprecated:"Use bg.information once the foundation role is renamed (tracked for S6)."},"text.on-primary":{description:"Text/icon colour with guaranteed contrast over bg.primary."},"text.on-danger":{description:"Text/icon colour with guaranteed contrast over bg.danger."},"space.medium":{description:"Base spacing step (1rem at normal density) \u2014 the layout rhythm unit."},"space.large":{description:"Comfortable spacing step \u2014 section padding and card gutters."},"spacing.md":{description:"Medium foundation spacing alias \u2014 references the space.medium primitive."},"spacing.lg":{description:"Large foundation spacing alias \u2014 references the space.large primitive."},"border.radius.md":{description:"Default card corner radius."},"border.width.thin":{description:"Hairline border \u2014 dividers and default input outlines."},"border.width.regular":{description:"Standard emphasis border \u2014 focused/active controls."}};function Y(e){let n=Object.keys(X).filter(o=>!e.has(o));if(n.length>0)throw new Error(`token-meta: ${n.length} stale TOKEN_META key(s) resolve to no IR node: ${n.join(", ")}. Update src/token-meta.ts to match the current IR paths.`)}s(Y,"assertTokenMetaResolves");var on=(0,v.converter)("oklch");function h(e){return typeof e.type=="string"&&"value"in e}s(h,"isToken");function I(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}s(I,"kebab");function ae(e){return e.split(".").map(I).join(".")}s(ae,"kebabPath");function V(e){return e.kind==="ref"?e.resolved.raw:e.raw}s(V,"rawValue");function M(e,n){return Number(e.toFixed(n))||0}s(M,"round");function Z(e){let n=on((0,v.parse)(e));if(!n)return{kind:"color",raw:e,components:[0,0,0],hex:"#000000"};let o=[M(n.l,4),M(n.c,4),M(n.h??0,2)],r=(0,v.formatHex)(n)??"#000000";return n.alpha!==void 0&&n.alpha!==1?{kind:"color",raw:e,components:o,alpha:M(n.alpha,4),hex:r}:{kind:"color",raw:e,components:o,hex:r}}s(Z,"toColorValue");var ce=/^(-?(?:\d+\.?\d*|\.\d+))(px|rem)$/;function T(e){let n=ce.exec(e.trim());if(n)return{kind:"dimension",raw:e,value:Number(n[1]),unit:n[2]};let o=Number.parseFloat(e);return{kind:"dimension",raw:e,value:Number.isFinite(o)?o:0,unit:"rem"}}s(T,"toDimensionValue");function y(e){return{type:"color",value:Z(e)}}s(y,"colorToken");function K(e){let n={};for(let[o,r]of Object.entries(e))n[o]=y(r);return n}s(K,"recordColorGroup");function le(e){let n=(0,se.createReadableTextLayer)(e),o={};for(let[r,t]of Object.entries(n.palettes))o[r]=y(t);return o.neutral=K(n.neutral),o}s(le,"buildReadableTextGroup");var rn=["main","opposite","complementary","primary","secondary","tertiary","success","danger","warning","information"];function de(e){let n={};for(let o of rn){let r=e[o];n[o]={base:y(r.base),dark:y(r.dark),action:y(r.action),active:y(r.active),light:y(r.light)}}return n.grayscale=K(e.grayscale),n.neutral=K(e.neutral),n.baseDark=y(e.baseDark??"#000000"),n.baseLight=y(e.baseLight??"#ffffff"),n.deepDark=y(e.deepDark??"#000000"),n.deepLight=y(e.deepLight??"#ffffff"),n}s(de,"buildColorPrimitives");function ue(e){let n=j(q.defaultInputSpacing,e),o={};for(let r of Object.keys(q.defaultInputSpacing.alias))o[r]={type:"dimension",value:T(n(r))};return o}s(ue,"buildSpacePrimitives");function pe(){let e={};for(let[n,o]of Object.entries(C.defaultInputBorder.borderWidth))e[n]={type:"dimension",value:T(o)};return e}s(pe,"buildBorderWidthPrimitives");function tn(e,n){return{color:de(e),space:ue(n),borderWidth:pe()}}s(tn,"buildPrimitives");var fe={primary:"color.primary.base",secondary:"color.secondary.base",tertiary:"color.tertiary.base",success:"color.success.base",danger:"color.danger.base",warning:"color.warning.base",info:"color.information.base"},me={onPrimary:"color.baseLight",onSecondary:"color.baseLight",onTertiary:"color.baseDark",onSuccess:"color.baseLight",onDanger:"color.baseLight",onWarning:"color.baseDark",onInfo:"color.baseLight"};function sn(e,n){let o=e;for(let r of n.split(".").slice(1))if(o&&typeof o=="object"&&r in o)o=o[r];else return;return typeof o=="string"?o:void 0}s(sn,"lookupPrimitive");function A(e,n,o){let r={};for(let[t,i]of Object.entries(e)){let a=o[t],c=a?sn(n,a):void 0;r[t]=a&&c===i?{type:"color",value:{kind:"ref",path:a,resolved:Z(i)}}:y(i)}return r}s(A,"colorRefGroup");var ge={xs:"space.xs",sm:"space.small",md:"space.medium",lg:"space.large",xl:"space.xl",xxl:"space.xxl"},an={none:"border-width.none",thin:"border-width.thin",regular:"border-width.regular",great:"border-width.great",bold:"border-width.bold"};function cn(e,n){let o=n.split("."),r=o[0]==="border-width"?"borderWidth":o[0],t=e[r];for(let i of o.slice(1))if(t&&!h(t)&&i in t)t=t[i];else return;return t&&h(t)&&t.value.kind==="dimension"?t.value.raw:void 0}s(cn,"lookupDimensionPrimitive");function Q(e,n,o){let r={};for(let[t,i]of Object.entries(e)){let a=o[t],c=a?cn(n,a):void 0;r[t]=a&&c===i?{type:"dimension",value:{kind:"ref",path:a,resolved:T(i)}}:{type:"dimension",value:T(i)}}return r}s(Q,"dimensionRefGroup");function ye(e){let n={},o={};for(let[i,a]of Object.entries(C.defaultInputBorder.borderRadius))ce.test(a)?n[i]={type:"dimension",value:T(a)}:o[i]=a;let r=Q(C.defaultInputBorder.borderWidth,e,an),t={};for(let[i,a]of Object.entries(C.defaultInputBorder.borderStyle))t[i]={type:"strokeStyle",value:{kind:"strokeStyle",raw:a,style:a}};return{group:{radius:n,width:r,style:t},extensions:o}}s(ye,"buildBorder");function he(e){let n=(0,R.createFont)(R.defaultInputFont,e),o={};for(let[c,u]of Object.entries(R.defaultInputFont.fontFamily)){let f=u.replace(/;\s*$/,"").trim();o[c]={type:"fontFamily",value:{kind:"fontFamily",raw:f,family:f}}}let r={};for(let[c,u]of Object.entries(n.fontSize))r[c]={type:"dimension",value:T(u)};let t={};for(let[c,u]of Object.entries(R.defaultInputFont.fontWeight))t[c]={type:"fontWeight",value:{kind:"fontWeight",raw:`${u}`,weight:u}};let i={};for(let[c,u]of Object.entries(R.defaultInputFont.lineHeight))i[c]={type:"number",value:{kind:"number",raw:`${u}`,number:u}};let a={letterSpacing:R.defaultInputFont.letterSpacing,textTransform:R.defaultInputFont.textTransform,fontStyle:R.defaultInputFont.fontStyle};return{group:{family:o,size:r,weight:t,lineHeight:i},extensions:a}}s(he,"buildFont");var ln=/rgba?\([^)]*\)|#[0-9a-fA-F]+|[a-zA-Z]+$/;function dn(e){let n=e.trim(),o=n.startsWith("inset");o&&(n=n.slice(5).trim());let r=n.match(ln),t=r?r[0]:"#000000",a=(r?n.slice(0,r.index).trim():n).split(/\s+/).filter(Boolean),c=s(u=>T(a[u]??"0px"),"dim");return{kind:"shadow",raw:e,shadow:{color:Z(t),offsetX:c(0),offsetY:c(1),blur:c(2),spread:c(3),inset:o}}}s(dn,"parseShadow");function be(e){let n=(0,P.createDeth)(e),o={};for(let r of Object.keys(P.levelValues))o[r]={type:"shadow",value:dn(n(r))};return o}s(be,"buildShadow");function N(e,n,o){let r={};for(let[t,i]of Object.entries(e)){let a=n?`${n}.${I(t)}`:I(t);if(h(i)){o.add(a);let c=X[a];r[t]=c&&(c.description!==void 0||c.deprecated!==void 0)?{...i,...c.description!==void 0?{description:c.description}:{},...c.deprecated!==void 0?{deprecated:c.deprecated}:{}}:i}else r[t]=N(i,a,o)}return r}s(N,"decorateGroup");function un(e){let n=new Set,o=N(e.primitives,"",n),r=N(e.groups,"",n);return Y(n),{...e,primitives:o,groups:r}}s(un,"decorateMeta");function L(e,n){return N(e,"",n)}s(L,"decorateSlice");function Re(e,n,o){for(let[r,t]of Object.entries(e)){let i=n?`${n}.${I(r)}`:I(r);h(t)?o.add(i):Re(t,i,o)}}s(Re,"collectPaths");function Ie(e){let n=new Set;for(let o of e)Re(o.groups,"",n);Y(n)}s(Ie,"assertSlicesMetaComplete");function ke(){let e=pe(),o=ye({borderWidth:e}),r={};Object.keys(o.extensions).length>0&&(r["com.apollion.border"]={radius:o.extensions});let t=new Set;return{groups:L({"border-width":e,border:o.group},t),extensions:r}}s(ke,"buildBaseIR");function Se(e){let n=he(e),o=new Set;return{groups:L({font:n.group},o),extensions:{"com.apollion.font":n.extensions}}}s(Se,"buildFontIR");function xe(e,n){let o=de(n),r=new Set;return{groups:L({color:o,bg:A(e.bg,n,fe),text:A(e.text,n,me),tx:le(n),shadow:be(n)},r),extensions:{}}}s(xe,"buildColorIR");function De(e,n){let o=ue(n),r={space:o},t=new Set;return{groups:L({space:o,spacing:Q(e.spacing,r,ge)},t),extensions:{}}}s(De,"buildSpacingIR");function pn(e,n,o){let r={brand:o.brand,mode:o.mode,surface:o.surface,dimension:o.dimension},t=tn(n,o.dimension),i=ye(t),a=he(o.dimension),c={"com.apollion.variant":r,"com.apollion.font":a.extensions};Object.keys(i.extensions).length>0&&(c["com.apollion.border"]={radius:i.extensions});let u={description:`Apollion DS tokens \u2014 DTCG 2025.10. Variant: ${r.brand}/${r.mode}/${r.surface}/${r.dimension}.`,meta:r,primitives:t,groups:{bg:A(e.bg,n,fe),text:A(e.text,n,me),tx:le(n),spacing:Q(e.spacing,t,ge),border:i.group,font:a.group,shadow:be(n)},extensions:c};return un(u)}s(pn,"buildIR");var we=pn;var fn="/* Generated by apollion-tokens build \u2014 DO NOT EDIT. See apollion.config.mjs. */";function Te(e,n,o){for(let[r,t]of Object.entries(e)){let i=[...n,I(r)];h(t)?o.push(` --apollion-${i.join("-")}: ${V(t.value)};`):Te(t,i,o)}}s(Te,"emitVars");function ve(e,n,o){for(let[r,t]of Object.entries(e)){let i=[...n,I(r)];h(t)?t.type==="color"&&o.push(` @property --apollion-${i.join("-")} { syntax: '<color>'; inherits: true; initial-value: ${V(t.value)}; }`):ve(t,i,o)}}s(ve,"emitProperties");function Ce(e){let{brand:n,mode:o,surface:r,dimension:t}=e.meta,i=[fn,""];return i.push(`/* Variant: brand=${n} mode=${o} surface=${r} dimension=${t} */`,"",":root {"),Te(e.groups,[],i),i.push("}",""),i.push("@supports (background: paint(squircle)) or (color: oklch(0% 0 0)) {"),ve(e.groups,[],i),i.push("}",""),i.join(`
|
|
2
|
+
`)}s(Ce,"renderCss");function Ve(e){return e.alpha!==void 0?{colorSpace:"oklch",components:[...e.components],alpha:e.alpha,hex:e.hex}:{colorSpace:"oklch",components:[...e.components],hex:e.hex}}s(Ve,"colorValue");function $(e){return{value:e.value,unit:e.unit}}s($,"dimensionValue");function mn(e){let n=e.shadow,o={color:Ve(n.color),offsetX:$(n.offsetX),offsetY:$(n.offsetY),blur:$(n.blur),spread:$(n.spread)};return n.inset&&(o.inset=!0),o}s(mn,"shadowValue");function gn(e){switch(e.kind){case"ref":return`{${ae(e.path)}}`;case"color":return Ve(e);case"dimension":return $(e);case"fontFamily":return e.family;case"fontWeight":return e.weight;case"number":return e.number;case"strokeStyle":return e.style;case"shadow":return mn(e)}}s(gn,"projectValue");function yn(e){let n={$value:gn(e.value),$type:e.type};return e.description!==void 0&&(n.$description=e.description),e.deprecated!==void 0&&(n.$deprecated=e.deprecated),n}s(yn,"projectToken");function ee(e){let n={};for(let[o,r]of Object.entries(e))n[I(o)]=h(r)?yn(r):ee(r);return n}s(ee,"projectGroup");function B(e,n){let o={$description:n,...ee(e.groups)};return Object.keys(e.extensions).length>0&&(o.$extensions=e.extensions),`${JSON.stringify(o,null,2)}
|
|
3
|
+
`}s(B,"renderSet");function $e(e){return B(e,"Apollion DS \u2014 base set (axis-invariant: border). DTCG 2025.10.")}s($e,"renderBaseSet");function Ge(e,n,o,r){return B(e,`Apollion DS \u2014 colour set. brand=${n} mode=${o} surface=${r}. DTCG 2025.10.`)}s(Ge,"renderColorSet");function Oe(e,n){return B(e,`Apollion DS \u2014 spacing set. dimension=${n}. DTCG 2025.10.`)}s(Oe,"renderSpacingSet");function Ee(e,n){return B(e,`Apollion DS \u2014 font set. dimension=${n}. DTCG 2025.10.`)}s(Ee,"renderFontSet");function Fe(e,n){let{modifiers:o}=n,r=[{name:"brand",values:[...o.brand],default:o.brand[0]},{name:"mode",values:[...o.mode],default:o.mode[0]},{name:"surface",values:[...o.surface],default:o.surface[0]},{name:"dimension",values:[...o.dimension],default:o.dimension[0]}],i={name:"apollion-tokens",description:"Apollion DS token resolver \u2014 DTCG 2025.10. Compose the base set with the colour set for the chosen brand/mode/surface and the spacing + font sets for the chosen dimension. NOTE: mode is a topology placeholder in this release (dark resolves identically to light until S6).",sets:[{name:n.base.name,source:n.base.file},...n.spacing.map(a=>({name:a.name,source:a.file})),...n.font.map(a=>({name:a.name,source:a.file})),...n.color.map(a=>({name:a.name,source:a.file}))],modifiers:r,$extensions:{"com.apollion.resolver":{composition:{always:[n.base.name],byModifier:{color:"${brand}.color.${mode}.${surface}",spacing:"spacing.${dimension}",font:"font.${dimension}"}},modeIsPlaceholder:!0}}};return`${JSON.stringify(i,null,2)}
|
|
4
|
+
`}s(Fe,"renderResolver");var hn="// Generated by apollion-tokens build \u2014 DO NOT EDIT. See apollion.config.mjs.";function je(e,n,o){let r=" ".repeat(n);for(let[t,i]of Object.entries(e))h(i)?o.push(`${r}${JSON.stringify(t)}: ${JSON.stringify(V(i.value))},`):(o.push(`${r}${t}: {`),je(i,n+1,o),o.push(`${r}},`))}s(je,"emitGroup");function Me(e){let{brand:n,mode:o,surface:r,dimension:t}=e.meta,i=[hn,`// Variant: brand=${n} mode=${o} surface=${r} dimension=${t}`,"","export const tokens = {"];return je(e.groups,1,i),i.push("} as const;","","export type Tokens = typeof tokens;",""),i.join(`
|
|
5
|
+
`)}s(Me,"renderTs");var bn=["light","dark"],Rn=["positive","negative"],In=["compact","normal","spacious"];function _(e){let n=e.modes??bn,o=e.surfaces??Rn,r=e.dimensions??In,t=Object.entries(e.brands).sort(([a],[c])=>a.localeCompare(c)),i=[];for(let[a,c]of t)for(let u of n)for(let f of o)for(let w of r)i.push({brand:a,colors:c,mode:u,surface:f,dimension:w});return i}s(_,"expandVariants");function Ae(e){return`${e.brand}.${e.mode}.${e.surface}.${e.dimension}`}s(Ae,"variantName");var Ne=require("node:crypto");function oe(e){return(0,Ne.createHash)("sha256").update(e).digest("hex")}s(oe,"sha256");function re(e){return oe(ne(e))}s(re,"hashConfig");function ne(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(ne).join(",")}]`:`{${Object.keys(e).sort().map(r=>`${JSON.stringify(r)}:${ne(e[r])}`).join(",")}}`}s(ne,"stableStringify");function Pe(e){try{let{execSync:n}=require("node:child_process");return n("git rev-parse --short HEAD",{cwd:e,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim()}catch{return""}}s(Pe,"detectGitCommit");function Le(){return{node:process.version,platform:`${process.platform}-${process.arch}`}}s(Le,"buildEnv");function Be(e){let n=[...e.files].sort((r,t)=>r.path.localeCompare(t.path)),o={configHash:e.configHash,files:n,gitCommit:e.gitCommit,buildEnv:e.buildEnv};return`${JSON.stringify(o,null,2)}
|
|
6
|
+
`}s(Be,"serializeManifest");var kn="json/sets",_e="json/resolver.json";function H(e){return`${kn}/${e}.json`}s(H,"setFile");function Sn(e,n,o){return`${e}.color.${n}.${o}`}s(Sn,"colorSetName");function xn(e){return`spacing.${e}`}s(xn,"spacingSetName");function Dn(e){return`font.${e}`}s(Dn,"fontSetName");function W(e,n){e.includes(n)||e.push(n)}s(W,"pushUnique");function He(e){let n=_(e),o=[],r=[],t=[],i=[],a=new Set,c=[],u=new Set,f=[],w=new Set,G=[];for(let d of n){W(o,d.brand),W(r,d.mode),W(t,d.surface),W(i,d.dimension);let m=Sn(d.brand,d.mode,d.surface);a.has(m)||(a.add(m),c.push({kind:"color",name:m,file:H(m),brand:d.brand,mode:d.mode,surface:d.surface}));let k=xn(d.dimension);u.has(k)||(u.add(k),f.push({kind:"spacing",name:k,file:H(k),dimension:d.dimension}));let p=Dn(d.dimension);w.has(p)||(w.add(p),G.push({kind:"font",name:p,file:H(p),dimension:d.dimension}))}return{base:{kind:"base",name:"base",file:H("base")},spacing:f,font:G,color:c,modifiers:{brand:o,mode:r,surface:t,dimension:i}}}s(He,"planSets");var te=require("@apollion-dsi/core/themes/foundation"),Ue=require("@apollion-dsi/core/themes/semantic"),ze=require("@apollion-dsi/core/themes/spacing"),Xe=require("@apollion-dsi/core/themes/surface");var x=require("culori");var io=(0,x.converter)("oklch");function l(e,n,o){let r=(0,x.parse)(e),t=(0,x.parse)(n);if(!r||!t)return e;let i=(0,x.interpolate)([r,t],"oklch");return(0,x.formatHex)(i(o))??e}s(l,"mixOklch");function wn(e){return e?typeof e=="string"?e:e.base:"#000"}s(wn,"coerceToHex");function b(e,n){let o=wn(e),r=n.deepDark,t=n.deepLight;return{base:o,dark:l(o,r,.6),action:l(o,r,.2),active:l(o,t,.6),light:l(o,t,.9)}}s(b,"mountSingleColor");function We(e){let n=e.deepLight,o=e.deepDark;return{0:n,5:l(n,o,.05),10:l(n,o,.1),20:l(n,o,.2),30:l(n,o,.3),40:l(n,o,.4),50:l(n,o,.5),60:l(n,o,.6),70:l(n,o,.7),80:l(n,o,.8),90:l(n,o,.9),100:l(n,o,1)}}s(We,"mountGreyscaleColors");function Je(e){let n=e.deepLight,o=e.deepDark,r=e.primary,t=s(a=>1/17*(a-1),"interpolation"),i=l(r,o,.5);return{0:l(i,n,t(18)),5:l(i,n,t(17.5)),10:l(i,n,t(17)),20:l(i,n,t(16)),30:l(i,n,t(15)),40:l(i,n,t(14)),50:l(i,n,t(13)),60:l(i,n,t(12)),70:l(i,n,t(11)),80:l(i,n,t(10)),90:l(i,n,t(9)),100:l(i,n,t(8)),110:l(i,n,t(7)),120:l(i,n,t(6)),130:l(i,n,t(5)),140:l(i,n,t(4)),150:l(i,n,t(3)),160:l(i,n,t(2)),170:i,180:l(i,o,.25)}}s(Je,"mountNeutralColors");function Tn(e){return{baseDark:e.baseDark,baseLight:e.baseLight,deepDark:e.deepDark,deepLight:e.deepLight,transparent:e.transparent??"transparent",neutral:Je(e),grayscale:We(e),main:b(e.main,e),opposite:b(e.opposite,e),complementary:b(e.complementary,e),danger:b(e.danger,e),information:b(e.information,e),success:b(e.success,e),warning:b(e.warning,e),primary:b(e.primary,e),secondary:b(e.secondary,e),tertiary:b(e.tertiary,e)}}s(Tn,"composeColors");function J(e,n=ze.defaultInputSpacing){let o=Tn(e.colors),r=j(n,e.dimension),t=(0,Ue.createSemantic)({colors:o,spacing:r}),i=(0,te.createFoundation)(t);return e.surface==="negative"&&(i=(0,te.createFoundation)((0,Xe.invertForSurface)({semantic:t,colors:o},"negative").semantic)),{foundation:i,colors:o}}s(J,"buildVariantThemes");async function vn(e){let{config:n,outDir:o,cwd:r=process.cwd(),verbose:t=!1}=e,i=_(n),a=n.output??{};if(i.length===0)throw new Error("apollion-tokens build: no variants (config.brands is empty)");let c=await(0,g.mkdtemp)((0,D.join)((0,Ye.tmpdir)(),"apollion-tokens-"));try{let u=[],f=s(async(d,m)=>{await Vn(c,d,m),u.push({path:d,sha256:oe(m)}),t&&console.log(` \u2713 ${d}`)},"emit");if(a.json){let d=He(n),m=[],k=ke();m.push(k),await f(d.base.file,$e(k));for(let p of d.spacing){let S=i.find(E=>E.dimension===p.dimension),{foundation:U}=J(S),O=De(U,p.dimension);m.push(O),await f(p.file,Oe(O,p.dimension))}for(let p of d.font){let S=Se(p.dimension);m.push(S),await f(p.file,Ee(S,p.dimension))}for(let p of d.color){let S=i.find(z=>z.brand===p.brand&&z.mode===p.mode&&z.surface===p.surface),{foundation:U,colors:O}=J(S),E=xe(U,O);m.push(E),await f(p.file,Ge(E,p.brand,p.mode,p.surface))}Ie(m),await f(_e,Fe(n,d))}if(a.css||a.ts)for(let d of i){let{foundation:m,colors:k}=J(d),p=we(m,k,d),S=Ae(d);a.css&&await f(`css/${S}.css`,Ce(p)),a.ts&&await f(`ts/${S}.d.ts`,Me(p))}let w={configHash:re(n),files:u,gitCommit:Pe(r),buildEnv:Le()},G=Be(w);return await(0,g.writeFile)((0,D.join)(c,"manifest.json"),G),await(0,g.rm)(o,{recursive:!0,force:!0}),await(0,g.mkdir)((0,D.dirname)(o),{recursive:!0}),await(0,g.rename)(c,o),t&&console.log(`\u2713 ${u.length} files \u2192 ${o}`),{manifest:w,outDir:o}}catch(u){throw await(0,g.rm)(c,{recursive:!0,force:!0}).catch(()=>{}),u}}s(vn,"build");async function Cn(e){let{config:n,outDir:o}=e,r;try{r=JSON.parse(await(0,g.readFile)((0,D.join)(o,"manifest.json"),"utf8"))}catch{return!1}return r.configHash===re(n)}s(Cn,"check");async function Vn(e,n,o){let r=(0,D.join)(e,n);await(0,g.mkdir)((0,D.dirname)(r),{recursive:!0}),await(0,g.writeFile)(r,o)}s(Vn,"writeAt");0&&(module.exports={build,check});
|
package/lib/build.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var _e=Object.defineProperty;var s=(e,n)=>_e(e,"name",{value:n,configurable:!0}),He=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,o)=>(typeof require<"u"?require:n)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});import{mkdir as Pe,mkdtemp as Vn,readFile as $n,rename as Gn,rm as Ne,writeFile as Le}from"node:fs/promises";import{tmpdir as On}from"node:os";import{dirname as Be,join as L}from"node:path";import{defaultInputBorder as G}from"@apollion-dsi/core/themes/border";import{createDeth as Je,levelValues as Ue}from"@apollion-dsi/core/themes/depth";import{createFont as ze,defaultInputFont as S}from"@apollion-dsi/core/themes/font";import{defaultInputSpacing as K}from"@apollion-dsi/core/themes/spacing";import{converter as Xe,formatHex as Ye,parse as qe}from"culori";import{DIMENSION_MULTIPLIERS as We}from"@apollion-dsi/core/themes/dimension";function V({multiplier:e=.25,alias:n},o){let r=o!==void 0?We[o]:e;return(...i)=>i.map(t=>{let a=typeof t=="string"?n[t]:t;return`${r*a}rem`}).join(" ")}s(V,"createSpacing");var H={"bg.primary":{description:"Primary action surface \u2014 the brand\u2019s dominant call-to-action background."},"bg.secondary":{description:"Secondary action surface \u2014 supporting actions paired with the primary."},"bg.danger":{description:"Destructive / error surface \u2014 irreversible or failing actions."},"bg.success":{description:"Positive confirmation surface \u2014 completed or healthy states."},"bg.info":{description:"Informational surface \u2014 neutral, non-blocking notices.",deprecated:"Use bg.information once the foundation role is renamed (tracked for S6)."},"text.on-primary":{description:"Text/icon colour with guaranteed contrast over bg.primary."},"text.on-danger":{description:"Text/icon colour with guaranteed contrast over bg.danger."},"space.medium":{description:"Base spacing step (1rem at normal density) \u2014 the layout rhythm unit."},"space.large":{description:"Comfortable spacing step \u2014 section padding and card gutters."},"spacing.md":{description:"Medium foundation spacing alias \u2014 references the space.medium primitive."},"spacing.lg":{description:"Large foundation spacing alias \u2014 references the space.large primitive."},"border.radius.md":{description:"Default card corner radius."},"border.width.thin":{description:"Hairline border \u2014 dividers and default input outlines."},"border.width.regular":{description:"Standard emphasis border \u2014 focused/active controls."}};function W(e){let n=Object.keys(H).filter(o=>!e.has(o));if(n.length>0)throw new Error(`token-meta: ${n.length} stale TOKEN_META key(s) resolve to no IR node: ${n.join(", ")}. Update src/token-meta.ts to match the current IR paths.`)}s(W,"assertTokenMetaResolves");var Ke=Xe("oklch");function y(e){return typeof e.type=="string"&&"value"in e}s(y,"isToken");function b(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}s(b,"kebab");function Q(e){return e.split(".").map(b).join(".")}s(Q,"kebabPath");function D(e){return e.kind==="ref"?e.resolved.raw:e.raw}s(D,"rawValue");function $(e,n){return Number(e.toFixed(n))||0}s($,"round");function J(e){let n=Ke(qe(e));if(!n)return{kind:"color",raw:e,components:[0,0,0],hex:"#000000"};let o=[$(n.l,4),$(n.c,4),$(n.h??0,2)],r=Ye(n)??"#000000";return n.alpha!==void 0&&n.alpha!==1?{kind:"color",raw:e,components:o,alpha:$(n.alpha,4),hex:r}:{kind:"color",raw:e,components:o,hex:r}}s(J,"toColorValue");var ee=/^(-?(?:\d+\.?\d*|\.\d+))(px|rem)$/;function x(e){let n=ee.exec(e.trim());if(n)return{kind:"dimension",raw:e,value:Number(n[1]),unit:n[2]};let o=Number.parseFloat(e);return{kind:"dimension",raw:e,value:Number.isFinite(o)?o:0,unit:"rem"}}s(x,"toDimensionValue");function g(e){return{type:"color",value:J(e)}}s(g,"colorToken");function Z(e){let n={};for(let[o,r]of Object.entries(e))n[o]=g(r);return n}s(Z,"recordColorGroup");var Ze=["main","opposite","complementary","primary","secondary","tertiary","success","danger","warning","information"];function ne(e){let n={};for(let o of Ze){let r=e[o];n[o]={base:g(r.base),dark:g(r.dark),action:g(r.action),active:g(r.active),light:g(r.light)}}return n.grayscale=Z(e.grayscale),n.neutral=Z(e.neutral),n.baseDark=g(e.baseDark??"#000000"),n.baseLight=g(e.baseLight??"#ffffff"),n.deepDark=g(e.deepDark??"#000000"),n.deepLight=g(e.deepLight??"#ffffff"),n}s(ne,"buildColorPrimitives");function oe(e){let n=V(K,e),o={};for(let r of Object.keys(K.alias))o[r]={type:"dimension",value:x(n(r))};return o}s(oe,"buildSpacePrimitives");function re(){let e={};for(let[n,o]of Object.entries(G.borderWidth))e[n]={type:"dimension",value:x(o)};return e}s(re,"buildBorderWidthPrimitives");function Qe(e,n){return{color:ne(e),space:oe(n),borderWidth:re()}}s(Qe,"buildPrimitives");var te={primary:"color.primary.base",secondary:"color.secondary.base",tertiary:"color.tertiary.base",success:"color.success.base",danger:"color.danger.base",warning:"color.warning.base",info:"color.information.base"},ie={onPrimary:"color.baseLight",onSecondary:"color.baseLight",onTertiary:"color.baseDark",onSuccess:"color.baseLight",onDanger:"color.baseLight",onWarning:"color.baseDark",onInfo:"color.baseLight"};function en(e,n){let o=e;for(let r of n.split(".").slice(1))if(o&&typeof o=="object"&&r in o)o=o[r];else return;return typeof o=="string"?o:void 0}s(en,"lookupPrimitive");function O(e,n,o){let r={};for(let[i,t]of Object.entries(e)){let a=o[i],c=a?en(n,a):void 0;r[i]=a&&c===t?{type:"color",value:{kind:"ref",path:a,resolved:J(t)}}:g(t)}return r}s(O,"colorRefGroup");var se={xs:"space.xs",sm:"space.small",md:"space.medium",lg:"space.large",xl:"space.xl",xxl:"space.xxl"},nn={none:"border-width.none",thin:"border-width.thin",regular:"border-width.regular",great:"border-width.great",bold:"border-width.bold"};function on(e,n){let o=n.split("."),r=o[0]==="border-width"?"borderWidth":o[0],i=e[r];for(let t of o.slice(1))if(i&&!y(i)&&t in i)i=i[t];else return;return i&&y(i)&&i.value.kind==="dimension"?i.value.raw:void 0}s(on,"lookupDimensionPrimitive");function U(e,n,o){let r={};for(let[i,t]of Object.entries(e)){let a=o[i],c=a?on(n,a):void 0;r[i]=a&&c===t?{type:"dimension",value:{kind:"ref",path:a,resolved:x(t)}}:{type:"dimension",value:x(t)}}return r}s(U,"dimensionRefGroup");function ae(e){let n={},o={};for(let[t,a]of Object.entries(G.borderRadius))ee.test(a)?n[t]={type:"dimension",value:x(a)}:o[t]=a;let r=U(G.borderWidth,e,nn),i={};for(let[t,a]of Object.entries(G.borderStyle))i[t]={type:"strokeStyle",value:{kind:"strokeStyle",raw:a,style:a}};return{group:{radius:n,width:r,style:i},extensions:o}}s(ae,"buildBorder");function ce(e){let n=ze(S,e),o={};for(let[c,u]of Object.entries(S.fontFamily)){let f=u.replace(/;\s*$/,"").trim();o[c]={type:"fontFamily",value:{kind:"fontFamily",raw:f,family:f}}}let r={};for(let[c,u]of Object.entries(n.fontSize))r[c]={type:"dimension",value:x(u)};let i={};for(let[c,u]of Object.entries(S.fontWeight))i[c]={type:"fontWeight",value:{kind:"fontWeight",raw:`${u}`,weight:u}};let t={};for(let[c,u]of Object.entries(S.lineHeight))t[c]={type:"number",value:{kind:"number",raw:`${u}`,number:u}};let a={letterSpacing:S.letterSpacing,textTransform:S.textTransform,fontStyle:S.fontStyle};return{group:{family:o,size:r,weight:i,lineHeight:t},extensions:a}}s(ce,"buildFont");var rn=/rgba?\([^)]*\)|#[0-9a-fA-F]+|[a-zA-Z]+$/;function tn(e){let n=e.trim(),o=n.startsWith("inset");o&&(n=n.slice(5).trim());let r=n.match(rn),i=r?r[0]:"#000000",a=(r?n.slice(0,r.index).trim():n).split(/\s+/).filter(Boolean),c=s(u=>x(a[u]??"0px"),"dim");return{kind:"shadow",raw:e,shadow:{color:J(i),offsetX:c(0),offsetY:c(1),blur:c(2),spread:c(3),inset:o}}}s(tn,"parseShadow");function le(e){let n=Je(e),o={};for(let r of Object.keys(Ue))o[r]={type:"shadow",value:tn(n(r))};return o}s(le,"buildShadow");function E(e,n,o){let r={};for(let[i,t]of Object.entries(e)){let a=n?`${n}.${b(i)}`:b(i);if(y(t)){o.add(a);let c=H[a];r[i]=c&&(c.description!==void 0||c.deprecated!==void 0)?{...t,...c.description!==void 0?{description:c.description}:{},...c.deprecated!==void 0?{deprecated:c.deprecated}:{}}:t}else r[i]=E(t,a,o)}return r}s(E,"decorateGroup");function sn(e){let n=new Set,o=E(e.primitives,"",n),r=E(e.groups,"",n);return W(n),{...e,primitives:o,groups:r}}s(sn,"decorateMeta");function F(e,n){return E(e,"",n)}s(F,"decorateSlice");function de(e,n,o){for(let[r,i]of Object.entries(e)){let t=n?`${n}.${b(r)}`:b(r);y(i)?o.add(t):de(i,t,o)}}s(de,"collectPaths");function ue(e){let n=new Set;for(let o of e)de(o.groups,"",n);W(n)}s(ue,"assertSlicesMetaComplete");function pe(){let e=re(),o=ae({borderWidth:e}),r={};Object.keys(o.extensions).length>0&&(r["com.apollion.border"]={radius:o.extensions});let i=new Set;return{groups:F({"border-width":e,border:o.group},i),extensions:r}}s(pe,"buildBaseIR");function fe(e){let n=ce(e),o=new Set;return{groups:F({font:n.group},o),extensions:{"com.apollion.font":n.extensions}}}s(fe,"buildFontIR");function me(e,n){let o=ne(n),r=new Set;return{groups:F({color:o,bg:O(e.bg,n,te),text:O(e.text,n,ie),shadow:le(n)},r),extensions:{}}}s(me,"buildColorIR");function ge(e,n){let o=oe(n),r={space:o},i=new Set;return{groups:F({space:o,spacing:U(e.spacing,r,se)},i),extensions:{}}}s(ge,"buildSpacingIR");function an(e,n,o){let r={brand:o.brand,mode:o.mode,surface:o.surface,dimension:o.dimension},i=Qe(n,o.dimension),t=ae(i),a=ce(o.dimension),c={"com.apollion.variant":r,"com.apollion.font":a.extensions};Object.keys(t.extensions).length>0&&(c["com.apollion.border"]={radius:t.extensions});let u={description:`Apollion DS tokens \u2014 DTCG 2025.10. Variant: ${r.brand}/${r.mode}/${r.surface}/${r.dimension}.`,meta:r,primitives:i,groups:{bg:O(e.bg,n,te),text:O(e.text,n,ie),spacing:U(e.spacing,i,se),border:t.group,font:a.group,shadow:le(n)},extensions:c};return sn(u)}s(an,"buildIR");var ye=an;var cn="/* Generated by apollion-tokens build \u2014 DO NOT EDIT. See apollion.config.mjs. */";function he(e,n,o){for(let[r,i]of Object.entries(e)){let t=[...n,b(r)];y(i)?o.push(` --apollion-${t.join("-")}: ${D(i.value)};`):he(i,t,o)}}s(he,"emitVars");function be(e,n,o){for(let[r,i]of Object.entries(e)){let t=[...n,b(r)];y(i)?i.type==="color"&&o.push(` @property --apollion-${t.join("-")} { syntax: '<color>'; inherits: true; initial-value: ${D(i.value)}; }`):be(i,t,o)}}s(be,"emitProperties");function Re(e){let{brand:n,mode:o,surface:r,dimension:i}=e.meta,t=[cn,""];return t.push(`/* Variant: brand=${n} mode=${o} surface=${r} dimension=${i} */`,"",":root {"),he(e.groups,[],t),t.push("}",""),t.push("@supports (background: paint(squircle)) or (color: oklch(0% 0 0)) {"),be(e.groups,[],t),t.push("}",""),t.join(`
|
|
2
|
-
`)}s(
|
|
3
|
-
`}s(j,"renderSet");function
|
|
4
|
-
`}s(
|
|
5
|
-
`)}s(
|
|
6
|
-
`}s(
|
|
1
|
+
var He=Object.defineProperty;var s=(e,n)=>He(e,"name",{value:n,configurable:!0}),We=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,o)=>(typeof require<"u"?require:n)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});import{mkdir as Le,mkdtemp as Gn,readFile as On,rename as En,rm as Pe,writeFile as Be}from"node:fs/promises";import{tmpdir as Fn}from"node:os";import{dirname as _e,join as L}from"node:path";import{defaultInputBorder as G}from"@apollion-dsi/core/themes/border";import{createReadableTextLayer as Ue}from"@apollion-dsi/core/themes/colors";import{createDeth as ze,levelValues as Xe}from"@apollion-dsi/core/themes/depth";import{createFont as Ye,defaultInputFont as S}from"@apollion-dsi/core/themes/font";import{defaultInputSpacing as Z}from"@apollion-dsi/core/themes/spacing";import{converter as qe,formatHex as Ke,parse as Ze}from"culori";import{DIMENSION_MULTIPLIERS as Je}from"@apollion-dsi/core/themes/dimension";function V({multiplier:e=.25,alias:n},o){let r=o!==void 0?Je[o]:e;return(...t)=>t.map(i=>{let a=typeof i=="string"?n[i]:i;return`${r*a}rem`}).join(" ")}s(V,"createSpacing");var H={"bg.primary":{description:"Primary action surface \u2014 the brand\u2019s dominant call-to-action background."},"bg.secondary":{description:"Secondary action surface \u2014 supporting actions paired with the primary."},"bg.danger":{description:"Destructive / error surface \u2014 irreversible or failing actions."},"bg.success":{description:"Positive confirmation surface \u2014 completed or healthy states."},"bg.info":{description:"Informational surface \u2014 neutral, non-blocking notices.",deprecated:"Use bg.information once the foundation role is renamed (tracked for S6)."},"text.on-primary":{description:"Text/icon colour with guaranteed contrast over bg.primary."},"text.on-danger":{description:"Text/icon colour with guaranteed contrast over bg.danger."},"space.medium":{description:"Base spacing step (1rem at normal density) \u2014 the layout rhythm unit."},"space.large":{description:"Comfortable spacing step \u2014 section padding and card gutters."},"spacing.md":{description:"Medium foundation spacing alias \u2014 references the space.medium primitive."},"spacing.lg":{description:"Large foundation spacing alias \u2014 references the space.large primitive."},"border.radius.md":{description:"Default card corner radius."},"border.width.thin":{description:"Hairline border \u2014 dividers and default input outlines."},"border.width.regular":{description:"Standard emphasis border \u2014 focused/active controls."}};function W(e){let n=Object.keys(H).filter(o=>!e.has(o));if(n.length>0)throw new Error(`token-meta: ${n.length} stale TOKEN_META key(s) resolve to no IR node: ${n.join(", ")}. Update src/token-meta.ts to match the current IR paths.`)}s(W,"assertTokenMetaResolves");var Qe=qe("oklch");function y(e){return typeof e.type=="string"&&"value"in e}s(y,"isToken");function b(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}s(b,"kebab");function Q(e){return e.split(".").map(b).join(".")}s(Q,"kebabPath");function D(e){return e.kind==="ref"?e.resolved.raw:e.raw}s(D,"rawValue");function $(e,n){return Number(e.toFixed(n))||0}s($,"round");function U(e){let n=Qe(Ze(e));if(!n)return{kind:"color",raw:e,components:[0,0,0],hex:"#000000"};let o=[$(n.l,4),$(n.c,4),$(n.h??0,2)],r=Ke(n)??"#000000";return n.alpha!==void 0&&n.alpha!==1?{kind:"color",raw:e,components:o,alpha:$(n.alpha,4),hex:r}:{kind:"color",raw:e,components:o,hex:r}}s(U,"toColorValue");var ee=/^(-?(?:\d+\.?\d*|\.\d+))(px|rem)$/;function x(e){let n=ee.exec(e.trim());if(n)return{kind:"dimension",raw:e,value:Number(n[1]),unit:n[2]};let o=Number.parseFloat(e);return{kind:"dimension",raw:e,value:Number.isFinite(o)?o:0,unit:"rem"}}s(x,"toDimensionValue");function g(e){return{type:"color",value:U(e)}}s(g,"colorToken");function J(e){let n={};for(let[o,r]of Object.entries(e))n[o]=g(r);return n}s(J,"recordColorGroup");function ne(e){let n=Ue(e),o={};for(let[r,t]of Object.entries(n.palettes))o[r]=g(t);return o.neutral=J(n.neutral),o}s(ne,"buildReadableTextGroup");var en=["main","opposite","complementary","primary","secondary","tertiary","success","danger","warning","information"];function oe(e){let n={};for(let o of en){let r=e[o];n[o]={base:g(r.base),dark:g(r.dark),action:g(r.action),active:g(r.active),light:g(r.light)}}return n.grayscale=J(e.grayscale),n.neutral=J(e.neutral),n.baseDark=g(e.baseDark??"#000000"),n.baseLight=g(e.baseLight??"#ffffff"),n.deepDark=g(e.deepDark??"#000000"),n.deepLight=g(e.deepLight??"#ffffff"),n}s(oe,"buildColorPrimitives");function re(e){let n=V(Z,e),o={};for(let r of Object.keys(Z.alias))o[r]={type:"dimension",value:x(n(r))};return o}s(re,"buildSpacePrimitives");function te(){let e={};for(let[n,o]of Object.entries(G.borderWidth))e[n]={type:"dimension",value:x(o)};return e}s(te,"buildBorderWidthPrimitives");function nn(e,n){return{color:oe(e),space:re(n),borderWidth:te()}}s(nn,"buildPrimitives");var ie={primary:"color.primary.base",secondary:"color.secondary.base",tertiary:"color.tertiary.base",success:"color.success.base",danger:"color.danger.base",warning:"color.warning.base",info:"color.information.base"},se={onPrimary:"color.baseLight",onSecondary:"color.baseLight",onTertiary:"color.baseDark",onSuccess:"color.baseLight",onDanger:"color.baseLight",onWarning:"color.baseDark",onInfo:"color.baseLight"};function on(e,n){let o=e;for(let r of n.split(".").slice(1))if(o&&typeof o=="object"&&r in o)o=o[r];else return;return typeof o=="string"?o:void 0}s(on,"lookupPrimitive");function O(e,n,o){let r={};for(let[t,i]of Object.entries(e)){let a=o[t],c=a?on(n,a):void 0;r[t]=a&&c===i?{type:"color",value:{kind:"ref",path:a,resolved:U(i)}}:g(i)}return r}s(O,"colorRefGroup");var ae={xs:"space.xs",sm:"space.small",md:"space.medium",lg:"space.large",xl:"space.xl",xxl:"space.xxl"},rn={none:"border-width.none",thin:"border-width.thin",regular:"border-width.regular",great:"border-width.great",bold:"border-width.bold"};function tn(e,n){let o=n.split("."),r=o[0]==="border-width"?"borderWidth":o[0],t=e[r];for(let i of o.slice(1))if(t&&!y(t)&&i in t)t=t[i];else return;return t&&y(t)&&t.value.kind==="dimension"?t.value.raw:void 0}s(tn,"lookupDimensionPrimitive");function z(e,n,o){let r={};for(let[t,i]of Object.entries(e)){let a=o[t],c=a?tn(n,a):void 0;r[t]=a&&c===i?{type:"dimension",value:{kind:"ref",path:a,resolved:x(i)}}:{type:"dimension",value:x(i)}}return r}s(z,"dimensionRefGroup");function ce(e){let n={},o={};for(let[i,a]of Object.entries(G.borderRadius))ee.test(a)?n[i]={type:"dimension",value:x(a)}:o[i]=a;let r=z(G.borderWidth,e,rn),t={};for(let[i,a]of Object.entries(G.borderStyle))t[i]={type:"strokeStyle",value:{kind:"strokeStyle",raw:a,style:a}};return{group:{radius:n,width:r,style:t},extensions:o}}s(ce,"buildBorder");function le(e){let n=Ye(S,e),o={};for(let[c,u]of Object.entries(S.fontFamily)){let f=u.replace(/;\s*$/,"").trim();o[c]={type:"fontFamily",value:{kind:"fontFamily",raw:f,family:f}}}let r={};for(let[c,u]of Object.entries(n.fontSize))r[c]={type:"dimension",value:x(u)};let t={};for(let[c,u]of Object.entries(S.fontWeight))t[c]={type:"fontWeight",value:{kind:"fontWeight",raw:`${u}`,weight:u}};let i={};for(let[c,u]of Object.entries(S.lineHeight))i[c]={type:"number",value:{kind:"number",raw:`${u}`,number:u}};let a={letterSpacing:S.letterSpacing,textTransform:S.textTransform,fontStyle:S.fontStyle};return{group:{family:o,size:r,weight:t,lineHeight:i},extensions:a}}s(le,"buildFont");var sn=/rgba?\([^)]*\)|#[0-9a-fA-F]+|[a-zA-Z]+$/;function an(e){let n=e.trim(),o=n.startsWith("inset");o&&(n=n.slice(5).trim());let r=n.match(sn),t=r?r[0]:"#000000",a=(r?n.slice(0,r.index).trim():n).split(/\s+/).filter(Boolean),c=s(u=>x(a[u]??"0px"),"dim");return{kind:"shadow",raw:e,shadow:{color:U(t),offsetX:c(0),offsetY:c(1),blur:c(2),spread:c(3),inset:o}}}s(an,"parseShadow");function de(e){let n=ze(e),o={};for(let r of Object.keys(Xe))o[r]={type:"shadow",value:an(n(r))};return o}s(de,"buildShadow");function E(e,n,o){let r={};for(let[t,i]of Object.entries(e)){let a=n?`${n}.${b(t)}`:b(t);if(y(i)){o.add(a);let c=H[a];r[t]=c&&(c.description!==void 0||c.deprecated!==void 0)?{...i,...c.description!==void 0?{description:c.description}:{},...c.deprecated!==void 0?{deprecated:c.deprecated}:{}}:i}else r[t]=E(i,a,o)}return r}s(E,"decorateGroup");function cn(e){let n=new Set,o=E(e.primitives,"",n),r=E(e.groups,"",n);return W(n),{...e,primitives:o,groups:r}}s(cn,"decorateMeta");function F(e,n){return E(e,"",n)}s(F,"decorateSlice");function ue(e,n,o){for(let[r,t]of Object.entries(e)){let i=n?`${n}.${b(r)}`:b(r);y(t)?o.add(i):ue(t,i,o)}}s(ue,"collectPaths");function pe(e){let n=new Set;for(let o of e)ue(o.groups,"",n);W(n)}s(pe,"assertSlicesMetaComplete");function fe(){let e=te(),o=ce({borderWidth:e}),r={};Object.keys(o.extensions).length>0&&(r["com.apollion.border"]={radius:o.extensions});let t=new Set;return{groups:F({"border-width":e,border:o.group},t),extensions:r}}s(fe,"buildBaseIR");function me(e){let n=le(e),o=new Set;return{groups:F({font:n.group},o),extensions:{"com.apollion.font":n.extensions}}}s(me,"buildFontIR");function ge(e,n){let o=oe(n),r=new Set;return{groups:F({color:o,bg:O(e.bg,n,ie),text:O(e.text,n,se),tx:ne(n),shadow:de(n)},r),extensions:{}}}s(ge,"buildColorIR");function ye(e,n){let o=re(n),r={space:o},t=new Set;return{groups:F({space:o,spacing:z(e.spacing,r,ae)},t),extensions:{}}}s(ye,"buildSpacingIR");function ln(e,n,o){let r={brand:o.brand,mode:o.mode,surface:o.surface,dimension:o.dimension},t=nn(n,o.dimension),i=ce(t),a=le(o.dimension),c={"com.apollion.variant":r,"com.apollion.font":a.extensions};Object.keys(i.extensions).length>0&&(c["com.apollion.border"]={radius:i.extensions});let u={description:`Apollion DS tokens \u2014 DTCG 2025.10. Variant: ${r.brand}/${r.mode}/${r.surface}/${r.dimension}.`,meta:r,primitives:t,groups:{bg:O(e.bg,n,ie),text:O(e.text,n,se),tx:ne(n),spacing:z(e.spacing,t,ae),border:i.group,font:a.group,shadow:de(n)},extensions:c};return cn(u)}s(ln,"buildIR");var he=ln;var dn="/* Generated by apollion-tokens build \u2014 DO NOT EDIT. See apollion.config.mjs. */";function be(e,n,o){for(let[r,t]of Object.entries(e)){let i=[...n,b(r)];y(t)?o.push(` --apollion-${i.join("-")}: ${D(t.value)};`):be(t,i,o)}}s(be,"emitVars");function Re(e,n,o){for(let[r,t]of Object.entries(e)){let i=[...n,b(r)];y(t)?t.type==="color"&&o.push(` @property --apollion-${i.join("-")} { syntax: '<color>'; inherits: true; initial-value: ${D(t.value)}; }`):Re(t,i,o)}}s(Re,"emitProperties");function Ie(e){let{brand:n,mode:o,surface:r,dimension:t}=e.meta,i=[dn,""];return i.push(`/* Variant: brand=${n} mode=${o} surface=${r} dimension=${t} */`,"",":root {"),be(e.groups,[],i),i.push("}",""),i.push("@supports (background: paint(squircle)) or (color: oklch(0% 0 0)) {"),Re(e.groups,[],i),i.push("}",""),i.join(`
|
|
2
|
+
`)}s(Ie,"renderCss");function ke(e){return e.alpha!==void 0?{colorSpace:"oklch",components:[...e.components],alpha:e.alpha,hex:e.hex}:{colorSpace:"oklch",components:[...e.components],hex:e.hex}}s(ke,"colorValue");function w(e){return{value:e.value,unit:e.unit}}s(w,"dimensionValue");function un(e){let n=e.shadow,o={color:ke(n.color),offsetX:w(n.offsetX),offsetY:w(n.offsetY),blur:w(n.blur),spread:w(n.spread)};return n.inset&&(o.inset=!0),o}s(un,"shadowValue");function pn(e){switch(e.kind){case"ref":return`{${Q(e.path)}}`;case"color":return ke(e);case"dimension":return w(e);case"fontFamily":return e.family;case"fontWeight":return e.weight;case"number":return e.number;case"strokeStyle":return e.style;case"shadow":return un(e)}}s(pn,"projectValue");function fn(e){let n={$value:pn(e.value),$type:e.type};return e.description!==void 0&&(n.$description=e.description),e.deprecated!==void 0&&(n.$deprecated=e.deprecated),n}s(fn,"projectToken");function X(e){let n={};for(let[o,r]of Object.entries(e))n[b(o)]=y(r)?fn(r):X(r);return n}s(X,"projectGroup");function j(e,n){let o={$description:n,...X(e.groups)};return Object.keys(e.extensions).length>0&&(o.$extensions=e.extensions),`${JSON.stringify(o,null,2)}
|
|
3
|
+
`}s(j,"renderSet");function Se(e){return j(e,"Apollion DS \u2014 base set (axis-invariant: border). DTCG 2025.10.")}s(Se,"renderBaseSet");function xe(e,n,o,r){return j(e,`Apollion DS \u2014 colour set. brand=${n} mode=${o} surface=${r}. DTCG 2025.10.`)}s(xe,"renderColorSet");function De(e,n){return j(e,`Apollion DS \u2014 spacing set. dimension=${n}. DTCG 2025.10.`)}s(De,"renderSpacingSet");function we(e,n){return j(e,`Apollion DS \u2014 font set. dimension=${n}. DTCG 2025.10.`)}s(we,"renderFontSet");function Te(e,n){let{modifiers:o}=n,r=[{name:"brand",values:[...o.brand],default:o.brand[0]},{name:"mode",values:[...o.mode],default:o.mode[0]},{name:"surface",values:[...o.surface],default:o.surface[0]},{name:"dimension",values:[...o.dimension],default:o.dimension[0]}],i={name:"apollion-tokens",description:"Apollion DS token resolver \u2014 DTCG 2025.10. Compose the base set with the colour set for the chosen brand/mode/surface and the spacing + font sets for the chosen dimension. NOTE: mode is a topology placeholder in this release (dark resolves identically to light until S6).",sets:[{name:n.base.name,source:n.base.file},...n.spacing.map(a=>({name:a.name,source:a.file})),...n.font.map(a=>({name:a.name,source:a.file})),...n.color.map(a=>({name:a.name,source:a.file}))],modifiers:r,$extensions:{"com.apollion.resolver":{composition:{always:[n.base.name],byModifier:{color:"${brand}.color.${mode}.${surface}",spacing:"spacing.${dimension}",font:"font.${dimension}"}},modeIsPlaceholder:!0}}};return`${JSON.stringify(i,null,2)}
|
|
4
|
+
`}s(Te,"renderResolver");var mn="// Generated by apollion-tokens build \u2014 DO NOT EDIT. See apollion.config.mjs.";function ve(e,n,o){let r=" ".repeat(n);for(let[t,i]of Object.entries(e))y(i)?o.push(`${r}${JSON.stringify(t)}: ${JSON.stringify(D(i.value))},`):(o.push(`${r}${t}: {`),ve(i,n+1,o),o.push(`${r}},`))}s(ve,"emitGroup");function Ce(e){let{brand:n,mode:o,surface:r,dimension:t}=e.meta,i=[mn,`// Variant: brand=${n} mode=${o} surface=${r} dimension=${t}`,"","export const tokens = {"];return ve(e.groups,1,i),i.push("} as const;","","export type Tokens = typeof tokens;",""),i.join(`
|
|
5
|
+
`)}s(Ce,"renderTs");var gn=["light","dark"],yn=["positive","negative"],hn=["compact","normal","spacious"];function M(e){let n=e.modes??gn,o=e.surfaces??yn,r=e.dimensions??hn,t=Object.entries(e.brands).sort(([a],[c])=>a.localeCompare(c)),i=[];for(let[a,c]of t)for(let u of n)for(let f of o)for(let k of r)i.push({brand:a,colors:c,mode:u,surface:f,dimension:k});return i}s(M,"expandVariants");function Ve(e){return`${e.brand}.${e.mode}.${e.surface}.${e.dimension}`}s(Ve,"variantName");import{createHash as bn}from"node:crypto";function q(e){return bn("sha256").update(e).digest("hex")}s(q,"sha256");function K(e){return q(Y(e))}s(K,"hashConfig");function Y(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(Y).join(",")}]`:`{${Object.keys(e).sort().map(r=>`${JSON.stringify(r)}:${Y(e[r])}`).join(",")}}`}s(Y,"stableStringify");function $e(e){try{let{execSync:n}=We("node:child_process");return n("git rev-parse --short HEAD",{cwd:e,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim()}catch{return""}}s($e,"detectGitCommit");function Ge(){return{node:process.version,platform:`${process.platform}-${process.arch}`}}s(Ge,"buildEnv");function Oe(e){let n=[...e.files].sort((r,t)=>r.path.localeCompare(t.path)),o={configHash:e.configHash,files:n,gitCommit:e.gitCommit,buildEnv:e.buildEnv};return`${JSON.stringify(o,null,2)}
|
|
6
|
+
`}s(Oe,"serializeManifest");var Rn="json/sets",Ee="json/resolver.json";function A(e){return`${Rn}/${e}.json`}s(A,"setFile");function In(e,n,o){return`${e}.color.${n}.${o}`}s(In,"colorSetName");function kn(e){return`spacing.${e}`}s(kn,"spacingSetName");function Sn(e){return`font.${e}`}s(Sn,"fontSetName");function N(e,n){e.includes(n)||e.push(n)}s(N,"pushUnique");function Fe(e){let n=M(e),o=[],r=[],t=[],i=[],a=new Set,c=[],u=new Set,f=[],k=new Set,T=[];for(let d of n){N(o,d.brand),N(r,d.mode),N(t,d.surface),N(i,d.dimension);let m=In(d.brand,d.mode,d.surface);a.has(m)||(a.add(m),c.push({kind:"color",name:m,file:A(m),brand:d.brand,mode:d.mode,surface:d.surface}));let R=kn(d.dimension);u.has(R)||(u.add(R),f.push({kind:"spacing",name:R,file:A(R),dimension:d.dimension}));let p=Sn(d.dimension);k.has(p)||(k.add(p),T.push({kind:"font",name:p,file:A(p),dimension:d.dimension}))}return{base:{kind:"base",name:"base",file:A("base")},spacing:f,font:T,color:c,modifiers:{brand:o,mode:r,surface:t,dimension:i}}}s(Fe,"planSets");import{createFoundation as Ne}from"@apollion-dsi/core/themes/foundation";import{createSemantic as vn}from"@apollion-dsi/core/themes/semantic";import{defaultInputSpacing as Cn}from"@apollion-dsi/core/themes/spacing";import{invertForSurface as Vn}from"@apollion-dsi/core/themes/surface";import{converter as xn,formatHex as Dn,interpolate as wn,parse as je}from"culori";var Io=xn("oklch");function l(e,n,o){let r=je(e),t=je(n);if(!r||!t)return e;let i=wn([r,t],"oklch");return Dn(i(o))??e}s(l,"mixOklch");function Tn(e){return e?typeof e=="string"?e:e.base:"#000"}s(Tn,"coerceToHex");function h(e,n){let o=Tn(e),r=n.deepDark,t=n.deepLight;return{base:o,dark:l(o,r,.6),action:l(o,r,.2),active:l(o,t,.6),light:l(o,t,.9)}}s(h,"mountSingleColor");function Me(e){let n=e.deepLight,o=e.deepDark;return{0:n,5:l(n,o,.05),10:l(n,o,.1),20:l(n,o,.2),30:l(n,o,.3),40:l(n,o,.4),50:l(n,o,.5),60:l(n,o,.6),70:l(n,o,.7),80:l(n,o,.8),90:l(n,o,.9),100:l(n,o,1)}}s(Me,"mountGreyscaleColors");function Ae(e){let n=e.deepLight,o=e.deepDark,r=e.primary,t=s(a=>1/17*(a-1),"interpolation"),i=l(r,o,.5);return{0:l(i,n,t(18)),5:l(i,n,t(17.5)),10:l(i,n,t(17)),20:l(i,n,t(16)),30:l(i,n,t(15)),40:l(i,n,t(14)),50:l(i,n,t(13)),60:l(i,n,t(12)),70:l(i,n,t(11)),80:l(i,n,t(10)),90:l(i,n,t(9)),100:l(i,n,t(8)),110:l(i,n,t(7)),120:l(i,n,t(6)),130:l(i,n,t(5)),140:l(i,n,t(4)),150:l(i,n,t(3)),160:l(i,n,t(2)),170:i,180:l(i,o,.25)}}s(Ae,"mountNeutralColors");function $n(e){return{baseDark:e.baseDark,baseLight:e.baseLight,deepDark:e.deepDark,deepLight:e.deepLight,transparent:e.transparent??"transparent",neutral:Ae(e),grayscale:Me(e),main:h(e.main,e),opposite:h(e.opposite,e),complementary:h(e.complementary,e),danger:h(e.danger,e),information:h(e.information,e),success:h(e.success,e),warning:h(e.warning,e),primary:h(e.primary,e),secondary:h(e.secondary,e),tertiary:h(e.tertiary,e)}}s($n,"composeColors");function P(e,n=Cn){let o=$n(e.colors),r=V(n,e.dimension),t=vn({colors:o,spacing:r}),i=Ne(t);return e.surface==="negative"&&(i=Ne(Vn({semantic:t,colors:o},"negative").semantic)),{foundation:i,colors:o}}s(P,"buildVariantThemes");async function _o(e){let{config:n,outDir:o,cwd:r=process.cwd(),verbose:t=!1}=e,i=M(n),a=n.output??{};if(i.length===0)throw new Error("apollion-tokens build: no variants (config.brands is empty)");let c=await Gn(L(Fn(),"apollion-tokens-"));try{let u=[],f=s(async(d,m)=>{await jn(c,d,m),u.push({path:d,sha256:q(m)}),t&&console.log(` \u2713 ${d}`)},"emit");if(a.json){let d=Fe(n),m=[],R=fe();m.push(R),await f(d.base.file,Se(R));for(let p of d.spacing){let I=i.find(C=>C.dimension===p.dimension),{foundation:B}=P(I),v=ye(B,p.dimension);m.push(v),await f(p.file,De(v,p.dimension))}for(let p of d.font){let I=me(p.dimension);m.push(I),await f(p.file,we(I,p.dimension))}for(let p of d.color){let I=i.find(_=>_.brand===p.brand&&_.mode===p.mode&&_.surface===p.surface),{foundation:B,colors:v}=P(I),C=ge(B,v);m.push(C),await f(p.file,xe(C,p.brand,p.mode,p.surface))}pe(m),await f(Ee,Te(n,d))}if(a.css||a.ts)for(let d of i){let{foundation:m,colors:R}=P(d),p=he(m,R,d),I=Ve(d);a.css&&await f(`css/${I}.css`,Ie(p)),a.ts&&await f(`ts/${I}.d.ts`,Ce(p))}let k={configHash:K(n),files:u,gitCommit:$e(r),buildEnv:Ge()},T=Oe(k);return await Be(L(c,"manifest.json"),T),await Pe(o,{recursive:!0,force:!0}),await Le(_e(o),{recursive:!0}),await En(c,o),t&&console.log(`\u2713 ${u.length} files \u2192 ${o}`),{manifest:k,outDir:o}}catch(u){throw await Pe(c,{recursive:!0,force:!0}).catch(()=>{}),u}}s(_o,"build");async function Ho(e){let{config:n,outDir:o}=e,r;try{r=JSON.parse(await On(L(o,"manifest.json"),"utf8"))}catch{return!1}return r.configHash===K(n)}s(Ho,"check");async function jn(e,n,o){let r=L(e,n);await Le(_e(r),{recursive:!0}),await Be(r,o)}s(jn,"writeAt");export{_o as build,Ho as check};
|
package/lib/cli.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var Ze=Object.defineProperty;var s=(e,o)=>Ze(e,"name",{value:o,configurable:!0}),Qe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(o,n)=>(typeof require<"u"?require:o)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});import{readFile as Zo}from"node:fs/promises";import{resolve as ne}from"node:path";import{mkdir as Ue,mkdtemp as No,readFile as Lo,rename as _o,rm as We,writeFile as Je}from"node:fs/promises";import{tmpdir as Bo}from"node:os";import{dirname as ze,join as H}from"node:path";import{defaultInputBorder as G}from"@apollion-dsi/core/themes/border";import{createDeth as oo,levelValues as no}from"@apollion-dsi/core/themes/depth";import{createFont as ro,defaultInputFont as w}from"@apollion-dsi/core/themes/font";import{defaultInputSpacing as re}from"@apollion-dsi/core/themes/spacing";import{converter as to,formatHex as io,parse as so}from"culori";import{DIMENSION_MULTIPLIERS as eo}from"@apollion-dsi/core/themes/dimension";function A({multiplier:e=.25,alias:o},n){let r=n!==void 0?eo[n]:e;return(...t)=>t.map(i=>{let a=typeof i=="string"?o[i]:i;return`${r*a}rem`}).join(" ")}s(A,"createSpacing");var z={"bg.primary":{description:"Primary action surface \u2014 the brand\u2019s dominant call-to-action background."},"bg.secondary":{description:"Secondary action surface \u2014 supporting actions paired with the primary."},"bg.danger":{description:"Destructive / error surface \u2014 irreversible or failing actions."},"bg.success":{description:"Positive confirmation surface \u2014 completed or healthy states."},"bg.info":{description:"Informational surface \u2014 neutral, non-blocking notices.",deprecated:"Use bg.information once the foundation role is renamed (tracked for S6)."},"text.on-primary":{description:"Text/icon colour with guaranteed contrast over bg.primary."},"text.on-danger":{description:"Text/icon colour with guaranteed contrast over bg.danger."},"space.medium":{description:"Base spacing step (1rem at normal density) \u2014 the layout rhythm unit."},"space.large":{description:"Comfortable spacing step \u2014 section padding and card gutters."},"spacing.md":{description:"Medium foundation spacing alias \u2014 references the space.medium primitive."},"spacing.lg":{description:"Large foundation spacing alias \u2014 references the space.large primitive."},"border.radius.md":{description:"Default card corner radius."},"border.width.thin":{description:"Hairline border \u2014 dividers and default input outlines."},"border.width.regular":{description:"Standard emphasis border \u2014 focused/active controls."}};function X(e){let o=Object.keys(z).filter(n=>!e.has(n));if(o.length>0)throw new Error(`token-meta: ${o.length} stale TOKEN_META key(s) resolve to no IR node: ${o.join(", ")}. Update src/token-meta.ts to match the current IR paths.`)}s(X,"assertTokenMetaResolves");var ao=to("oklch");function b(e){return typeof e.type=="string"&&"value"in e}s(b,"isToken");function k(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}s(k,"kebab");function ie(e){return e.split(".").map(k).join(".")}s(ie,"kebabPath");function T(e){return e.kind==="ref"?e.resolved.raw:e.raw}s(T,"rawValue");function j(e,o){return Number(e.toFixed(o))||0}s(j,"round");function q(e){let o=ao(so(e));if(!o)return{kind:"color",raw:e,components:[0,0,0],hex:"#000000"};let n=[j(o.l,4),j(o.c,4),j(o.h??0,2)],r=io(o)??"#000000";return o.alpha!==void 0&&o.alpha!==1?{kind:"color",raw:e,components:n,alpha:j(o.alpha,4),hex:r}:{kind:"color",raw:e,components:n,hex:r}}s(q,"toColorValue");var se=/^(-?(?:\d+\.?\d*|\.\d+))(px|rem)$/;function D(e){let o=se.exec(e.trim());if(o)return{kind:"dimension",raw:e,value:Number(o[1]),unit:o[2]};let n=Number.parseFloat(e);return{kind:"dimension",raw:e,value:Number.isFinite(n)?n:0,unit:"rem"}}s(D,"toDimensionValue");function h(e){return{type:"color",value:q(e)}}s(h,"colorToken");function te(e){let o={};for(let[n,r]of Object.entries(e))o[n]=h(r);return o}s(te,"recordColorGroup");var co=["main","opposite","complementary","primary","secondary","tertiary","success","danger","warning","information"];function ae(e){let o={};for(let n of co){let r=e[n];o[n]={base:h(r.base),dark:h(r.dark),action:h(r.action),active:h(r.active),light:h(r.light)}}return o.grayscale=te(e.grayscale),o.neutral=te(e.neutral),o.baseDark=h(e.baseDark??"#000000"),o.baseLight=h(e.baseLight??"#ffffff"),o.deepDark=h(e.deepDark??"#000000"),o.deepLight=h(e.deepLight??"#ffffff"),o}s(ae,"buildColorPrimitives");function ce(e){let o=A(re,e),n={};for(let r of Object.keys(re.alias))n[r]={type:"dimension",value:D(o(r))};return n}s(ce,"buildSpacePrimitives");function le(){let e={};for(let[o,n]of Object.entries(G.borderWidth))e[o]={type:"dimension",value:D(n)};return e}s(le,"buildBorderWidthPrimitives");function lo(e,o){return{color:ae(e),space:ce(o),borderWidth:le()}}s(lo,"buildPrimitives");var de={primary:"color.primary.base",secondary:"color.secondary.base",tertiary:"color.tertiary.base",success:"color.success.base",danger:"color.danger.base",warning:"color.warning.base",info:"color.information.base"},ue={onPrimary:"color.baseLight",onSecondary:"color.baseLight",onTertiary:"color.baseDark",onSuccess:"color.baseLight",onDanger:"color.baseLight",onWarning:"color.baseDark",onInfo:"color.baseLight"};function uo(e,o){let n=e;for(let r of o.split(".").slice(1))if(n&&typeof n=="object"&&r in n)n=n[r];else return;return typeof n=="string"?n:void 0}s(uo,"lookupPrimitive");function E(e,o,n){let r={};for(let[t,i]of Object.entries(e)){let a=n[t],c=a?uo(o,a):void 0;r[t]=a&&c===i?{type:"color",value:{kind:"ref",path:a,resolved:q(i)}}:h(i)}return r}s(E,"colorRefGroup");var pe={xs:"space.xs",sm:"space.small",md:"space.medium",lg:"space.large",xl:"space.xl",xxl:"space.xxl"},po={none:"border-width.none",thin:"border-width.thin",regular:"border-width.regular",great:"border-width.great",bold:"border-width.bold"};function fo(e,o){let n=o.split("."),r=n[0]==="border-width"?"borderWidth":n[0],t=e[r];for(let i of n.slice(1))if(t&&!b(t)&&i in t)t=t[i];else return;return t&&b(t)&&t.value.kind==="dimension"?t.value.raw:void 0}s(fo,"lookupDimensionPrimitive");function Y(e,o,n){let r={};for(let[t,i]of Object.entries(e)){let a=n[t],c=a?fo(o,a):void 0;r[t]=a&&c===i?{type:"dimension",value:{kind:"ref",path:a,resolved:D(i)}}:{type:"dimension",value:D(i)}}return r}s(Y,"dimensionRefGroup");function fe(e){let o={},n={};for(let[i,a]of Object.entries(G.borderRadius))se.test(a)?o[i]={type:"dimension",value:D(a)}:n[i]=a;let r=Y(G.borderWidth,e,po),t={};for(let[i,a]of Object.entries(G.borderStyle))t[i]={type:"strokeStyle",value:{kind:"strokeStyle",raw:a,style:a}};return{group:{radius:o,width:r,style:t},extensions:n}}s(fe,"buildBorder");function me(e){let o=ro(w,e),n={};for(let[c,l]of Object.entries(w.fontFamily)){let f=l.replace(/;\s*$/,"").trim();n[c]={type:"fontFamily",value:{kind:"fontFamily",raw:f,family:f}}}let r={};for(let[c,l]of Object.entries(o.fontSize))r[c]={type:"dimension",value:D(l)};let t={};for(let[c,l]of Object.entries(w.fontWeight))t[c]={type:"fontWeight",value:{kind:"fontWeight",raw:`${l}`,weight:l}};let i={};for(let[c,l]of Object.entries(w.lineHeight))i[c]={type:"number",value:{kind:"number",raw:`${l}`,number:l}};let a={letterSpacing:w.letterSpacing,textTransform:w.textTransform,fontStyle:w.fontStyle};return{group:{family:n,size:r,weight:t,lineHeight:i},extensions:a}}s(me,"buildFont");var mo=/rgba?\([^)]*\)|#[0-9a-fA-F]+|[a-zA-Z]+$/;function go(e){let o=e.trim(),n=o.startsWith("inset");n&&(o=o.slice(5).trim());let r=o.match(mo),t=r?r[0]:"#000000",a=(r?o.slice(0,r.index).trim():o).split(/\s+/).filter(Boolean),c=s(l=>D(a[l]??"0px"),"dim");return{kind:"shadow",raw:e,shadow:{color:q(t),offsetX:c(0),offsetY:c(1),blur:c(2),spread:c(3),inset:n}}}s(go,"parseShadow");function ge(e){let o=oo(e),n={};for(let r of Object.keys(no))n[r]={type:"shadow",value:go(o(r))};return n}s(ge,"buildShadow");function F(e,o,n){let r={};for(let[t,i]of Object.entries(e)){let a=o?`${o}.${k(t)}`:k(t);if(b(i)){n.add(a);let c=z[a];r[t]=c&&(c.description!==void 0||c.deprecated!==void 0)?{...i,...c.description!==void 0?{description:c.description}:{},...c.deprecated!==void 0?{deprecated:c.deprecated}:{}}:i}else r[t]=F(i,a,n)}return r}s(F,"decorateGroup");function yo(e){let o=new Set,n=F(e.primitives,"",o),r=F(e.groups,"",o);return X(o),{...e,primitives:n,groups:r}}s(yo,"decorateMeta");function P(e,o){return F(e,"",o)}s(P,"decorateSlice");function ye(e,o,n){for(let[r,t]of Object.entries(e)){let i=o?`${o}.${k(r)}`:k(r);b(t)?n.add(i):ye(t,i,n)}}s(ye,"collectPaths");function he(e){let o=new Set;for(let n of e)ye(n.groups,"",o);X(o)}s(he,"assertSlicesMetaComplete");function be(){let e=le(),n=fe({borderWidth:e}),r={};Object.keys(n.extensions).length>0&&(r["com.apollion.border"]={radius:n.extensions});let t=new Set;return{groups:P({"border-width":e,border:n.group},t),extensions:r}}s(be,"buildBaseIR");function Re(e){let o=me(e),n=new Set;return{groups:P({font:o.group},n),extensions:{"com.apollion.font":o.extensions}}}s(Re,"buildFontIR");function ke(e,o){let n=ae(o),r=new Set;return{groups:P({color:n,bg:E(e.bg,o,de),text:E(e.text,o,ue),shadow:ge(o)},r),extensions:{}}}s(ke,"buildColorIR");function Ie(e,o){let n=ce(o),r={space:n},t=new Set;return{groups:P({space:n,spacing:Y(e.spacing,r,pe)},t),extensions:{}}}s(Ie,"buildSpacingIR");function ho(e,o,n){let r={brand:n.brand,mode:n.mode,surface:n.surface,dimension:n.dimension},t=lo(o,n.dimension),i=fe(t),a=me(n.dimension),c={"com.apollion.variant":r,"com.apollion.font":a.extensions};Object.keys(i.extensions).length>0&&(c["com.apollion.border"]={radius:i.extensions});let l={description:`Apollion DS tokens \u2014 DTCG 2025.10. Variant: ${r.brand}/${r.mode}/${r.surface}/${r.dimension}.`,meta:r,primitives:t,groups:{bg:E(e.bg,o,de),text:E(e.text,o,ue),spacing:Y(e.spacing,t,pe),border:i.group,font:a.group,shadow:ge(o)},extensions:c};return yo(l)}s(ho,"buildIR");var Se=ho;var bo="/* Generated by apollion-tokens build \u2014 DO NOT EDIT. See apollion.config.mjs. */";function xe(e,o,n){for(let[r,t]of Object.entries(e)){let i=[...o,k(r)];b(t)?n.push(` --apollion-${i.join("-")}: ${T(t.value)};`):xe(t,i,n)}}s(xe,"emitVars");function we(e,o,n){for(let[r,t]of Object.entries(e)){let i=[...o,k(r)];b(t)?t.type==="color"&&n.push(` @property --apollion-${i.join("-")} { syntax: '<color>'; inherits: true; initial-value: ${T(t.value)}; }`):we(t,i,n)}}s(we,"emitProperties");function De(e){let{brand:o,mode:n,surface:r,dimension:t}=e.meta,i=[bo,""];return i.push(`/* Variant: brand=${o} mode=${n} surface=${r} dimension=${t} */`,"",":root {"),xe(e.groups,[],i),i.push("}",""),i.push("@supports (background: paint(squircle)) or (color: oklch(0% 0 0)) {"),we(e.groups,[],i),i.push("}",""),i.join(`
|
|
3
|
-
`)}
|
|
4
|
-
`}
|
|
5
|
-
`}
|
|
6
|
-
`)}
|
|
7
|
-
`}
|
|
2
|
+
var Qe=Object.defineProperty;var i=(e,o)=>Qe(e,"name",{value:o,configurable:!0}),eo=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(o,n)=>(typeof require<"u"?require:o)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});import{readFile as en}from"node:fs/promises";import{resolve as re}from"node:path";import{mkdir as Je,mkdtemp as _o,readFile as Bo,rename as Ho,rm as Ue,writeFile as ze}from"node:fs/promises";import{tmpdir as Wo}from"node:os";import{dirname as Xe,join as H}from"node:path";import{defaultInputBorder as A}from"@apollion-dsi/core/themes/border";import{createReadableTextLayer as no}from"@apollion-dsi/core/themes/colors";import{createDeth as ro,levelValues as to}from"@apollion-dsi/core/themes/depth";import{createFont as io,defaultInputFont as w}from"@apollion-dsi/core/themes/font";import{defaultInputSpacing as te}from"@apollion-dsi/core/themes/spacing";import{converter as so,formatHex as ao,parse as co}from"culori";import{DIMENSION_MULTIPLIERS as oo}from"@apollion-dsi/core/themes/dimension";function G({multiplier:e=.25,alias:o},n){let r=n!==void 0?oo[n]:e;return(...t)=>t.map(s=>{let a=typeof s=="string"?o[s]:s;return`${r*a}rem`}).join(" ")}i(G,"createSpacing");var z={"bg.primary":{description:"Primary action surface \u2014 the brand\u2019s dominant call-to-action background."},"bg.secondary":{description:"Secondary action surface \u2014 supporting actions paired with the primary."},"bg.danger":{description:"Destructive / error surface \u2014 irreversible or failing actions."},"bg.success":{description:"Positive confirmation surface \u2014 completed or healthy states."},"bg.info":{description:"Informational surface \u2014 neutral, non-blocking notices.",deprecated:"Use bg.information once the foundation role is renamed (tracked for S6)."},"text.on-primary":{description:"Text/icon colour with guaranteed contrast over bg.primary."},"text.on-danger":{description:"Text/icon colour with guaranteed contrast over bg.danger."},"space.medium":{description:"Base spacing step (1rem at normal density) \u2014 the layout rhythm unit."},"space.large":{description:"Comfortable spacing step \u2014 section padding and card gutters."},"spacing.md":{description:"Medium foundation spacing alias \u2014 references the space.medium primitive."},"spacing.lg":{description:"Large foundation spacing alias \u2014 references the space.large primitive."},"border.radius.md":{description:"Default card corner radius."},"border.width.thin":{description:"Hairline border \u2014 dividers and default input outlines."},"border.width.regular":{description:"Standard emphasis border \u2014 focused/active controls."}};function X(e){let o=Object.keys(z).filter(n=>!e.has(n));if(o.length>0)throw new Error(`token-meta: ${o.length} stale TOKEN_META key(s) resolve to no IR node: ${o.join(", ")}. Update src/token-meta.ts to match the current IR paths.`)}i(X,"assertTokenMetaResolves");var lo=so("oklch");function b(e){return typeof e.type=="string"&&"value"in e}i(b,"isToken");function k(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}i(k,"kebab");function ie(e){return e.split(".").map(k).join(".")}i(ie,"kebabPath");function T(e){return e.kind==="ref"?e.resolved.raw:e.raw}i(T,"rawValue");function j(e,o){return Number(e.toFixed(o))||0}i(j,"round");function Y(e){let o=lo(co(e));if(!o)return{kind:"color",raw:e,components:[0,0,0],hex:"#000000"};let n=[j(o.l,4),j(o.c,4),j(o.h??0,2)],r=ao(o)??"#000000";return o.alpha!==void 0&&o.alpha!==1?{kind:"color",raw:e,components:n,alpha:j(o.alpha,4),hex:r}:{kind:"color",raw:e,components:n,hex:r}}i(Y,"toColorValue");var se=/^(-?(?:\d+\.?\d*|\.\d+))(px|rem)$/;function D(e){let o=se.exec(e.trim());if(o)return{kind:"dimension",raw:e,value:Number(o[1]),unit:o[2]};let n=Number.parseFloat(e);return{kind:"dimension",raw:e,value:Number.isFinite(n)?n:0,unit:"rem"}}i(D,"toDimensionValue");function y(e){return{type:"color",value:Y(e)}}i(y,"colorToken");function q(e){let o={};for(let[n,r]of Object.entries(e))o[n]=y(r);return o}i(q,"recordColorGroup");function ae(e){let o=no(e),n={};for(let[r,t]of Object.entries(o.palettes))n[r]=y(t);return n.neutral=q(o.neutral),n}i(ae,"buildReadableTextGroup");var uo=["main","opposite","complementary","primary","secondary","tertiary","success","danger","warning","information"];function ce(e){let o={};for(let n of uo){let r=e[n];o[n]={base:y(r.base),dark:y(r.dark),action:y(r.action),active:y(r.active),light:y(r.light)}}return o.grayscale=q(e.grayscale),o.neutral=q(e.neutral),o.baseDark=y(e.baseDark??"#000000"),o.baseLight=y(e.baseLight??"#ffffff"),o.deepDark=y(e.deepDark??"#000000"),o.deepLight=y(e.deepLight??"#ffffff"),o}i(ce,"buildColorPrimitives");function le(e){let o=G(te,e),n={};for(let r of Object.keys(te.alias))n[r]={type:"dimension",value:D(o(r))};return n}i(le,"buildSpacePrimitives");function de(){let e={};for(let[o,n]of Object.entries(A.borderWidth))e[o]={type:"dimension",value:D(n)};return e}i(de,"buildBorderWidthPrimitives");function po(e,o){return{color:ce(e),space:le(o),borderWidth:de()}}i(po,"buildPrimitives");var ue={primary:"color.primary.base",secondary:"color.secondary.base",tertiary:"color.tertiary.base",success:"color.success.base",danger:"color.danger.base",warning:"color.warning.base",info:"color.information.base"},pe={onPrimary:"color.baseLight",onSecondary:"color.baseLight",onTertiary:"color.baseDark",onSuccess:"color.baseLight",onDanger:"color.baseLight",onWarning:"color.baseDark",onInfo:"color.baseLight"};function fo(e,o){let n=e;for(let r of o.split(".").slice(1))if(n&&typeof n=="object"&&r in n)n=n[r];else return;return typeof n=="string"?n:void 0}i(fo,"lookupPrimitive");function E(e,o,n){let r={};for(let[t,s]of Object.entries(e)){let a=n[t],c=a?fo(o,a):void 0;r[t]=a&&c===s?{type:"color",value:{kind:"ref",path:a,resolved:Y(s)}}:y(s)}return r}i(E,"colorRefGroup");var fe={xs:"space.xs",sm:"space.small",md:"space.medium",lg:"space.large",xl:"space.xl",xxl:"space.xxl"},mo={none:"border-width.none",thin:"border-width.thin",regular:"border-width.regular",great:"border-width.great",bold:"border-width.bold"};function go(e,o){let n=o.split("."),r=n[0]==="border-width"?"borderWidth":n[0],t=e[r];for(let s of n.slice(1))if(t&&!b(t)&&s in t)t=t[s];else return;return t&&b(t)&&t.value.kind==="dimension"?t.value.raw:void 0}i(go,"lookupDimensionPrimitive");function K(e,o,n){let r={};for(let[t,s]of Object.entries(e)){let a=n[t],c=a?go(o,a):void 0;r[t]=a&&c===s?{type:"dimension",value:{kind:"ref",path:a,resolved:D(s)}}:{type:"dimension",value:D(s)}}return r}i(K,"dimensionRefGroup");function me(e){let o={},n={};for(let[s,a]of Object.entries(A.borderRadius))se.test(a)?o[s]={type:"dimension",value:D(a)}:n[s]=a;let r=K(A.borderWidth,e,mo),t={};for(let[s,a]of Object.entries(A.borderStyle))t[s]={type:"strokeStyle",value:{kind:"strokeStyle",raw:a,style:a}};return{group:{radius:o,width:r,style:t},extensions:n}}i(me,"buildBorder");function ge(e){let o=io(w,e),n={};for(let[c,l]of Object.entries(w.fontFamily)){let f=l.replace(/;\s*$/,"").trim();n[c]={type:"fontFamily",value:{kind:"fontFamily",raw:f,family:f}}}let r={};for(let[c,l]of Object.entries(o.fontSize))r[c]={type:"dimension",value:D(l)};let t={};for(let[c,l]of Object.entries(w.fontWeight))t[c]={type:"fontWeight",value:{kind:"fontWeight",raw:`${l}`,weight:l}};let s={};for(let[c,l]of Object.entries(w.lineHeight))s[c]={type:"number",value:{kind:"number",raw:`${l}`,number:l}};let a={letterSpacing:w.letterSpacing,textTransform:w.textTransform,fontStyle:w.fontStyle};return{group:{family:n,size:r,weight:t,lineHeight:s},extensions:a}}i(ge,"buildFont");var yo=/rgba?\([^)]*\)|#[0-9a-fA-F]+|[a-zA-Z]+$/;function ho(e){let o=e.trim(),n=o.startsWith("inset");n&&(o=o.slice(5).trim());let r=o.match(yo),t=r?r[0]:"#000000",a=(r?o.slice(0,r.index).trim():o).split(/\s+/).filter(Boolean),c=i(l=>D(a[l]??"0px"),"dim");return{kind:"shadow",raw:e,shadow:{color:Y(t),offsetX:c(0),offsetY:c(1),blur:c(2),spread:c(3),inset:n}}}i(ho,"parseShadow");function ye(e){let o=ro(e),n={};for(let r of Object.keys(to))n[r]={type:"shadow",value:ho(o(r))};return n}i(ye,"buildShadow");function F(e,o,n){let r={};for(let[t,s]of Object.entries(e)){let a=o?`${o}.${k(t)}`:k(t);if(b(s)){n.add(a);let c=z[a];r[t]=c&&(c.description!==void 0||c.deprecated!==void 0)?{...s,...c.description!==void 0?{description:c.description}:{},...c.deprecated!==void 0?{deprecated:c.deprecated}:{}}:s}else r[t]=F(s,a,n)}return r}i(F,"decorateGroup");function bo(e){let o=new Set,n=F(e.primitives,"",o),r=F(e.groups,"",o);return X(o),{...e,primitives:n,groups:r}}i(bo,"decorateMeta");function P(e,o){return F(e,"",o)}i(P,"decorateSlice");function he(e,o,n){for(let[r,t]of Object.entries(e)){let s=o?`${o}.${k(r)}`:k(r);b(t)?n.add(s):he(t,s,n)}}i(he,"collectPaths");function be(e){let o=new Set;for(let n of e)he(n.groups,"",o);X(o)}i(be,"assertSlicesMetaComplete");function Re(){let e=de(),n=me({borderWidth:e}),r={};Object.keys(n.extensions).length>0&&(r["com.apollion.border"]={radius:n.extensions});let t=new Set;return{groups:P({"border-width":e,border:n.group},t),extensions:r}}i(Re,"buildBaseIR");function ke(e){let o=ge(e),n=new Set;return{groups:P({font:o.group},n),extensions:{"com.apollion.font":o.extensions}}}i(ke,"buildFontIR");function Ie(e,o){let n=ce(o),r=new Set;return{groups:P({color:n,bg:E(e.bg,o,ue),text:E(e.text,o,pe),tx:ae(o),shadow:ye(o)},r),extensions:{}}}i(Ie,"buildColorIR");function Se(e,o){let n=le(o),r={space:n},t=new Set;return{groups:P({space:n,spacing:K(e.spacing,r,fe)},t),extensions:{}}}i(Se,"buildSpacingIR");function Ro(e,o,n){let r={brand:n.brand,mode:n.mode,surface:n.surface,dimension:n.dimension},t=po(o,n.dimension),s=me(t),a=ge(n.dimension),c={"com.apollion.variant":r,"com.apollion.font":a.extensions};Object.keys(s.extensions).length>0&&(c["com.apollion.border"]={radius:s.extensions});let l={description:`Apollion DS tokens \u2014 DTCG 2025.10. Variant: ${r.brand}/${r.mode}/${r.surface}/${r.dimension}.`,meta:r,primitives:t,groups:{bg:E(e.bg,o,ue),text:E(e.text,o,pe),tx:ae(o),spacing:K(e.spacing,t,fe),border:s.group,font:a.group,shadow:ye(o)},extensions:c};return bo(l)}i(Ro,"buildIR");var xe=Ro;var ko="/* Generated by apollion-tokens build \u2014 DO NOT EDIT. See apollion.config.mjs. */";function we(e,o,n){for(let[r,t]of Object.entries(e)){let s=[...o,k(r)];b(t)?n.push(` --apollion-${s.join("-")}: ${T(t.value)};`):we(t,s,n)}}i(we,"emitVars");function De(e,o,n){for(let[r,t]of Object.entries(e)){let s=[...o,k(r)];b(t)?t.type==="color"&&n.push(` @property --apollion-${s.join("-")} { syntax: '<color>'; inherits: true; initial-value: ${T(t.value)}; }`):De(t,s,n)}}i(De,"emitProperties");function ve(e){let{brand:o,mode:n,surface:r,dimension:t}=e.meta,s=[ko,""];return s.push(`/* Variant: brand=${o} mode=${n} surface=${r} dimension=${t} */`,"",":root {"),we(e.groups,[],s),s.push("}",""),s.push("@supports (background: paint(squircle)) or (color: oklch(0% 0 0)) {"),De(e.groups,[],s),s.push("}",""),s.join(`
|
|
3
|
+
`)}i(ve,"renderCss");function Te(e){return e.alpha!==void 0?{colorSpace:"oklch",components:[...e.components],alpha:e.alpha,hex:e.hex}:{colorSpace:"oklch",components:[...e.components],hex:e.hex}}i(Te,"colorValue");function C(e){return{value:e.value,unit:e.unit}}i(C,"dimensionValue");function Io(e){let o=e.shadow,n={color:Te(o.color),offsetX:C(o.offsetX),offsetY:C(o.offsetY),blur:C(o.blur),spread:C(o.spread)};return o.inset&&(n.inset=!0),n}i(Io,"shadowValue");function So(e){switch(e.kind){case"ref":return`{${ie(e.path)}}`;case"color":return Te(e);case"dimension":return C(e);case"fontFamily":return e.family;case"fontWeight":return e.weight;case"number":return e.number;case"strokeStyle":return e.style;case"shadow":return Io(e)}}i(So,"projectValue");function xo(e){let o={$value:So(e.value),$type:e.type};return e.description!==void 0&&(o.$description=e.description),e.deprecated!==void 0&&(o.$deprecated=e.deprecated),o}i(xo,"projectToken");function Z(e){let o={};for(let[n,r]of Object.entries(e))o[k(n)]=b(r)?xo(r):Z(r);return o}i(Z,"projectGroup");function M(e,o){let n={$description:o,...Z(e.groups)};return Object.keys(e.extensions).length>0&&(n.$extensions=e.extensions),`${JSON.stringify(n,null,2)}
|
|
4
|
+
`}i(M,"renderSet");function Ce(e){return M(e,"Apollion DS \u2014 base set (axis-invariant: border). DTCG 2025.10.")}i(Ce,"renderBaseSet");function $e(e,o,n,r){return M(e,`Apollion DS \u2014 colour set. brand=${o} mode=${n} surface=${r}. DTCG 2025.10.`)}i($e,"renderColorSet");function Ve(e,o){return M(e,`Apollion DS \u2014 spacing set. dimension=${o}. DTCG 2025.10.`)}i(Ve,"renderSpacingSet");function Oe(e,o){return M(e,`Apollion DS \u2014 font set. dimension=${o}. DTCG 2025.10.`)}i(Oe,"renderFontSet");function Ge(e,o){let{modifiers:n}=o,r=[{name:"brand",values:[...n.brand],default:n.brand[0]},{name:"mode",values:[...n.mode],default:n.mode[0]},{name:"surface",values:[...n.surface],default:n.surface[0]},{name:"dimension",values:[...n.dimension],default:n.dimension[0]}],s={name:"apollion-tokens",description:"Apollion DS token resolver \u2014 DTCG 2025.10. Compose the base set with the colour set for the chosen brand/mode/surface and the spacing + font sets for the chosen dimension. NOTE: mode is a topology placeholder in this release (dark resolves identically to light until S6).",sets:[{name:o.base.name,source:o.base.file},...o.spacing.map(a=>({name:a.name,source:a.file})),...o.font.map(a=>({name:a.name,source:a.file})),...o.color.map(a=>({name:a.name,source:a.file}))],modifiers:r,$extensions:{"com.apollion.resolver":{composition:{always:[o.base.name],byModifier:{color:"${brand}.color.${mode}.${surface}",spacing:"spacing.${dimension}",font:"font.${dimension}"}},modeIsPlaceholder:!0}}};return`${JSON.stringify(s,null,2)}
|
|
5
|
+
`}i(Ge,"renderResolver");var wo="// Generated by apollion-tokens build \u2014 DO NOT EDIT. See apollion.config.mjs.";function je(e,o,n){let r=" ".repeat(o);for(let[t,s]of Object.entries(e))b(s)?n.push(`${r}${JSON.stringify(t)}: ${JSON.stringify(T(s.value))},`):(n.push(`${r}${t}: {`),je(s,o+1,n),n.push(`${r}},`))}i(je,"emitGroup");function Ae(e){let{brand:o,mode:n,surface:r,dimension:t}=e.meta,s=[wo,`// Variant: brand=${o} mode=${n} surface=${r} dimension=${t}`,"","export const tokens = {"];return je(e.groups,1,s),s.push("} as const;","","export type Tokens = typeof tokens;",""),s.join(`
|
|
6
|
+
`)}i(Ae,"renderTs");var Do=["light","dark"],vo=["positive","negative"],To=["compact","normal","spacious"];function N(e){let o=e.modes??Do,n=e.surfaces??vo,r=e.dimensions??To,t=Object.entries(e.brands).sort(([a],[c])=>a.localeCompare(c)),s=[];for(let[a,c]of t)for(let l of o)for(let f of n)for(let x of r)s.push({brand:a,colors:c,mode:l,surface:f,dimension:x});return s}i(N,"expandVariants");function Ee(e){return`${e.brand}.${e.mode}.${e.surface}.${e.dimension}`}i(Ee,"variantName");import{createHash as Co}from"node:crypto";function ee(e){return Co("sha256").update(e).digest("hex")}i(ee,"sha256");function oe(e){return ee(Q(e))}i(oe,"hashConfig");function Q(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(Q).join(",")}]`:`{${Object.keys(e).sort().map(r=>`${JSON.stringify(r)}:${Q(e[r])}`).join(",")}}`}i(Q,"stableStringify");function Fe(e){try{let{execSync:o}=eo("node:child_process");return o("git rev-parse --short HEAD",{cwd:e,stdio:["ignore","pipe","ignore"],encoding:"utf8"}).trim()}catch{return""}}i(Fe,"detectGitCommit");function Pe(){return{node:process.version,platform:`${process.platform}-${process.arch}`}}i(Pe,"buildEnv");function Me(e){let o=[...e.files].sort((r,t)=>r.path.localeCompare(t.path)),n={configHash:e.configHash,files:o,gitCommit:e.gitCommit,buildEnv:e.buildEnv};return`${JSON.stringify(n,null,2)}
|
|
7
|
+
`}i(Me,"serializeManifest");var $o="json/sets",Ne="json/resolver.json";function L(e){return`${$o}/${e}.json`}i(L,"setFile");function Vo(e,o,n){return`${e}.color.${o}.${n}`}i(Vo,"colorSetName");function Oo(e){return`spacing.${e}`}i(Oo,"spacingSetName");function Go(e){return`font.${e}`}i(Go,"fontSetName");function _(e,o){e.includes(o)||e.push(o)}i(_,"pushUnique");function Le(e){let o=N(e),n=[],r=[],t=[],s=[],a=new Set,c=[],l=new Set,f=[],x=new Set,$=[];for(let u of o){_(n,u.brand),_(r,u.mode),_(t,u.surface),_(s,u.dimension);let g=Vo(u.brand,u.mode,u.surface);a.has(g)||(a.add(g),c.push({kind:"color",name:g,file:L(g),brand:u.brand,mode:u.mode,surface:u.surface}));let I=Oo(u.dimension);l.has(I)||(l.add(I),f.push({kind:"spacing",name:I,file:L(I),dimension:u.dimension}));let p=Go(u.dimension);x.has(p)||(x.add(p),$.push({kind:"font",name:p,file:L(p),dimension:u.dimension}))}return{base:{kind:"base",name:"base",file:L("base")},spacing:f,font:$,color:c,modifiers:{brand:n,mode:r,surface:t,dimension:s}}}i(Le,"planSets");import{createFoundation as We}from"@apollion-dsi/core/themes/foundation";import{createSemantic as Po}from"@apollion-dsi/core/themes/semantic";import{defaultInputSpacing as Mo}from"@apollion-dsi/core/themes/spacing";import{invertForSurface as No}from"@apollion-dsi/core/themes/surface";import{converter as jo,formatHex as Ao,interpolate as Eo,parse as _e}from"culori";var Bn=jo("oklch");function d(e,o,n){let r=_e(e),t=_e(o);if(!r||!t)return e;let s=Eo([r,t],"oklch");return Ao(s(n))??e}i(d,"mixOklch");function Fo(e){return e?typeof e=="string"?e:e.base:"#000"}i(Fo,"coerceToHex");function R(e,o){let n=Fo(e),r=o.deepDark,t=o.deepLight;return{base:n,dark:d(n,r,.6),action:d(n,r,.2),active:d(n,t,.6),light:d(n,t,.9)}}i(R,"mountSingleColor");function Be(e){let o=e.deepLight,n=e.deepDark;return{0:o,5:d(o,n,.05),10:d(o,n,.1),20:d(o,n,.2),30:d(o,n,.3),40:d(o,n,.4),50:d(o,n,.5),60:d(o,n,.6),70:d(o,n,.7),80:d(o,n,.8),90:d(o,n,.9),100:d(o,n,1)}}i(Be,"mountGreyscaleColors");function He(e){let o=e.deepLight,n=e.deepDark,r=e.primary,t=i(a=>1/17*(a-1),"interpolation"),s=d(r,n,.5);return{0:d(s,o,t(18)),5:d(s,o,t(17.5)),10:d(s,o,t(17)),20:d(s,o,t(16)),30:d(s,o,t(15)),40:d(s,o,t(14)),50:d(s,o,t(13)),60:d(s,o,t(12)),70:d(s,o,t(11)),80:d(s,o,t(10)),90:d(s,o,t(9)),100:d(s,o,t(8)),110:d(s,o,t(7)),120:d(s,o,t(6)),130:d(s,o,t(5)),140:d(s,o,t(4)),150:d(s,o,t(3)),160:d(s,o,t(2)),170:s,180:d(s,n,.25)}}i(He,"mountNeutralColors");function Lo(e){return{baseDark:e.baseDark,baseLight:e.baseLight,deepDark:e.deepDark,deepLight:e.deepLight,transparent:e.transparent??"transparent",neutral:He(e),grayscale:Be(e),main:R(e.main,e),opposite:R(e.opposite,e),complementary:R(e.complementary,e),danger:R(e.danger,e),information:R(e.information,e),success:R(e.success,e),warning:R(e.warning,e),primary:R(e.primary,e),secondary:R(e.secondary,e),tertiary:R(e.tertiary,e)}}i(Lo,"composeColors");function B(e,o=Mo){let n=Lo(e.colors),r=G(o,e.dimension),t=Po({colors:n,spacing:r}),s=We(t);return e.surface==="negative"&&(s=We(No({semantic:t,colors:n},"negative").semantic)),{foundation:s,colors:n}}i(B,"buildVariantThemes");async function qe(e){let{config:o,outDir:n,cwd:r=process.cwd(),verbose:t=!1}=e,s=N(o),a=o.output??{};if(s.length===0)throw new Error("apollion-tokens build: no variants (config.brands is empty)");let c=await _o(H(Wo(),"apollion-tokens-"));try{let l=[],f=i(async(u,g)=>{await Uo(c,u,g),l.push({path:u,sha256:ee(g)}),t&&console.log(` \u2713 ${u}`)},"emit");if(a.json){let u=Le(o),g=[],I=Re();g.push(I),await f(u.base.file,Ce(I));for(let p of u.spacing){let S=s.find(O=>O.dimension===p.dimension),{foundation:U}=B(S),V=Se(U,p.dimension);g.push(V),await f(p.file,Ve(V,p.dimension))}for(let p of u.font){let S=ke(p.dimension);g.push(S),await f(p.file,Oe(S,p.dimension))}for(let p of u.color){let S=s.find(J=>J.brand===p.brand&&J.mode===p.mode&&J.surface===p.surface),{foundation:U,colors:V}=B(S),O=Ie(U,V);g.push(O),await f(p.file,$e(O,p.brand,p.mode,p.surface))}be(g),await f(Ne,Ge(o,u))}if(a.css||a.ts)for(let u of s){let{foundation:g,colors:I}=B(u),p=xe(g,I,u),S=Ee(u);a.css&&await f(`css/${S}.css`,ve(p)),a.ts&&await f(`ts/${S}.d.ts`,Ae(p))}let x={configHash:oe(o),files:l,gitCommit:Fe(r),buildEnv:Pe()},$=Me(x);return await ze(H(c,"manifest.json"),$),await Ue(n,{recursive:!0,force:!0}),await Je(Xe(n),{recursive:!0}),await Ho(c,n),t&&console.log(`\u2713 ${l.length} files \u2192 ${n}`),{manifest:x,outDir:n}}catch(l){throw await Ue(c,{recursive:!0,force:!0}).catch(()=>{}),l}}i(qe,"build");async function Ye(e){let{config:o,outDir:n}=e,r;try{r=JSON.parse(await Bo(H(n,"manifest.json"),"utf8"))}catch{return!1}return r.configHash===oe(o)}i(Ye,"check");async function Uo(e,o,n){let r=H(e,o);await Je(Xe(r),{recursive:!0}),await ze(r,n)}i(Uo,"writeAt");import{readFile as zo}from"node:fs/promises";import{resolve as Xo}from"node:path";import{createContext as qo,Script as Yo}from"node:vm";import{z as m}from"zod";var h=m.string().regex(/^#([0-9a-fA-F]{3}){1,2}$|^transparent$|^rgb\(.*\)$|^oklch\(.*\)$/,{message:'Must be hex, rgb(), oklch(), or "transparent"'}),Jo=m.object({baseDark:m.string().optional(),baseLight:m.string().optional(),deepDark:h,deepLight:h,transparent:m.string().optional(),main:h.optional(),opposite:h.optional(),complementary:h.optional(),information:h.optional(),success:h.optional(),danger:h.optional(),warning:h.optional(),primary:h.optional(),secondary:h.optional(),tertiary:h.optional()}).passthrough(),Ke=m.object({brands:m.record(m.string(),Jo).refine(e=>Object.keys(e).length>0,{message:"apollion.config.mjs: brands must contain at least 1 entry"}),modes:m.array(m.enum(["light","dark"])).optional(),surfaces:m.array(m.enum(["positive","negative"])).optional(),dimensions:m.array(m.enum(["compact","normal","spacious"])).optional(),output:m.object({runtime:m.boolean().optional(),css:m.boolean().optional(),json:m.boolean().optional(),ts:m.boolean().optional()}).passthrough().optional()}).passthrough();var Ko=[/\brequire\s*\(/,/\bimport\s*\(/,/^\s*import\s+/m],Zo=1e3;var ne=class ne extends Error{constructor(n,r){super(n);this.configPath=r;this.name="ConfigLoadError"}};i(ne,"ConfigLoadError");var v=ne;async function Ze(e){let o=Xo(e.configPath),n=await zo(o,"utf8");for(let l of Ko)if(l.test(n))throw new v(`apollion.config: dynamic require/import not allowed (matched ${l}). Declarative config only \u2014 see ADR-006 \xA73.8 B3.`,o);let r=n.replace(/(^|\n)\s*export\s+default\s+/,(l,f)=>`${f}__apollion_config_export = `);if(r===n)throw new v("apollion.config: missing `export default <object>;` \u2014 config must export a default object literal.",o);let t={__apollion_config_export:void 0,console:Qo(),Symbol,Number,String,Boolean,Array,Object,JSON,Math,defineConfig:i(l=>l,"defineConfig")},s=qo(t);try{new Yo(r,{filename:o}).runInContext(s,{timeout:Zo})}catch(l){throw new v(`apollion.config: evaluation failed \u2014 ${l instanceof Error?l.message:String(l)}`,o)}let a=t.__apollion_config_export;if(a===void 0)throw new v("apollion.config: `export default` produced undefined.",o);let c=Ke.safeParse(a);if(!c.success){let l=c.error.issues.map(f=>` ${f.path.join(".")||"(root)"}: ${f.message}`).join(`
|
|
8
8
|
`);throw new v(`apollion.config: schema validation failed \u2014
|
|
9
|
-
${l}`,o)}return c.data}
|
|
9
|
+
${l}`,o)}return c.data}i(Ze,"loadConfig");function Qo(){return{log:i((...e)=>console.log("[apollion.config]",...e),"log"),warn:i((...e)=>console.warn("[apollion.config]",...e),"warn"),error:i((...e)=>console.error("[apollion.config]",...e),"error")}}i(Qo,"makeReadOnlyConsole");function on(e){let o=e.slice(2),n=o[0];n!=="build"&&W(`Unknown command "${n??""}". Usage: apollion-tokens build [--check] [--verbose] --config <path> [--out <dir>]`);let r="apollion.config.mjs",t="dist",s=!1,a=!1;for(let c=1;c<o.length;c++){let l=o[c];switch(l){case"--config":r=o[++c]??W("--config needs a path");break;case"--out":t=o[++c]??W("--out needs a path");break;case"--check":s=!0;break;case"--verbose":a=!0;break;default:W(`Unknown flag "${l}"`)}}return{command:n,configPath:r,outDir:t,check:s,verbose:a}}i(on,"parseArgs");function W(e){console.error(`apollion-tokens: ${e}`),process.exit(2)}i(W,"fail");async function nn(e){let o=re(e);if(o.endsWith(".json")){let n=await en(o,"utf8");return JSON.parse(n)}return Ze({configPath:o})}i(nn,"loadConfigFromPath");async function rn(){let e=on(process.argv),o=await nn(e.configPath);if(e.check){await Ye({config:o,outDir:re(e.outDir)})||(console.error("apollion-tokens: dist/ is stale or missing (configHash mismatch). Re-run `apollion-tokens build` without --check."),process.exit(1)),console.log("apollion-tokens: dist/ is up-to-date with config.");return}let{manifest:n}=await qe({config:o,outDir:re(e.outDir),verbose:e.verbose});console.log(`apollion-tokens: wrote ${n.files.length} file(s) \u2014 configHash=${n.configHash.slice(0,12)}\u2026`)}i(rn,"main");rn().catch(e=>{console.error(`apollion-tokens: ${e instanceof Error?e.message:String(e)}`),process.exit(1)});
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apollion-dsi/tokens",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.0",
|
|
4
4
|
"description": "Apollion Design System — Framework-agnostic design tokens",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://www.apollion.com.br",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "lib/runtime/v1.cjs",
|
|
@@ -44,11 +44,6 @@
|
|
|
44
44
|
"lib",
|
|
45
45
|
"src"
|
|
46
46
|
],
|
|
47
|
-
"repository": {
|
|
48
|
-
"type": "git",
|
|
49
|
-
"url": "https://github.com/fedbalves/apollion-ds.git",
|
|
50
|
-
"directory": "packages/tokens"
|
|
51
|
-
},
|
|
52
47
|
"scripts": {
|
|
53
48
|
"build": "node ./esbuild.cjs && tsc --emitDeclarationOnly",
|
|
54
49
|
"check-types": "tsc --noEmit",
|
|
@@ -70,8 +65,8 @@
|
|
|
70
65
|
"zod": "4.4.3"
|
|
71
66
|
},
|
|
72
67
|
"devDependencies": {
|
|
73
|
-
"@apollion-dsi/core": "
|
|
74
|
-
"@apollion-dsi/eslint-config": "0.
|
|
68
|
+
"@apollion-dsi/core": "workspace:*",
|
|
69
|
+
"@apollion-dsi/eslint-config": "0.9.0",
|
|
75
70
|
"@types/culori": "4.0.1",
|
|
76
71
|
"@types/jest": "30.0.0",
|
|
77
72
|
"@types/node": "25.7.0",
|
|
@@ -82,4 +77,4 @@
|
|
|
82
77
|
"ts-jest": "^29.4.11",
|
|
83
78
|
"typescript": "6.0.3"
|
|
84
79
|
}
|
|
85
|
-
}
|
|
80
|
+
}
|
package/src/ir.ts
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
import { defaultInputBorder } from '@apollion-dsi/core/themes/border';
|
|
32
|
+
import { createReadableTextLayer } from '@apollion-dsi/core/themes/colors';
|
|
32
33
|
import { createDeth, levelValues } from '@apollion-dsi/core/themes/depth';
|
|
33
34
|
import type { Dimension } from '@apollion-dsi/core/themes/dimension';
|
|
34
35
|
import { createFont, defaultInputFont } from '@apollion-dsi/core/themes/font';
|
|
@@ -215,6 +216,24 @@ function recordColorGroup(record: Record<string, string>): IRGroup {
|
|
|
215
216
|
return out;
|
|
216
217
|
}
|
|
217
218
|
|
|
219
|
+
/**
|
|
220
|
+
* Readable text-ink layer (`tx.*`) — the theme-aware legible-ink surface the
|
|
221
|
+
* brasil_2030 consumer reimplemented locally (contrast plan G2). Derived by
|
|
222
|
+
* core's `createReadableTextLayer` (single source — no duplicated math): per
|
|
223
|
+
* named palette, `readableColor(base, surface, 4.5)`; per high neutral index
|
|
224
|
+
* (text side of the ramp), the same against the theme's card surface
|
|
225
|
+
* (`neutral.10`). Emitted per variant, so when the mode axis becomes real
|
|
226
|
+
* (ADR-006 E6/S6) the `.dark.*` files pick up true dark inks with no
|
|
227
|
+
* topology change.
|
|
228
|
+
*/
|
|
229
|
+
function buildReadableTextGroup(colors: ColorsThemeInterface): IRGroup {
|
|
230
|
+
const layer = createReadableTextLayer(colors as never);
|
|
231
|
+
const out: Record<string, IRToken | IRGroup> = {};
|
|
232
|
+
for (const [name, hex] of Object.entries(layer.palettes)) out[name] = colorToken(hex);
|
|
233
|
+
out.neutral = recordColorGroup(layer.neutral as unknown as Record<string, string>);
|
|
234
|
+
return out;
|
|
235
|
+
}
|
|
236
|
+
|
|
218
237
|
const NAMED_PALETTES = [
|
|
219
238
|
'main',
|
|
220
239
|
'opposite',
|
|
@@ -669,6 +688,7 @@ export function buildColorIR(foundation: FoundationLayer, colors: ColorsThemeInt
|
|
|
669
688
|
color,
|
|
670
689
|
bg: colorRefGroup(foundation.bg as unknown as Record<string, string>, colors, BG_REF),
|
|
671
690
|
text: colorRefGroup(foundation.text as unknown as Record<string, string>, colors, TEXT_REF),
|
|
691
|
+
tx: buildReadableTextGroup(colors),
|
|
672
692
|
shadow: buildShadow(colors),
|
|
673
693
|
},
|
|
674
694
|
seen,
|
|
@@ -726,6 +746,7 @@ export function buildIR(foundation: FoundationLayer, colors: ColorsThemeInterfac
|
|
|
726
746
|
groups: {
|
|
727
747
|
bg: colorRefGroup(foundation.bg as unknown as Record<string, string>, colors, BG_REF),
|
|
728
748
|
text: colorRefGroup(foundation.text as unknown as Record<string, string>, colors, TEXT_REF),
|
|
749
|
+
tx: buildReadableTextGroup(colors),
|
|
729
750
|
spacing: dimensionRefGroup(foundation.spacing as unknown as Record<string, string>, primitives, SPACE_REF),
|
|
730
751
|
border: border.group,
|
|
731
752
|
font: font.group,
|
package/CHANGELOG.md
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
# @apollion-dsi/tokens
|
|
2
|
-
|
|
3
|
-
## 4.9.1
|
|
4
|
-
|
|
5
|
-
## 4.9.0
|
|
6
|
-
|
|
7
|
-
## 4.8.0
|
|
8
|
-
|
|
9
|
-
## 4.7.0
|
|
10
|
-
|
|
11
|
-
## 4.6.3
|
|
12
|
-
|
|
13
|
-
## 4.6.2
|
|
14
|
-
|
|
15
|
-
## 4.6.1
|
|
16
|
-
|
|
17
|
-
## 4.6.0
|
|
18
|
-
|
|
19
|
-
## 4.5.1
|
|
20
|
-
|
|
21
|
-
## 4.5.0
|
|
22
|
-
|
|
23
|
-
### Minor Changes
|
|
24
|
-
|
|
25
|
-
- 1ebb3e3: Typography joins the `dimension` density axis — fixed root + `rem` scale (ADR-011)
|
|
26
|
-
- **Fixed root:** `GlobalStyle` emits `html { font-size: 100% }` (16px) instead of
|
|
27
|
-
the fluid `clamp(16px, 1vw + 12px, 28px)`. Product UI keeps stable reading
|
|
28
|
-
density on ultrawide/4K — large screens gain columns/space, not inflated text.
|
|
29
|
-
- **`createFont(input, dimension)`** mirrors `createSpacing`: the same
|
|
30
|
-
`<ApollionProvider dimension>` knob (multipliers `0.20 / 0.25 / 0.32`) now
|
|
31
|
-
drives type size, so spacing and typography scale together. `normal` is 1:1
|
|
32
|
-
with the previous px scale (`small` 16px → `1rem`).
|
|
33
|
-
- **Breaking (type):** `theme.font.fontSize.*` changed `number` → `string` (CSS
|
|
34
|
-
`rem`). Additive `theme.font.fontSizePx.*` carries the effective px for layout
|
|
35
|
-
math (e.g. `height = fontSizePx.small * ratio`). Style code that concatenated a
|
|
36
|
-
manual `px` suffix (`` `${theme.font.fontSize.small}px` ``) must drop it.
|
|
37
|
-
- **Tokens:** font left the axis-invariant `base` set — it is now emitted per
|
|
38
|
-
dimension as `font.<dimension>` sets (symmetric with `spacing.<dimension>`),
|
|
39
|
-
with `font.size.*` carrying the resolved `rem` value for that density.
|
|
40
|
-
|
|
41
|
-
## 4.4.0
|
|
42
|
-
|
|
43
|
-
### Patch Changes
|
|
44
|
-
|
|
45
|
-
- 9e32c3b: fix(build): emit `.d.ts` by inlining `tsc --emitDeclarationOnly` into `build`.
|
|
46
|
-
|
|
47
|
-
Yarn Berry does not run `pre`/`post` lifecycle hooks, so the former `postbuild`
|
|
48
|
-
step never executed and the package shipped without type declarations. Folded it
|
|
49
|
-
into `build` so the published `@apollion-dsi/tokens` includes its types.
|
|
50
|
-
|
|
51
|
-
## 4.3.1
|
|
52
|
-
|
|
53
|
-
## 4.3.0
|
|
54
|
-
|
|
55
|
-
## 4.2.0
|
|
56
|
-
|
|
57
|
-
### Minor Changes
|
|
58
|
-
|
|
59
|
-
- 12ae4e0: feat(tokens): DTCG 2025.10 remainders — dimension references, per-token metadata, and Resolver (R5)
|
|
60
|
-
- **Spacing + composite sub-value references**: `spacing` and `border.width`
|
|
61
|
-
now reference primitive scales (`{space.*}`, `{border-width.*}`) instead of
|
|
62
|
-
inlining literals. The `space` primitives are built per density via
|
|
63
|
-
`createSpacing`, so references resolve correctly under compact/normal/spacious.
|
|
64
|
-
- **`$deprecated` + `$description` per token**: populated from a `TOKEN_META`
|
|
65
|
-
registry through the IR into the JSON output (a stale-key guard fails the
|
|
66
|
-
build if a meta entry points at a non-existent token).
|
|
67
|
-
- **DTCG Resolver (R5)**: the JSON surface now emits a single `resolver.json`
|
|
68
|
-
plus composable `sets/` (axis-invariant `base` + per-axis colour/spacing sets)
|
|
69
|
-
instead of one fully-resolved document per variant — a hard cutover, made
|
|
70
|
-
pre-GA. A composition-equivalence test proves `base + colour + spacing`
|
|
71
|
-
reproduces the old per-variant document exactly. The CSS and TS surfaces are
|
|
72
|
-
unchanged: still per-variant, fully resolved, byte-identical.
|
|
73
|
-
|
|
74
|
-
## 4.1.0
|
|
75
|
-
|
|
76
|
-
### Minor Changes
|
|
77
|
-
|
|
78
|
-
- 063e0e9: Align `@apollion-dsi/tokens` DTCG output with the Design Tokens Format Module 2025.10.
|
|
79
|
-
- **Structured values:** `color` `$value` is now an OKLch object `{ colorSpace, components, hex, alpha? }` and `dimension` is `{ value, unit }` (was bare hex / length strings).
|
|
80
|
-
- **Typed IR:** a single intermediate representation (`src/ir.ts`) drives the JSON/CSS/TS renderers as pure projections.
|
|
81
|
-
- **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).
|
|
82
|
-
- **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.*`.
|
|
83
|
-
|
|
84
|
-
`@apollion-dsi/core` now exports the `themes/{border,depth,font}` subpaths so tokens consumes them as the single source of truth.
|
|
85
|
-
|
|
86
|
-
CSS/TS outputs for the existing `bg`/`text`/`spacing` layers are byte-identical; JSON is the spec-interop surface.
|
|
87
|
-
|
|
88
|
-
## 4.0.0
|
|
89
|
-
|
|
90
|
-
### Major Changes
|
|
91
|
-
|
|
92
|
-
- bd7d6cb: # v4.0.0 — OKLch + Dimension + Token Split
|
|
93
|
-
|
|
94
|
-
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).
|
|
95
|
-
|
|
96
|
-
## Breaking — `@apollion-dsi/core@4.0.0`
|
|
97
|
-
- **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.
|
|
98
|
-
- **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.
|
|
99
|
-
- **`defaultInputColors.opposite` token value changed.** OKLch hue rotation differs from HSL rotation (the OKLch is the perceptually correct opposite). Audit `theme.colors.opposite.*` consumers.
|
|
100
|
-
- **Dimension axis added.** `<ApollionProvider dimension="compact|normal|spacious">` is a new prop; default `normal` preserves v3.x spacing byte-exact. ADR-006 §6 S3.
|
|
101
|
-
- **`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`).
|
|
102
|
-
- **`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.
|
|
103
|
-
|
|
104
|
-
## Minor — `@apollion-dsi/eslint-config`
|
|
105
|
-
- `culori` + `zod` added to `VENDORED_V4_LIBS` — must import via `vendors/Culori|Zod`.
|
|
106
|
-
- `color` removed from `VENDORED_T2_LIBS` (eliminated).
|
|
107
|
-
- `no-restricted-imports` for `'@apollion-dsi/core'` root: `warn` → `error` (per v4 barrel removal above).
|
|
108
|
-
|
|
109
|
-
## Major — `@apollion-dsi/tokens@4.0.0` (first release)
|
|
110
|
-
|
|
111
|
-
New package — framework-agnostic design tokens consumed via `runtime/v1` versioned API + `apollion-tokens build` CLI.
|
|
112
|
-
- **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.
|
|
113
|
-
- **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.
|
|
114
|
-
- **DTCG-compliant JSON output** (tech-radar R1).
|
|
115
|
-
- **`as const` TypeScript output** (tech-radar R4).
|
|
116
|
-
- **CSS `@property` declarations** (tech-radar R3) + custom properties `--apollion-{layer}-{role}-{variant}`.
|
|
117
|
-
- **Sandboxed `apollion.config.mjs` loader** (`node:vm` + zod schema) — threat-model T2+E1 mitigation. ADR-006 §3.8 B3 + §6 S6.
|
|
118
|
-
- **Lockstep version** with `@apollion-dsi/core` via `.changeset/config.json#fixed`.
|
|
119
|
-
|
|
120
|
-
## Minor — `@apollion-dsi/scripts`
|
|
121
|
-
- `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.
|
|
122
|
-
- `verify-no-install-scripts.js` — supply-chain hardening; blocks `preinstall`/`install`/`postinstall` in `@apollion-dsi/*` workspaces (threat-model E2 mitigation).
|
|
123
|
-
|
|
124
|
-
## Spike validation (preserved local, NOT merged to main)
|
|
125
|
-
- `spike/culori-wcag-parity` — 100.0000% bit-exact culori vs color@5 (262 measurements / 10 palettes). `vendors/Color` elimination LOCKED.
|
|
126
|
-
- `spike/culori-oklch-lerp-parity` — 0 unexpected regressions in 68 deltas; greyscale ramp 19× more uniform in OKLAB L. DECISION ✅ PROCEED.
|
|
127
|
-
|
|
128
|
-
### Patch Changes
|
|
129
|
-
|
|
130
|
-
- Updated dependencies [032f81c]
|
|
131
|
-
- Updated dependencies [32f7a1d]
|
|
132
|
-
- Updated dependencies [2dadba5]
|
|
133
|
-
- Updated dependencies [820a612]
|
|
134
|
-
- Updated dependencies [c056ee3]
|
|
135
|
-
- Updated dependencies [d032437]
|
|
136
|
-
- Updated dependencies [00e0525]
|
|
137
|
-
- Updated dependencies [1c87be8]
|
|
138
|
-
- Updated dependencies [d1192da]
|
|
139
|
-
- Updated dependencies [3194fba]
|
|
140
|
-
- Updated dependencies [f359982]
|
|
141
|
-
- Updated dependencies [5d17ebc]
|
|
142
|
-
- Updated dependencies [bd7d6cb]
|
|
143
|
-
- Updated dependencies [6545751]
|
|
144
|
-
- Updated dependencies [36eaf4a]
|
|
145
|
-
- Updated dependencies [802828f]
|
|
146
|
-
- Updated dependencies [e14469c]
|
|
147
|
-
- Updated dependencies [81cd55b]
|
|
148
|
-
- Updated dependencies [c57c548]
|
|
149
|
-
- Updated dependencies [879eedd]
|
|
150
|
-
- Updated dependencies [e2abc9c]
|
|
151
|
-
- Updated dependencies [75961a1]
|
|
152
|
-
- Updated dependencies [e55019a]
|
|
153
|
-
- Updated dependencies [fba9a41]
|
|
154
|
-
- Updated dependencies [3a90653]
|
|
155
|
-
- Updated dependencies [5fca933]
|
|
156
|
-
- Updated dependencies [ea3dc3a]
|
|
157
|
-
- Updated dependencies [51f71f6]
|
|
158
|
-
- Updated dependencies [0a1baeb]
|
|
159
|
-
- Updated dependencies [6d1371e]
|
|
160
|
-
- Updated dependencies [e55019a]
|
|
161
|
-
- Updated dependencies [29081ae]
|
|
162
|
-
- @apollion-dsi/core@4.0.0
|