@yahoo/uds-create-config 4.17.0 → 4.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs/CanvasConfig.d.ts +98 -0
- package/dist/configs/react-native-system.d.ts +69 -3
- package/dist/configs/system.d.ts +77 -7
- package/dist/configs/system.js +3 -1
- package/dist/css/root-font-size.d.ts +16 -0
- package/dist/css/root-font-size.js +97 -0
- package/dist/css/value-type.js +5 -1
- package/dist/entities/native/NativeModifier.d.ts +1 -1
- package/dist/entities/native/NativeSettings.d.ts +1 -0
- package/dist/entities/system/Component.d.ts +50 -0
- package/dist/entities/system/Component.js +8 -1
- package/dist/entities/system/Modifier.d.ts +2 -2
- package/dist/entities/system/Settings.d.ts +3 -0
- package/dist/entities/system/Settings.js +12 -1
- package/dist/entities/system/StyleProperty.js +2 -3
- package/dist/entities/system/Token.d.ts +16 -3
- package/dist/entities/system/Token.js +21 -1
- package/dist/entities/system/token-index.js +1 -1
- package/dist/entities/system/token-values.d.ts +138 -0
- package/dist/entities/system/token-values.js +154 -0
- package/dist/framework/Config.d.ts +1 -1
- package/dist/framework/Config.js +1 -1
- package/dist/framework/defineEntity.d.ts +1 -1
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/framework/utils/identifier.d.ts +8 -0
- package/dist/framework/utils/identifier.js +62 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +6 -3
- package/dist/migrations/2.0.0/raw-css.js +1 -1
- package/dist/migrations/2.0.0/v1-artifact.d.ts +39 -4
- package/dist/migrations/2.0.0/v1-artifact.js +1 -1
- package/dist/migrations/20260923160425_render_token_refs.d.ts +14 -0
- package/dist/migrations/20260923160425_render_token_refs.js +10 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -14,7 +14,9 @@ import { instanceAt } from "../spec/instance.js";
|
|
|
14
14
|
import { ReactNativeSystem } from "./react-native-system.js";
|
|
15
15
|
import { System } from "./system.js";
|
|
16
16
|
import { AnySystemConfig } from "./platform.js";
|
|
17
|
+
import { ComposedValue } from "../entities/system/composed-values.js";
|
|
17
18
|
import { StyleValue } from "../entities/system/style-bag.js";
|
|
19
|
+
import { OverrideCondition, TokenRefPath, TokenReference } from "../entities/system/Token.js";
|
|
18
20
|
import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../entities/system/Component.js";
|
|
19
21
|
import { z } from "zod";
|
|
20
22
|
|
|
@@ -322,6 +324,22 @@ declare const Node: EntityClass<z.ZodObject<{
|
|
|
322
324
|
__ref: z.ZodString;
|
|
323
325
|
}, z.core.$strip>>;
|
|
324
326
|
export: z.ZodOptional<z.ZodString>;
|
|
327
|
+
tokenRefs: z.ZodOptional<z.ZodArray<Omit<EntityClass<z.ZodObject<{
|
|
328
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
329
|
+
type: z.ZodOptional<z.ZodString>;
|
|
330
|
+
overrides: z.ZodOptional<SubEntityClass<z.ZodObject<{
|
|
331
|
+
on: z.ZodType<OverrideCondition, unknown, z.core.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
332
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
333
|
+
}, z.core.$strip>>>;
|
|
334
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
335
|
+
cssPrefix: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, z.core.$strip>, "token", {
|
|
337
|
+
readonly create: {
|
|
338
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
339
|
+
};
|
|
340
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
341
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
342
|
+
}>>;
|
|
325
343
|
}, z.core.$strict>, z.ZodObject<{
|
|
326
344
|
icon: z.ZodOptional<z.ZodString>;
|
|
327
345
|
}, z.core.$strip>, "component", {
|
|
@@ -494,6 +512,22 @@ declare const Node: EntityClass<z.ZodObject<{
|
|
|
494
512
|
__ref: z.ZodString;
|
|
495
513
|
}, z.core.$strip>>;
|
|
496
514
|
export: z.ZodOptional<z.ZodString>;
|
|
515
|
+
tokenRefs: z.ZodOptional<z.ZodArray<Omit<EntityClass<z.ZodObject<{
|
|
516
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
517
|
+
type: z.ZodOptional<z.ZodString>;
|
|
518
|
+
overrides: z.ZodOptional<SubEntityClass<z.ZodObject<{
|
|
519
|
+
on: z.ZodType<OverrideCondition, unknown, z.core.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
520
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
521
|
+
}, z.core.$strip>>>;
|
|
522
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
523
|
+
cssPrefix: z.ZodOptional<z.ZodString>;
|
|
524
|
+
}, z.core.$strip>, "token", {
|
|
525
|
+
readonly create: {
|
|
526
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
527
|
+
};
|
|
528
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
529
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
530
|
+
}>>;
|
|
497
531
|
}, z.core.$strict>;
|
|
498
532
|
readonly description: "Create a component at a new qualified `path`. For a component with nothing in it yet, one to design on the canvas before it has props or variants, use `create-blank` with only a `path` instead of authoring a minimal body here. When its complete body is known, include all layers, anatomy, props, defaults, and styles in this one operation. `data.layers` maps each stable layer name to the element it renders and must include `root` — a tag for a primitive (`{ \"layers\": { \"root\": \"div\" } }`), and for anything built on top, a ref to a primitive (`{ \"root\": { \"__ref\": \"component:Box\" }, \"label\": { \"__ref\": \"component:Text\" } }`), which is what lets the layer take that primitive's style props. A primitive exposes style props as `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:bg\" } }` and declares `children: { \"type\": \"slot\", \"text\": true }` when it holds content — without the slot, nothing nested inside it renders. A composed component exposes a layer's props at its own top level through `forwards`, keyed by layer: `{ \"forwards\": { \"root\": \"*\" } }` passes every prop the root's element takes (so `<Button width=\"full\">` reaches the root's `width`), and a list of member refs (`[{ \"__ref\": \"component:Box#props/width\" }]`, each naming the component that declares the prop) passes only those. A prop a layer already exposes is forwarded, never redeclared in `props`; a `props` entry of `{ \"type\": \"forward\" }` is the reverse route, one of this component's props into a layer's. `anatomy` is the tree the build would read off a render: each node renders a layer (`{ \"__ref\": \"layer:<name>\" }`), an intrinsic tag, or `Slot` (`{ \"element\": \"Slot\", \"props\": { \"name\": \"children\" } }`, where a slot prop's content lands — but a declared slot fills `root` by default, so a primitive still declares its `children` slot prop yet needs no `Slot` node or `children` entry for it, and a `Slot` node is only for landing that content in a nested layer); `children` lists sibling node keys from the `root` node, never a prop name; `text` is a fixed string; `visible` is a condition on a prop (`{ \"$state\": \"<prop>\" }`, or with `eq`); content shown in a nested layer is a route, `children: { \"type\": \"forward\", \"target\": \"label/children\" }`. `$state` appears only in `visible` and in an `element` a prop chooses, never as a prop value. A glyph is a node of its own, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" } }`, listed in the `children` of the layer node that holds it, never a prop value. Text a prop supplies to a text layer is never a node either: declare the prop `{ \"type\": \"forward\", \"target\": \"<layer>/children\" }` and the layer shows it; a `Slot` node goes only under a layer that takes nodes. A style rule is `\"styles\": { \"*\": { \"when\": null, \"layers\": { \"root\": { \"bg\": \"surface\" } } } }`, keyed by a name, with each layer's bag under `layers`. A composed component carries its own styles: give it an unconditional (`\"*\"`) rule that lays out and surfaces it through the system's style properties — spacing, alignment and gap on the container, a background and color where it has one — rather than leaning on the bare primitives, which paint flat. Style a layer only with the style props the primitive it renders exposes, set to the values those props accept: `component/get` on the primitive lists both, so read it and choose from that rather than reaching for a CSS name or value the system has no style property for. Set `preview` (`{ \"*\": { \"when\": null, \"props\": { \"children\": \"Example\" } } }`) or `defaultProps` so the component previews with content; a root that takes children renders empty otherwise. A style rule's layer bag is keyed by style-prop name (`fontWeight`, `color`), never by CSS property name, and each value is one of that prop's values.";
|
|
499
533
|
readonly example: ({
|
|
@@ -1834,6 +1868,22 @@ declare const CanvasConfig: ConfigClass<{
|
|
|
1834
1868
|
__ref: z.ZodString;
|
|
1835
1869
|
}, z.core.$strip>>;
|
|
1836
1870
|
export: z.ZodOptional<z.ZodString>;
|
|
1871
|
+
tokenRefs: z.ZodOptional<z.ZodArray<Omit<EntityClass<z.ZodObject<{
|
|
1872
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
1873
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1874
|
+
overrides: z.ZodOptional<SubEntityClass<z.ZodObject<{
|
|
1875
|
+
on: z.ZodType<OverrideCondition, unknown, z.core.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
1876
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
1877
|
+
}, z.core.$strip>>>;
|
|
1878
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1879
|
+
cssPrefix: z.ZodOptional<z.ZodString>;
|
|
1880
|
+
}, z.core.$strip>, "token", {
|
|
1881
|
+
readonly create: {
|
|
1882
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
1883
|
+
};
|
|
1884
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
1885
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
1886
|
+
}>>;
|
|
1837
1887
|
}, z.core.$strict>, z.ZodObject<{
|
|
1838
1888
|
icon: z.ZodOptional<z.ZodString>;
|
|
1839
1889
|
}, z.core.$strip>, "component", {
|
|
@@ -2006,6 +2056,22 @@ declare const CanvasConfig: ConfigClass<{
|
|
|
2006
2056
|
__ref: z.ZodString;
|
|
2007
2057
|
}, z.core.$strip>>;
|
|
2008
2058
|
export: z.ZodOptional<z.ZodString>;
|
|
2059
|
+
tokenRefs: z.ZodOptional<z.ZodArray<Omit<EntityClass<z.ZodObject<{
|
|
2060
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2061
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2062
|
+
overrides: z.ZodOptional<SubEntityClass<z.ZodObject<{
|
|
2063
|
+
on: z.ZodType<OverrideCondition, unknown, z.core.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
2064
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2065
|
+
}, z.core.$strip>>>;
|
|
2066
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2067
|
+
cssPrefix: z.ZodOptional<z.ZodString>;
|
|
2068
|
+
}, z.core.$strip>, "token", {
|
|
2069
|
+
readonly create: {
|
|
2070
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
2071
|
+
};
|
|
2072
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
2073
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
2074
|
+
}>>;
|
|
2009
2075
|
}, z.core.$strict>;
|
|
2010
2076
|
readonly description: "Create a component at a new qualified `path`. For a component with nothing in it yet, one to design on the canvas before it has props or variants, use `create-blank` with only a `path` instead of authoring a minimal body here. When its complete body is known, include all layers, anatomy, props, defaults, and styles in this one operation. `data.layers` maps each stable layer name to the element it renders and must include `root` — a tag for a primitive (`{ \"layers\": { \"root\": \"div\" } }`), and for anything built on top, a ref to a primitive (`{ \"root\": { \"__ref\": \"component:Box\" }, \"label\": { \"__ref\": \"component:Text\" } }`), which is what lets the layer take that primitive's style props. A primitive exposes style props as `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:bg\" } }` and declares `children: { \"type\": \"slot\", \"text\": true }` when it holds content — without the slot, nothing nested inside it renders. A composed component exposes a layer's props at its own top level through `forwards`, keyed by layer: `{ \"forwards\": { \"root\": \"*\" } }` passes every prop the root's element takes (so `<Button width=\"full\">` reaches the root's `width`), and a list of member refs (`[{ \"__ref\": \"component:Box#props/width\" }]`, each naming the component that declares the prop) passes only those. A prop a layer already exposes is forwarded, never redeclared in `props`; a `props` entry of `{ \"type\": \"forward\" }` is the reverse route, one of this component's props into a layer's. `anatomy` is the tree the build would read off a render: each node renders a layer (`{ \"__ref\": \"layer:<name>\" }`), an intrinsic tag, or `Slot` (`{ \"element\": \"Slot\", \"props\": { \"name\": \"children\" } }`, where a slot prop's content lands — but a declared slot fills `root` by default, so a primitive still declares its `children` slot prop yet needs no `Slot` node or `children` entry for it, and a `Slot` node is only for landing that content in a nested layer); `children` lists sibling node keys from the `root` node, never a prop name; `text` is a fixed string; `visible` is a condition on a prop (`{ \"$state\": \"<prop>\" }`, or with `eq`); content shown in a nested layer is a route, `children: { \"type\": \"forward\", \"target\": \"label/children\" }`. `$state` appears only in `visible` and in an `element` a prop chooses, never as a prop value. A glyph is a node of its own, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" } }`, listed in the `children` of the layer node that holds it, never a prop value. Text a prop supplies to a text layer is never a node either: declare the prop `{ \"type\": \"forward\", \"target\": \"<layer>/children\" }` and the layer shows it; a `Slot` node goes only under a layer that takes nodes. A style rule is `\"styles\": { \"*\": { \"when\": null, \"layers\": { \"root\": { \"bg\": \"surface\" } } } }`, keyed by a name, with each layer's bag under `layers`. A composed component carries its own styles: give it an unconditional (`\"*\"`) rule that lays out and surfaces it through the system's style properties — spacing, alignment and gap on the container, a background and color where it has one — rather than leaning on the bare primitives, which paint flat. Style a layer only with the style props the primitive it renders exposes, set to the values those props accept: `component/get` on the primitive lists both, so read it and choose from that rather than reaching for a CSS name or value the system has no style property for. Set `preview` (`{ \"*\": { \"when\": null, \"props\": { \"children\": \"Example\" } } }`) or `defaultProps` so the component previews with content; a root that takes children renders empty otherwise. A style rule's layer bag is keyed by style-prop name (`fontWeight`, `color`), never by CSS property name, and each value is one of that prop's values.";
|
|
2011
2077
|
readonly example: ({
|
|
@@ -3611,6 +3677,22 @@ declare function createCanvasConfig(system: AnySystemConfig): ConfigInstance<{
|
|
|
3611
3677
|
__ref: z.ZodString;
|
|
3612
3678
|
}, z.core.$strip>>;
|
|
3613
3679
|
export: z.ZodOptional<z.ZodString>;
|
|
3680
|
+
tokenRefs: z.ZodOptional<z.ZodArray<Omit<EntityClass<z.ZodObject<{
|
|
3681
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
3682
|
+
type: z.ZodOptional<z.ZodString>;
|
|
3683
|
+
overrides: z.ZodOptional<SubEntityClass<z.ZodObject<{
|
|
3684
|
+
on: z.ZodType<OverrideCondition, unknown, z.core.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
3685
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
3686
|
+
}, z.core.$strip>>>;
|
|
3687
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3688
|
+
cssPrefix: z.ZodOptional<z.ZodString>;
|
|
3689
|
+
}, z.core.$strip>, "token", {
|
|
3690
|
+
readonly create: {
|
|
3691
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
3692
|
+
};
|
|
3693
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
3694
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
3695
|
+
}>>;
|
|
3614
3696
|
}, z.core.$strict>, z.ZodObject<{
|
|
3615
3697
|
icon: z.ZodOptional<z.ZodString>;
|
|
3616
3698
|
}, z.core.$strip>, "component", {
|
|
@@ -3783,6 +3865,22 @@ declare function createCanvasConfig(system: AnySystemConfig): ConfigInstance<{
|
|
|
3783
3865
|
__ref: z.ZodString;
|
|
3784
3866
|
}, z.core.$strip>>;
|
|
3785
3867
|
export: z.ZodOptional<z.ZodString>;
|
|
3868
|
+
tokenRefs: z.ZodOptional<z.ZodArray<Omit<EntityClass<z.ZodObject<{
|
|
3869
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
3870
|
+
type: z.ZodOptional<z.ZodString>;
|
|
3871
|
+
overrides: z.ZodOptional<SubEntityClass<z.ZodObject<{
|
|
3872
|
+
on: z.ZodType<OverrideCondition, unknown, z.core.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
3873
|
+
value: z.ZodType<string | number | Ref | ComposedValue, unknown, z.core.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
3874
|
+
}, z.core.$strip>>>;
|
|
3875
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3876
|
+
cssPrefix: z.ZodOptional<z.ZodString>;
|
|
3877
|
+
}, z.core.$strip>, "token", {
|
|
3878
|
+
readonly create: {
|
|
3879
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
3880
|
+
};
|
|
3881
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
3882
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
3883
|
+
}>>;
|
|
3786
3884
|
}, z.core.$strict>;
|
|
3787
3885
|
readonly description: "Create a component at a new qualified `path`. For a component with nothing in it yet, one to design on the canvas before it has props or variants, use `create-blank` with only a `path` instead of authoring a minimal body here. When its complete body is known, include all layers, anatomy, props, defaults, and styles in this one operation. `data.layers` maps each stable layer name to the element it renders and must include `root` — a tag for a primitive (`{ \"layers\": { \"root\": \"div\" } }`), and for anything built on top, a ref to a primitive (`{ \"root\": { \"__ref\": \"component:Box\" }, \"label\": { \"__ref\": \"component:Text\" } }`), which is what lets the layer take that primitive's style props. A primitive exposes style props as `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:bg\" } }` and declares `children: { \"type\": \"slot\", \"text\": true }` when it holds content — without the slot, nothing nested inside it renders. A composed component exposes a layer's props at its own top level through `forwards`, keyed by layer: `{ \"forwards\": { \"root\": \"*\" } }` passes every prop the root's element takes (so `<Button width=\"full\">` reaches the root's `width`), and a list of member refs (`[{ \"__ref\": \"component:Box#props/width\" }]`, each naming the component that declares the prop) passes only those. A prop a layer already exposes is forwarded, never redeclared in `props`; a `props` entry of `{ \"type\": \"forward\" }` is the reverse route, one of this component's props into a layer's. `anatomy` is the tree the build would read off a render: each node renders a layer (`{ \"__ref\": \"layer:<name>\" }`), an intrinsic tag, or `Slot` (`{ \"element\": \"Slot\", \"props\": { \"name\": \"children\" } }`, where a slot prop's content lands — but a declared slot fills `root` by default, so a primitive still declares its `children` slot prop yet needs no `Slot` node or `children` entry for it, and a `Slot` node is only for landing that content in a nested layer); `children` lists sibling node keys from the `root` node, never a prop name; `text` is a fixed string; `visible` is a condition on a prop (`{ \"$state\": \"<prop>\" }`, or with `eq`); content shown in a nested layer is a route, `children: { \"type\": \"forward\", \"target\": \"label/children\" }`. `$state` appears only in `visible` and in an `element` a prop chooses, never as a prop value. A glyph is a node of its own, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" } }`, listed in the `children` of the layer node that holds it, never a prop value. Text a prop supplies to a text layer is never a node either: declare the prop `{ \"type\": \"forward\", \"target\": \"<layer>/children\" }` and the layer shows it; a `Slot` node goes only under a layer that takes nodes. A style rule is `\"styles\": { \"*\": { \"when\": null, \"layers\": { \"root\": { \"bg\": \"surface\" } } } }`, keyed by a name, with each layer's bag under `layers`. A composed component carries its own styles: give it an unconditional (`\"*\"`) rule that lays out and surfaces it through the system's style properties — spacing, alignment and gap on the container, a background and color where it has one — rather than leaning on the bare primitives, which paint flat. Style a layer only with the style props the primitive it renders exposes, set to the values those props accept: `component/get` on the primitive lists both, so read it and choose from that rather than reaching for a CSS name or value the system has no style property for. Set `preview` (`{ \"*\": { \"when\": null, \"props\": { \"children\": \"Example\" } } }`) or `defaultProps` so the component previews with content; a root that takes children renders empty otherwise. A style rule's layer bag is keyed by style-prop name (`fontWeight`, `color`), never by CSS property name, and each value is one of that prop's values.";
|
|
3788
3886
|
readonly example: ({
|
|
@@ -18,8 +18,8 @@ import { instanceAt } from "../spec/instance.js";
|
|
|
18
18
|
import { ComposedValue } from "../entities/system/composed-values.js";
|
|
19
19
|
import { DerivedColor } from "../entities/system/color.js";
|
|
20
20
|
import { StyleValue } from "../entities/system/style-bag.js";
|
|
21
|
+
import { OverrideCondition, TokenRefPath, TokenReference } from "../entities/system/Token.js";
|
|
21
22
|
import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../entities/system/Component.js";
|
|
22
|
-
import { OverrideCondition } from "../entities/system/Token.js";
|
|
23
23
|
import * as _$zod from "zod";
|
|
24
24
|
import * as _$zod_v4_core0 from "zod/v4/core";
|
|
25
25
|
|
|
@@ -51,6 +51,7 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
51
51
|
}, _$zod_v4_core0.$strict>]>>;
|
|
52
52
|
scope: _$zod.ZodOptional<_$zod.ZodString>;
|
|
53
53
|
preflight: _$zod.ZodOptional<_$zod.ZodBoolean>;
|
|
54
|
+
rem: _$zod.ZodOptional<_$zod.ZodString>;
|
|
54
55
|
safelist: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
55
56
|
}, _$zod_v4_core0.$strict>>;
|
|
56
57
|
playground: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
@@ -250,6 +251,22 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
250
251
|
__ref: _$zod.ZodString;
|
|
251
252
|
}, _$zod_v4_core0.$strip>>;
|
|
252
253
|
export: _$zod.ZodOptional<_$zod.ZodString>;
|
|
254
|
+
tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
|
|
255
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
256
|
+
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
257
|
+
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
258
|
+
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
259
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
260
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
261
|
+
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
262
|
+
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
263
|
+
}, _$zod_v4_core0.$strip>, "token", {
|
|
264
|
+
readonly create: {
|
|
265
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
266
|
+
};
|
|
267
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
268
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
269
|
+
}>>;
|
|
253
270
|
}, _$zod_v4_core0.$strict>, _$zod.ZodObject<{
|
|
254
271
|
icon: _$zod.ZodOptional<_$zod.ZodString>;
|
|
255
272
|
}, _$zod_v4_core0.$strip>, "component", {
|
|
@@ -422,6 +439,22 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
422
439
|
__ref: _$zod.ZodString;
|
|
423
440
|
}, _$zod_v4_core0.$strip>>;
|
|
424
441
|
export: _$zod.ZodOptional<_$zod.ZodString>;
|
|
442
|
+
tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
|
|
443
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
444
|
+
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
445
|
+
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
446
|
+
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
447
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
448
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
449
|
+
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
450
|
+
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
451
|
+
}, _$zod_v4_core0.$strip>, "token", {
|
|
452
|
+
readonly create: {
|
|
453
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
454
|
+
};
|
|
455
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
456
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
457
|
+
}>>;
|
|
425
458
|
}, _$zod_v4_core0.$strict>;
|
|
426
459
|
readonly description: "Create a component at a new qualified `path`. For a component with nothing in it yet, one to design on the canvas before it has props or variants, use `create-blank` with only a `path` instead of authoring a minimal body here. When its complete body is known, include all layers, anatomy, props, defaults, and styles in this one operation. `data.layers` maps each stable layer name to the element it renders and must include `root` — a tag for a primitive (`{ \"layers\": { \"root\": \"div\" } }`), and for anything built on top, a ref to a primitive (`{ \"root\": { \"__ref\": \"component:Box\" }, \"label\": { \"__ref\": \"component:Text\" } }`), which is what lets the layer take that primitive's style props. A primitive exposes style props as `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:bg\" } }` and declares `children: { \"type\": \"slot\", \"text\": true }` when it holds content — without the slot, nothing nested inside it renders. A composed component exposes a layer's props at its own top level through `forwards`, keyed by layer: `{ \"forwards\": { \"root\": \"*\" } }` passes every prop the root's element takes (so `<Button width=\"full\">` reaches the root's `width`), and a list of member refs (`[{ \"__ref\": \"component:Box#props/width\" }]`, each naming the component that declares the prop) passes only those. A prop a layer already exposes is forwarded, never redeclared in `props`; a `props` entry of `{ \"type\": \"forward\" }` is the reverse route, one of this component's props into a layer's. `anatomy` is the tree the build would read off a render: each node renders a layer (`{ \"__ref\": \"layer:<name>\" }`), an intrinsic tag, or `Slot` (`{ \"element\": \"Slot\", \"props\": { \"name\": \"children\" } }`, where a slot prop's content lands — but a declared slot fills `root` by default, so a primitive still declares its `children` slot prop yet needs no `Slot` node or `children` entry for it, and a `Slot` node is only for landing that content in a nested layer); `children` lists sibling node keys from the `root` node, never a prop name; `text` is a fixed string; `visible` is a condition on a prop (`{ \"$state\": \"<prop>\" }`, or with `eq`); content shown in a nested layer is a route, `children: { \"type\": \"forward\", \"target\": \"label/children\" }`. `$state` appears only in `visible` and in an `element` a prop chooses, never as a prop value. A glyph is a node of its own, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" } }`, listed in the `children` of the layer node that holds it, never a prop value. Text a prop supplies to a text layer is never a node either: declare the prop `{ \"type\": \"forward\", \"target\": \"<layer>/children\" }` and the layer shows it; a `Slot` node goes only under a layer that takes nodes. A style rule is `\"styles\": { \"*\": { \"when\": null, \"layers\": { \"root\": { \"bg\": \"surface\" } } } }`, keyed by a name, with each layer's bag under `layers`. A composed component carries its own styles: give it an unconditional (`\"*\"`) rule that lays out and surfaces it through the system's style properties — spacing, alignment and gap on the container, a background and color where it has one — rather than leaning on the bare primitives, which paint flat. Style a layer only with the style props the primitive it renders exposes, set to the values those props accept: `component/get` on the primitive lists both, so read it and choose from that rather than reaching for a CSS name or value the system has no style property for. Set `preview` (`{ \"*\": { \"when\": null, \"props\": { \"children\": \"Example\" } } }`) or `defaultProps` so the component previews with content; a root that takes children renders empty otherwise. A style rule's layer bag is keyed by style-prop name (`fontWeight`, `color`), never by CSS property name, and each value is one of that prop's values.";
|
|
427
460
|
readonly example: ({
|
|
@@ -1469,8 +1502,8 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
1469
1502
|
value: _$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber]>;
|
|
1470
1503
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
1471
1504
|
type: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
1472
|
-
state: "state";
|
|
1473
1505
|
mode: "mode";
|
|
1506
|
+
state: "state";
|
|
1474
1507
|
}>>;
|
|
1475
1508
|
default: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1476
1509
|
__ref: _$zod.ZodString;
|
|
@@ -2205,6 +2238,7 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
2205
2238
|
}, _$zod_v4_core0.$strict>]>>;
|
|
2206
2239
|
scope: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2207
2240
|
preflight: _$zod.ZodOptional<_$zod.ZodBoolean>;
|
|
2241
|
+
rem: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2208
2242
|
safelist: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
2209
2243
|
}, _$zod_v4_core0.$strict>>;
|
|
2210
2244
|
playground: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
@@ -2404,6 +2438,22 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
2404
2438
|
__ref: _$zod.ZodString;
|
|
2405
2439
|
}, _$zod_v4_core0.$strip>>;
|
|
2406
2440
|
export: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2441
|
+
tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
|
|
2442
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2443
|
+
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2444
|
+
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
2445
|
+
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
2446
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2447
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
2448
|
+
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
2449
|
+
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2450
|
+
}, _$zod_v4_core0.$strip>, "token", {
|
|
2451
|
+
readonly create: {
|
|
2452
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
2453
|
+
};
|
|
2454
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
2455
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
2456
|
+
}>>;
|
|
2407
2457
|
}, _$zod_v4_core0.$strict>, _$zod.ZodObject<{
|
|
2408
2458
|
icon: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2409
2459
|
}, _$zod_v4_core0.$strip>, "component", {
|
|
@@ -2576,6 +2626,22 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
2576
2626
|
__ref: _$zod.ZodString;
|
|
2577
2627
|
}, _$zod_v4_core0.$strip>>;
|
|
2578
2628
|
export: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2629
|
+
tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
|
|
2630
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2631
|
+
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2632
|
+
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
2633
|
+
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
2634
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2635
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
2636
|
+
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
2637
|
+
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2638
|
+
}, _$zod_v4_core0.$strip>, "token", {
|
|
2639
|
+
readonly create: {
|
|
2640
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
2641
|
+
};
|
|
2642
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
2643
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
2644
|
+
}>>;
|
|
2579
2645
|
}, _$zod_v4_core0.$strict>;
|
|
2580
2646
|
readonly description: "Create a component at a new qualified `path`. For a component with nothing in it yet, one to design on the canvas before it has props or variants, use `create-blank` with only a `path` instead of authoring a minimal body here. When its complete body is known, include all layers, anatomy, props, defaults, and styles in this one operation. `data.layers` maps each stable layer name to the element it renders and must include `root` — a tag for a primitive (`{ \"layers\": { \"root\": \"div\" } }`), and for anything built on top, a ref to a primitive (`{ \"root\": { \"__ref\": \"component:Box\" }, \"label\": { \"__ref\": \"component:Text\" } }`), which is what lets the layer take that primitive's style props. A primitive exposes style props as `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:bg\" } }` and declares `children: { \"type\": \"slot\", \"text\": true }` when it holds content — without the slot, nothing nested inside it renders. A composed component exposes a layer's props at its own top level through `forwards`, keyed by layer: `{ \"forwards\": { \"root\": \"*\" } }` passes every prop the root's element takes (so `<Button width=\"full\">` reaches the root's `width`), and a list of member refs (`[{ \"__ref\": \"component:Box#props/width\" }]`, each naming the component that declares the prop) passes only those. A prop a layer already exposes is forwarded, never redeclared in `props`; a `props` entry of `{ \"type\": \"forward\" }` is the reverse route, one of this component's props into a layer's. `anatomy` is the tree the build would read off a render: each node renders a layer (`{ \"__ref\": \"layer:<name>\" }`), an intrinsic tag, or `Slot` (`{ \"element\": \"Slot\", \"props\": { \"name\": \"children\" } }`, where a slot prop's content lands — but a declared slot fills `root` by default, so a primitive still declares its `children` slot prop yet needs no `Slot` node or `children` entry for it, and a `Slot` node is only for landing that content in a nested layer); `children` lists sibling node keys from the `root` node, never a prop name; `text` is a fixed string; `visible` is a condition on a prop (`{ \"$state\": \"<prop>\" }`, or with `eq`); content shown in a nested layer is a route, `children: { \"type\": \"forward\", \"target\": \"label/children\" }`. `$state` appears only in `visible` and in an `element` a prop chooses, never as a prop value. A glyph is a node of its own, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" } }`, listed in the `children` of the layer node that holds it, never a prop value. Text a prop supplies to a text layer is never a node either: declare the prop `{ \"type\": \"forward\", \"target\": \"<layer>/children\" }` and the layer shows it; a `Slot` node goes only under a layer that takes nodes. A style rule is `\"styles\": { \"*\": { \"when\": null, \"layers\": { \"root\": { \"bg\": \"surface\" } } } }`, keyed by a name, with each layer's bag under `layers`. A composed component carries its own styles: give it an unconditional (`\"*\"`) rule that lays out and surfaces it through the system's style properties — spacing, alignment and gap on the container, a background and color where it has one — rather than leaning on the bare primitives, which paint flat. Style a layer only with the style props the primitive it renders exposes, set to the values those props accept: `component/get` on the primitive lists both, so read it and choose from that rather than reaching for a CSS name or value the system has no style property for. Set `preview` (`{ \"*\": { \"when\": null, \"props\": { \"children\": \"Example\" } } }`) or `defaultProps` so the component previews with content; a root that takes children renders empty otherwise. A style rule's layer bag is keyed by style-prop name (`fontWeight`, `color`), never by CSS property name, and each value is one of that prop's values.";
|
|
2581
2647
|
readonly example: ({
|
|
@@ -3623,8 +3689,8 @@ declare const ReactNativeSystem: ConfigClass<{
|
|
|
3623
3689
|
value: _$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber]>;
|
|
3624
3690
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
3625
3691
|
type: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
3626
|
-
state: "state";
|
|
3627
3692
|
mode: "mode";
|
|
3693
|
+
state: "state";
|
|
3628
3694
|
}>>;
|
|
3629
3695
|
default: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
3630
3696
|
__ref: _$zod.ZodString;
|
package/dist/configs/system.d.ts
CHANGED
|
@@ -17,8 +17,8 @@ import { cellAt } from "../spec/cell.js";
|
|
|
17
17
|
import { instanceAt } from "../spec/instance.js";
|
|
18
18
|
import { ComposedValue } from "../entities/system/composed-values.js";
|
|
19
19
|
import { StyleValue } from "../entities/system/style-bag.js";
|
|
20
|
+
import { OverrideCondition, TokenRefPath, TokenReference } from "../entities/system/Token.js";
|
|
20
21
|
import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../entities/system/Component.js";
|
|
21
|
-
import { OverrideCondition } from "../entities/system/Token.js";
|
|
22
22
|
import * as _$zod from "zod";
|
|
23
23
|
import * as _$zod_v4_core0 from "zod/v4/core";
|
|
24
24
|
|
|
@@ -48,6 +48,7 @@ declare const System: ConfigClass<{
|
|
|
48
48
|
}, _$zod_v4_core0.$strict>]>>;
|
|
49
49
|
scope: _$zod.ZodOptional<_$zod.ZodString>;
|
|
50
50
|
preflight: _$zod.ZodOptional<_$zod.ZodBoolean>;
|
|
51
|
+
rem: _$zod.ZodOptional<_$zod.ZodString>;
|
|
51
52
|
safelist: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
52
53
|
}, _$zod_v4_core0.$strict>>;
|
|
53
54
|
playground: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
@@ -55,7 +56,7 @@ declare const System: ConfigClass<{
|
|
|
55
56
|
port: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
56
57
|
}, _$zod_v4_core0.$strict>>;
|
|
57
58
|
}, _$zod_v4_core0.$strict>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "settings", Record<never, never>, Record<never, never>, true, Record<never, never>, Record<never, never>>;
|
|
58
|
-
tokens: EntityClass<_$zod.ZodObject<{
|
|
59
|
+
tokens: Omit<EntityClass<_$zod.ZodObject<{
|
|
59
60
|
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
60
61
|
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
61
62
|
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
@@ -68,7 +69,9 @@ declare const System: ConfigClass<{
|
|
|
68
69
|
readonly create: {
|
|
69
70
|
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
70
71
|
};
|
|
71
|
-
}, Record<never, never>, false, Record<never, never>, Record<never, never
|
|
72
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
73
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
74
|
+
};
|
|
72
75
|
components: Omit<EntityClass<_$zod.ZodObject<{
|
|
73
76
|
layers: SubEntityClass<_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodLazy<_$zod.ZodType<Ref, unknown, _$zod_v4_core0.$ZodTypeInternals<Ref, unknown>>>, EntityClass<_$zod.ZodObject<{
|
|
74
77
|
version: _$zod.ZodOptional<_$zod.ZodString>;
|
|
@@ -237,6 +240,22 @@ declare const System: ConfigClass<{
|
|
|
237
240
|
__ref: _$zod.ZodString;
|
|
238
241
|
}, _$zod_v4_core0.$strip>>;
|
|
239
242
|
export: _$zod.ZodOptional<_$zod.ZodString>;
|
|
243
|
+
tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
|
|
244
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
245
|
+
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
246
|
+
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
247
|
+
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
248
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
249
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
250
|
+
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
251
|
+
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
252
|
+
}, _$zod_v4_core0.$strip>, "token", {
|
|
253
|
+
readonly create: {
|
|
254
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
255
|
+
};
|
|
256
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
257
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
258
|
+
}>>;
|
|
240
259
|
}, _$zod_v4_core0.$strict>, _$zod.ZodObject<{
|
|
241
260
|
icon: _$zod.ZodOptional<_$zod.ZodString>;
|
|
242
261
|
}, _$zod_v4_core0.$strip>, "component", {
|
|
@@ -409,6 +428,22 @@ declare const System: ConfigClass<{
|
|
|
409
428
|
__ref: _$zod.ZodString;
|
|
410
429
|
}, _$zod_v4_core0.$strip>>;
|
|
411
430
|
export: _$zod.ZodOptional<_$zod.ZodString>;
|
|
431
|
+
tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
|
|
432
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
433
|
+
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
434
|
+
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
435
|
+
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
436
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
437
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
438
|
+
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
439
|
+
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
440
|
+
}, _$zod_v4_core0.$strip>, "token", {
|
|
441
|
+
readonly create: {
|
|
442
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
443
|
+
};
|
|
444
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
445
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
446
|
+
}>>;
|
|
412
447
|
}, _$zod_v4_core0.$strict>;
|
|
413
448
|
readonly description: "Create a component at a new qualified `path`. For a component with nothing in it yet, one to design on the canvas before it has props or variants, use `create-blank` with only a `path` instead of authoring a minimal body here. When its complete body is known, include all layers, anatomy, props, defaults, and styles in this one operation. `data.layers` maps each stable layer name to the element it renders and must include `root` — a tag for a primitive (`{ \"layers\": { \"root\": \"div\" } }`), and for anything built on top, a ref to a primitive (`{ \"root\": { \"__ref\": \"component:Box\" }, \"label\": { \"__ref\": \"component:Text\" } }`), which is what lets the layer take that primitive's style props. A primitive exposes style props as `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:bg\" } }` and declares `children: { \"type\": \"slot\", \"text\": true }` when it holds content — without the slot, nothing nested inside it renders. A composed component exposes a layer's props at its own top level through `forwards`, keyed by layer: `{ \"forwards\": { \"root\": \"*\" } }` passes every prop the root's element takes (so `<Button width=\"full\">` reaches the root's `width`), and a list of member refs (`[{ \"__ref\": \"component:Box#props/width\" }]`, each naming the component that declares the prop) passes only those. A prop a layer already exposes is forwarded, never redeclared in `props`; a `props` entry of `{ \"type\": \"forward\" }` is the reverse route, one of this component's props into a layer's. `anatomy` is the tree the build would read off a render: each node renders a layer (`{ \"__ref\": \"layer:<name>\" }`), an intrinsic tag, or `Slot` (`{ \"element\": \"Slot\", \"props\": { \"name\": \"children\" } }`, where a slot prop's content lands — but a declared slot fills `root` by default, so a primitive still declares its `children` slot prop yet needs no `Slot` node or `children` entry for it, and a `Slot` node is only for landing that content in a nested layer); `children` lists sibling node keys from the `root` node, never a prop name; `text` is a fixed string; `visible` is a condition on a prop (`{ \"$state\": \"<prop>\" }`, or with `eq`); content shown in a nested layer is a route, `children: { \"type\": \"forward\", \"target\": \"label/children\" }`. `$state` appears only in `visible` and in an `element` a prop chooses, never as a prop value. A glyph is a node of its own, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" } }`, listed in the `children` of the layer node that holds it, never a prop value. Text a prop supplies to a text layer is never a node either: declare the prop `{ \"type\": \"forward\", \"target\": \"<layer>/children\" }` and the layer shows it; a `Slot` node goes only under a layer that takes nodes. A style rule is `\"styles\": { \"*\": { \"when\": null, \"layers\": { \"root\": { \"bg\": \"surface\" } } } }`, keyed by a name, with each layer's bag under `layers`. A composed component carries its own styles: give it an unconditional (`\"*\"`) rule that lays out and surfaces it through the system's style properties — spacing, alignment and gap on the container, a background and color where it has one — rather than leaning on the bare primitives, which paint flat. Style a layer only with the style props the primitive it renders exposes, set to the values those props accept: `component/get` on the primitive lists both, so read it and choose from that rather than reaching for a CSS name or value the system has no style property for. Set `preview` (`{ \"*\": { \"when\": null, \"props\": { \"children\": \"Example\" } } }`) or `defaultProps` so the component previews with content; a root that takes children renders empty otherwise. A style rule's layer bag is keyed by style-prop name (`fontWeight`, `color`), never by CSS property name, and each value is one of that prop's values.";
|
|
414
449
|
readonly example: ({
|
|
@@ -1457,8 +1492,8 @@ declare const System: ConfigClass<{
|
|
|
1457
1492
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "composite", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>>]>;
|
|
1458
1493
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
1459
1494
|
type: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
1460
|
-
state: "state";
|
|
1461
1495
|
mode: "mode";
|
|
1496
|
+
state: "state";
|
|
1462
1497
|
}>>;
|
|
1463
1498
|
default: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1464
1499
|
__ref: _$zod.ZodString;
|
|
@@ -2074,6 +2109,7 @@ declare const System: ConfigClass<{
|
|
|
2074
2109
|
}, _$zod_v4_core0.$strict>]>>;
|
|
2075
2110
|
scope: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2076
2111
|
preflight: _$zod.ZodOptional<_$zod.ZodBoolean>;
|
|
2112
|
+
rem: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2077
2113
|
safelist: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
2078
2114
|
}, _$zod_v4_core0.$strict>>;
|
|
2079
2115
|
playground: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
@@ -2081,7 +2117,7 @@ declare const System: ConfigClass<{
|
|
|
2081
2117
|
port: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
2082
2118
|
}, _$zod_v4_core0.$strict>>;
|
|
2083
2119
|
}, _$zod_v4_core0.$strict>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "settings", Record<never, never>, Record<never, never>, true, Record<never, never>, Record<never, never>>;
|
|
2084
|
-
tokens: EntityClass<_$zod.ZodObject<{
|
|
2120
|
+
tokens: Omit<EntityClass<_$zod.ZodObject<{
|
|
2085
2121
|
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2086
2122
|
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2087
2123
|
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
@@ -2094,7 +2130,9 @@ declare const System: ConfigClass<{
|
|
|
2094
2130
|
readonly create: {
|
|
2095
2131
|
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
2096
2132
|
};
|
|
2097
|
-
}, Record<never, never>, false, Record<never, never>, Record<never, never
|
|
2133
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
2134
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
2135
|
+
};
|
|
2098
2136
|
components: Omit<EntityClass<_$zod.ZodObject<{
|
|
2099
2137
|
layers: SubEntityClass<_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodLazy<_$zod.ZodType<Ref, unknown, _$zod_v4_core0.$ZodTypeInternals<Ref, unknown>>>, EntityClass<_$zod.ZodObject<{
|
|
2100
2138
|
version: _$zod.ZodOptional<_$zod.ZodString>;
|
|
@@ -2263,6 +2301,22 @@ declare const System: ConfigClass<{
|
|
|
2263
2301
|
__ref: _$zod.ZodString;
|
|
2264
2302
|
}, _$zod_v4_core0.$strip>>;
|
|
2265
2303
|
export: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2304
|
+
tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
|
|
2305
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2306
|
+
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2307
|
+
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
2308
|
+
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
2309
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2310
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
2311
|
+
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
2312
|
+
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2313
|
+
}, _$zod_v4_core0.$strip>, "token", {
|
|
2314
|
+
readonly create: {
|
|
2315
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
2316
|
+
};
|
|
2317
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
2318
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
2319
|
+
}>>;
|
|
2266
2320
|
}, _$zod_v4_core0.$strict>, _$zod.ZodObject<{
|
|
2267
2321
|
icon: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2268
2322
|
}, _$zod_v4_core0.$strip>, "component", {
|
|
@@ -2435,6 +2489,22 @@ declare const System: ConfigClass<{
|
|
|
2435
2489
|
__ref: _$zod.ZodString;
|
|
2436
2490
|
}, _$zod_v4_core0.$strip>>;
|
|
2437
2491
|
export: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2492
|
+
tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
|
|
2493
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2494
|
+
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2495
|
+
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
2496
|
+
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
2497
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
2498
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
2499
|
+
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
2500
|
+
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2501
|
+
}, _$zod_v4_core0.$strip>, "token", {
|
|
2502
|
+
readonly create: {
|
|
2503
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
2504
|
+
};
|
|
2505
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
2506
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
2507
|
+
}>>;
|
|
2438
2508
|
}, _$zod_v4_core0.$strict>;
|
|
2439
2509
|
readonly description: "Create a component at a new qualified `path`. For a component with nothing in it yet, one to design on the canvas before it has props or variants, use `create-blank` with only a `path` instead of authoring a minimal body here. When its complete body is known, include all layers, anatomy, props, defaults, and styles in this one operation. `data.layers` maps each stable layer name to the element it renders and must include `root` — a tag for a primitive (`{ \"layers\": { \"root\": \"div\" } }`), and for anything built on top, a ref to a primitive (`{ \"root\": { \"__ref\": \"component:Box\" }, \"label\": { \"__ref\": \"component:Text\" } }`), which is what lets the layer take that primitive's style props. A primitive exposes style props as `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:bg\" } }` and declares `children: { \"type\": \"slot\", \"text\": true }` when it holds content — without the slot, nothing nested inside it renders. A composed component exposes a layer's props at its own top level through `forwards`, keyed by layer: `{ \"forwards\": { \"root\": \"*\" } }` passes every prop the root's element takes (so `<Button width=\"full\">` reaches the root's `width`), and a list of member refs (`[{ \"__ref\": \"component:Box#props/width\" }]`, each naming the component that declares the prop) passes only those. A prop a layer already exposes is forwarded, never redeclared in `props`; a `props` entry of `{ \"type\": \"forward\" }` is the reverse route, one of this component's props into a layer's. `anatomy` is the tree the build would read off a render: each node renders a layer (`{ \"__ref\": \"layer:<name>\" }`), an intrinsic tag, or `Slot` (`{ \"element\": \"Slot\", \"props\": { \"name\": \"children\" } }`, where a slot prop's content lands — but a declared slot fills `root` by default, so a primitive still declares its `children` slot prop yet needs no `Slot` node or `children` entry for it, and a `Slot` node is only for landing that content in a nested layer); `children` lists sibling node keys from the `root` node, never a prop name; `text` is a fixed string; `visible` is a condition on a prop (`{ \"$state\": \"<prop>\" }`, or with `eq`); content shown in a nested layer is a route, `children: { \"type\": \"forward\", \"target\": \"label/children\" }`. `$state` appears only in `visible` and in an `element` a prop chooses, never as a prop value. A glyph is a node of its own, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" } }`, listed in the `children` of the layer node that holds it, never a prop value. Text a prop supplies to a text layer is never a node either: declare the prop `{ \"type\": \"forward\", \"target\": \"<layer>/children\" }` and the layer shows it; a `Slot` node goes only under a layer that takes nodes. A style rule is `\"styles\": { \"*\": { \"when\": null, \"layers\": { \"root\": { \"bg\": \"surface\" } } } }`, keyed by a name, with each layer's bag under `layers`. A composed component carries its own styles: give it an unconditional (`\"*\"`) rule that lays out and surfaces it through the system's style properties — spacing, alignment and gap on the container, a background and color where it has one — rather than leaning on the bare primitives, which paint flat. Style a layer only with the style props the primitive it renders exposes, set to the values those props accept: `component/get` on the primitive lists both, so read it and choose from that rather than reaching for a CSS name or value the system has no style property for. Set `preview` (`{ \"*\": { \"when\": null, \"props\": { \"children\": \"Example\" } } }`) or `defaultProps` so the component previews with content; a root that takes children renders empty otherwise. A style rule's layer bag is keyed by style-prop name (`fontWeight`, `color`), never by CSS property name, and each value is one of that prop's values.";
|
|
2440
2510
|
readonly example: ({
|
|
@@ -3483,8 +3553,8 @@ declare const System: ConfigClass<{
|
|
|
3483
3553
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "composite", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>>]>;
|
|
3484
3554
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
3485
3555
|
type: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
3486
|
-
state: "state";
|
|
3487
3556
|
mode: "mode";
|
|
3557
|
+
state: "state";
|
|
3488
3558
|
}>>;
|
|
3489
3559
|
default: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
3490
3560
|
__ref: _$zod.ZodString;
|
package/dist/configs/system.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Modifier } from "../entities/system/Modifier.js";
|
|
|
5
5
|
import { StyleProperty } from "../entities/system/StyleProperty.js";
|
|
6
6
|
import { Package } from "../entities/system/Package.js";
|
|
7
7
|
import { File } from "../entities/system/File.js";
|
|
8
|
+
import { Token } from "../entities/system/Token.js";
|
|
8
9
|
import { Component } from "../entities/system/Component.js";
|
|
9
10
|
import { Icon } from "../entities/system/Icon.js";
|
|
10
11
|
import { Device } from "../entities/system/Device.js";
|
|
@@ -19,7 +20,6 @@ import { GuidanceStyle } from "../entities/system/GuidanceStyle.js";
|
|
|
19
20
|
import { WEB_CONFIG_NAME } from "./platform.js";
|
|
20
21
|
import { LinkedSystem } from "../entities/system/LinkedSystem.js";
|
|
21
22
|
import { Motion } from "../entities/system/Motion.js";
|
|
22
|
-
import { Token } from "../entities/system/Token.js";
|
|
23
23
|
import { loadV1Artifact } from "../migrations/2.0.0/v1-artifact.js";
|
|
24
24
|
import { settingsAsKindMigration } from "../migrations/20260908171448_settings_as_kind.js";
|
|
25
25
|
import { visibleStatePointerMigration } from "../migrations/20260908194245_visible_state_pointer.js";
|
|
@@ -38,6 +38,7 @@ import { iconLibrariesMigration } from "../migrations/20260922013625_icon_librar
|
|
|
38
38
|
import { iconCanvasToolMigration } from "../migrations/20260923005318_icon_canvas_tool.js";
|
|
39
39
|
import { computedValuesAndRepeatedNodesMigration } from "../migrations/20260923112910_computed_values_and_repeated_nodes.js";
|
|
40
40
|
import { transitionTokenValueMigration } from "../migrations/20260923144958_transition_token_value.js";
|
|
41
|
+
import { renderTokenRefsMigration } from "../migrations/20260923160425_render_token_refs.js";
|
|
41
42
|
//#region src/configs/system.ts
|
|
42
43
|
/**
|
|
43
44
|
* `System` — the design-system config TYPE. Declares the exact kinds a design system owns (tokens,
|
|
@@ -96,5 +97,6 @@ if (!registeredSchemaMigrations().has(20260922013625)) registerSchemaMigrations(
|
|
|
96
97
|
if (!registeredSchemaMigrations().has(20260923005318)) registerSchemaMigrations(iconCanvasToolMigration);
|
|
97
98
|
if (!registeredSchemaMigrations().has(20260923112910)) registerSchemaMigrations(computedValuesAndRepeatedNodesMigration);
|
|
98
99
|
if (!registeredSchemaMigrations().has(20260923144958)) registerSchemaMigrations(transitionTokenValueMigration);
|
|
100
|
+
if (!registeredSchemaMigrations().has(20260923160425)) registerSchemaMigrations(renderTokenRefsMigration);
|
|
99
101
|
//#endregion
|
|
100
102
|
export { System };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/css/root-font-size.d.ts
|
|
2
|
+
/** A root font size that parses, and the pixels one `rem` is when the value fixes one. */
|
|
3
|
+
interface RootFontSize {
|
|
4
|
+
/** As written. */
|
|
5
|
+
readonly css: string;
|
|
6
|
+
/** The pixels one `rem` is: a `px` value as is, a relative one (`%`, `em`, `rem`) against the
|
|
7
|
+
* browser's 16px default. `undefined` for a value that fixes none — a fluid `clamp(…)`, a
|
|
8
|
+
* viewport unit, a keyword. */
|
|
9
|
+
readonly px: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The value parsed, or `undefined` when it is not a `font-size` a stylesheet can carry.
|
|
13
|
+
*/
|
|
14
|
+
declare function parseRootFontSize(value: string): RootFontSize | undefined;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { RootFontSize, parseRootFontSize };
|