@contentful/experience-design-system-cli 2.40.1-dev-build-54dd0c33.0 → 2.40.1-dev-build-1691fb91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,8 +4,8 @@ var __esm = (fn, res) => function __init() {
4
4
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
5
5
  };
6
6
  var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
7
+ for (var name2 in all)
8
+ __defProp(target, name2, { get: all[name2], enumerable: true });
9
9
  };
10
10
 
11
11
  // packages/experience-design-system-backend-pipeline/dist/src/persistence/src/session/helpers/config-root.js
@@ -26,17 +26,17 @@ var init_config_root = __esm({
26
26
  function escapeForRegExp(value) {
27
27
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
28
28
  }
29
- function identifierPattern(name) {
30
- return new RegExp(`(?<![A-Za-z0-9_$])${escapeForRegExp(name)}(?![A-Za-z0-9_$])`);
29
+ function identifierPattern(name2) {
30
+ return new RegExp(`(?<![A-Za-z0-9_$])${escapeForRegExp(name2)}(?![A-Za-z0-9_$])`);
31
31
  }
32
32
  function excerptAroundNames(text, names, maxChars, contextLines = 6) {
33
33
  if (text.length <= maxChars)
34
34
  return { content: text, usesNotShown: [] };
35
- const patterns = names.filter((name) => name.length > 0).map((name) => ({ name, pattern: identifierPattern(name) }));
35
+ const patterns = names.filter((name2) => name2.length > 0).map((name2) => ({ name: name2, pattern: identifierPattern(name2) }));
36
36
  const lines = text.split("\n");
37
37
  const windows = [];
38
38
  lines.forEach((line, index) => {
39
- const mentioned = patterns.filter(({ pattern }) => pattern.test(line)).map(({ name }) => name);
39
+ const mentioned = patterns.filter(({ pattern }) => pattern.test(line)).map(({ name: name2 }) => name2);
40
40
  if (mentioned.length === 0)
41
41
  return;
42
42
  const start = Math.max(0, index - contextLines);
@@ -44,8 +44,8 @@ function excerptAroundNames(text, names, maxChars, contextLines = 6) {
44
44
  const last = windows[windows.length - 1];
45
45
  if (last && start <= last.end + 1) {
46
46
  last.end = Math.max(last.end, end);
47
- for (const name of mentioned)
48
- last.names.add(name);
47
+ for (const name2 of mentioned)
48
+ last.names.add(name2);
49
49
  } else {
50
50
  windows.push({ start, end, names: new Set(mentioned) });
51
51
  }
@@ -56,8 +56,8 @@ ${TRUNCATED_MARKER}`, usesNotShown: [] };
56
56
  }
57
57
  const lastWindowFor = /* @__PURE__ */ new Map();
58
58
  for (const window of windows)
59
- for (const name of window.names)
60
- lastWindowFor.set(name, window);
59
+ for (const name2 of window.names)
60
+ lastWindowFor.set(name2, window);
61
61
  const kept = [];
62
62
  const cut = /* @__PURE__ */ new Set();
63
63
  let used = 0;
@@ -71,15 +71,15 @@ ${ELLIPSIS_MARKER}
71
71
  const head = chunk.slice(0, maxChars);
72
72
  kept.push({ window, text: head });
73
73
  used += head.length;
74
- for (const name of window.names) {
75
- if (lastWindowFor.get(name) === window && !identifierPattern(name).test(head))
76
- cut.add(name);
74
+ for (const name2 of window.names) {
75
+ if (lastWindowFor.get(name2) === window && !identifierPattern(name2).test(head))
76
+ cut.add(name2);
77
77
  }
78
78
  continue;
79
79
  }
80
- for (const name of window.names) {
81
- if (lastWindowFor.get(name) === window)
82
- cut.add(name);
80
+ for (const name2 of window.names) {
81
+ if (lastWindowFor.get(name2) === window)
82
+ cut.add(name2);
83
83
  }
84
84
  continue;
85
85
  }
@@ -90,7 +90,7 @@ ${ELLIPSIS_MARKER}
90
90
  const parts = kept.map((entry, index) => (index > 0 ? `
91
91
  ${ELLIPSIS_MARKER}
92
92
  ` : "") + entry.text);
93
- const usesNotShown = names.filter((name, index) => cut.has(name) && names.indexOf(name) === index);
93
+ const usesNotShown = names.filter((name2, index) => cut.has(name2) && names.indexOf(name2) === index);
94
94
  return { content: `${parts.join("")}
95
95
  ${TRUNCATED_MARKER}`, usesNotShown };
96
96
  }
@@ -105,8 +105,8 @@ var init_source_excerpt = __esm({
105
105
 
106
106
  // packages/experience-design-system-backend-pipeline/dist/src/persistence/src/session/helpers/components/derive-component-id.js
107
107
  import { createHash } from "node:crypto";
108
- function deriveComponentId(name, source) {
109
- return createHash("sha256").update(`${name}:${source}`).digest("hex").slice(0, 12);
108
+ function deriveComponentId(name2, source) {
109
+ return createHash("sha256").update(`${name2}:${source}`).digest("hex").slice(0, 12);
110
110
  }
111
111
  var init_derive_component_id = __esm({
112
112
  "packages/experience-design-system-backend-pipeline/dist/src/persistence/src/session/helpers/components/derive-component-id.js"() {
@@ -195,8 +195,8 @@ var init_read = __esm({
195
195
  });
196
196
 
197
197
  // packages/experience-design-system-backend-pipeline/dist/src/persistence/src/session/repositories/sessions/write.js
198
- function createSession(db, id, name, timestamp) {
199
- db.prepare("INSERT INTO sessions (id, name, created_at, updated_at) VALUES (?, ?, ?, ?)").run(id, name, timestamp, timestamp);
198
+ function createSession(db, id, name2, timestamp) {
199
+ db.prepare("INSERT INTO sessions (id, name, created_at, updated_at) VALUES (?, ?, ?, ?)").run(id, name2, timestamp, timestamp);
200
200
  }
201
201
  function updateSessionTimestamp(db, sessionId, timestamp) {
202
202
  db.prepare("UPDATE sessions SET updated_at = ? WHERE id = ?").run(timestamp, sessionId);
@@ -1031,8 +1031,8 @@ var init_extract_sentinel_output = __esm({
1031
1031
  });
1032
1032
 
1033
1033
  // packages/experience-design-system-backend-pipeline/dist/src/agents/helpers/metadata/format-generate-progress-line.js
1034
- function formatGenerateProgressLine(done, total, name) {
1035
- return `progress=generate:${done}/${total}:${name}`;
1034
+ function formatGenerateProgressLine(done, total, name2) {
1035
+ return `progress=generate:${done}/${total}:${name2}`;
1036
1036
  }
1037
1037
  var init_format_generate_progress_line = __esm({
1038
1038
  "packages/experience-design-system-backend-pipeline/dist/src/agents/helpers/metadata/format-generate-progress-line.js"() {
@@ -1718,14 +1718,14 @@ function formatToolCall(obj) {
1718
1718
  return ` ${ansi.cyan("\u25C8")} ${slot}${req} ${ansi.dim(desc)}`;
1719
1719
  }
1720
1720
  case "select_component": {
1721
- const name = String(obj["name"] ?? "");
1721
+ const name2 = String(obj["name"] ?? "");
1722
1722
  const reason = typeof obj["reason"] === "string" ? obj["reason"] : "";
1723
- return ` ${ansi.green("+")} ${name} ${ansi.dim(reason)}`;
1723
+ return ` ${ansi.green("+")} ${name2} ${ansi.dim(reason)}`;
1724
1724
  }
1725
1725
  case "reject_component": {
1726
- const name = String(obj["name"] ?? "");
1726
+ const name2 = String(obj["name"] ?? "");
1727
1727
  const reason = typeof obj["reason"] === "string" ? obj["reason"] : "";
1728
- return ` ${ansi.dim("\u2013")} ${name} ${ansi.dim(reason)}`;
1728
+ return ` ${ansi.dim("\u2013")} ${name2} ${ansi.dim(reason)}`;
1729
1729
  }
1730
1730
  default:
1731
1731
  return null;
@@ -3445,7 +3445,7 @@ function identifiersIn(propTypes) {
3445
3445
  return [...names];
3446
3446
  }
3447
3447
  function declaresAnyType(text, typeNames) {
3448
- return typeNames.some((name) => new RegExp(`\\b(?:type|interface|enum|const|class)\\s+${escapeForRegExp(name)}\\b`).test(text));
3448
+ return typeNames.some((name2) => new RegExp(`\\b(?:type|interface|enum|const|class)\\s+${escapeForRegExp(name2)}\\b`).test(text));
3449
3449
  }
3450
3450
  function extractRelativeImportPaths(sourceText) {
3451
3451
  const specifiers = /* @__PURE__ */ new Set();
@@ -3510,7 +3510,7 @@ async function loadSiblingFiles(sourceText, sourcePath, propNames, candidateType
3510
3510
  frontier = nextFrontier;
3511
3511
  }
3512
3512
  const inHand = [sourceText, ...discovered.map((d) => d.content)];
3513
- const declaredTypeNames = candidateTypeNames.filter((name) => inHand.some((text) => declaresAnyType(text, [name])));
3513
+ const declaredTypeNames = candidateTypeNames.filter((name2) => inHand.some((text) => declaresAnyType(text, [name2])));
3514
3514
  const usesNotShown = /* @__PURE__ */ new Set();
3515
3515
  const searchNames = [.../* @__PURE__ */ new Set([...propNames, ...declaredTypeNames])];
3516
3516
  let enlarged = 0;
@@ -3520,19 +3520,19 @@ async function loadSiblingFiles(sourceText, sourcePath, propNames, candidateType
3520
3520
  enlarged++;
3521
3521
  const budget = enlarge ? MAX_TYPE_DECLARING_SIBLING_CHARS : MAX_SIBLING_SNIPPET_CHARS;
3522
3522
  const excerpt = excerptAroundNames(d.content, searchNames, budget);
3523
- for (const name of excerpt.usesNotShown)
3524
- usesNotShown.add(name);
3523
+ for (const name2 of excerpt.usesNotShown)
3524
+ usesNotShown.add(name2);
3525
3525
  return { path: d.path, content: excerpt.content };
3526
3526
  });
3527
3527
  const truncatedCount = Math.max(0, discovered.length - MAX_SIBLING_FILES);
3528
3528
  return {
3529
3529
  siblings,
3530
3530
  truncatedCount,
3531
- usesNotShown: propNames.filter((name) => usesNotShown.has(name)),
3531
+ usesNotShown: propNames.filter((name2) => usesNotShown.has(name2)),
3532
3532
  declaredTypeNames
3533
3533
  };
3534
3534
  }
3535
- async function loadComponentSourceRef(name, sourcePath, propNames = [], propTypes = []) {
3535
+ async function loadComponentSourceRef(name2, sourcePath, propNames = [], propTypes = []) {
3536
3536
  let content = null;
3537
3537
  let siblingFiles = [];
3538
3538
  let truncatedSiblingCount = 0;
@@ -3549,18 +3549,18 @@ async function loadComponentSourceRef(name, sourcePath, propNames = [], propType
3549
3549
  } = await loadSiblingFiles(rawText, sourcePath, propNames, identifiersIn(propTypes)));
3550
3550
  const mainExcerpt = excerptAroundNames(rawText, [.../* @__PURE__ */ new Set([...propNames, ...declaredTypeNames])], MAX_COMPONENT_SOURCE_CHARS);
3551
3551
  content = mainExcerpt.content;
3552
- for (const name2 of mainExcerpt.usesNotShown)
3553
- usesNotShown.add(name2);
3554
- for (const name2 of siblingUsesNotShown)
3555
- usesNotShown.add(name2);
3552
+ for (const name3 of mainExcerpt.usesNotShown)
3553
+ usesNotShown.add(name3);
3554
+ for (const name3 of siblingUsesNotShown)
3555
+ usesNotShown.add(name3);
3556
3556
  } catch {
3557
3557
  }
3558
- const ref = { component: name, sourcePath, content };
3558
+ const ref = { component: name2, sourcePath, content };
3559
3559
  if (siblingFiles.length > 0)
3560
3560
  ref.siblingFiles = siblingFiles;
3561
3561
  if (truncatedSiblingCount > 0)
3562
3562
  ref.truncatedSiblingCount = truncatedSiblingCount;
3563
- const notShown = propNames.filter((name2) => usesNotShown.has(name2));
3563
+ const notShown = propNames.filter((name3) => usesNotShown.has(name3));
3564
3564
  if (notShown.length > 0)
3565
3565
  ref.usesNotShown = notShown;
3566
3566
  return ref;
@@ -3713,7 +3713,7 @@ function loadCDFComponents(db, sessionId) {
3713
3713
  const allowedComponentsBySlot = indexRowsByKey(allowedComponents, (ac) => `${ac.component_id}::${ac.slot_name}`);
3714
3714
  const tokenPathsByProp = indexRowsByKey(tokenPaths, (t) => `${t.component_id}::${t.prop_name}`);
3715
3715
  const toTokenPaths = (rows) => rows === void 0 ? void 0 : rows.map((r) => r.path);
3716
- return components.map(({ component_id, name, description }) => {
3716
+ return components.map(({ component_id, name: name2, description }) => {
3717
3717
  const compProps = propsByComponent.get(component_id) ?? [];
3718
3718
  const $properties = {};
3719
3719
  for (const p of compProps) {
@@ -3770,7 +3770,7 @@ function loadCDFComponents(db, sessionId) {
3770
3770
  entry.$description = description;
3771
3771
  if (Object.keys($slots).length > 0)
3772
3772
  entry.$slots = $slots;
3773
- return { key: name, entry };
3773
+ return { key: name2, entry };
3774
3774
  });
3775
3775
  }
3776
3776
  function loadScopeComponents(db, sessionId) {
@@ -4648,29 +4648,29 @@ function extractTsxComponents(filePaths, componentFilePattern, extract) {
4648
4648
  }
4649
4649
  function resolveDefaultExportName(declarations, exported, allowVariableDeclaration = false) {
4650
4650
  const declaration = declarations[0];
4651
- const name = Node.isFunctionDeclaration(declaration) ? declaration.getName() : allowVariableDeclaration && Node.isVariableDeclaration(declaration) ? declaration.getName() : void 0;
4652
- if (!name || !/^[A-Z]/.test(name) || exported.has(name))
4651
+ const name2 = Node.isFunctionDeclaration(declaration) ? declaration.getName() : allowVariableDeclaration && Node.isVariableDeclaration(declaration) ? declaration.getName() : void 0;
4652
+ if (!name2 || !/^[A-Z]/.test(name2) || exported.has(name2))
4653
4653
  return void 0;
4654
- return name;
4654
+ return name2;
4655
4655
  }
4656
4656
  function getRenderableExports(sourceFile, exclusions, options) {
4657
4657
  const renderable = [];
4658
4658
  const exported = sourceFile.getExportedDeclarations();
4659
4659
  for (const [exportKey, declarations] of exported) {
4660
- const name = exportKey === "default" ? resolveDefaultExportName(declarations, exported, options.allowVariableDeclaration) : exportKey;
4661
- if (!name || !/^[A-Z]/.test(name))
4660
+ const name2 = exportKey === "default" ? resolveDefaultExportName(declarations, exported, options.allowVariableDeclaration) : exportKey;
4661
+ if (!name2 || !/^[A-Z]/.test(name2))
4662
4662
  continue;
4663
- if (name.startsWith("use")) {
4663
+ if (name2.startsWith("use")) {
4664
4664
  exclusions.push({
4665
4665
  itemType: "component",
4666
- name,
4666
+ name: name2,
4667
4667
  source: sourceFile.getFilePath(),
4668
4668
  reason: options.hookReason,
4669
4669
  stage: "component-filter"
4670
4670
  });
4671
4671
  continue;
4672
4672
  }
4673
- renderable.push({ name, declarations });
4673
+ renderable.push({ name: name2, declarations });
4674
4674
  }
4675
4675
  return renderable;
4676
4676
  }
@@ -5069,7 +5069,7 @@ function extractProps(classDecl) {
5069
5069
  for (const property of classDecl.getProperties()) {
5070
5070
  if (!hasDecorator(property, "Prop"))
5071
5071
  continue;
5072
- const name = property.getName();
5072
+ const name2 = property.getName();
5073
5073
  const typeNode = property.getTypeNode();
5074
5074
  const typeText = typeNode ? typeNode.getText() : "unknown";
5075
5075
  const hasQuestionToken = property.hasQuestionToken();
@@ -5107,21 +5107,21 @@ function extractProps(classDecl) {
5107
5107
  }
5108
5108
  const allowedValues = extractAllowedValues2(typeText);
5109
5109
  props.push({
5110
- name,
5110
+ name: name2,
5111
5111
  type: typeText,
5112
5112
  required: isRequired,
5113
5113
  ...defaultValue !== void 0 && { defaultValue },
5114
5114
  ...description && { description },
5115
5115
  ...allowedValues && { allowedValues },
5116
- ...intrinsicDomAttributeProps.has(name) && { domAttribute: true },
5116
+ ...intrinsicDomAttributeProps.has(name2) && { domAttribute: true },
5117
5117
  sourceStartLine: property.getStartLineNumber(),
5118
5118
  sourceEndLine: property.getEndLineNumber()
5119
5119
  });
5120
5120
  }
5121
5121
  return props.sort((a, b) => a.name.localeCompare(b.name));
5122
5122
  }
5123
- function normalizeSlotName(name) {
5124
- const normalizedName = name && name.length > 0 ? name : "default";
5123
+ function normalizeSlotName(name2) {
5124
+ const normalizedName = name2 && name2.length > 0 ? name2 : "default";
5125
5125
  return {
5126
5126
  name: normalizedName,
5127
5127
  isDefault: normalizedName === "default"
@@ -5191,9 +5191,9 @@ function extractSlots(classDecl, warnings, componentName) {
5191
5191
  if (tagName === "slot") {
5192
5192
  const nameAttribute = openingElement.getAttributes().find((attribute) => Node2.isJsxAttribute(attribute) && attribute.getNameNode().getText() === "name");
5193
5193
  const initializer2 = Node2.isJsxAttribute(nameAttribute) ? nameAttribute.getInitializer() : void 0;
5194
- const name2 = initializer2 && Node2.isStringLiteral(initializer2) ? initializer2.getLiteralValue() : initializer2 && Node2.isJsxExpression(initializer2) ? initializer2.getExpression()?.getText() ?? "" : "";
5194
+ const name3 = initializer2 && Node2.isStringLiteral(initializer2) ? initializer2.getLiteralValue() : initializer2 && Node2.isJsxExpression(initializer2) ? initializer2.getExpression()?.getText() ?? "" : "";
5195
5195
  upsertSlot({
5196
- ...normalizeSlotName(name2)
5196
+ ...normalizeSlotName(name3)
5197
5197
  });
5198
5198
  return;
5199
5199
  }
@@ -5202,11 +5202,11 @@ function extractSlots(classDecl, warnings, componentName) {
5202
5202
  const initializer = slotAttribute.getInitializer();
5203
5203
  if (!initializer || !Node2.isStringLiteral(initializer))
5204
5204
  return;
5205
- const name = initializer.getLiteralValue();
5206
- if (!name)
5205
+ const name2 = initializer.getLiteralValue();
5206
+ if (!name2)
5207
5207
  return;
5208
5208
  upsertSlot({
5209
- name,
5209
+ name: name2,
5210
5210
  isDefault: false
5211
5211
  });
5212
5212
  });
@@ -5228,15 +5228,15 @@ function extractFromSourceFile(sourceFile, warnings) {
5228
5228
  const tag = getComponentTag(classDecl);
5229
5229
  if (!tag)
5230
5230
  continue;
5231
- const name = kebabToPascal(tag);
5231
+ const name2 = kebabToPascal(tag);
5232
5232
  const props = extractProps(classDecl);
5233
- const slots = extractSlots(classDecl, warnings, name);
5233
+ const slots = extractSlots(classDecl, warnings, name2);
5234
5234
  const eventNames = detectEvents(classDecl);
5235
5235
  if (eventNames.length > 0) {
5236
- warnings.push(`Component ${name} has ${eventNames.length} events not captured: ${eventNames.join(", ")}`);
5236
+ warnings.push(`Component ${name2} has ${eventNames.length} events not captured: ${eventNames.join(", ")}`);
5237
5237
  }
5238
5238
  components.push({
5239
- name,
5239
+ name: name2,
5240
5240
  source: sourceFile.getFilePath(),
5241
5241
  sourcePath: sourceFile.getFilePath(),
5242
5242
  framework: "stencil",
@@ -5403,9 +5403,9 @@ function extractAllowedComponentsFromJsdoc(jsdocText, componentNames) {
5403
5403
  return [];
5404
5404
  const found = /* @__PURE__ */ new Set();
5405
5405
  for (const raw of m[1].split(",")) {
5406
- const name = raw.trim();
5407
- if (name && componentNames.has(name))
5408
- found.add(name);
5406
+ const name2 = raw.trim();
5407
+ if (name2 && componentNames.has(name2))
5408
+ found.add(name2);
5409
5409
  }
5410
5410
  return [...found].sort();
5411
5411
  }
@@ -5453,8 +5453,8 @@ function collectTypePredicateComponentReferences(sourceFile, ctx) {
5453
5453
  const assertedTypeNode = returnTypeNode.getTypeNode();
5454
5454
  if (!assertedTypeNode)
5455
5455
  continue;
5456
- for (const name of extractAllowedComponentsFromTypeText(assertedTypeNode.getText(), ctx)) {
5457
- found.add(name);
5456
+ for (const name2 of extractAllowedComponentsFromTypeText(assertedTypeNode.getText(), ctx)) {
5457
+ found.add(name2);
5458
5458
  }
5459
5459
  }
5460
5460
  return [...found].sort();
@@ -5473,13 +5473,13 @@ function collectRuntimeTypeCheckComponentReferences(sourceFile, componentNames)
5473
5473
  return void 0;
5474
5474
  if (!Node3.isIdentifier(otherSide) && !Node3.isPropertyAccessExpression(otherSide))
5475
5475
  return void 0;
5476
- const name = otherSide.getText().split(".").pop();
5477
- if (!name || !componentNames.has(name))
5476
+ const name2 = otherSide.getText().split(".").pop();
5477
+ if (!name2 || !componentNames.has(name2))
5478
5478
  return void 0;
5479
5479
  const baseIdentifier = Node3.isPropertyAccessExpression(otherSide) ? otherSide.getExpression() : otherSide;
5480
5480
  if (!Node3.isIdentifier(baseIdentifier) || !localBindings.has(baseIdentifier.getText()))
5481
5481
  return void 0;
5482
- return name;
5482
+ return name2;
5483
5483
  };
5484
5484
  const match2 = candidateFromTypeAccess(left, right) ?? candidateFromTypeAccess(right, left);
5485
5485
  if (match2)
@@ -5531,8 +5531,8 @@ function collectArrayMapRenderComponentReferences(funcNode, componentNames, ownC
5531
5531
  const found = /* @__PURE__ */ new Set();
5532
5532
  const propNames = new Set(propTypesByName.keys());
5533
5533
  const renderCountByComponent = /* @__PURE__ */ new Map();
5534
- const bumpRenderCount = (name) => {
5535
- renderCountByComponent.set(name, (renderCountByComponent.get(name) ?? 0) + 1);
5534
+ const bumpRenderCount = (name2) => {
5535
+ renderCountByComponent.set(name2, (renderCountByComponent.get(name2) ?? 0) + 1);
5536
5536
  };
5537
5537
  for (const jsxElement of [
5538
5538
  ...funcNode.getDescendantsOfKind(SyntaxKind3.JsxSelfClosingElement),
@@ -5695,7 +5695,7 @@ function sourceFileUsesCreateContext(sourceFile) {
5695
5695
  function isNextJsComponent(filePath, exportedNames) {
5696
5696
  const normalized = filePath.replace(/\\/g, "/");
5697
5697
  const isAppRouterFile = /\/app\/.*\/(page|layout)\.[jt]sx?$/.test(normalized);
5698
- const hasNextExports = exportedNames.some((name) => name === "generateMetadata" || name === "generateStaticParams");
5698
+ const hasNextExports = exportedNames.some((name2) => name2 === "generateMetadata" || name2 === "generateStaticParams");
5699
5699
  return isAppRouterFile || hasNextExports;
5700
5700
  }
5701
5701
  function isRepoLocalTransparentPolymorphicWrapperDeclaration(declaration, typeName) {
@@ -5877,8 +5877,8 @@ function extractPropsFromTypeSymbols(type, slotNames, suppressNeverChildrenSlot
5877
5877
  const props = [];
5878
5878
  let hasChildren = false;
5879
5879
  for (const property of type.getProperties()) {
5880
- const name = property.getName();
5881
- if (name === "children") {
5880
+ const name2 = property.getName();
5881
+ if (name2 === "children") {
5882
5882
  if (suppressNeverChildrenSlot) {
5883
5883
  const declaration2 = property.getValueDeclaration() ?? property.getDeclarations()[0];
5884
5884
  if (declaration2 && property.getTypeAtLocation(declaration2).isNever()) {
@@ -5888,7 +5888,7 @@ function extractPropsFromTypeSymbols(type, slotNames, suppressNeverChildrenSlot
5888
5888
  hasChildren = true;
5889
5889
  continue;
5890
5890
  }
5891
- if (slotNames.has(name))
5891
+ if (slotNames.has(name2))
5892
5892
  continue;
5893
5893
  const declaration = property.getValueDeclaration() ?? property.getDeclarations()[0];
5894
5894
  if (!declaration)
@@ -5899,7 +5899,7 @@ function extractPropsFromTypeSymbols(type, slotNames, suppressNeverChildrenSlot
5899
5899
  const required = !property.isOptional();
5900
5900
  const allowedValues = extractAllowedValues(propType);
5901
5901
  props.push({
5902
- name,
5902
+ name: name2,
5903
5903
  type: typeText,
5904
5904
  required,
5905
5905
  ...allowedValues && { allowedValues },
@@ -5930,19 +5930,19 @@ function extractPropsFromInterfaceDeclaration(declaration, slotNames, seen, excl
5930
5930
  return acc;
5931
5931
  const propType = symbol.getTypeAtLocation(decl);
5932
5932
  const typeText = propType.isAny() ? ("getTypeNode" in decl && typeof decl.getTypeNode === "function" ? decl.getTypeNode()?.getText() : void 0) ?? propType.getText(decl) : propType.getText(decl);
5933
- const name = symbol.getName();
5934
- if (name === "children") {
5933
+ const name2 = symbol.getName();
5934
+ if (name2 === "children") {
5935
5935
  if (suppressNeverChildrenSlot && propType.isNever())
5936
5936
  return acc;
5937
5937
  acc.hasChildren = true;
5938
5938
  return acc;
5939
5939
  }
5940
- if (slotNames.has(name))
5940
+ if (slotNames.has(name2))
5941
5941
  return acc;
5942
5942
  const required = !symbol.isOptional();
5943
5943
  const allowedValues = extractAllowedValues(propType);
5944
5944
  acc.props.push({
5945
- name,
5945
+ name: name2,
5946
5946
  type: typeText,
5947
5947
  required,
5948
5948
  ...allowedValues && { allowedValues },
@@ -6275,7 +6275,7 @@ function collectReboundDeclarations(body) {
6275
6275
  function collectPropDataflow(func, param, availablePropNames) {
6276
6276
  const valueAliases = /* @__PURE__ */ new Map();
6277
6277
  const objectAliases = /* @__PURE__ */ new Map();
6278
- const fullPropsShape = new Map([...availablePropNames].map((name) => [name, name]));
6278
+ const fullPropsShape = new Map([...availablePropNames].map((name2) => [name2, name2]));
6279
6279
  const belongsToComponentFunction = (node) => node.getFirstAncestor((ancestor) => Node4.isFunctionDeclaration(ancestor) || Node4.isArrowFunction(ancestor) || Node4.isFunctionExpression(ancestor)) === func;
6280
6280
  const resolveValue = (expression) => {
6281
6281
  if (!expression)
@@ -6469,12 +6469,12 @@ function extractSlots2(type, hasChildren) {
6469
6469
  slots.push({ name: "children", isDefault: true });
6470
6470
  }
6471
6471
  for (const property of type.getProperties()) {
6472
- const name = property.getName();
6473
- if (name === "children")
6472
+ const name2 = property.getName();
6473
+ if (name2 === "children")
6474
6474
  continue;
6475
6475
  if (!getRenderPropType(property))
6476
6476
  continue;
6477
- const slotName = name.replace(/^render/, "");
6477
+ const slotName = name2.replace(/^render/, "");
6478
6478
  slots.push({
6479
6479
  name: slotName.charAt(0).toLowerCase() + slotName.slice(1),
6480
6480
  isDefault: false
@@ -6487,9 +6487,9 @@ function isExpandableDomAttributeWrapperName(typeName) {
6487
6487
  }
6488
6488
  function getStringLiteralTypeValues(typeNode) {
6489
6489
  if (Node4.isLiteralTypeNode(typeNode)) {
6490
- const literal3 = typeNode.getLiteral();
6491
- if (Node4.isStringLiteral(literal3)) {
6492
- return [literal3.getLiteralText()];
6490
+ const literal4 = typeNode.getLiteral();
6491
+ if (Node4.isStringLiteral(literal4)) {
6492
+ return [literal4.getLiteralText()];
6493
6493
  }
6494
6494
  }
6495
6495
  if (!Node4.isUnionTypeNode(typeNode))
@@ -6730,17 +6730,17 @@ function getSyntheticDomAttributeProps(typeNode) {
6730
6730
  }
6731
6731
  return [...propsByName.values()].sort((a, b) => a.name.localeCompare(b.name));
6732
6732
  }
6733
- function getDomAttributeSurface(name, seen = /* @__PURE__ */ new Set()) {
6734
- if (seen.has(name))
6733
+ function getDomAttributeSurface(name2, seen = /* @__PURE__ */ new Set()) {
6734
+ if (seen.has(name2))
6735
6735
  return [];
6736
- seen.add(name);
6736
+ seen.add(name2);
6737
6737
  const propsByName = /* @__PURE__ */ new Map();
6738
- for (const parentName of DOM_ATTRIBUTE_WRAPPER_PARENTS[name] ?? []) {
6738
+ for (const parentName of DOM_ATTRIBUTE_WRAPPER_PARENTS[name2] ?? []) {
6739
6739
  for (const prop of getDomAttributeSurface(parentName, seen)) {
6740
6740
  propsByName.set(prop.name, prop);
6741
6741
  }
6742
6742
  }
6743
- for (const prop of DOM_ATTRIBUTE_PROP_SURFACES[name]) {
6743
+ for (const prop of DOM_ATTRIBUTE_PROP_SURFACES[name2]) {
6744
6744
  propsByName.set(prop.name, prop);
6745
6745
  }
6746
6746
  return [...propsByName.values()].map((prop) => ({
@@ -6837,12 +6837,12 @@ function extractPickedPropsFromTypeNode(typeNode, slotNames, excludedProps = /*
6837
6837
  }
6838
6838
  const pickedKeys = getStringLiteralTypeValues(pickedKeysNode);
6839
6839
  const props = [];
6840
- for (const name of pickedKeys) {
6841
- if (slotNames.has(name))
6840
+ for (const name2 of pickedKeys) {
6841
+ if (slotNames.has(name2))
6842
6842
  continue;
6843
- if (excludedProps.has(name))
6843
+ if (excludedProps.has(name2))
6844
6844
  continue;
6845
- const pickedProp = sourcePropsByName.get(name);
6845
+ const pickedProp = sourcePropsByName.get(name2);
6846
6846
  if (pickedProp) {
6847
6847
  props.push(pickedProp);
6848
6848
  }
@@ -7071,7 +7071,7 @@ async function extractReactComponents(filePaths) {
7071
7071
  function extractFromSourceFile2(sourceFile, isNext, exclusions) {
7072
7072
  const components = [];
7073
7073
  const usesCreateContext = sourceFileUsesCreateContext(sourceFile);
7074
- for (const { name, declarations } of getRenderableExports(sourceFile, exclusions, {
7074
+ for (const { name: name2, declarations } of getRenderableExports(sourceFile, exclusions, {
7075
7075
  allowVariableDeclaration: true,
7076
7076
  hookReason: "React hook names are not renderable components"
7077
7077
  })) {
@@ -7083,7 +7083,7 @@ function extractFromSourceFile2(sourceFile, isNext, exclusions) {
7083
7083
  const params = funcNode.getParameters();
7084
7084
  if (params.length === 0) {
7085
7085
  components.push({
7086
- name,
7086
+ name: name2,
7087
7087
  source: sourceFile.getFilePath(),
7088
7088
  sourcePath: sourceFile.getFilePath(),
7089
7089
  framework: isNext ? "next" : "react",
@@ -7127,7 +7127,7 @@ function extractFromSourceFile2(sourceFile, isNext, exclusions) {
7127
7127
  }
7128
7128
  const resolvedProps = [...mergedPropsByName.values()];
7129
7129
  const noUsefulTypes = resolvedProps.length === 0 || resolvedProps.every((p) => p.type === "any");
7130
- const finalProps = noUsefulTypes ? extractPropTypes(sourceFile, name) ?? resolvedProps : resolvedProps;
7130
+ const finalProps = noUsefulTypes ? extractPropTypes(sourceFile, name2) ?? resolvedProps : resolvedProps;
7131
7131
  const propsWithDefaults = finalProps.map((p) => {
7132
7132
  if (!defaults.has(p.name))
7133
7133
  return p;
@@ -7160,7 +7160,7 @@ function extractFromSourceFile2(sourceFile, isNext, exclusions) {
7160
7160
  const propsTypeName = firstParamTypeNode?.getText?.().trim();
7161
7161
  const propsTypeNameCapture = propsTypeName && /^[A-Za-z_$][\w$]*$/.test(propsTypeName) ? propsTypeName : void 0;
7162
7162
  components.push({
7163
- name,
7163
+ name: name2,
7164
7164
  source: sourceFile.getFilePath(),
7165
7165
  sourcePath: sourceFile.getFilePath(),
7166
7166
  framework: isNext ? "next" : "react",
@@ -7561,10 +7561,10 @@ async function extractVueTsxComponents(filePaths) {
7561
7561
  }
7562
7562
  function extractFromSourceFile3(sourceFile, exclusions) {
7563
7563
  const components = [];
7564
- for (const { name, declarations } of getRenderableExports(sourceFile, exclusions, {
7564
+ for (const { name: name2, declarations } of getRenderableExports(sourceFile, exclusions, {
7565
7565
  hookReason: "Vue composition hook names are not renderable components"
7566
7566
  })) {
7567
- const component = extractVueTsxComponent(declarations, name, sourceFile);
7567
+ const component = extractVueTsxComponent(declarations, name2, sourceFile);
7568
7568
  if (component) {
7569
7569
  components.push(component);
7570
7570
  }
@@ -7580,11 +7580,11 @@ function extractVueTsxComponent(declarations, exportName, sourceFile) {
7580
7580
  const resolved = resolveVueComponentOptions(declaration.getInitializer());
7581
7581
  if (!resolved)
7582
7582
  continue;
7583
- const name = extractVueGenericComponentName(resolved.options) ?? exportName;
7583
+ const name2 = extractVueGenericComponentName(resolved.options) ?? exportName;
7584
7584
  const props = extractVueGenericComponentProps(resolved.options);
7585
7585
  const slots = extractVueGenericComponentSlots(resolved.options, resolved.slotsTypeNode);
7586
7586
  return {
7587
- name,
7587
+ name: name2,
7588
7588
  source: sourceFile.getFilePath(),
7589
7589
  framework: "vue",
7590
7590
  props,
@@ -7758,16 +7758,16 @@ function extractVueObjectPropDefinition(propName, initializer) {
7758
7758
  for (const property of initializer.getProperties()) {
7759
7759
  if (!Node5.isPropertyAssignment(property))
7760
7760
  continue;
7761
- const name = property.getName();
7761
+ const name2 = property.getName();
7762
7762
  const value = property.getInitializer();
7763
7763
  if (!value)
7764
7764
  continue;
7765
- if (name === "type") {
7765
+ if (name2 === "type") {
7766
7766
  type = getVuePropTypeText(value);
7767
7767
  allowedValues = extractAllowedValues(value.getType());
7768
- } else if (name === "required") {
7768
+ } else if (name2 === "required") {
7769
7769
  required = value.getText() === "true";
7770
- } else if (name === "default") {
7770
+ } else if (name2 === "default") {
7771
7771
  defaultValue = value.getText();
7772
7772
  }
7773
7773
  }
@@ -8063,20 +8063,20 @@ async function extractVueComponents(filePaths, onProgress) {
8063
8063
  async function extractFromVueSFC(filePath, source) {
8064
8064
  const { descriptor, errors } = parseSFC(source);
8065
8065
  const fileWarnings = errors.map((e) => `Parse error in ${filePath}: ${e instanceof Error ? e.message : String(e)}`);
8066
- const name = getVueComponentName(filePath);
8066
+ const name2 = getVueComponentName(filePath);
8067
8067
  let props = [];
8068
8068
  const setupProps = descriptor.scriptSetup ? await extractSetupProps(filePath, descriptor.scriptSetup.content) : null;
8069
8069
  if (setupProps !== null) {
8070
8070
  props = setupProps;
8071
8071
  } else if (descriptor.script) {
8072
- return extractOptionsComponent(filePath, descriptor.script.content, fileWarnings, name, descriptor.template?.ast, source);
8072
+ return extractOptionsComponent(filePath, descriptor.script.content, fileWarnings, name2, descriptor.template?.ast, source);
8073
8073
  }
8074
8074
  let slots = descriptor.template?.ast ? extractSlotsFromTemplate(descriptor.template.ast) : [];
8075
8075
  const runtimeSlots = extractSlotsFromRuntimeAccess(source);
8076
8076
  slots = mergeSlotsDedup(slots, runtimeSlots);
8077
8077
  return {
8078
8078
  component: {
8079
- name,
8079
+ name: name2,
8080
8080
  source: filePath,
8081
8081
  sourcePath: filePath,
8082
8082
  framework: "vue",
@@ -8094,7 +8094,7 @@ function getVueComponentName(filePath) {
8094
8094
  const parentDirName = basename(dirname6(filePath));
8095
8095
  return parentDirName || fileName;
8096
8096
  }
8097
- async function extractOptionsComponent(filePath, scriptContent, fileWarnings, name, templateAst, sfcSource) {
8097
+ async function extractOptionsComponent(filePath, scriptContent, fileWarnings, name2, templateAst, sfcSource) {
8098
8098
  const props = await extractOptionsProps(filePath, scriptContent);
8099
8099
  let slots = templateAst ? extractSlotsFromTemplate(templateAst) : [];
8100
8100
  if (sfcSource) {
@@ -8103,7 +8103,7 @@ async function extractOptionsComponent(filePath, scriptContent, fileWarnings, na
8103
8103
  }
8104
8104
  return {
8105
8105
  component: {
8106
- name,
8106
+ name: name2,
8107
8107
  source: filePath,
8108
8108
  sourcePath: filePath,
8109
8109
  framework: "vue",
@@ -8176,13 +8176,13 @@ function extractGenericProps(typeText) {
8176
8176
  const resolved = resolveTypeProperty(property);
8177
8177
  if (!resolved)
8178
8178
  continue;
8179
- const { name, typeText: resolvedTypeText, required } = resolved;
8179
+ const { name: name2, typeText: resolvedTypeText, required } = resolved;
8180
8180
  let typeText2 = resolvedTypeText;
8181
8181
  if (!required) {
8182
8182
  typeText2 = typeText2.replace(/\s*\|\s*undefined$/, "").replace(/^undefined\s*\|\s*/, "");
8183
8183
  }
8184
8184
  props.push({
8185
- name,
8185
+ name: name2,
8186
8186
  type: typeText2,
8187
8187
  required
8188
8188
  });
@@ -8478,14 +8478,14 @@ function parseObjectProps(obj) {
8478
8478
  for (const prop of obj.getProperties()) {
8479
8479
  if (!Node6.isPropertyAssignment(prop))
8480
8480
  continue;
8481
- const name = prop.getName();
8482
- if (!isPublicVuePropName(name))
8481
+ const name2 = prop.getName();
8482
+ if (!isPublicVuePropName(name2))
8483
8483
  continue;
8484
8484
  const init = prop.getInitializer();
8485
8485
  if (!init || !Node6.isObjectLiteralExpression(init)) {
8486
8486
  const initText = init?.getText() ?? "any";
8487
8487
  result.push({
8488
- name,
8488
+ name: name2,
8489
8489
  type: VUE_TYPE_MAP[initText] ?? "any",
8490
8490
  required: false,
8491
8491
  sourceStartLine: prop.getStartLineNumber(),
@@ -8518,7 +8518,7 @@ function parseObjectProps(obj) {
8518
8518
  }
8519
8519
  }
8520
8520
  result.push({
8521
- name,
8521
+ name: name2,
8522
8522
  type,
8523
8523
  required,
8524
8524
  ...defaultValue !== void 0 && { defaultValue },
@@ -8528,8 +8528,8 @@ function parseObjectProps(obj) {
8528
8528
  }
8529
8529
  return result;
8530
8530
  }
8531
- function isPublicVuePropName(name) {
8532
- return !/^[_$]/.test(name);
8531
+ function isPublicVuePropName(name2) {
8532
+ return !/^[_$]/.test(name2);
8533
8533
  }
8534
8534
  function extractSlotsFromTemplate(ast) {
8535
8535
  const slots = [];
@@ -8561,10 +8561,10 @@ function extractSlotsFromRuntimeAccess(source) {
8561
8561
  for (const pattern of [dotPattern, bracketPattern]) {
8562
8562
  let match2;
8563
8563
  while ((match2 = pattern.exec(source)) !== null) {
8564
- const name = match2[1];
8565
- if (!seen.has(name)) {
8566
- seen.add(name);
8567
- slots.push({ name, isDefault: name === "default" });
8564
+ const name2 = match2[1];
8565
+ if (!seen.has(name2)) {
8566
+ seen.add(name2);
8567
+ slots.push({ name: name2, isDefault: name2 === "default" });
8568
8568
  }
8569
8569
  }
8570
8570
  }
@@ -8696,12 +8696,12 @@ function extractPropsFromFrontmatter(frontmatter) {
8696
8696
  const propsTypeAlias = sf.getTypeAlias("Props");
8697
8697
  if (propsInterface) {
8698
8698
  for (const member of propsInterface.getProperties()) {
8699
- const name = member.getName();
8699
+ const name2 = member.getName();
8700
8700
  const typeText = member.getTypeNode()?.getText() ?? "any";
8701
8701
  const required = !member.hasQuestionToken();
8702
8702
  const allowedValues = extractAllowedValues3(typeText);
8703
8703
  props.push({
8704
- name,
8704
+ name: name2,
8705
8705
  type: typeText,
8706
8706
  required,
8707
8707
  ...allowedValues && { allowedValues },
@@ -8715,10 +8715,10 @@ function extractPropsFromFrontmatter(frontmatter) {
8715
8715
  const resolved = resolveTypeProperty(property);
8716
8716
  if (!resolved)
8717
8717
  continue;
8718
- const { name, declaration: decl, typeText, required } = resolved;
8718
+ const { name: name2, declaration: decl, typeText, required } = resolved;
8719
8719
  const allowedValues = extractAllowedValues3(typeText);
8720
8720
  props.push({
8721
- name,
8721
+ name: name2,
8722
8722
  type: typeText,
8723
8723
  required,
8724
8724
  ...allowedValues && { allowedValues },
@@ -8784,7 +8784,7 @@ function mergeSlots(...slotGroups) {
8784
8784
  return merged;
8785
8785
  }
8786
8786
  function extractFromAstroFile(filePath, source) {
8787
- const name = basename2(filePath, ".astro");
8787
+ const name2 = basename2(filePath, ".astro");
8788
8788
  const fenceIndex = source.startsWith("---") ? 0 : -1;
8789
8789
  let frontmatter = "";
8790
8790
  let template = source;
@@ -8803,7 +8803,7 @@ function extractFromAstroFile(filePath, source) {
8803
8803
  });
8804
8804
  const slots = mergeSlots(extractSlotsFromTemplate2(template), extractSlotsFromFrontmatter(frontmatter));
8805
8805
  return {
8806
- name,
8806
+ name: name2,
8807
8807
  source: filePath,
8808
8808
  sourcePath: filePath,
8809
8809
  framework: "astro",
@@ -9023,10 +9023,10 @@ function extractSlotsFromTemplate3(templateContent) {
9023
9023
  for (const match2 of templateContent.matchAll(slotRegex)) {
9024
9024
  const attrs = match2[1] ?? "";
9025
9025
  const nameMatch = attrs.match(/\bname=["']([^"']+)["']/);
9026
- const name = nameMatch?.[1] ?? "default";
9027
- slots.set(name, name === "default");
9026
+ const name2 = nameMatch?.[1] ?? "default";
9027
+ slots.set(name2, name2 === "default");
9028
9028
  }
9029
- return [...slots.entries()].map(([name, isDefault]) => ({ name, isDefault })).sort((a, b) => a.name.localeCompare(b.name));
9029
+ return [...slots.entries()].map(([name2, isDefault]) => ({ name: name2, isDefault })).sort((a, b) => a.name.localeCompare(b.name));
9030
9030
  }
9031
9031
  function mergeSlotLists(...slotLists) {
9032
9032
  const merged = /* @__PURE__ */ new Map();
@@ -9055,20 +9055,20 @@ function extractJsDocSlots(classDecl) {
9055
9055
  const comment = tag.getCommentText()?.trim();
9056
9056
  if (!comment)
9057
9057
  continue;
9058
- let name = "default";
9058
+ let name2 = "default";
9059
9059
  let description = comment;
9060
9060
  if (comment.startsWith("-")) {
9061
9061
  description = comment.slice(1).trim();
9062
9062
  } else {
9063
9063
  const match2 = comment.match(/^(\S+)\s*-\s*(.*)$/s);
9064
9064
  if (match2) {
9065
- name = match2[1];
9065
+ name2 = match2[1];
9066
9066
  description = match2[2].trim();
9067
9067
  }
9068
9068
  }
9069
9069
  slots.push({
9070
- name,
9071
- isDefault: name === "default",
9070
+ name: name2,
9071
+ isDefault: name2 === "default",
9072
9072
  ...description && { description }
9073
9073
  });
9074
9074
  }
@@ -9111,8 +9111,8 @@ function isNonPublicLitMember(member) {
9111
9111
  function hasShoelaceRuntimeBookkeepingField(classDecl) {
9112
9112
  return classDecl.getProperties().some((property) => property.getName() === "initialReflectedProperties");
9113
9113
  }
9114
- function isInternalRuntimeField(name, applyRuntimeFieldDenylist) {
9115
- return applyRuntimeFieldDenylist && INTERNAL_RUNTIME_FIELD_NAMES.has(name);
9114
+ function isInternalRuntimeField(name2, applyRuntimeFieldDenylist) {
9115
+ return applyRuntimeFieldDenylist && INTERNAL_RUNTIME_FIELD_NAMES.has(name2);
9116
9116
  }
9117
9117
  function getExplicitLitPropertyAttributeName(property) {
9118
9118
  const decorator = property.getDecorators().find((candidate) => candidate.getName() === "property");
@@ -9139,8 +9139,8 @@ function extractClassProperties(classDecl, applyRuntimeFieldDenylist = false) {
9139
9139
  continue;
9140
9140
  if (isNonPublicLitMember(property))
9141
9141
  continue;
9142
- const name = property.getName();
9143
- if (name.startsWith("#") || isInternalRuntimeField(name, applyRuntimeFieldDenylist))
9142
+ const name2 = property.getName();
9143
+ if (name2.startsWith("#") || isInternalRuntimeField(name2, applyRuntimeFieldDenylist))
9144
9144
  continue;
9145
9145
  const scope = property.getScope();
9146
9146
  if (scope === "private" || scope === "protected")
@@ -9155,7 +9155,7 @@ function extractClassProperties(classDecl, applyRuntimeFieldDenylist = false) {
9155
9155
  }
9156
9156
  const typeNode = property.getTypeNode();
9157
9157
  const type = typeNode ? typeNode.getText() : "any";
9158
- const publicName = name.startsWith("_") && hasDecorators ? getExplicitLitPropertyAttributeName(property) : null;
9158
+ const publicName = name2.startsWith("_") && hasDecorators ? getExplicitLitPropertyAttributeName(property) : null;
9159
9159
  let defaultValue;
9160
9160
  if (initializer) {
9161
9161
  if (Node8.isStringLiteral(initializer)) {
@@ -9165,7 +9165,7 @@ function extractClassProperties(classDecl, applyRuntimeFieldDenylist = false) {
9165
9165
  }
9166
9166
  }
9167
9167
  props.push({
9168
- name: publicName ? kebabToCamel(publicName) : name,
9168
+ name: publicName ? kebabToCamel(publicName) : name2,
9169
9169
  type,
9170
9170
  required: false,
9171
9171
  ...defaultValue !== void 0 && { defaultValue },
@@ -9185,15 +9185,15 @@ function extractAccessorProperties(classDecl, applyRuntimeFieldDenylist = false)
9185
9185
  continue;
9186
9186
  if (isNonPublicLitMember(getter))
9187
9187
  continue;
9188
- const name = getter.getName();
9189
- if (name === "observedAttributes" || name === "template" || name.startsWith("#") || isInternalRuntimeField(name, applyRuntimeFieldDenylist))
9188
+ const name2 = getter.getName();
9189
+ if (name2 === "observedAttributes" || name2 === "template" || name2.startsWith("#") || isInternalRuntimeField(name2, applyRuntimeFieldDenylist))
9190
9190
  continue;
9191
9191
  const scope = getter.getScope();
9192
9192
  if (scope === "private" || scope === "protected")
9193
9193
  continue;
9194
- const entry = accessors.get(name) ?? {};
9194
+ const entry = accessors.get(name2) ?? {};
9195
9195
  entry.getter = getter;
9196
- accessors.set(name, entry);
9196
+ accessors.set(name2, entry);
9197
9197
  }
9198
9198
  for (const setter of classDecl.getSetAccessors()) {
9199
9199
  if (setter.isStatic())
@@ -9202,24 +9202,24 @@ function extractAccessorProperties(classDecl, applyRuntimeFieldDenylist = false)
9202
9202
  continue;
9203
9203
  if (isNonPublicLitMember(setter))
9204
9204
  continue;
9205
- const name = setter.getName();
9206
- if (name === "observedAttributes" || name === "template" || name.startsWith("#") || isInternalRuntimeField(name, applyRuntimeFieldDenylist))
9205
+ const name2 = setter.getName();
9206
+ if (name2 === "observedAttributes" || name2 === "template" || name2.startsWith("#") || isInternalRuntimeField(name2, applyRuntimeFieldDenylist))
9207
9207
  continue;
9208
9208
  const scope = setter.getScope();
9209
9209
  if (scope === "private" || scope === "protected")
9210
9210
  continue;
9211
- const entry = accessors.get(name) ?? {};
9211
+ const entry = accessors.get(name2) ?? {};
9212
9212
  entry.setter = setter;
9213
- accessors.set(name, entry);
9213
+ accessors.set(name2, entry);
9214
9214
  }
9215
- for (const [name, { getter, setter }] of accessors) {
9215
+ for (const [name2, { getter, setter }] of accessors) {
9216
9216
  const hasPropertyDecorator = getter?.getDecorators().some((decorator) => decorator.getName() === "property") || setter?.getDecorators().some((decorator) => decorator.getName() === "property");
9217
9217
  if (!hasPropertyDecorator && !(getter && setter))
9218
9218
  continue;
9219
9219
  const type = getter?.getReturnTypeNode()?.getText() ?? setter?.getParameters()[0]?.getTypeNode()?.getText() ?? "any";
9220
9220
  const accessorNode = getter ?? setter;
9221
9221
  props.push({
9222
- name,
9222
+ name: name2,
9223
9223
  type,
9224
9224
  required: false,
9225
9225
  ...accessorNode ? {
@@ -9241,11 +9241,11 @@ function extractJsDocAttributeProps(classDecl) {
9241
9241
  const match2 = normalizedComment?.match(/(?:\{([^}]+)\}\s+)?([^\s]+)(?:\s*-\s*([\s\S]*))?/);
9242
9242
  if (!match2)
9243
9243
  continue;
9244
- const [, type, name, description] = match2;
9245
- if (!name || name.startsWith("#"))
9244
+ const [, type, name2, description] = match2;
9245
+ if (!name2 || name2.startsWith("#"))
9246
9246
  continue;
9247
9247
  props.push({
9248
- name,
9248
+ name: name2,
9249
9249
  type: type?.trim() || "any",
9250
9250
  required: false,
9251
9251
  ...description ? { description: description.replace(/\s+/g, " ").trim() } : {}
@@ -9597,7 +9597,7 @@ function extractFromSourceFile4(sourceFile, project) {
9597
9597
  const tagName = tagNameMap.get(className) ?? siblingDefinedTagName ?? decoratorTagName ?? jsDocTagName ?? fastDefinitionTagName ?? void 0;
9598
9598
  if (!tagName)
9599
9599
  continue;
9600
- const name = chooseComponentName(classDecl, className, tagName);
9600
+ const name2 = chooseComponentName(classDecl, className, tagName);
9601
9601
  const observedAttrs = extractObservedAttributes(classDecl);
9602
9602
  const inheritedProps = extractInheritedClassProperties(classDecl, project);
9603
9603
  const classProps = mergePropLists(extractJsDocAttributeProps(classDecl), extractAccessorProperties(classDecl), extractClassProperties(classDecl));
@@ -9605,7 +9605,7 @@ function extractFromSourceFile4(sourceFile, project) {
9605
9605
  const templateContent = extractTemplateContent(classDecl, project);
9606
9606
  const slots = mergeSlotLists(extractInheritedSlots(classDecl, project), extractJsDocSlots(classDecl), extractSlotsFromTemplate3(templateContent), extractFastTemplateSlots(classDecl, project));
9607
9607
  components.push({
9608
- name,
9608
+ name: name2,
9609
9609
  source: sourceFile.getFilePath(),
9610
9610
  sourcePath: sourceFile.getFilePath(),
9611
9611
  framework: "web-component",
@@ -9931,8 +9931,8 @@ async function retryComponentWithProject(component, ctx, project, warnings) {
9931
9931
  }
9932
9932
  function addImportedDeclarationsToProject(project, ctx) {
9933
9933
  const importedNames = collectReferencedTypeNames(ctx.annotation);
9934
- for (const name of [...importedNames]) {
9935
- const localDecl = findLocalTypeDeclaration(ctx.instance, name, ctx.moduleScript) ?? (ctx.moduleScript ? findLocalTypeDeclaration(ctx.moduleScript, name, ctx.instance) : null);
9934
+ for (const name2 of [...importedNames]) {
9935
+ const localDecl = findLocalTypeDeclaration(ctx.instance, name2, ctx.moduleScript) ?? (ctx.moduleScript ? findLocalTypeDeclaration(ctx.moduleScript, name2, ctx.instance) : null);
9936
9936
  if (localDecl) {
9937
9937
  for (const referenced of collectReferencedTypeNames(localDecl))
9938
9938
  importedNames.add(referenced);
@@ -10113,21 +10113,21 @@ function collapseUnresolvedTypeWarnings(warnings) {
10113
10113
  }
10114
10114
  async function extractFromSvelteFile(filePath, source) {
10115
10115
  const warnings = [];
10116
- const name = getSvelteComponentName(filePath);
10116
+ const name2 = getSvelteComponentName(filePath);
10117
10117
  let ast;
10118
10118
  try {
10119
10119
  ast = parseSvelte(source, { modern: true });
10120
10120
  } catch (e) {
10121
10121
  return {
10122
10122
  component: null,
10123
- warnings: [`${name}: parse error in ${filePath}: ${e instanceof Error ? e.message : String(e)}`]
10123
+ warnings: [`${name2}: parse error in ${filePath}: ${e instanceof Error ? e.message : String(e)}`]
10124
10124
  };
10125
10125
  }
10126
10126
  const instance = ast["instance"];
10127
10127
  const moduleScript = ast["module"];
10128
10128
  const fragment = ast["fragment"];
10129
10129
  if (instance && hasV4ExportLetProps(instance)) {
10130
- warnings.push(`${name}: Svelte 4 export let syntax not yet supported (${filePath}); see INTEG-4267 for v5-only scope and follow-up`);
10130
+ warnings.push(`${name2}: Svelte 4 export let syntax not yet supported (${filePath}); see INTEG-4267 for v5-only scope and follow-up`);
10131
10131
  return { component: null, warnings };
10132
10132
  }
10133
10133
  const propsCall = instance ? findPropsCall(instance) : null;
@@ -10142,7 +10142,7 @@ async function extractFromSvelteFile(filePath, source) {
10142
10142
  instance,
10143
10143
  moduleScript,
10144
10144
  filePath,
10145
- componentName: name,
10145
+ componentName: name2,
10146
10146
  source,
10147
10147
  snippetLocals
10148
10148
  });
@@ -10154,12 +10154,12 @@ async function extractFromSvelteFile(filePath, source) {
10154
10154
  extractionReasons.push(...result.additionalReasons);
10155
10155
  } else if (instance) {
10156
10156
  } else {
10157
- warnings.push(`${name}: no instance script block (${filePath}); no props extracted`);
10157
+ warnings.push(`${name2}: no instance script block (${filePath}); no props extracted`);
10158
10158
  }
10159
10159
  const templateSlots = fragment ? extractTemplateSlots(fragment) : [];
10160
10160
  const { slots, mixedWarning } = mergeSlots2(snippetSlotsFromProps, templateSlots);
10161
10161
  if (mixedWarning) {
10162
- warnings.push(`${name}: mixed Snippet and <slot> usage detected (${filePath}); preferring Snippet entries`);
10162
+ warnings.push(`${name2}: mixed Snippet and <slot> usage detected (${filePath}); preferring Snippet entries`);
10163
10163
  }
10164
10164
  let propsTypeNameCapture;
10165
10165
  if (propsCall) {
@@ -10172,7 +10172,7 @@ async function extractFromSvelteFile(filePath, source) {
10172
10172
  }
10173
10173
  }
10174
10174
  const component = {
10175
- name,
10175
+ name: name2,
10176
10176
  source: filePath,
10177
10177
  framework: "svelte",
10178
10178
  props,
@@ -10198,7 +10198,7 @@ async function extractFromSvelteFile(filePath, source) {
10198
10198
  instance,
10199
10199
  moduleScript,
10200
10200
  annotation,
10201
- componentName: name
10201
+ componentName: name2
10202
10202
  };
10203
10203
  }
10204
10204
  }
@@ -10340,8 +10340,8 @@ function describeAnnotationForUser(annotation) {
10340
10340
  if (!annotation)
10341
10341
  return "<unknown>";
10342
10342
  if (annotation.type === "TSTypeReference") {
10343
- const name = annotation["typeName"]?.["name"] ?? null;
10344
- return name ? `'${name}'` : "<unnamed reference>";
10343
+ const name2 = annotation["typeName"]?.["name"] ?? null;
10344
+ return name2 ? `'${name2}'` : "<unnamed reference>";
10345
10345
  }
10346
10346
  if (annotation.type === "TSIntersectionType")
10347
10347
  return "<intersection>";
@@ -10416,7 +10416,7 @@ async function resolveViaTypeChecker(annotation, instance, moduleScript, filePat
10416
10416
  return null;
10417
10417
  const members = [];
10418
10418
  for (const symbol of properties) {
10419
- const name = symbol.getName();
10419
+ const name2 = symbol.getName();
10420
10420
  const declaration = symbol.getValueDeclaration() ?? symbol.getDeclarations()[0];
10421
10421
  if (!declaration)
10422
10422
  continue;
@@ -10431,7 +10431,7 @@ async function resolveViaTypeChecker(annotation, instance, moduleScript, filePat
10431
10431
  const declaredTypeText = readDeclaredTypeNodeText(declaration);
10432
10432
  const isSnippet = declaredTypeText !== null && isSnippetTypeText(declaredTypeText, snippetLocals) || typeRefersToSnippet(propType) || isSnippetTypeText(typeText, snippetLocals);
10433
10433
  members.push({
10434
- name,
10434
+ name: name2,
10435
10435
  optional: optional5,
10436
10436
  typeText,
10437
10437
  ...declaredTypeText ? { declaredTypeText } : {},
@@ -10519,7 +10519,7 @@ function mergeSets(a, b) {
10519
10519
  out.add(v);
10520
10520
  return out;
10521
10521
  }
10522
- function findLocalTypeDeclaration(instance, name, module) {
10522
+ function findLocalTypeDeclaration(instance, name2, module) {
10523
10523
  for (const script of [instance, module]) {
10524
10524
  const body = script?.["content"]?.["body"];
10525
10525
  if (!body)
@@ -10528,7 +10528,7 @@ function findLocalTypeDeclaration(instance, name, module) {
10528
10528
  const decl = stmt.type === "ExportNamedDeclaration" ? stmt["declaration"] ?? stmt : stmt;
10529
10529
  if (decl.type === "TSInterfaceDeclaration" || decl.type === "TSTypeAliasDeclaration") {
10530
10530
  const id = decl["id"];
10531
- if (id?.["name"] === name)
10531
+ if (id?.["name"] === name2)
10532
10532
  return decl;
10533
10533
  }
10534
10534
  }
@@ -10549,8 +10549,8 @@ function readMembersFromInterfaceOrAlias(decl, snippetLocals) {
10549
10549
  }
10550
10550
  return [];
10551
10551
  }
10552
- function readMembersFromTypeLiteral(literal3, snippetLocals) {
10553
- const members = literal3["members"];
10552
+ function readMembersFromTypeLiteral(literal4, snippetLocals) {
10553
+ const members = literal4["members"];
10554
10554
  if (!members)
10555
10555
  return [];
10556
10556
  return members.map((m) => readPropertySignature(m, snippetLocals)).filter((m) => !!m);
@@ -10559,8 +10559,8 @@ function readPropertySignature(member, snippetLocals) {
10559
10559
  if (member.type !== "TSPropertySignature")
10560
10560
  return null;
10561
10561
  const key = member["key"];
10562
- const name = key?.["name"] ?? null;
10563
- if (!name)
10562
+ const name2 = key?.["name"] ?? null;
10563
+ if (!name2)
10564
10564
  return null;
10565
10565
  const optional5 = !!member["optional"];
10566
10566
  const typeNode = member["typeAnnotation"]?.["typeAnnotation"];
@@ -10570,7 +10570,7 @@ function readPropertySignature(member, snippetLocals) {
10570
10570
  const leading = member["leadingComments"] ?? [];
10571
10571
  const description = extractJsdocText(leading);
10572
10572
  return {
10573
- name,
10573
+ name: name2,
10574
10574
  optional: optional5,
10575
10575
  typeText,
10576
10576
  isSnippet,
@@ -10709,19 +10709,19 @@ function extractFromDestructure(propsCall, _ctx, typeMembers, warnings, addition
10709
10709
  if (p.type !== "Property")
10710
10710
  continue;
10711
10711
  const key = p["key"];
10712
- const name = key?.["name"] ?? null;
10713
- if (!name)
10712
+ const name2 = key?.["name"] ?? null;
10713
+ if (!name2)
10714
10714
  continue;
10715
- seenInDestructure.add(name);
10715
+ seenInDestructure.add(name2);
10716
10716
  const value = p["value"];
10717
10717
  const hasDefault = value?.type === "AssignmentPattern";
10718
10718
  const defaultValueRaw = hasDefault ? renderLiteral(value["right"]) : void 0;
10719
- const typeMember = typeByName.get(name);
10719
+ const typeMember = typeByName.get(name2);
10720
10720
  if (typeMember?.isSnippet) {
10721
- snippetNames.add(name);
10721
+ snippetNames.add(name2);
10722
10722
  const slot = {
10723
- name,
10724
- isDefault: name === "children",
10723
+ name: name2,
10724
+ isDefault: name2 === "children",
10725
10725
  ...typeMember.description ? { description: typeMember.description } : {}
10726
10726
  };
10727
10727
  const authorText = typeMember.declaredTypeText ?? typeMember.typeText;
@@ -10732,7 +10732,7 @@ function extractFromDestructure(propsCall, _ctx, typeMembers, warnings, addition
10732
10732
  }
10733
10733
  const required = typeMember ? !typeMember.optional && !hasDefault : !hasDefault;
10734
10734
  const propDef = {
10735
- name,
10735
+ name: name2,
10736
10736
  type: typeMember?.typeText ?? "unknown",
10737
10737
  required
10738
10738
  };
@@ -10790,9 +10790,9 @@ function propertyOrder(properties) {
10790
10790
  for (const p of properties) {
10791
10791
  if (p.type !== "Property")
10792
10792
  continue;
10793
- const name = p["key"]?.["name"] ?? null;
10794
- if (name)
10795
- m.set(name, i++);
10793
+ const name2 = p["key"]?.["name"] ?? null;
10794
+ if (name2)
10795
+ m.set(name2, i++);
10796
10796
  }
10797
10797
  return m;
10798
10798
  }
@@ -10971,10 +10971,10 @@ function extractTemplateSlots(fragment) {
10971
10971
  if (!node)
10972
10972
  return;
10973
10973
  if (node.type === "SlotElement") {
10974
- const name = readSlotName(node);
10975
- if (!seen.has(name)) {
10976
- seen.add(name);
10977
- slots.push({ name, isDefault: name === "default" });
10974
+ const name2 = readSlotName(node);
10975
+ if (!seen.has(name2)) {
10976
+ seen.add(name2);
10977
+ slots.push({ name: name2, isDefault: name2 === "default" });
10978
10978
  }
10979
10979
  }
10980
10980
  const children = node["nodes"] ?? node["children"] ?? [];
@@ -11188,9 +11188,9 @@ function extractDecoratorInput(field) {
11188
11188
  }
11189
11189
  const resolved = resolvePropType(typeNode);
11190
11190
  const typeText = transformIsBoolean ? "boolean" : transformIsNumber ? "number" : resolved.text;
11191
- const name = alias ?? fieldName;
11191
+ const name2 = alias ?? fieldName;
11192
11192
  const prop = {
11193
- name,
11193
+ name: name2,
11194
11194
  type: typeText,
11195
11195
  required,
11196
11196
  sourceStartLine: field.getStartLineNumber(),
@@ -11266,9 +11266,9 @@ function extractSignalInput(field) {
11266
11266
  const typeArg = init.getTypeArguments()[0];
11267
11267
  const resolved = resolvePropType(typeArg);
11268
11268
  const typeText = transformIsBoolean ? "boolean" : transformIsNumber ? "number" : resolved.text;
11269
- const name = alias ?? fieldName;
11269
+ const name2 = alias ?? fieldName;
11270
11270
  const prop = {
11271
- name,
11271
+ name: name2,
11272
11272
  type: typeText,
11273
11273
  required,
11274
11274
  sourceStartLine: field.getStartLineNumber(),
@@ -11361,10 +11361,10 @@ function extractProps2(cls, meta) {
11361
11361
  const parsed = parseInputsArrayEntry(entry);
11362
11362
  if (!parsed)
11363
11363
  continue;
11364
- const name = parsed.alias ?? parsed.fieldName;
11365
- if (byName.has(name))
11364
+ const name2 = parsed.alias ?? parsed.fieldName;
11365
+ if (byName.has(name2))
11366
11366
  continue;
11367
- byName.set(name, { name, type: "any", required: false });
11367
+ byName.set(name2, { name: name2, type: "any", required: false });
11368
11368
  }
11369
11369
  return [...byName.values()];
11370
11370
  }
@@ -11513,16 +11513,16 @@ var init_resolve_template_source = __esm({
11513
11513
  });
11514
11514
 
11515
11515
  // packages/experience-design-system-backend-pipeline/dist/src/steps/extraction/src/framework-adapters/angular/helpers/resolution/strip-library-prefix.js
11516
- function stripLibraryPrefix(name) {
11516
+ function stripLibraryPrefix(name2) {
11517
11517
  for (const prefix of KNOWN_PREFIXES) {
11518
- if (name.startsWith(prefix) && name.length > prefix.length) {
11519
- const rest = name.slice(prefix.length);
11518
+ if (name2.startsWith(prefix) && name2.length > prefix.length) {
11519
+ const rest = name2.slice(prefix.length);
11520
11520
  if (rest[0] && rest[0] === rest[0].toUpperCase()) {
11521
11521
  return rest;
11522
11522
  }
11523
11523
  }
11524
11524
  }
11525
- return name;
11525
+ return name2;
11526
11526
  }
11527
11527
  var KNOWN_PREFIXES;
11528
11528
  var init_strip_library_prefix = __esm({
@@ -11603,8 +11603,8 @@ function extractContentChildQueries(cls) {
11603
11603
  if (init && Node15.isCallExpression(init)) {
11604
11604
  const callee = init.getExpression();
11605
11605
  if (Node15.isIdentifier(callee)) {
11606
- const name = callee.getText();
11607
- if (name === "contentChild" || name === "contentChildren") {
11606
+ const name2 = callee.getText();
11607
+ if (name2 === "contentChild" || name2 === "contentChildren") {
11608
11608
  const first = init.getArguments()[0];
11609
11609
  const allowed = resolveClassIdentifierArg(first);
11610
11610
  out.push(buildSlot(fieldName, allowed));
@@ -11633,9 +11633,9 @@ function resolveClassIdentifierArg(arg) {
11633
11633
  return [arg.getText()];
11634
11634
  return [];
11635
11635
  }
11636
- function buildSlot(name, allowed) {
11636
+ function buildSlot(name2, allowed) {
11637
11637
  const slot = {
11638
- name,
11638
+ name: name2,
11639
11639
  isDefault: false
11640
11640
  };
11641
11641
  if (allowed.length > 0)
@@ -11679,11 +11679,11 @@ async function extractSlots3(cls, meta, props) {
11679
11679
  const template = await resolveTemplateSource(meta);
11680
11680
  if (template) {
11681
11681
  for (const el of parseNgContentElements(template)) {
11682
- const name = deriveSlotName(el.rawSelect, meta.normalizedName);
11683
- if (byName.has(name))
11682
+ const name2 = deriveSlotName(el.rawSelect, meta.normalizedName);
11683
+ if (byName.has(name2))
11684
11684
  continue;
11685
- byName.set(name, {
11686
- name,
11685
+ byName.set(name2, {
11686
+ name: name2,
11687
11687
  isDefault: el.rawSelect === null
11688
11688
  });
11689
11689
  }
@@ -11777,9 +11777,9 @@ function normalizeSlots(slots) {
11777
11777
  return slots.map((slot) => {
11778
11778
  if (slot.name.trim())
11779
11779
  return slot;
11780
- const name = fallbackIndex === 0 ? "children" : `slot_${fallbackIndex}`;
11780
+ const name2 = fallbackIndex === 0 ? "children" : `slot_${fallbackIndex}`;
11781
11781
  fallbackIndex++;
11782
- return { ...slot, name };
11782
+ return { ...slot, name: name2 };
11783
11783
  });
11784
11784
  }
11785
11785
  var init_extract_angular_components = __esm({
@@ -12596,8 +12596,8 @@ var init_composition_cache_key = __esm({
12596
12596
 
12597
12597
  // packages/experience-design-system-backend-pipeline/dist/src/steps/composition/src/helpers/edges/manifest-doc-evidence.js
12598
12598
  import { dirname as dirname11 } from "node:path";
12599
- function kebabToPascal3(name) {
12600
- return name.split("-").filter(Boolean).map((seg) => seg.charAt(0).toUpperCase() + seg.slice(1)).join("");
12599
+ function kebabToPascal3(name2) {
12600
+ return name2.split("-").filter(Boolean).map((seg) => seg.charAt(0).toUpperCase() + seg.slice(1)).join("");
12601
12601
  }
12602
12602
  function collectManifestEdges(files, componentNames) {
12603
12603
  const edges = [];
@@ -13293,9 +13293,9 @@ var init_validate3 = __esm({
13293
13293
 
13294
13294
  // packages/experience-design-system-backend-pipeline/dist/src/persistence/src/review-session/helpers/create-component-id.js
13295
13295
  import { createHash as createHash7 } from "node:crypto";
13296
- function createComponentId(name, resolvedSourcePath) {
13297
- const sourceHash = createHash7("sha256").update(`${name}:${resolvedSourcePath}`).digest("hex").slice(0, 12);
13298
- return `${name}-${sourceHash}`;
13296
+ function createComponentId(name2, resolvedSourcePath) {
13297
+ const sourceHash = createHash7("sha256").update(`${name2}:${resolvedSourcePath}`).digest("hex").slice(0, 12);
13298
+ return `${name2}-${sourceHash}`;
13299
13299
  }
13300
13300
  var init_create_component_id = __esm({
13301
13301
  "packages/experience-design-system-backend-pipeline/dist/src/persistence/src/review-session/helpers/create-component-id.js"() {
@@ -13673,10 +13673,10 @@ var init_file_categories = __esm({
13673
13673
 
13674
13674
  // packages/experience-design-system-backend-pipeline/dist/src/persistence/src/helpers/collect-files/categorize-file.js
13675
13675
  import path from "node:path";
13676
- function categorizeFile(name) {
13677
- if (name.endsWith(".d.ts"))
13676
+ function categorizeFile(name2) {
13677
+ if (name2.endsWith(".d.ts"))
13678
13678
  return "other";
13679
- const ext = path.extname(name);
13679
+ const ext = path.extname(name2);
13680
13680
  return CATEGORY_BY_EXTENSION[ext] ?? "other";
13681
13681
  }
13682
13682
  var init_categorize_file = __esm({
@@ -13687,8 +13687,8 @@ var init_categorize_file = __esm({
13687
13687
  });
13688
13688
 
13689
13689
  // packages/experience-design-system-backend-pipeline/dist/src/persistence/src/helpers/collect-files/is-noise-config-file.js
13690
- function isNoiseConfigFile(name) {
13691
- return DENYLISTED_EXACT_FILE_NAMES.has(name) || DENYLISTED_FILE_NAME_PATTERNS.some((pattern) => pattern.test(name));
13690
+ function isNoiseConfigFile(name2) {
13691
+ return DENYLISTED_EXACT_FILE_NAMES.has(name2) || DENYLISTED_FILE_NAME_PATTERNS.some((pattern) => pattern.test(name2));
13692
13692
  }
13693
13693
  var init_is_noise_config_file = __esm({
13694
13694
  "packages/experience-design-system-backend-pipeline/dist/src/persistence/src/helpers/collect-files/is-noise-config-file.js"() {
@@ -13699,15 +13699,15 @@ var init_is_noise_config_file = __esm({
13699
13699
 
13700
13700
  // packages/experience-design-system-backend-pipeline/dist/src/persistence/src/helpers/collect-files/is-source-file.js
13701
13701
  import path2 from "node:path";
13702
- function isSourceFile(name) {
13703
- if (name.endsWith(".d.ts"))
13702
+ function isSourceFile(name2) {
13703
+ if (name2.endsWith(".d.ts"))
13704
13704
  return false;
13705
- if (EXCLUDED_SUFFIXES.some((suffix) => name.endsWith(suffix)))
13705
+ if (EXCLUDED_SUFFIXES.some((suffix) => name2.endsWith(suffix)))
13706
13706
  return false;
13707
- const ext = path2.extname(name);
13707
+ const ext = path2.extname(name2);
13708
13708
  if (INCLUDED_EXTENSIONS.has(ext))
13709
13709
  return true;
13710
- if (DENYLIST_GATED_EXTENSIONS.has(ext) && !isNoiseConfigFile(name))
13710
+ if (DENYLIST_GATED_EXTENSIONS.has(ext) && !isNoiseConfigFile(name2))
13711
13711
  return true;
13712
13712
  return false;
13713
13713
  }
@@ -14023,7 +14023,7 @@ async function buildSourceFingerprint(opts) {
14023
14023
  const seen = /* @__PURE__ */ new Set();
14024
14024
  for (const row of rows) {
14025
14025
  const sourcePath = rowField(row, "source_path");
14026
- const name = rowField(row, "name");
14026
+ const name2 = rowField(row, "name");
14027
14027
  if (!sourcePath)
14028
14028
  continue;
14029
14029
  const abs = resolve17(sourcePath);
@@ -14033,8 +14033,8 @@ async function buildSourceFingerprint(opts) {
14033
14033
  try {
14034
14034
  const st = await stat(abs);
14035
14035
  const entry = { mtime: st.mtime.toISOString() };
14036
- if (name)
14037
- entry.componentName = name;
14036
+ if (name2)
14037
+ entry.componentName = name2;
14038
14038
  files[abs] = entry;
14039
14039
  } catch {
14040
14040
  }
@@ -14075,10 +14075,10 @@ import { access as access4 } from "node:fs/promises";
14075
14075
  import { join as join9 } from "node:path";
14076
14076
  async function listConflictingFiles(path5) {
14077
14077
  const conflicts = [];
14078
- for (const name of SAVE_FILES) {
14078
+ for (const name2 of SAVE_FILES) {
14079
14079
  try {
14080
- await access4(join9(path5, name));
14081
- conflicts.push(name);
14080
+ await access4(join9(path5, name2));
14081
+ conflicts.push(name2);
14082
14082
  } catch {
14083
14083
  }
14084
14084
  }
@@ -14584,18 +14584,18 @@ var init_pathSerializer_gen = __esm({
14584
14584
  return "&";
14585
14585
  }
14586
14586
  };
14587
- serializeArrayParam = ({ allowReserved, explode, name, style, value }) => {
14587
+ serializeArrayParam = ({ allowReserved, explode, name: name2, style, value }) => {
14588
14588
  if (!explode) {
14589
14589
  const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
14590
14590
  switch (style) {
14591
14591
  case "label":
14592
14592
  return `.${joinedValues2}`;
14593
14593
  case "matrix":
14594
- return `;${name}=${joinedValues2}`;
14594
+ return `;${name2}=${joinedValues2}`;
14595
14595
  case "simple":
14596
14596
  return joinedValues2;
14597
14597
  default:
14598
- return `${name}=${joinedValues2}`;
14598
+ return `${name2}=${joinedValues2}`;
14599
14599
  }
14600
14600
  }
14601
14601
  const separator = separatorArrayExplode(style);
@@ -14605,24 +14605,24 @@ var init_pathSerializer_gen = __esm({
14605
14605
  }
14606
14606
  return serializePrimitiveParam({
14607
14607
  allowReserved,
14608
- name,
14608
+ name: name2,
14609
14609
  value: v
14610
14610
  });
14611
14611
  }).join(separator);
14612
14612
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
14613
14613
  };
14614
- serializePrimitiveParam = ({ allowReserved, name, value }) => {
14614
+ serializePrimitiveParam = ({ allowReserved, name: name2, value }) => {
14615
14615
  if (value === void 0 || value === null) {
14616
14616
  return "";
14617
14617
  }
14618
14618
  if (typeof value === "object") {
14619
14619
  throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");
14620
14620
  }
14621
- return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
14621
+ return `${name2}=${allowReserved ? value : encodeURIComponent(value)}`;
14622
14622
  };
14623
- serializeObjectParam = ({ allowReserved, explode, name, style, value, valueOnly }) => {
14623
+ serializeObjectParam = ({ allowReserved, explode, name: name2, style, value, valueOnly }) => {
14624
14624
  if (value instanceof Date) {
14625
- return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
14625
+ return valueOnly ? value.toISOString() : `${name2}=${value.toISOString()}`;
14626
14626
  }
14627
14627
  if (style !== "deepObject" && !explode) {
14628
14628
  let values = [];
@@ -14636,11 +14636,11 @@ var init_pathSerializer_gen = __esm({
14636
14636
  const joinedValues2 = values.join(",");
14637
14637
  switch (style) {
14638
14638
  case "form":
14639
- return `${name}=${joinedValues2}`;
14639
+ return `${name2}=${joinedValues2}`;
14640
14640
  case "label":
14641
14641
  return `.${joinedValues2}`;
14642
14642
  case "matrix":
14643
- return `;${name}=${joinedValues2}`;
14643
+ return `;${name2}=${joinedValues2}`;
14644
14644
  default:
14645
14645
  return joinedValues2;
14646
14646
  }
@@ -14648,7 +14648,7 @@ var init_pathSerializer_gen = __esm({
14648
14648
  const separator = separatorObjectExplode(style);
14649
14649
  const joinedValues = Object.entries(value).map(([key, v]) => serializePrimitiveParam({
14650
14650
  allowReserved,
14651
- name: style === "deepObject" ? `${name}[${key}]` : key,
14651
+ name: style === "deepObject" ? `${name2}[${key}]` : key,
14652
14652
  value: v
14653
14653
  })).join(separator);
14654
14654
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
@@ -14671,31 +14671,31 @@ var init_utils_gen = __esm({
14671
14671
  if (matches) {
14672
14672
  for (const match2 of matches) {
14673
14673
  let explode = false;
14674
- let name = match2.substring(1, match2.length - 1);
14674
+ let name2 = match2.substring(1, match2.length - 1);
14675
14675
  let style = "simple";
14676
- if (name.endsWith("*")) {
14676
+ if (name2.endsWith("*")) {
14677
14677
  explode = true;
14678
- name = name.substring(0, name.length - 1);
14678
+ name2 = name2.substring(0, name2.length - 1);
14679
14679
  }
14680
- if (name.startsWith(".")) {
14681
- name = name.substring(1);
14680
+ if (name2.startsWith(".")) {
14681
+ name2 = name2.substring(1);
14682
14682
  style = "label";
14683
- } else if (name.startsWith(";")) {
14684
- name = name.substring(1);
14683
+ } else if (name2.startsWith(";")) {
14684
+ name2 = name2.substring(1);
14685
14685
  style = "matrix";
14686
14686
  }
14687
- const value = path5[name];
14687
+ const value = path5[name2];
14688
14688
  if (value === void 0 || value === null) {
14689
14689
  continue;
14690
14690
  }
14691
14691
  if (Array.isArray(value)) {
14692
- url = url.replace(match2, serializeArrayParam({ explode, name, style, value }));
14692
+ url = url.replace(match2, serializeArrayParam({ explode, name: name2, style, value }));
14693
14693
  continue;
14694
14694
  }
14695
14695
  if (typeof value === "object") {
14696
14696
  url = url.replace(match2, serializeObjectParam({
14697
14697
  explode,
14698
- name,
14698
+ name: name2,
14699
14699
  style,
14700
14700
  value,
14701
14701
  valueOnly: true
@@ -14704,7 +14704,7 @@ var init_utils_gen = __esm({
14704
14704
  }
14705
14705
  if (style === "matrix") {
14706
14706
  url = url.replace(match2, `;${serializePrimitiveParam({
14707
- name,
14707
+ name: name2,
14708
14708
  value
14709
14709
  })}`);
14710
14710
  continue;
@@ -14715,12 +14715,12 @@ var init_utils_gen = __esm({
14715
14715
  }
14716
14716
  return url;
14717
14717
  };
14718
- createQuerySerializer = ({ allowReserved, array: array3, object } = {}) => {
14718
+ createQuerySerializer = ({ allowReserved, array: array4, object } = {}) => {
14719
14719
  const querySerializer = (queryParams) => {
14720
14720
  const search = [];
14721
14721
  if (queryParams && typeof queryParams === "object") {
14722
- for (const name in queryParams) {
14723
- const value = queryParams[name];
14722
+ for (const name2 in queryParams) {
14723
+ const value = queryParams[name2];
14724
14724
  if (value === void 0 || value === null) {
14725
14725
  continue;
14726
14726
  }
@@ -14728,10 +14728,10 @@ var init_utils_gen = __esm({
14728
14728
  const serializedArray = serializeArrayParam({
14729
14729
  allowReserved,
14730
14730
  explode: true,
14731
- name,
14731
+ name: name2,
14732
14732
  style: "form",
14733
14733
  value,
14734
- ...array3
14734
+ ...array4
14735
14735
  });
14736
14736
  if (serializedArray)
14737
14737
  search.push(serializedArray);
@@ -14739,7 +14739,7 @@ var init_utils_gen = __esm({
14739
14739
  const serializedObject = serializeObjectParam({
14740
14740
  allowReserved,
14741
14741
  explode: true,
14742
- name,
14742
+ name: name2,
14743
14743
  style: "deepObject",
14744
14744
  value,
14745
14745
  ...object
@@ -14749,7 +14749,7 @@ var init_utils_gen = __esm({
14749
14749
  } else {
14750
14750
  const serializedPrimitive = serializePrimitiveParam({
14751
14751
  allowReserved,
14752
- name,
14752
+ name: name2,
14753
14753
  value
14754
14754
  });
14755
14755
  if (serializedPrimitive)
@@ -14783,11 +14783,11 @@ var init_utils_gen = __esm({
14783
14783
  }
14784
14784
  return;
14785
14785
  };
14786
- checkForExistence = (options, name) => {
14787
- if (!name) {
14786
+ checkForExistence = (options, name2) => {
14787
+ if (!name2) {
14788
14788
  return false;
14789
14789
  }
14790
- if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
14790
+ if (options.headers.has(name2) || options.query?.[name2] || options.headers.get("Cookie")?.includes(`${name2}=`)) {
14791
14791
  return true;
14792
14792
  }
14793
14793
  return false;
@@ -14801,20 +14801,20 @@ var init_utils_gen = __esm({
14801
14801
  if (!token) {
14802
14802
  continue;
14803
14803
  }
14804
- const name = auth.name ?? "Authorization";
14804
+ const name2 = auth.name ?? "Authorization";
14805
14805
  switch (auth.in) {
14806
14806
  case "query":
14807
14807
  if (!options.query) {
14808
14808
  options.query = {};
14809
14809
  }
14810
- options.query[name] = token;
14810
+ options.query[name2] = token;
14811
14811
  break;
14812
14812
  case "cookie":
14813
- options.headers.append("Cookie", `${name}=${token}`);
14813
+ options.headers.append("Cookie", `${name2}=${token}`);
14814
14814
  break;
14815
14815
  case "header":
14816
14816
  default:
14817
- options.headers.set(name, token);
14817
+ options.headers.set(name2, token);
14818
14818
  break;
14819
14819
  }
14820
14820
  }
@@ -15972,11 +15972,11 @@ function parseEdsiError(rawInput) {
15972
15972
  ...binding.diagnostics ? { diagnostics: binding.diagnostics } : {}
15973
15973
  };
15974
15974
  }
15975
- const literal3 = parseObjectLiteralTail(cleaned);
15976
- if (literal3 && (literal3.code || literal3.cycle)) {
15975
+ const literal4 = parseObjectLiteralTail(cleaned);
15976
+ if (literal4 && (literal4.code || literal4.cycle)) {
15977
15977
  const braceStart = cleaned.lastIndexOf("{");
15978
15978
  const head = braceStart === -1 ? cleaned : cleaned.slice(0, braceStart).trim();
15979
- return { code: literal3.code ?? null, message: head || cleaned, cycle: literal3.cycle ?? null, raw: false };
15979
+ return { code: literal4.code ?? null, message: head || cleaned, cycle: literal4.cycle ?? null, raw: false };
15980
15980
  }
15981
15981
  return { code: null, message: cleaned || prefix || rawInput, cycle: null, raw: true };
15982
15982
  }
@@ -16382,8 +16382,8 @@ var init_count_character_edits = __esm({
16382
16382
  });
16383
16383
 
16384
16384
  // packages/experience-design-system-backend-pipeline/dist/src/steps/generation/src/helpers/existing-entities/simplify-name-for-comparison.js
16385
- function simplifyNameForComparison(name) {
16386
- const stripped = name.toLowerCase().replace(/[^a-z0-9]/g, "");
16385
+ function simplifyNameForComparison(name2) {
16386
+ const stripped = name2.toLowerCase().replace(/[^a-z0-9]/g, "");
16387
16387
  return stripped.endsWith("s") && stripped.length > 1 ? stripped.slice(0, -1) : stripped;
16388
16388
  }
16389
16389
  var init_simplify_name_for_comparison = __esm({
@@ -16774,9 +16774,9 @@ var init_apply_map_token_prop_calls = __esm({
16774
16774
  // packages/experience-design-system-backend-pipeline/dist/src/agents/helpers/resolution/binary-exists.js
16775
16775
  import { execFile } from "node:child_process";
16776
16776
  import { promisify } from "node:util";
16777
- async function binaryExists(name) {
16777
+ async function binaryExists(name2) {
16778
16778
  try {
16779
- await execFileAsync(process.platform === "win32" ? "where" : "which", [name]);
16779
+ await execFileAsync(process.platform === "win32" ? "where" : "which", [name2]);
16780
16780
  return true;
16781
16781
  } catch {
16782
16782
  return false;
@@ -17474,20 +17474,20 @@ function collectSiblingRendererImports(sourceText) {
17474
17474
  continue;
17475
17475
  if (/-g(?:ql|gl)(?:$|\.)/i.test(importPath))
17476
17476
  continue;
17477
- for (const name of parseImportedNames(importClause)) {
17478
- if (name)
17479
- names.add(name);
17477
+ for (const name2 of parseImportedNames(importClause)) {
17478
+ if (name2)
17479
+ names.add(name2);
17480
17480
  }
17481
17481
  }
17482
17482
  return [...names];
17483
17483
  }
17484
17484
  function hasSiblingForwardRender(sourceText, siblingImports) {
17485
- return siblingImports.some((name) => {
17486
- const renderPattern = new RegExp(`<${escapeRegExp(name)}\\b[\\s\\S]*?(?:/>|</${escapeRegExp(name)}>)`);
17485
+ return siblingImports.some((name2) => {
17486
+ const renderPattern = new RegExp(`<${escapeRegExp(name2)}\\b[\\s\\S]*?(?:/>|</${escapeRegExp(name2)}>)`);
17487
17487
  if (!renderPattern.test(sourceText))
17488
17488
  return false;
17489
- const siblingSpreadPattern = new RegExp(`<${escapeRegExp(name)}\\b[^>]*\\{\\.\\.\\.(?!props\\b)[^}]+\\}`);
17490
- const propsPlusSiblingSpreadPattern = new RegExp(`<${escapeRegExp(name)}\\b[^>]*\\{\\.\\.\\.props\\}[^>]*\\{\\.\\.\\.(?!props\\b)[^}]+\\}`);
17489
+ const siblingSpreadPattern = new RegExp(`<${escapeRegExp(name2)}\\b[^>]*\\{\\.\\.\\.(?!props\\b)[^}]+\\}`);
17490
+ const propsPlusSiblingSpreadPattern = new RegExp(`<${escapeRegExp(name2)}\\b[^>]*\\{\\.\\.\\.props\\}[^>]*\\{\\.\\.\\.(?!props\\b)[^}]+\\}`);
17491
17491
  return siblingSpreadPattern.test(sourceText) || propsPlusSiblingSpreadPattern.test(sourceText);
17492
17492
  });
17493
17493
  }
@@ -17704,34 +17704,34 @@ function isNumberType(type) {
17704
17704
  function isComplexType(type) {
17705
17705
  return !isSimpleType(type);
17706
17706
  }
17707
- function isDomPassThroughProp(name) {
17708
- if (DOM_PASS_THROUGH_PROPS.has(name))
17707
+ function isDomPassThroughProp(name2) {
17708
+ if (DOM_PASS_THROUGH_PROPS.has(name2))
17709
17709
  return true;
17710
- if (/^aria[-A-Z]/.test(name))
17710
+ if (/^aria[-A-Z]/.test(name2))
17711
17711
  return true;
17712
- return name.startsWith("data-");
17712
+ return name2.startsWith("data-");
17713
17713
  }
17714
17714
  function preClassifyProp(prop) {
17715
- const { name, type } = prop;
17716
- if (/^on[A-Z]/.test(name) || type.includes("=> void") || type.includes("EventHandler")) {
17715
+ const { name: name2, type } = prop;
17716
+ if (/^on[A-Z]/.test(name2) || type.includes("=> void") || type.includes("EventHandler")) {
17717
17717
  return { category: "exclude" };
17718
17718
  }
17719
- if (name === "ref" || name === "innerRef" || type.includes("Ref<") || type.includes("RefObject<")) {
17719
+ if (name2 === "ref" || name2 === "innerRef" || type.includes("Ref<") || type.includes("RefObject<")) {
17720
17720
  return { category: "exclude" };
17721
17721
  }
17722
- if (name === "testId" || name === "data-testid" || name === "dataTestId") {
17722
+ if (name2 === "testId" || name2 === "data-testid" || name2 === "dataTestId") {
17723
17723
  return { category: "exclude" };
17724
17724
  }
17725
- if (name === "key") {
17725
+ if (name2 === "key") {
17726
17726
  return { category: "exclude" };
17727
17727
  }
17728
17728
  if (type.includes("Dispatch<") || type.includes("SetStateAction")) {
17729
17729
  return { category: "exclude" };
17730
17730
  }
17731
- if (isDomPassThroughProp(name)) {
17731
+ if (isDomPassThroughProp(name2)) {
17732
17732
  return { category: "exclude" };
17733
17733
  }
17734
- if (name === "name" && prop.domAttribute) {
17734
+ if (name2 === "name" && prop.domAttribute) {
17735
17735
  return { category: "exclude" };
17736
17736
  }
17737
17737
  if (isStringLiteralUnion(type)) {
@@ -17740,36 +17740,36 @@ function preClassifyProp(prop) {
17740
17740
  if (!isComplexType(type)) {
17741
17741
  const designNameStart = /^(variant|size|spacing|gap|color|bg|theme|align|layout|orientation|position)/i;
17742
17742
  const designNameEnd = /(Color|Size|Variant|Style)$/;
17743
- if (designNameStart.test(name) || designNameEnd.test(name)) {
17743
+ if (designNameStart.test(name2) || designNameEnd.test(name2)) {
17744
17744
  return { category: "design", cdfTypeHint: "string" };
17745
17745
  }
17746
17746
  }
17747
17747
  if (isBooleanType(type)) {
17748
17748
  const stateNames = ["disabled", "loading", "expanded", "isOpen", "selected", "checked", "active", "preview"];
17749
- if (stateNames.includes(name)) {
17749
+ if (stateNames.includes(name2)) {
17750
17750
  return { category: "state", cdfTypeHint: "boolean" };
17751
17751
  }
17752
17752
  }
17753
17753
  if (isBooleanType(type)) {
17754
17754
  const visualToggle = /^(hide|show|enable|disable|vertical|horizontal|reverse|bold|italic|imageOn|with)/i;
17755
- if (visualToggle.test(name)) {
17755
+ if (visualToggle.test(name2)) {
17756
17756
  return { category: "design", cdfTypeHint: "boolean" };
17757
17757
  }
17758
17758
  }
17759
- if (name === "componentId" || name === "sectionKey" || name === "locale" || name === "variantIndex") {
17759
+ if (name2 === "componentId" || name2 === "sectionKey" || name2 === "locale" || name2 === "variantIndex") {
17760
17760
  return { category: "state", cdfTypeHint: "string" };
17761
17761
  }
17762
17762
  if (isStringType(type)) {
17763
17763
  const urlNameStart = /^(href|url|link|src)/i;
17764
17764
  const urlNameEnd = /(Url|Href|Link|Src)$/;
17765
- if (urlNameStart.test(name) || urlNameEnd.test(name)) {
17765
+ if (urlNameStart.test(name2) || urlNameEnd.test(name2)) {
17766
17766
  return { category: "content", cdfTypeHint: "string" };
17767
17767
  }
17768
17768
  }
17769
17769
  if (isStringType(type)) {
17770
17770
  const textNameStart = /^(label|title|text|description|caption|heading|subheading|body|alt|name|placeholder|summary)/i;
17771
17771
  const textNameEnd = /(Text|Label|Title|Name)$/;
17772
- if (textNameStart.test(name) || textNameEnd.test(name)) {
17772
+ if (textNameStart.test(name2) || textNameEnd.test(name2)) {
17773
17773
  return { category: "content", cdfTypeHint: "string" };
17774
17774
  }
17775
17775
  }
@@ -18085,7 +18085,7 @@ async function resolveComposition(request) {
18085
18085
  timeoutMs: 12e4,
18086
18086
  promptViaStdin: true,
18087
18087
  bedrock,
18088
- onDebugEvent: (name, payload) => onDebugEvent?.("agent", { event: name, ...payload })
18088
+ onDebugEvent: (name2, payload) => onDebugEvent?.("agent", { event: name2, ...payload })
18089
18089
  });
18090
18090
  lastAgentExitCode = res.exitCode;
18091
18091
  if (res.exitCode !== 0 && res.stderr.trim()) {
@@ -18397,7 +18397,7 @@ function collectDuplicateNames(components) {
18397
18397
  sources.push(c2.source);
18398
18398
  nameCounts.set(c2.name, sources);
18399
18399
  }
18400
- return [...nameCounts.entries()].filter(([, srcs]) => srcs.length > 1).map(([name, sources]) => ({ name, sources }));
18400
+ return [...nameCounts.entries()].filter(([, srcs]) => srcs.length > 1).map(([name2, sources]) => ({ name: name2, sources }));
18401
18401
  }
18402
18402
  var init_collect_duplicate_names = __esm({
18403
18403
  "packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/collect-duplicate-names.js"() {
@@ -18512,7 +18512,7 @@ async function runOneGenerateComponent(options, component, index, total) {
18512
18512
  });
18513
18513
  }
18514
18514
  }
18515
- effectiveSlots = effectiveSlots.map((slot) => slot.allowedComponents ? { ...slot, allowedComponents: slot.allowedComponents.filter((name) => allowedComponentNames2.has(name)) } : slot);
18515
+ effectiveSlots = effectiveSlots.map((slot) => slot.allowedComponents ? { ...slot, allowedComponents: slot.allowedComponents.filter((name2) => allowedComponentNames2.has(name2)) } : slot);
18516
18516
  const cacheComponent = normalizeComponentForCache(component);
18517
18517
  if (!noCache && precomputedCachedNames.has(component.name)) {
18518
18518
  onProgress?.({ kind: "component:cached", index, total, name: component.name, pinned: false });
@@ -19020,7 +19020,7 @@ var init_v1_store = __esm({
19020
19020
 
19021
19021
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/agent-store.ts
19022
19022
  function emptyAgents() {
19023
- return Object.fromEntries(AGENT_NAMES.map((name) => [name, { model: "", binary: "" }]));
19023
+ return Object.fromEntries(AGENT_NAMES.map((name2) => [name2, { model: "", binary: "" }]));
19024
19024
  }
19025
19025
  async function readAgentConfig() {
19026
19026
  const store = await readV1Store();
@@ -19030,11 +19030,11 @@ async function readAgentConfig() {
19030
19030
  const agents = emptyAgents();
19031
19031
  const saved = store["agents"];
19032
19032
  if (saved && typeof saved === "object") {
19033
- for (const name of AGENT_NAMES) {
19034
- const entry = saved[name];
19033
+ for (const name2 of AGENT_NAMES) {
19034
+ const entry = saved[name2];
19035
19035
  if (entry && typeof entry === "object") {
19036
19036
  const fields2 = entry;
19037
- agents[name] = { model: asString(fields2["model"]), binary: asString(fields2["binary"]) };
19037
+ agents[name2] = { model: asString(fields2["model"]), binary: asString(fields2["binary"]) };
19038
19038
  }
19039
19039
  }
19040
19040
  }
@@ -19047,10 +19047,10 @@ async function writeAgentConfig(config) {
19047
19047
  const existing = await readV1Store();
19048
19048
  const merged = { ...existing };
19049
19049
  const agents = {};
19050
- for (const name of AGENT_NAMES) {
19051
- const model = config.agents[name].model.trim();
19052
- const binary = config.agents[name].binary.trim();
19053
- if (model || binary) agents[name] = { ...model ? { model } : {}, ...binary ? { binary } : {} };
19050
+ for (const name2 of AGENT_NAMES) {
19051
+ const model = config.agents[name2].model.trim();
19052
+ const binary = config.agents[name2].binary.trim();
19053
+ if (model || binary) agents[name2] = { ...model ? { model } : {}, ...binary ? { binary } : {} };
19054
19054
  }
19055
19055
  const defaultModel = config.defaultChosen ? agents[config.defaultAgent]?.model : void 0;
19056
19056
  if (config.defaultChosen) merged["agent"] = config.defaultAgent;
@@ -19080,9 +19080,9 @@ var init_agent_store = __esm({
19080
19080
 
19081
19081
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/apply-binary-overrides.ts
19082
19082
  function applyBinaryOverrides(config) {
19083
- for (const name of AGENT_NAMES) {
19084
- const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
19085
- const binary = config.agents[name].binary.trim();
19083
+ for (const name2 of AGENT_NAMES) {
19084
+ const key = `EDS_AGENT_BINARY_${name2.toUpperCase()}`;
19085
+ const binary = config.agents[name2].binary.trim();
19086
19086
  if (binary) {
19087
19087
  if (!shellValues.has(key)) shellValues.set(key, process.env[key]);
19088
19088
  process.env[key] = binary;
@@ -19465,7 +19465,7 @@ async function pruneExpiredLogs(base, retentionDays, now = Date.now()) {
19465
19465
  const contentfulDir = join18(base, ".contentful");
19466
19466
  const result = { logs: 0, folders: 0 };
19467
19467
  try {
19468
- const sessions = (await readdir2(contentfulDir)).filter((name) => SESSION_FOLDER.test(name));
19468
+ const sessions = (await readdir2(contentfulDir)).filter((name2) => SESSION_FOLDER.test(name2));
19469
19469
  for (const session of sessions) {
19470
19470
  const files = await logFilesIn(join18(contentfulDir, session, "debug")).catch(() => []);
19471
19471
  for (const file of files) {
@@ -22519,7 +22519,7 @@ function collectDependents(components) {
22519
22519
  function findRoots(components, selected) {
22520
22520
  const scope = selected ? components.filter((c2) => selected.has(c2.name)) : components;
22521
22521
  const dependents = collectDependents(scope);
22522
- return scope.map((c2) => c2.name).filter((name) => !dependents.has(name)).sort();
22522
+ return scope.map((c2) => c2.name).filter((name2) => !dependents.has(name2)).sort();
22523
22523
  }
22524
22524
  function findCycleInClosure(root, reachable, components) {
22525
22525
  const scopedComponents = components.filter((c2) => reachable.has(c2.name)).map((c2) => ({ name: c2.name, slots: c2.slots }));
@@ -22555,9 +22555,9 @@ function computeClosure(root, components) {
22555
22555
  const reachable = walkReachable2(root, byName, known);
22556
22556
  const cyclePath = findCycleInClosure(root, reachable, components);
22557
22557
  if (cyclePath) {
22558
- const nodes2 = [...reachable].sort().map((name) => ({
22559
- name,
22560
- depth: name === root ? 0 : 1,
22558
+ const nodes2 = [...reachable].sort().map((name2) => ({
22559
+ name: name2,
22560
+ depth: name2 === root ? 0 : 1,
22561
22561
  path: [root],
22562
22562
  parents: []
22563
22563
  }));
@@ -22593,12 +22593,12 @@ function computeClosure(root, components) {
22593
22593
  }
22594
22594
  }
22595
22595
  const nodes = [];
22596
- for (const [name, d] of depth.entries()) {
22596
+ for (const [name2, d] of depth.entries()) {
22597
22597
  nodes.push({
22598
- name,
22598
+ name: name2,
22599
22599
  depth: d,
22600
- path: parentPath.get(name),
22601
- parents: [...parents.get(name) ?? /* @__PURE__ */ new Set()].sort()
22600
+ path: parentPath.get(name2),
22601
+ parents: [...parents.get(name2) ?? /* @__PURE__ */ new Set()].sort()
22602
22602
  });
22603
22603
  }
22604
22604
  nodes.sort((a, b) => a.depth - b.depth || a.name.localeCompare(b.name));
@@ -22621,8 +22621,8 @@ function findSharedDeps(closures) {
22621
22621
  }
22622
22622
  }
22623
22623
  const out = /* @__PURE__ */ new Map();
22624
- for (const [name, roots] of counts.entries()) {
22625
- if (roots.length >= 2) out.set(name, [...roots].sort());
22624
+ for (const [name2, roots] of counts.entries()) {
22625
+ if (roots.length >= 2) out.set(name2, [...roots].sort());
22626
22626
  }
22627
22627
  return out;
22628
22628
  }
@@ -22833,13 +22833,13 @@ function buildVisibleRows(props) {
22833
22833
  ...findRoots(subgraph),
22834
22834
  ...subgraph.filter((n) => hasDirectChild(n)).map((n) => n.name)
22835
22835
  ]);
22836
- for (const name of [...parentNames].sort()) {
22837
- const full = computeClosure(name, subgraph);
22838
- closures.set(name, { ...full, nodes: full.nodes.filter((n) => n.depth <= 1) });
22836
+ for (const name2 of [...parentNames].sort()) {
22837
+ const full = computeClosure(name2, subgraph);
22838
+ closures.set(name2, { ...full, nodes: full.nodes.filter((n) => n.depth <= 1) });
22839
22839
  }
22840
22840
  const sharedDeps = findSharedDeps(closures);
22841
- const hasCycleDepDirect = (name) => {
22842
- const it = itemByKey.get(name)?.it;
22841
+ const hasCycleDepDirect = (name2) => {
22842
+ const it = itemByKey.get(name2)?.it;
22843
22843
  if (!it) return false;
22844
22844
  for (const target of allowedComponentNames(it.entry)) {
22845
22845
  if (cycleParticipants.has(target)) return true;
@@ -22944,28 +22944,28 @@ function buildVisibleRows(props) {
22944
22944
  });
22945
22945
  });
22946
22946
  }
22947
- for (const name of standaloneRoots) {
22948
- const rec = itemByKey.get(name);
22947
+ for (const name2 of standaloneRoots) {
22948
+ const rec = itemByKey.get(name2);
22949
22949
  if (!rec) continue;
22950
22950
  rows.push({
22951
22951
  kind: "standalone",
22952
- key: `stand:${name}`,
22953
- label: name,
22952
+ key: `stand:${name2}`,
22953
+ label: name2,
22954
22954
  indent: 0,
22955
22955
  itemIdx: rec.idx
22956
22956
  });
22957
22957
  }
22958
22958
  const nodeByName = new Map(subgraph.map((n) => [n.name, n]));
22959
- const sharedLeafNames = [...sharedDeps.keys()].filter((name) => (nodeByName.get(name)?.slots.length ?? 0) === 0).sort();
22959
+ const sharedLeafNames = [...sharedDeps.keys()].filter((name2) => (nodeByName.get(name2)?.slots.length ?? 0) === 0).sort();
22960
22960
  const seenStandaloneNames = new Set(standaloneRoots);
22961
- for (const name of sharedLeafNames) {
22962
- if (seenStandaloneNames.has(name)) continue;
22963
- const rec = itemByKey.get(name);
22961
+ for (const name2 of sharedLeafNames) {
22962
+ if (seenStandaloneNames.has(name2)) continue;
22963
+ const rec = itemByKey.get(name2);
22964
22964
  if (!rec) continue;
22965
22965
  rows.push({
22966
22966
  kind: "standalone",
22967
- key: `shared-standalone:${name}`,
22968
- label: `${name} (shared)`,
22967
+ key: `shared-standalone:${name2}`,
22968
+ label: `${name2} (shared)`,
22969
22969
  indent: 0,
22970
22970
  sharedSuffix: true,
22971
22971
  itemIdx: rec.idx
@@ -22981,13 +22981,13 @@ function buildVisibleRows(props) {
22981
22981
  indent: 0,
22982
22982
  itemIdx: -1
22983
22983
  });
22984
- for (const name of flatNames) {
22985
- const rec = itemByKey.get(name);
22984
+ for (const name2 of flatNames) {
22985
+ const rec = itemByKey.get(name2);
22986
22986
  if (!rec) continue;
22987
22987
  rows.push({
22988
22988
  kind: "flat",
22989
- key: `flat:${name}`,
22990
- label: name,
22989
+ key: `flat:${name2}`,
22990
+ label: name2,
22991
22991
  indent: 0,
22992
22992
  itemIdx: rec.idx
22993
22993
  });
@@ -22997,9 +22997,9 @@ function buildVisibleRows(props) {
22997
22997
  if (filterVisibleKeys !== void 0) {
22998
22998
  return rows.filter((row) => {
22999
22999
  if (row.itemIdx < 0) return true;
23000
- const name = items[row.itemIdx]?.key;
23001
- if (name === void 0) return true;
23002
- return filterVisibleKeys.has(name);
23000
+ const name2 = items[row.itemIdx]?.key;
23001
+ if (name2 === void 0) return true;
23002
+ return filterVisibleKeys.has(name2);
23003
23003
  });
23004
23004
  }
23005
23005
  return rows;
@@ -23721,11 +23721,11 @@ function computeCycleAwareAcceptCascade(target, components, cycleUnits) {
23721
23721
  const byName = new Map(components.map((c2) => [c2.name, c2]));
23722
23722
  const visited = /* @__PURE__ */ new Set();
23723
23723
  const queue = [];
23724
- const enqueue = (name) => {
23725
- if (visited.has(name)) return;
23726
- visited.add(name);
23727
- queue.push(name);
23728
- const unit = cycleUnits.get(name);
23724
+ const enqueue = (name2) => {
23725
+ if (visited.has(name2)) return;
23726
+ visited.add(name2);
23727
+ queue.push(name2);
23728
+ const unit = cycleUnits.get(name2);
23729
23729
  if (unit) {
23730
23730
  for (const member of unit) {
23731
23731
  if (!visited.has(member)) {
@@ -23862,7 +23862,7 @@ function buildScopeGraph(components) {
23862
23862
  cycles = [];
23863
23863
  }
23864
23864
  const cycleParticipants = /* @__PURE__ */ new Set();
23865
- for (const cycle of cycles) for (const name of cycle.path) cycleParticipants.add(name);
23865
+ for (const cycle of cycles) for (const name2 of cycle.path) cycleParticipants.add(name2);
23866
23866
  return {
23867
23867
  nodes,
23868
23868
  cycles,
@@ -24087,10 +24087,10 @@ var init_lineage_layout = __esm({
24087
24087
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/sidebar-navigation.ts
24088
24088
  function collectExpandedGroupRoots(closures, cycleParticipants) {
24089
24089
  const roots = /* @__PURE__ */ new Set();
24090
- for (const [name, closure] of closures.entries()) {
24091
- if (closure.nodes.length > 1) roots.add(name);
24090
+ for (const [name2, closure] of closures.entries()) {
24091
+ if (closure.nodes.length > 1) roots.add(name2);
24092
24092
  }
24093
- for (const name of cycleParticipants) roots.add(name);
24093
+ for (const name2 of cycleParticipants) roots.add(name2);
24094
24094
  return roots;
24095
24095
  }
24096
24096
  function computeSidebarViewToggle({
@@ -24162,9 +24162,9 @@ function buildFlatDimPredicate(input) {
24162
24162
  const isFlat = input.viewMode === "flat";
24163
24163
  const keys = isFlat ? input.filterVisibleKeys : void 0;
24164
24164
  if (!hasSearch && keys === void 0) return void 0;
24165
- return (name) => {
24166
- if (hasSearch && !fuzzyMatches(input.searchQuery, name)) return true;
24167
- if (keys !== void 0 && !keys.has(name)) return true;
24165
+ return (name2) => {
24166
+ if (hasSearch && !fuzzyMatches(input.searchQuery, name2)) return true;
24167
+ if (keys !== void 0 && !keys.has(name2)) return true;
24168
24168
  return false;
24169
24169
  };
24170
24170
  }
@@ -24184,7 +24184,7 @@ var init_step_filters = __esm({
24184
24184
  // packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/state.ts
24185
24185
  function apply(state2, entries) {
24186
24186
  const next = new Map(state2);
24187
- for (const [name, decision] of entries) next.set(name, decision);
24187
+ for (const [name2, decision] of entries) next.set(name2, decision);
24188
24188
  return next;
24189
24189
  }
24190
24190
  function reduceDecisions(state2, action, components, graph) {
@@ -24193,44 +24193,44 @@ function reduceDecisions(state2, action, components, graph) {
24193
24193
  if (state2.get(action.name) === "accepted") return state2;
24194
24194
  return apply(
24195
24195
  state2,
24196
- acceptCascade(graph, action.name).map((name) => [name, "accepted"])
24196
+ acceptCascade(graph, action.name).map((name2) => [name2, "accepted"])
24197
24197
  );
24198
24198
  }
24199
24199
  case "reject": {
24200
24200
  if (state2.get(action.name) === "rejected") return state2;
24201
24201
  const { toReject, toDeselect } = rejectCascade(graph, action.name);
24202
24202
  return apply(state2, [
24203
- ...toReject.map((name) => [name, "rejected"]),
24204
- ...toDeselect.map((name) => [name, "undecided"])
24203
+ ...toReject.map((name2) => [name2, "rejected"]),
24204
+ ...toDeselect.map((name2) => [name2, "undecided"])
24205
24205
  ]);
24206
24206
  }
24207
24207
  case "toggle-all": {
24208
24208
  const nonCycle = components.filter((c2) => !graph.cycleParticipants.has(c2.name)).map((c2) => c2.name);
24209
- const anyNotAccepted = nonCycle.some((name) => state2.get(name) !== "accepted");
24209
+ const anyNotAccepted = nonCycle.some((name2) => state2.get(name2) !== "accepted");
24210
24210
  if (anyNotAccepted) {
24211
24211
  return apply(state2, [
24212
- ...nonCycle.map((name) => [name, "accepted"]),
24213
- ...reachableCycleMembers(graph, nonCycle).map((name) => [name, "accepted"])
24212
+ ...nonCycle.map((name2) => [name2, "accepted"]),
24213
+ ...reachableCycleMembers(graph, nonCycle).map((name2) => [name2, "accepted"])
24214
24214
  ]);
24215
24215
  }
24216
24216
  return apply(state2, [
24217
- ...nonCycle.map((name) => [name, "rejected"]),
24217
+ ...nonCycle.map((name2) => [name2, "rejected"]),
24218
24218
  ...components.filter((c2) => graph.cycleParticipants.has(c2.name) && state2.get(c2.name) === "accepted").map((c2) => [c2.name, "undecided"])
24219
24219
  ]);
24220
24220
  }
24221
24221
  case "accept-unflagged": {
24222
24222
  const seeds = components.filter((c2) => !graph.cycleParticipants.has(c2.name) && !isAiFlagged(c2)).map((c2) => c2.name);
24223
24223
  return apply(state2, [
24224
- ...seeds.map((name) => [name, "accepted"]),
24225
- ...reachableCycleMembers(graph, seeds).map((name) => [name, "accepted"])
24224
+ ...seeds.map((name2) => [name2, "accepted"]),
24225
+ ...reachableCycleMembers(graph, seeds).map((name2) => [name2, "accepted"])
24226
24226
  ]);
24227
24227
  }
24228
24228
  }
24229
24229
  }
24230
- function rejectNeedsConfirmation(graph, name, state2) {
24231
- if (state2.get(name) === "rejected") return false;
24232
- const { toReject, toDeselect } = rejectCascade(graph, name);
24233
- const ancestors = toReject.filter((n) => n !== name);
24230
+ function rejectNeedsConfirmation(graph, name2, state2) {
24231
+ if (state2.get(name2) === "rejected") return false;
24232
+ const { toReject, toDeselect } = rejectCascade(graph, name2);
24233
+ const ancestors = toReject.filter((n) => n !== name2);
24234
24234
  return ancestors.length + toDeselect.length >= 2;
24235
24235
  }
24236
24236
  function partitionDecisions(components, state2) {
@@ -24328,8 +24328,8 @@ function useScopeGate({ components, tokenCount, tokensWidth, onConfirm, onQuit }
24328
24328
  for (const node of closure.nodes) keys.add(node.name);
24329
24329
  }
24330
24330
  for (const unit of cycleUnits.values()) {
24331
- if (![...unit].some((name) => decisions.get(name) === "accepted")) continue;
24332
- for (const name of unit) keys.add(name);
24331
+ if (![...unit].some((name2) => decisions.get(name2) === "accepted")) continue;
24332
+ for (const name2 of unit) keys.add(name2);
24333
24333
  }
24334
24334
  return keys;
24335
24335
  }, [closures, cycleUnits, showDependencies, decisions]);
@@ -24427,12 +24427,12 @@ function useScopeGate({ components, tokenCount, tokensWidth, onConfirm, onQuit }
24427
24427
  return void 0;
24428
24428
  }
24429
24429
  };
24430
- const jumpCursorTo = (name) => {
24430
+ const jumpCursorTo = (name2) => {
24431
24431
  let idx = -1;
24432
24432
  for (let i = 0; i < visibleRows.length; i++) {
24433
24433
  const row = visibleRows[i];
24434
24434
  if (row.itemIdx < 0) continue;
24435
- if (groupedItems[row.itemIdx]?.key === name) {
24435
+ if (groupedItems[row.itemIdx]?.key === name2) {
24436
24436
  idx = i;
24437
24437
  break;
24438
24438
  }
@@ -24446,18 +24446,18 @@ function useScopeGate({ components, tokenCount, tokensWidth, onConfirm, onQuit }
24446
24446
  });
24447
24447
  };
24448
24448
  const decide = (action) => setDecisions((prev) => reduceDecisions(prev, action, components, graph));
24449
- const requestReject = (name) => {
24450
- if (decisions.get(name) === "rejected") return;
24451
- if (rejectNeedsConfirmation(graph, name, decisions)) {
24452
- const { toReject, toDeselect } = rejectCascade(graph, name);
24449
+ const requestReject = (name2) => {
24450
+ if (decisions.get(name2) === "rejected") return;
24451
+ if (rejectNeedsConfirmation(graph, name2, decisions)) {
24452
+ const { toReject, toDeselect } = rejectCascade(graph, name2);
24453
24453
  setPendingRejectCascade({
24454
- target: name,
24455
- ancestors: toReject.filter((n) => n !== name).sort(),
24454
+ target: name2,
24455
+ ancestors: toReject.filter((n) => n !== name2).sort(),
24456
24456
  descendants: [...toDeselect].sort()
24457
24457
  });
24458
24458
  return;
24459
24459
  }
24460
- decide({ type: "reject", name });
24460
+ decide({ type: "reject", name: name2 });
24461
24461
  };
24462
24462
  const mode = showHelp ? "help" : pendingRejectCascade ? "reject-prompt" : searchOpen ? "search" : cyclesPanelOpen ? "cycles" : aiRationalePanel.isOpen ? "flags" : "main";
24463
24463
  const context = {
@@ -25006,18 +25006,18 @@ function describeGeneration(input) {
25006
25006
  ${agent} is reading each selected component and writing a Contentful component definition for it.${input.hasTokens ? "\nUsing your design tokens for prop resolution." : ""}`;
25007
25007
  }
25008
25008
  function progressRows2(progress, agent) {
25009
- const name = capitalize(agent);
25009
+ const name2 = capitalize(agent);
25010
25010
  const { components, mapTokens } = progress;
25011
25011
  const rows = [
25012
25012
  {
25013
- text: components ? components.current : `Starting up ${name}...`,
25013
+ text: components ? components.current : `Starting up ${name2}...`,
25014
25014
  complete: false,
25015
25015
  ...components ? { progress: { done: components.done, total: components.total } } : {}
25016
25016
  }
25017
25017
  ];
25018
25018
  if (mapTokens !== "idle") {
25019
25019
  rows.push({
25020
- text: mapTokens === "running" ? `Mapping token restrictions via ${name}...` : "Token restrictions ready",
25020
+ text: mapTokens === "running" ? `Mapping token restrictions via ${name2}...` : "Token restrictions ready",
25021
25021
  complete: mapTokens === "complete"
25022
25022
  });
25023
25023
  }
@@ -25027,7 +25027,7 @@ var capitalize;
25027
25027
  var init_logic11 = __esm({
25028
25028
  "packages/experience-design-system-cli/src/tui/import/steps/08-generation/logic.ts"() {
25029
25029
  "use strict";
25030
- capitalize = (name) => name.charAt(0).toUpperCase() + name.slice(1);
25030
+ capitalize = (name2) => name2.charAt(0).toUpperCase() + name2.slice(1);
25031
25031
  }
25032
25032
  });
25033
25033
 
@@ -25302,6 +25302,24 @@ var init_build_flow_start = __esm({
25302
25302
  }
25303
25303
  });
25304
25304
 
25305
+ // packages/experience-design-system-types/dist/src/source-input-association.js
25306
+ import * as z3 from "zod/mini";
25307
+ var name, SourceInputAssociationSchema;
25308
+ var init_source_input_association = __esm({
25309
+ "packages/experience-design-system-types/dist/src/source-input-association.js"() {
25310
+ "use strict";
25311
+ name = z3.string().check(z3.refine((value) => value.trim().length > 0));
25312
+ SourceInputAssociationSchema = z3.strictObject({
25313
+ schemaVersion: z3.literal(1),
25314
+ componentId: name,
25315
+ componentDeclarationId: name,
25316
+ rootSymbolId: name,
25317
+ inputName: name,
25318
+ inputPath: z3.array(name).check(z3.minLength(1))
25319
+ }).check(z3.refine((value) => value.inputPath[0] === value.inputName));
25320
+ }
25321
+ });
25322
+
25305
25323
  // packages/experience-design-system-types/dist/src/cdf/vocabularies.js
25306
25324
  var CDF_PROPERTY_TYPES2, CDF_PROPERTY_CATEGORIES2;
25307
25325
  var init_vocabularies2 = __esm({
@@ -25496,38 +25514,38 @@ var init_validate5 = __esm({
25496
25514
  });
25497
25515
 
25498
25516
  // packages/experience-design-system-types/dist/src/cdf/types.js
25499
- import * as z3 from "zod/mini";
25517
+ import * as z4 from "zod/mini";
25500
25518
  var CDFPropertySchema2, CDFSlotSchema2, CDFComponentSchema2, CDFTokenSchema2;
25501
25519
  var init_types7 = __esm({
25502
25520
  "packages/experience-design-system-types/dist/src/cdf/types.js"() {
25503
25521
  "use strict";
25504
25522
  init_vocabularies2();
25505
25523
  init_token_types2();
25506
- CDFPropertySchema2 = z3.strictObject({
25507
- $type: z3.enum(CDF_PROPERTY_TYPES2),
25508
- $category: z3.enum(CDF_PROPERTY_CATEGORIES2),
25509
- $description: z3.optional(z3.string()),
25510
- $required: z3.optional(z3.boolean()),
25511
- $default: z3.optional(z3.any()),
25512
- $values: z3.optional(z3.array(z3.string())),
25513
- "$token.kind": z3.optional(z3.string()),
25514
- "$token.allowed": z3.optional(z3.array(z3.string()))
25524
+ CDFPropertySchema2 = z4.strictObject({
25525
+ $type: z4.enum(CDF_PROPERTY_TYPES2),
25526
+ $category: z4.enum(CDF_PROPERTY_CATEGORIES2),
25527
+ $description: z4.optional(z4.string()),
25528
+ $required: z4.optional(z4.boolean()),
25529
+ $default: z4.optional(z4.any()),
25530
+ $values: z4.optional(z4.array(z4.string())),
25531
+ "$token.kind": z4.optional(z4.string()),
25532
+ "$token.allowed": z4.optional(z4.array(z4.string()))
25515
25533
  });
25516
- CDFSlotSchema2 = z3.strictObject({
25517
- $description: z3.optional(z3.string()),
25518
- $allowedComponents: z3.optional(z3.array(z3.string())),
25519
- $required: z3.optional(z3.boolean())
25534
+ CDFSlotSchema2 = z4.strictObject({
25535
+ $description: z4.optional(z4.string()),
25536
+ $allowedComponents: z4.optional(z4.array(z4.string())),
25537
+ $required: z4.optional(z4.boolean())
25520
25538
  });
25521
- CDFComponentSchema2 = z3.strictObject({
25522
- $type: z3.literal("component"),
25523
- $description: z3.optional(z3.string()),
25524
- $properties: z3.record(z3.string(), CDFPropertySchema2),
25525
- $slots: z3.optional(z3.record(z3.string(), CDFSlotSchema2))
25539
+ CDFComponentSchema2 = z4.strictObject({
25540
+ $type: z4.literal("component"),
25541
+ $description: z4.optional(z4.string()),
25542
+ $properties: z4.record(z4.string(), CDFPropertySchema2),
25543
+ $slots: z4.optional(z4.record(z4.string(), CDFSlotSchema2))
25526
25544
  });
25527
- CDFTokenSchema2 = z3.strictObject({
25528
- $type: z3.enum(DESIGN_TOKEN_TYPES2),
25529
- $value: z3.unknown(),
25530
- $description: z3.optional(z3.string())
25545
+ CDFTokenSchema2 = z4.strictObject({
25546
+ $type: z4.enum(DESIGN_TOKEN_TYPES2),
25547
+ $value: z4.unknown(),
25548
+ $description: z4.optional(z4.string())
25531
25549
  });
25532
25550
  }
25533
25551
  });
@@ -25537,9 +25555,9 @@ function stripUnsupportedSlotFields(entry) {
25537
25555
  if (!entry.$slots)
25538
25556
  return entry;
25539
25557
  const cleaned = {};
25540
- for (const [name, slot] of Object.entries(entry.$slots)) {
25558
+ for (const [name2, slot] of Object.entries(entry.$slots)) {
25541
25559
  const { $required: _required, ...rest } = slot;
25542
- cleaned[name] = rest;
25560
+ cleaned[name2] = rest;
25543
25561
  }
25544
25562
  return { ...entry, $slots: cleaned };
25545
25563
  }
@@ -25581,7 +25599,7 @@ function validateSlotReferences2(components) {
25581
25599
  const slots = entry.$slots ?? {};
25582
25600
  for (const [slotKey, slot] of Object.entries(slots)) {
25583
25601
  const allowed = slot?.$allowedComponents ?? [];
25584
- const unresolved = allowed.filter((name) => !componentKeys.has(name));
25602
+ const unresolved = allowed.filter((name2) => !componentKeys.has(name2));
25585
25603
  if (unresolved.length === 0)
25586
25604
  continue;
25587
25605
  errors.push({
@@ -25614,6 +25632,13 @@ var init_build2 = __esm({
25614
25632
  }
25615
25633
  });
25616
25634
 
25635
+ // packages/experience-design-system-types/dist/src/cdf/finite-values.js
25636
+ var init_finite_values = __esm({
25637
+ "packages/experience-design-system-types/dist/src/cdf/finite-values.js"() {
25638
+ "use strict";
25639
+ }
25640
+ });
25641
+
25617
25642
  // packages/experience-design-system-types/dist/src/cdf/index.js
25618
25643
  var init_cdf2 = __esm({
25619
25644
  "packages/experience-design-system-types/dist/src/cdf/index.js"() {
@@ -25623,21 +25648,22 @@ var init_cdf2 = __esm({
25623
25648
  init_vocabularies2();
25624
25649
  init_types7();
25625
25650
  init_build2();
25651
+ init_finite_values();
25626
25652
  }
25627
25653
  });
25628
25654
 
25629
25655
  // packages/experience-design-system-types/dist/src/dtcg/types.js
25630
- import * as z4 from "zod/mini";
25656
+ import * as z5 from "zod/mini";
25631
25657
  var DTCGTokenSchema2;
25632
25658
  var init_types8 = __esm({
25633
25659
  "packages/experience-design-system-types/dist/src/dtcg/types.js"() {
25634
25660
  "use strict";
25635
25661
  init_token_types2();
25636
- DTCGTokenSchema2 = z4.strictObject({
25637
- path: z4.string(),
25638
- $type: z4.enum(DESIGN_TOKEN_TYPES2),
25639
- $value: z4.unknown(),
25640
- $description: z4.optional(z4.string())
25662
+ DTCGTokenSchema2 = z5.strictObject({
25663
+ path: z5.string(),
25664
+ $type: z5.enum(DESIGN_TOKEN_TYPES2),
25665
+ $value: z5.unknown(),
25666
+ $description: z5.optional(z5.string())
25641
25667
  });
25642
25668
  }
25643
25669
  });
@@ -25681,12 +25707,12 @@ var init_json_value = __esm({
25681
25707
  });
25682
25708
 
25683
25709
  // packages/experience-design-system-types/dist/src/property-contract/date-time-value.js
25684
- import * as z5 from "zod/mini";
25710
+ import * as z6 from "zod/mini";
25685
25711
  var dateTimeValueSchema;
25686
25712
  var init_date_time_value = __esm({
25687
25713
  "packages/experience-design-system-types/dist/src/property-contract/date-time-value.js"() {
25688
25714
  "use strict";
25689
- dateTimeValueSchema = z5.iso.datetime({ offset: true });
25715
+ dateTimeValueSchema = z6.iso.datetime({ offset: true });
25690
25716
  }
25691
25717
  });
25692
25718
 
@@ -25788,6 +25814,14 @@ var init_target_definition = __esm({
25788
25814
  }
25789
25815
  });
25790
25816
 
25817
+ // packages/experience-design-system-types/dist/src/property-contract/content-digest.js
25818
+ var init_content_digest = __esm({
25819
+ "packages/experience-design-system-types/dist/src/property-contract/content-digest.js"() {
25820
+ "use strict";
25821
+ init_json_value();
25822
+ }
25823
+ });
25824
+
25791
25825
  // packages/experience-design-system-types/dist/src/property-contract/index.js
25792
25826
  var init_property_contract = __esm({
25793
25827
  "packages/experience-design-system-types/dist/src/property-contract/index.js"() {
@@ -25796,6 +25830,19 @@ var init_property_contract = __esm({
25796
25830
  init_date_time_value();
25797
25831
  init_discriminated_union();
25798
25832
  init_target_definition();
25833
+ init_content_digest();
25834
+ }
25835
+ });
25836
+
25837
+ // packages/experience-design-system-types/dist/src/cdf/property-validation.js
25838
+ var init_property_validation = __esm({
25839
+ "packages/experience-design-system-types/dist/src/cdf/property-validation.js"() {
25840
+ "use strict";
25841
+ init_vocabularies2();
25842
+ init_json_value();
25843
+ init_target_definition();
25844
+ init_source_input_association();
25845
+ init_finite_values();
25799
25846
  }
25800
25847
  });
25801
25848
 
@@ -25803,9 +25850,11 @@ var init_property_contract = __esm({
25803
25850
  var init_src4 = __esm({
25804
25851
  "packages/experience-design-system-types/dist/src/index.js"() {
25805
25852
  "use strict";
25853
+ init_source_input_association();
25806
25854
  init_cdf2();
25807
25855
  init_dtcg2();
25808
25856
  init_property_contract();
25857
+ init_property_validation();
25809
25858
  }
25810
25859
  });
25811
25860
 
@@ -25814,7 +25863,7 @@ function failedComponentNames(errors) {
25814
25863
  return [...new Set(errors.map((error) => error.componentName))];
25815
25864
  }
25816
25865
  function matchedComponentNames(errors, missingNames) {
25817
- return failedComponentNames(errors).filter((name) => !missingNames.includes(name));
25866
+ return failedComponentNames(errors).filter((name2) => !missingNames.includes(name2));
25818
25867
  }
25819
25868
  function formatErrorLine(error) {
25820
25869
  const context = [`Component: ${error.componentName}`, error.path ? `Path: ${error.path}` : null].filter(Boolean);
@@ -25960,11 +26009,11 @@ function computeRenderStatuses(closure, directIssues) {
25960
26009
  inheritedSources.get(ancestor).set(node.name, ownStatus);
25961
26010
  }
25962
26011
  }
25963
- for (const [name, status] of own2.entries()) {
25964
- out.set(name, {
26012
+ for (const [name2, status] of own2.entries()) {
26013
+ out.set(name2, {
25965
26014
  status,
25966
26015
  isOwn: true,
25967
- sourceComponents: [name]
26016
+ sourceComponents: [name2]
25968
26017
  });
25969
26018
  }
25970
26019
  for (const [ancestor, sources] of inheritedSources.entries()) {
@@ -26282,7 +26331,7 @@ function parseToState(json) {
26282
26331
  }
26283
26332
  const componentDescription = typeof component.$description === "string" ? component.$description : "";
26284
26333
  const rawProps = component.$properties ?? {};
26285
- const props = Object.entries(rawProps).map(([name, raw]) => {
26334
+ const props = Object.entries(rawProps).map(([name2, raw]) => {
26286
26335
  const p = raw ?? {};
26287
26336
  const type = CDF_PROPERTY_TYPES2.includes(p.$type) ? p.$type : "string";
26288
26337
  let defaultValue = null;
@@ -26294,7 +26343,7 @@ function parseToState(json) {
26294
26343
  }
26295
26344
  }
26296
26345
  return {
26297
- name,
26346
+ name: name2,
26298
26347
  type,
26299
26348
  category: CDF_PROPERTY_CATEGORIES2.includes(p.$category) ? p.$category : "content",
26300
26349
  required: p.$required === true,
@@ -26306,10 +26355,10 @@ function parseToState(json) {
26306
26355
  };
26307
26356
  });
26308
26357
  const rawSlots = component.$slots ?? {};
26309
- const slots = Object.entries(rawSlots).map(([name, raw]) => {
26358
+ const slots = Object.entries(rawSlots).map(([name2, raw]) => {
26310
26359
  const s = raw ?? {};
26311
26360
  return {
26312
- name,
26361
+ name: name2,
26313
26362
  description: typeof s.$description === "string" ? s.$description : "",
26314
26363
  required: s.$required === true,
26315
26364
  allowedComponents: Array.isArray(s.$allowedComponents) ? s.$allowedComponents.filter((v) => typeof v === "string") : []
@@ -26417,7 +26466,7 @@ function DefaultValueRow({
26417
26466
  ] });
26418
26467
  }
26419
26468
  function RowLabel({
26420
- name,
26469
+ name: name2,
26421
26470
  selected,
26422
26471
  trailing = true
26423
26472
  }) {
@@ -26430,7 +26479,7 @@ function RowLabel({
26430
26479
  wrap: "truncate-end",
26431
26480
  children: [
26432
26481
  " ",
26433
- name,
26482
+ name2,
26434
26483
  trailing ? " " : ""
26435
26484
  ]
26436
26485
  }
@@ -26782,10 +26831,10 @@ function SlotRow({
26782
26831
  const slice = filtered.slice(start, start + MAX_VISIBLE);
26783
26832
  return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
26784
26833
  /* @__PURE__ */ jsx32(Text27, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
26785
- slice.map((name, i) => {
26834
+ slice.map((name2, i) => {
26786
26835
  const absIdx = start + i;
26787
26836
  const isCursor = absIdx === cursor;
26788
- return /* @__PURE__ */ jsx32(Text27, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures6.pointer} ${name}` : ` ${name}` }, name);
26837
+ return /* @__PURE__ */ jsx32(Text27, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures6.pointer} ${name2}` : ` ${name2}` }, name2);
26789
26838
  })
26790
26839
  ] });
26791
26840
  })() })
@@ -27681,8 +27730,8 @@ function FieldEditor({
27681
27730
  const hasEmptyProperties = props.length === 0 && slots.length === 0;
27682
27731
  const modeLabel = (() => {
27683
27732
  if (pendingDelete) {
27684
- const name = pendingDelete.kind === "prop" ? props[pendingDelete.idx]?.name : slots[pendingDelete.idx]?.name;
27685
- return `Delete ${pendingDelete.kind} "${name}"? [y] delete \xB7 any other key cancels`;
27733
+ const name2 = pendingDelete.kind === "prop" ? props[pendingDelete.idx]?.name : slots[pendingDelete.idx]?.name;
27734
+ return `Delete ${pendingDelete.kind} "${name2}"? [y] delete \xB7 any other key cancels`;
27686
27735
  }
27687
27736
  if (editingValue) {
27688
27737
  return editingValue.mode === "add" ? "Enter to add \xB7 [Esc] to cancel" : "Enter to save edit \xB7 [Esc] to cancel";
@@ -28907,7 +28956,7 @@ function finalizeReviewSession(extractSessionId, components) {
28907
28956
  );
28908
28957
  db.exec("BEGIN");
28909
28958
  try {
28910
- for (const name of toReject) statement.run(extractSessionId, name);
28959
+ for (const name2 of toReject) statement.run(extractSessionId, name2);
28911
28960
  db.exec("COMMIT");
28912
28961
  } catch (error) {
28913
28962
  db.exec("ROLLBACK");
@@ -29891,13 +29940,13 @@ function applyPreviewAnnotations(preview, localNames) {
29891
29940
  const unchanged = new Set(preview.components.unchanged);
29892
29941
  const changedNames = /* @__PURE__ */ new Set();
29893
29942
  for (const item of preview.components.changed) {
29894
- const name = item.current?.name;
29895
- if (typeof name !== "string") continue;
29896
- changedNames.add(name);
29943
+ const name2 = item.current?.name;
29944
+ if (typeof name2 !== "string") continue;
29945
+ changedNames.add(name2);
29897
29946
  if (item.changeClassification?.classification === "breaking") {
29898
- out.set(name, "breaking");
29947
+ out.set(name2, "breaking");
29899
29948
  } else {
29900
- out.set(name, "changed");
29949
+ out.set(name2, "changed");
29901
29950
  }
29902
29951
  }
29903
29952
  const removedNames = /* @__PURE__ */ new Set();
@@ -29907,12 +29956,12 @@ function applyPreviewAnnotations(preview, localNames) {
29907
29956
  out.set(entity.name, "removed");
29908
29957
  }
29909
29958
  }
29910
- for (const name of localNames) {
29911
- if (unchanged.has(name)) continue;
29912
- if (changedNames.has(name)) continue;
29913
- if (removedNames.has(name)) continue;
29914
- if (out.has(name)) continue;
29915
- out.set(name, "new");
29959
+ for (const name2 of localNames) {
29960
+ if (unchanged.has(name2)) continue;
29961
+ if (changedNames.has(name2)) continue;
29962
+ if (removedNames.has(name2)) continue;
29963
+ if (out.has(name2)) continue;
29964
+ out.set(name2, "new");
29916
29965
  }
29917
29966
  return out;
29918
29967
  }
@@ -30637,10 +30686,10 @@ function GenerateReviewStepView({
30637
30686
  const merged = /* @__PURE__ */ new Map();
30638
30687
  for (const closure of closures.values()) {
30639
30688
  const per = computeRenderStatuses(closure, directIssues);
30640
- for (const [name, rs] of per.entries()) {
30641
- const existing = merged.get(name);
30689
+ for (const [name2, rs] of per.entries()) {
30690
+ const existing = merged.get(name2);
30642
30691
  if (!existing || !existing.isOwn && rs.isOwn) {
30643
- merged.set(name, rs);
30692
+ merged.set(name2, rs);
30644
30693
  }
30645
30694
  }
30646
30695
  }
@@ -30695,11 +30744,11 @@ function GenerateReviewStepView({
30695
30744
  reviewEditor.setSaveError(null);
30696
30745
  setPendingEditorFocus(null);
30697
30746
  };
30698
- const jumpCursorToName = (name) => {
30747
+ const jumpCursorToName = (name2) => {
30699
30748
  for (let i = 0; i < visibleRowsMemo.length; i++) {
30700
30749
  const row = visibleRowsMemo[i];
30701
30750
  if (row.itemIdx < 0) continue;
30702
- if (components[row.itemIdx]?.key === name) {
30751
+ if (components[row.itemIdx]?.key === name2) {
30703
30752
  jumpCursorToRow(i);
30704
30753
  return;
30705
30754
  }
@@ -31227,8 +31276,8 @@ function GenerateReviewStepView({
31227
31276
  }
31228
31277
  ),
31229
31278
  !dialogOpen && autoRejected.length > 0 && (() => {
31230
- const stillRejected = autoRejected.filter((name) => {
31231
- const c2 = components.find((x) => x.key === name);
31279
+ const stillRejected = autoRejected.filter((name2) => {
31280
+ const c2 = components.find((x) => x.key === name2);
31232
31281
  return c2?.status === "rejected";
31233
31282
  });
31234
31283
  if (stillRejected.length === 0) return null;
@@ -31910,31 +31959,31 @@ function computeComponentDiffLines(current, proposed, changeClassification) {
31910
31959
  const proposedProperties = proposed["$properties"] ?? {};
31911
31960
  const proposedProps = new Set(Object.keys(proposedProperties));
31912
31961
  const oldProps = current.fullProperties;
31913
- for (const name of [...proposedProps].sort()) {
31914
- if (!currentProps.has(name)) {
31915
- const def = proposedProperties[name];
31916
- lines.push({ key: `${name}-add`, color: PALETTE.success, text: `+ ${name}: ${formatPropDef(def)}` });
31962
+ for (const name2 of [...proposedProps].sort()) {
31963
+ if (!currentProps.has(name2)) {
31964
+ const def = proposedProperties[name2];
31965
+ lines.push({ key: `${name2}-add`, color: PALETTE.success, text: `+ ${name2}: ${formatPropDef(def)}` });
31917
31966
  }
31918
31967
  }
31919
- for (const name of [...currentProps].sort()) {
31920
- if (!proposedProps.has(name)) {
31921
- if (oldProps?.[name]) {
31922
- lines.push({ key: `${name}-rm`, color: PALETTE.error, text: `- ${name}: ${formatOldProp(oldProps[name])}` });
31968
+ for (const name2 of [...currentProps].sort()) {
31969
+ if (!proposedProps.has(name2)) {
31970
+ if (oldProps?.[name2]) {
31971
+ lines.push({ key: `${name2}-rm`, color: PALETTE.error, text: `- ${name2}: ${formatOldProp(oldProps[name2])}` });
31923
31972
  } else {
31924
- const cat = current.contentProperties.includes(name) ? "content" : "design";
31925
- lines.push({ key: `${name}-rm`, color: PALETTE.error, text: `- ${name} (${cat})` });
31973
+ const cat = current.contentProperties.includes(name2) ? "content" : "design";
31974
+ lines.push({ key: `${name2}-rm`, color: PALETTE.error, text: `- ${name2} (${cat})` });
31926
31975
  }
31927
31976
  }
31928
31977
  }
31929
31978
  const handledProps = /* @__PURE__ */ new Set();
31930
- for (const name of [...currentProps].sort()) {
31931
- if (!proposedProps.has(name)) continue;
31932
- const newDef = proposedProperties[name];
31933
- const oldDef = oldProps?.[name];
31979
+ for (const name2 of [...currentProps].sort()) {
31980
+ if (!proposedProps.has(name2)) continue;
31981
+ const newDef = proposedProperties[name2];
31982
+ const oldDef = oldProps?.[name2];
31934
31983
  if (!oldDef) continue;
31935
- const diffs = diffProperty(name, oldDef, newDef);
31984
+ const diffs = diffProperty(name2, oldDef, newDef);
31936
31985
  if (diffs.length > 0) {
31937
- handledProps.add(name);
31986
+ handledProps.add(name2);
31938
31987
  for (const d of diffs) lines.push(d);
31939
31988
  }
31940
31989
  }
@@ -31957,40 +32006,40 @@ function computeComponentDiffLines(current, proposed, changeClassification) {
31957
32006
  const proposedSlots = proposed["$slots"] ?? {};
31958
32007
  const proposedSlotNames = new Set(Object.keys(proposedSlots));
31959
32008
  const currentSlotAllowed = current.currentSlotAllowed ?? {};
31960
- for (const name of [...proposedSlotNames].sort()) {
31961
- if (!currentSlots.has(name)) {
31962
- lines.push({ key: `slot-${name}-add`, color: PALETTE.success, text: `+ slot: ${name}` });
32009
+ for (const name2 of [...proposedSlotNames].sort()) {
32010
+ if (!currentSlots.has(name2)) {
32011
+ lines.push({ key: `slot-${name2}-add`, color: PALETTE.success, text: `+ slot: ${name2}` });
31963
32012
  }
31964
32013
  }
31965
- for (const name of [...currentSlots].sort()) {
31966
- if (!proposedSlotNames.has(name)) {
31967
- lines.push({ key: `slot-${name}-rm`, color: PALETTE.error, text: `- slot: ${name}` });
32014
+ for (const name2 of [...currentSlots].sort()) {
32015
+ if (!proposedSlotNames.has(name2)) {
32016
+ lines.push({ key: `slot-${name2}-rm`, color: PALETTE.error, text: `- slot: ${name2}` });
31968
32017
  }
31969
32018
  }
31970
- for (const name of [...proposedSlotNames].sort()) {
31971
- const nextAllowed = normalizeAllowedComponents(proposedSlots[name]?.["$allowedComponents"]);
31972
- const prevAllowed = normalizeAllowedComponents(currentSlotAllowed[name]);
31973
- const prevExists = currentSlots.has(name);
32019
+ for (const name2 of [...proposedSlotNames].sort()) {
32020
+ const nextAllowed = normalizeAllowedComponents(proposedSlots[name2]?.["$allowedComponents"]);
32021
+ const prevAllowed = normalizeAllowedComponents(currentSlotAllowed[name2]);
32022
+ const prevExists = currentSlots.has(name2);
31974
32023
  if (!prevExists) {
31975
32024
  if (nextAllowed.length > 0) {
31976
32025
  lines.push({
31977
- key: `slot-${name}-allow-new`,
32026
+ key: `slot-${name2}-allow-new`,
31978
32027
  color: PALETTE.success,
31979
- text: `+ slot ${name} allowedComponents: [${nextAllowed.join(", ")}]`
32028
+ text: `+ slot ${name2} allowedComponents: [${nextAllowed.join(", ")}]`
31980
32029
  });
31981
32030
  }
31982
32031
  continue;
31983
32032
  }
31984
32033
  if (arraysEqual(prevAllowed, nextAllowed)) continue;
31985
32034
  lines.push({
31986
- key: `slot-${name}-allow-old`,
32035
+ key: `slot-${name2}-allow-old`,
31987
32036
  color: PALETTE.error,
31988
- text: `- slot ${name} allowedComponents: [${prevAllowed.join(", ")}]`
32037
+ text: `- slot ${name2} allowedComponents: [${prevAllowed.join(", ")}]`
31989
32038
  });
31990
32039
  lines.push({
31991
- key: `slot-${name}-allow-new`,
32040
+ key: `slot-${name2}-allow-new`,
31992
32041
  color: PALETTE.success,
31993
- text: `+ slot ${name} allowedComponents: [${nextAllowed.join(", ")}]`
32042
+ text: `+ slot ${name2} allowedComponents: [${nextAllowed.join(", ")}]`
31994
32043
  });
31995
32044
  }
31996
32045
  return lines;
@@ -32026,7 +32075,7 @@ function normalizeType(type) {
32026
32075
  return type.toLowerCase();
32027
32076
  }
32028
32077
  }
32029
- function diffProperty(name, old, newDef) {
32078
+ function diffProperty(name2, old, newDef) {
32030
32079
  const diffs = [];
32031
32080
  const newType = newDef["$type"] ?? "";
32032
32081
  const newCategory = newDef["$category"] ?? "";
@@ -32037,15 +32086,15 @@ function diffProperty(name, old, newDef) {
32037
32086
  const requiredChanged = old.required !== newRequired;
32038
32087
  const defaultChanged = JSON.stringify(old.default) !== JSON.stringify(newDefault);
32039
32088
  if (!typeChanged && !categoryChanged && !requiredChanged && !defaultChanged) return [];
32040
- diffs.push({ key: `${name}-old`, color: PALETTE.error, text: `- ${name}: ${formatOldProp(old)}` });
32041
- diffs.push({ key: `${name}-new`, color: PALETTE.success, text: `+ ${name}: ${formatPropDef(newDef)}` });
32089
+ diffs.push({ key: `${name2}-old`, color: PALETTE.error, text: `- ${name2}: ${formatOldProp(old)}` });
32090
+ diffs.push({ key: `${name2}-new`, color: PALETTE.success, text: `+ ${name2}: ${formatPropDef(newDef)}` });
32042
32091
  return diffs;
32043
32092
  }
32044
32093
  function formatDefault(value) {
32045
32094
  const sys = value?.sys;
32046
32095
  if (sys?.linkType === "Contentful:DesignToken" && typeof sys.urn === "string") {
32047
- const name = sys.urn.split("/designTokens/")[1];
32048
- if (name) return name;
32096
+ const name2 = sys.urn.split("/designTokens/")[1];
32097
+ if (name2) return name2;
32049
32098
  }
32050
32099
  return JSON.stringify(value);
32051
32100
  }
@@ -32111,8 +32160,8 @@ function buildPreviewSummaryLines(preview) {
32111
32160
  text: ` \uFF0B ${components.new.length} components will be created`
32112
32161
  });
32113
32162
  for (const [index, item] of components.new.entries()) {
32114
- const name = item.key ?? item.$name ?? "unknown";
32115
- lines.push({ key: `summary-components-new-${index}`, color: PALETTE.success, text: ` + ${name}` });
32163
+ const name2 = item.key ?? item.$name ?? "unknown";
32164
+ lines.push({ key: `summary-components-new-${index}`, color: PALETTE.success, text: ` + ${name2}` });
32116
32165
  }
32117
32166
  }
32118
32167
  if (components.changed.length > 0) {
@@ -32205,27 +32254,27 @@ function getPreviewScrollOffset(input, downArrow, upArrow, diffExpanded, current
32205
32254
  }
32206
32255
  return void 0;
32207
32256
  }
32208
- function appendChangedPreviewLine(lines, keyPrefix, name, hasPendingDraftChanges, changeClassification) {
32257
+ function appendChangedPreviewLine(lines, keyPrefix, name2, hasPendingDraftChanges, changeClassification) {
32209
32258
  lines.push({
32210
- key: `${keyPrefix}-h-${name}`,
32259
+ key: `${keyPrefix}-h-${name2}`,
32211
32260
  color: PALETTE.warning,
32212
- text: ` ~ ${name}${hasPendingDraftChanges ? " \u26A1 has pending draft changes" : ""}`
32261
+ text: ` ~ ${name2}${hasPendingDraftChanges ? " \u26A1 has pending draft changes" : ""}`
32213
32262
  });
32214
32263
  if (changeClassification?.classification !== "breaking") return;
32215
32264
  const reasons = changeClassification.breakingChanges.map((bc) => `${"slotId" in bc ? bc.slotId : bc.propertyId}: ${bc.reason}`).join(", ");
32216
- lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE.error, text: ` \u26A0 BREAKING: ${reasons}` });
32265
+ lines.push({ key: `${keyPrefix}-b-${name2}`, color: PALETTE.error, text: ` \u26A0 BREAKING: ${reasons}` });
32217
32266
  }
32218
32267
  function buildPreviewDiffLines(preview) {
32219
32268
  const lines = [];
32220
32269
  const { components, tokens } = preview;
32221
32270
  for (const item of components.new) {
32222
32271
  const raw = item;
32223
- const name = raw.key ?? raw.$name ?? "unknown";
32224
- lines.push({ key: `comp-new-${name}`, color: PALETTE.success, text: ` + ${name}` });
32272
+ const name2 = raw.key ?? raw.$name ?? "unknown";
32273
+ lines.push({ key: `comp-new-${name2}`, color: PALETTE.success, text: ` + ${name2}` });
32225
32274
  const slots = raw.$slots ?? {};
32226
32275
  for (const slotName of Object.keys(slots).sort()) {
32227
32276
  lines.push({
32228
- key: `comp-new-${name}-slot-${slotName}`,
32277
+ key: `comp-new-${name2}-slot-${slotName}`,
32229
32278
  color: PALETTE.success,
32230
32279
  text: ` slot: ${slotName}`
32231
32280
  });
@@ -32233,7 +32282,7 @@ function buildPreviewDiffLines(preview) {
32233
32282
  if (Array.isArray(allowed) && allowed.length > 0) {
32234
32283
  const names = allowed.filter((n) => typeof n === "string");
32235
32284
  lines.push({
32236
- key: `comp-new-${name}-slot-${slotName}-allow`,
32285
+ key: `comp-new-${name2}-slot-${slotName}-allow`,
32237
32286
  color: PALETTE.success,
32238
32287
  text: ` allowedComponents: [${names.join(", ")}]`
32239
32288
  });
@@ -32271,8 +32320,8 @@ function buildPreviewDiffLines(preview) {
32271
32320
  }
32272
32321
  for (const item of tokens.new) {
32273
32322
  const raw = item;
32274
- const name = raw.name ?? raw.path ?? "unknown";
32275
- lines.push({ key: `tok-new-${name}`, color: PALETTE.success, text: ` + ${name}` });
32323
+ const name2 = raw.name ?? raw.path ?? "unknown";
32324
+ lines.push({ key: `tok-new-${name2}`, color: PALETTE.success, text: ` + ${name2}` });
32276
32325
  }
32277
32326
  for (const item of tokens.removed) {
32278
32327
  lines.push({ key: `tok-rm-${item.name}`, color: PALETTE.error, text: ` - ${item.name}` });
@@ -33580,7 +33629,7 @@ var init_PageContainer3 = __esm({
33580
33629
  import { existsSync as existsSync11 } from "node:fs";
33581
33630
  function diffSnapshots(before, after) {
33582
33631
  const names = [.../* @__PURE__ */ new Set([...Object.keys(before), ...Object.keys(after)])];
33583
- const changed_fields = names.filter((name) => before[name] !== after[name]);
33632
+ const changed_fields = names.filter((name2) => before[name2] !== after[name2]);
33584
33633
  return { changed: changed_fields.length > 0, changed_fields };
33585
33634
  }
33586
33635
  function createTrail(limit = DEFAULT_TRAIL_LIMIT) {
@@ -33618,11 +33667,11 @@ var init_debug_trail = __esm({
33618
33667
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/agent-status.ts
33619
33668
  import { execFile as execFile2 } from "node:child_process";
33620
33669
  import { access as access5, constants } from "node:fs/promises";
33621
- function effectiveBinary(name, savedBinary) {
33622
- return savedBinary.trim() || AGENT_BINARIES[name];
33670
+ function effectiveBinary(name2, savedBinary) {
33671
+ return savedBinary.trim() || AGENT_BINARIES[name2];
33623
33672
  }
33624
- function defaultModelLabel(name) {
33625
- const model = DEFAULT_MODELS[name];
33673
+ function defaultModelLabel(name2) {
33674
+ const model = DEFAULT_MODELS[name2];
33626
33675
  return model && model !== "Auto" ? model : "chosen by the agent";
33627
33676
  }
33628
33677
  function resolveOnPath(binary) {
@@ -33649,32 +33698,32 @@ function readVersion(binary) {
33649
33698
  });
33650
33699
  });
33651
33700
  }
33652
- async function inspect(name, binary) {
33653
- const target = effectiveBinary(name, binary);
33701
+ async function inspect(name2, binary) {
33702
+ const target = effectiveBinary(name2, binary);
33654
33703
  const found = await resolveOnPath(target);
33655
33704
  if (!found) return { checks: [fail3("path", `\`${target}\` was not found or is not executable`)], found: null };
33656
33705
  const checks = [pass("path", found)];
33657
33706
  checks.push(await readVersion(found));
33658
- if (name === "claude") {
33659
- const auth = await withBinaryEnv(name, found, () => checkAgentAuth(name));
33707
+ if (name2 === "claude") {
33708
+ const auth = await withBinaryEnv(name2, found, () => checkAgentAuth(name2));
33660
33709
  checks.push(
33661
33710
  auth === "ok" ? pass("login", "logged in") : fail3("login", auth === "not-found" ? "binary not found" : `not logged in: ${LOGIN_HINTS.claude}`)
33662
33711
  );
33663
33712
  }
33664
33713
  return { checks, found };
33665
33714
  }
33666
- async function inspectAgent(name, binary) {
33667
- return (await inspect(name, binary)).checks;
33715
+ async function inspectAgent(name2, binary) {
33716
+ return (await inspect(name2, binary)).checks;
33668
33717
  }
33669
- async function testAgent(name, binary, model) {
33670
- const { checks, found } = await inspect(name, binary);
33718
+ async function testAgent(name2, binary, model) {
33719
+ const { checks, found } = await inspect(name2, binary);
33671
33720
  if (!found || !checks.every((check) => check.step === "version" || check.ok)) return checks;
33672
33721
  const started = Date.now();
33673
33722
  const result = await withBinaryEnv(
33674
- name,
33723
+ name2,
33675
33724
  found,
33676
33725
  () => createLocalCliAgentInvoker().invoke({
33677
- agent: name,
33726
+ agent: name2,
33678
33727
  ...model.trim() ? { model: model.trim() } : {},
33679
33728
  prompt: TEST_PROMPT,
33680
33729
  timeoutMs: PROMPT_TIMEOUT_MS
@@ -33690,7 +33739,7 @@ async function testAgent(name, binary, model) {
33690
33739
  }
33691
33740
  return [...checks, pass("prompt", `answered in ${seconds}s`)];
33692
33741
  }
33693
- function statusFromChecks(name, checks, savedBinary) {
33742
+ function statusFromChecks(name2, checks, savedBinary) {
33694
33743
  if (checks.length === 0) return "checking";
33695
33744
  if (checks.some((check) => check.step === "path" && !check.ok)) {
33696
33745
  return savedBinary.trim() ? "not-found" : "not-configured";
@@ -33702,13 +33751,13 @@ function statusFromChecks(name, checks, savedBinary) {
33702
33751
  }
33703
33752
  const login = checks.find((check) => check.step === "login");
33704
33753
  if (login) return login.ok ? "ready" : "not-logged-in";
33705
- return name === "claude" ? "ready" : "unknown";
33754
+ return name2 === "claude" ? "ready" : "unknown";
33706
33755
  }
33707
- function setupHint(name, status) {
33708
- if (status === "not-configured") return `${INSTALL_HINTS[name]}, or set its command path in settings`;
33709
- if (status === "not-found") return `${INSTALL_HINTS[name]}, or correct the command path in settings`;
33710
- if (status === "not-logged-in") return LOGIN_HINTS[name];
33711
- if (status === "test-failed") return `read the test message; if it is a login problem, ${LOGIN_HINTS[name]}`;
33756
+ function setupHint(name2, status) {
33757
+ if (status === "not-configured") return `${INSTALL_HINTS[name2]}, or set its command path in settings`;
33758
+ if (status === "not-found") return `${INSTALL_HINTS[name2]}, or correct the command path in settings`;
33759
+ if (status === "not-logged-in") return LOGIN_HINTS[name2];
33760
+ if (status === "test-failed") return `read the test message; if it is a login problem, ${LOGIN_HINTS[name2]}`;
33712
33761
  if (status === "timed-out") return "it may be slow or waiting for input; run the test again, or try it in a terminal";
33713
33762
  if (status === "unknown") return "run a full test to confirm it is logged in";
33714
33763
  return "";
@@ -33720,14 +33769,14 @@ function testOutcome(checks) {
33720
33769
  if (prompt.timedOut) return { ok: false, text: `Test timed out: ${prompt.detail}` };
33721
33770
  return { ok: false, text: `Test failed: ${prompt.detail}` };
33722
33771
  }
33723
- function modelLine(name, savedModel) {
33772
+ function modelLine(name2, savedModel) {
33724
33773
  const model = savedModel.trim();
33725
- return model ? model : `${defaultModelLabel(name)} (built-in default)`;
33774
+ return model ? model : `${defaultModelLabel(name2)} (built-in default)`;
33726
33775
  }
33727
- function baseRows(name, checks, savedBinary) {
33776
+ function baseRows(name2, checks, savedBinary) {
33728
33777
  const path5 = checks.find((check) => check.step === "path");
33729
33778
  const version2 = checks.find((check) => check.step === "version");
33730
- const hint = setupHint(name, statusFromChecks(name, checks, savedBinary));
33779
+ const hint = setupHint(name2, statusFromChecks(name2, checks, savedBinary));
33731
33780
  const setup = hint ? { label: "Setup", value: hint, tone: "muted" } : void 0;
33732
33781
  if (!path5?.ok) {
33733
33782
  const saved = savedBinary.trim() !== "";
@@ -33749,15 +33798,15 @@ function baseRows(name, checks, savedBinary) {
33749
33798
  found: true
33750
33799
  };
33751
33800
  }
33752
- function panelRows(name, checks, settings) {
33801
+ function panelRows(name2, checks, settings) {
33753
33802
  if (!checks) return checking;
33754
- const { command, version: version2, setup, found } = baseRows(name, checks, settings.binary);
33755
- const model = { label: "Model", value: modelLine(name, settings.model), tone: "muted" };
33803
+ const { command, version: version2, setup, found } = baseRows(name2, checks, settings.binary);
33804
+ const model = { label: "Model", value: modelLine(name2, settings.model), tone: "muted" };
33756
33805
  return [command, ...found ? [...version2?.tone === "ok" ? [version2] : [], model] : [], ...setup ? [setup] : []];
33757
33806
  }
33758
- function statusRows(name, checks, savedBinary) {
33807
+ function statusRows(name2, checks, savedBinary) {
33759
33808
  if (!checks) return checking;
33760
- const { command, version: version2, setup, found } = baseRows(name, checks, savedBinary);
33809
+ const { command, version: version2, setup, found } = baseRows(name2, checks, savedBinary);
33761
33810
  if (!found) return [command];
33762
33811
  const login = checks.find((check) => check.step === "login");
33763
33812
  const prompt = checks.find((check) => check.step === "prompt");
@@ -33776,8 +33825,8 @@ function statusRows(name, checks, savedBinary) {
33776
33825
  const testRow = prompt ? [{ label: "Test", value: prompt.detail, tone: prompt.ok ? "ok" : "bad" }] : [];
33777
33826
  return [command, ...version2 ? [version2] : [], loginRow, ...testRow, ...setup ? [setup] : []];
33778
33827
  }
33779
- async function withBinaryEnv(name, binary, run) {
33780
- const key = `EDS_AGENT_BINARY_${name.toUpperCase()}`;
33828
+ async function withBinaryEnv(name2, binary, run) {
33829
+ const key = `EDS_AGENT_BINARY_${name2.toUpperCase()}`;
33781
33830
  const previous = process.env[key];
33782
33831
  process.env[key] = binary;
33783
33832
  try {
@@ -33828,9 +33877,9 @@ var init_agent_status = __esm({
33828
33877
  // packages/experience-design-system-cli/src/tui/settings/configuration/agents/agent-debug.ts
33829
33878
  function agentSnapshot(config) {
33830
33879
  const snapshot = { default_agent: config.defaultAgent };
33831
- for (const name of AGENT_NAMES) {
33832
- snapshot[`${name}.model`] = config.agents[name].model;
33833
- snapshot[`${name}.binary`] = config.agents[name].binary;
33880
+ for (const name2 of AGENT_NAMES) {
33881
+ snapshot[`${name2}.model`] = config.agents[name2].model;
33882
+ snapshot[`${name2}.binary`] = config.agents[name2].binary;
33834
33883
  }
33835
33884
  return snapshot;
33836
33885
  }
@@ -33847,10 +33896,10 @@ function environmentFrom(checks, savedBinary, envValue) {
33847
33896
  }
33848
33897
  async function describeAgents(config) {
33849
33898
  const entries = await Promise.all(
33850
- AGENT_NAMES.map(async (name) => {
33851
- const saved = config.agents[name].binary;
33852
- const checks = await inspectAgent(name, saved);
33853
- return [name, environmentFrom(checks, saved, process.env[`EDS_AGENT_BINARY_${name.toUpperCase()}`])];
33899
+ AGENT_NAMES.map(async (name2) => {
33900
+ const saved = config.agents[name2].binary;
33901
+ const checks = await inspectAgent(name2, saved);
33902
+ return [name2, environmentFrom(checks, saved, process.env[`EDS_AGENT_BINARY_${name2.toUpperCase()}`])];
33854
33903
  })
33855
33904
  );
33856
33905
  return Object.fromEntries(entries);
@@ -33867,11 +33916,11 @@ var init_agent_debug = __esm({
33867
33916
  import { Text as Text49 } from "ink";
33868
33917
  import { jsx as jsx59 } from "react/jsx-runtime";
33869
33918
  function AgentStatusBadge({
33870
- name,
33919
+ name: name2,
33871
33920
  checks,
33872
33921
  binary
33873
33922
  }) {
33874
- const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
33923
+ const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name2, checks, binary) : "checking"];
33875
33924
  return /* @__PURE__ */ jsx59(Text49, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
33876
33925
  }
33877
33926
  var TONE_COLOR;
@@ -33899,13 +33948,13 @@ function StatusHeading() {
33899
33948
  ] });
33900
33949
  }
33901
33950
  function AgentDetail({
33902
- name,
33951
+ name: name2,
33903
33952
  config,
33904
33953
  setConfig,
33905
33954
  onBack,
33906
33955
  record: record3
33907
33956
  }) {
33908
- const settings = config.agents[name];
33957
+ const settings = config.agents[name2];
33909
33958
  const [saving, setSaving] = useState33(false);
33910
33959
  const [testing, setTesting] = useState33(false);
33911
33960
  const [notice, setNotice] = useState33(null);
@@ -33914,38 +33963,38 @@ function AgentDetail({
33914
33963
  let active = true;
33915
33964
  setChecks(void 0);
33916
33965
  const timer = setTimeout(() => {
33917
- void inspectAgent(name, settings.binary).then((result) => active && setChecks(result));
33966
+ void inspectAgent(name2, settings.binary).then((result) => active && setChecks(result));
33918
33967
  }, INSPECT_DELAY_MS);
33919
33968
  return () => {
33920
33969
  active = false;
33921
33970
  clearTimeout(timer);
33922
33971
  };
33923
- }, [name, settings.binary]);
33972
+ }, [name2, settings.binary]);
33924
33973
  const save = () => {
33925
33974
  setSaving(true);
33926
33975
  setNotice(null);
33927
33976
  writeAgentConfig(config).then(() => {
33928
33977
  applyBinaryOverrides(config);
33929
- record3(`saved ${name}`);
33930
- setNotice({ kind: "success", text: `Saved: ${AGENT_LABELS[name]} settings are written to config.json` });
33978
+ record3(`saved ${name2}`);
33979
+ setNotice({ kind: "success", text: `Saved: ${AGENT_LABELS[name2]} settings are written to config.json` });
33931
33980
  }).catch((err) => {
33932
- record3(`saving ${name} failed`, err);
33981
+ record3(`saving ${name2} failed`, err);
33933
33982
  setNotice({ kind: "error", text: `Not saved: ${err instanceof Error ? err.message : String(err)}` });
33934
33983
  }).finally(() => setSaving(false));
33935
33984
  };
33936
33985
  const runTest = () => {
33937
33986
  setTesting(true);
33938
33987
  setNotice(null);
33939
- testAgent(name, settings.binary, settings.model).then((result) => {
33988
+ testAgent(name2, settings.binary, settings.model).then((result) => {
33940
33989
  setChecks(result);
33941
33990
  const outcome = testOutcome(result);
33942
33991
  if (!outcome || !outcome.ok)
33943
- record3(`test of ${name} failed: ${outcome?.text ?? "the agent could not be started"}`);
33992
+ record3(`test of ${name2} failed: ${outcome?.text ?? "the agent could not be started"}`);
33944
33993
  setNotice(
33945
33994
  outcome ? { kind: outcome.ok ? "success" : "error", text: outcome.text } : { kind: "error", text: "Test not run: the agent could not be started (see Status)" }
33946
33995
  );
33947
33996
  }).catch((err) => {
33948
- record3(`test of ${name} could not run`, err);
33997
+ record3(`test of ${name2} could not run`, err);
33949
33998
  setNotice({ kind: "error", text: `Test could not run: ${err instanceof Error ? err.message : String(err)}` });
33950
33999
  }).finally(() => setTesting(false));
33951
34000
  };
@@ -33956,19 +34005,19 @@ function AgentDetail({
33956
34005
  hint: "run test",
33957
34006
  onRun: runTest
33958
34007
  };
33959
- const formFields = fields(name);
34008
+ const formFields = fields(name2);
33960
34009
  const labelWidth = formLabelWidth([...formFields, action]);
33961
34010
  return /* @__PURE__ */ jsx60(
33962
34011
  FieldForm,
33963
34012
  {
33964
- title: `Settings \u203A Configuration \u203A Agents \u203A ${AGENT_LABELS[name]}`,
33965
- subtitle: config.defaultAgent === name ? "This is the default agent." : `Runs the \`${AGENT_BINARIES[name]}\` command.`,
34013
+ title: `Settings \u203A Configuration \u203A Agents \u203A ${AGENT_LABELS[name2]}`,
34014
+ subtitle: config.defaultAgent === name2 ? "This is the default agent." : `Runs the \`${AGENT_BINARIES[name2]}\` command.`,
33966
34015
  fields: formFields,
33967
34016
  values: { binary: settings.binary, model: settings.model },
33968
34017
  onChange: (key, value) => {
33969
- setConfig({ ...config, agents: { ...config.agents, [name]: { ...settings, [key]: value } } });
34018
+ setConfig({ ...config, agents: { ...config.agents, [name2]: { ...settings, [key]: value } } });
33970
34019
  setNotice(null);
33971
- record3(`edited ${name}.${key}`);
34020
+ record3(`edited ${name2}.${key}`);
33972
34021
  },
33973
34022
  onSave: save,
33974
34023
  onQuit: onBack,
@@ -33977,7 +34026,7 @@ function AgentDetail({
33977
34026
  busy: saving || testing,
33978
34027
  children: /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", marginTop: 1, children: [
33979
34028
  /* @__PURE__ */ jsx60(StatusHeading, {}),
33980
- statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsx60(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx60(Text50, { color: TONE_COLOR[row.tone], children: row.value }) }, row.label))
34029
+ statusRows(name2, checks, settings.binary).map((row) => /* @__PURE__ */ jsx60(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx60(Text50, { color: TONE_COLOR[row.tone], children: row.value }) }, row.label))
33981
34030
  ] })
33982
34031
  }
33983
34032
  );
@@ -33993,9 +34042,9 @@ var init_AgentDetail = __esm({
33993
34042
  init_agent_status();
33994
34043
  init_AgentStatusBadge();
33995
34044
  init_apply_binary_overrides();
33996
- fields = (name) => [
33997
- { key: "binary", label: "Command path", hint: `(empty: \`${AGENT_BINARIES[name]}\` from the PATH)` },
33998
- { key: "model", label: "Model", hint: `(empty: ${defaultModelLabel(name)})` }
34045
+ fields = (name2) => [
34046
+ { key: "binary", label: "Command path", hint: `(empty: \`${AGENT_BINARIES[name2]}\` from the PATH)` },
34047
+ { key: "model", label: "Model", hint: `(empty: ${defaultModelLabel(name2)})` }
33999
34048
  ];
34000
34049
  INSPECT_DELAY_MS = 400;
34001
34050
  }
@@ -34020,9 +34069,9 @@ function AgentsScreen({ onDone }) {
34020
34069
  error: ""
34021
34070
  }).current;
34022
34071
  const inspectAll = (loaded) => {
34023
- for (const name of AGENT_NAMES) {
34024
- void inspectAgent(name, loaded.agents[name].binary).then(
34025
- (result) => setChecks((previous) => ({ ...previous, [name]: result }))
34072
+ for (const name2 of AGENT_NAMES) {
34073
+ void inspectAgent(name2, loaded.agents[name2].binary).then(
34074
+ (result) => setChecks((previous) => ({ ...previous, [name2]: result }))
34026
34075
  );
34027
34076
  }
34028
34077
  };
@@ -34062,21 +34111,21 @@ function AgentsScreen({ onDone }) {
34062
34111
  exitMethod: change.changed ? "saved" : "discarded"
34063
34112
  });
34064
34113
  };
34065
- const makeDefault = (name) => {
34114
+ const makeDefault = (name2) => {
34066
34115
  if (!config || saving) return;
34067
- if (name === config.defaultAgent) {
34068
- setNotice({ kind: "success", text: `${AGENT_LABELS[name]} is already the default agent` });
34116
+ if (name2 === config.defaultAgent) {
34117
+ setNotice({ kind: "success", text: `${AGENT_LABELS[name2]} is already the default agent` });
34069
34118
  return;
34070
34119
  }
34071
34120
  setSaving(true);
34072
34121
  setNotice(null);
34073
- writeAgentConfig({ ...config, defaultAgent: name, defaultChosen: true }).then(() => {
34074
- setConfig((current) => current ? { ...current, defaultAgent: name, defaultChosen: true } : current);
34075
- setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[name]}` });
34076
- visit.trail.record(`made ${name} the default`);
34122
+ writeAgentConfig({ ...config, defaultAgent: name2, defaultChosen: true }).then(() => {
34123
+ setConfig((current) => current ? { ...current, defaultAgent: name2, defaultChosen: true } : current);
34124
+ setNotice({ kind: "success", text: `Default agent is now ${AGENT_LABELS[name2]}` });
34125
+ visit.trail.record(`made ${name2} the default`);
34077
34126
  }).catch((err) => {
34078
34127
  visit.error = scrubError(err, []);
34079
- visit.trail.record(`making ${name} the default failed`);
34128
+ visit.trail.record(`making ${name2} the default failed`);
34080
34129
  setNotice({ kind: "error", text: `Default agent not changed: ${visit.error}` });
34081
34130
  }).finally(() => setSaving(false));
34082
34131
  };
@@ -34163,14 +34212,14 @@ function AgentsScreen({ onDone }) {
34163
34212
  /* @__PURE__ */ jsx61(Box49, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx61(Text51, { color: PALETTE.muted, children: "AGENT" }) }),
34164
34213
  /* @__PURE__ */ jsx61(Text51, { color: PALETTE.muted, children: "STATUS" })
34165
34214
  ] }),
34166
- AGENT_NAMES.map((name) => {
34167
- const isFocused = focusedAgent === name;
34215
+ AGENT_NAMES.map((name2) => {
34216
+ const isFocused = focusedAgent === name2;
34168
34217
  return /* @__PURE__ */ jsxs49(Box49, { gap: 1, children: [
34169
34218
  /* @__PURE__ */ jsx61(Text51, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
34170
- /* @__PURE__ */ jsx61(Text51, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
34171
- /* @__PURE__ */ jsx61(Box49, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx61(Text51, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
34172
- /* @__PURE__ */ jsx61(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
34173
- ] }, name);
34219
+ /* @__PURE__ */ jsx61(Text51, { color: PALETTE.success, children: name2 === config.defaultAgent ? "\u2605" : " " }),
34220
+ /* @__PURE__ */ jsx61(Box49, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx61(Text51, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name2] }) }),
34221
+ /* @__PURE__ */ jsx61(AgentStatusBadge, { name: name2, checks: checks[name2], binary: config.agents[name2].binary })
34222
+ ] }, name2);
34174
34223
  }),
34175
34224
  /* @__PURE__ */ jsxs49(Box49, { flexDirection: "column", marginTop: 1, children: [
34176
34225
  /* @__PURE__ */ jsx61(Text51, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),