@yahoo/uds-create-config 4.35.3 → 4.36.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.
Files changed (68) hide show
  1. package/dist/configs/CanvasConfig.d.ts +68 -5167
  2. package/dist/configs/CanvasConfig.js +0 -76
  3. package/dist/configs/documentation.d.ts +11 -251
  4. package/dist/configs/documentation.js +0 -1
  5. package/dist/configs/react-native-system.d.ts +39 -4239
  6. package/dist/configs/react-native-system.js +0 -11
  7. package/dist/configs/system.d.ts +44 -4209
  8. package/dist/configs/system.js +0 -9
  9. package/dist/entities/documentation/Documentation.d.ts +5 -18
  10. package/dist/entities/documentation/Documentation.js +0 -1
  11. package/dist/entities/native/NativeModifier.d.ts +6 -3
  12. package/dist/entities/native/NativeSettings.d.ts +6 -3
  13. package/dist/entities/native/NativeSettings.js +0 -1
  14. package/dist/entities/native/NativeStyleProperty.d.ts +1 -20
  15. package/dist/entities/native/NativeToken.d.ts +2 -6
  16. package/dist/entities/system/CanvasRole.d.ts +6 -7
  17. package/dist/entities/system/Component.d.ts +86 -1588
  18. package/dist/entities/system/Component.js +0 -9
  19. package/dist/entities/system/Composite.d.ts +8 -6
  20. package/dist/entities/system/Composite.js +0 -1
  21. package/dist/entities/system/Device.d.ts +6 -3
  22. package/dist/entities/system/Device.js +0 -6
  23. package/dist/entities/system/File.d.ts +43 -8
  24. package/dist/entities/system/File.js +0 -51
  25. package/dist/entities/system/Font.d.ts +10 -11
  26. package/dist/entities/system/Font.js +0 -21
  27. package/dist/entities/system/GlobalStyle.d.ts +6 -3
  28. package/dist/entities/system/Guidance.d.ts +6 -3
  29. package/dist/entities/system/GuidanceStyle.d.ts +6 -3
  30. package/dist/entities/system/Icon.d.ts +8 -8
  31. package/dist/entities/system/Icon.js +0 -16
  32. package/dist/entities/system/LinkedSystem.d.ts +5 -155
  33. package/dist/entities/system/Modifier.d.ts +8 -8
  34. package/dist/entities/system/Motion.d.ts +6 -3
  35. package/dist/entities/system/Operation.d.ts +5 -2
  36. package/dist/entities/system/Package.d.ts +24 -4
  37. package/dist/entities/system/Package.js +0 -46
  38. package/dist/entities/system/Settings.d.ts +18 -7
  39. package/dist/entities/system/Settings.js +0 -6
  40. package/dist/entities/system/StyleProperty.d.ts +14 -27
  41. package/dist/entities/system/StyleProperty.js +0 -6
  42. package/dist/entities/system/Token.d.ts +12 -9
  43. package/dist/entities/system/Tool.d.ts +7 -90
  44. package/dist/entities/system/composed-values.d.ts +1 -1
  45. package/dist/entities/system/copy-plan.d.ts +2 -2
  46. package/dist/entities/system/copy-plan.js +31 -8
  47. package/dist/entities/system/defineComponent.d.ts +1 -1
  48. package/dist/entities/system/icon-metadata.d.ts +2 -6
  49. package/dist/entities/system/link-plan.d.ts +2 -0
  50. package/dist/entities/system/link-plan.js +1 -0
  51. package/dist/entities/system/style-bag.d.ts +27 -1
  52. package/dist/entities/system/style-bag.js +0 -10
  53. package/dist/framework/Config.d.ts +18 -2
  54. package/dist/framework/Config.js +70 -15
  55. package/dist/framework/class-names.js +1 -0
  56. package/dist/framework/defineConfig.d.ts +2 -2
  57. package/dist/framework/defineEntity.d.ts +27 -7
  58. package/dist/framework/named.d.ts +9 -0
  59. package/dist/framework/plan.d.ts +3 -0
  60. package/dist/framework/plan.js +4 -1
  61. package/dist/framework/utils/group.d.ts +15 -5
  62. package/dist/index.d.ts +46 -45
  63. package/dist/migrations/2.0.0/v1-artifact.d.ts +38 -2109
  64. package/dist/renderer/wrappers/html-aliases.js +1 -0
  65. package/dist/spec/cell.d.ts +1 -1
  66. package/dist/spec/preview-content.d.ts +1 -1
  67. package/dist/tsconfig.tsbuildinfo +1 -1
  68. package/package.json +1 -1
@@ -462,8 +462,6 @@ const PROP_TYPES = [
462
462
  "boolean"
463
463
  ];
464
464
  const PROP_DESCRIPTION = "What the prop is. A style property the component exposes, `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:<name>\" } }`, which is what a primitive's props mostly are and what makes a style rule's bag key valid on it; a closed set of names a style rule keys on, `{ \"type\": \"variant\", \"value\": [\"sm\", \"lg\"] }`; content, `{ \"type\": \"slot\", \"text\": true }`, or a slot whose own value is a library member, `{ \"type\": \"slot\", \"value\": { \"__ref\": \"icon:<library>\" } }`, which code may also fill with the forms it lists under `code` (`[\"node\", \"element\", \"render\"]`); or a plain `string`, `number` or `boolean`. `null` hides a prop an inherited layer would expose. A prop that applies only under a condition on a sibling carries `when`, the record a style rule uses: `{ \"type\": \"string\", \"when\": { \"type\": \"color\" } }` shows it for one value, `{ \"when\": { \"type\": [\"default\", \"header\"] } }` for several.";
465
- /** Nullable because `null` is the omit tombstone: a component that `inherits` its element's props
466
- * drops one by declaring it `null`, rather than needing a second "don't expose" mechanism. */
467
465
  const Prop = defineSubEntity({
468
466
  name: "prop",
469
467
  label: "Prop",
@@ -958,13 +956,6 @@ function previewShowsNothing(entry) {
958
956
  const props = entry?.props;
959
957
  return !props || Object.keys(props).length === 0;
960
958
  }
961
- /**
962
- * The props a cell previews with, keyed by the condition they hold under the way a style rule is:
963
- * `*` for every cell, a condition on the component's own props for some. `when` names those props,
964
- * so a prop rename moves it and a value rename moves the ref it stores; `props` is keyed by prop
965
- * too, which `Prop.keyedByNameIn` and `VariantValue.namedValuesIn` reach through `preview/*\/props`.
966
- * Deleting a prop or a value drops the entries conditioned on it.
967
- */
968
959
  const Preview = defineSubEntity({
969
960
  name: "preview",
970
961
  label: "Preview",
@@ -1,12 +1,14 @@
1
- import { SubEntityClass } from "../../framework/defineSubEntity.js";
2
1
  import { EntityClass } from "../../framework/defineEntity.js";
3
- import { StyleValue } from "./style-bag.js";
2
+ import { Named } from "../../framework/named.js";
3
+ import { AuthoredStyleField } from "./style-bag.js";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/entities/system/Composite.d.ts
7
7
  /** A composite variant (`overlays/elevation/1`) — the style-prop bag it applies. */
8
- declare const Composite: EntityClass<z.ZodObject<{
9
- styles: SubEntityClass<z.ZodType<StyleValue, unknown, z.core.$ZodTypeInternals<StyleValue, unknown>>>;
10
- }, z.core.$strip>, z.ZodObject<Record<never, never>, z.core.$strip>, "composite", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>;
8
+ declare const CompositeDefinition: EntityClass<z.ZodObject<{
9
+ styles: AuthoredStyleField;
10
+ }, z.core.$strip>, z.ZodObject<Record<never, never>, z.core.$strip>, "composite", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
11
+ interface CompositeClass extends Named<typeof CompositeDefinition> {}
12
+ declare const Composite: CompositeClass;
11
13
  //#endregion
12
- export { Composite };
14
+ export { Composite, CompositeClass };
@@ -11,7 +11,6 @@ const compositeBags = (data) => {
11
11
  }, out);
12
12
  return out;
13
13
  };
14
- /** A composite variant (`overlays/elevation/1`) — the style-prop bag it applies. */
15
14
  const Composite = defineEntity({
16
15
  kind: "composite",
17
16
  label: "Composite style",
@@ -1,11 +1,14 @@
1
1
  import { EntityClass } from "../../framework/defineEntity.js";
2
+ import { Named } from "../../framework/named.js";
2
3
  import { z } from "zod";
3
4
 
4
5
  //#region src/entities/system/Device.d.ts
5
- declare const Device: EntityClass<z.ZodObject<{
6
+ declare const DeviceDefinition: EntityClass<z.ZodObject<{
6
7
  width: z.ZodNumber;
7
8
  height: z.ZodNumber;
8
9
  name: z.ZodOptional<z.ZodString>;
9
- }, z.core.$strip>, z.ZodObject<Record<never, never>, z.core.$strip>, "device", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>;
10
+ }, z.core.$strip>, z.ZodObject<Record<never, never>, z.core.$strip>, "device", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
11
+ interface DeviceClass extends Named<typeof DeviceDefinition> {}
12
+ declare const Device: DeviceClass;
10
13
  //#endregion
11
- export { Device };
14
+ export { Device, DeviceClass };
@@ -1,11 +1,5 @@
1
1
  import { defineEntity } from "../../framework/defineEntity.js";
2
2
  import { z } from "zod";
3
- //#region src/entities/system/Device.ts
4
- /**
5
- * `Device` — a named viewport size (mobile / tablet / desktop / …). A SYSTEM entity, so devices
6
- * are configurable design-system DATA, not a hardcoded constant. A design-file node's `size` can
7
- * be `{ type: 'device', ref: Device.ref('mobile') }` to be powered by one of these.
8
- */
9
3
  const Device = defineEntity({
10
4
  kind: "device",
11
5
  fields: z.object({
@@ -2,6 +2,7 @@ import { Ref } from "../../framework/utils/ref-grammar.js";
2
2
  import { SubEntityClass } from "../../framework/defineSubEntity.js";
3
3
  import { ComputedInput } from "../../framework/registry.js";
4
4
  import { EntityClass } from "../../framework/defineEntity.js";
5
+ import { Named } from "../../framework/named.js";
5
6
  import { z } from "zod";
6
7
 
7
8
  //#region src/entities/system/File.d.ts
@@ -24,6 +25,41 @@ declare const SCRIPT_EXTENSIONS: ReadonlySet<string>;
24
25
  * and a leading dot is a dotfile (`.gitignore`) rather than an extension.
25
26
  */
26
27
  declare function isBinaryAsset(filePath: string): boolean;
28
+ /**
29
+ * One import — keyed by the specifier as authored (`'./tone'`, `'@/uds/hooks/use-tone'`,
30
+ * `'motion/react'`), holding what that specifier resolved to.
31
+ *
32
+ * **Both halves, because they come apart.** The specifier decides whether the target relocates when
33
+ * a module is emitted into `.uds` — a relative import has to be mirrored beside the generated
34
+ * module, an aliased one resolves through the consumer's own `paths` from anywhere — and
35
+ * `file:components/tone.ts` does not say which of the two the render wrote. The specifier is the key
36
+ * rather than a field beside one because it is the import's identity: a module imported twice is one
37
+ * edge, and storing it in both places would be one string with two homes and no rule for which wins.
38
+ *
39
+ * **One list, not two.** An import is an import; splitting it by what it happens to resolve to gives
40
+ * two lists that must be kept in step and throws away source order, which decides evaluation for a
41
+ * side-effect import. `kindOf(ref)` is the discriminator, the same one that tells every other union
42
+ * in the config apart.
43
+ */
44
+ declare const FileImportDefinition: SubEntityClass<z.ZodObject<{
45
+ target: z.ZodType<Ref, unknown, z.core.$ZodTypeInternals<Ref, unknown>>;
46
+ names: z.ZodOptional<z.ZodArray<z.ZodString>>;
47
+ }, z.core.$strip>>;
48
+ interface FileImportClass extends Named<typeof FileImportDefinition> {}
49
+ /**
50
+ * One export of a sealed source file that a render places in JSX — `file:components/pagination.tsx#PaginationProvider`.
51
+ *
52
+ * A component file exports more than its components: a context provider the composite wraps its
53
+ * root in, a plain function component two renders share. When a render puts one in the tree, the
54
+ * anatomy has to name it — the same way it names a package's export — and the registry has to
55
+ * import it from the module the file emits to. The member is that name, with the same empty body a
56
+ * `Package` export has: its identity is its name, and the module it lives in is the owning file.
57
+ *
58
+ * Only what a render placed in JSX, for the reason a `Package` lists only that: nobody browses a
59
+ * file's exports, and a hook or a helper no JSX mentions is not a render surface.
60
+ */
61
+ declare const FileExportDefinition: SubEntityClass<z.ZodObject<{}, z.core.$strict>>;
62
+ interface FileExportClass extends Named<typeof FileExportDefinition> {}
27
63
  /**
28
64
  * File (`file:components/card.tsx`) — one artifact the seal owns.
29
65
  *
@@ -47,14 +83,11 @@ declare function isBinaryAsset(filePath: string): boolean;
47
83
  * walked, the way it derives `Package` groups from the same walk. Nobody picks a file out of a
48
84
  * picker, so the kind has no group metadata and its groups stay emergent from the path.
49
85
  */
50
- declare const File: EntityClass<z.ZodObject<{
86
+ declare const FileDefinition: EntityClass<z.ZodObject<{
51
87
  hash: z.ZodString;
52
- imports: z.ZodOptional<SubEntityClass<z.ZodObject<{
53
- target: z.ZodType<Ref, unknown, z.core.$ZodTypeInternals<Ref, unknown>>;
54
- names: z.ZodOptional<z.ZodArray<z.ZodString>>;
55
- }, z.core.$strip>>>;
56
- exports: z.ZodOptional<SubEntityClass<z.ZodObject<{}, z.core.$strict>>>;
57
- }, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "file", Record<never, never>, {
88
+ imports: z.ZodOptional<FileImportClass>;
89
+ exports: z.ZodOptional<FileExportClass>;
90
+ }, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "file", {}, {
58
91
  /**
59
92
  * Bytes rather than text, so a restore knows how to write it — derived from the path, because
60
93
  * the path is the only thing that decides it.
@@ -69,5 +102,7 @@ declare const File: EntityClass<z.ZodObject<{
69
102
  path
70
103
  }: ComputedInput) => boolean;
71
104
  }, false, Record<never, never>, Record<never, never>>;
105
+ interface FileClass extends Named<typeof FileDefinition> {}
106
+ declare const File: FileClass;
72
107
  //#endregion
73
- export { File, SCRIPT_EXTENSIONS, isBinaryAsset };
108
+ export { File, FileClass, SCRIPT_EXTENSIONS, isBinaryAsset };
@@ -40,22 +40,6 @@ function isBinaryAsset(filePath) {
40
40
  * `File` because it is a self-reference through the collection `File` declares; the explicit
41
41
  * annotation breaks the circular type inference, the same way a token's value schema does. */
42
42
  const importTarget = z.union([z.lazy(() => File), Package]);
43
- /**
44
- * One import — keyed by the specifier as authored (`'./tone'`, `'@/uds/hooks/use-tone'`,
45
- * `'motion/react'`), holding what that specifier resolved to.
46
- *
47
- * **Both halves, because they come apart.** The specifier decides whether the target relocates when
48
- * a module is emitted into `.uds` — a relative import has to be mirrored beside the generated
49
- * module, an aliased one resolves through the consumer's own `paths` from anywhere — and
50
- * `file:components/tone.ts` does not say which of the two the render wrote. The specifier is the key
51
- * rather than a field beside one because it is the import's identity: a module imported twice is one
52
- * edge, and storing it in both places would be one string with two homes and no rule for which wins.
53
- *
54
- * **One list, not two.** An import is an import; splitting it by what it happens to resolve to gives
55
- * two lists that must be kept in step and throws away source order, which decides evaluation for a
56
- * side-effect import. `kindOf(ref)` is the discriminator, the same one that tells every other union
57
- * in the config apart.
58
- */
59
43
  const FileImport = defineSubEntity({
60
44
  name: "import",
61
45
  label: "Import",
@@ -81,47 +65,12 @@ const FileImport = defineSubEntity({
81
65
  names: z.array(z.string()).optional()
82
66
  })
83
67
  });
84
- /**
85
- * One export of a sealed source file that a render places in JSX — `file:components/pagination.tsx#PaginationProvider`.
86
- *
87
- * A component file exports more than its components: a context provider the composite wraps its
88
- * root in, a plain function component two renders share. When a render puts one in the tree, the
89
- * anatomy has to name it — the same way it names a package's export — and the registry has to
90
- * import it from the module the file emits to. The member is that name, with the same empty body a
91
- * `Package` export has: its identity is its name, and the module it lives in is the owning file.
92
- *
93
- * Only what a render placed in JSX, for the reason a `Package` lists only that: nobody browses a
94
- * file's exports, and a hook or a helper no JSX mentions is not a render surface.
95
- */
96
68
  const FileExport = defineSubEntity({
97
69
  name: "exports",
98
70
  label: "Export",
99
71
  labelPlural: "Exports",
100
72
  fields: z.strictObject({})
101
73
  });
102
- /**
103
- * File (`file:components/card.tsx`) — one artifact the seal owns.
104
- *
105
- * A component is a definition plus the React that renders it, and `config.json` cannot hold JSX, so
106
- * some of what a system publishes travels as bytes. `uds push` bounds the source graph to the Git
107
- * checkout and the config directory, hashes those files, and uploads them; a consumer pulls them
108
- * down and verifies the hash. That whole lifecycle — hashed, uploaded, restored, verified — is one
109
- * thing, and it is what this kind is for.
110
- *
111
- * **Sealed repo source is a `File`; anything remote stays a URL.** A `FontFile`'s `src` is something
112
- * somebody uploaded to a cdn: there is no hash to check, no seal that owns it, and no build that
113
- * produced it. Folding both into one kind would put two provenance models and two trust models
114
- * behind one name.
115
- *
116
- * **The path is the src**, so there is no `src` field. Config-relative is the same key space the seal
117
- * converts to, so an entry and a sealed file name the same thing with no translation and nothing to
118
- * keep in step. The extension is part of the path deliberately: a helper authored as `.ts` is not
119
- * JSX, and a bundler resolving `./tone` looks for what the closure actually holds.
120
- *
121
- * Ordinary authoring does not maintain this graph — the build derives it from the source it just
122
- * walked, the way it derives `Package` groups from the same walk. Nobody picks a file out of a
123
- * picker, so the kind has no group metadata and its groups stay emergent from the path.
124
- */
125
74
  const File = defineEntity({
126
75
  kind: "file",
127
76
  label: "File",
@@ -1,5 +1,6 @@
1
1
  import { SubEntityClass } from "../../framework/defineSubEntity.js";
2
2
  import { EntityClass } from "../../framework/defineEntity.js";
3
+ import { Named } from "../../framework/named.js";
3
4
  import { z } from "zod";
4
5
 
5
6
  //#region src/entities/system/Font.d.ts
@@ -14,13 +15,15 @@ import { z } from "zod";
14
15
  * a file directly, and it can't be derived from the family name. Optional because nothing that feeds
15
16
  * a config records one today; it's author/upload-supplied.
16
17
  */
17
- declare const FontFile: SubEntityClass<z.ZodObject<{
18
+ declare const FontFileDefinition: SubEntityClass<z.ZodObject<{
18
19
  src: z.ZodString;
19
20
  format: z.ZodOptional<z.ZodString>;
20
21
  weight: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
21
22
  style: z.ZodOptional<z.ZodString>;
22
23
  postscriptName: z.ZodOptional<z.ZodString>;
23
24
  }, z.core.$strip>>;
25
+ interface FontFileClass extends Named<typeof FontFileDefinition> {}
26
+ declare const FontFile: FontFileClass;
24
27
  /**
25
28
  * Font (`fonts/yas`) — one family in a font library. The library (`fonts`) is an EMERGENT group from
26
29
  * the path, carrying only its version; a family carries its own CSS-facing name, its files, and the
@@ -30,21 +33,17 @@ declare const FontFile: SubEntityClass<z.ZodObject<{
30
33
  * only a font can be referenced where a family is expected, which is what the old config could
31
34
  * only enforce by throwing at resolve time ("only font groups can be referenced as a token value").
32
35
  */
33
- declare const Font: EntityClass<z.ZodObject<{
36
+ declare const FontDefinition: EntityClass<z.ZodObject<{
34
37
  fontFamily: z.ZodString;
35
- files: z.ZodOptional<SubEntityClass<z.ZodObject<{
36
- src: z.ZodString;
37
- format: z.ZodOptional<z.ZodString>;
38
- weight: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
39
- style: z.ZodOptional<z.ZodString>;
40
- postscriptName: z.ZodOptional<z.ZodString>;
41
- }, z.core.$strip>>>;
38
+ files: z.ZodOptional<FontFileClass>;
42
39
  fallbackStack: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
40
  variable: z.ZodOptional<z.ZodString>;
44
41
  isVariableFont: z.ZodOptional<z.ZodBoolean>;
45
42
  }, z.core.$strict>, z.ZodObject<{
46
43
  version: z.ZodOptional<z.ZodString>;
47
- }, z.core.$strict>, "font", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>;
44
+ }, z.core.$strict>, "font", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
45
+ interface FontClass extends Named<typeof FontDefinition> {}
46
+ declare const Font: FontClass;
48
47
  /**
49
48
  * `value` as a double-quoted CSS string. A quote, backslash, line break or `<` inside it is written as
50
49
  * a CSS escape, so the value reads back exactly and can neither end the string nor close an HTML
@@ -75,4 +74,4 @@ declare function fontFamilyStack(font: {
75
74
  readonly variable?: string | undefined;
76
75
  }): string;
77
76
  //#endregion
78
- export { Font, FontFile, cssString, fontFamilyStack };
77
+ export { Font, FontClass, FontFile, FontFileClass, cssString, fontFamilyStack };
@@ -1,18 +1,6 @@
1
1
  import { defineEntity } from "../../framework/defineEntity.js";
2
2
  import { defineSubEntity } from "../../framework/defineSubEntity.js";
3
3
  import { z } from "zod";
4
- //#region src/entities/system/Font.ts
5
- /**
6
- * One FILE of a font family — the unit `@font-face` needs a rule for. Named `files` rather than
7
- * `weights` because the two don't line up: a roman and an italic at 400 are two files sharing one
8
- * weight, and a variable font is one file covering many (`weight: '100 900'`). `weightCount` is the
9
- * derivation over these, not their count.
10
- *
11
- * `postscriptName` names this exact file (`YahooSans-BoldItalic`). CSS never needs it — a stylesheet
12
- * addresses the FAMILY and lets the browser pick by weight/style — but a native platform references
13
- * a file directly, and it can't be derived from the family name. Optional because nothing that feeds
14
- * a config records one today; it's author/upload-supplied.
15
- */
16
4
  const FontFile = defineSubEntity({
17
5
  name: "file",
18
6
  label: "Font file",
@@ -26,15 +14,6 @@ const FontFile = defineSubEntity({
26
14
  postscriptName: z.string().optional()
27
15
  })
28
16
  });
29
- /**
30
- * Font (`fonts/yas`) — one family in a font library. The library (`fonts`) is an EMERGENT group from
31
- * the path, carrying only its version; a family carries its own CSS-facing name, its files, and the
32
- * governance/rendering flags a picker and `@font-face` emission need.
33
- *
34
- * A font is its own kind rather than a variant of a generic `asset` so that a `font:` ref is typed:
35
- * only a font can be referenced where a family is expected, which is what the old config could
36
- * only enforce by throwing at resolve time ("only font groups can be referenced as a token value").
37
- */
38
17
  const Font = defineEntity({
39
18
  kind: "font",
40
19
  label: "Font",
@@ -1,4 +1,5 @@
1
1
  import { EntityClass } from "../../framework/defineEntity.js";
2
+ import { Named } from "../../framework/named.js";
2
3
  import { DerivedColor } from "./color.js";
3
4
  import { z } from "zod";
4
5
 
@@ -12,11 +13,13 @@ type Declared = string | number | {
12
13
  } | DerivedColor | {
13
14
  [key: string]: Declared;
14
15
  };
15
- declare const GlobalStyle: EntityClass<z.ZodObject<{
16
+ declare const GlobalStyleDefinition: EntityClass<z.ZodObject<{
16
17
  selector: z.ZodString;
17
18
  declarations: z.ZodRecord<z.ZodString, z.ZodType<Declared, unknown, z.core.$ZodTypeInternals<Declared, unknown>>>;
18
19
  important: z.ZodOptional<z.ZodBoolean>;
19
- }, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "global-style", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>;
20
+ }, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "global-style", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
21
+ interface GlobalStyleClass extends Named<typeof GlobalStyleDefinition> {}
22
+ declare const GlobalStyle: GlobalStyleClass;
20
23
  /**
21
24
  * A stable name for a rule, from its selector — `@keyframes bounce` → `bounce`, `.prompt-editor p`
22
25
  * → `promptEditorP`. Suffixed on collision, so two selectors that slug alike both land.
@@ -27,4 +30,4 @@ declare const GlobalStyle: EntityClass<z.ZodObject<{
27
30
  */
28
31
  declare function globalStyleName(selector: string, taken?: ReadonlySet<string>): string;
29
32
  //#endregion
30
- export { GlobalStyle, globalStyleName };
33
+ export { GlobalStyle, GlobalStyleClass, globalStyleName };
@@ -1,6 +1,7 @@
1
1
  import { GuidanceLane } from "../../ai-lanes.js";
2
2
  import { Ref } from "../../framework/utils/refs.js";
3
3
  import { EntityClass } from "../../framework/defineEntity.js";
4
+ import { Named } from "../../framework/named.js";
4
5
  import { Config } from "../../framework/Config.js";
5
6
  import { z } from "zod";
6
7
 
@@ -41,7 +42,7 @@ type GuidanceSegment = string | Ref;
41
42
  * whose target is missing (a source no longer attached) prints the ref's last-known path.
42
43
  */
43
44
  declare function guidanceTextOf(config: Config, text: readonly GuidanceSegment[]): string;
44
- declare const Guidance: EntityClass<z.ZodObject<{
45
+ declare const GuidanceDefinition: EntityClass<z.ZodObject<{
45
46
  text: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
46
47
  __ref: z.ZodString;
47
48
  }, z.core.$strip>]>>;
@@ -54,7 +55,9 @@ declare const Guidance: EntityClass<z.ZodObject<{
54
55
  "paint-style": "paint-style";
55
56
  "figma-import": "figma-import";
56
57
  }>>>;
57
- }, z.core.$strict>, "guidance", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>;
58
+ }, z.core.$strict>, "guidance", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
59
+ interface GuidanceClass extends Named<typeof GuidanceDefinition> {}
60
+ declare const Guidance: GuidanceClass;
58
61
  /**
59
62
  * A topic's effective reach, and which topic decided it. `appliesTo === undefined` means every
60
63
  * lane. `declaredBy` is the topic the answer was read from, so a lane can say "inherited from
@@ -82,4 +85,4 @@ declare function guidanceReaches({
82
85
  lane: GuidanceLane;
83
86
  }): boolean;
84
87
  //#endregion
85
- export { Guidance, GuidanceScope, GuidanceSegment, guidanceReaches, guidanceScopeOf, guidanceTextOf };
88
+ export { Guidance, GuidanceClass, GuidanceScope, GuidanceSegment, guidanceReaches, guidanceScopeOf, guidanceTextOf };
@@ -1,4 +1,5 @@
1
1
  import { EntityClass } from "../../framework/defineEntity.js";
2
+ import { Named } from "../../framework/named.js";
2
3
  import { z } from "zod";
3
4
 
4
5
  //#region src/entities/system/GuidanceStyle.d.ts
@@ -7,8 +8,10 @@ declare const guidanceStyleFields: z.ZodObject<{
7
8
  }, z.core.$strip>;
8
9
  /** A style guide's stored body. */
9
10
  type GuidanceStyleBody = z.infer<typeof guidanceStyleFields>;
10
- declare const GuidanceStyle: EntityClass<z.ZodObject<{
11
+ declare const GuidanceStyleDefinition: EntityClass<z.ZodObject<{
11
12
  text: z.ZodString;
12
- }, z.core.$strip>, z.ZodObject<Record<never, never>, z.core.$strip>, "guidance-style", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>;
13
+ }, z.core.$strip>, z.ZodObject<Record<never, never>, z.core.$strip>, "guidance-style", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
14
+ interface GuidanceStyleClass extends Named<typeof GuidanceStyleDefinition> {}
15
+ declare const GuidanceStyle: GuidanceStyleClass;
13
16
  //#endregion
14
- export { GuidanceStyle, GuidanceStyleBody };
17
+ export { GuidanceStyle, GuidanceStyleBody, GuidanceStyleClass };
@@ -1,5 +1,6 @@
1
- import { SubEntityClass } from "../../framework/defineSubEntity.js";
2
1
  import { EntityClass, GroupComputedInput } from "../../framework/defineEntity.js";
2
+ import { Named } from "../../framework/named.js";
3
+ import { PackageClass } from "./Package.js";
3
4
  import { GlyphNamespace } from "./glyph-identity.js";
4
5
  import { z } from "zod";
5
6
 
@@ -36,7 +37,7 @@ type IconVariantAs = z.infer<typeof iconVariantAs>;
36
37
  *
37
38
  * (A per-icon type/variant is config-v2 model gap 8; this is where it lands.)
38
39
  */
39
- declare const Icon: EntityClass<z.ZodObject<{
40
+ declare const IconDefinition: EntityClass<z.ZodObject<{
40
41
  categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
42
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
42
43
  codepoint: z.ZodOptional<z.ZodNumber>;
@@ -47,10 +48,7 @@ declare const Icon: EntityClass<z.ZodObject<{
47
48
  __ref: z.ZodString;
48
49
  }, z.core.$strip>>;
49
50
  metadata: z.ZodOptional<z.ZodObject<{
50
- from: EntityClass<z.ZodObject<{
51
- version: z.ZodOptional<z.ZodString>;
52
- exports: z.ZodOptional<SubEntityClass<z.ZodObject<{}, z.core.$strict>>>;
53
- }, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "package", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>;
51
+ from: PackageClass;
54
52
  format: z.ZodEnum<{
55
53
  uds: "uds";
56
54
  phosphor: "phosphor";
@@ -64,7 +62,7 @@ declare const Icon: EntityClass<z.ZodObject<{
64
62
  }, z.core.$strict>, z.ZodObject<{
65
63
  export: z.ZodRecord<z.ZodString, z.ZodString>;
66
64
  }, z.core.$strict>]>>;
67
- }, z.core.$strict>, "icon", Record<never, never>, Record<never, never>, false, {
65
+ }, z.core.$strict>, "icon", {}, Record<never, never>, false, {
68
66
  /** The glyphs the set ships, by leaf name. */readonly members: ({
69
67
  config,
70
68
  path
@@ -100,5 +98,7 @@ declare const Icon: EntityClass<z.ZodObject<{
100
98
  items: Record<string, unknown>;
101
99
  };
102
100
  }>;
101
+ interface IconClass extends Named<typeof IconDefinition> {}
102
+ declare const Icon: IconClass;
103
103
  //#endregion
104
- export { Icon, IconVariantAs, iconVariantAs };
104
+ export { Icon, IconClass, IconVariantAs, iconVariantAs };
@@ -17,22 +17,6 @@ import { z } from "zod";
17
17
  */
18
18
  /** @deprecated With the group's `variantAs`; see there. */
19
19
  const iconVariantAs = z.union([z.strictObject({ prop: z.string().min(1) }), z.strictObject({ export: z.record(z.string().min(1), z.string().min(1)) })]);
20
- /**
21
- * Icon (`icons/AcornIcon`) — one glyph in an icon library. The library (`icons`) is an EMERGENT group
22
- * from the path, and everything that describes the SET lives on that group node: its version, the
23
- * sizes and variants it ships, and where the members' descriptive facts come from (`metadata`). A
24
- * component that renders a glyph names the library through its own prop's domain (`Icon.ref('phosphor')`),
25
- * so the edge runs from the component to the set and the set knows nothing about its renderers.
26
- *
27
- * A member's identity is still its name; its fields carry what the name can't say. A group that
28
- * declares `metadata` gets those fields baked at BUILD time from the declared source, and the bake
29
- * fills only fields with no stored value — an author's hand-written value is never overwritten
30
- * (every such skip is logged by the build), and a curator's Studio edit is a patch that replays on
31
- * top of the base regardless. Fields are re-derived every build, so a source removing facts flows
32
- * through at the next dependency bump rather than lingering.
33
- *
34
- * (A per-icon type/variant is config-v2 model gap 8; this is where it lands.)
35
- */
36
20
  const Icon = defineEntity({
37
21
  kind: "icon",
38
22
  label: "Icon",