@yahoo/uds-create-config 4.28.3 → 4.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/configs/CanvasConfig.d.ts +9 -3
  2. package/dist/configs/react-native-system.d.ts +6 -2
  3. package/dist/configs/react-native-system.js +1 -1
  4. package/dist/configs/system.d.ts +6 -2
  5. package/dist/configs/system.js +1 -1
  6. package/dist/entities/system/CanvasRole.js +3 -1
  7. package/dist/entities/system/Component.js +2 -2
  8. package/dist/entities/system/Icon.d.ts +10 -6
  9. package/dist/entities/system/Icon.js +20 -8
  10. package/dist/entities/system/defineComponent.d.ts +1 -1
  11. package/dist/entities/system/glyph-identity.js +25 -1
  12. package/dist/entities/system/icon-domain-invariants.d.ts +7 -6
  13. package/dist/entities/system/icon-domain-invariants.js +49 -8
  14. package/dist/entities/system/icon-library.d.ts +3 -2
  15. package/dist/entities/system/icon-library.js +8 -9
  16. package/dist/entities/system/icon-metadata.d.ts +33 -1
  17. package/dist/entities/system/icon-metadata.js +69 -10
  18. package/dist/entities/system/runtime-modules.d.ts +3 -0
  19. package/dist/entities/system/runtime-modules.js +18 -8
  20. package/dist/framework/Config.d.ts +17 -4
  21. package/dist/framework/Config.js +80 -19
  22. package/dist/framework/defineEntity.js +8 -5
  23. package/dist/framework/projections.d.ts +26 -7
  24. package/dist/framework/projections.js +65 -21
  25. package/dist/framework/prop-surface.d.ts +5 -5
  26. package/dist/framework/prop-surface.js +2 -2
  27. package/dist/framework/utils/group.d.ts +3 -1
  28. package/dist/index.d.ts +3 -3
  29. package/dist/index.js +4 -4
  30. package/dist/migrations/2.0.0/v1-artifact.d.ts +3 -1
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +1 -1
@@ -943,6 +943,8 @@ declare class Config {
943
943
  * silently disagrees with it. Omitted, one is minted, which is what every non-optimistic caller
944
944
  * wants. */
945
945
  apply(patch: Patch, id?: string): this;
946
+ /** {@link apply}, with the kind's invariants judged now or left to the batch that called this. */
947
+ private applyPatch;
946
948
  /**
947
949
  * Several patches as one step: each validates against the state the previous one produced, as
948
950
  * {@link apply} would, and the config is derived once at the end rather than once per patch.
@@ -951,8 +953,15 @@ declare class Config {
951
953
  * a copy of 2,600 entities takes a third of the time it would one patch at a time, and every
952
954
  * patch still lands in `pending` with its own stamp, so the sink and a replay see the same list.
953
955
  *
954
- * A patch on a source kind goes through {@link apply} on its own, since that is where a pin that
955
- * moves retires what was held under its slug, and where the rows its declaration mints re-derive.
956
+ * The kinds' invariants are judged once, on the state the batch ends on, since an invariant walks
957
+ * its whole kind and a walk after each of thousands of creates is quadratic in them. The rule
958
+ * itself is still the per-patch one: a batch that ends invalid is re-applied patch by patch,
959
+ * checked, and that pass decides, refusing at the patch that broke a rule or accepting a batch no
960
+ * single patch of which did. So the fast pass can only say yes early, never no.
961
+ *
962
+ * A patch on a source kind goes through {@link applyPatch} on its own, since that is where a pin
963
+ * that moves retires what was held under its slug, and where the rows its declaration mints
964
+ * re-derive.
956
965
  *
957
966
  * Several patches are one gesture, so they share one changeset; a single patch carries none.
958
967
  */
@@ -1034,6 +1043,8 @@ declare class Config {
1034
1043
  private wholeBodyChange;
1035
1044
  /** The next snapshot for one patch, validated. Pure in `snapshot`; reads metadata off `this`. */
1036
1045
  private computeApply;
1046
+ /** {@link assertInvariants} for each kind a batch wrote, against the state the batch produced. */
1047
+ private assertInvariantsOf;
1037
1048
  /**
1038
1049
  * This config's reads over another snapshot, for a check that wants nothing else: a plain clone
1039
1050
  * with the snapshot swapped in. Unlike {@link at}, it records no parent link for the snapshot, so a
@@ -1042,10 +1053,12 @@ declare class Config {
1042
1053
  private viewOf;
1043
1054
  /**
1044
1055
  * Refuse a state the kind's {@link EntityKind.invariants} reject, or one where a kind declaring
1045
- * {@link EntityKind.uniqueLeaves} holds a leaf twice. One kind when a patch names it, every kind
1046
- * after a registration. Never called on hydration.
1056
+ * {@link EntityKind.uniqueLeaves} holds a leaf twice. One kind when a patch names it, the kinds a
1057
+ * batch wrote once it has landed, every kind after a registration. Never called on hydration.
1047
1058
  */
1048
1059
  private assertInvariants;
1060
+ /** The {@link EntityKind.uniqueLeaves} half of {@link assertInvariants} alone. */
1061
+ private assertUniqueLeaves;
1049
1062
  /** One sentence per leaf that two items of `kind` hold, since a leaf has to name one item. */
1050
1063
  private duplicateLeaves;
1051
1064
  /** `patch` with a bare leaf resolved to the path it names — see {@link leafPath}. */
@@ -1199,7 +1199,11 @@ var Config = class Config {
1199
1199
  * silently disagrees with it. Omitted, one is minted, which is what every non-optimistic caller
1200
1200
  * wants. */
1201
1201
  apply(patch, id) {
1202
- const snapshot = this.computeApply(this.state.snapshot, patch);
1202
+ return this.applyPatch(patch, id, true);
1203
+ }
1204
+ /** {@link apply}, with the kind's invariants judged now or left to the batch that called this. */
1205
+ applyPatch(patch, id, checked) {
1206
+ const snapshot = this.computeApply(this.state.snapshot, patch, "write", checked);
1203
1207
  const sourceIdentity = this.entityOf(patch.kind)?.sourceIdentity;
1204
1208
  let { recorded, sources, sourceStates } = this.state;
1205
1209
  if (sourceIdentity && "path" in patch && movesSource(patch, sourceIdentity)) {
@@ -1232,8 +1236,15 @@ var Config = class Config {
1232
1236
  * a copy of 2,600 entities takes a third of the time it would one patch at a time, and every
1233
1237
  * patch still lands in `pending` with its own stamp, so the sink and a replay see the same list.
1234
1238
  *
1235
- * A patch on a source kind goes through {@link apply} on its own, since that is where a pin that
1236
- * moves retires what was held under its slug, and where the rows its declaration mints re-derive.
1239
+ * The kinds' invariants are judged once, on the state the batch ends on, since an invariant walks
1240
+ * its whole kind and a walk after each of thousands of creates is quadratic in them. The rule
1241
+ * itself is still the per-patch one: a batch that ends invalid is re-applied patch by patch,
1242
+ * checked, and that pass decides, refusing at the patch that broke a rule or accepting a batch no
1243
+ * single patch of which did. So the fast pass can only say yes early, never no.
1244
+ *
1245
+ * A patch on a source kind goes through {@link applyPatch} on its own, since that is where a pin
1246
+ * that moves retires what was held under its slug, and where the rows its declaration mints
1247
+ * re-derive.
1237
1248
  *
1238
1249
  * Several patches are one gesture, so they share one changeset; a single patch carries none.
1239
1250
  */
@@ -1241,13 +1252,35 @@ var Config = class Config {
1241
1252
  if (patches.length === 0) return this;
1242
1253
  const changeset = patches.length > 1 ? crypto.randomUUID() : void 0;
1243
1254
  const stampOf = (patch) => stamp(patch, void 0, changeset);
1244
- if (patches.some((patch) => this.entityOf(patch.kind)?.sourceIdentity)) return patches.reduce((config, patch) => config.derive({
1245
- ...config.apply(patch).state,
1246
- pending: [...config.state.pending, stampOf(patch)]
1247
- }), this);
1248
- let config = this;
1249
- for (const patch of patches) config = config.derive({ snapshot: config.computeApply(config.state.snapshot, patch) });
1250
- return config.derive({ pending: [...this.state.pending, ...patches.map(stampOf)] });
1255
+ const touched = new Set(patches.map((patch) => patch.kind));
1256
+ if (patches.some((patch) => this.entityOf(patch.kind)?.sourceIdentity)) {
1257
+ const land = (checked) => patches.reduce((config, patch) => config.derive({
1258
+ ...config.applyPatch(patch, void 0, checked).state,
1259
+ pending: [...config.state.pending, stampOf(patch)]
1260
+ }), this);
1261
+ try {
1262
+ const landed = land(false);
1263
+ landed.assertInvariantsOf(landed.state.snapshot, touched);
1264
+ return landed;
1265
+ } catch {
1266
+ return land(true);
1267
+ }
1268
+ }
1269
+ const land = (checked) => {
1270
+ let config = this;
1271
+ for (const patch of patches) config = config.derive({ snapshot: config.computeApply(config.state.snapshot, patch, "write", checked) });
1272
+ return config;
1273
+ };
1274
+ const settle = () => {
1275
+ try {
1276
+ const landed = land(false);
1277
+ landed.assertInvariantsOf(landed.state.snapshot, touched);
1278
+ return landed;
1279
+ } catch {
1280
+ return land(true);
1281
+ }
1282
+ };
1283
+ return settle().derive({ pending: [...this.state.pending, ...patches.map(stampOf)] });
1251
1284
  }
1252
1285
  /**
1253
1286
  * Replay the pending patches onto a new base — what a remote change calls.
@@ -1273,9 +1306,24 @@ var Config = class Config {
1273
1306
  const changesetId = entry.changeset;
1274
1307
  const members = pending.slice(index).filter((member) => member.changeset === changesetId);
1275
1308
  for (const member of members) replayed.add(member.id);
1276
- let scratch = snapshot;
1309
+ const fast = () => {
1310
+ try {
1311
+ let landed = snapshot;
1312
+ const touched = /* @__PURE__ */ new Set();
1313
+ for (const member of members) {
1314
+ landed = this.replayOne(landed, member.patch, false);
1315
+ touched.add(member.patch.kind);
1316
+ }
1317
+ this.assertInvariantsOf(landed, touched);
1318
+ return landed;
1319
+ } catch {
1320
+ return;
1321
+ }
1322
+ };
1323
+ const landed = fast();
1324
+ let scratch = landed ?? snapshot;
1277
1325
  let failed;
1278
- for (const member of members) try {
1326
+ if (landed === void 0) for (const member of members) try {
1279
1327
  scratch = this.replayOne(scratch, member.patch);
1280
1328
  } catch (error) {
1281
1329
  failed = {
@@ -1330,14 +1378,14 @@ var Config = class Config {
1330
1378
  * patch may fail because the rows it needs had not been derived yet (the pin it depends on is in
1331
1379
  * this draft), so the replay derives against what it has built so far and goes once more.
1332
1380
  */
1333
- replayOne(snapshot, patch) {
1381
+ replayOne(snapshot, patch, checked = true) {
1334
1382
  try {
1335
- return this.computeApply(snapshot, patch, "replay");
1383
+ return this.computeApply(snapshot, patch, "replay", checked);
1336
1384
  } catch (error) {
1337
1385
  const seeded = this.at(snapshot).withDerivedRows().state.snapshot;
1338
1386
  if (seeded === snapshot) throw error;
1339
1387
  try {
1340
- return this.computeApply(seeded, patch, "replay");
1388
+ return this.computeApply(seeded, patch, "replay", checked);
1341
1389
  } catch {
1342
1390
  throw error;
1343
1391
  }
@@ -1425,11 +1473,18 @@ var Config = class Config {
1425
1473
  }));
1426
1474
  }
1427
1475
  /** The next snapshot for one patch, validated. Pure in `snapshot`; reads metadata off `this`. */
1428
- computeApply(snapshot, incoming, mode = "write") {
1476
+ computeApply(snapshot, incoming, mode = "write", checked = true) {
1429
1477
  const next = this.computeApplyPatch(snapshot, incoming, mode);
1430
- this.viewOf(next).assertInvariants(incoming.kind);
1478
+ const view = this.viewOf(next);
1479
+ if (checked) view.assertInvariants(incoming.kind);
1480
+ else view.assertUniqueLeaves(incoming.kind);
1431
1481
  return next;
1432
1482
  }
1483
+ /** {@link assertInvariants} for each kind a batch wrote, against the state the batch produced. */
1484
+ assertInvariantsOf(snapshot, kinds) {
1485
+ const view = this.viewOf(snapshot);
1486
+ for (const kind of kinds) view.assertInvariants(kind);
1487
+ }
1433
1488
  /**
1434
1489
  * This config's reads over another snapshot, for a check that wants nothing else: a plain clone
1435
1490
  * with the snapshot swapped in. Unlike {@link at}, it records no parent link for the snapshot, so a
@@ -1446,8 +1501,8 @@ var Config = class Config {
1446
1501
  }
1447
1502
  /**
1448
1503
  * Refuse a state the kind's {@link EntityKind.invariants} reject, or one where a kind declaring
1449
- * {@link EntityKind.uniqueLeaves} holds a leaf twice. One kind when a patch names it, every kind
1450
- * after a registration. Never called on hydration.
1504
+ * {@link EntityKind.uniqueLeaves} holds a leaf twice. One kind when a patch names it, the kinds a
1505
+ * batch wrote once it has landed, every kind after a registration. Never called on hydration.
1451
1506
  */
1452
1507
  assertInvariants(kind) {
1453
1508
  const kinds = kind === void 0 ? [...this.state.entities.keys()] : [kind];
@@ -1457,6 +1512,12 @@ var Config = class Config {
1457
1512
  if (problems.length > 0) rejectData(`Invalid ${name}: ${problems.join(" ")}`);
1458
1513
  }
1459
1514
  }
1515
+ /** The {@link EntityKind.uniqueLeaves} half of {@link assertInvariants} alone. */
1516
+ assertUniqueLeaves(kind) {
1517
+ if (!this.entityOf(kind)?.uniqueLeaves) return;
1518
+ const problems = this.duplicateLeaves(kind);
1519
+ if (problems.length > 0) rejectData(`Invalid ${kind}: ${problems.join(" ")}`);
1520
+ }
1460
1521
  /** One sentence per leaf that two items of `kind` hold, since a leaf has to name one item. */
1461
1522
  duplicateLeaves(kind) {
1462
1523
  const byLeaf = /* @__PURE__ */ new Map();
@@ -153,15 +153,18 @@ function defineEntity(spec) {
153
153
  },
154
154
  item: (def) => def,
155
155
  group: (meta) => {
156
- const body = { ...meta };
156
+ let body = { ...meta };
157
157
  for (const [key, consume] of Object.entries(spec.groupInputs ?? {})) {
158
158
  if (!(key in body)) continue;
159
159
  const input = body[key];
160
160
  delete body[key];
161
- consume({
162
- input,
163
- body
164
- });
161
+ body = {
162
+ ...body,
163
+ ...consume({
164
+ input,
165
+ body
166
+ })
167
+ };
165
168
  }
166
169
  return brandGroup(body);
167
170
  },
@@ -439,25 +439,44 @@ declare function glyphLibrariesOf(domain: unknown): string[];
439
439
  */
440
440
  declare function glyphPropsOf(config: Config, path: string, seen?: ReadonlySet<string>): Record<string, readonly string[]>;
441
441
  /**
442
- * The canvas's icon tool: the `icon` canvas role's entry, as the component it inserts, the prop that
443
- * takes the glyph, the props the picker offers as axes, and the props an inserted instance starts
444
- * with. The default entry, else the first; `undefined` when the role is unregistered or its entry
445
- * names no glyph prop, which disables the tool.
442
+ * One entry of the canvas's `icon` role, read as a tool: the component it inserts, the prop that
443
+ * takes the glyph, the libraries that prop draws from, the props the picker offers as axes, and the
444
+ * props an inserted instance starts with. Everything but `defaultProps` is derived from the
445
+ * component's own declaration when the entry carries no `props` override: the glyph prop is the
446
+ * prop whose domain is an icon library, and the axes are its other `variant`-typed props, in
447
+ * declaration order. `props: { glyph, axes }` on the entry overrides either.
446
448
  */
447
449
  interface IconTool {
448
450
  readonly component: string;
449
451
  readonly glyph: string;
452
+ /** The libraries the glyph prop's domain names, in declaration order: what this tool draws. */
453
+ readonly libraries: readonly string[];
450
454
  readonly axes: readonly string[];
451
455
  readonly defaultProps: Readonly<Record<string, unknown>>;
452
456
  }
457
+ /**
458
+ * Every tool the `icon` role registers, in entry order. An entry whose component cannot be resolved
459
+ * or holds no glyph prop is not a tool and is left out; a role with none, or no role, is an empty
460
+ * list, which is also when the canvas's icon tool is disabled.
461
+ */
462
+ declare function iconToolsOf(config: Config): readonly IconTool[];
463
+ /**
464
+ * The canvas's icon tool: the role's default entry, else its first. What a plain click inserts, and
465
+ * the tool a surface with no library in hand reads.
466
+ */
453
467
  declare function iconToolOf(config: Config): IconTool | undefined;
468
+ /**
469
+ * The tool a library's glyphs are drawn and placed through: the entry whose glyph prop's domain
470
+ * covers the library, the default entry when several do. `undefined` for a library no entry draws.
471
+ */
472
+ declare function iconToolFor(config: Config, library: string): IconTool | undefined;
454
473
  /** The values an icon tool's axis offers: the leaves of that prop's own domain on the tool's
455
474
  * component, whether it enumerates them or delegates to a library's facet. */
456
475
  declare function iconToolAxisOptions(config: Config, tool: IconTool, axis: string): string[];
457
476
  /**
458
477
  * The component that draws a library's glyphs on their own, with the prop that takes the glyph. The
459
- * icon tool's component when the `icon` canvas role names one whose glyph prop is bound to the
460
- * library; otherwise the component whose own prop declares the library as its domain
478
+ * icon tool that covers the library when the `icon` canvas role has one ({@link iconToolFor});
479
+ * otherwise the component whose own prop declares the library as its domain
461
480
  * (`name: { type: 'variant', value: Icon.ref('phosphor') }`, or a list of libraries that includes
462
481
  * it). Derived from the components, never declared on the set: the edge runs from the component to
463
482
  * the library. `undefined` when no component draws from it, in which case a placed glyph is the
@@ -583,4 +602,4 @@ declare function propValueFromAxis(config: Config, path: string, prop: string, v
583
602
  /** The `value` a string, number or boolean prop declares as its default, per prop. */
584
603
  declare function declaredPropDefaults(props: Record<string, unknown> | undefined): Record<string, unknown>;
585
604
  //#endregion
586
- export { IconTool, IndexedPreviewCondition, PreviewMatrix, PropDeclaration, StylePropEntry, StylePropertyItem, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropDefaults, declaredPropRouting, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, holdingPreviewConditions, iconToolAxisOptions, iconToolOf, keyedPreviewConditions, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps };
605
+ export { IconTool, IndexedPreviewCondition, PreviewMatrix, PropDeclaration, StylePropEntry, StylePropertyItem, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropDefaults, declaredPropRouting, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, holdingPreviewConditions, iconToolAxisOptions, iconToolFor, iconToolOf, iconToolsOf, keyedPreviewConditions, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps };
@@ -982,17 +982,29 @@ function glyphPropsOfBody({ config, body, seen = /* @__PURE__ */ new Set() }) {
982
982
  }
983
983
  return out;
984
984
  }
985
+ /**
986
+ * Every tool the `icon` role registers, in entry order. An entry whose component cannot be resolved
987
+ * or holds no glyph prop is not a tool and is left out; a role with none, or no role, is an empty
988
+ * list, which is also when the canvas's icon tool is disabled.
989
+ */
990
+ function iconToolsOf(config) {
991
+ return iconToolsCache(config).tools;
992
+ }
993
+ /**
994
+ * The canvas's icon tool: the role's default entry, else its first. What a plain click inserts, and
995
+ * the tool a surface with no library in hand reads.
996
+ */
985
997
  function iconToolOf(config) {
986
- const entries = (config.resolve("canvas-role", "icon")?.toJSON())?.entries ?? [];
987
- const entry = entries.find((candidate) => candidate.default) ?? entries[0];
988
- const glyph = entry?.props?.glyph;
989
- if (!entry || !glyph || !isRef(entry.component)) return void 0;
990
- return {
991
- component: pathOf(entry.component),
992
- glyph,
993
- axes: entry.props?.axes ?? [],
994
- defaultProps: entry.defaultProps ?? {}
995
- };
998
+ return iconToolsCache(config).defaultTool;
999
+ }
1000
+ /**
1001
+ * The tool a library's glyphs are drawn and placed through: the entry whose glyph prop's domain
1002
+ * covers the library, the default entry when several do. `undefined` for a library no entry draws.
1003
+ */
1004
+ function iconToolFor(config, library) {
1005
+ const { tools, defaultTool } = iconToolsCache(config);
1006
+ if (defaultTool?.libraries.includes(library)) return defaultTool;
1007
+ return tools.find((tool) => tool.libraries.includes(library));
996
1008
  }
997
1009
  /** The values an icon tool's axis offers: the leaves of that prop's own domain on the tool's
998
1010
  * component, whether it enumerates them or delegates to a library's facet. */
@@ -1001,10 +1013,45 @@ function iconToolAxisOptions(config, tool, axis) {
1001
1013
  if (!declaration) return [];
1002
1014
  return propValueDomain(config, declaration)?.leaves ?? [];
1003
1015
  }
1016
+ /** The tools read once per role and component slice: an entry's derivation walks its component's
1017
+ * resolved props, which every placement and every picker render would otherwise repeat. */
1018
+ const iconToolsCache = createSliceMemo({
1019
+ kinds: ["canvas-role", "component"],
1020
+ compute: (config) => {
1021
+ const entries = (config.resolve("canvas-role", "icon")?.toJSON())?.entries ?? [];
1022
+ const tools = [];
1023
+ let defaultTool;
1024
+ for (const entry of entries) {
1025
+ const tool = iconToolFromEntry(config, entry);
1026
+ if (!tool) continue;
1027
+ tools.push(tool);
1028
+ if (entry.default && !defaultTool) defaultTool = tool;
1029
+ }
1030
+ return {
1031
+ tools,
1032
+ defaultTool: defaultTool ?? tools[0]
1033
+ };
1034
+ }
1035
+ });
1036
+ function iconToolFromEntry(config, entry) {
1037
+ if (!isRef(entry.component)) return void 0;
1038
+ const component = pathOf(entry.component);
1039
+ const declarations = resolveComponentProps(config, component);
1040
+ const glyphProps = glyphPropsOf(config, component);
1041
+ const glyph = entry.props?.glyph ?? Object.keys(glyphProps)[0];
1042
+ if (!glyph) return void 0;
1043
+ return {
1044
+ component,
1045
+ glyph,
1046
+ libraries: glyphProps[glyph] ?? glyphLibrariesOf(declarations[glyph]?.value),
1047
+ axes: entry.props?.axes ?? Object.entries(declarations).filter(([name, declaration]) => name !== glyph && !(name in glyphProps) && declaration?.type === "variant").map(([name]) => name),
1048
+ defaultProps: entry.defaultProps ?? {}
1049
+ };
1050
+ }
1004
1051
  /**
1005
1052
  * The component that draws a library's glyphs on their own, with the prop that takes the glyph. The
1006
- * icon tool's component when the `icon` canvas role names one whose glyph prop is bound to the
1007
- * library; otherwise the component whose own prop declares the library as its domain
1053
+ * icon tool that covers the library when the `icon` canvas role has one ({@link iconToolFor});
1054
+ * otherwise the component whose own prop declares the library as its domain
1008
1055
  * (`name: { type: 'variant', value: Icon.ref('phosphor') }`, or a list of libraries that includes
1009
1056
  * it). Derived from the components, never declared on the set: the edge runs from the component to
1010
1057
  * the library. `undefined` when no component draws from it, in which case a placed glyph is the
@@ -1014,14 +1061,11 @@ function iconToolAxisOptions(config, tool, axis) {
1014
1061
  * library. Two components binding the same library resolve to the first in registration order.
1015
1062
  */
1016
1063
  function glyphComponentOf(config, library) {
1017
- const tool = iconToolOf(config);
1018
- if (tool) {
1019
- const declaration = resolveComponentProps(config, tool.component)[tool.glyph];
1020
- if (declaration && glyphLibrariesOf(declaration.value).includes(library)) return {
1021
- path: tool.component,
1022
- prop: tool.glyph
1023
- };
1024
- }
1064
+ const tool = iconToolFor(config, library);
1065
+ if (tool) return {
1066
+ path: tool.component,
1067
+ prop: tool.glyph
1068
+ };
1025
1069
  for (const component of config.list("component")) {
1026
1070
  const { props = {} } = component.toJSON();
1027
1071
  for (const [prop, declaration] of Object.entries(props)) {
@@ -1272,4 +1316,4 @@ function declaredPropDefaults(props) {
1272
1316
  return out;
1273
1317
  }
1274
1318
  //#endregion
1275
- export { LAYER_PROPS, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropDefaults, declaredPropRouting, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, glyphPropsOfBody, holdingPreviewConditions, iconToolAxisOptions, iconToolOf, keyedPreviewConditions, layerPropsErrors, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, takenByForward, validateComponentProps };
1319
+ export { LAYER_PROPS, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropDefaults, declaredPropRouting, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, glyphPropsOfBody, holdingPreviewConditions, iconToolAxisOptions, iconToolFor, iconToolOf, iconToolsOf, keyedPreviewConditions, layerPropsErrors, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, takenByForward, validateComponentProps };
@@ -21,7 +21,7 @@ interface SurfaceVariantProp extends SurfacePropBase {
21
21
  * groups — a surface offers the glyph picker rather than a select over every member, with a
22
22
  * library switcher when there is more than one. A facet ref (`icon:phosphor#variants`) stays a
23
23
  * plain list: its leaves are the group node's own field values, a menu-sized set. Mirrors
24
- * {@link SurfaceSlotProp.acceptsIconLibrary}. */
24
+ * {@link SurfaceSlotProp.acceptsIconLibraries}. */
25
25
  readonly iconLibraries?: readonly string[];
26
26
  }
27
27
  interface SurfaceStylePropertyProp extends SurfacePropBase {
@@ -46,10 +46,10 @@ interface SurfaceSlotProp extends SurfacePropBase {
46
46
  readonly into?: string;
47
47
  /** Components this slot may be filled with (`accepts`), as paths. Empty when unconstrained. */
48
48
  readonly accepts: string[];
49
- /** The icon library this slot accepts, when `accepts` names one — the picker offers its glyphs
50
- * beside any accepted components. The library is the group the glyphs live in; Studio labels it
51
- * the slot's icon set. */
52
- readonly acceptsIconLibrary?: string;
49
+ /** The icon libraries this slot accepts, in declaration order, when `accepts` names any: the
50
+ * picker offers their glyphs beside any accepted components, with a set switcher when there is
51
+ * more than one. Each is the group the glyphs live in; Studio labels them the slot's icon sets. */
52
+ readonly acceptsIconLibraries?: readonly string[];
53
53
  /** What the prop on the other end of the routing is, when this slot targets a layer. Absent for an
54
54
  * open slot (content the render places itself). */
55
55
  readonly valueKind?: SurfacePropKind;
@@ -235,7 +235,7 @@ function slotProp(config, componentPath, name, decl) {
235
235
  };
236
236
  }
237
237
  const refs = acceptsRefs(decl.accepts);
238
- const icons = refs.find((ref) => kindOf(ref) === "icon");
238
+ const icons = refs.filter((ref) => kindOf(ref) === "icon").map((ref) => pathOf(ref));
239
239
  const body = Component.get(config, componentPath)?.toJSON();
240
240
  const layers = body?.layers;
241
241
  const routed = routeEnd(config, layers, decl)?.decl;
@@ -255,7 +255,7 @@ function slotProp(config, componentPath, name, decl) {
255
255
  into: intoName(decl.into)
256
256
  } : {},
257
257
  accepts: refs.filter((ref) => kindOf(ref) === "component").map((ref) => pathOf(ref)),
258
- ...icons ? { acceptsIconLibrary: pathOf(icons) } : {},
258
+ ...icons.length > 0 ? { acceptsIconLibraries: icons } : {},
259
259
  ...routedKind ? { valueKind: routedKind } : {},
260
260
  ...routed ? { valueOptions: propValueDomain(config, routed)?.leaves } : {},
261
261
  ...routedKind === "composite" ? { compositeName: refPath(routed?.value) } : {}
@@ -35,11 +35,13 @@ type GroupBody<F extends FieldsSchema, G extends FieldsSchema> = CreateInput<G>
35
35
  * A registration-time input: a key of an authored group body that the kind's `group()` hands to this
36
36
  * handler, with the rest of the body, and then strips. It is never stored, never part of the group
37
37
  * schema, and never seen by a hydrated config. What the handler does with it is the kind's business.
38
+ * A handler may answer with fields to lay over the body, which is how an input that stands for the
39
+ * members (a module namespace) becomes the `items` the group registers.
38
40
  */
39
41
  type GroupInputHandler<I> = (args: {
40
42
  readonly input: I; /** The body without its inputs: the members under `items` and the group's own fields. */
41
43
  readonly body: Readonly<Record<string, unknown>>;
42
- }) => void;
44
+ }) => Readonly<Record<string, unknown>> | undefined;
43
45
  /** A kind's registration-time inputs, keyed by the body key each one consumes. `never` is the
44
46
  * parameter position's bottom, so a handler declaring any input type fits. */
45
47
  type GroupInputs = Readonly<Record<string, GroupInputHandler<never>>>;
package/dist/index.d.ts CHANGED
@@ -25,6 +25,7 @@ import { AttachedSources, Config, CssGrammar, Edition, HydrationOptions, ListOpt
25
25
  import { CapturedChild, CapturedElement, CapturedNode, CapturedNodeJson, CapturedText, DomLikeElement, capturedFromDom, elementFromCaptured } from "./capture/captured-tree.js";
26
26
  import { CaptureToSpecOptions, CaptureToSpecResult, IconAnswer, IconHook, Spec, SpecElement, specFromCapture } from "./capture/capture-to-spec.js";
27
27
  import { ClassGrammar, classGrammar } from "./capture/class-grammar.js";
28
+ import { GlyphExportRule, ICON_METADATA_FORMATS, IconMemberMetadata, IconMetadataAdapter, IconMetadataDeclaration, IconMetadataFile, IconMetadataFormat, glyphExportRule, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconMetadataSourceFile, tablerExportName, tablerStyledExportName } from "./entities/system/icon-metadata.js";
28
29
  import { Icon, IconVariantAs, iconVariantAs } from "./entities/system/Icon.js";
29
30
  import { IconLibrary, glyphExportNames, glyphType, iconCategories, iconLibraries, iconLibrary, iconToolLibraries, isDeclaredElementProp, librariesBoundBy, libraryHolding, memberVariantOptions, placedGlyphElement, resolveIconLibraries } from "./entities/system/icon-library.js";
30
31
  import { GlyphSource, IconGlyph, glyphSourcesOf, iconResolver, nameIconsInTree } from "./capture/icon-resolver.js";
@@ -33,7 +34,7 @@ import { BUILD_DEFAULTS } from "./configs/build-options.js";
33
34
  import { ANATOMY_MARKER, ComponentSpec, ComponentSpecs, ComputedFunctions, ComputedValue, ExpandOptions, ExpansionResult, RenderElement, RenderSpec, RepeatRow, RepeatSpec, ResolveContext, SlotTarget, VisibilityOperator, VisibilityTerm, anatomyElementComponent, anatomyTextProp, boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, layerTextProp, liveStateProps, previewSpec, propInto, propsIntoLayer, readStatePointer, resolveValue, resolveVisibility, routeOf, slotTargetsOf, specWithResolvedVisibility, statePointerProp, valueForwardsOf, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey } from "./framework/render-spec.js";
34
35
  import { RefMember, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, StylePropLeaf, StylePropValue, StylePropValueCtx, StylePropValueKind, StyleProperty, classifyStylePropValue, cssPropertyNames, leavesOfStylePropValue, stylePropValueFormOf, stylePropValueSchema, toCssPropertyName } from "./entities/system/StyleProperty.js";
35
36
  import { StoredPreviewCondition, UNCONDITIONAL_PREVIEW_KEY, storedPreview, unconditionalPreviewProps } from "./framework/preview-store.js";
36
- import { IconTool, PreviewMatrix, PropDeclaration, StylePropEntry, StylePropertyItem, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropDefaults, declaredPropRouting, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, iconToolAxisOptions, iconToolOf, keyedPreviewConditions, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
37
+ import { IconTool, PreviewMatrix, PropDeclaration, StylePropEntry, StylePropertyItem, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropDefaults, declaredPropRouting, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, iconToolAxisOptions, iconToolFor, iconToolOf, iconToolsOf, keyedPreviewConditions, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
37
38
  import { PreviewElement, graftPreviewElements, isPreviewElement } from "./spec/preview-elements.js";
38
39
  import { Slot, SlotCell } from "./spec/slot.js";
39
40
  import { ColorValue, DERIVED_COLOR_SPACE, DerivedColor, Gradient, alpha, darken, isDerivedColor, isGradient, lighten, linearGradient, mix, renderDerivedColor, renderGradient } from "./entities/system/color.js";
@@ -71,7 +72,6 @@ import { Font, FontFile, fontFamilyStack } from "./entities/system/Font.js";
71
72
  import { GlobalStyle, globalStyleName } from "./entities/system/GlobalStyle.js";
72
73
  import { Guidance, GuidanceScope, GuidanceSegment, guidanceReaches, guidanceScopeOf, guidanceTextOf } from "./entities/system/Guidance.js";
73
74
  import { GuidanceStyle, GuidanceStyleBody } from "./entities/system/GuidanceStyle.js";
74
- import { ICON_METADATA_FORMATS, IconMemberMetadata, IconMetadataAdapter, IconMetadataDeclaration, IconMetadataFile, IconMetadataFormat, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, tablerExportName } from "./entities/system/icon-metadata.js";
75
75
  import { MODIFIER_CATEGORIES, Modifier, ModifierCategory, ModifierGroupMeta, WEB_ACTIVATIONS, WebActivation, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf } from "./entities/system/Modifier.js";
76
76
  import { Motion } from "./entities/system/Motion.js";
77
77
  import { Operation } from "./entities/system/Operation.js";
@@ -105,4 +105,4 @@ import { SpecNode, validateSpec } from "./framework/validate-spec.js";
105
105
  import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
106
106
  import { views } from "./framework/views-facade.js";
107
107
  import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
108
- export { AI_LANES, ANATOMY_MARKER, AiChat, AiFlow, type AiFlowOrigin, AiGeneration, type AiLane, AiMessage, type AiMultiAgentMode, type AnatomyIssue, type AnatomyIssueKind, type AnatomyReport, type AnySystemConfig, type AsInput, type AttachedSources, type Authored, type AuthoredComponent, type AuthoredProp, type AuthoredPropBody, type AuthoringSignatureOptions, BUILD_DEFAULTS, type BindingKind, type BreakOutcome, type BreakPlan, type BreakPlanInput, type BreakPlanRow, type BreakReach, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, type CanvasRoleName, CanvasSection, type CaptureToSpecOptions, type CaptureToSpecResult, type CapturedChild, type CapturedElement, CapturedNode, type CapturedNodeJson, type Spec as CapturedSpec, type SpecElement as CapturedSpecElement, type CapturedText, type Cell, type CellSlot, type Change, type ChangeHook, type ChangeTarget, type ChildrenPolicy, type ClassGrammar, type CodeSlot, type Collection, type ColorValue, Component, type ComponentBody, type ComponentBuilder, type ComponentContractOf, type ComponentElementBody, type ComponentModuleSource, type ComponentPropBody, type ComponentPropsOf, type ComponentReference, type ComponentRegistryImport, type ComponentRegistryImportBinding, type ComponentRuleClass, type ComponentSpec, type ComponentSpecs, type ComponentStyleBody, type ComposedValue, type ComposedValueAuthoring, type ComposedValueForm, Composite, type ComputedFields, type ComputedFunctions, type ComputedInput, type ComputedMap, type ComputedValue, Config, type ConfigClass, type ConfigEdit, ConfigFormatError, type ConfigInstance, type ConfigIssue, type ConfigIssueCode, type ConfigKind, type ConfigOp, ConfigRejection, ConfigSession, type ConfigSessionOptions, type ConfigSink, type ConfigSource, type CopyPlan, type CopyPlanInput, type CopyPlanRow, type CreateInput, type CssGrammar, type CssPrefix, type CssPropertyEntry, CssSection, DERIVED_COLOR_SPACE, DERIVED_MUTATIONS, type DanglingDirective, type DanglingLocalRef, type DanglingRef, type DeclaredRuntimeModule, type DeletePlan, type DeriveMembers, type DerivedColor, type DerivedEntityClass, type DerivedOp, Device, type DiffOptions, Documentation, DocumentationLibrary, type DomLikeElement, type DraftSource, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type Edition, type ElementVisibility, type ElementVisibilityInput, Entity, type EntityAddress, type EntityChange, type EntityClass, type EntityKind, type EntityMap, type ExpandOptions, type ExpansionResult, type ExtendedComponentRef, type ExtendedRef, type FieldsSchema, File, Font, FontFile, type ForwardClaims, GROUP, GUIDANCE_LANES, GlobalStyle, type GlyphComponent, type GlyphSource, type GlyphValue, type GoverningCondition, type Gradient, type GroupBody, Guidance, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconAnswer, type IconGlyph, type IconHook, type IconLibrary, type IconMemberMetadata, type IconMetadataAdapter, type IconMetadataDeclaration, type IconMetadataFile, type IconMetadataFormat, type IconTool, type IconVariantAs, type IdentifiedOp, type InferredRename, type Instance, type InstanceSlot, type InstanceSpec, type ItemOf, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerElement, type LayerMap, type LayerPropDriver, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, LinkedSystem, type LinkedSystemResolver, type LinkedSystemState, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, type MarkerKind, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierGroupMeta, Motion, NATIVE_ACTIVATIONS, type NativeActivation, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, type OpHandler, type OpInput, Operation, type OverlayVerb, type OverrideCondition, type OwnedRecords, PLAYGROUND_DEFAULTS, Package, Page, type Patch, type PathOf, type PinDirective, type PinOptions, type PinOptionsField, type Plan, type PlanImpact, type PlanOp, PlaygroundSection, type PreviewElement, type PreviewMatrix, type ProjectedVisibility, type PropCondition, type PropDecl, type PropDeclaration, type PropMap, type PropRoute, RN_STYLE_KEYS, ReactNativeSystem, type ReactNativeSystemConfig, type RebaseConflict, type RebaseOrigin, type RebaseResult, type RecordedSource, type RedundantQualifier, type Ref, type RefGraph, type RefGraphEntry, type RefIndex, type RefIndexChange, type RefMember, type RefTarget, type RegisteredComponentContracts, type RegisteredEntities, type RegisteredMembers, type RegisteredModifiers, type RegisteredPaths, type RegisteredStyleProps, type RegisteredTokenValues, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedNode, type RenderedTarget, type RepeatRow, type RepeatSpec, type ResolveContext, type ResolveValueTypeInput, type ResolvedBinding, type ResolvedSource, type RootFontSize, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, SLOT_CODE_FORMS, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, type SchemaEntry, type SchemaMigration, SchemaVersionTooNew, type SerializedConfig, type SerializedSourceAnswer, Settings, type SignatureOptions, type SkippedOp, type Slot, type SlotCell, type SlotCodeForm, type SlotDecl, type SlotTarget, Snapshot, type Source, type SourceAnswer, type SourceChange, type SourceMap, type SourceResolution, type SourceResolutionSchemas, type SourceResolver, type SourceRowState, type SourceState, type SourceUnavailable, type SourcesBySlug, type SourcesOf, type SpecNode, type SplitStyleProps, type StampedPatch, type StoredConfig, type StoredPreviewCondition, type StylePropEntry, type StylePropLeaf, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyItem, type StyleRuleInput, type StyleValue, type SubEntityClass, type SubPatch, type SurfaceCompositeProp, type SurfaceProp, type SurfacePropCondition, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemConfig, SystemSection, SystemSource, TOKEN_READERS, type TimingValue, Token, type TokenBinding, type TokenBody, type TokenGroupReader, type TokenMatch, type TokenReader, type TokenReaders, type TokenRefPath, type TokenReference, type TokenValueEntry, type TokenValueRow, type TokenValueState, Tool, type Transition, type TransitionSegment, type TraverseOptions, type TreeNode, UNCONDITIONAL_PREVIEW_KEY, UNREACHABLE, type UnadoptedDirective, type UnknownStyleLeaf, type UnlinkPlan, type UnlinkPlanInput, type UnreadableBorrow, type UnstatableCondition, type UpgradedDraft, type UserSchemas, VOID_ELEMENTS, type ValueOf, type ValueType, type VariantValueBody, type VariantValues, type VisibilityOperator, type VisibilityTerm, WEB_ACTIVATIONS, type WalkOptions, type WebActivation, addressOf, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, authoredBag, authoredValue, authoringSignatures, baseOf, bindStateRef, bindingPath, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, codeSlotsOf, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, condArms, condValue, containsMarker, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, elementFromCaptured, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconResolver, iconToolAxisOptions, iconToolLibraries, iconToolOf, iconVariantAs, inferredRenames, inputOf, instanceHolding, instanceSpec, intoName, isAuthored, isBinaryAsset, isComposedValue, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isIdentifier, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isReservedWord, isSystemConfig, isTokenReader, isTransition, isValueSlot, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerPropDrivers, layerPropRoutes, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, markerKind, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, nameIconsInTree, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseRootFontSize, partsOf, pathDelta, pathOf, pathSegments, placedGlyphElement, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, readsState, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, refTo, registerSchemaMigrations, renderBindingsOf, renderComposedValue, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderTransition, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveBinding, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootFontSize, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitStyleProps, stamp, standsInForCode, statePointerProp, stateRef, stateTest, storedPreview, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, toCssPropertyName, tokenBinding, tokenExists, tokenValueRow, tokenValueRows, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
108
+ export { AI_LANES, ANATOMY_MARKER, AiChat, AiFlow, type AiFlowOrigin, AiGeneration, type AiLane, AiMessage, type AiMultiAgentMode, type AnatomyIssue, type AnatomyIssueKind, type AnatomyReport, type AnySystemConfig, type AsInput, type AttachedSources, type Authored, type AuthoredComponent, type AuthoredProp, type AuthoredPropBody, type AuthoringSignatureOptions, BUILD_DEFAULTS, type BindingKind, type BreakOutcome, type BreakPlan, type BreakPlanInput, type BreakPlanRow, type BreakReach, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, type CanvasRoleName, CanvasSection, type CaptureToSpecOptions, type CaptureToSpecResult, type CapturedChild, type CapturedElement, CapturedNode, type CapturedNodeJson, type Spec as CapturedSpec, type SpecElement as CapturedSpecElement, type CapturedText, type Cell, type CellSlot, type Change, type ChangeHook, type ChangeTarget, type ChildrenPolicy, type ClassGrammar, type CodeSlot, type Collection, type ColorValue, Component, type ComponentBody, type ComponentBuilder, type ComponentContractOf, type ComponentElementBody, type ComponentModuleSource, type ComponentPropBody, type ComponentPropsOf, type ComponentReference, type ComponentRegistryImport, type ComponentRegistryImportBinding, type ComponentRuleClass, type ComponentSpec, type ComponentSpecs, type ComponentStyleBody, type ComposedValue, type ComposedValueAuthoring, type ComposedValueForm, Composite, type ComputedFields, type ComputedFunctions, type ComputedInput, type ComputedMap, type ComputedValue, Config, type ConfigClass, type ConfigEdit, ConfigFormatError, type ConfigInstance, type ConfigIssue, type ConfigIssueCode, type ConfigKind, type ConfigOp, ConfigRejection, ConfigSession, type ConfigSessionOptions, type ConfigSink, type ConfigSource, type CopyPlan, type CopyPlanInput, type CopyPlanRow, type CreateInput, type CssGrammar, type CssPrefix, type CssPropertyEntry, CssSection, DERIVED_COLOR_SPACE, DERIVED_MUTATIONS, type DanglingDirective, type DanglingLocalRef, type DanglingRef, type DeclaredRuntimeModule, type DeletePlan, type DeriveMembers, type DerivedColor, type DerivedEntityClass, type DerivedOp, Device, type DiffOptions, Documentation, DocumentationLibrary, type DomLikeElement, type DraftSource, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type Edition, type ElementVisibility, type ElementVisibilityInput, Entity, type EntityAddress, type EntityChange, type EntityClass, type EntityKind, type EntityMap, type ExpandOptions, type ExpansionResult, type ExtendedComponentRef, type ExtendedRef, type FieldsSchema, File, Font, FontFile, type ForwardClaims, GROUP, GUIDANCE_LANES, GlobalStyle, type GlyphComponent, type GlyphExportRule, type GlyphSource, type GlyphValue, type GoverningCondition, type Gradient, type GroupBody, Guidance, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconAnswer, type IconGlyph, type IconHook, type IconLibrary, type IconMemberMetadata, type IconMetadataAdapter, type IconMetadataDeclaration, type IconMetadataFile, type IconMetadataFormat, type IconTool, type IconVariantAs, type IdentifiedOp, type InferredRename, type Instance, type InstanceSlot, type InstanceSpec, type ItemOf, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerElement, type LayerMap, type LayerPropDriver, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, LinkedSystem, type LinkedSystemResolver, type LinkedSystemState, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, type MarkerKind, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierGroupMeta, Motion, NATIVE_ACTIVATIONS, type NativeActivation, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, type OpHandler, type OpInput, Operation, type OverlayVerb, type OverrideCondition, type OwnedRecords, PLAYGROUND_DEFAULTS, Package, Page, type Patch, type PathOf, type PinDirective, type PinOptions, type PinOptionsField, type Plan, type PlanImpact, type PlanOp, PlaygroundSection, type PreviewElement, type PreviewMatrix, type ProjectedVisibility, type PropCondition, type PropDecl, type PropDeclaration, type PropMap, type PropRoute, RN_STYLE_KEYS, ReactNativeSystem, type ReactNativeSystemConfig, type RebaseConflict, type RebaseOrigin, type RebaseResult, type RecordedSource, type RedundantQualifier, type Ref, type RefGraph, type RefGraphEntry, type RefIndex, type RefIndexChange, type RefMember, type RefTarget, type RegisteredComponentContracts, type RegisteredEntities, type RegisteredMembers, type RegisteredModifiers, type RegisteredPaths, type RegisteredStyleProps, type RegisteredTokenValues, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedNode, type RenderedTarget, type RepeatRow, type RepeatSpec, type ResolveContext, type ResolveValueTypeInput, type ResolvedBinding, type ResolvedSource, type RootFontSize, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, SLOT_CODE_FORMS, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, type SchemaEntry, type SchemaMigration, SchemaVersionTooNew, type SerializedConfig, type SerializedSourceAnswer, Settings, type SignatureOptions, type SkippedOp, type Slot, type SlotCell, type SlotCodeForm, type SlotDecl, type SlotTarget, Snapshot, type Source, type SourceAnswer, type SourceChange, type SourceMap, type SourceResolution, type SourceResolutionSchemas, type SourceResolver, type SourceRowState, type SourceState, type SourceUnavailable, type SourcesBySlug, type SourcesOf, type SpecNode, type SplitStyleProps, type StampedPatch, type StoredConfig, type StoredPreviewCondition, type StylePropEntry, type StylePropLeaf, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyItem, type StyleRuleInput, type StyleValue, type SubEntityClass, type SubPatch, type SurfaceCompositeProp, type SurfaceProp, type SurfacePropCondition, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemConfig, SystemSection, SystemSource, TOKEN_READERS, type TimingValue, Token, type TokenBinding, type TokenBody, type TokenGroupReader, type TokenMatch, type TokenReader, type TokenReaders, type TokenRefPath, type TokenReference, type TokenValueEntry, type TokenValueRow, type TokenValueState, Tool, type Transition, type TransitionSegment, type TraverseOptions, type TreeNode, UNCONDITIONAL_PREVIEW_KEY, UNREACHABLE, type UnadoptedDirective, type UnknownStyleLeaf, type UnlinkPlan, type UnlinkPlanInput, type UnreadableBorrow, type UnstatableCondition, type UpgradedDraft, type UserSchemas, VOID_ELEMENTS, type ValueOf, type ValueType, type VariantValueBody, type VariantValues, type VisibilityOperator, type VisibilityTerm, WEB_ACTIVATIONS, type WalkOptions, type WebActivation, addressOf, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, authoredBag, authoredValue, authoringSignatures, baseOf, bindStateRef, bindingPath, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, codeSlotsOf, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, condArms, condValue, containsMarker, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, elementFromCaptured, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphExportRule, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconMetadataSourceFile, iconResolver, iconToolAxisOptions, iconToolFor, iconToolLibraries, iconToolOf, iconToolsOf, iconVariantAs, inferredRenames, inputOf, instanceHolding, instanceSpec, intoName, isAuthored, isBinaryAsset, isComposedValue, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isIdentifier, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isReservedWord, isSystemConfig, isTokenReader, isTransition, isValueSlot, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerPropDrivers, layerPropRoutes, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, markerKind, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, nameIconsInTree, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseRootFontSize, partsOf, pathDelta, pathOf, pathSegments, placedGlyphElement, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, readsState, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, refTo, registerSchemaMigrations, renderBindingsOf, renderComposedValue, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderTransition, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveBinding, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootFontSize, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitStyleProps, stamp, standsInForCode, statePointerProp, stateRef, stateTest, storedPreview, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, tablerStyledExportName, toCssPropertyName, tokenBinding, tokenExists, tokenValueRow, tokenValueRows, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };