linkque-cli-v2 1.2.5 → 1.2.6

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/linkquejs.js CHANGED
@@ -759,8 +759,8 @@ ${itemIndentStr}`);
759
759
  * @param {number} width
760
760
  * @returns {string}
761
761
  */
762
- boxWrap(str, width2) {
763
- if (width2 < this.minWidthToWrap) return str;
762
+ boxWrap(str, width) {
763
+ if (width < this.minWidthToWrap) return str;
764
764
  const rawLines = str.split(/\r\n|\n/);
765
765
  const chunkPattern = /[\s]*[^\s]+/g;
766
766
  const wrappedLines = [];
@@ -774,7 +774,7 @@ ${itemIndentStr}`);
774
774
  let sumWidth = this.displayWidth(sumChunks[0]);
775
775
  chunks.forEach((chunk) => {
776
776
  const visibleWidth = this.displayWidth(chunk);
777
- if (sumWidth + visibleWidth <= width2) {
777
+ if (sumWidth + visibleWidth <= width) {
778
778
  sumChunks.push(chunk);
779
779
  sumWidth += visibleWidth;
780
780
  return;
@@ -6535,6 +6535,7 @@ var require_utils = __commonJS({
6535
6535
  "use strict";
6536
6536
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
6537
6537
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
6538
+ var isPort = RegExp.prototype.test.bind(/^\d*$/u);
6538
6539
  var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
6539
6540
  var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
6540
6541
  var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
@@ -7000,8 +7001,12 @@ var require_utils = __commonJS({
7000
7001
  uriTokens.push(host);
7001
7002
  }
7002
7003
  if (typeof component.port === "number" || typeof component.port === "string") {
7004
+ const port = String(component.port);
7005
+ if (!isPort(port)) {
7006
+ throw new TypeError("URI port is malformed.");
7007
+ }
7003
7008
  uriTokens.push(":");
7004
- uriTokens.push(String(component.port));
7009
+ uriTokens.push(port);
7005
7010
  }
7006
7011
  return uriTokens.length ? uriTokens.join("") : void 0;
7007
7012
  }
@@ -7444,12 +7449,15 @@ var require_fast_uri = __commonJS({
7444
7449
  }
7445
7450
  return false;
7446
7451
  }
7452
+ function isIPLiteral(host) {
7453
+ return host[0] === "[" && host[host.length - 1] === "]";
7454
+ }
7447
7455
  function hasMalformedComponentPercentEncoding(matches) {
7448
7456
  const host = matches[4];
7449
- return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !(host[0] === "[" && host[host.length - 1] === "]") && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
7457
+ return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
7450
7458
  }
7451
7459
  function canonicalizeHost(parsed, options, schemeHandler, isIP) {
7452
- if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && parsed.host[0] !== "[" && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
7460
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
7453
7461
  try {
7454
7462
  parsed.host = new URL("http://" + parsed.host).hostname;
7455
7463
  } catch (e3) {
@@ -7536,10 +7544,11 @@ var require_fast_uri = __commonJS({
7536
7544
  if (parsed.host) {
7537
7545
  const ipv4result = isIPv4(parsed.host);
7538
7546
  if (ipv4result === false) {
7539
- const bracketedIPLiteral = parsed.host[0] === "[" && parsed.host[parsed.host.length - 1] === "]";
7547
+ const bracketedIPLiteral = isIPLiteral(parsed.host);
7548
+ const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
7540
7549
  const ipv6result = normalizeIPv6(parsed.host);
7541
7550
  isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
7542
- malformedIPLiteral = bracketedIPLiteral && ipv6result.error === true;
7551
+ malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
7543
7552
  parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
7544
7553
  if (malformedIPLiteral) {
7545
7554
  parsed.error = parsed.error || "URI host is malformed.";
@@ -7562,7 +7571,9 @@ var require_fast_uri = __commonJS({
7562
7571
  parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
7563
7572
  }
7564
7573
  const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
7565
- malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
7574
+ if (!malformedIPLiteral) {
7575
+ malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
7576
+ }
7566
7577
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
7567
7578
  if (uri.indexOf("%") !== -1) {
7568
7579
  if (parsed.host !== void 0 && !malformedIPLiteral) {
@@ -14347,21 +14358,16 @@ var init_codec_pool = __esm({
14347
14358
 
14348
14359
  // ../../node_modules/@zip.js/zip.js/lib/core/util/decode-cp437.js
14349
14360
  function decodeCP437(stringValue) {
14350
- if (VALID_CP437) {
14351
- let result = "";
14352
- for (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {
14353
- result += CP437[stringValue[indexCharacter]];
14354
- }
14355
- return result;
14356
- } else {
14357
- return new TextDecoder().decode(stringValue);
14361
+ let result = "";
14362
+ for (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {
14363
+ result += CP437[stringValue[indexCharacter]];
14358
14364
  }
14365
+ return result;
14359
14366
  }
14360
- var CP437, VALID_CP437;
14367
+ var CP437;
14361
14368
  var init_decode_cp437 = __esm({
14362
14369
  "../../node_modules/@zip.js/zip.js/lib/core/util/decode-cp437.js"() {
14363
14370
  CP437 = "\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0".split("");
14364
- VALID_CP437 = CP437.length == 256;
14365
14371
  }
14366
14372
  });
14367
14373
 
@@ -19866,7 +19872,6 @@ var loadAgentProtocol = async (rawConfigPath, cwd) => {
19866
19872
  // ../linkque-agent-runtime/dist/esm/core/types.js
19867
19873
  var EDebugLogScope;
19868
19874
  (function(EDebugLogScope2) {
19869
- EDebugLogScope2["A2UI_ACTION"] = "A2UI_ACTION";
19870
19875
  EDebugLogScope2["CONFIG"] = "CONFIG";
19871
19876
  EDebugLogScope2["LLM"] = "LLM";
19872
19877
  EDebugLogScope2["PI_EVENT"] = "PI_EVENT";
@@ -21312,6 +21317,7 @@ var colors = [
21312
21317
  "default",
21313
21318
  "muted",
21314
21319
  "primary",
21320
+ "accent",
21315
21321
  "success",
21316
21322
  "warning",
21317
21323
  "error",
@@ -21363,18 +21369,8 @@ var iconNames = [
21363
21369
  "warning",
21364
21370
  "arrow-right-long"
21365
21371
  ];
21366
- var layoutItem = {
21367
- grow: {
21368
- kind: "number",
21369
- values: [0, 1, 2, 3, 4],
21370
- parentComponents: ["Row", "Column"]
21371
- }
21372
- };
21373
- var width = { width: { kind: "string", values: ["fit", "fill"] } };
21374
- var radius = {
21375
- radius: { kind: "string", values: ["none", "xs", "sm", "md", "full"] }
21376
- };
21377
- var decoration = {
21372
+ var box = {
21373
+ margin: { kind: "string", values: spacing },
21378
21374
  padding: { kind: "string", values: spacing },
21379
21375
  background: {
21380
21376
  kind: "string",
@@ -21392,17 +21388,29 @@ var decoration = {
21392
21388
  kind: "string",
21393
21389
  values: ["none", "subtle", "card-border", "primary"]
21394
21390
  },
21395
- ...radius
21391
+ radius: { kind: "string", values: ["none", "xs", "sm", "md", "full"] },
21392
+ width: { kind: "string", values: ["fit", "fill"] },
21393
+ grow: { kind: "number", values: [0, 1, 2, 3, 4] },
21394
+ shrink: { kind: "boolean" }
21396
21395
  };
21397
21396
  var typography = {
21398
21397
  color: { kind: "string", values: colors },
21399
- fontSize: { kind: "string", values: ["xs", "sm", "md", "lg", "xl", "xxl"] },
21398
+ fontSize: {
21399
+ kind: "string",
21400
+ values: [
21401
+ "small",
21402
+ "medium",
21403
+ "large",
21404
+ "striking",
21405
+ "display",
21406
+ "badge",
21407
+ "merchant"
21408
+ ]
21409
+ },
21400
21410
  fontWeight: { kind: "string", values: ["normal", "semibold", "bold"] }
21401
21411
  };
21402
21412
  var container = {
21403
- ...layoutItem,
21404
- ...width,
21405
- padding: { kind: "string", values: spacing },
21413
+ ...box,
21406
21414
  children: { kind: "children", required: true },
21407
21415
  gap: { kind: "string", values: spacing },
21408
21416
  align: {
@@ -21422,7 +21430,6 @@ var container = {
21422
21430
  },
21423
21431
  "x2-overflow": { kind: "format" }
21424
21432
  };
21425
- var { justify: _listJustify, ...listContainer } = container;
21426
21433
  var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
21427
21434
  catalogId: LINKQUE_A2UI_V4_CATALOG_ID,
21428
21435
  protocolVersion: "0.9",
@@ -21430,10 +21437,7 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
21430
21437
  Card: {
21431
21438
  interaction: "action",
21432
21439
  properties: {
21433
- ...layoutItem,
21434
- ...width,
21435
- ...decoration,
21436
- child: { kind: "child", required: true },
21440
+ ...container,
21437
21441
  action: { kind: "action" },
21438
21442
  disabled: { kind: "boolean" }
21439
21443
  }
@@ -21449,7 +21453,7 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
21449
21453
  List: {
21450
21454
  interaction: "none",
21451
21455
  properties: {
21452
- ...listContainer,
21456
+ ...container,
21453
21457
  variant: {
21454
21458
  kind: "string",
21455
21459
  required: true,
@@ -21460,9 +21464,8 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
21460
21464
  Text: {
21461
21465
  interaction: "none",
21462
21466
  properties: {
21463
- ...layoutItem,
21467
+ ...box,
21464
21468
  ...typography,
21465
- shrink: { kind: "boolean" },
21466
21469
  text: { kind: "binding", required: true },
21467
21470
  maxLines: { kind: "number", values: [0, 1, 2, 3, 4, 5, 6] },
21468
21471
  decoration: { kind: "string", values: ["line-through"] },
@@ -21472,31 +21475,19 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
21472
21475
  Tag: {
21473
21476
  interaction: "none",
21474
21477
  properties: {
21475
- ...layoutItem,
21478
+ ...box,
21479
+ ...typography,
21476
21480
  text: { kind: "binding", required: true },
21477
21481
  icon: { kind: "string", values: iconNames },
21478
- tone: {
21479
- kind: "string",
21480
- values: [
21481
- "default",
21482
- "muted",
21483
- "primary",
21484
- "success",
21485
- "warning",
21486
- "error"
21487
- ]
21488
- },
21489
- variant: { kind: "string", values: ["soft", "outline", "plain"] },
21490
- size: { kind: "string", values: ["sm", "md"] },
21491
- shrink: { kind: "boolean" },
21492
- maxLines: { kind: "number", values: [0, 1, 2, 3, 4, 5, 6] }
21482
+ gap: { kind: "string", values: spacing },
21483
+ maxLines: { kind: "number", values: [0, 1, 2, 3, 4, 5, 6] },
21484
+ format: { kind: "format" }
21493
21485
  }
21494
21486
  },
21495
21487
  Button: {
21496
21488
  interaction: "action",
21497
21489
  properties: {
21498
- ...layoutItem,
21499
- ...width,
21490
+ ...box,
21500
21491
  label: { kind: "binding", required: true },
21501
21492
  action: { kind: "action", required: true },
21502
21493
  checks: { kind: "format" },
@@ -21514,29 +21505,34 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
21514
21505
  Image: {
21515
21506
  interaction: "none",
21516
21507
  properties: {
21517
- ...layoutItem,
21518
- ...radius,
21508
+ ...box,
21519
21509
  src: { kind: "binding", required: true },
21520
21510
  alt: { kind: "binding" },
21521
21511
  fit: {
21522
21512
  kind: "string",
21523
21513
  values: ["contain", "cover", "fill", "none", "scale-down"]
21524
21514
  },
21525
- aspectRatio: {
21526
- kind: "string",
21527
- values: ["square", "portrait", "landscape", "wide", "banner"]
21528
- },
21529
- height: { kind: "string", values: ["auto", "fill"] },
21530
- size: {
21515
+ variant: {
21531
21516
  kind: "string",
21532
- values: ["xs", "sm", "md", "lg", "xl", "full"]
21517
+ values: [
21518
+ "icon",
21519
+ "avatar",
21520
+ "merchantLogo",
21521
+ "smallFeature",
21522
+ "mediumFeature",
21523
+ "portraitFeature",
21524
+ "productThumbnail",
21525
+ "voucherThumbnail",
21526
+ "largeFeature",
21527
+ "header"
21528
+ ]
21533
21529
  }
21534
21530
  }
21535
21531
  },
21536
21532
  Icon: {
21537
21533
  interaction: "none",
21538
21534
  properties: {
21539
- ...layoutItem,
21535
+ ...box,
21540
21536
  name: { kind: "string", required: true, values: iconNames },
21541
21537
  label: { kind: "string" },
21542
21538
  color: { kind: "string", values: colors },
@@ -21549,15 +21545,15 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
21549
21545
  Divider: {
21550
21546
  interaction: "none",
21551
21547
  properties: {
21552
- ...layoutItem,
21548
+ ...box,
21553
21549
  axis: { kind: "string", values: ["horizontal", "vertical"] }
21554
21550
  }
21555
21551
  },
21556
21552
  TextField: {
21557
21553
  interaction: "input",
21558
21554
  properties: {
21559
- ...layoutItem,
21560
- ...width,
21555
+ ...box,
21556
+ ...typography,
21561
21557
  label: { kind: "string", required: true },
21562
21558
  value: { kind: "binding", required: true },
21563
21559
  checks: { kind: "format" },
@@ -21581,8 +21577,7 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
21581
21577
  ChoicePicker: {
21582
21578
  interaction: "input",
21583
21579
  properties: {
21584
- ...layoutItem,
21585
- ...width,
21580
+ ...box,
21586
21581
  label: { kind: "string", required: true },
21587
21582
  value: { kind: "binding", required: true },
21588
21583
  options: { kind: "options", required: true },
@@ -21597,8 +21592,7 @@ var A2UI_V4_COMPONENT_CATALOG = Object.freeze({
21597
21592
  Stepper: {
21598
21593
  interaction: "input",
21599
21594
  properties: {
21600
- ...layoutItem,
21601
- ...width,
21595
+ ...box,
21602
21596
  label: { kind: "string", required: true },
21603
21597
  value: { kind: "binding", required: true },
21604
21598
  min: { kind: "number" },
@@ -21714,6 +21708,8 @@ function validateComponents(payload, path23, surfaces, issues) {
21714
21708
  if (value !== void 0)
21715
21709
  validateProperty(value, property, `${componentPath}.${name}`, issues, name);
21716
21710
  }
21711
+ if (component.component === "Tag" && component.icon === void 0 && component.gap !== void 0)
21712
+ issues.push(issue2(`${componentPath}.gap`, "TAG_GAP_REQUIRES_ICON", "Tag.gap requires Tag.icon"));
21717
21713
  if (component["x2-overflow"] !== void 0)
21718
21714
  validateOverflow(component, componentPath, issues);
21719
21715
  if (component.component === "TextField")
@@ -21727,7 +21723,7 @@ function validateComponents(payload, path23, surfaces, issues) {
21727
21723
  validateStepper(component, componentPath, issues);
21728
21724
  if (component.checks !== void 0)
21729
21725
  validateChecks(component.checks, `${componentPath}.checks`, issues);
21730
- if (component.format !== void 0 && component.component === "Text")
21726
+ if (component.format !== void 0 && (component.component === "Text" || component.component === "Tag"))
21731
21727
  validateNumberFormat(component.format, `${componentPath}.format`, issues);
21732
21728
  if (component.action !== void 0)
21733
21729
  validateAction(component.action, `${componentPath}.action`, issues, 0);
@@ -21741,11 +21737,6 @@ function validateProperty(value, schema, path23, issues, propertyName) {
21741
21737
  issues.push(issue2(path23, "INVALID_DISPLAY_VALUE", `display value must be ${stringOnly ? "a string" : "a string or finite number"}, or a compatible display binding`));
21742
21738
  return;
21743
21739
  }
21744
- if (schema.kind === "child") {
21745
- if (!isSafeIdentifier(value))
21746
- issues.push(issue2(path23, "INVALID_CHILD", "child must be a safe component id"));
21747
- return;
21748
- }
21749
21740
  if (schema.kind === "children") {
21750
21741
  const valid = Array.isArray(value) ? value.every(isSafeIdentifier) : isPlainRecord(value) && Object.keys(value).length === 2 && isSafeIdentifier(value.componentId) && typeof value.path === "string" && isSafePath(value.path);
21751
21742
  if (!valid)
@@ -21986,27 +21977,20 @@ function validateReferences(surfaces, path23, issues) {
21986
21977
  issues.push(issue2(`${path23}.surfaces.${surfaceId}`, "MISSING_ROOT_COMPONENT", "surface must define root"));
21987
21978
  const edges = /* @__PURE__ */ new Map();
21988
21979
  for (const [id, component] of components) {
21989
- const refs = getComponentReferences(component);
21980
+ const children = component.children;
21981
+ const refs = Array.isArray(children) ? children.filter((entry) => typeof entry === "string") : isPlainRecord(children) && typeof children.componentId === "string" ? [children.componentId] : [];
21990
21982
  edges.set(id, refs);
21991
21983
  refs.forEach((ref) => {
21992
21984
  if (!components.has(ref))
21993
- issues.push(issue2(`${path23}.surfaces.${surfaceId}.components.${id}.${component.child !== void 0 ? "child" : "children"}`, "MISSING_COMPONENT_REFERENCE", `component ${ref} does not exist`));
21985
+ issues.push(issue2(`${path23}.surfaces.${surfaceId}.components.${id}.children`, "MISSING_COMPONENT_REFERENCE", `component ${ref} does not exist`));
21994
21986
  });
21995
21987
  if ((component.component === "Button" || component.component === "Card" && component.action !== void 0) && refs.some((ref) => hasInteractiveDescendant(ref, components, /* @__PURE__ */ new Set())))
21996
- issues.push(issue2(`${path23}.surfaces.${surfaceId}.components.${id}.${component.child !== void 0 ? "child" : "children"}`, "NESTED_INTERACTION", "action components cannot contain interactive descendants"));
21988
+ issues.push(issue2(`${path23}.surfaces.${surfaceId}.components.${id}.children`, "NESTED_INTERACTION", "action components cannot contain interactive descendants"));
21997
21989
  collectSurfaceOpenReferences(component.action).forEach((targetSurfaceId) => {
21998
21990
  if (!surfaces.has(targetSurfaceId))
21999
21991
  issues.push(issue2(`${path23}.surfaces.${surfaceId}.components.${id}.action`, "MISSING_SURFACE_REFERENCE", `surface ${targetSurfaceId} does not exist`));
22000
21992
  });
22001
21993
  }
22002
- components.forEach((component, id) => {
22003
- if (component.grow === void 0)
22004
- return;
22005
- const parents = [...components.values()].filter((parent) => getComponentReferences(parent).includes(id));
22006
- if (id === "root" || parents.length === 0 || parents.some((parent) => parent.component !== "Row" && parent.component !== "Column")) {
22007
- issues.push(issue2(`${path23}.surfaces.${surfaceId}.components.${id}.grow`, "INVALID_LAYOUT_PARENT", "grow requires a direct Row or Column parent in every occurrence"));
22008
- }
22009
- });
22010
21994
  const visiting = /* @__PURE__ */ new Set();
22011
21995
  const visited = /* @__PURE__ */ new Set();
22012
21996
  const walk = (id) => {
@@ -22037,14 +22021,6 @@ function collectSurfaceOpenReferences(value, result = /* @__PURE__ */ new Set())
22037
22021
  }
22038
22022
  return result;
22039
22023
  }
22040
- function getComponentReferences(component) {
22041
- if (typeof component.child === "string")
22042
- return [component.child];
22043
- const children = component.children;
22044
- if (Array.isArray(children))
22045
- return children.filter((entry) => typeof entry === "string");
22046
- return isPlainRecord(children) && typeof children.componentId === "string" ? [children.componentId] : [];
22047
- }
22048
22024
  function hasInteractiveDescendant(id, components, visited) {
22049
22025
  if (visited.has(id))
22050
22026
  return false;
@@ -22054,7 +22030,8 @@ function hasInteractiveDescendant(id, components, visited) {
22054
22030
  return false;
22055
22031
  if (component.component === "Button" || component.action !== void 0 || ["TextField", "ChoicePicker", "Stepper"].includes(String(component.component)))
22056
22032
  return true;
22057
- const refs = getComponentReferences(component);
22033
+ const children = component.children;
22034
+ const refs = Array.isArray(children) ? children : isPlainRecord(children) ? [children.componentId] : [];
22058
22035
  return refs.some((ref) => typeof ref === "string" && hasInteractiveDescendant(ref, components, visited));
22059
22036
  }
22060
22037
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkque-cli-v2",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Public Linkque CLI bundle for sandbox debugging",
5
5
  "bin": {
6
6
  "linkquejs": "linkquejs.js"