@arcgis/api-extractor 5.1.0-next.1 → 5.1.0-next.100

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.
@@ -1,15 +1,15 @@
1
- import { l as H, a as se, e as Re, p as fe } from "./typeScript-D4_nAmBW.js";
2
- import { a as be, o as Me, t as Ge, b as De, c as Le, e as Oe, d as _, p as Ne, f as Be, i as me, g as We, h as Ue, j as ze, k as je, n as He, r as Je } from "./worker-Btg0KdqM.js";
3
- import { getViewUrl as Ve, postProcessDeprecated as ee, postProcessDescription as G, postProcessDocsTags as V, resolveJsDocLink as Xe } from "./extractor/processing/links.js";
1
+ import { l as H, a as se, e as De, p as me } from "./typeScript-CjWB1rJ_.js";
2
+ import { a as be, o as xe, t as Le, b as Oe, c as Ne, e as Be, p as We, d as Ue, f as _, i as pe, g as ze, h as je, j as He, k as Je, n as Ve, r as Xe } from "./worker-OTZkb-ju.js";
3
+ import { getViewUrl as Ye, postProcessDeprecated as Q, postProcessDescription as G, postProcessDocsTags as V, resolveJsDocLink as qe } from "./extractor/processing/links.js";
4
4
  import E from "typescript";
5
- import { path as N, toPosixPathSeparators as Ye } from "@arcgis/components-build-utils";
6
- import { mkdir as ae, writeFile as xe } from "fs/promises";
7
- import x from "chalk";
8
- import { styleText as qe } from "util";
9
- import { kebabToPascal as Ze } from "@arcgis/toolkit/string";
10
- import { g as h, a as Q, b as _e, c as Ke, d as le, e as Pe, f as oe, p as Qe, h as et, i as ce, m as Ie, n as tt, j as it, k as nt } from "./apiHelpers-BYzO767m.js";
11
- import { printTypeParameters as ie, printTypeAlias as ot } from "./utils/partPrinter.js";
12
- import { identity as Se, debounce as rt } from "@arcgis/toolkit/function";
5
+ import { path as N, toPosixPathSeparators as Ze } from "@arcgis/components-build-utils";
6
+ import { mkdir as ae, writeFile as Pe } from "fs/promises";
7
+ import { styleText as x } from "node:util";
8
+ import { kebabToPascal as _e } from "@arcgis/toolkit/string";
9
+ import { g as h, a as fe, b as Ke, c as Qe, d as Ie, e as ne, p as oe } from "./privateContext-CB7P40up.js";
10
+ import { apiTypeToImportType as le, globalPackageIdentifier as Se, getApiMemberName as et, getMaybeStaticApiMemberName as ce, mergeApiNodes as ke, naturalSortModules as tt, compareNamedNodes as it, compareClassMembers as nt } from "./utils/apiHelpers.js";
11
+ import { printTypeParameters as te, printTypeAlias as ot } from "./utils/partPrinter.js";
12
+ import { identity as Ee, debounce as rt } from "@arcgis/toolkit/function";
13
13
  import { opendirSync as st, watch as at, readFileSync as lt, statSync as ct } from "node:fs";
14
14
  const k = "/** @deprecated since 5.0. Refactor using \\@arcgis/codemod */", dt = `${k}
15
15
  type HashMap<T> = Record<string, T | undefined>;
@@ -1093,20 +1093,20 @@ declare namespace __esri {
1093
1093
  ${k}
1094
1094
  export type On = (eventName: string, eventHandler: EventHandlerCallback) => IHandle;
1095
1095
  }`;
1096
- let B, D, z, W, O = "", U = "", q = "", te = "";
1096
+ let B, D, z, W, O = "", U = "", q = "", ee = "";
1097
1097
  function mt(e, t) {
1098
- z = void 0, W = void 0, U = e.path, q = "", te = "";
1098
+ z = void 0, W = void 0, U = e.path, q = "", ee = "";
1099
1099
  const i = `import("./${U}.js")`;
1100
1100
  let n = "";
1101
1101
  const s = e.exports?.[0]?.declaration.name, a = h(e);
1102
1102
  if (a.constructorPropertiesInterface !== void 0) {
1103
1103
  const o = a.constructorPropertiesInterface;
1104
- ue(o), w.length !== 0 && (n += pe(o, U, o.name, t));
1104
+ ye(o), A.length !== 0 && (n += ue(o, U, o.name, t));
1105
1105
  }
1106
1106
  let r;
1107
1107
  for (let o = 0; o < e.declarations.length; ++o) {
1108
1108
  const l = e.declarations[o];
1109
- if (ue(l), w.length === 0)
1109
+ if (ye(l), A.length === 0)
1110
1110
  continue;
1111
1111
  const c = l.name === s, d = c ? "default" : l.name, m = l.kind === "function", f = l.kind === "variable";
1112
1112
  if (m || f) {
@@ -1114,10 +1114,10 @@ function mt(e, t) {
1114
1114
  if (l.name === r)
1115
1115
  continue;
1116
1116
  if (r = l.name, c) {
1117
- w.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export function.", {
1117
+ A.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export function.", {
1118
1118
  file: h(e).file,
1119
1119
  node: void 0
1120
- }), Z(w[0], t), D === void 0 && t.emitError("Expected default export @esriCompatibilityName tag to include a #", {
1120
+ }), Z(A[0], t), D === void 0 && t.emitError("Expected default export @esriCompatibilityName tag to include a #", {
1121
1121
  file: h(e).file,
1122
1122
  node: void 0
1123
1123
  }), n += ` ${k}
@@ -1132,10 +1132,10 @@ function mt(e, t) {
1132
1132
  continue;
1133
1133
  }
1134
1134
  } else if (f && c) {
1135
- w.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export variable.", {
1135
+ A.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export variable.", {
1136
1136
  file: h(e).file,
1137
1137
  node: void 0
1138
- }), Z(w[0], t), (D !== void 0 || B !== void 0) && t.emitError("Expected default export @esriCompatibilityName tag to not include a # or .", {
1138
+ }), Z(A[0], t), (D !== void 0 || B !== void 0) && t.emitError("Expected default export @esriCompatibilityName tag to not include a # or .", {
1139
1139
  file: h(e).file,
1140
1140
  node: void 0
1141
1141
  }), n += ` export const ${O}: typeof ${i}.default;
@@ -1143,16 +1143,16 @@ function mt(e, t) {
1143
1143
  `;
1144
1144
  continue;
1145
1145
  }
1146
- for (let p = 0; p < w.length; ++p)
1147
- Z(w[p], t), f && z !== void 0 ? q += ` export const ${O}: ${i}.${d};
1148
- ` : te += ` ${O}: typeof ${i}.${d};
1146
+ for (let p = 0; p < A.length; ++p)
1147
+ Z(A[p], t), f && z !== void 0 ? q += ` export const ${O}: ${i}.${d};
1148
+ ` : ee += ` ${O}: typeof ${i}.${d};
1149
1149
  `;
1150
- } else if (l.kind === "class" || l.kind === "mixin" || l.kind === "interface" && Q(l).isMixinBaseClass === !0) {
1151
- const p = ie(K(l.typeParameters, !1, U)), g = ie(K(l.typeParameters, !1, void 0)), u = ie(K(l.typeParameters, !0, void 0)), v = ` ${i}.${d}`;
1152
- for (let C = 0; C < w.length; ++C) {
1153
- if (Z(w[C], t), O.startsWith("$")) {
1154
- const M = O.slice(1);
1155
- n += pt(M, l, d, U);
1150
+ } else if (l.kind === "class" || l.kind === "mixin" || l.kind === "interface" && fe(l).isMixinBaseClass === !0) {
1151
+ const p = te(K(l.typeParameters, !1, U)), g = te(K(l.typeParameters, !1, void 0)), u = te(K(l.typeParameters, !0, void 0)), v = ` ${i}.${d}`;
1152
+ for (let C = 0; C < A.length; ++C) {
1153
+ if (Z(A[C], t), O.startsWith("$")) {
1154
+ const b = O.slice(1);
1155
+ n += pt(b, l, d, U);
1156
1156
  continue;
1157
1157
  }
1158
1158
  const y = B === void 0 ? " " : " ";
@@ -1162,7 +1162,7 @@ ${y}export const ${O}: typeof${v}${u};
1162
1162
 
1163
1163
  `;
1164
1164
  }
1165
- } else l.kind === "interface" && (n += pe(l, U, d, t));
1165
+ } else l.kind === "interface" && (n += ue(l, U, d, t));
1166
1166
  }
1167
1167
  return q.length > 0 && (z === void 0 && t.emitError("Invalid @esriCompatibilityName usage: Namespace name was not set correctly.", {
1168
1168
  file: h(e).file,
@@ -1171,7 +1171,7 @@ ${y}export const ${O}: typeof${v}${u};
1171
1171
  namespace ${z} {
1172
1172
  ${q.slice(0, -1)} }
1173
1173
 
1174
- `), te.length > 0 && (W === void 0 && t.emitError(
1174
+ `), ee.length > 0 && (W === void 0 && t.emitError(
1175
1175
  "Invalid @esriCompatibilityName usage: Classdec module interface name was not set correctly.",
1176
1176
  {
1177
1177
  file: h(e).file,
@@ -1179,17 +1179,17 @@ ${q.slice(0, -1)} }
1179
1179
  }
1180
1180
  ), n += ` ${k}
1181
1181
  interface ${W} {
1182
- ${te} }
1182
+ ${ee} }
1183
1183
 
1184
1184
  export const ${W}: ${W};
1185
1185
 
1186
1186
  `), n;
1187
1187
  }
1188
- function pe(e, t, i, n) {
1189
- const s = ie(K(e.typeParameters, !1, void 0)), a = K(e.typeParameters, !1, t), r = `import("./${t}.js").${i}${s}`;
1188
+ function ue(e, t, i, n) {
1189
+ const s = te(K(e.typeParameters, !1, void 0)), a = K(e.typeParameters, !1, t), r = `import("./${t}.js").${i}${s}`;
1190
1190
  let o = "";
1191
- for (let l = 0; l < w.length; ++l) {
1192
- Z(w[l], n);
1191
+ for (let l = 0; l < A.length; ++l) {
1192
+ Z(A[l], n);
1193
1193
  const c = ot(O, a, void 0, r);
1194
1194
  B === void 0 ? o += ` ${k}
1195
1195
  ${c}
@@ -1242,10 +1242,10 @@ function K(e, t, i) {
1242
1242
  }
1243
1243
  return n.length === 0 ? void 0 : n;
1244
1244
  }
1245
- const ne = [];
1246
- let w = ne;
1247
- function ue(e) {
1248
- e.kind === "variable" ? w = _e(e).esriCompatibilityNames ?? ne : e.kind === "function" ? w = Ke(e).esriCompatibilityNames ?? ne : w = Q(e).esriCompatibilityNames ?? ne;
1245
+ const ie = [];
1246
+ let A = ie;
1247
+ function ye(e) {
1248
+ e.kind === "variable" ? A = Ke(e).esriCompatibilityNames ?? ie : e.kind === "function" ? A = Qe(e).esriCompatibilityNames ?? ie : A = fe(e).esriCompatibilityNames ?? ie;
1249
1249
  }
1250
1250
  function Z(e, t) {
1251
1251
  const i = e.indexOf(".");
@@ -1276,7 +1276,7 @@ function Z(e, t) {
1276
1276
  }
1277
1277
  function pt(e, t, i, n) {
1278
1278
  const s = ut(e, t.events), r = `${// IdentityManager fake class got renamed to IdentityManagerBase real class
1279
- t.name.startsWith(w[0]) ? w[0] : t.name}${Ze(e)}Event`, o = yt(s, n) ?? ` = import("./${n}.js").${i}["@eventTypes"]["${e}"]`, l = o.startsWith("<") ? o.indexOf(">") + 1 : -1, c = l !== -1 ? o.slice(0, l) : "";
1279
+ t.name.startsWith(A[0]) ? A[0] : t.name}${_e(e)}Event`, o = yt(s, n) ?? ` = import("./${n}.js").${i}["@eventTypes"]["${e}"]`, l = o.startsWith("<") ? o.indexOf(">") + 1 : -1, c = l !== -1 ? o.slice(0, l) : "";
1280
1280
  return ` ${k}
1281
1281
  export type ${r}${o};
1282
1282
  ${k}
@@ -1342,7 +1342,7 @@ function gt(e, t, i) {
1342
1342
  if (i.privateMixinModuleNames.has(o.modulePath))
1343
1343
  continue;
1344
1344
  i.emitError(
1345
- `The ${x.red(f)} imported from ${x.red(p?.sourcePath ?? o.modulePath)} is not @public but used in the type of a @public declaration. Add /** @public */ JSDoc, refactor out the usage, or ensure ${x.red(f)} is not a re-export, not a namespace, and not an enum.`,
1345
+ `The ${x("red", f)} imported from ${x("red", p?.sourcePath ?? o.modulePath)} is not @public but used in the type of a @public declaration. Add /** @public */ JSDoc, refactor out the usage, or ensure ${x("red", f)} is not a re-export, not a namespace, and not an enum.`,
1346
1346
  {
1347
1347
  file: t.file,
1348
1348
  node: void 0
@@ -1357,7 +1357,7 @@ function gt(e, t, i) {
1357
1357
  if (o.modulePath !== void 0) {
1358
1358
  const d = i.moduleMap.get(o.modulePath), m = d === void 0 ? void 0 : h(d);
1359
1359
  m?.index.default === void 0 ? i.emitError(
1360
- `The default exported declaration in ${x.red(d?.sourcePath ?? o.modulePath)} is not @public but used in the type of a @public declaration. Add /** @public */ JSDoc or refactor out the usage.`,
1360
+ `The default exported declaration in ${x("red", d?.sourcePath ?? o.modulePath)} is not @public but used in the type of a @public declaration. Add /** @public */ JSDoc or refactor out the usage.`,
1361
1361
  {
1362
1362
  file: t.file,
1363
1363
  node: void 0
@@ -1370,7 +1370,7 @@ function gt(e, t, i) {
1370
1370
  if (o.modulePath !== void 0) {
1371
1371
  const d = i.moduleMap.get(o.modulePath);
1372
1372
  d === void 0 ? i.emitError(
1373
- `Non-public module was imported: ${x.red(o.modulePath)} and used in the type of a public declaration. Ensure the imported module has at least one /** @public */ declaration or refactor out the usage.`,
1373
+ `Non-public module was imported: ${x("red", o.modulePath)} and used in the type of a public declaration. Ensure the imported module has at least one /** @public */ declaration or refactor out the usage.`,
1374
1374
  {
1375
1375
  file: t.file,
1376
1376
  node: void 0
@@ -1406,20 +1406,20 @@ function vt(e, t, i, n) {
1406
1406
  t.autoCastingRequiresType = !0;
1407
1407
  else {
1408
1408
  const a = s[1], r = a.module === void 0 ? i : n.moduleMap.get(a.module), o = r === void 0 ? void 0 : h(r), l = a.name === "default" ? o?.index.default : o?.index.named[a.name];
1409
- $e(l) && (t.autoCastingRequiresType = !0);
1409
+ Ae(l) && (t.autoCastingRequiresType = !0);
1410
1410
  }
1411
- return ke(e, t, n, i, s);
1411
+ return Te(e, t, n, i, s);
1412
1412
  }
1413
1413
  }
1414
- function ke(e, t, i, n, s) {
1414
+ function Te(e, t, i, n, s) {
1415
1415
  for (let a = s.length - 1; a >= 0; a--) {
1416
1416
  const r = s[a];
1417
1417
  if (r.package !== void 0) {
1418
- r.package === Pe && r.name === "Date" && ye(
1418
+ r.package === Se && r.name === "Date" && he(
1419
1419
  e,
1420
1420
  s,
1421
1421
  a,
1422
- { type: Mt, inheritedFrom: void 0 },
1422
+ { type: bt, inheritedFrom: void 0 },
1423
1423
  i,
1424
1424
  n,
1425
1425
  t
@@ -1427,36 +1427,34 @@ function ke(e, t, i, n, s) {
1427
1427
  continue;
1428
1428
  }
1429
1429
  const o = r.module === void 0 ? n : i.moduleMap.get(r.module), l = o === void 0 ? void 0 : h(o), c = r.name === "default" ? l?.index.default : l?.index.named[r.name];
1430
- if ($e(c)) {
1430
+ if (Ae(c)) {
1431
1431
  const m = `(${c.type.text})`, f = e.text;
1432
1432
  e.text = `${e.text.slice(0, r.start)}${m}${e.text.slice(r.end)}`;
1433
1433
  const p = e.text, g = r.start + 1, u = [];
1434
1434
  for (let C = 0; C < c.type.references.length; ++C) {
1435
- const y = c.type.references[C], M = y.module ?? o?.path, b = M === n.path;
1435
+ const y = c.type.references[C], b = y.module ?? o?.path, M = b === n.path;
1436
1436
  u.push({
1437
1437
  ...y,
1438
- module: b ? void 0 : M,
1438
+ module: M ? void 0 : b,
1439
1439
  start: y.start + g,
1440
1440
  end: y.end + g
1441
1441
  });
1442
1442
  }
1443
- if (ke(e, t, i, n, u), e.text === p) {
1443
+ if (Te(e, t, i, n, u), e.text === p) {
1444
1444
  e.text = f;
1445
1445
  continue;
1446
1446
  }
1447
1447
  s.splice(a, 1, ...u);
1448
1448
  const v = e.text.length - f.length;
1449
- Me(s, v, a + u.length);
1449
+ xe(s, v, a + u.length);
1450
1450
  continue;
1451
1451
  }
1452
1452
  if (c?.kind !== "class")
1453
1453
  continue;
1454
- const d = Ee(c, o, void 0, i);
1454
+ const d = $e(c, o, void 0, i);
1455
1455
  if (d === void 0) {
1456
1456
  i.emitError(
1457
- `Failed to resolve auto-castable type for ${x.red(c.name)} from ${x.red(o.sourcePath)}. Ensure the class either has a public constructor or a public ${x.green(c.name)}Properties interface. Auto-casting resolution was attempted because this class is used in an autocastable property in ${x.blue(
1458
- n.sourcePath
1459
- )} in type ${x.blue(e.text)}.`,
1457
+ `Failed to resolve auto-castable type for ${x("red", c.name)} from ${x("red", o.sourcePath)}. Ensure the class either has a public constructor or a public ${x("green", c.name)}Properties interface. Auto-casting resolution was attempted because this class is used in an autocastable property in ${x("blue", n.sourcePath)} in type ${x("blue", e.text)}.`,
1460
1458
  {
1461
1459
  file: h(o).file,
1462
1460
  node: void 0
@@ -1464,7 +1462,7 @@ function ke(e, t, i, n, s) {
1464
1462
  );
1465
1463
  continue;
1466
1464
  }
1467
- ye(
1465
+ he(
1468
1466
  e,
1469
1467
  s,
1470
1468
  a,
@@ -1475,7 +1473,7 @@ function ke(e, t, i, n, s) {
1475
1473
  );
1476
1474
  }
1477
1475
  }
1478
- function Ee(e, t, i, n) {
1476
+ function $e(e, t, i, n) {
1479
1477
  const s = h(t), a = s.constructorAutoCastType;
1480
1478
  if (a !== void 0)
1481
1479
  return a;
@@ -1506,7 +1504,7 @@ function Ct(e, t, i, n) {
1506
1504
  name: a.name,
1507
1505
  module: t.path,
1508
1506
  package: void 0,
1509
- viewUrl: Ve(t.path, a.name, void 0, n),
1507
+ viewUrl: Ye(t.path, a.name, void 0, n),
1510
1508
  start: 0,
1511
1509
  end: a.name.length
1512
1510
  }
@@ -1517,10 +1515,10 @@ function Ct(e, t, i, n) {
1517
1515
  if (e.superclass !== void 0) {
1518
1516
  const r = e.superclass.module === void 0 ? t : n.moduleMap.get(e.superclass.module), c = (r === void 0 ? void 0 : h(r))?.index?.class;
1519
1517
  if (c !== void 0)
1520
- return Ee(c, r, r, n);
1518
+ return $e(c, r, r, n);
1521
1519
  }
1522
1520
  }
1523
- function ye(e, t, i, { type: n, inheritedFrom: s }, a, r, o) {
1521
+ function he(e, t, i, { type: n, inheritedFrom: s }, a, r, o) {
1524
1522
  let l = n.references;
1525
1523
  l.length === 2 && l[0].name === "ReadonlyArrayOrCollection" && l[1].name === "T" && (l = [l[0]], n = {
1526
1524
  ...n,
@@ -1554,11 +1552,11 @@ function ye(e, t, i, { type: n, inheritedFrom: s }, a, r, o) {
1554
1552
  );
1555
1553
  continue;
1556
1554
  }
1557
- Te(g, C, a, r);
1558
- const b = d.start, I = {
1555
+ Fe(g, C, a, r);
1556
+ const M = d.start, I = {
1559
1557
  ...g,
1560
- start: g.start + b + f,
1561
- end: g.end + b + f
1558
+ start: g.start + M + f,
1559
+ end: g.end + M + f
1562
1560
  }, P = y.typeName;
1563
1561
  if (l.length === 1 && o.autoCastingRequiresType === !0 && P !== void 0) {
1564
1562
  const L = o.autoCastingDefaultType === P, S = `(${u} & { type${L ? "?" : ""}: "${P}" })`, F = S.length - u.length;
@@ -1566,16 +1564,16 @@ function ye(e, t, i, { type: n, inheritedFrom: s }, a, r, o) {
1566
1564
  }
1567
1565
  t.splice(i, 0, I);
1568
1566
  }
1569
- return e.text = e.text.slice(0, d.start) + c + e.text.slice(d.end), Me(
1567
+ return e.text = e.text.slice(0, d.start) + c + e.text.slice(d.end), xe(
1570
1568
  t,
1571
1569
  m + f,
1572
1570
  i + (l?.length ?? 0)
1573
1571
  ), !0;
1574
1572
  }
1575
- function Te(e, t, i, n) {
1573
+ function Fe(e, t, i, n) {
1576
1574
  const s = h(n);
1577
1575
  if (e.package !== void 0) {
1578
- if (e.package === Pe)
1576
+ if (e.package === Se)
1579
1577
  return;
1580
1578
  i.emitError(
1581
1579
  `Unsupported case: cannot yet handle auto-adding imports for external packages. Tried to add ${e.name} from ${e.package} when resolving auto-casting type.`,
@@ -1599,8 +1597,8 @@ function Te(e, t, i, n) {
1599
1597
  return;
1600
1598
  }
1601
1599
  let o = r, l;
1602
- const c = e;
1603
- c.printableText !== void 0 && (o = c.printableText, l = r);
1600
+ const c = Ie(e);
1601
+ c !== void 0 && (o = c, l = r);
1604
1602
  const d = s.importsMap[o];
1605
1603
  d === void 0 ? s.importsMap[o] = {
1606
1604
  type: e.name === "default" ? "default" : "named",
@@ -1617,10 +1615,10 @@ function Te(e, t, i, n) {
1617
1615
  }
1618
1616
  ) : d.wasUsed = !0;
1619
1617
  }
1620
- function $e(e) {
1621
- return e?.kind === "interface" && e.members === void 0 && e.supertypes === void 0 && e.type?.references !== void 0 && e.type.references.length > 1 && e.typeParameters === void 0 && bt(e.type);
1618
+ function Ae(e) {
1619
+ return e?.kind === "interface" && e.members === void 0 && e.supertypes === void 0 && e.type?.references !== void 0 && e.type.references.length > 1 && e.typeParameters === void 0 && Mt(e.type);
1622
1620
  }
1623
- function bt(e) {
1621
+ function Mt(e) {
1624
1622
  let t = 0;
1625
1623
  for (let i = 0; i < e.references.length; ++i) {
1626
1624
  const n = e.references[i], s = e.text.slice(t, n.start).trim();
@@ -1630,7 +1628,7 @@ function bt(e) {
1630
1628
  }
1631
1629
  return t === e.text.length;
1632
1630
  }
1633
- const Mt = {
1631
+ const bt = {
1634
1632
  // Wrap in parents to correctly substitute Date[] in TimeInfo.stops
1635
1633
  text: "(Date | number | string)",
1636
1634
  references: [
@@ -1649,31 +1647,25 @@ const Mt = {
1649
1647
  function xt(e, t) {
1650
1648
  const i = e.constructorPropertiesInterface;
1651
1649
  i.type = void 0;
1652
- const n = Q(i), s = h(t.apiModule).index.class;
1653
- if (i.typeParameters = s.typeParameters, s.superclass !== void 0) {
1654
- const r = he(
1655
- s.superclass,
1656
- t,
1657
- Q(s).superClassText
1658
- );
1659
- r !== void 0 && (n.superTypesText = [r.printableText ?? r.name]);
1650
+ const n = h(t.apiModule).index.class;
1651
+ i.typeParameters = n.typeParameters;
1652
+ const s = n.superclass;
1653
+ if (s !== void 0) {
1654
+ const r = ge(s, t);
1655
+ r !== void 0 && (i.supertypes ??= [], i.supertypes.push(r));
1660
1656
  }
1661
- if (s.mixins !== void 0)
1662
- for (let r = 0; r < s.mixins.length; ++r) {
1663
- const o = s.mixins[r], l = he(
1664
- o,
1665
- t,
1666
- o.printableText
1667
- );
1668
- l !== void 0 && (n.superTypesText ??= [], n.superTypesText.push(l.printableText ?? l.name));
1657
+ if (n.mixins !== void 0)
1658
+ for (let r = 0; r < n.mixins.length; ++r) {
1659
+ const o = n.mixins[r], l = ge(o, t);
1660
+ l !== void 0 && (i.supertypes ??= [], i.supertypes.push(l));
1669
1661
  }
1670
1662
  let a = "";
1671
- if (s.members !== void 0)
1672
- for (let r = 0; r < s.members.length; ++r) {
1673
- const o = s.members[r];
1663
+ if (n.members !== void 0)
1664
+ for (let r = 0; r < n.members.length; ++r) {
1665
+ const o = n.members[r];
1674
1666
  if (o.kind !== "field" || o.inheritedFrom !== void 0 || o.static !== void 0)
1675
1667
  continue;
1676
- const l = oe(o);
1668
+ const l = ne(o);
1677
1669
  if (l.isAbstract)
1678
1670
  continue;
1679
1671
  let c = e.constructorOnlySetters?.[o.name];
@@ -1696,7 +1688,7 @@ function xt(e, t) {
1696
1688
  isOverride: void 0,
1697
1689
  dtsTypeOverride: void 0
1698
1690
  }, m = o, f = {
1699
- [Qe]: d,
1691
+ [oe]: d,
1700
1692
  kind: "field",
1701
1693
  name: m.name,
1702
1694
  static: void 0,
@@ -1718,49 +1710,61 @@ function xt(e, t) {
1718
1710
  i.members ??= [], i.members.push(f);
1719
1711
  }
1720
1712
  if (a.length > 0) {
1721
- n.superTypesText ??= [];
1722
- let r = `Partial<Pick<${s.name}`;
1713
+ i.supertypes ??= [];
1714
+ let r = `Partial<Pick<${n.name}`;
1723
1715
  if (i.typeParameters !== void 0) {
1724
1716
  r += "<";
1725
- for (let o = 0; o < i.typeParameters.length; ++o) {
1726
- const l = i.typeParameters[o];
1727
- r += l.name, o < i.typeParameters.length - 1 && (r += ", ");
1717
+ for (let l = 0; l < i.typeParameters.length; ++l) {
1718
+ const c = i.typeParameters[l];
1719
+ r += c.name, l < i.typeParameters.length - 1 && (r += ", ");
1728
1720
  }
1729
1721
  r += ">";
1730
1722
  }
1731
- r += `, ${a}>>`, n.superTypesText.push(r);
1723
+ r += `, ${a}>>`;
1724
+ const o = {
1725
+ [oe]: r,
1726
+ name: "",
1727
+ module: void 0,
1728
+ package: void 0,
1729
+ viewUrl: void 0,
1730
+ typeArguments: void 0
1731
+ };
1732
+ i.supertypes.push(o);
1732
1733
  }
1733
1734
  }
1734
- function he(e, t, i) {
1735
+ function ge(e, t) {
1735
1736
  if (e.package !== void 0)
1736
1737
  return;
1737
- const n = t.moduleMap.get(e.module), s = h(n), a = s.constructorPropertiesInterface;
1738
- if (a === void 0) {
1739
- const o = s.inheritance;
1738
+ const i = t.moduleMap.get(e.module);
1739
+ if (i === void 0)
1740
+ return;
1741
+ const n = h(i), s = n.constructorPropertiesInterface;
1742
+ if (s === void 0) {
1743
+ const o = n.inheritance;
1740
1744
  if (typeof o == "object" && o.hasSettableField) {
1741
- const l = e.name === "default" ? s.index.class?.name ?? e.name : e.name;
1745
+ const l = e.name === "default" ? n.index.class?.name ?? e.name : e.name;
1742
1746
  t.emitError(
1743
- `This file must have a @public ${x.green(`${l}Properties`)} interface because it contains a public class that has non-readonly public properties and it is being extended by ${t.apiModule.sourcePath}.`,
1747
+ `This file must have a @public ${x("green", `${l}Properties`)} interface because it contains a public class that has non-readonly public properties and it is being extended by ${t.apiModule.sourcePath}.`,
1744
1748
  { file: h(t.apiModule).file, node: void 0 }
1745
1749
  ), o.hasSettableField = !1;
1746
1750
  }
1747
1751
  return;
1748
1752
  }
1749
- const r = {
1750
- name: a.name,
1751
- module: e.module,
1752
- package: e.package,
1753
- viewUrl: e.viewUrl,
1754
- typeArguments: void 0,
1753
+ const a = Ie(e), r = {
1755
1754
  /**
1756
1755
  * If class was renamed when imported, also rename the created Properties
1757
1756
  * interface. This avoids name collision inside of
1758
1757
  * views/3d/environment/SunLighting as it imports webscene/SunLighting.
1759
1758
  * apiReference.name !== class.name for references to mixin base classes.
1760
1759
  */
1761
- printableText: i === e.name ? void 0 : Pt(i, s.index.class.name)
1760
+ [oe]: a === e.name ? void 0 : Pt(a, n.index.class.name),
1761
+ name: s.name,
1762
+ module: e.module,
1763
+ package: e.package,
1764
+ viewUrl: e.viewUrl,
1765
+ typeArguments: void 0
1762
1766
  };
1763
- return Te(r, n, t, t.apiModule), r;
1767
+ return Fe(r, i, t, t.apiModule), r[oe] ??= s.name, r;
1764
1768
  }
1765
1769
  function Pt(e, t) {
1766
1770
  if (e === void 0 || e === t)
@@ -1786,7 +1790,7 @@ function It(e) {
1786
1790
  description: s.description,
1787
1791
  inheritedFrom: s.inheritedFrom,
1788
1792
  type: a === void 0 || a.length === 0 ? s.type : {
1789
- text: Ge(a),
1793
+ text: Le(a),
1790
1794
  references: void 0,
1791
1795
  values: a,
1792
1796
  source: void 0
@@ -1812,13 +1816,13 @@ const de = {
1812
1816
  };
1813
1817
  function St(e, t, i, n) {
1814
1818
  const s = e;
1815
- n.produceDts && (Q(t).eventTypesProperty = s);
1819
+ n.produceDts && (fe(t).eventTypesProperty = s);
1816
1820
  const a = h(i), r = `${t.name}Events`;
1817
1821
  if (s.type.text !== r && !s.type.text.startsWith(`${r}<`)) {
1818
1822
  if (s.type.text === "unknown")
1819
1823
  return;
1820
1824
  n.emitError(
1821
- `The "@eventTypes" property must be of type named "${t.name}Events". Found ${x.red(s.type.text)}.`,
1825
+ `The "@eventTypes" property must be of type named "${t.name}Events". Found ${x("red", s.type.text)}.`,
1822
1826
  {
1823
1827
  file: a.file,
1824
1828
  node: void 0
@@ -1837,9 +1841,9 @@ function St(e, t, i, n) {
1837
1841
  );
1838
1842
  return;
1839
1843
  }
1840
- t.events ??= [], Fe(o, t, i, void 0, n);
1844
+ t.events ??= [], we(o, t, i, void 0, n);
1841
1845
  }
1842
- function Fe(e, t, i, n, s) {
1846
+ function we(e, t, i, n, s) {
1843
1847
  const a = n !== void 0;
1844
1848
  if (n ??= /* @__PURE__ */ new Set(), e.type !== void 0) {
1845
1849
  s.emitError(
@@ -1856,7 +1860,7 @@ function Fe(e, t, i, n, s) {
1856
1860
  const o = e.members[r];
1857
1861
  if (o.kind !== "field") {
1858
1862
  s.emitError(
1859
- `Event interfaces should only contain properties. Found ${et(o)} of kind ${x.red(o.kind)} in ${e.name}.`,
1863
+ `Event interfaces should only contain properties. Found ${et(o)} of kind ${x("red", o.kind)} in ${e.name}.`,
1860
1864
  {
1861
1865
  file: h(i).file,
1862
1866
  node: void 0
@@ -1888,7 +1892,7 @@ function Fe(e, t, i, n, s) {
1888
1892
  const o = e.supertypes[r], l = o.module === void 0 ? i : s.moduleMap.get(o.module), c = h(l).index.named[o.name];
1889
1893
  if (c?.kind !== "interface") {
1890
1894
  s.emitError(
1891
- `Failed to find @public interface ${x.red(o.name)} (used by ${x.green(e.name)}).`,
1895
+ `Failed to find @public interface ${x("red", o.name)} (used by ${x("green", e.name)}).`,
1892
1896
  {
1893
1897
  file: h(i).file,
1894
1898
  node: void 0
@@ -1896,10 +1900,10 @@ function Fe(e, t, i, n, s) {
1896
1900
  );
1897
1901
  return;
1898
1902
  }
1899
- Fe(c, t, l, n, s);
1903
+ we(c, t, l, n, s);
1900
1904
  }
1901
1905
  }
1902
- function we(e, t, i) {
1906
+ function Re(e, t, i) {
1903
1907
  const n = h(e);
1904
1908
  if (n.inheritance !== void 0)
1905
1909
  return;
@@ -1917,7 +1921,7 @@ function we(e, t, i) {
1917
1921
  }
1918
1922
  }
1919
1923
  const r = t;
1920
- let o = t.mixins, l = r.superclass, c = l === void 0 ? void 0 : Ce(l, e, i);
1924
+ let o = t.mixins, l = r.superclass, c = l === void 0 ? void 0 : Me(l, e, i);
1921
1925
  if (c?.supertypes !== void 0) {
1922
1926
  o = o === void 0 ? [] : [...o];
1923
1927
  do {
@@ -1926,28 +1930,28 @@ function we(e, t, i) {
1926
1930
  const g = c.supertypes[p], u = g.module === void 0 ? { ...g, module: l.module } : g;
1927
1931
  o.unshift(u);
1928
1932
  }
1929
- l = m ? c.supertypes[0] : void 0, c = l === void 0 ? void 0 : Ce(l, e, i);
1933
+ l = m ? c.supertypes[0] : void 0, c = l === void 0 ? void 0 : Me(l, e, i);
1930
1934
  } while (c?.supertypes !== void 0);
1931
1935
  }
1932
1936
  if (o !== void 0) {
1933
1937
  const m = o.length - (t.mixins?.length ?? 0);
1934
1938
  for (let f = o.length - 1; f >= 0; f--) {
1935
- const p = o[f], g = ve(p.module ?? e.path, !0, i);
1936
- typeof g == "object" ? ge(g, t, a, i) : f >= m && (t.mixins.splice(f - m, 1), t.mixins.length === 0 && (t.mixins = void 0));
1939
+ const p = o[f], g = Ce(p.module ?? e.path, !0, i);
1940
+ typeof g == "object" ? ve(g, t, a, i) : f >= m && (t.mixins.splice(f - m, 1), t.mixins.length === 0 && (t.mixins = void 0));
1937
1941
  }
1938
1942
  }
1939
1943
  if (l?.package !== void 0)
1940
1944
  return;
1941
1945
  const d = l?.module;
1942
1946
  if (d !== void 0) {
1943
- const m = ve(d, !1, i);
1947
+ const m = Ce(d, !1, i);
1944
1948
  typeof m == "object" && (m.declaration.privacy !== void 0 && t.privacy === void 0 && i.emitError(
1945
1949
  `Public component may only subclass a public component to avoid broken inheritance. Tried to inherit from private ${m.declaration.name}. Remove @private from it but feel free to add a jsdoc description stating the base class is abstract - not for direct consumption. Lumina does bare minimum extraction work for private components, which makes them ineligible for public docs.`,
1946
1950
  { file: n.file, node: void 0 }
1947
- ), ge(m, t, a, i));
1951
+ ), ve(m, t, a, i));
1948
1952
  }
1949
1953
  }
1950
- function ge(e, t, i, n) {
1954
+ function ve(e, t, i, n) {
1951
1955
  const s = e.declaration, a = t;
1952
1956
  if (e.indexedMembers !== void 0) {
1953
1957
  t.members ??= [];
@@ -1958,10 +1962,10 @@ function ge(e, t, i, n) {
1958
1962
  if (p === void 0)
1959
1963
  continue;
1960
1964
  if (l ??= /* @__PURE__ */ new Set(), l.add(f), m.kind === "field") {
1961
- const u = oe(m);
1962
- oe(p).isAccessor === !0 && (u.isAccessor = !0), u.isOverride = !0;
1965
+ const u = ne(m);
1966
+ ne(p).isAccessor === !0 && (u.isAccessor = !0), u.isOverride = !0;
1963
1967
  }
1964
- p !== void 0 && m.inheritedFrom === void 0 && Ie(p, m);
1968
+ p !== void 0 && m.inheritedFrom === void 0 && ke(p, m);
1965
1969
  }
1966
1970
  const c = s.members;
1967
1971
  for (let d = 0; d < c.length; ++d) {
@@ -1999,13 +2003,13 @@ function ge(e, t, i, n) {
1999
2003
  a.cssStates,
2000
2004
  s.cssStates,
2001
2005
  e.indexedCssStates
2002
- ));
2006
+ )), s.formAssociated === !0 && (a.formAssociated = !0);
2003
2007
  }
2004
2008
  function X(e = [], t, i, n) {
2005
2009
  const s = /* @__PURE__ */ new Set();
2006
2010
  for (let a = 0; a < e.length; ++a) {
2007
2011
  const r = e[a], o = i[r.name];
2008
- o !== void 0 && (s.add(r.name), r.inheritedFrom === void 0 && Ie(o, r));
2012
+ o !== void 0 && (s.add(r.name), r.inheritedFrom === void 0 && ke(o, r));
2009
2013
  }
2010
2014
  for (let a = 0; a < t.length; ++a) {
2011
2015
  const r = t[a];
@@ -2015,12 +2019,12 @@ function X(e = [], t, i, n) {
2015
2019
  }
2016
2020
  return e;
2017
2021
  }
2018
- function ve(e, t, i) {
2022
+ function Ce(e, t, i) {
2019
2023
  const n = i.moduleMap.get(e), s = kt(n, e, t, i), a = n === void 0 ? void 0 : h(n);
2020
2024
  if (s === !1 || n === void 0)
2021
2025
  return a !== void 0 ? a.inheritance = de.skip : t && i.privateMixinModuleNames.add(e), de.skip;
2022
2026
  const [r, o] = s, l = o;
2023
- we(n, o, i);
2027
+ Re(n, o, i);
2024
2028
  let c, d = !1;
2025
2029
  if (o.members !== void 0) {
2026
2030
  c = /* @__PURE__ */ Object.create(null);
@@ -2061,7 +2065,7 @@ function Y(e) {
2061
2065
  function kt(e, t, i, n) {
2062
2066
  const s = e === void 0 ? void 0 : h(e), a = s?.index.class;
2063
2067
  return a === void 0 ? (i || n.emitError(
2064
- `Failed to find @public class/custom element declaration in ${x.red(t)}. Referenced in the extends clause by ${x.blue(n.apiModule.sourcePath)}`,
2068
+ `Failed to find @public class/custom element declaration in ${x("red", t)}. Referenced in the extends clause by ${x("blue", n.apiModule.sourcePath)}`,
2065
2069
  {
2066
2070
  file: s?.file,
2067
2071
  scope: s === void 0 ? t : void 0,
@@ -2069,13 +2073,13 @@ function kt(e, t, i, n) {
2069
2073
  }
2070
2074
  ), !1) : [t, a];
2071
2075
  }
2072
- function Ce(e, t, i) {
2076
+ function Me(e, t, i) {
2073
2077
  if (e.package !== void 0)
2074
2078
  return;
2075
2079
  const n = e.module === void 0 ? t : i.moduleMap.get(e.module), s = n === void 0 ? void 0 : h(n), a = e.name === "default" ? s?.index.default : s?.index.named[e.name];
2076
2080
  if (a === void 0) {
2077
2081
  i.emitError(
2078
- `Failed to find @public class/mixin/custom element declaration in ${x.red(n?.sourcePath ?? e.module ?? t.sourcePath)}. Referenced in the extends clause by ${x.blue(t.sourcePath)}.`,
2082
+ `Failed to find @public class/mixin/custom element declaration in ${x("red", n?.sourcePath ?? e.module ?? t.sourcePath)}. Referenced in the extends clause by ${x("blue", t.sourcePath)}.`,
2079
2083
  {
2080
2084
  file: s?.file,
2081
2085
  scope: n === void 0 ? t.path : void 0,
@@ -2087,7 +2091,7 @@ function Ce(e, t, i) {
2087
2091
  return a.kind === "interface" ? a : void 0;
2088
2092
  }
2089
2093
  function Et(e, t, i) {
2090
- const n = oe(e), s = h(t);
2094
+ const n = ne(e), s = h(t);
2091
2095
  n.hasAutoCasting === !0 && (vt(e.type, n, t, i), n.isConstructorOnly !== !0 && e.getterType?.text === e.type.text && (e.getterType = void 0)), n.isConstructorOnly === !0 && (s.constructorOnlySetters ??= {}, s.constructorOnlySetters[e.name] = e.type, e.type = e.getterType ?? e.type, e.getterType = void 0, e.readonly = !0);
2092
2096
  }
2093
2097
  function Tt(e, t, i) {
@@ -2101,7 +2105,7 @@ function Tt(e, t, i) {
2101
2105
  }
2102
2106
  }
2103
2107
  function $t(e, t) {
2104
- e.sort(tt), Ft(e, t), t.isComponentProject && De(e, t);
2108
+ e.sort(tt), Ft(e, t), t.isComponentProject && Oe(e, t);
2105
2109
  }
2106
2110
  function Ft(e, t) {
2107
2111
  for (let i = 0; i < e.length; ++i) {
@@ -2118,7 +2122,7 @@ function Ft(e, t) {
2118
2122
  file: h(n).file,
2119
2123
  node: void 0
2120
2124
  }
2121
- ), "members" in o && o.kind !== "interface" && (we(n, o, t), o.events?.sort(it));
2125
+ ), "members" in o && o.kind !== "interface" && (Re(n, o, t), o.events?.sort(it));
2122
2126
  }
2123
2127
  }
2124
2128
  for (let i = 0; i < e.length; ++i) {
@@ -2135,10 +2139,10 @@ function Ft(e, t) {
2135
2139
  }
2136
2140
  continue;
2137
2141
  }
2138
- t.apiModule = n, t.inheritedModuleName = void 0, n.deprecated = ee(n.deprecated, t), n.description = G(n.description, t), V(n.docsTags, t);
2142
+ t.apiModule = n, t.inheritedModuleName = void 0, n.deprecated = Q(n.deprecated, t), n.description = G(n.description, t), V(n.docsTags, t);
2139
2143
  for (let a = 0; a < n.declarations.length; ++a) {
2140
2144
  const r = n.declarations[a];
2141
- if (r.deprecated = ee(r.deprecated, t), r.description = G(r.description, t), V(r.docsTags, t), r.kind === "function") {
2145
+ if (r.deprecated = Q(r.deprecated, t), r.description = G(r.description, t), V(r.docsTags, t), r.kind === "function") {
2142
2146
  if (r.parameters !== void 0)
2143
2147
  for (let l = 0; l < r.parameters.length; ++l) {
2144
2148
  const c = r.parameters[l];
@@ -2150,7 +2154,7 @@ function Ft(e, t) {
2150
2154
  if (o.members !== void 0) {
2151
2155
  for (let c = 0; c < o.members.length; ++c) {
2152
2156
  const d = o.members[c], m = d.inheritedFrom, f = m !== void 0;
2153
- if (t.inheritedModuleName = m?.module, d.deprecated = ee(d.deprecated, t), d.description = G(d.description, t), V(d.docsTags, t), !f && d.kind !== "field") {
2157
+ if (t.inheritedModuleName = m?.module, d.deprecated = Q(d.deprecated, t), d.description = G(d.description, t), V(d.docsTags, t), !f && d.kind !== "field") {
2154
2158
  if (d.parameters !== void 0)
2155
2159
  for (let g = 0; g < d.parameters.length; ++g) {
2156
2160
  const u = d.parameters[g];
@@ -2166,7 +2170,7 @@ function Ft(e, t) {
2166
2170
  if (l.events !== void 0) {
2167
2171
  for (let c = 0; c < l.events.length; ++c) {
2168
2172
  const d = l.events[c];
2169
- t.inheritedModuleName = d.inheritedFrom?.module, d.deprecated = ee(d.deprecated, t), d.description = G(d.description, t), V(d.docsTags, t);
2173
+ t.inheritedModuleName = d.inheritedFrom?.module, d.deprecated = Q(d.deprecated, t), d.description = G(d.description, t), V(d.docsTags, t);
2170
2174
  }
2171
2175
  t.inheritedModuleName = void 0;
2172
2176
  }
@@ -2200,7 +2204,7 @@ function Ft(e, t) {
2200
2204
  s.constructorPropertiesInterface !== void 0 && xt(s, t), gt(n, s, t), Tt(n, s, t);
2201
2205
  }
2202
2206
  }
2203
- const wt = async function() {
2207
+ const At = async function() {
2204
2208
  if (this.isRunInProgress)
2205
2209
  throw Error(
2206
2210
  "The ApiExtractor.run() is already in progress, or previous run crashed with unrecoverable error. Await the previous run first or create a new ApiExtractor"
@@ -2210,7 +2214,7 @@ const wt = async function() {
2210
2214
  this.watchFiles === void 0 && (this.moduleMap = /* @__PURE__ */ new Map());
2211
2215
  const t = e.context.dtsEmitPath !== "", i = e.context.emptyDtsEmitPath && t ? (
2212
2216
  // This takes 80ms for JSAPI
2213
- Le(e.context.dtsEmitPath)
2217
+ Ne(e.context.dtsEmitPath)
2214
2218
  ) : void 0;
2215
2219
  if (e.types.typeCheckedExtraction || e.types.fullTypeCheck) {
2216
2220
  const o = _(), l = e.types.typeScriptConfig;
@@ -2223,26 +2227,26 @@ const wt = async function() {
2223
2227
  });
2224
2228
  this.program = d, e.types.typeScriptInstanceCreated(d, c);
2225
2229
  }
2226
- Ae(this, o);
2230
+ Ge(this, o);
2227
2231
  }
2228
- const n = _(), s = await Oe(this);
2232
+ const n = _(), s = await Be(this);
2229
2233
  $t(s, this);
2230
2234
  const a = this.wrapApiModules(s);
2231
2235
  e.context.logger.info(
2232
- `${H}Extracted ${s.length} @public files in ${x.green(`${n()}s`)}`
2236
+ `${H}Extracted ${s.length} @public files in ${x("green", `${n()}s`)}`
2233
2237
  );
2234
2238
  const r = { apiJson: a, dtsFiles: void 0 };
2235
- if (e.afterApiJsonCreate !== Se && e.afterApiJsonCreate(r), this.produceDts) {
2239
+ if (e.afterApiJsonCreate !== Ee && e.afterApiJsonCreate(r), this.produceDts) {
2236
2240
  const o = _(), l = this.dtsFiles;
2237
2241
  if (this.dtsFiles = /* @__PURE__ */ new Map(), this.isJsApi) {
2238
2242
  const c = ht(s, this), d = `${e.context.dtsEmitPath}interfaces.d.ts`;
2239
2243
  this.dtsFiles.set(d, c);
2240
- } else this.isComponentProject && Ne(s, this);
2244
+ } else this.isComponentProject && We(s, this);
2241
2245
  for (let c = 0; c < s.length; ++c) {
2242
2246
  const d = s[c], m = h(d);
2243
2247
  let f = `${e.context.dtsEmitPath + m.dtsPath}.d.ts`, p;
2244
2248
  if (m.isStale) {
2245
- if (p = Be(d, this), e.types.declarationTextTransformers.length > 0) {
2249
+ if (p = Ue(d, this), e.types.declarationTextTransformers.length > 0) {
2246
2250
  let v = { filePath: f, content: p };
2247
2251
  for (let C = 0; C < e.types.declarationTextTransformers.length; ++C) {
2248
2252
  const y = e.types.declarationTextTransformers[C];
@@ -2265,27 +2269,27 @@ const wt = async function() {
2265
2269
  for (const [c, d] of this.dtsFiles)
2266
2270
  l.get(c) !== d && this.changedDtsFiles.set(c, d);
2267
2271
  if (t) {
2268
- await i, await ae(e.context.dtsEmitPath, { recursive: !0 }), await At(e.context.dtsEmitPath, !0, this.changedDtsFiles ?? this.dtsFiles);
2272
+ await i, await ae(e.context.dtsEmitPath, { recursive: !0 }), await wt(e.context.dtsEmitPath, !0, this.changedDtsFiles ?? this.dtsFiles);
2269
2273
  const c = N.join(N.relative(process.cwd(), e.context.dtsEmitPath), "/");
2270
2274
  e.context.logger.info(
2271
- `${H}Wrote ${c}**/*${x.blue(".d.ts")} in ${x.green(`${o()}s`)}`
2275
+ `${H}Wrote ${c}**/*${x("blue", ".d.ts")} in ${x("green", `${o()}s`)}`
2272
2276
  );
2273
2277
  }
2274
2278
  }
2275
2279
  if (e.context.apiJsonEmitPath !== "") {
2276
2280
  const o = N.resolve(e.context.cwd, e.context.apiJsonEmitPath), l = N.join(N.relative(process.cwd(), N.dirname(o)), "/");
2277
- await ae(N.dirname(o), { recursive: !0 }), await xe(
2281
+ await ae(N.dirname(o), { recursive: !0 }), await Pe(
2278
2282
  o,
2279
2283
  e.context.environment === "production" ? JSON.stringify(a) : JSON.stringify(a, null, 2)
2280
2284
  ), e.context.logger.info(
2281
- `${H}Wrote ${l}${x.yellow(N.basename(o))}`
2285
+ `${H}Wrote ${l}${x("yellow", N.basename(o))}`
2282
2286
  );
2283
2287
  }
2284
2288
  return this.typeVerifier?.verifyTypes(s), this.errorCount > 0 && e.context.logger.error(
2285
- `${H}${x.red(`Found ${this.errorCount} ${this.errorCount === 1 ? "error" : "errors"}`)}`
2289
+ `${H}${x("red", `Found ${this.errorCount} ${this.errorCount === 1 ? "error" : "errors"}`)}`
2286
2290
  ), this.silencedBrokenLinkCount > 0 && e.context.logger.info(`${H}Silenced ${this.silencedBrokenLinkCount} broken link errors.`), this.isRunInProgress = !1, this.produceDts && (r.dtsFiles = this.dtsFiles), r;
2287
2291
  };
2288
- async function At(e, t, i) {
2292
+ async function wt(e, t, i) {
2289
2293
  const n = /* @__PURE__ */ new Set(), s = Array.from(i.entries());
2290
2294
  for (let l = 0; l < s.length; ++l) {
2291
2295
  const [c, d] = s[l];
@@ -2305,17 +2309,17 @@ async function At(e, t, i) {
2305
2309
  if (d.length === 0)
2306
2310
  continue;
2307
2311
  const m = o + c;
2308
- r[l] = xe(m, d);
2312
+ r[l] = Pe(m, d);
2309
2313
  }
2310
2314
  await Promise.all(r);
2311
2315
  }
2312
- function Ae(e, t) {
2316
+ function Ge(e, t) {
2313
2317
  if (e.config.types.fullTypeCheck)
2314
2318
  if ("getSemanticDiagnostics" in e.program) {
2315
2319
  const i = e.builderProgram === void 0 ? E.getPreEmitDiagnostics(e.program) : e.builderProgram.getSemanticDiagnostics();
2316
2320
  i.length > 0 && (e.config.context.logger.error(
2317
2321
  E.formatDiagnosticsWithColorAndContext(i, se)
2318
- ), e.errorCount += i.length, process.exitCode = 1), e.config.types.afterDiagnostic(i), e.config.context.logger.info(`${H}Type checked in ${qe("cyan", `${t()}s`)}`);
2322
+ ), e.errorCount += i.length, process.exitCode = 1), e.config.types.afterDiagnostic(i), e.config.context.logger.info(`${H}Type checked in ${x("cyan", `${t()}s`)}`);
2319
2323
  } else
2320
2324
  e.emitError("Can't do type checking as the passed ts.Program is not a ts.Program instance.", {
2321
2325
  file: void 0,
@@ -2344,13 +2348,13 @@ const Rt = async function() {
2344
2348
  for (const C of u.dependencies)
2345
2349
  this.watchFiles.get(C)?.dependents.delete(v.sourcePath);
2346
2350
  for (const [C, y] of u.dependents) {
2347
- const M = this.watchFiles.get(C);
2348
- M !== void 0 && (y ? (M.dependencies.delete(v.sourcePath), r(M)) : M.hasDirtyLinks = !0);
2351
+ const b = this.watchFiles.get(C);
2352
+ b !== void 0 && (y ? (b.dependencies.delete(v.sourcePath), r(b)) : b.hasDirtyLinks = !0);
2349
2353
  }
2350
2354
  }, o = (u, v, C) => {
2351
2355
  if (v === void 0) {
2352
- const y = e.context.cwd + u, M = lt(y, "utf8");
2353
- v = je(y, M);
2356
+ const y = e.context.cwd + u, b = lt(y, "utf8");
2357
+ v = Je(y, b);
2354
2358
  }
2355
2359
  this.watchFiles.set(u, {
2356
2360
  file: v,
@@ -2377,28 +2381,28 @@ const Rt = async function() {
2377
2381
  let u;
2378
2382
  try {
2379
2383
  u = await this.run();
2380
- } catch (b) {
2381
- throw f(void 0), b;
2384
+ } catch (M) {
2385
+ throw f(void 0), M;
2382
2386
  }
2383
2387
  const v = [], C = [];
2384
- for (const b of this.watchFiles.values()) {
2385
- const I = b.module, P = b.previousModule;
2388
+ for (const M of this.watchFiles.values()) {
2389
+ const I = M.module, P = M.previousModule;
2386
2390
  if (I === void 0)
2387
- P !== void 0 && (b.module = b.previousModule, a(b, P.sourcePath));
2391
+ P !== void 0 && (M.module = M.previousModule, a(M, P.sourcePath));
2388
2392
  else {
2389
- P === void 0 ? (c || C.push(I), b.previousModule = I) : I !== P && (He(I, P) ? b.module = P : (v.push({ old: P, new: I }), b.previousModule = I));
2393
+ P === void 0 ? (c || C.push(I), M.previousModule = I) : I !== P && (Ve(I, P) ? M.module = P : (v.push({ old: P, new: I }), M.previousModule = I));
2390
2394
  const L = h(I);
2391
2395
  L.isStale && (L.isStale = !1);
2392
2396
  }
2393
2397
  }
2394
2398
  this.program ??= {
2395
2399
  getSourceFiles: () => {
2396
- const b = [];
2400
+ const M = [];
2397
2401
  for (const I of this.watchFiles.values())
2398
- b.push(I.file);
2399
- return b;
2402
+ M.push(I.file);
2403
+ return M;
2400
2404
  },
2401
- getSourceFile: (b) => this.watchFiles.get(b.slice(e.context.cwd.length))?.file
2405
+ getSourceFile: (M) => this.watchFiles.get(M.slice(e.context.cwd.length))?.file
2402
2406
  };
2403
2407
  const y = {
2404
2408
  apiJson: u.apiJson,
@@ -2408,19 +2412,19 @@ const Rt = async function() {
2408
2412
  removedModules: n
2409
2413
  };
2410
2414
  n = [];
2411
- const M = c || v.length > 0 || C.length > 0 || y.removedModules.length > 0;
2412
- c = !1, f(M ? y : void 0), l?.();
2415
+ const b = c || v.length > 0 || C.length > 0 || y.removedModules.length > 0;
2416
+ c = !1, f(b ? y : void 0), l?.();
2413
2417
  };
2414
2418
  if (e.types.typeCheckedExtraction || e.types.fullTypeCheck) {
2415
2419
  const u = e.types.fullTypeCheck ? E.createSemanticDiagnosticsBuilderProgram : E.createAbstractBuilder;
2416
2420
  let v;
2417
- const C = (S, F, T, ...A) => (v = T, u(
2421
+ const C = (S, F, T, ...w) => (v = T, u(
2418
2422
  // If not doing full type check, don't scout test files
2419
2423
  // If non-tests import tests, they will be included implicitly anyway
2420
- e.types.fullTypeCheck ? S : S?.filter(($) => !ze($)),
2424
+ e.types.fullTypeCheck ? S : S?.filter(($) => !He($)),
2421
2425
  F,
2422
2426
  T,
2423
- ...A
2427
+ ...w
2424
2428
  // Type cast to keep types simpler&aligned between two branches
2425
2429
  )), y = E.createWatchCompilerHost(
2426
2430
  // This parses the config file again (we already do it) and computes the
@@ -2431,21 +2435,21 @@ const Rt = async function() {
2431
2435
  C,
2432
2436
  void 0,
2433
2437
  void 0
2434
- ), M = y.setTimeout;
2435
- let b;
2436
- y.setTimeout = M === void 0 ? void 0 : (S, F, ...T) => {
2438
+ ), b = y.setTimeout;
2439
+ let M;
2440
+ y.setTimeout = b === void 0 ? void 0 : (S, F, ...T) => {
2437
2441
  if (!(T[0] === "timerToUpdateProgram"))
2438
- return M(S, F, ...T);
2439
- const R = b !== void 0 ? Promise.resolve() : d === void 0 ? Promise.resolve(m()) : d.promise.finally(m);
2440
- return b = M(
2442
+ return b(S, F, ...T);
2443
+ const R = M !== void 0 ? Promise.resolve() : d === void 0 ? Promise.resolve(m()) : d.promise.finally(m);
2444
+ return M = b(
2441
2445
  (...J) => {
2442
- b = void 0, R.finally(() => {
2446
+ M = void 0, R.finally(() => {
2443
2447
  this.program = void 0, S(...J), this.program === void 0 && f(void 0);
2444
2448
  });
2445
2449
  },
2446
2450
  e.watch.debounceTime,
2447
2451
  ...T
2448
- ), b;
2452
+ ), M;
2449
2453
  };
2450
2454
  const I = y.onWatchStatusChange, P = 6031, L = 6032;
2451
2455
  y.onWatchStatusChange = (S, ...F) => {
@@ -2458,17 +2462,17 @@ const Rt = async function() {
2458
2462
  e.types.typeScriptInstanceCreated(F, v);
2459
2463
  for (const $ of this.watchFiles.values())
2460
2464
  $.wasRemoved = !0;
2461
- let A = !1;
2465
+ let w = !1;
2462
2466
  for (let $ = 0; $ < T.length; ++$) {
2463
2467
  const R = T[$];
2464
- if (!me(R.fileName, this))
2468
+ if (!pe(R.fileName, this))
2465
2469
  continue;
2466
2470
  const j = R.fileName.slice(e.context.cwd.length), J = this.watchFiles.get(j);
2467
- J === void 0 ? (o(j, R, void 0), A = !0) : J.file !== R ? (s(J, j, R), A = !0) : J.wasRemoved = !1;
2471
+ J === void 0 ? (o(j, R, void 0), w = !0) : J.file !== R ? (s(J, j, R), w = !0) : J.wasRemoved = !1;
2468
2472
  }
2469
2473
  for (const [$, R] of this.watchFiles)
2470
- R.wasRemoved && (a(R, $), A = !0);
2471
- A ? p() : (Ae(this, _()), f(void 0));
2474
+ R.wasRemoved && (a(R, $), w = !0);
2475
+ w ? p() : (Ge(this, _()), f(void 0));
2472
2476
  }, t = E.createWatchProgram(y);
2473
2477
  } else {
2474
2478
  let u = function(y) {
@@ -2478,28 +2482,28 @@ const Rt = async function() {
2478
2482
  };
2479
2483
  const v = rt(() => {
2480
2484
  let y = !1;
2481
- for (const [M, b] of i)
2482
- y = C(M, b) || y;
2485
+ for (const [b, M] of i)
2486
+ y = C(b, M) || y;
2483
2487
  i.clear(), y ? (e.watch.clearScreen && E.sys.clearScreen?.(), p()) : f(void 0);
2484
- }, e.watch.debounceTime), C = (y, M) => {
2485
- const b = e.context.cwd + y, I = !M, P = this.watchFiles.get(y), L = P !== void 0;
2488
+ }, e.watch.debounceTime), C = (y, b) => {
2489
+ const M = e.context.cwd + y, I = !b, P = this.watchFiles.get(y), L = P !== void 0;
2486
2490
  if (I || P === void 0) {
2487
- const S = u(b);
2491
+ const S = u(M);
2488
2492
  if (S === !1) {
2489
- let T, A = !1;
2493
+ let T, w = !1;
2490
2494
  try {
2491
- T = st(b, { recursive: !0 });
2495
+ T = st(M, { recursive: !0 });
2492
2496
  let $;
2493
2497
  for (; ($ = T.readSync()) !== null; ) {
2494
2498
  if ($.isDirectory())
2495
2499
  continue;
2496
2500
  const j = `${$.parentPath}/${$.name}`.slice(e.context.cwd.length);
2497
- We(j) && (A = C(j, !1) || A);
2501
+ ze(j) && (w = C(j, !1) || w);
2498
2502
  }
2499
2503
  } finally {
2500
2504
  T?.closeSync();
2501
2505
  }
2502
- return A;
2506
+ return w;
2503
2507
  }
2504
2508
  const F = S === !0;
2505
2509
  if (L) {
@@ -2514,25 +2518,25 @@ const Rt = async function() {
2514
2518
  return o(y, void 0, void 0), !0;
2515
2519
  {
2516
2520
  let T = !1;
2517
- const A = `${y}/`;
2521
+ const w = `${y}/`;
2518
2522
  for (const [$, R] of this.watchFiles)
2519
- $.startsWith(A) && (a(R, $), T = !0);
2523
+ $.startsWith(w) && (a(R, $), T = !0);
2520
2524
  return T;
2521
2525
  }
2522
2526
  }
2523
2527
  } else
2524
2528
  return s(P, y, void 0), !0;
2525
2529
  };
2526
- t = at(this.basePath, { recursive: !0 }, (y, M) => {
2527
- const b = m(), I = M === null ? void 0 : Ye(M), P = y === "change";
2530
+ t = at(this.basePath, { recursive: !0 }, (y, b) => {
2531
+ const M = m(), I = b === null ? void 0 : Ze(b), P = y === "change";
2528
2532
  if (I !== void 0 && // If changed, check if it is an included file
2529
2533
  // For a rename, we don't know if it is directory or a file - only check
2530
2534
  // if directory is included, and the file will be checked later.
2531
- (P ? me(this.basePath + I, this) : Ue(this.basePath + I, this))) {
2535
+ (P ? pe(this.basePath + I, this) : je(this.basePath + I, this))) {
2532
2536
  const L = e.context.basePath + I, F = (i.get(L) ?? !0) && P;
2533
2537
  i.set(L, F);
2534
2538
  }
2535
- b && v();
2539
+ M && v();
2536
2540
  }), p(), l = () => {
2537
2541
  i.size > 0 && v();
2538
2542
  };
@@ -2587,7 +2591,7 @@ class Dt {
2587
2591
  }), m = E.getPreEmitDiagnostics(d).filter(this.extractor.config.verify.filterTypeCheckDiagnostic);
2588
2592
  m.length && (this.extractor.config.context.logger.error(
2589
2593
  E.formatDiagnosticsWithColorAndContext(m, se)
2590
- ), process.exitCode = 1, this.extractor.errorCount += m.length), this.extractor.config.context.logger.info(`${H}Types verified in ${x.green(`${i()}s`)}`);
2594
+ ), process.exitCode = 1, this.extractor.errorCount += m.length), this.extractor.config.context.logger.info(`${H}Types verified in ${x("green", `${i()}s`)}`);
2591
2595
  }
2592
2596
  printTypeParameters(t, i) {
2593
2597
  if (t === void 0)
@@ -2625,12 +2629,12 @@ class qt {
2625
2629
  * @param rawConfig Optional configuration for the extractor.
2626
2630
  */
2627
2631
  constructor(t = {}) {
2628
- this.componentStories = /* @__PURE__ */ Object.create(null), this.dtsFiles = /* @__PURE__ */ new Map(), this.changedDtsFiles = void 0, this.isRunInProgress = !1, this.watchFiles = void 0, this.program = void 0, this.builderProgram = void 0, this.componentPathMapping = void 0, this.componentCssFileDocs = void 0, this.vanillaComponentTypes = void 0, this.isInLuminaMinimalExtraction = !1, this.errorCount = 0, this.silencedBrokenLinkCount = 0, this.loggedBooleanWarning = !1, this.moduleMap = void 0, this.privateMixinModuleNames = /* @__PURE__ */ new Set(), this.implicitPublicModules = void 0, this.file = void 0, this.apiModule = void 0, this.componentTagName = void 0, this.pairedSetter = void 0, this.statementJsDocs = [], this.jsDoc = void 0, this.apiObject = void 0, this.moduleContext = void 0, this.localDeclarations = /* @__PURE__ */ new Set(), this.exportDefaultName = void 0, this.objectLikeTypeParameters = void 0, this.functionLikeTypeParameters = void 0, this.apiClassLikeName = void 0, this.mixinName = void 0, this.mixinMixins = void 0, this.moduleHasAccessorLikeClass = !1, this.moduleHasClass = !1, this.inheritedModuleName = void 0, this.run = wt.bind(this), this.watch = Rt.bind(this), this.emitError = Re.bind(this);
2629
- const i = Je(t);
2632
+ this.componentStories = /* @__PURE__ */ Object.create(null), this.dtsFiles = /* @__PURE__ */ new Map(), this.changedDtsFiles = void 0, this.isRunInProgress = !1, this.watchFiles = void 0, this.program = void 0, this.builderProgram = void 0, this.componentPathMapping = void 0, this.componentCssFileDocs = void 0, this.vanillaComponentTypes = void 0, this.isInLuminaMinimalExtraction = !1, this.errorCount = 0, this.silencedBrokenLinkCount = 0, this.loggedBooleanWarning = !1, this.moduleMap = void 0, this.privateMixinModuleNames = /* @__PURE__ */ new Set(), this.implicitPublicModules = void 0, this.file = void 0, this.apiModule = void 0, this.componentTagName = void 0, this.pairedSetter = void 0, this.statementJsDocs = [], this.jsDoc = void 0, this.apiObject = void 0, this.moduleContext = void 0, this.localDeclarations = /* @__PURE__ */ new Set(), this.exportDefaultName = void 0, this.objectLikeTypeParameters = void 0, this.functionLikeTypeParameters = void 0, this.apiClassLikeName = void 0, this.mixinName = void 0, this.mixinMixins = void 0, this.moduleHasAccessorLikeClass = !1, this.moduleHasClass = !1, this.inheritedModuleName = void 0, this.run = At.bind(this), this.watch = Rt.bind(this), this.emitError = De.bind(this);
2633
+ const i = Xe(t);
2630
2634
  this.config = i, this.produceDts = i.types.forceProduceDts || i.context.dtsEmitPath !== "" || i.verify.typeCheckTypes, this.basePath = `${i.context.cwd}${i.context.basePath}`, this.normalizedApiReferencePrefix = `https://${this.config.documentation.host}${this.config.documentation.basePath}`, this.runtimeDependencyNames = /* @__PURE__ */ new Set([
2631
2635
  ...Object.keys(i.context.packageJson.dependencies ?? {}),
2632
2636
  ...Object.keys(i.context.packageJson.peerDependencies ?? {})
2633
- ]), this.resolveJsDocLink = i.context.isLuminaMinimalExtraction ? Se : Xe.bind(void 0, this), this.isComponentProject = "@arcgis/lumina" in (i.context.packageJson.dependencies ?? {}), this.isJsApi = i.context.packageJson.name === "arcgis-js-api", this.typeVerifier = i.verify.typeCheckTypes ? new Dt(this, i.context.dtsEmitPath || void 0) : void 0, this.localPrivateDeclarations = i.strict ? void 0 : /* @__PURE__ */ new Map();
2637
+ ]), this.resolveJsDocLink = i.context.isLuminaMinimalExtraction ? Ee : qe.bind(void 0, this), this.isComponentProject = "@arcgis/lumina" in (i.context.packageJson.dependencies ?? {}), this.isJsApi = i.context.packageJson.name === "arcgis-js-api", this.typeVerifier = i.verify.typeCheckTypes ? new Dt(this, i.context.dtsEmitPath || void 0) : void 0, this.localPrivateDeclarations = i.strict ? void 0 : /* @__PURE__ */ new Map();
2634
2638
  }
2635
2639
  /**
2636
2640
  * Given an array of ApiModules, add top-level api.json metadata and return
@@ -2642,8 +2646,8 @@ class qt {
2642
2646
  compiler: {
2643
2647
  // Preserve previous compiler.name for component projects as that is what
2644
2648
  // pre 5.0 Lumina versions expect.
2645
- name: this.isComponentProject ? "@arcgis/lumina-compiler" : fe.name,
2646
- version: fe.version,
2649
+ name: this.isComponentProject ? "@arcgis/lumina-compiler" : me.name,
2650
+ version: me.version,
2647
2651
  typescriptVersion: E.version
2648
2652
  },
2649
2653
  // https://github.com/webcomponents/custom-elements-manifest?tab=readme-ov-file#schema-versioning
@@ -2657,5 +2661,5 @@ class qt {
2657
2661
  }
2658
2662
  export {
2659
2663
  qt as A,
2660
- At as w
2664
+ wt as w
2661
2665
  };