@yahoo/uds-create-config 5.82.0 → 5.83.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.
@@ -202,6 +202,8 @@ var Converter = class {
202
202
  breakpoints;
203
203
  /** Each modifier's class prefix (`md`) → the prop key its bag is written under (`_md`). */
204
204
  modifierKeys;
205
+ /** The classes a modifier's selector names on another element (`.peer`, `.group`). */
206
+ markerClasses;
205
207
  constructor(options, grammar) {
206
208
  this.options = options;
207
209
  this.grammar = grammar;
@@ -227,6 +229,13 @@ var Converter = class {
227
229
  });
228
230
  }
229
231
  this.breakpoints = breakpoints;
232
+ const markers = /* @__PURE__ */ new Set();
233
+ for (const modifier of options.config.list("modifier")) {
234
+ const { type, value } = modifier.toJSON();
235
+ if (type !== "selector" || typeof value !== "string") continue;
236
+ for (const [, name] of value.matchAll(/\.(-?[A-Za-z_][\w-]*)/g)) markers.add(name);
237
+ }
238
+ this.markerClasses = markers;
230
239
  this.modifierKeys = new Map(options.config.list("modifier").map((modifier) => [modifierClassPrefix(modifier), `_${modifier.leaf}`]));
231
240
  }
232
241
  convertTop(el) {
@@ -307,15 +316,22 @@ var Converter = class {
307
316
  plain(el, convertKids = () => this.plainChildren(el)) {
308
317
  const tag = el.tagName.toLowerCase();
309
318
  if (FORBIDDEN_TAGS.has(tag)) return [];
310
- if (el.hasAttribute(FOLD)) return this.pinFolded(el, convertKids());
311
- if ([...inlineDeclarations(el), ...declarationsOf(el.getAttribute("data-uds-computed") ?? "")].find(([property]) => property === "display")?.[1].trim() === "contents") return convertKids();
319
+ let kidsOf = convertKids;
320
+ if (el.hasAttribute(FOLD) && !this.placesItself(el)) {
321
+ const kids = convertKids();
322
+ if (kids.length <= 1) return this.pinFolded(el, kids);
323
+ kidsOf = () => kids;
324
+ }
325
+ if ([...inlineDeclarations(el), ...declarationsOf(el.getAttribute("data-uds-computed") ?? "")].find(([property]) => property === "display")?.[1].trim() === "contents") return kidsOf();
312
326
  const { className, style, paints } = this.plainStyle(el);
313
327
  const attrs = plainAttributes(el);
314
328
  if (tag === "img" && !attrs.src) return [];
315
- const children = VOID_TAGS.has(tag) ? [] : convertKids();
329
+ const children = VOID_TAGS.has(tag) ? [] : kidsOf();
316
330
  const text = children.length === 0 ? plainText(el) : "";
317
- if (children.length === 0 && !text && !VOID_TAGS.has(tag) && !paints && !sizesItself(el) && !el.hasAttribute(EMBED_SPACE_ATTR)) return [];
318
- if (!(className !== "" || Object.keys(style).length > 0 || Object.keys(attrs).length > 0) && GROUPING_TAGS.has(tag)) {
331
+ if (children.length === 0 && !text && !VOID_TAGS.has(tag) && !paints && !sizesItself(el) && !el.hasAttribute(EMBED_SPACE_ATTR) && !holdsGridCell(el)) return [];
332
+ const carries = className !== "" || Object.keys(style).length > 0 || Object.keys(attrs).length > 0;
333
+ const holdsCell = children.length === 0 && !text && holdsGridCell(el);
334
+ if (!carries && GROUPING_TAGS.has(tag) && children.length <= 1 && !holdsCell) {
319
335
  if (text) return this.plainTextRun(text);
320
336
  return children;
321
337
  }
@@ -503,6 +519,7 @@ var Converter = class {
503
519
  classes.push(...owned.length < each.atoms.size ? this.narrowed(each, new Set(owned)) : [each.bare]);
504
520
  }
505
521
  fromDeclarations(declarationsOf(el.getAttribute("data-uds-computed") ?? ""));
522
+ for (const cls of classesOf(el)) if (this.markerClasses.has(cls)) classes.push(cls);
506
523
  return {
507
524
  className: [...new Set(classes)].join(" "),
508
525
  style,
@@ -539,6 +556,20 @@ var Converter = class {
539
556
  }
540
557
  }
541
558
  /**
559
+ * Whether an element's classes or computed styles place it in its parent's grid or flex row (a
560
+ * column span, its own alignment, a flex share). Folding it would leave its child unplaced, so a
561
+ * card spanning two columns would take one.
562
+ */
563
+ placesItself(el) {
564
+ if (declarationsOf(el.getAttribute("data-uds-computed") ?? "").some(([property]) => PLACEMENT_PROPERTY.test(property))) return true;
565
+ return classesOf(el).some((cls) => {
566
+ const read = this.readModifiedClass(cls);
567
+ if (!read || read.modifiers.length > 0) return false;
568
+ const { properties = [] } = this.options.config.resolve("style-property", read.style.path)?.toJSON() ?? {};
569
+ return properties.some((property) => PLACEMENT_PROPERTY.test(property));
570
+ });
571
+ }
572
+ /**
542
573
  * The content of an unmarked wrapper the capture folded, with the wrapper's measured box written
543
574
  * onto it when it is one element: the wrapper's sizing (a flex share, a fixed size) no longer reaches
544
575
  * the child, so the child keeps the box it had.
@@ -673,7 +704,7 @@ var Converter = class {
673
704
  const important = /^!|!$/.test(leaf);
674
705
  if (important) leaf = leaf.replace(/^!|!$/, "");
675
706
  if (important) rank += IMPORTANT_RANK;
676
- const style = this.grammar.styleProp(leaf);
707
+ const style = this.grammar.styleProp(leaf) ?? this.grammar.styleProp(FADED_CLASS.exec(leaf)?.[1] ?? "");
677
708
  return style ? {
678
709
  modifiers,
679
710
  style,
@@ -1456,6 +1487,10 @@ const ROOT_ATTRIBUTE_PROPS = [
1456
1487
  ];
1457
1488
  /** The CSS properties that draw something of an element's own. */
1458
1489
  const PAINT_PROPERTY = /^(background|border-(top-|right-|bottom-|left-)?(width|color)|box-shadow|outline)/;
1490
+ /** A class under an opacity modifier, `bg-brand/50`, with the class it fades. */
1491
+ const FADED_CLASS = /^(.+)\/(?:100|\d{1,2}(?:\.\d+)?)$/;
1492
+ /** The CSS properties that place an element in its parent's grid or flex layout. */
1493
+ const PLACEMENT_PROPERTY = /^(grid-(column|row|area)(-start|-end)?|(align|justify|place)-self|order|flex(-grow)?)$/;
1459
1494
  /** Tags that only group what they hold, and fold away when they carry nothing of their own. */
1460
1495
  const GROUPING_TAGS = new Set(["div", "span"]);
1461
1496
  /** Tags with no content. */
@@ -1486,6 +1521,8 @@ const PLAIN_ATTRIBUTES = {
1486
1521
  rowspan: "rowSpan",
1487
1522
  for: "htmlFor"
1488
1523
  };
1524
+ /** The state attributes a plain element keeps, which `open:` and `peer-disabled:` styles read. */
1525
+ const BOOLEAN_ATTRIBUTES = ["open", "disabled"];
1489
1526
  function plainAttributes(el) {
1490
1527
  const out = {};
1491
1528
  const tag = el.tagName.toLowerCase();
@@ -1500,6 +1537,17 @@ function plainAttributes(el) {
1500
1537
  const value = tag === "textarea" ? el.textContent ?? "" : el.getAttribute("value");
1501
1538
  if (value) out.defaultValue = value;
1502
1539
  }
1540
+ if (tag === "input" && el.hasAttribute("checked")) out.defaultChecked = true;
1541
+ for (const attr of BOOLEAN_ATTRIBUTES) if (el.hasAttribute(attr)) out[attr] = true;
1542
+ if (tag === "option") {
1543
+ const value = el.getAttribute("value");
1544
+ if (value !== null && value !== void 0) out.value = value;
1545
+ }
1546
+ if (tag === "select") {
1547
+ const chosen = el.querySelector("option[selected]");
1548
+ const value = chosen?.getAttribute("value") ?? chosen?.textContent;
1549
+ if (value) out.defaultValue = value;
1550
+ }
1503
1551
  return out;
1504
1552
  }
1505
1553
  /** The text an element holds directly, its whitespace collapsed; empty for a field. */
@@ -1521,6 +1569,10 @@ function camelCase(property) {
1521
1569
  function isImage(el) {
1522
1570
  return el.tagName.toLowerCase() === "img" && !el.hasAttribute("data-uds-component");
1523
1571
  }
1572
+ /** A form control whose state a page's styles can read. */
1573
+ function isFieldControl(el) {
1574
+ return isField(el) || el.tagName.toLowerCase() === "select";
1575
+ }
1524
1576
  function isField(el) {
1525
1577
  const tag = el.tagName.toLowerCase();
1526
1578
  return tag === "input" || tag === "textarea";
@@ -1588,6 +1640,12 @@ const SIZING_PROPERTY = new Set([
1588
1640
  "flex-basis"
1589
1641
  ]);
1590
1642
  /** Whether an element's inline style gives it a size of its own, so it holds space while empty. */
1643
+ /** Whether an element is an item of a grid, by the display the capture recorded on its parent. */
1644
+ function holdsGridCell(el) {
1645
+ const parent = el.parentElement;
1646
+ if (!parent) return false;
1647
+ return declarationsOf(parent.getAttribute("data-uds-computed") ?? "").some(([property, value]) => property === "display" && /^(inline-)?grid$/.test(value.trim()));
1648
+ }
1591
1649
  function sizesItself(el) {
1592
1650
  return inlineDeclarations(el).some(([property, value]) => {
1593
1651
  const size = value.trim().toLowerCase();
@@ -1705,7 +1763,7 @@ function nearestRoot(el) {
1705
1763
  function visible(el) {
1706
1764
  const style = el.getAttribute("style") ?? "";
1707
1765
  if (/display:\s*none/.test(style)) return false;
1708
- if (hiddenInline(el) && /position:\s*(absolute|fixed)/.test(style)) return false;
1766
+ if (hiddenInline(el) && /position:\s*(absolute|fixed)/.test(style) && !(isFieldControl(el) && !/visibility:\s*hidden/.test(style))) return false;
1709
1767
  if (el.hasAttribute("hidden")) return false;
1710
1768
  if (el.getAttribute("role") === "tooltip") return false;
1711
1769
  if (el.getAttribute("data-uds-props")?.includes("\"hidden\":true")) return false;
@@ -102,17 +102,23 @@ function capturedFromDom(el) {
102
102
  const attrs = {};
103
103
  for (const attribute of Array.from(el.attributes ?? [])) attrs[attribute.name] = attribute.value;
104
104
  const children = [];
105
+ let text = "";
106
+ const flush = () => {
107
+ if (text.trim()) children.push(text);
108
+ text = "";
109
+ };
105
110
  for (const child of Array.from(el.childNodes ?? [])) {
106
111
  if (child.nodeType === TEXT_NODE) {
107
- const text = child.textContent ?? "";
108
- if (text.trim()) children.push(text);
112
+ text += child.textContent ?? "";
109
113
  continue;
110
114
  }
111
115
  if (child.nodeType !== ELEMENT_NODE) continue;
112
116
  const tag = (child.tagName ?? "").toLowerCase();
113
117
  if (SKIPPED_TAGS.has(tag)) continue;
118
+ flush();
114
119
  children.push(capturedFromDom(child));
115
120
  }
121
+ flush();
116
122
  return {
117
123
  tag: (el.tagName ?? "div").toLowerCase(),
118
124
  ...Object.keys(attrs).length > 0 ? { attrs } : {},
@@ -193,7 +193,16 @@ declare const ReactNativeSystemDefinition: ConfigClass<{
193
193
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<Omit<{
194
194
  cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
195
195
  cssVariables: _$zod.ZodOptional<_$zod.ZodBoolean>;
196
- }, "cssPrefix" | "cssVariables"> & {}, _$zod_v4_core0.$strip>, "token", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
196
+ }, "cssPrefix" | "cssVariables"> & {}, _$zod_v4_core0.$strip>, "token", {
197
+ readonly get: {
198
+ readonly input: _$zod.ZodObject<{
199
+ path: _$zod.ZodType<string, string | undefined, _$zod_v4_core0.$ZodTypeInternals<string, string | undefined>>;
200
+ detail: _$zod.ZodOptional<_$zod.ZodEnum<{
201
+ full: "full";
202
+ }>>;
203
+ }, _$zod_v4_core0.$strip>;
204
+ };
205
+ }, Record<never, never>, false, Record<never, never>, Record<never, never>>;
197
206
  components: ComponentClass;
198
207
  modifiers: NativeModifierClass;
199
208
  motion: MotionClass;
@@ -42,6 +42,8 @@ import { sourcesAuthoringMigration } from "../migrations/20261103115059_sources_
42
42
  import { buildDebugMigration } from "../migrations/20261104151013_build_debug.js";
43
43
  import { sourcesStoredMigration } from "../migrations/20261105185042_sources_stored.js";
44
44
  import { modifierClassPrefixMigration } from "../migrations/20261106185419_modifier_class_prefix.js";
45
+ import { componentGetDetailMigration } from "../migrations/20261107213031_component_get_detail.js";
46
+ import { tokenGetDetailMigration } from "../migrations/20261108042210_token_get_detail.js";
45
47
  import { CanvasRole } from "../entities/system/CanvasRole.js";
46
48
  import { GlobalStyle } from "../entities/system/GlobalStyle.js";
47
49
  import { Guidance } from "../entities/system/Guidance.js";
@@ -220,5 +222,7 @@ if (!registeredSchemaMigrations().has(20261103115059)) registerSchemaMigrations(
220
222
  if (!registeredSchemaMigrations().has(20261104151013)) registerSchemaMigrations(buildDebugMigration);
221
223
  if (!registeredSchemaMigrations().has(20261105185042)) registerSchemaMigrations(sourcesStoredMigration);
222
224
  if (!registeredSchemaMigrations().has(20261106185419)) registerSchemaMigrations(modifierClassPrefixMigration);
225
+ if (!registeredSchemaMigrations().has(20261107213031)) registerSchemaMigrations(componentGetDetailMigration);
226
+ if (!registeredSchemaMigrations().has(20261108042210)) registerSchemaMigrations(tokenGetDetailMigration);
223
227
  //#endregion
224
228
  export { System };
@@ -100,6 +100,15 @@ declare const NativeToken: EntityClass<z.ZodObject<Omit<{
100
100
  }, z.core.$strip>, z.ZodObject<Omit<{
101
101
  cssPrefix: z.ZodOptional<z.ZodString>;
102
102
  cssVariables: z.ZodOptional<z.ZodBoolean>;
103
- }, "cssPrefix" | "cssVariables"> & {}, z.core.$strip>, "token", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
103
+ }, "cssPrefix" | "cssVariables"> & {}, z.core.$strip>, "token", {
104
+ readonly get: {
105
+ readonly input: z.ZodObject<{
106
+ path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
107
+ detail: z.ZodOptional<z.ZodEnum<{
108
+ full: "full";
109
+ }>>;
110
+ }, z.core.$strip>;
111
+ };
112
+ }, Record<never, never>, false, Record<never, never>, Record<never, never>>;
104
113
  //#endregion
105
114
  export { NativeToken, nativeTokenValue };
@@ -861,6 +861,14 @@ declare const ComponentEntity: EntityClass<z.ZodObject<{
861
861
  }, z.core.$strip>;
862
862
  }, z.core.$strip>;
863
863
  };
864
+ readonly get: {
865
+ readonly input: z.ZodObject<{
866
+ path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
867
+ detail: z.ZodOptional<z.ZodEnum<{
868
+ full: "full";
869
+ }>>;
870
+ }, z.core.$strip>;
871
+ };
864
872
  readonly validate: {
865
873
  readonly input: z.ZodObject<{
866
874
  path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
@@ -2928,6 +2928,17 @@ element: refSchema })
2928
2928
  });
2929
2929
  }
2930
2930
  },
2931
+ get: {
2932
+ input: z.object({
2933
+ path: pathInput("component"),
2934
+ detail: z.enum(["full"]).optional().describe("`\"full\"` adds what an author needs: each layer's forwards and what it could still forward, and the style rules, anatomy and preview content.")
2935
+ }),
2936
+ readOnly: true,
2937
+ label: "Get",
2938
+ description: "Get one component by its qualified `path`: its props and a usage example. Pass `detail: \"full\"` for the forwards, style rules, anatomy and preview content, which editing it needs.",
2939
+ scope: "item",
2940
+ handler: (input, config) => config.resolve("component", String(input.path))
2941
+ },
2931
2942
  validate: {
2932
2943
  input: z.object({
2933
2944
  path: pathInput("component"),
@@ -92,7 +92,16 @@ declare const TokenEntity: EntityClass<z.ZodObject<{
92
92
  }, z.core.$strip>, z.ZodObject<{
93
93
  cssPrefix: z.ZodOptional<z.ZodString>;
94
94
  cssVariables: z.ZodOptional<z.ZodBoolean>;
95
- }, z.core.$strip>, "token", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
95
+ }, z.core.$strip>, "token", {
96
+ readonly get: {
97
+ readonly input: z.ZodObject<{
98
+ path: z.ZodType<string, string | undefined, z.core.$ZodTypeInternals<string, string | undefined>>;
99
+ detail: z.ZodOptional<z.ZodEnum<{
100
+ full: "full";
101
+ }>>;
102
+ }, z.core.$strip>;
103
+ };
104
+ }, Record<never, never>, false, Record<never, never>, Record<never, never>>;
96
105
  /** A token ref as an authoring file holds it: the marker, `extend`, and the value readers. */
97
106
  type TokenReference<Path extends string> = KindRef<typeof TokenEntity, 'token', Path> & TokenReaders<Path>;
98
107
  /**
@@ -1,5 +1,6 @@
1
1
  import { isRef, kindOf, pathOf, ref, refKey, sourceOf } from "../../framework/utils/refs.js";
2
2
  import { WEB_CONFIG_NAME } from "../../configs/platform.js";
3
+ import { pathInput } from "../../framework/schemas.js";
3
4
  import { composedValueSchemas } from "./composed-values.js";
4
5
  import { defineEntity } from "../../framework/defineEntity.js";
5
6
  import { defineSubEntity, orList } from "../../framework/defineSubEntity.js";
@@ -147,7 +148,20 @@ const TokenEntity = defineEntity({
147
148
  const { value, overrides } = data;
148
149
  return { aliases: [value, ...Object.values(overrides ?? {}).map((override) => override?.value)].filter((alias) => isRef(alias) && kindOf(alias.__ref) === "token") };
149
150
  },
150
- schemas: { create: { description: `Create a token at \`<group>/<name>\` — \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${JSON.stringify(ref("token", "<group>"))}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.` } }
151
+ schemas: {
152
+ get: {
153
+ input: z.object({
154
+ path: pathInput("token"),
155
+ detail: z.enum(["full"]).optional().describe("`\"full\"` adds the token's stored body: its value, overrides and metadata as authored.")
156
+ }),
157
+ readOnly: true,
158
+ label: "Get",
159
+ description: "Get one token by its qualified `path`: what it comes to in each mode, and the tokens it refers to on the way. Pass `detail: \"full\"` for its stored body, which editing it needs.",
160
+ scope: "item",
161
+ handler: (input, config) => config.resolve("token", String(input.path))
162
+ },
163
+ create: { description: `Create a token at \`<group>/<name>\` — \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${JSON.stringify(ref("token", "<group>"))}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.` }
164
+ }
151
165
  });
152
166
  /**
153
167
  * Token refs add the value readers a render calls — `Token.ref('spacing/2.5').px()`. Phantoms, like a
@@ -74,7 +74,7 @@ interface RecordedSource {
74
74
  * The dense-counter `2` a short-lived scheme stamped before the chain existed reads as the mint
75
75
  * that replaced it (see `detectedWireVersion`).
76
76
  */
77
- declare const SERIALIZED_CONFIG_VERSION = 20261106185419;
77
+ declare const SERIALIZED_CONFIG_VERSION = 20261108042210;
78
78
  interface SerializedConfig {
79
79
  /** See {@link SERIALIZED_CONFIG_VERSION}. Always written; a stored artifact may lack it. */
80
80
  readonly version: number;
@@ -6535,7 +6535,7 @@ var Config = class Config {
6535
6535
  * links from the provided sources. A declared `linkedKind` with no provided source throws. */
6536
6536
  hydrateFrom(stored, options) {
6537
6537
  const claimed = schemaVersionOf(stored);
6538
- if (claimed > 20261106185419) throw new SchemaVersionTooNew(claimed);
6538
+ if (claimed > 20261108042210) throw new SchemaVersionTooNew(claimed);
6539
6539
  const wire = upgradeSerializedConfig(stored);
6540
6540
  if (!Array.isArray(wire.ownedKinds) || typeof wire.items !== "object" || wire.items === null) throw new ConfigFormatError(`Config "${stored.name ?? "system-config"}" cannot be hydrated: this is not a serialized config-v2 config (no "ownedKinds"/"items"). A pre-cutover build artifact converts through the registered cutover migration — import the config type's module (e.g. \`configs/system\`) before hydrating.`);
6541
6541
  const leftover = wire.options;
@@ -15,7 +15,7 @@ import { Patch, SerializedConfig } from "./Config.js";
15
15
  * sets this constant to its own older timestamp; the merge ref then carries a registered migration
16
16
  * newer than the constant, and the assertion fails until the author re-mints.
17
17
  */
18
- declare const CURRENT_SCHEMA_VERSION = 20261106185419;
18
+ declare const CURRENT_SCHEMA_VERSION = 20261108042210;
19
19
  /** What the walkers need to see of an envelope — loose on purpose, so a typed `SerializedConfig`
20
20
  * and a raw old-shape record both flow in without casts. */
21
21
  interface VersionStamped {
@@ -13,7 +13,7 @@ import { ConfigFormatError } from "./rejection.js";
13
13
  * sets this constant to its own older timestamp; the merge ref then carries a registered migration
14
14
  * newer than the constant, and the assertion fails until the author re-mints.
15
15
  */
16
- const CURRENT_SCHEMA_VERSION = 20261106185419;
16
+ const CURRENT_SCHEMA_VERSION = 20261108042210;
17
17
  /** The mint that moved `options` into the `settings` kind — restated here, rather than imported
18
18
  * from the migration that owns it, because that migration imports this module. */
19
19
  const SETTINGS_AS_KIND_VERSION = 20260908171448;
@@ -45,7 +45,7 @@ function registerSchemaMigrations(...migrations) {
45
45
  for (const migration of migrations) {
46
46
  if (migration.version !== 1 && !isMintTimestamp(migration.version)) throw new Error(`Schema migration version ${migration.version} is not a mint timestamp — mint one with \`date +%Y%m%d%H%M%S\`, like a supabase migration.`);
47
47
  if (REGISTERED.has(migration.version)) throw new Error(`A schema migration at version ${migration.version} is already registered.`);
48
- if (migration.version > 20261106185419) throw new Error(`Schema migration ${migration.version} is newer than CURRENT_SCHEMA_VERSION (${CURRENT_SCHEMA_VERSION}) — a stale branch merged, or the mint forgot to bump the constant. Re-mint: set CURRENT_SCHEMA_VERSION to the newest migration version.`);
48
+ if (migration.version > 20261108042210) throw new Error(`Schema migration ${migration.version} is newer than CURRENT_SCHEMA_VERSION (${CURRENT_SCHEMA_VERSION}) — a stale branch merged, or the mint forgot to bump the constant. Re-mint: set CURRENT_SCHEMA_VERSION to the newest migration version.`);
49
49
  REGISTERED.set(migration.version, migration);
50
50
  }
51
51
  }
@@ -102,7 +102,7 @@ function pendingFor(version, target, options) {
102
102
  * Already-current input passes through untouched — same reference, so hot paths pay nothing.
103
103
  */
104
104
  function upgradeSerializedConfig(json, options) {
105
- const target = options?.target ?? 20261106185419;
105
+ const target = options?.target ?? 20261108042210;
106
106
  const version = detectedWireVersion(json);
107
107
  if (version > target) throw new SchemaVersionTooNew(version, target);
108
108
  const raw = json;
@@ -160,7 +160,7 @@ function upgradedSources(json, options) {
160
160
  * meaning under the current schema and replay skips it — reported by the caller, not swallowed here.
161
161
  */
162
162
  function upgradePatch(patch, writtenAt, options) {
163
- const target = options?.target ?? 20261106185419;
163
+ const target = options?.target ?? 20261108042210;
164
164
  if (writtenAt > target) throw new SchemaVersionTooNew(writtenAt, target);
165
165
  let current = patch;
166
166
  for (const migration of pendingFor(writtenAt, target, options)) {
@@ -179,7 +179,7 @@ function upgradePatch(patch, writtenAt, options) {
179
179
  * stamp would cause.
180
180
  */
181
181
  function upgradeDraftEntries(draft, options) {
182
- const target = options?.target ?? 20261106185419;
182
+ const target = options?.target ?? 20261108042210;
183
183
  const entries = [];
184
184
  const held = [];
185
185
  const retired = [];
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Additions only, so the envelope passes through as it is:
3
+ *
4
+ * - The `component/get` read takes an optional `detail: "full"`, which adds the forwards, style
5
+ * rules, anatomy and preview content to the answer. A read is never stored, so no patch moves.
6
+ */
7
+ import type { SchemaMigration } from '../framework/schema-version';
8
+ export declare const COMPONENT_GET_DETAIL_VERSION = 20261107213031;
9
+ export declare const componentGetDetailMigration: SchemaMigration;
@@ -0,0 +1,10 @@
1
+ //#region src/migrations/20261107213031_component_get_detail.ts
2
+ const COMPONENT_GET_DETAIL_VERSION = 20261107213031;
3
+ const componentGetDetailMigration = {
4
+ version: COMPONENT_GET_DETAIL_VERSION,
5
+ up(json) {
6
+ return json;
7
+ }
8
+ };
9
+ //#endregion
10
+ export { COMPONENT_GET_DETAIL_VERSION, componentGetDetailMigration };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Additions only, so the envelope passes through as it is:
3
+ *
4
+ * - The `token/get` read takes an optional `detail: "full"`, which adds the token's stored body to
5
+ * what it comes to in each mode. A read is never stored, so no patch moves.
6
+ */
7
+ import type { SchemaMigration } from '../framework/schema-version';
8
+ export declare const TOKEN_GET_DETAIL_VERSION = 20261108042210;
9
+ export declare const tokenGetDetailMigration: SchemaMigration;
@@ -0,0 +1,10 @@
1
+ //#region src/migrations/20261108042210_token_get_detail.ts
2
+ const TOKEN_GET_DETAIL_VERSION = 20261108042210;
3
+ const tokenGetDetailMigration = {
4
+ version: TOKEN_GET_DETAIL_VERSION,
5
+ up(json) {
6
+ return json;
7
+ }
8
+ };
9
+ //#endregion
10
+ export { TOKEN_GET_DETAIL_VERSION, tokenGetDetailMigration };