@arcgis/api-extractor 5.1.0-next.13 → 5.1.0-next.130

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,41 +1,42 @@
1
- import { l as H, a as se, e as Re, p as fe } from "./typeScript-C2M4aviw.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-oskaUWnO.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 pe } from "./typeScript-CeFPRqDO.js";
2
+ import { a as xe, o as Pe, t as Le, b as Oe, c as Ne, e as Be, p as We, d as Ue, f as _, i as ue, g as je, h as ze, j as He, k as Je, n as Ve, r as Xe } from "./worker-I-cOeplg.js";
3
+ import { getViewUrl as Ye, postProcessDeprecated as Q, postProcessDescription as R, 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";
13
- import { opendirSync as st, watch as at, readFileSync as lt, statSync as ct } from "node:fs";
14
- const k = "/** @deprecated since 5.0. Refactor using \\@arcgis/codemod */", dt = `${k}
5
+ import { path as N, toPosixPathSeparators as Ze } from "@arcgis/components-build-utils";
6
+ import { mkdir as ae, writeFile as Ie } 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 ke, e as oe, p as ne } from "./privateContext-CB7P40up.js";
10
+ import { apiTypeToImportType as le, globalPackageIdentifier as me, getApiMemberName as et, getMaybeStaticApiMemberName as ce, mergeApiNodes as Se, naturalSortModules as tt, compareNamedNodes as it, compareClassMembers as ot } from "./utils/apiHelpers.js";
11
+ import { printTypeParameters as te, printTypeAlias as nt } from "./utils/partPrinter.js";
12
+ import { identity as Ee, debounce as rt } from "@arcgis/toolkit/function";
13
+ import { hasRuntimeDeclaration as st } from "./utils/inferEntrypoints.js";
14
+ import { opendirSync as at, watch as lt, readFileSync as ct, statSync as dt } from "node:fs";
15
+ const S = "/** @deprecated since 5.0. Refactor using \\@arcgis/codemod */", ft = `${S}
15
16
  type HashMap<T> = Record<string, T | undefined>;
16
- ${k}
17
+ ${S}
17
18
  type nullish = null | undefined;
18
19
 
19
- ${k}
20
+ ${S}
20
21
  type IHandle = import("./core/Handles.js").ResourceHandle;
21
22
 
22
- ${k}
23
+ ${S}
23
24
  type GroupKey<T> = import("./core/Accessor.js").GroupKey<T>;
24
25
 
25
- ${k}
26
+ ${S}
26
27
  declare namespace __esri {
27
- ${k}
28
+ ${S}
28
29
  type Constructor<T> = new (...params: any[]) => T;
29
30
 
30
- ${k}
31
+ ${S}
31
32
  export type AnonymousAccessor = Accessor;
32
33
 
33
- ${k}
34
+ ${S}
34
35
  export type ReadonlyAccessor = Omit<Accessor, "set" | "_set" | "destroy" | "notifyChange" | "_get">;
35
36
 
36
- `, ft = `
37
+ `, mt = `
37
38
 
38
- ${k}
39
+ ${S}
39
40
  export namespace CIM {
40
41
  export enum ExpressionReturnType {
41
42
  Default = "Default",
@@ -1088,25 +1089,25 @@ declare namespace __esri {
1088
1089
  | ExternalReferenceEnvelope;
1089
1090
  }
1090
1091
 
1091
- ${k}
1092
+ ${S}
1092
1093
  export type EventHandlerCallback = (selectionResult: SelectionResultType) => void;
1093
- ${k}
1094
+ ${S}
1094
1095
  export type On = (eventName: string, eventHandler: EventHandlerCallback) => IHandle;
1095
1096
  }`;
1096
- let B, D, z, W, O = "", U = "", q = "", te = "";
1097
- function mt(e, t) {
1098
- z = void 0, W = void 0, U = e.path, q = "", te = "";
1097
+ let B, D, j, W, O = "", U = "", q = "", ee = "";
1098
+ function pt(e, t) {
1099
+ j = void 0, W = void 0, U = e.path, q = "", ee = "";
1099
1100
  const i = `import("./${U}.js")`;
1100
- let n = "";
1101
+ let o = "";
1101
1102
  const s = e.exports?.[0]?.declaration.name, a = h(e);
1102
1103
  if (a.constructorPropertiesInterface !== void 0) {
1103
- const o = a.constructorPropertiesInterface;
1104
- ue(o), w.length !== 0 && (n += pe(o, U, o.name, t));
1104
+ const n = a.constructorPropertiesInterface;
1105
+ he(n), A.length !== 0 && (o += ye(n, U, n.name, t));
1105
1106
  }
1106
1107
  let r;
1107
- for (let o = 0; o < e.declarations.length; ++o) {
1108
- const l = e.declarations[o];
1109
- if (ue(l), w.length === 0)
1108
+ for (let n = 0; n < e.declarations.length; ++n) {
1109
+ const l = e.declarations[n];
1110
+ if (he(l), A.length === 0)
1110
1111
  continue;
1111
1112
  const c = l.name === s, d = c ? "default" : l.name, m = l.kind === "function", f = l.kind === "variable";
1112
1113
  if (m || f) {
@@ -1114,13 +1115,13 @@ function mt(e, t) {
1114
1115
  if (l.name === r)
1115
1116
  continue;
1116
1117
  if (r = l.name, c) {
1117
- w.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export function.", {
1118
+ A.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export function.", {
1118
1119
  file: h(e).file,
1119
1120
  node: void 0
1120
- }), Z(w[0], t), D === void 0 && t.emitError("Expected default export @esriCompatibilityName tag to include a #", {
1121
+ }), Z(A[0], t), D === void 0 && t.emitError("Expected default export @esriCompatibilityName tag to include a #", {
1121
1122
  file: h(e).file,
1122
1123
  node: void 0
1123
- }), n += ` ${k}
1124
+ }), o += ` ${S}
1124
1125
  interface ${D} {
1125
1126
  ${l.name}: typeof ${i}.${d};
1126
1127
  }
@@ -1132,97 +1133,97 @@ function mt(e, t) {
1132
1133
  continue;
1133
1134
  }
1134
1135
  } else if (f && c) {
1135
- w.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export variable.", {
1136
+ A.length !== 1 && t.emitError("Expected only a single @esriCompatibilityName tag on a default export variable.", {
1136
1137
  file: h(e).file,
1137
1138
  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 .", {
1139
+ }), Z(A[0], t), (D !== void 0 || B !== void 0) && t.emitError("Expected default export @esriCompatibilityName tag to not include a # or .", {
1139
1140
  file: h(e).file,
1140
1141
  node: void 0
1141
- }), n += ` export const ${O}: typeof ${i}.default;
1142
+ }), o += ` export const ${O}: typeof ${i}.default;
1142
1143
 
1143
1144
  `;
1144
1145
  continue;
1145
1146
  }
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};
1147
+ for (let p = 0; p < A.length; ++p)
1148
+ Z(A[p], t), f && j !== void 0 ? q += ` export const ${O}: ${i}.${d};
1149
+ ` : ee += ` ${O}: typeof ${i}.${d};
1149
1150
  `;
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);
1151
+ } else if (l.kind === "class" || l.kind === "mixin" || l.kind === "interface" && fe(l).isMixinBaseClass === !0) {
1152
+ 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}`;
1153
+ for (let C = 0; C < A.length; ++C) {
1154
+ if (Z(A[C], t), O.startsWith("$")) {
1155
+ const b = O.slice(1);
1156
+ o += ut(b, l, d, U);
1156
1157
  continue;
1157
1158
  }
1158
1159
  const y = B === void 0 ? " " : " ";
1159
- n += `${y}${k}
1160
+ o += `${y}${S}
1160
1161
  ${y}export type ${O}${p} =${v}${g};
1161
1162
  ${y}export const ${O}: typeof${v}${u};
1162
1163
 
1163
1164
  `;
1164
1165
  }
1165
- } else l.kind === "interface" && (n += pe(l, U, d, t));
1166
+ } else l.kind === "interface" && (o += ye(l, U, d, t));
1166
1167
  }
1167
- return q.length > 0 && (z === void 0 && t.emitError("Invalid @esriCompatibilityName usage: Namespace name was not set correctly.", {
1168
+ return q.length > 0 && (j === void 0 && t.emitError("Invalid @esriCompatibilityName usage: Namespace name was not set correctly.", {
1168
1169
  file: h(e).file,
1169
1170
  node: void 0
1170
- }), n += ` ${k}
1171
- namespace ${z} {
1171
+ }), o += ` ${S}
1172
+ namespace ${j} {
1172
1173
  ${q.slice(0, -1)} }
1173
1174
 
1174
- `), te.length > 0 && (W === void 0 && t.emitError(
1175
+ `), ee.length > 0 && (W === void 0 && t.emitError(
1175
1176
  "Invalid @esriCompatibilityName usage: Classdec module interface name was not set correctly.",
1176
1177
  {
1177
1178
  file: h(e).file,
1178
1179
  node: void 0
1179
1180
  }
1180
- ), n += ` ${k}
1181
+ ), o += ` ${S}
1181
1182
  interface ${W} {
1182
- ${te} }
1183
+ ${ee} }
1183
1184
 
1184
1185
  export const ${W}: ${W};
1185
1186
 
1186
- `), n;
1187
+ `), o;
1187
1188
  }
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}`;
1190
- let o = "";
1191
- for (let l = 0; l < w.length; ++l) {
1192
- Z(w[l], n);
1193
- const c = ot(O, a, void 0, r);
1194
- B === void 0 ? o += ` ${k}
1189
+ function ye(e, t, i, o) {
1190
+ const s = te(K(e.typeParameters, !1, void 0)), a = K(e.typeParameters, !1, t), r = `import("./${t}.js").${i}${s}`;
1191
+ let n = "";
1192
+ for (let l = 0; l < A.length; ++l) {
1193
+ Z(A[l], o);
1194
+ const c = nt(O, a, void 0, r);
1195
+ B === void 0 ? n += ` ${S}
1195
1196
  ${c}
1196
- ` : q += ` ${k}
1197
+ ` : q += ` ${S}
1197
1198
  ${c}
1198
1199
 
1199
1200
  `;
1200
1201
  }
1201
- return o += `
1202
- `, o;
1202
+ return n += `
1203
+ `, n;
1203
1204
  }
1204
1205
  function K(e, t, i) {
1205
1206
  if (e === void 0)
1206
1207
  return;
1207
- const n = [];
1208
+ const o = [];
1208
1209
  for (let s = 0; s < e.length; ++s) {
1209
1210
  const a = e[s];
1210
1211
  if (i !== void 0) {
1211
- const r = a.constraint === void 0 ? void 0 : le(a.constraint, i), o = a.default === void 0 ? r ?? {
1212
+ const r = a.constraint === void 0 ? void 0 : le(a.constraint, i), n = a.default === void 0 ? r ?? {
1212
1213
  text: "any",
1213
1214
  references: void 0,
1214
1215
  values: void 0,
1215
1216
  source: void 0
1216
1217
  } : le(a.default, i);
1217
- n.push({
1218
+ o.push({
1218
1219
  ...a,
1219
- default: o,
1220
+ default: n,
1220
1221
  constraint: r
1221
1222
  });
1222
1223
  } else if (t) {
1223
1224
  if (a.default !== void 0)
1224
1225
  break;
1225
- n.push({
1226
+ o.push({
1226
1227
  name: "any",
1227
1228
  constraint: void 0,
1228
1229
  default: void 0,
@@ -1231,7 +1232,7 @@ function K(e, t, i) {
1231
1232
  out: void 0
1232
1233
  });
1233
1234
  } else
1234
- n.push({
1235
+ o.push({
1235
1236
  name: a.name,
1236
1237
  constraint: void 0,
1237
1238
  default: void 0,
@@ -1240,18 +1241,18 @@ function K(e, t, i) {
1240
1241
  out: void 0
1241
1242
  });
1242
1243
  }
1243
- return n.length === 0 ? void 0 : n;
1244
+ return o.length === 0 ? void 0 : o;
1244
1245
  }
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;
1246
+ const ie = [];
1247
+ let A = ie;
1248
+ function he(e) {
1249
+ e.kind === "variable" ? A = Ke(e).esriCompatibilityNames ?? ie : e.kind === "function" ? A = Qe(e).esriCompatibilityNames ?? ie : A = fe(e).esriCompatibilityNames ?? ie;
1249
1250
  }
1250
1251
  function Z(e, t) {
1251
1252
  const i = e.indexOf(".");
1252
1253
  if (i !== -1) {
1253
- B = e.slice(0, i), D = void 0, O = e.slice(i + 1), z === void 0 ? z = B : z !== B && t.emitError(
1254
- `Invalid @esriCompatibilityName usage: Multiple different namespaces in a single file are not supported. Found ${z} and ${B}`,
1254
+ B = e.slice(0, i), D = void 0, O = e.slice(i + 1), j === void 0 ? j = B : j !== B && t.emitError(
1255
+ `Invalid @esriCompatibilityName usage: Multiple different namespaces in a single file are not supported. Found ${j} and ${B}`,
1255
1256
  {
1256
1257
  file: void 0,
1257
1258
  scope: U,
@@ -1260,9 +1261,9 @@ function Z(e, t) {
1260
1261
  );
1261
1262
  return;
1262
1263
  }
1263
- const n = e.indexOf("#");
1264
- if (n !== -1) {
1265
- B = void 0, D = e.slice(0, n), O = e.slice(n + 1), W === void 0 ? W = D : W !== D && t.emitError(
1264
+ const o = e.indexOf("#");
1265
+ if (o !== -1) {
1266
+ B = void 0, D = e.slice(0, o), O = e.slice(o + 1), W === void 0 ? W = D : W !== D && t.emitError(
1266
1267
  `Invalid @esriCompatibilityName usage: Multiple different __esri interfaces in a single file are not supported. Found ${W} and ${D}`,
1267
1268
  {
1268
1269
  file: void 0,
@@ -1274,25 +1275,25 @@ function Z(e, t) {
1274
1275
  }
1275
1276
  B = void 0, D = void 0, O = e;
1276
1277
  }
1277
- function pt(e, t, i, n) {
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) : "";
1280
- return ` ${k}
1281
- export type ${r}${o};
1282
- ${k}
1278
+ function ut(e, t, i, o) {
1279
+ const s = yt(e, t.events), r = `${// IdentityManager fake class got renamed to IdentityManagerBase real class
1280
+ t.name.startsWith(A[0]) ? A[0] : t.name}${_e(e)}Event`, n = ht(s, o) ?? ` = import("./${o}.js").${i}["@eventTypes"]["${e}"]`, l = n.startsWith("<") ? n.indexOf(">") + 1 : -1, c = l !== -1 ? n.slice(0, l) : "";
1281
+ return ` ${S}
1282
+ export type ${r}${n};
1283
+ ${S}
1283
1284
  export type ${r}Handler${c} = (event: ${r}${c}) => void;
1284
1285
 
1285
1286
  `;
1286
1287
  }
1287
- function ut(e, t) {
1288
+ function yt(e, t) {
1288
1289
  if (t !== void 0)
1289
1290
  for (let i = 0; i < t.length; ++i) {
1290
- const n = t[i];
1291
- if (n.name === e)
1292
- return n;
1291
+ const o = t[i];
1292
+ if (o.name === e)
1293
+ return o;
1293
1294
  }
1294
1295
  }
1295
- function yt(e, t) {
1296
+ function ht(e, t) {
1296
1297
  const i = e?.type;
1297
1298
  if (t = e?.inheritedFrom?.module ?? t, i?.references?.length === 1) {
1298
1299
  const a = i.references[0];
@@ -1301,31 +1302,31 @@ function yt(e, t) {
1301
1302
  }
1302
1303
  if (i?.references?.length !== 2)
1303
1304
  return;
1304
- const n = i.references[0], s = i.references[1];
1305
- if (!(n.package !== void 0 || s.package !== void 0 || s.module !== void 0 || s.viewUrl !== void 0) && i.text === `${n.name}<${s.name}>`)
1306
- return t = n.module ?? t, `<${s.name}> = import("./${t}.js").${n.name}<${s.name}>`;
1305
+ const o = i.references[0], s = i.references[1];
1306
+ if (!(o.package !== void 0 || s.package !== void 0 || s.module !== void 0 || s.viewUrl !== void 0) && i.text === `${o.name}<${s.name}>`)
1307
+ return t = o.module ?? t, `<${s.name}> = import("./${t}.js").${o.name}<${s.name}>`;
1307
1308
  }
1308
- function ht(e, t) {
1309
- let i = dt;
1310
- for (let n = 0; n < e.length; ++n) {
1311
- const s = e[n];
1312
- i += mt(s, t);
1309
+ function gt(e, t) {
1310
+ let i = ft;
1311
+ for (let o = 0; o < e.length; ++o) {
1312
+ const s = e[o];
1313
+ i += pt(s, t);
1313
1314
  }
1314
- return i + ft;
1315
+ return i + mt;
1315
1316
  }
1316
- function gt(e, t, i) {
1317
- let n = "";
1317
+ function vt(e, t, i) {
1318
+ let o = "";
1318
1319
  const s = t.importsMap, a = /* @__PURE__ */ Object.create(null);
1319
1320
  for (const r in s) {
1320
- const o = s[r];
1321
- if (!o.wasUsed)
1321
+ const n = s[r];
1322
+ if (!n.wasUsed)
1322
1323
  continue;
1323
- let l = o.specifier;
1324
- if (o.replacementName !== void 0) {
1325
- const d = s[o.replacementName];
1324
+ let l = n.specifier;
1325
+ if (n.replacementName !== void 0) {
1326
+ const d = s[n.replacementName];
1326
1327
  if (d?.wasUsed === !0) {
1327
- d.specifier !== o.specifier && i.emitError(
1328
- `Failed to perform type replacement of ${r} with ${o.replacementName} because ${o.replacementName} is already imported from ${d.modulePath}, where as type replacement was going to import it from ${o.modulePath}. Either manually replace ${o.replacementName} usage with ${r} or alias ${r} to another name.`,
1328
+ d.specifier !== n.specifier && i.emitError(
1329
+ `Failed to perform type replacement of ${r} with ${n.replacementName} because ${n.replacementName} is already imported from ${d.modulePath}, where as type replacement was going to import it from ${n.modulePath}. Either manually replace ${n.replacementName} usage with ${r} or alias ${r} to another name.`,
1329
1330
  {
1330
1331
  file: t.file,
1331
1332
  node: void 0
@@ -1334,15 +1335,15 @@ function gt(e, t, i) {
1334
1335
  continue;
1335
1336
  }
1336
1337
  }
1337
- const c = o.replacementName ?? r;
1338
- if (o.type === "named") {
1339
- if (o.modulePath !== void 0) {
1340
- const f = o.actualName ?? c, p = i.moduleMap.get(o.modulePath), g = p === void 0 ? void 0 : h(p);
1338
+ const c = n.replacementName ?? r;
1339
+ if (n.type === "named") {
1340
+ if (n.modulePath !== void 0) {
1341
+ const f = n.actualName ?? c, p = i.moduleMap.get(n.modulePath), g = p === void 0 ? void 0 : h(p);
1341
1342
  if (g?.index.named[f] === void 0) {
1342
- if (i.privateMixinModuleNames.has(o.modulePath))
1343
+ if (i.privateMixinModuleNames.has(n.modulePath))
1343
1344
  continue;
1344
1345
  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.`,
1346
+ `The ${x("red", f)} imported from ${x("red", p?.sourcePath ?? n.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
1347
  {
1347
1348
  file: t.file,
1348
1349
  node: void 0
@@ -1351,149 +1352,147 @@ function gt(e, t, i) {
1351
1352
  } else
1352
1353
  l = re(g, t);
1353
1354
  }
1354
- const d = a[l], m = o.actualName === void 0 ? c : `${o.actualName} as ${c}`;
1355
+ const d = a[l], m = n.actualName === void 0 ? c : `${n.actualName} as ${c}`;
1355
1356
  a[l] = d === void 0 ? m : `${d}, ${m}`;
1356
- } else if (o.type === "default") {
1357
- if (o.modulePath !== void 0) {
1358
- const d = i.moduleMap.get(o.modulePath), m = d === void 0 ? void 0 : h(d);
1357
+ } else if (n.type === "default") {
1358
+ if (n.modulePath !== void 0) {
1359
+ const d = i.moduleMap.get(n.modulePath), m = d === void 0 ? void 0 : h(d);
1359
1360
  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.`,
1361
+ `The default exported declaration in ${x("red", d?.sourcePath ?? n.modulePath)} is not @public but used in the type of a @public declaration. Add /** @public */ JSDoc or refactor out the usage.`,
1361
1362
  {
1362
1363
  file: t.file,
1363
1364
  node: void 0
1364
1365
  }
1365
1366
  ) : l = re(m, t);
1366
1367
  }
1367
- n += `import type ${c} from "${l}";
1368
+ o += `import type ${c} from "${l}";
1368
1369
  `;
1369
1370
  } else {
1370
- if (o.modulePath !== void 0) {
1371
- const d = i.moduleMap.get(o.modulePath);
1371
+ if (n.modulePath !== void 0) {
1372
+ const d = i.moduleMap.get(n.modulePath);
1372
1373
  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.`,
1374
+ `Non-public module was imported: ${x("red", n.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
1375
  {
1375
1376
  file: t.file,
1376
1377
  node: void 0
1377
1378
  }
1378
1379
  ) : l = re(h(d), t);
1379
1380
  }
1380
- c === "__esri" ? n = `/// <reference types="@arcgis/core/interfaces.d.ts" />
1381
- ${n}` : n += `import type * as ${c} from "${l}";
1381
+ c === "__esri" ? o = `/// <reference types="@arcgis/core/interfaces.d.ts" />
1382
+ ${o}` : o += `import type * as ${c} from "${l}";
1382
1383
  `;
1383
1384
  }
1384
- if (o.modulePath !== void 0 && i.watchFiles !== void 0) {
1385
- const d = i.moduleMap.get(o.modulePath), f = (d === void 0 ? void 0 : h(d))?.file.fileName.slice(i.config.context.cwd.length);
1385
+ if (n.modulePath !== void 0 && i.watchFiles !== void 0) {
1386
+ const d = i.moduleMap.get(n.modulePath), f = (d === void 0 ? void 0 : h(d))?.file.fileName.slice(i.config.context.cwd.length);
1386
1387
  f !== void 0 && (i.watchFiles.get(e.sourcePath).dependencies.add(f), i.watchFiles.get(f).dependents.set(e.sourcePath, !0));
1387
1388
  }
1388
1389
  }
1389
1390
  if (i.produceDts) {
1390
1391
  for (const r in a) {
1391
- const o = a[r];
1392
- n += `import type { ${o} } from "${r}";
1392
+ const n = a[r];
1393
+ o += `import type { ${n} } from "${r}";
1393
1394
  `;
1394
1395
  }
1395
- t.importsText = n;
1396
+ t.importsText = o;
1396
1397
  }
1397
1398
  }
1398
1399
  function re(e, t) {
1399
- return `${be(t.dtsPath, e.dtsPath)}.js`;
1400
+ return `${xe(t.dtsPath, e.dtsPath)}.js`;
1400
1401
  }
1401
- function vt(e, t, i, n) {
1402
+ function Ct(e, t, i, o) {
1402
1403
  const s = e.references;
1403
1404
  if (s !== void 0) {
1404
1405
  if (t.autoCastingRequiresType === void 0 && s.length > 1 && s[0].module === "core/Collection")
1405
1406
  if (s.length > 2)
1406
1407
  t.autoCastingRequiresType = !0;
1407
1408
  else {
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
+ const a = s[1], r = a.module === void 0 ? i : o.moduleMap.get(a.module), n = r === void 0 ? void 0 : h(r), l = a.name === "default" ? n?.index.default : n?.index.named[a.name];
1410
+ Ae(l) && (t.autoCastingRequiresType = !0);
1410
1411
  }
1411
- return ke(e, t, n, i, s);
1412
+ return Te(e, t, o, i, s);
1412
1413
  }
1413
1414
  }
1414
- function ke(e, t, i, n, s) {
1415
+ function Te(e, t, i, o, s) {
1415
1416
  for (let a = s.length - 1; a >= 0; a--) {
1416
1417
  const r = s[a];
1417
1418
  if (r.package !== void 0) {
1418
- r.package === Pe && r.name === "Date" && ye(
1419
+ r.package === me && r.name === "Date" && ge(
1419
1420
  e,
1420
1421
  s,
1421
1422
  a,
1422
- { type: Mt, inheritedFrom: void 0 },
1423
+ { type: xt, inheritedFrom: void 0 },
1423
1424
  i,
1424
- n,
1425
+ o,
1425
1426
  t
1426
1427
  );
1427
1428
  continue;
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
+ const n = r.module === void 0 ? o : i.moduleMap.get(r.module), l = n === void 0 ? void 0 : h(n), c = r.name === "default" ? l?.index.default : l?.index.named[r.name];
1431
+ if (Ae(c)) {
1431
1432
  const m = `(${c.type.text})`, f = e.text;
1432
1433
  e.text = `${e.text.slice(0, r.start)}${m}${e.text.slice(r.end)}`;
1433
1434
  const p = e.text, g = r.start + 1, u = [];
1434
1435
  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;
1436
+ const y = c.type.references[C], b = y.module ?? n?.path, M = b === o.path;
1436
1437
  u.push({
1437
1438
  ...y,
1438
- module: b ? void 0 : M,
1439
+ module: M ? void 0 : b,
1439
1440
  start: y.start + g,
1440
1441
  end: y.end + g
1441
1442
  });
1442
1443
  }
1443
- if (ke(e, t, i, n, u), e.text === p) {
1444
+ if (Te(e, t, i, o, u), e.text === p) {
1444
1445
  e.text = f;
1445
1446
  continue;
1446
1447
  }
1447
1448
  s.splice(a, 1, ...u);
1448
1449
  const v = e.text.length - f.length;
1449
- Me(s, v, a + u.length);
1450
+ Pe(s, v, a + u.length);
1450
1451
  continue;
1451
1452
  }
1452
1453
  if (c?.kind !== "class")
1453
1454
  continue;
1454
- const d = Ee(c, o, void 0, i);
1455
+ const d = $e(c, n, void 0, i);
1455
1456
  if (d === void 0) {
1456
1457
  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)}.`,
1458
+ `Failed to resolve auto-castable type for ${x("red", c.name)} from ${x("red", n.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", o.sourcePath)} in type ${x("blue", e.text)}.`,
1460
1459
  {
1461
- file: h(o).file,
1460
+ file: h(n).file,
1462
1461
  node: void 0
1463
1462
  }
1464
1463
  );
1465
1464
  continue;
1466
1465
  }
1467
- ye(
1466
+ ge(
1468
1467
  e,
1469
1468
  s,
1470
1469
  a,
1471
1470
  d,
1472
1471
  i,
1473
- n,
1472
+ o,
1474
1473
  t
1475
1474
  );
1476
1475
  }
1477
1476
  }
1478
- function Ee(e, t, i, n) {
1477
+ function $e(e, t, i, o) {
1479
1478
  const s = h(t), a = s.constructorAutoCastType;
1480
1479
  if (a !== void 0)
1481
1480
  return a;
1482
- const r = Ct(e, t, i, n);
1481
+ const r = Mt(e, t, i, o);
1483
1482
  return r !== void 0 && (s.constructorAutoCastType = r), r;
1484
1483
  }
1485
- function Ct(e, t, i, n) {
1484
+ function Mt(e, t, i, o) {
1486
1485
  if (e.members !== void 0)
1487
1486
  for (let r = 0; r < e.members.length; ++r) {
1488
- const o = e.members[r];
1489
- if (o.kind === "constructor" && // Use the last constructor for auto-casting signature
1487
+ const n = e.members[r];
1488
+ if (n.kind === "constructor" && // Use the last constructor for auto-casting signature
1490
1489
  // Examples: Point, MeshTexture
1491
1490
  e.members[r + 1]?.kind !== "constructor" && // Only consider the single-parameter signature
1492
- o.parameters?.length === 1 && // To avoid false positives, constructors without type references are not
1491
+ n.parameters?.length === 1 && // To avoid false positives, constructors without type references are not
1493
1492
  // considered autocastable. This excludes core/Accessor#constructor's any[].
1494
- o.parameters[0].type?.references !== void 0)
1493
+ n.parameters[0].type?.references !== void 0)
1495
1494
  return {
1496
- type: o.parameters[0].type,
1495
+ type: n.parameters[0].type,
1497
1496
  inheritedFrom: i?.path
1498
1497
  };
1499
1498
  }
@@ -1506,7 +1505,7 @@ function Ct(e, t, i, n) {
1506
1505
  name: a.name,
1507
1506
  module: t.path,
1508
1507
  package: void 0,
1509
- viewUrl: Ve(t.path, a.name, void 0, n),
1508
+ viewUrl: Ye(t.path, a.name, void 0, o),
1510
1509
  start: 0,
1511
1510
  end: a.name.length
1512
1511
  }
@@ -1515,24 +1514,24 @@ function Ct(e, t, i, n) {
1515
1514
  source: void 0
1516
1515
  }, inheritedFrom: i?.path };
1517
1516
  if (e.superclass !== void 0) {
1518
- const r = e.superclass.module === void 0 ? t : n.moduleMap.get(e.superclass.module), c = (r === void 0 ? void 0 : h(r))?.index?.class;
1517
+ const r = e.superclass.module === void 0 ? t : o.moduleMap.get(e.superclass.module), c = (r === void 0 ? void 0 : h(r))?.index?.class;
1519
1518
  if (c !== void 0)
1520
- return Ee(c, r, r, n);
1519
+ return $e(c, r, r, o);
1521
1520
  }
1522
1521
  }
1523
- function ye(e, t, i, { type: n, inheritedFrom: s }, a, r, o) {
1524
- let l = n.references;
1525
- l.length === 2 && l[0].name === "ReadonlyArrayOrCollection" && l[1].name === "T" && (l = [l[0]], n = {
1526
- ...n,
1522
+ function ge(e, t, i, { type: o, inheritedFrom: s }, a, r, n) {
1523
+ let l = o.references;
1524
+ l.length === 2 && l[0].name === "ReadonlyArrayOrCollection" && l[1].name === "T" && (l = [l[0]], o = {
1525
+ ...o,
1527
1526
  text: "ReadonlyArrayOrCollection",
1528
1527
  references: l
1529
1528
  });
1530
- let c = n.text;
1531
- const d = t[i], m = n.text.length - (d.end - d.start);
1529
+ let c = o.text;
1530
+ const d = t[i], m = o.text.length - (d.end - d.start);
1532
1531
  let f = 0;
1533
1532
  t.splice(i, 1);
1534
1533
  for (let p = l.length - 1; p >= 0; p--) {
1535
- const g = l[p], u = n.text.slice(g.start, g.end);
1534
+ const g = l[p], u = o.text.slice(g.start, g.end);
1536
1535
  if (u !== g.name && g.name !== "default") {
1537
1536
  a.emitError(
1538
1537
  `Unsupported case: cannot yet handle auto-adding imports for renamed references. Tried to add ${g.name} as ${u} from ${g.module} when resolving auto-casting type.`,
@@ -1554,28 +1553,28 @@ function ye(e, t, i, { type: n, inheritedFrom: s }, a, r, o) {
1554
1553
  );
1555
1554
  continue;
1556
1555
  }
1557
- Te(g, C, a, r);
1558
- const b = d.start, I = {
1556
+ Fe(g, C, a, r);
1557
+ const M = d.start, I = {
1559
1558
  ...g,
1560
- start: g.start + b + f,
1561
- end: g.end + b + f
1559
+ start: g.start + M + f,
1560
+ end: g.end + M + f
1562
1561
  }, P = y.typeName;
1563
- if (l.length === 1 && o.autoCastingRequiresType === !0 && P !== void 0) {
1564
- const L = o.autoCastingDefaultType === P, S = `(${u} & { type${L ? "?" : ""}: "${P}" })`, F = S.length - u.length;
1565
- f += F, I.end += F, c = c.slice(0, g.start) + S + c.slice(g.end);
1562
+ if (l.length === 1 && n.autoCastingRequiresType === !0 && P !== void 0) {
1563
+ const L = n.autoCastingDefaultType === P, k = `(${u} & { type${L ? "?" : ""}: "${P}" })`, F = k.length - u.length;
1564
+ f += F, I.end += F, c = c.slice(0, g.start) + k + c.slice(g.end);
1566
1565
  }
1567
1566
  t.splice(i, 0, I);
1568
1567
  }
1569
- return e.text = e.text.slice(0, d.start) + c + e.text.slice(d.end), Me(
1568
+ return e.text = e.text.slice(0, d.start) + c + e.text.slice(d.end), Pe(
1570
1569
  t,
1571
1570
  m + f,
1572
1571
  i + (l?.length ?? 0)
1573
1572
  ), !0;
1574
1573
  }
1575
- function Te(e, t, i, n) {
1576
- const s = h(n);
1574
+ function Fe(e, t, i, o) {
1575
+ const s = h(o);
1577
1576
  if (e.package !== void 0) {
1578
- if (e.package === Pe)
1577
+ if (e.package === me)
1579
1578
  return;
1580
1579
  i.emitError(
1581
1580
  `Unsupported case: cannot yet handle auto-adding imports for external packages. Tried to add ${e.name} from ${e.package} when resolving auto-casting type.`,
@@ -1585,7 +1584,7 @@ function Te(e, t, i, n) {
1585
1584
  }
1586
1585
  );
1587
1586
  }
1588
- if (t === n)
1587
+ if (t === o)
1589
1588
  return;
1590
1589
  const a = h(t), r = e.name === "default" ? a.index.default?.name : e.name;
1591
1590
  if (r === void 0) {
@@ -1598,14 +1597,14 @@ function Te(e, t, i, n) {
1598
1597
  );
1599
1598
  return;
1600
1599
  }
1601
- let o = r, l;
1602
- const c = e;
1603
- c.printableText !== void 0 && (o = c.printableText, l = r);
1604
- const d = s.importsMap[o];
1605
- d === void 0 ? s.importsMap[o] = {
1600
+ let n = r, l;
1601
+ const c = ke(e);
1602
+ c !== void 0 && (n = c, l = r);
1603
+ const d = s.importsMap[n];
1604
+ d === void 0 ? s.importsMap[n] = {
1606
1605
  type: e.name === "default" ? "default" : "named",
1607
1606
  modulePath: t.path,
1608
- specifier: be(s.dtsPath, a.dtsPath),
1607
+ specifier: xe(s.dtsPath, a.dtsPath),
1609
1608
  replacementName: void 0,
1610
1609
  actualName: l,
1611
1610
  wasUsed: !0
@@ -1617,27 +1616,27 @@ function Te(e, t, i, n) {
1617
1616
  }
1618
1617
  ) : d.wasUsed = !0;
1619
1618
  }
1620
- function $e(e) {
1619
+ function Ae(e) {
1621
1620
  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);
1622
1621
  }
1623
1622
  function bt(e) {
1624
1623
  let t = 0;
1625
1624
  for (let i = 0; i < e.references.length; ++i) {
1626
- const n = e.references[i], s = e.text.slice(t, n.start).trim();
1625
+ const o = e.references[i], s = e.text.slice(t, o.start).trim();
1627
1626
  if (s !== "" && s !== "|")
1628
1627
  return !1;
1629
- t = n.end;
1628
+ t = o.end;
1630
1629
  }
1631
1630
  return t === e.text.length;
1632
1631
  }
1633
- const Mt = {
1632
+ const xt = {
1634
1633
  // Wrap in parents to correctly substitute Date[] in TimeInfo.stops
1635
1634
  text: "(Date | number | string)",
1636
1635
  references: [
1637
1636
  {
1638
1637
  name: "Date",
1639
1638
  module: void 0,
1640
- package: "global:",
1639
+ package: me,
1641
1640
  viewUrl: "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date",
1642
1641
  start: 1,
1643
1642
  end: 5
@@ -1646,45 +1645,39 @@ const Mt = {
1646
1645
  values: void 0,
1647
1646
  source: void 0
1648
1647
  };
1649
- function xt(e, t) {
1648
+ function Pt(e, t) {
1650
1649
  const i = e.constructorPropertiesInterface;
1651
1650
  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]);
1651
+ const o = h(t.apiModule).index.class;
1652
+ i.typeParameters = o.typeParameters;
1653
+ const s = o.superclass;
1654
+ if (s !== void 0) {
1655
+ const r = ve(s, t);
1656
+ r !== void 0 && (i.supertypes ??= [], i.supertypes.push(r));
1660
1657
  }
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));
1658
+ if (o.mixins !== void 0)
1659
+ for (let r = 0; r < o.mixins.length; ++r) {
1660
+ const n = o.mixins[r], l = ve(n, t);
1661
+ l !== void 0 && (i.supertypes ??= [], i.supertypes.push(l));
1669
1662
  }
1670
1663
  let a = "";
1671
- if (s.members !== void 0)
1672
- for (let r = 0; r < s.members.length; ++r) {
1673
- const o = s.members[r];
1674
- if (o.kind !== "field" || o.inheritedFrom !== void 0 || o.static !== void 0)
1664
+ if (o.members !== void 0)
1665
+ for (let r = 0; r < o.members.length; ++r) {
1666
+ const n = o.members[r];
1667
+ if (n.kind !== "field" || n.inheritedFrom !== void 0 || n.static !== void 0)
1675
1668
  continue;
1676
- const l = oe(o);
1669
+ const l = oe(n);
1677
1670
  if (l.isAbstract)
1678
1671
  continue;
1679
- let c = e.constructorOnlySetters?.[o.name];
1672
+ let c = e.constructorOnlySetters?.[n.name];
1680
1673
  if (c === void 0) {
1681
- if (o.readonly !== void 0)
1674
+ if (n.readonly !== void 0)
1682
1675
  continue;
1683
- if (o.getterType === void 0 && l.isOverride === void 0) {
1684
- a += `${a.length === 0 ? "" : " | "}"${o.name}"`;
1676
+ if (n.getterType === void 0 && l.isOverride === void 0) {
1677
+ a += `${a.length === 0 ? "" : " | "}"${n.name}"`;
1685
1678
  continue;
1686
1679
  } else
1687
- c = o.type, c.text.includes(" | undefined") || (c = { ...c, text: `${c.text} | undefined` });
1680
+ c = n.type, c.text.includes(" | undefined") || (c = { ...c, text: `${c.text} | undefined` });
1688
1681
  } else c.text.includes(" | undefined") || (c.text += " | undefined");
1689
1682
  const d = {
1690
1683
  isAbstract: void 0,
@@ -1695,8 +1688,8 @@ function xt(e, t) {
1695
1688
  isConstructorOnly: void 0,
1696
1689
  isOverride: void 0,
1697
1690
  dtsTypeOverride: void 0
1698
- }, m = o, f = {
1699
- [Qe]: d,
1691
+ }, m = n, f = {
1692
+ [ne]: d,
1700
1693
  kind: "field",
1701
1694
  name: m.name,
1702
1695
  static: void 0,
@@ -1718,66 +1711,75 @@ function xt(e, t) {
1718
1711
  i.members ??= [], i.members.push(f);
1719
1712
  }
1720
1713
  if (a.length > 0) {
1721
- n.superTypesText ??= [];
1722
- let r = `Partial<Pick<${s.name}`;
1714
+ i.supertypes ??= [];
1715
+ let r = `Partial<Pick<${o.name}`;
1723
1716
  if (i.typeParameters !== void 0) {
1724
1717
  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 += ", ");
1718
+ for (let l = 0; l < i.typeParameters.length; ++l) {
1719
+ const c = i.typeParameters[l];
1720
+ r += c.name, l < i.typeParameters.length - 1 && (r += ", ");
1728
1721
  }
1729
1722
  r += ">";
1730
1723
  }
1731
- r += `, ${a}>>`, n.superTypesText.push(r);
1724
+ r += `, ${a}>>`;
1725
+ const n = {
1726
+ [ne]: r,
1727
+ name: "",
1728
+ module: void 0,
1729
+ package: void 0,
1730
+ viewUrl: void 0,
1731
+ typeArguments: void 0
1732
+ };
1733
+ i.supertypes.push(n);
1732
1734
  }
1733
1735
  }
1734
- function he(e, t, i) {
1736
+ function ve(e, t) {
1735
1737
  if (e.package !== void 0)
1736
1738
  return;
1737
- const n = t.moduleMap.get(e.module);
1738
- if (n === void 0)
1739
+ const i = t.moduleMap.get(e.module);
1740
+ if (i === void 0)
1739
1741
  return;
1740
- const s = h(n), a = s.constructorPropertiesInterface;
1741
- if (a === void 0) {
1742
- const o = s.inheritance;
1743
- if (typeof o == "object" && o.hasSettableField) {
1744
- const l = e.name === "default" ? s.index.class?.name ?? e.name : e.name;
1742
+ const o = h(i), s = o.constructorPropertiesInterface;
1743
+ if (s === void 0) {
1744
+ const n = o.inheritance;
1745
+ if (typeof n == "object" && n.hasSettableField) {
1746
+ const l = e.name === "default" ? o.index.class?.name ?? e.name : e.name;
1745
1747
  t.emitError(
1746
- `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}.`,
1748
+ `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
1749
  { file: h(t.apiModule).file, node: void 0 }
1748
- ), o.hasSettableField = !1;
1750
+ ), n.hasSettableField = !1;
1749
1751
  }
1750
1752
  return;
1751
1753
  }
1752
- const r = {
1753
- name: a.name,
1754
- module: e.module,
1755
- package: e.package,
1756
- viewUrl: e.viewUrl,
1757
- typeArguments: void 0,
1754
+ const a = ke(e), r = {
1758
1755
  /**
1759
1756
  * If class was renamed when imported, also rename the created Properties
1760
1757
  * interface. This avoids name collision inside of
1761
1758
  * views/3d/environment/SunLighting as it imports webscene/SunLighting.
1762
1759
  * apiReference.name !== class.name for references to mixin base classes.
1763
1760
  */
1764
- printableText: i === e.name ? void 0 : Pt(i, s.index.class.name)
1761
+ [ne]: a === e.name ? void 0 : It(a, o.index.class.name),
1762
+ name: s.name,
1763
+ module: e.module,
1764
+ package: e.package,
1765
+ viewUrl: e.viewUrl,
1766
+ typeArguments: void 0
1765
1767
  };
1766
- return Te(r, n, t, t.apiModule), r;
1768
+ return Fe(r, i, t, t.apiModule), r[ne] ??= s.name, r;
1767
1769
  }
1768
- function Pt(e, t) {
1770
+ function It(e, t) {
1769
1771
  if (e === void 0 || e === t)
1770
1772
  return;
1771
1773
  const i = e.indexOf("<");
1772
1774
  if (e = i === -1 ? e : e.slice(0, i), e !== t)
1773
1775
  return `${e}Properties`;
1774
1776
  }
1775
- function It(e) {
1777
+ function kt(e) {
1776
1778
  if (e.customElement === void 0)
1777
1779
  return;
1778
1780
  const t = e, i = [];
1779
- for (let n = 0; n < t.members.length; ++n) {
1780
- const s = t.members[n];
1781
+ for (let o = 0; o < t.members.length; ++o) {
1782
+ const s = t.members[o];
1781
1783
  if (s.kind !== "field" || s.attribute === void 0 || s.privacy !== void 0)
1782
1784
  continue;
1783
1785
  const a = s.type.values?.filter(
@@ -1789,7 +1791,7 @@ function It(e) {
1789
1791
  description: s.description,
1790
1792
  inheritedFrom: s.inheritedFrom,
1791
1793
  type: a === void 0 || a.length === 0 ? s.type : {
1792
- text: Ge(a),
1794
+ text: Le(a),
1793
1795
  references: void 0,
1794
1796
  values: a,
1795
1797
  source: void 0
@@ -1813,15 +1815,15 @@ const de = {
1813
1815
  */
1814
1816
  deferred: 1
1815
1817
  };
1816
- function St(e, t, i, n) {
1818
+ function St(e, t, i, o) {
1817
1819
  const s = e;
1818
- n.produceDts && (Q(t).eventTypesProperty = s);
1820
+ o.produceDts && (fe(t).eventTypesProperty = s);
1819
1821
  const a = h(i), r = `${t.name}Events`;
1820
1822
  if (s.type.text !== r && !s.type.text.startsWith(`${r}<`)) {
1821
1823
  if (s.type.text === "unknown")
1822
1824
  return;
1823
- n.emitError(
1824
- `The "@eventTypes" property must be of type named "${t.name}Events". Found ${x.red(s.type.text)}.`,
1825
+ o.emitError(
1826
+ `The "@eventTypes" property must be of type named "${t.name}Events". Found ${x("red", s.type.text)}.`,
1825
1827
  {
1826
1828
  file: a.file,
1827
1829
  node: void 0
@@ -1829,9 +1831,9 @@ function St(e, t, i, n) {
1829
1831
  );
1830
1832
  return;
1831
1833
  }
1832
- const o = a.index.named[r];
1833
- if (o?.kind !== "interface") {
1834
- n.emitError(
1834
+ const n = a.index.named[r];
1835
+ if (n?.kind !== "interface") {
1836
+ o.emitError(
1835
1837
  `The "${r}" referenced by the "@eventTypes" property must be a @public interface and defined in the same file as the ${t.name} class.`,
1836
1838
  {
1837
1839
  file: a.file,
@@ -1840,11 +1842,11 @@ function St(e, t, i, n) {
1840
1842
  );
1841
1843
  return;
1842
1844
  }
1843
- t.events ??= [], Fe(o, t, i, void 0, n);
1845
+ t.events ??= [], we(n, t, i, void 0, o);
1844
1846
  }
1845
- function Fe(e, t, i, n, s) {
1846
- const a = n !== void 0;
1847
- if (n ??= /* @__PURE__ */ new Set(), e.type !== void 0) {
1847
+ function we(e, t, i, o, s) {
1848
+ const a = o !== void 0;
1849
+ if (o ??= /* @__PURE__ */ new Set(), e.type !== void 0) {
1848
1850
  s.emitError(
1849
1851
  `For documentation purposes, event interface types need to be statically analyzable - include only properties & extends clauses. Found complex type in ${e.name}: ${e.type.text}`,
1850
1852
  {
@@ -1856,10 +1858,10 @@ function Fe(e, t, i, n, s) {
1856
1858
  }
1857
1859
  if (e.members !== void 0)
1858
1860
  for (let r = 0; r < e.members.length; ++r) {
1859
- const o = e.members[r];
1860
- if (o.kind !== "field") {
1861
+ const n = e.members[r];
1862
+ if (n.kind !== "field") {
1861
1863
  s.emitError(
1862
- `Event interfaces should only contain properties. Found ${et(o)} of kind ${x.red(o.kind)} in ${e.name}.`,
1864
+ `Event interfaces should only contain properties. Found ${et(n)} of kind ${x("red", n.kind)} in ${e.name}.`,
1863
1865
  {
1864
1866
  file: h(i).file,
1865
1867
  node: void 0
@@ -1867,13 +1869,13 @@ function Fe(e, t, i, n, s) {
1867
1869
  );
1868
1870
  continue;
1869
1871
  }
1870
- n.has(o.name) || (n.add(o.name), t.events.push({
1871
- name: o.name,
1872
- deprecated: o.deprecated,
1872
+ o.has(n.name) || (o.add(n.name), t.events.push({
1873
+ name: n.name,
1874
+ deprecated: n.deprecated,
1873
1875
  summary: void 0,
1874
- description: o.description,
1875
- docsTags: o.docsTags,
1876
- type: o.type,
1876
+ description: n.description,
1877
+ docsTags: n.docsTags,
1878
+ type: n.type,
1877
1879
  inheritedFrom: a ? {
1878
1880
  name: e.name,
1879
1881
  module: i.path,
@@ -1888,10 +1890,10 @@ function Fe(e, t, i, n, s) {
1888
1890
  }
1889
1891
  if (e.supertypes !== void 0)
1890
1892
  for (let r = 0; r < e.supertypes.length; ++r) {
1891
- const o = e.supertypes[r], l = o.module === void 0 ? i : s.moduleMap.get(o.module), c = h(l).index.named[o.name];
1893
+ const n = e.supertypes[r], l = n.module === void 0 ? i : s.moduleMap.get(n.module), c = h(l).index.named[n.name];
1892
1894
  if (c?.kind !== "interface") {
1893
1895
  s.emitError(
1894
- `Failed to find @public interface ${x.red(o.name)} (used by ${x.green(e.name)}).`,
1896
+ `Failed to find @public interface ${x("red", n.name)} (used by ${x("green", e.name)}).`,
1895
1897
  {
1896
1898
  file: h(i).file,
1897
1899
  node: void 0
@@ -1899,14 +1901,14 @@ function Fe(e, t, i, n, s) {
1899
1901
  );
1900
1902
  return;
1901
1903
  }
1902
- Fe(c, t, l, n, s);
1904
+ we(c, t, l, o, s);
1903
1905
  }
1904
1906
  }
1905
- function we(e, t, i) {
1906
- const n = h(e);
1907
- if (n.inheritance !== void 0)
1907
+ function Ge(e, t, i) {
1908
+ const o = h(e);
1909
+ if (o.inheritance !== void 0)
1908
1910
  return;
1909
- n.inheritance = de.deferred;
1911
+ o.inheritance = de.deferred;
1910
1912
  let a = !1;
1911
1913
  if (t.members !== void 0)
1912
1914
  for (let m = 0; m < t.members.length; ++m) {
@@ -1916,46 +1918,46 @@ function we(e, t, i) {
1916
1918
  a = !0, St(f, t, e, i), t.members.splice(m, 1), m -= 1;
1917
1919
  continue;
1918
1920
  }
1919
- f.inheritedFrom === void 0 && Et(f, e, i);
1921
+ f.inheritedFrom === void 0 && Tt(f, e, i);
1920
1922
  }
1921
1923
  }
1922
1924
  const r = t;
1923
- let o = t.mixins, l = r.superclass, c = l === void 0 ? void 0 : Ce(l, e, i);
1925
+ let n = t.mixins, l = r.superclass, c = l === void 0 ? void 0 : be(l, e, i);
1924
1926
  if (c?.supertypes !== void 0) {
1925
- o = o === void 0 ? [] : [...o];
1927
+ n = n === void 0 ? [] : [...n];
1926
1928
  do {
1927
1929
  const m = c.supertypes.length > 1, f = m ? 1 : 0;
1928
1930
  for (let p = c.supertypes.length - 1; p >= f; p--) {
1929
1931
  const g = c.supertypes[p], u = g.module === void 0 ? { ...g, module: l.module } : g;
1930
- o.unshift(u);
1932
+ n.unshift(u);
1931
1933
  }
1932
- l = m ? c.supertypes[0] : void 0, c = l === void 0 ? void 0 : Ce(l, e, i);
1934
+ l = m ? c.supertypes[0] : void 0, c = l === void 0 ? void 0 : be(l, e, i);
1933
1935
  } while (c?.supertypes !== void 0);
1934
1936
  }
1935
- if (o !== void 0) {
1936
- const m = o.length - (t.mixins?.length ?? 0);
1937
- for (let f = o.length - 1; f >= 0; f--) {
1938
- const p = o[f], g = ve(p.module ?? e.path, !0, i);
1939
- typeof g == "object" ? ge(g, t, a, i) : f >= m && (t.mixins.splice(f - m, 1), t.mixins.length === 0 && (t.mixins = void 0));
1937
+ if (n !== void 0) {
1938
+ const m = n.length - (t.mixins?.length ?? 0);
1939
+ for (let f = n.length - 1; f >= 0; f--) {
1940
+ const p = n[f], g = Me(p.module ?? e.path, !0, i);
1941
+ typeof g == "object" ? Ce(g, t, a, i) : f >= m && (t.mixins.splice(f - m, 1), t.mixins.length === 0 && (t.mixins = void 0));
1940
1942
  }
1941
1943
  }
1942
1944
  if (l?.package !== void 0)
1943
1945
  return;
1944
1946
  const d = l?.module;
1945
1947
  if (d !== void 0) {
1946
- const m = ve(d, !1, i);
1948
+ const m = Me(d, !1, i);
1947
1949
  typeof m == "object" && (m.declaration.privacy !== void 0 && t.privacy === void 0 && i.emitError(
1948
1950
  `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.`,
1949
- { file: n.file, node: void 0 }
1950
- ), ge(m, t, a, i));
1951
+ { file: o.file, node: void 0 }
1952
+ ), Ce(m, t, a, i));
1951
1953
  }
1952
1954
  }
1953
- function ge(e, t, i, n) {
1955
+ function Ce(e, t, i, o) {
1954
1956
  const s = e.declaration, a = t;
1955
1957
  if (e.indexedMembers !== void 0) {
1956
1958
  t.members ??= [];
1957
- const r = t.members, o = n.config.documentation.noInheritMembers[e.inheritanceData.module];
1958
- let l = o === void 0 ? void 0 : new Set(o);
1959
+ const r = t.members, n = o.config.documentation.noInheritMembers[e.inheritanceData.module];
1960
+ let l = n === void 0 ? void 0 : new Set(n);
1959
1961
  for (let d = 0; d < r.length; ++d) {
1960
1962
  const m = r[d], f = ce(m), p = e.indexedMembers[f];
1961
1963
  if (p === void 0)
@@ -1964,7 +1966,7 @@ function ge(e, t, i, n) {
1964
1966
  const u = oe(m);
1965
1967
  oe(p).isAccessor === !0 && (u.isAccessor = !0), u.isOverride = !0;
1966
1968
  }
1967
- p !== void 0 && m.inheritedFrom === void 0 && Ie(p, m);
1969
+ p !== void 0 && m.inheritedFrom === void 0 && Se(p, m);
1968
1970
  }
1969
1971
  const c = s.members;
1970
1972
  for (let d = 0; d < c.length; ++d) {
@@ -2002,47 +2004,47 @@ function ge(e, t, i, n) {
2002
2004
  a.cssStates,
2003
2005
  s.cssStates,
2004
2006
  e.indexedCssStates
2005
- ));
2007
+ )), s.formAssociated === !0 && (a.formAssociated = !0);
2006
2008
  }
2007
- function X(e = [], t, i, n) {
2009
+ function X(e = [], t, i, o) {
2008
2010
  const s = /* @__PURE__ */ new Set();
2009
2011
  for (let a = 0; a < e.length; ++a) {
2010
- const r = e[a], o = i[r.name];
2011
- o !== void 0 && (s.add(r.name), r.inheritedFrom === void 0 && Ie(o, r));
2012
+ const r = e[a], n = i[r.name];
2013
+ n !== void 0 && (s.add(r.name), r.inheritedFrom === void 0 && Se(n, r));
2012
2014
  }
2013
2015
  for (let a = 0; a < t.length; ++a) {
2014
2016
  const r = t[a];
2015
2017
  s.has(r.name) || e.push(
2016
- n === void 0 || r.inheritedFrom !== void 0 ? r : { ...r, inheritedFrom: n }
2018
+ o === void 0 || r.inheritedFrom !== void 0 ? r : { ...r, inheritedFrom: o }
2017
2019
  );
2018
2020
  }
2019
2021
  return e;
2020
2022
  }
2021
- function ve(e, t, i) {
2022
- const n = i.moduleMap.get(e), s = kt(n, e, t, i), a = n === void 0 ? void 0 : h(n);
2023
- if (s === !1 || n === void 0)
2023
+ function Me(e, t, i) {
2024
+ const o = i.moduleMap.get(e), s = Et(o, e, t, i), a = o === void 0 ? void 0 : h(o);
2025
+ if (s === !1 || o === void 0)
2024
2026
  return a !== void 0 ? a.inheritance = de.skip : t && i.privateMixinModuleNames.add(e), de.skip;
2025
- const [r, o] = s, l = o;
2026
- we(n, o, i);
2027
+ const [r, n] = s, l = n;
2028
+ Ge(o, n, i);
2027
2029
  let c, d = !1;
2028
- if (o.members !== void 0) {
2030
+ if (n.members !== void 0) {
2029
2031
  c = /* @__PURE__ */ Object.create(null);
2030
- for (let f = 0; f < o.members.length; ++f) {
2031
- const p = o.members[f], g = ce(p), v = c[g] !== void 0;
2032
+ for (let f = 0; f < n.members.length; ++f) {
2033
+ const p = n.members[f], g = ce(p), v = c[g] !== void 0;
2032
2034
  c[g] = v ? void 0 : p, d ||= p.kind === "field" && p.readonly === void 0;
2033
2035
  }
2034
2036
  }
2035
2037
  const m = {
2036
2038
  inheritanceData: {
2037
- name: o.name,
2039
+ name: n.name,
2038
2040
  module: r,
2039
2041
  package: void 0,
2040
2042
  viewUrl: void 0
2041
2043
  },
2042
- declaration: o,
2044
+ declaration: n,
2043
2045
  hasSettableField: d,
2044
2046
  indexedMembers: c,
2045
- indexedEvents: Y(o.events),
2047
+ indexedEvents: Y(n.events),
2046
2048
  indexedAttributes: Y(l.attributes),
2047
2049
  indexedSlots: Y(l.slots),
2048
2050
  indexedCssParts: Y(l.cssParts),
@@ -2056,15 +2058,15 @@ function Y(e) {
2056
2058
  return;
2057
2059
  const t = /* @__PURE__ */ Object.create(null);
2058
2060
  for (let i = 0; i < e.length; ++i) {
2059
- const n = e[i];
2060
- t[n.name] = n;
2061
+ const o = e[i];
2062
+ t[o.name] = o;
2061
2063
  }
2062
2064
  return t;
2063
2065
  }
2064
- function kt(e, t, i, n) {
2066
+ function Et(e, t, i, o) {
2065
2067
  const s = e === void 0 ? void 0 : h(e), a = s?.index.class;
2066
- return a === void 0 ? (i || n.emitError(
2067
- `Failed to find @public class/custom element declaration in ${x.red(t)}. Referenced in the extends clause by ${x.blue(n.apiModule.sourcePath)}`,
2068
+ return a === void 0 ? (i || o.emitError(
2069
+ `Failed to find @public class/custom element declaration in ${x("red", t)}. Referenced in the extends clause by ${x("blue", o.apiModule.sourcePath)}`,
2068
2070
  {
2069
2071
  file: s?.file,
2070
2072
  scope: s === void 0 ? t : void 0,
@@ -2072,16 +2074,16 @@ function kt(e, t, i, n) {
2072
2074
  }
2073
2075
  ), !1) : [t, a];
2074
2076
  }
2075
- function Ce(e, t, i) {
2077
+ function be(e, t, i) {
2076
2078
  if (e.package !== void 0)
2077
2079
  return;
2078
- 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];
2080
+ const o = e.module === void 0 ? t : i.moduleMap.get(e.module), s = o === void 0 ? void 0 : h(o), a = e.name === "default" ? s?.index.default : s?.index.named[e.name];
2079
2081
  if (a === void 0) {
2080
2082
  i.emitError(
2081
- `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)}.`,
2083
+ `Failed to find @public class/mixin/custom element declaration in ${x("red", o?.sourcePath ?? e.module ?? t.sourcePath)}. Referenced in the extends clause by ${x("blue", t.sourcePath)}.`,
2082
2084
  {
2083
2085
  file: s?.file,
2084
- scope: n === void 0 ? t.path : void 0,
2086
+ scope: o === void 0 ? t.path : void 0,
2085
2087
  node: void 0
2086
2088
  }
2087
2089
  );
@@ -2089,121 +2091,153 @@ function Ce(e, t, i) {
2089
2091
  }
2090
2092
  return a.kind === "interface" ? a : void 0;
2091
2093
  }
2092
- function Et(e, t, i) {
2093
- const n = oe(e), s = h(t);
2094
- 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);
2095
- }
2096
2094
  function Tt(e, t, i) {
2095
+ const o = oe(e), s = h(t);
2096
+ o.hasAutoCasting === !0 && (Ct(e.type, o, t, i), o.isConstructorOnly !== !0 && e.getterType?.text === e.type.text && (e.getterType = void 0)), o.isConstructorOnly === !0 && (s.constructorOnlySetters ??= {}, s.constructorOnlySetters[e.name] = e.type, e.type = e.getterType ?? e.type, e.getterType = void 0, e.readonly = !0);
2097
+ }
2098
+ function $t(e, t, i) {
2097
2099
  if (!(i.watchFiles === void 0 || t.reExports === void 0))
2098
- for (let n = 0; n < t.reExports.length; ++n) {
2099
- const s = t.reExports[n];
2100
+ for (let o = 0; o < t.reExports.length; ++o) {
2101
+ const s = t.reExports[o];
2100
2102
  if (s.modulePath === void 0)
2101
2103
  continue;
2102
- const a = i.moduleMap.get(s.modulePath), o = (a === void 0 ? void 0 : h(a))?.file.fileName.slice(i.config.context.cwd.length);
2103
- o !== void 0 && (i.watchFiles.get(e.sourcePath).dependencies.add(o), i.watchFiles.get(o).dependents.set(e.sourcePath, !0));
2104
+ const a = i.moduleMap.get(s.modulePath), n = (a === void 0 ? void 0 : h(a))?.file.fileName.slice(i.config.context.cwd.length);
2105
+ n !== void 0 && (i.watchFiles.get(e.sourcePath).dependencies.add(n), i.watchFiles.get(n).dependents.set(e.sourcePath, !0));
2104
2106
  }
2105
2107
  }
2106
- function $t(e, t) {
2107
- e.sort(tt), Ft(e, t), t.isComponentProject && De(e, t);
2108
- }
2109
2108
  function Ft(e, t) {
2109
+ e.sort(tt), At(e, t), t.isComponentProject && Oe(e, t);
2110
+ }
2111
+ function At(e, t) {
2110
2112
  for (let i = 0; i < e.length; ++i) {
2111
- const n = e[i];
2112
- if (!h(n).isStale)
2113
+ const o = e[i];
2114
+ if (!h(o).isStale)
2113
2115
  continue;
2114
- t.apiModule = n;
2115
- const a = n.deprecated !== void 0;
2116
- for (let r = 0; r < n.declarations.length; ++r) {
2117
- const o = n.declarations[r];
2118
- a && o.deprecated === void 0 && t.emitError(
2119
- `If module is marked as @deprecated, all its declarations must be too. Found non-deprecated ${o.name}`,
2116
+ t.apiModule = o;
2117
+ const a = o.deprecated !== void 0;
2118
+ for (let r = 0; r < o.declarations.length; ++r) {
2119
+ const n = o.declarations[r];
2120
+ a && n.deprecated === void 0 && t.emitError(
2121
+ `If module is marked as @deprecated, all its declarations must be too. Found non-deprecated ${n.name}`,
2120
2122
  {
2121
- file: h(n).file,
2123
+ file: h(o).file,
2122
2124
  node: void 0
2123
2125
  }
2124
- ), "members" in o && o.kind !== "interface" && (we(n, o, t), o.events?.sort(it));
2126
+ ), "members" in n && n.kind !== "interface" && (Ge(o, n, t), n.events?.sort(it));
2125
2127
  }
2126
2128
  }
2127
2129
  for (let i = 0; i < e.length; ++i) {
2128
- const n = e[i], s = h(n);
2130
+ const o = e[i], s = h(o);
2129
2131
  if (!s.isStale) {
2130
- const a = t.watchFiles?.get(n.sourcePath);
2132
+ const a = t.watchFiles?.get(o.sourcePath);
2131
2133
  if (a?.hasDirtyLinks === !0) {
2132
- t.apiModule = n;
2134
+ t.apiModule = o;
2133
2135
  for (let r = 0; r < a.docLinks.length; ++r) {
2134
- const o = a.docLinks[r];
2135
- t.resolveJsDocLink(`{@link ${o}}`, o);
2136
+ const n = a.docLinks[r];
2137
+ t.resolveJsDocLink(`{@link ${n}}`, n);
2136
2138
  }
2137
2139
  a.hasDirtyLinks = !1;
2138
2140
  }
2139
2141
  continue;
2140
2142
  }
2141
- t.apiModule = n, t.inheritedModuleName = void 0, n.deprecated = ee(n.deprecated, t), n.description = G(n.description, t), V(n.docsTags, t);
2142
- for (let a = 0; a < n.declarations.length; ++a) {
2143
- const r = n.declarations[a];
2144
- if (r.deprecated = ee(r.deprecated, t), r.description = G(r.description, t), V(r.docsTags, t), r.kind === "function") {
2143
+ t.apiModule = o, t.inheritedModuleName = void 0, o.deprecated = Q(o.deprecated, t), o.description = R(o.description, t), V(o.docsTags, t);
2144
+ for (let a = 0; a < o.declarations.length; ++a) {
2145
+ const r = o.declarations[a];
2146
+ if (r.deprecated = Q(r.deprecated, t), r.description = R(r.description, t), V(r.docsTags, t), r.kind === "function") {
2145
2147
  if (r.parameters !== void 0)
2146
2148
  for (let l = 0; l < r.parameters.length; ++l) {
2147
2149
  const c = r.parameters[l];
2148
- c.description = G(c.description, t), V(c.docsTags, t);
2150
+ c.description = R(c.description, t), V(c.docsTags, t);
2149
2151
  }
2150
- r.return !== void 0 && (r.return.description = G(r.return.description, t));
2152
+ r.return !== void 0 && (r.return.description = R(r.return.description, t));
2151
2153
  }
2152
- const o = r;
2153
- if (o.members !== void 0) {
2154
- for (let c = 0; c < o.members.length; ++c) {
2155
- const d = o.members[c], m = d.inheritedFrom, f = m !== void 0;
2156
- 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") {
2154
+ const n = r;
2155
+ if (n.members !== void 0) {
2156
+ for (let c = 0; c < n.members.length; ++c) {
2157
+ const d = n.members[c], m = d.inheritedFrom, f = m !== void 0;
2158
+ if (t.inheritedModuleName = m?.module, d.deprecated = Q(d.deprecated, t), d.description = R(d.description, t), V(d.docsTags, t), !f && d.kind !== "field") {
2157
2159
  if (d.parameters !== void 0)
2158
2160
  for (let g = 0; g < d.parameters.length; ++g) {
2159
2161
  const u = d.parameters[g];
2160
- u.description = G(u.description, t), V(u.docsTags, t);
2162
+ u.description = R(u.description, t), V(u.docsTags, t);
2161
2163
  }
2162
2164
  const p = d;
2163
- p.return !== void 0 && (p.return.description = G(p.return.description, t));
2165
+ p.return !== void 0 && (p.return.description = R(p.return.description, t));
2164
2166
  }
2165
2167
  t.inheritedModuleName = void 0;
2166
2168
  }
2167
- r.kind !== "interface" && o.members.sort(nt);
2169
+ r.kind !== "interface" && n.members.sort(ot);
2168
2170
  const l = r;
2169
2171
  if (l.events !== void 0) {
2170
2172
  for (let c = 0; c < l.events.length; ++c) {
2171
2173
  const d = l.events[c];
2172
- t.inheritedModuleName = d.inheritedFrom?.module, d.deprecated = ee(d.deprecated, t), d.description = G(d.description, t), V(d.docsTags, t);
2174
+ t.inheritedModuleName = d.inheritedFrom?.module, d.deprecated = Q(d.deprecated, t), d.description = R(d.description, t), V(d.docsTags, t);
2173
2175
  }
2174
2176
  t.inheritedModuleName = void 0;
2175
2177
  }
2176
- if (t.config.context.isLuminaMinimalExtraction || It(o), l.slots !== void 0)
2178
+ if (t.config.context.isLuminaMinimalExtraction || kt(n), l.slots !== void 0)
2177
2179
  for (let c = 0; c < l.slots.length; ++c) {
2178
2180
  const d = l.slots[c];
2179
- d.description = G(d.description, t);
2181
+ d.description = R(d.description, t);
2180
2182
  }
2181
2183
  if (l.cssProperties !== void 0)
2182
2184
  for (let c = 0; c < l.cssProperties.length; ++c) {
2183
2185
  const d = l.cssProperties[c];
2184
- d.description = G(d.description, t);
2186
+ d.description = R(d.description, t);
2185
2187
  }
2186
2188
  if (l.cssParts !== void 0)
2187
2189
  for (let c = 0; c < l.cssParts.length; ++c) {
2188
2190
  const d = l.cssParts[c];
2189
- d.description = G(d.description, t);
2191
+ d.description = R(d.description, t);
2190
2192
  }
2191
2193
  if (l.cssStates !== void 0)
2192
2194
  for (let c = 0; c < l.cssStates.length; ++c) {
2193
2195
  const d = l.cssStates[c];
2194
- d.description = G(d.description, t);
2196
+ d.description = R(d.description, t);
2195
2197
  }
2196
2198
  if (l.demos !== void 0)
2197
2199
  for (let c = 0; c < l.demos.length; ++c) {
2198
2200
  const d = l.demos[c];
2199
- d.description = G(d.description, t);
2201
+ d.description = R(d.description, t);
2200
2202
  }
2201
- } else r === s.constructorPropertiesInterface && (n.declarations.splice(a, 1), a -= 1);
2203
+ } else r === s.constructorPropertiesInterface && (o.declarations.splice(a, 1), a -= 1);
2202
2204
  }
2203
- s.constructorPropertiesInterface !== void 0 && xt(s, t), gt(n, s, t), Tt(n, s, t);
2205
+ s.constructorPropertiesInterface !== void 0 && Pt(s, t), vt(o, s, t), $t(o, s, t);
2204
2206
  }
2205
2207
  }
2206
- const wt = async function() {
2208
+ function wt(e) {
2209
+ const t = [Gt];
2210
+ for (let i = 0; i < e.length; ++i) {
2211
+ const o = e[i];
2212
+ st(o) && t.push(
2213
+ ` "@arcgis/core/${o.path}.js": typeof import("./${o.path}.js")${o.exports === void 0 ? "" : ".default"};
2214
+ `
2215
+ );
2216
+ }
2217
+ return t.push(Rt), t.join("");
2218
+ }
2219
+ const Gt = `declare global {
2220
+ const $arcgis: ArcgisGlobal;
2221
+ }
2222
+
2223
+ interface ArcgisGlobal {
2224
+ import: ArcgisImport;
2225
+ }
2226
+
2227
+ interface ArcgisImport {
2228
+ <ModuleName extends keyof ArcgisImportModules>(module: ModuleName): Promise<ArcgisImportModules[ModuleName]>;
2229
+ <ModuleNames extends (keyof ArcgisImportModules)[]>(
2230
+ modules: [...ModuleNames],
2231
+ ): Promise<{
2232
+ [ModuleName in keyof ModuleNames]: ModuleNames[ModuleName] extends keyof ArcgisImportModules
2233
+ ? ArcgisImportModules[ModuleNames[ModuleName]]
2234
+ : unknown;
2235
+ }>;
2236
+ }
2237
+
2238
+ export interface ArcgisImportModules {
2239
+ `, Rt = `}
2240
+ `, Dt = async function() {
2207
2241
  if (this.isRunInProgress)
2208
2242
  throw Error(
2209
2243
  "The ApiExtractor.run() is already in progress, or previous run crashed with unrecoverable error. Await the previous run first or create a new ApiExtractor"
@@ -2213,10 +2247,10 @@ const wt = async function() {
2213
2247
  this.watchFiles === void 0 && (this.moduleMap = /* @__PURE__ */ new Map());
2214
2248
  const t = e.context.dtsEmitPath !== "", i = e.context.emptyDtsEmitPath && t ? (
2215
2249
  // This takes 80ms for JSAPI
2216
- Le(e.context.dtsEmitPath)
2250
+ Ne(e.context.dtsEmitPath)
2217
2251
  ) : void 0;
2218
2252
  if (e.types.typeCheckedExtraction || e.types.fullTypeCheck) {
2219
- const o = _(), l = e.types.typeScriptConfig;
2253
+ const n = _(), l = e.types.typeScriptConfig;
2220
2254
  if (this.watchFiles === void 0) {
2221
2255
  const c = E.createCompilerHost(l.config.options), d = E.createProgram({
2222
2256
  host: c,
@@ -2226,26 +2260,28 @@ const wt = async function() {
2226
2260
  });
2227
2261
  this.program = d, e.types.typeScriptInstanceCreated(d, c);
2228
2262
  }
2229
- Ae(this, o);
2263
+ Re(this, n);
2230
2264
  }
2231
- const n = _(), s = await Oe(this);
2232
- $t(s, this);
2265
+ const o = _(), s = await Be(this);
2266
+ Ft(s, this);
2233
2267
  const a = this.wrapApiModules(s);
2234
2268
  e.context.logger.info(
2235
- `${H}Extracted ${s.length} @public files in ${x.green(`${n()}s`)}`
2269
+ `${H}Extracted ${s.length} @public files in ${x("green", `${o()}s`)}`
2236
2270
  );
2237
2271
  const r = { apiJson: a, dtsFiles: void 0 };
2238
- if (e.afterApiJsonCreate !== Se && e.afterApiJsonCreate(r), this.produceDts) {
2239
- const o = _(), l = this.dtsFiles;
2272
+ if (e.afterApiJsonCreate !== Ee && e.afterApiJsonCreate(r), this.produceDts) {
2273
+ const n = _(), l = this.dtsFiles;
2240
2274
  if (this.dtsFiles = /* @__PURE__ */ new Map(), this.isJsApi) {
2241
- const c = ht(s, this), d = `${e.context.dtsEmitPath}interfaces.d.ts`;
2275
+ const c = gt(s, this), d = `${e.context.dtsEmitPath}interfaces.d.ts`;
2242
2276
  this.dtsFiles.set(d, c);
2243
- } else this.isComponentProject && Ne(s, this);
2277
+ const m = wt(s), f = `${e.context.dtsEmitPath}arcgisGlobal.d.ts`;
2278
+ this.dtsFiles.set(f, m);
2279
+ } else this.isComponentProject && We(s, this);
2244
2280
  for (let c = 0; c < s.length; ++c) {
2245
2281
  const d = s[c], m = h(d);
2246
2282
  let f = `${e.context.dtsEmitPath + m.dtsPath}.d.ts`, p;
2247
2283
  if (m.isStale) {
2248
- if (p = Be(d, this), e.types.declarationTextTransformers.length > 0) {
2284
+ if (p = Ue(d, this), e.types.declarationTextTransformers.length > 0) {
2249
2285
  let v = { filePath: f, content: p };
2250
2286
  for (let C = 0; C < e.types.declarationTextTransformers.length; ++C) {
2251
2287
  const y = e.types.declarationTextTransformers[C];
@@ -2268,64 +2304,64 @@ const wt = async function() {
2268
2304
  for (const [c, d] of this.dtsFiles)
2269
2305
  l.get(c) !== d && this.changedDtsFiles.set(c, d);
2270
2306
  if (t) {
2271
- await i, await ae(e.context.dtsEmitPath, { recursive: !0 }), await At(e.context.dtsEmitPath, !0, this.changedDtsFiles ?? this.dtsFiles);
2307
+ await i, await ae(e.context.dtsEmitPath, { recursive: !0 }), await Lt(e.context.dtsEmitPath, !0, this.changedDtsFiles ?? this.dtsFiles);
2272
2308
  const c = N.join(N.relative(process.cwd(), e.context.dtsEmitPath), "/");
2273
2309
  e.context.logger.info(
2274
- `${H}Wrote ${c}**/*${x.blue(".d.ts")} in ${x.green(`${o()}s`)}`
2310
+ `${H}Wrote ${c}**/*${x("blue", ".d.ts")} in ${x("green", `${n()}s`)}`
2275
2311
  );
2276
2312
  }
2277
2313
  }
2278
2314
  if (e.context.apiJsonEmitPath !== "") {
2279
- const o = N.resolve(e.context.cwd, e.context.apiJsonEmitPath), l = N.join(N.relative(process.cwd(), N.dirname(o)), "/");
2280
- await ae(N.dirname(o), { recursive: !0 }), await xe(
2281
- o,
2315
+ const n = N.resolve(e.context.cwd, e.context.apiJsonEmitPath), l = N.join(N.relative(process.cwd(), N.dirname(n)), "/");
2316
+ await ae(N.dirname(n), { recursive: !0 }), await Ie(
2317
+ n,
2282
2318
  e.context.environment === "production" ? JSON.stringify(a) : JSON.stringify(a, null, 2)
2283
2319
  ), e.context.logger.info(
2284
- `${H}Wrote ${l}${x.yellow(N.basename(o))}`
2320
+ `${H}Wrote ${l}${x("yellow", N.basename(n))}`
2285
2321
  );
2286
2322
  }
2287
2323
  return this.typeVerifier?.verifyTypes(s), this.errorCount > 0 && e.context.logger.error(
2288
- `${H}${x.red(`Found ${this.errorCount} ${this.errorCount === 1 ? "error" : "errors"}`)}`
2324
+ `${H}${x("red", `Found ${this.errorCount} ${this.errorCount === 1 ? "error" : "errors"}`)}`
2289
2325
  ), this.silencedBrokenLinkCount > 0 && e.context.logger.info(`${H}Silenced ${this.silencedBrokenLinkCount} broken link errors.`), this.isRunInProgress = !1, this.produceDts && (r.dtsFiles = this.dtsFiles), r;
2290
2326
  };
2291
- async function At(e, t, i) {
2292
- const n = /* @__PURE__ */ new Set(), s = Array.from(i.entries());
2327
+ async function Lt(e, t, i) {
2328
+ const o = /* @__PURE__ */ new Set(), s = Array.from(i.entries());
2293
2329
  for (let l = 0; l < s.length; ++l) {
2294
2330
  const [c, d] = s[l];
2295
2331
  if (d.length === 0)
2296
2332
  continue;
2297
2333
  const m = (t ? c.slice(e.length) : c).split("/");
2298
2334
  for (let f = 1; f < m.length; ++f)
2299
- n.add(m.slice(0, f).join("/"));
2335
+ o.add(m.slice(0, f).join("/"));
2300
2336
  }
2301
- const a = new Array(n.size);
2302
- for (const l of n)
2337
+ const a = new Array(o.size);
2338
+ for (const l of o)
2303
2339
  a.push(ae(e + l, { recursive: !0 }));
2304
2340
  await Promise.all(a);
2305
- const r = new Array(s.length), o = t ? "" : e;
2341
+ const r = new Array(s.length), n = t ? "" : e;
2306
2342
  for (let l = 0; l < s.length; ++l) {
2307
2343
  const [c, d] = s[l];
2308
2344
  if (d.length === 0)
2309
2345
  continue;
2310
- const m = o + c;
2311
- r[l] = xe(m, d);
2346
+ const m = n + c;
2347
+ r[l] = Ie(m, d);
2312
2348
  }
2313
2349
  await Promise.all(r);
2314
2350
  }
2315
- function Ae(e, t) {
2351
+ function Re(e, t) {
2316
2352
  if (e.config.types.fullTypeCheck)
2317
2353
  if ("getSemanticDiagnostics" in e.program) {
2318
2354
  const i = e.builderProgram === void 0 ? E.getPreEmitDiagnostics(e.program) : e.builderProgram.getSemanticDiagnostics();
2319
2355
  i.length > 0 && (e.config.context.logger.error(
2320
2356
  E.formatDiagnosticsWithColorAndContext(i, se)
2321
- ), 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`)}`);
2357
+ ), 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`)}`);
2322
2358
  } else
2323
2359
  e.emitError("Can't do type checking as the passed ts.Program is not a ts.Program instance.", {
2324
2360
  file: void 0,
2325
2361
  node: void 0
2326
2362
  });
2327
2363
  }
2328
- const Rt = async function() {
2364
+ const Ot = async function() {
2329
2365
  if (this.watchFiles !== void 0)
2330
2366
  throw Error(
2331
2367
  "The ApiExtractor.watch() is already in progress, or previous watch crashed with unrecoverable error. Stop the previous watch first or create a new ApiExtractor"
@@ -2334,11 +2370,11 @@ const Rt = async function() {
2334
2370
  const e = this.config;
2335
2371
  let t;
2336
2372
  const i = /* @__PURE__ */ new Map();
2337
- let n = [];
2373
+ let o = [];
2338
2374
  const s = (u, v, C) => {
2339
- r(u), o(v, C, u.previousModule);
2375
+ r(u), n(v, C, u.previousModule);
2340
2376
  }, a = (u, v) => {
2341
- this.watchFiles.delete(v), u.module !== void 0 && n.push(u.module), r(u);
2377
+ this.watchFiles.delete(v), u.module !== void 0 && o.push(u.module), r(u);
2342
2378
  }, r = (u) => {
2343
2379
  if (u.module === void 0)
2344
2380
  return;
@@ -2347,13 +2383,13 @@ const Rt = async function() {
2347
2383
  for (const C of u.dependencies)
2348
2384
  this.watchFiles.get(C)?.dependents.delete(v.sourcePath);
2349
2385
  for (const [C, y] of u.dependents) {
2350
- const M = this.watchFiles.get(C);
2351
- M !== void 0 && (y ? (M.dependencies.delete(v.sourcePath), r(M)) : M.hasDirtyLinks = !0);
2386
+ const b = this.watchFiles.get(C);
2387
+ b !== void 0 && (y ? (b.dependencies.delete(v.sourcePath), r(b)) : b.hasDirtyLinks = !0);
2352
2388
  }
2353
- }, o = (u, v, C) => {
2389
+ }, n = (u, v, C) => {
2354
2390
  if (v === void 0) {
2355
- const y = e.context.cwd + u, M = lt(y, "utf8");
2356
- v = je(y, M);
2391
+ const y = e.context.cwd + u, b = ct(y, "utf8");
2392
+ v = Je(y, b);
2357
2393
  }
2358
2394
  this.watchFiles.set(u, {
2359
2395
  file: v,
@@ -2380,50 +2416,50 @@ const Rt = async function() {
2380
2416
  let u;
2381
2417
  try {
2382
2418
  u = await this.run();
2383
- } catch (b) {
2384
- throw f(void 0), b;
2419
+ } catch (M) {
2420
+ throw f(void 0), M;
2385
2421
  }
2386
2422
  const v = [], C = [];
2387
- for (const b of this.watchFiles.values()) {
2388
- const I = b.module, P = b.previousModule;
2423
+ for (const M of this.watchFiles.values()) {
2424
+ const I = M.module, P = M.previousModule;
2389
2425
  if (I === void 0)
2390
- P !== void 0 && (b.module = b.previousModule, a(b, P.sourcePath));
2426
+ P !== void 0 && (M.module = M.previousModule, a(M, P.sourcePath));
2391
2427
  else {
2392
- 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));
2428
+ 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));
2393
2429
  const L = h(I);
2394
2430
  L.isStale && (L.isStale = !1);
2395
2431
  }
2396
2432
  }
2397
2433
  this.program ??= {
2398
2434
  getSourceFiles: () => {
2399
- const b = [];
2435
+ const M = [];
2400
2436
  for (const I of this.watchFiles.values())
2401
- b.push(I.file);
2402
- return b;
2437
+ M.push(I.file);
2438
+ return M;
2403
2439
  },
2404
- getSourceFile: (b) => this.watchFiles.get(b.slice(e.context.cwd.length))?.file
2440
+ getSourceFile: (M) => this.watchFiles.get(M.slice(e.context.cwd.length))?.file
2405
2441
  };
2406
2442
  const y = {
2407
2443
  apiJson: u.apiJson,
2408
2444
  dtsFiles: u.dtsFiles,
2409
2445
  changedModules: v,
2410
2446
  addedModules: C,
2411
- removedModules: n
2447
+ removedModules: o
2412
2448
  };
2413
- n = [];
2414
- const M = c || v.length > 0 || C.length > 0 || y.removedModules.length > 0;
2415
- c = !1, f(M ? y : void 0), l?.();
2449
+ o = [];
2450
+ const b = c || v.length > 0 || C.length > 0 || y.removedModules.length > 0;
2451
+ c = !1, f(b ? y : void 0), l?.();
2416
2452
  };
2417
2453
  if (e.types.typeCheckedExtraction || e.types.fullTypeCheck) {
2418
2454
  const u = e.types.fullTypeCheck ? E.createSemanticDiagnosticsBuilderProgram : E.createAbstractBuilder;
2419
2455
  let v;
2420
- const C = (S, F, T, ...A) => (v = T, u(
2456
+ const C = (k, F, T, ...w) => (v = T, u(
2421
2457
  // If not doing full type check, don't scout test files
2422
2458
  // If non-tests import tests, they will be included implicitly anyway
2423
- e.types.fullTypeCheck ? S : S?.filter(($) => !ze($)),
2459
+ e.types.fullTypeCheck ? k : k?.filter(($) => !He($)),
2424
2460
  F,
2425
2461
  T,
2426
- ...A
2462
+ ...w
2427
2463
  // Type cast to keep types simpler&aligned between two branches
2428
2464
  )), y = E.createWatchCompilerHost(
2429
2465
  // This parses the config file again (we already do it) and computes the
@@ -2434,77 +2470,77 @@ const Rt = async function() {
2434
2470
  C,
2435
2471
  void 0,
2436
2472
  void 0
2437
- ), M = y.setTimeout;
2438
- let b;
2439
- y.setTimeout = M === void 0 ? void 0 : (S, F, ...T) => {
2473
+ ), b = y.setTimeout;
2474
+ let M;
2475
+ y.setTimeout = b === void 0 ? void 0 : (k, F, ...T) => {
2440
2476
  if (!(T[0] === "timerToUpdateProgram"))
2441
- return M(S, F, ...T);
2442
- const R = b !== void 0 ? Promise.resolve() : d === void 0 ? Promise.resolve(m()) : d.promise.finally(m);
2443
- return b = M(
2477
+ return b(k, F, ...T);
2478
+ const G = M !== void 0 ? Promise.resolve() : d === void 0 ? Promise.resolve(m()) : d.promise.finally(m);
2479
+ return M = b(
2444
2480
  (...J) => {
2445
- b = void 0, R.finally(() => {
2446
- this.program = void 0, S(...J), this.program === void 0 && f(void 0);
2481
+ M = void 0, G.finally(() => {
2482
+ this.program = void 0, k(...J), this.program === void 0 && f(void 0);
2447
2483
  });
2448
2484
  },
2449
2485
  e.watch.debounceTime,
2450
2486
  ...T
2451
- ), b;
2487
+ ), M;
2452
2488
  };
2453
2489
  const I = y.onWatchStatusChange, P = 6031, L = 6032;
2454
- y.onWatchStatusChange = (S, ...F) => {
2455
- S.code === L ? e.watch.clearScreen && E.sys.clearScreen?.() : S.code !== P && I?.(S, ...F);
2456
- }, y.afterProgramCreate = (S) => {
2457
- this.builderProgram = S;
2458
- const F = S.getProgram();
2490
+ y.onWatchStatusChange = (k, ...F) => {
2491
+ k.code === L ? e.watch.clearScreen && E.sys.clearScreen?.() : k.code !== P && I?.(k, ...F);
2492
+ }, y.afterProgramCreate = (k) => {
2493
+ this.builderProgram = k;
2494
+ const F = k.getProgram();
2459
2495
  this.program = F;
2460
2496
  const T = F.getSourceFiles();
2461
2497
  e.types.typeScriptInstanceCreated(F, v);
2462
2498
  for (const $ of this.watchFiles.values())
2463
2499
  $.wasRemoved = !0;
2464
- let A = !1;
2500
+ let w = !1;
2465
2501
  for (let $ = 0; $ < T.length; ++$) {
2466
- const R = T[$];
2467
- if (!me(R.fileName, this))
2502
+ const G = T[$];
2503
+ if (!ue(G.fileName, this))
2468
2504
  continue;
2469
- const j = R.fileName.slice(e.context.cwd.length), J = this.watchFiles.get(j);
2470
- J === void 0 ? (o(j, R, void 0), A = !0) : J.file !== R ? (s(J, j, R), A = !0) : J.wasRemoved = !1;
2505
+ const z = G.fileName.slice(e.context.cwd.length), J = this.watchFiles.get(z);
2506
+ J === void 0 ? (n(z, G, void 0), w = !0) : J.file !== G ? (s(J, z, G), w = !0) : J.wasRemoved = !1;
2471
2507
  }
2472
- for (const [$, R] of this.watchFiles)
2473
- R.wasRemoved && (a(R, $), A = !0);
2474
- A ? p() : (Ae(this, _()), f(void 0));
2508
+ for (const [$, G] of this.watchFiles)
2509
+ G.wasRemoved && (a(G, $), w = !0);
2510
+ w ? p() : (Re(this, _()), f(void 0));
2475
2511
  }, t = E.createWatchProgram(y);
2476
2512
  } else {
2477
2513
  let u = function(y) {
2478
- return ct(y, {
2514
+ return dt(y, {
2479
2515
  throwIfNoEntry: !1
2480
2516
  })?.isFile();
2481
2517
  };
2482
2518
  const v = rt(() => {
2483
2519
  let y = !1;
2484
- for (const [M, b] of i)
2485
- y = C(M, b) || y;
2520
+ for (const [b, M] of i)
2521
+ y = C(b, M) || y;
2486
2522
  i.clear(), y ? (e.watch.clearScreen && E.sys.clearScreen?.(), p()) : f(void 0);
2487
- }, e.watch.debounceTime), C = (y, M) => {
2488
- const b = e.context.cwd + y, I = !M, P = this.watchFiles.get(y), L = P !== void 0;
2523
+ }, e.watch.debounceTime), C = (y, b) => {
2524
+ const M = e.context.cwd + y, I = !b, P = this.watchFiles.get(y), L = P !== void 0;
2489
2525
  if (I || P === void 0) {
2490
- const S = u(b);
2491
- if (S === !1) {
2492
- let T, A = !1;
2526
+ const k = u(M);
2527
+ if (k === !1) {
2528
+ let T, w = !1;
2493
2529
  try {
2494
- T = st(b, { recursive: !0 });
2530
+ T = at(M, { recursive: !0 });
2495
2531
  let $;
2496
2532
  for (; ($ = T.readSync()) !== null; ) {
2497
2533
  if ($.isDirectory())
2498
2534
  continue;
2499
- const j = `${$.parentPath}/${$.name}`.slice(e.context.cwd.length);
2500
- We(j) && (A = C(j, !1) || A);
2535
+ const z = `${$.parentPath}/${$.name}`.slice(e.context.cwd.length);
2536
+ je(z) && (w = C(z, !1) || w);
2501
2537
  }
2502
2538
  } finally {
2503
2539
  T?.closeSync();
2504
2540
  }
2505
- return A;
2541
+ return w;
2506
2542
  }
2507
- const F = S === !0;
2543
+ const F = k === !0;
2508
2544
  if (L) {
2509
2545
  if (F)
2510
2546
  return s(P, y, void 0), !0;
@@ -2514,28 +2550,28 @@ const Rt = async function() {
2514
2550
  }
2515
2551
  } else {
2516
2552
  if (F)
2517
- return o(y, void 0, void 0), !0;
2553
+ return n(y, void 0, void 0), !0;
2518
2554
  {
2519
2555
  let T = !1;
2520
- const A = `${y}/`;
2521
- for (const [$, R] of this.watchFiles)
2522
- $.startsWith(A) && (a(R, $), T = !0);
2556
+ const w = `${y}/`;
2557
+ for (const [$, G] of this.watchFiles)
2558
+ $.startsWith(w) && (a(G, $), T = !0);
2523
2559
  return T;
2524
2560
  }
2525
2561
  }
2526
2562
  } else
2527
2563
  return s(P, y, void 0), !0;
2528
2564
  };
2529
- t = at(this.basePath, { recursive: !0 }, (y, M) => {
2530
- const b = m(), I = M === null ? void 0 : Ye(M), P = y === "change";
2565
+ t = lt(this.basePath, { recursive: !0 }, (y, b) => {
2566
+ const M = m(), I = b === null ? void 0 : Ze(b), P = y === "change";
2531
2567
  if (I !== void 0 && // If changed, check if it is an included file
2532
2568
  // For a rename, we don't know if it is directory or a file - only check
2533
2569
  // if directory is included, and the file will be checked later.
2534
- (P ? me(this.basePath + I, this) : Ue(this.basePath + I, this))) {
2570
+ (P ? ue(this.basePath + I, this) : ze(this.basePath + I, this))) {
2535
2571
  const L = e.context.basePath + I, F = (i.get(L) ?? !0) && P;
2536
2572
  i.set(L, F);
2537
2573
  }
2538
- b && v();
2574
+ M && v();
2539
2575
  }), p(), l = () => {
2540
2576
  i.size > 0 && v();
2541
2577
  };
@@ -2545,17 +2581,17 @@ const Rt = async function() {
2545
2581
  t.close(), i.clear(), await d?.promise, this.watchFiles = void 0;
2546
2582
  }
2547
2583
  };
2548
- }, Gt = ".verify-typings.ts";
2549
- class Dt {
2584
+ }, Nt = ".verify-typings.ts";
2585
+ class Bt {
2550
2586
  constructor(t, i = N.join(process.cwd(), "dist")) {
2551
2587
  this.extractor = t, this.virtualCwdPath = N.join(i, "/");
2552
2588
  }
2553
2589
  verifyTypes(t) {
2554
- const i = _(), n = /* @__PURE__ */ Object.create(null);
2555
- n[this.virtualCwdPath + Gt] = this.getVerificationFileContents(t);
2590
+ const i = _(), o = /* @__PURE__ */ Object.create(null);
2591
+ o[this.virtualCwdPath + Nt] = this.getVerificationFileContents(t);
2556
2592
  const s = this.extractor.config.context.dtsEmitPath === "" ? this.virtualCwdPath : "";
2557
2593
  for (const [f, p] of this.extractor.dtsFiles)
2558
- n[s + f] = p;
2594
+ o[s + f] = p;
2559
2595
  const a = {
2560
2596
  lib: ["lib.dom.d.ts", "lib.esnext.d.ts"],
2561
2597
  module: E.ModuleKind.ESNext,
@@ -2574,66 +2610,66 @@ class Dt {
2574
2610
  types: [],
2575
2611
  // Performance optimization. Don't look up node_modules/@typescript/lib-...
2576
2612
  libReplacement: !1
2577
- }, r = E.createCompilerHost(a), o = r.fileExists;
2578
- r.fileExists = (f) => f.endsWith("package.json") ? f.includes("node_modules") ? o(f) : !1 : n[f] !== void 0 ? !0 : f.endsWith(".d.ts") ? o(f) : !1, r.useCaseSensitiveFileNames = () => !0;
2613
+ }, r = E.createCompilerHost(a), n = r.fileExists;
2614
+ r.fileExists = (f) => f.endsWith("package.json") ? f.includes("node_modules") ? n(f) : !1 : o[f] !== void 0 ? !0 : f.endsWith(".d.ts") ? n(f) : !1, r.useCaseSensitiveFileNames = () => !0;
2579
2615
  const l = r.readFile;
2580
2616
  r.readFile = (f) => {
2581
- const p = n[f];
2617
+ const p = o[f];
2582
2618
  return p === void 0 ? l(f) : p;
2583
2619
  };
2584
2620
  const c = r.directoryExists;
2585
2621
  r.directoryExists = (f) => f.includes("node_modules") ? c(f) : !0, r.getCurrentDirectory = () => this.virtualCwdPath, r.getCanonicalFileName = se.getCanonicalFileName;
2586
2622
  const d = E.createProgram({
2587
- rootNames: Object.keys(n),
2623
+ rootNames: Object.keys(o),
2588
2624
  host: r,
2589
2625
  options: a
2590
2626
  }), m = E.getPreEmitDiagnostics(d).filter(this.extractor.config.verify.filterTypeCheckDiagnostic);
2591
2627
  m.length && (this.extractor.config.context.logger.error(
2592
2628
  E.formatDiagnosticsWithColorAndContext(m, se)
2593
- ), process.exitCode = 1, this.extractor.errorCount += m.length), this.extractor.config.context.logger.info(`${H}Types verified in ${x.green(`${i()}s`)}`);
2629
+ ), process.exitCode = 1, this.extractor.errorCount += m.length), this.extractor.config.context.logger.info(`${H}Types verified in ${x("green", `${i()}s`)}`);
2594
2630
  }
2595
2631
  printTypeParameters(t, i) {
2596
2632
  if (t === void 0)
2597
2633
  return "";
2598
- let n = "";
2634
+ let o = "";
2599
2635
  for (let s = 0; s < t.length; ++s) {
2600
2636
  const a = t[s];
2601
2637
  if (a.default !== void 0)
2602
2638
  break;
2603
- n === "" ? n += "<" : n += ", ", n += a.constraint === void 0 ? "any" : le(a.constraint, i).text;
2639
+ o === "" ? o += "<" : o += ", ", o += a.constraint === void 0 ? "any" : le(a.constraint, i).text;
2604
2640
  }
2605
- return n === "" ? "" : `${n}>`;
2641
+ return o === "" ? "" : `${o}>`;
2606
2642
  }
2607
2643
  getVerificationFileContents(t) {
2608
2644
  let i = `declare const $: unknown;
2609
2645
 
2610
2646
  `;
2611
- for (let n = 0; n < t.length; ++n) {
2612
- const s = t[n], a = h(s);
2647
+ for (let o = 0; o < t.length; ++o) {
2648
+ const s = t[o], a = h(s);
2613
2649
  if (a.constructorPropertiesInterface !== void 0) {
2614
- const r = a.constructorPropertiesInterface.name, o = this.printTypeParameters(
2650
+ const r = a.constructorPropertiesInterface.name, n = this.printTypeParameters(
2615
2651
  a.constructorPropertiesInterface.typeParameters,
2616
2652
  s.path
2617
2653
  ), l = r.slice(0, -10), c = s.exports === void 0 ? l : "default";
2618
- i += `$ as import("./${s.path}.js").${c}${o} satisfies import("./${s.path}.js").${r}${o};
2654
+ i += `$ as import("./${s.path}.js").${c}${n} satisfies import("./${s.path}.js").${r}${n};
2619
2655
  `;
2620
2656
  }
2621
2657
  }
2622
2658
  return i;
2623
2659
  }
2624
2660
  }
2625
- class qt {
2661
+ class ei {
2626
2662
  /**
2627
2663
  * @public
2628
2664
  * @param rawConfig Optional configuration for the extractor.
2629
2665
  */
2630
2666
  constructor(t = {}) {
2631
- 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);
2632
- const i = Je(t);
2667
+ 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 = Dt.bind(this), this.watch = Ot.bind(this), this.emitError = De.bind(this);
2668
+ const i = Xe(t);
2633
2669
  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([
2634
2670
  ...Object.keys(i.context.packageJson.dependencies ?? {}),
2635
2671
  ...Object.keys(i.context.packageJson.peerDependencies ?? {})
2636
- ]), 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();
2672
+ ]), 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 Bt(this, i.context.dtsEmitPath || void 0) : void 0, this.localPrivateDeclarations = i.strict ? void 0 : /* @__PURE__ */ new Map();
2637
2673
  }
2638
2674
  /**
2639
2675
  * Given an array of ApiModules, add top-level api.json metadata and return
@@ -2641,12 +2677,13 @@ class qt {
2641
2677
  */
2642
2678
  wrapApiModules(t) {
2643
2679
  return {
2680
+ name: this.config.context.packageJson.name,
2644
2681
  timestamp: (/* @__PURE__ */ new Date()).toISOString().split(".")[0],
2645
2682
  compiler: {
2646
2683
  // Preserve previous compiler.name for component projects as that is what
2647
2684
  // pre 5.0 Lumina versions expect.
2648
- name: this.isComponentProject ? "@arcgis/lumina-compiler" : fe.name,
2649
- version: fe.version,
2685
+ name: this.isComponentProject ? "@arcgis/lumina-compiler" : pe.name,
2686
+ version: pe.version,
2650
2687
  typescriptVersion: E.version
2651
2688
  },
2652
2689
  // https://github.com/webcomponents/custom-elements-manifest?tab=readme-ov-file#schema-versioning
@@ -2659,6 +2696,6 @@ class qt {
2659
2696
  }
2660
2697
  }
2661
2698
  export {
2662
- qt as A,
2663
- At as w
2699
+ ei as A,
2700
+ Lt as w
2664
2701
  };