@arcgis/api-extractor 5.1.0-next.21 → 5.1.0-next.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ApiExtractor-CedoYImr.js → ApiExtractor-DobTJSVk.js} +39 -39
- package/dist/apiJson.d.ts +7 -0
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.js +2 -2
- package/dist/{typeScript-BDnFfwUK.js → typeScript-DjfduZgN.js} +1 -1
- package/dist/utils/createIndex.d.ts +1 -1
- package/dist/utils/createIndex.js +44 -45
- package/dist/vite/plugin.js +3 -3
- package/dist/vite/typeScript.js +1 -1
- package/dist/{worker-D8J9SUI5.js → worker-BsfBxW8W.js} +51 -49
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as H, a as se, e as Re, p as fe } from "./typeScript-
|
|
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-
|
|
1
|
+
import { l as H, a as se, e as Re, p as fe } from "./typeScript-DjfduZgN.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-BsfBxW8W.js";
|
|
3
3
|
import { getViewUrl as Ve, postProcessDeprecated as ee, postProcessDescription as G, postProcessDocsTags as V, resolveJsDocLink as Xe } from "./extractor/processing/links.js";
|
|
4
4
|
import E from "typescript";
|
|
5
5
|
import { path as N, toPosixPathSeparators as Ye } from "@arcgis/components-build-utils";
|
|
@@ -1101,12 +1101,12 @@ function mt(e, t) {
|
|
|
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),
|
|
1104
|
+
ue(o), A.length !== 0 && (n += pe(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),
|
|
1109
|
+
if (ue(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
|
-
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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,14 +1143,14 @@ function mt(e, t) {
|
|
|
1143
1143
|
`;
|
|
1144
1144
|
continue;
|
|
1145
1145
|
}
|
|
1146
|
-
for (let p = 0; p <
|
|
1147
|
-
Z(
|
|
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
1148
|
` : te += ` ${O}: typeof ${i}.${d};
|
|
1149
1149
|
`;
|
|
1150
1150
|
} else if (l.kind === "class" || l.kind === "mixin" || l.kind === "interface" && Q(l).isMixinBaseClass === !0) {
|
|
1151
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 <
|
|
1153
|
-
if (Z(
|
|
1152
|
+
for (let C = 0; C < A.length; ++C) {
|
|
1153
|
+
if (Z(A[C], t), O.startsWith("$")) {
|
|
1154
1154
|
const M = O.slice(1);
|
|
1155
1155
|
n += pt(M, l, d, U);
|
|
1156
1156
|
continue;
|
|
@@ -1188,8 +1188,8 @@ ${te} }
|
|
|
1188
1188
|
function pe(e, t, i, n) {
|
|
1189
1189
|
const s = ie(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 <
|
|
1192
|
-
Z(
|
|
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}
|
|
@@ -1243,9 +1243,9 @@ function K(e, t, i) {
|
|
|
1243
1243
|
return n.length === 0 ? void 0 : n;
|
|
1244
1244
|
}
|
|
1245
1245
|
const ne = [];
|
|
1246
|
-
let
|
|
1246
|
+
let A = ne;
|
|
1247
1247
|
function ue(e) {
|
|
1248
|
-
e.kind === "variable" ?
|
|
1248
|
+
e.kind === "variable" ? A = _e(e).esriCompatibilityNames ?? ne : e.kind === "function" ? A = Ke(e).esriCompatibilityNames ?? ne : A = Q(e).esriCompatibilityNames ?? ne;
|
|
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(
|
|
1279
|
+
t.name.startsWith(A[0]) ? A[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
1280
|
return ` ${k}
|
|
1281
1281
|
export type ${r}${o};
|
|
1282
1282
|
${k}
|
|
@@ -1902,7 +1902,7 @@ function Fe(e, t, i, n, s) {
|
|
|
1902
1902
|
Fe(c, t, l, n, s);
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function Ae(e, t, i) {
|
|
1906
1906
|
const n = h(e);
|
|
1907
1907
|
if (n.inheritance !== void 0)
|
|
1908
1908
|
return;
|
|
@@ -2002,7 +2002,7 @@ function ge(e, t, i, n) {
|
|
|
2002
2002
|
a.cssStates,
|
|
2003
2003
|
s.cssStates,
|
|
2004
2004
|
e.indexedCssStates
|
|
2005
|
-
));
|
|
2005
|
+
)), s.formAssociated === !0 && (a.formAssociated = !0);
|
|
2006
2006
|
}
|
|
2007
2007
|
function X(e = [], t, i, n) {
|
|
2008
2008
|
const s = /* @__PURE__ */ new Set();
|
|
@@ -2023,7 +2023,7 @@ function ve(e, t, i) {
|
|
|
2023
2023
|
if (s === !1 || n === void 0)
|
|
2024
2024
|
return a !== void 0 ? a.inheritance = de.skip : t && i.privateMixinModuleNames.add(e), de.skip;
|
|
2025
2025
|
const [r, o] = s, l = o;
|
|
2026
|
-
|
|
2026
|
+
Ae(n, o, i);
|
|
2027
2027
|
let c, d = !1;
|
|
2028
2028
|
if (o.members !== void 0) {
|
|
2029
2029
|
c = /* @__PURE__ */ Object.create(null);
|
|
@@ -2121,7 +2121,7 @@ function Ft(e, t) {
|
|
|
2121
2121
|
file: h(n).file,
|
|
2122
2122
|
node: void 0
|
|
2123
2123
|
}
|
|
2124
|
-
), "members" in o && o.kind !== "interface" && (
|
|
2124
|
+
), "members" in o && o.kind !== "interface" && (Ae(n, o, t), o.events?.sort(it));
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
2127
|
for (let i = 0; i < e.length; ++i) {
|
|
@@ -2203,7 +2203,7 @@ function Ft(e, t) {
|
|
|
2203
2203
|
s.constructorPropertiesInterface !== void 0 && xt(s, t), gt(n, s, t), Tt(n, s, t);
|
|
2204
2204
|
}
|
|
2205
2205
|
}
|
|
2206
|
-
const
|
|
2206
|
+
const At = async function() {
|
|
2207
2207
|
if (this.isRunInProgress)
|
|
2208
2208
|
throw Error(
|
|
2209
2209
|
"The ApiExtractor.run() is already in progress, or previous run crashed with unrecoverable error. Await the previous run first or create a new ApiExtractor"
|
|
@@ -2226,7 +2226,7 @@ const wt = async function() {
|
|
|
2226
2226
|
});
|
|
2227
2227
|
this.program = d, e.types.typeScriptInstanceCreated(d, c);
|
|
2228
2228
|
}
|
|
2229
|
-
|
|
2229
|
+
we(this, o);
|
|
2230
2230
|
}
|
|
2231
2231
|
const n = _(), s = await Oe(this);
|
|
2232
2232
|
$t(s, this);
|
|
@@ -2268,7 +2268,7 @@ const wt = async function() {
|
|
|
2268
2268
|
for (const [c, d] of this.dtsFiles)
|
|
2269
2269
|
l.get(c) !== d && this.changedDtsFiles.set(c, d);
|
|
2270
2270
|
if (t) {
|
|
2271
|
-
await i, await ae(e.context.dtsEmitPath, { recursive: !0 }), await
|
|
2271
|
+
await i, await ae(e.context.dtsEmitPath, { recursive: !0 }), await wt(e.context.dtsEmitPath, !0, this.changedDtsFiles ?? this.dtsFiles);
|
|
2272
2272
|
const c = N.join(N.relative(process.cwd(), e.context.dtsEmitPath), "/");
|
|
2273
2273
|
e.context.logger.info(
|
|
2274
2274
|
`${H}Wrote ${c}**/*${x.blue(".d.ts")} in ${x.green(`${o()}s`)}`
|
|
@@ -2288,7 +2288,7 @@ const wt = async function() {
|
|
|
2288
2288
|
`${H}${x.red(`Found ${this.errorCount} ${this.errorCount === 1 ? "error" : "errors"}`)}`
|
|
2289
2289
|
), 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
2290
|
};
|
|
2291
|
-
async function
|
|
2291
|
+
async function wt(e, t, i) {
|
|
2292
2292
|
const n = /* @__PURE__ */ new Set(), s = Array.from(i.entries());
|
|
2293
2293
|
for (let l = 0; l < s.length; ++l) {
|
|
2294
2294
|
const [c, d] = s[l];
|
|
@@ -2312,7 +2312,7 @@ async function At(e, t, i) {
|
|
|
2312
2312
|
}
|
|
2313
2313
|
await Promise.all(r);
|
|
2314
2314
|
}
|
|
2315
|
-
function
|
|
2315
|
+
function we(e, t) {
|
|
2316
2316
|
if (e.config.types.fullTypeCheck)
|
|
2317
2317
|
if ("getSemanticDiagnostics" in e.program) {
|
|
2318
2318
|
const i = e.builderProgram === void 0 ? E.getPreEmitDiagnostics(e.program) : e.builderProgram.getSemanticDiagnostics();
|
|
@@ -2417,13 +2417,13 @@ const Rt = async function() {
|
|
|
2417
2417
|
if (e.types.typeCheckedExtraction || e.types.fullTypeCheck) {
|
|
2418
2418
|
const u = e.types.fullTypeCheck ? E.createSemanticDiagnosticsBuilderProgram : E.createAbstractBuilder;
|
|
2419
2419
|
let v;
|
|
2420
|
-
const C = (S, F, T, ...
|
|
2420
|
+
const C = (S, F, T, ...w) => (v = T, u(
|
|
2421
2421
|
// If not doing full type check, don't scout test files
|
|
2422
2422
|
// If non-tests import tests, they will be included implicitly anyway
|
|
2423
2423
|
e.types.fullTypeCheck ? S : S?.filter(($) => !ze($)),
|
|
2424
2424
|
F,
|
|
2425
2425
|
T,
|
|
2426
|
-
...
|
|
2426
|
+
...w
|
|
2427
2427
|
// Type cast to keep types simpler&aligned between two branches
|
|
2428
2428
|
)), y = E.createWatchCompilerHost(
|
|
2429
2429
|
// This parses the config file again (we already do it) and computes the
|
|
@@ -2461,17 +2461,17 @@ const Rt = async function() {
|
|
|
2461
2461
|
e.types.typeScriptInstanceCreated(F, v);
|
|
2462
2462
|
for (const $ of this.watchFiles.values())
|
|
2463
2463
|
$.wasRemoved = !0;
|
|
2464
|
-
let
|
|
2464
|
+
let w = !1;
|
|
2465
2465
|
for (let $ = 0; $ < T.length; ++$) {
|
|
2466
2466
|
const R = T[$];
|
|
2467
2467
|
if (!me(R.fileName, this))
|
|
2468
2468
|
continue;
|
|
2469
2469
|
const j = R.fileName.slice(e.context.cwd.length), J = this.watchFiles.get(j);
|
|
2470
|
-
J === void 0 ? (o(j, R, void 0),
|
|
2470
|
+
J === void 0 ? (o(j, R, void 0), w = !0) : J.file !== R ? (s(J, j, R), w = !0) : J.wasRemoved = !1;
|
|
2471
2471
|
}
|
|
2472
2472
|
for (const [$, R] of this.watchFiles)
|
|
2473
|
-
R.wasRemoved && (a(R, $),
|
|
2474
|
-
|
|
2473
|
+
R.wasRemoved && (a(R, $), w = !0);
|
|
2474
|
+
w ? p() : (we(this, _()), f(void 0));
|
|
2475
2475
|
}, t = E.createWatchProgram(y);
|
|
2476
2476
|
} else {
|
|
2477
2477
|
let u = function(y) {
|
|
@@ -2489,7 +2489,7 @@ const Rt = async function() {
|
|
|
2489
2489
|
if (I || P === void 0) {
|
|
2490
2490
|
const S = u(b);
|
|
2491
2491
|
if (S === !1) {
|
|
2492
|
-
let T,
|
|
2492
|
+
let T, w = !1;
|
|
2493
2493
|
try {
|
|
2494
2494
|
T = st(b, { recursive: !0 });
|
|
2495
2495
|
let $;
|
|
@@ -2497,12 +2497,12 @@ const Rt = async function() {
|
|
|
2497
2497
|
if ($.isDirectory())
|
|
2498
2498
|
continue;
|
|
2499
2499
|
const j = `${$.parentPath}/${$.name}`.slice(e.context.cwd.length);
|
|
2500
|
-
We(j) && (
|
|
2500
|
+
We(j) && (w = C(j, !1) || w);
|
|
2501
2501
|
}
|
|
2502
2502
|
} finally {
|
|
2503
2503
|
T?.closeSync();
|
|
2504
2504
|
}
|
|
2505
|
-
return
|
|
2505
|
+
return w;
|
|
2506
2506
|
}
|
|
2507
2507
|
const F = S === !0;
|
|
2508
2508
|
if (L) {
|
|
@@ -2517,9 +2517,9 @@ const Rt = async function() {
|
|
|
2517
2517
|
return o(y, void 0, void 0), !0;
|
|
2518
2518
|
{
|
|
2519
2519
|
let T = !1;
|
|
2520
|
-
const
|
|
2520
|
+
const w = `${y}/`;
|
|
2521
2521
|
for (const [$, R] of this.watchFiles)
|
|
2522
|
-
$.startsWith(
|
|
2522
|
+
$.startsWith(w) && (a(R, $), T = !0);
|
|
2523
2523
|
return T;
|
|
2524
2524
|
}
|
|
2525
2525
|
}
|
|
@@ -2628,7 +2628,7 @@ class qt {
|
|
|
2628
2628
|
* @param rawConfig Optional configuration for the extractor.
|
|
2629
2629
|
*/
|
|
2630
2630
|
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 =
|
|
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 = At.bind(this), this.watch = Rt.bind(this), this.emitError = Re.bind(this);
|
|
2632
2632
|
const i = Je(t);
|
|
2633
2633
|
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
2634
|
...Object.keys(i.context.packageJson.dependencies ?? {}),
|
|
@@ -2660,5 +2660,5 @@ class qt {
|
|
|
2660
2660
|
}
|
|
2661
2661
|
export {
|
|
2662
2662
|
qt as A,
|
|
2663
|
-
|
|
2663
|
+
wt as w
|
|
2664
2664
|
};
|
package/dist/apiJson.d.ts
CHANGED
|
@@ -328,6 +328,13 @@ export interface ApiCustomElementDeclaration extends ApiClassDeclaration, ApiWit
|
|
|
328
328
|
* @example "ArcgisCounter" (even if class name is `Counter`)
|
|
329
329
|
*/
|
|
330
330
|
pascalCaseName: string;
|
|
331
|
+
/**
|
|
332
|
+
* True if the custom element is
|
|
333
|
+
* [form-associated](https://html.spec.whatwg.org/dev/custom-elements.html).
|
|
334
|
+
*
|
|
335
|
+
* @default false
|
|
336
|
+
*/
|
|
337
|
+
formAssociated?: boolean;
|
|
331
338
|
members: ApiCustomElementMember[];
|
|
332
339
|
/**
|
|
333
340
|
* The attributes that this element is known to understand.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../typeScript-
|
|
2
|
-
import "../worker-
|
|
1
|
+
import "../typeScript-DjfduZgN.js";
|
|
2
|
+
import "../worker-BsfBxW8W.js";
|
|
3
3
|
import "./processing/links.js";
|
|
4
4
|
import "typescript";
|
|
5
|
-
import { A as x } from "../ApiExtractor-
|
|
5
|
+
import { A as x } from "../ApiExtractor-DobTJSVk.js";
|
|
6
6
|
import "@arcgis/toolkit/function";
|
|
7
7
|
export {
|
|
8
8
|
x as ApiExtractor
|
package/dist/extractor/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@arcgis/components-build-utils";
|
|
2
|
-
import "../typeScript-
|
|
3
|
-
import { l as n, m as A, r as C } from "../worker-
|
|
2
|
+
import "../typeScript-DjfduZgN.js";
|
|
3
|
+
import { l as n, m as A, r as C } from "../worker-BsfBxW8W.js";
|
|
4
4
|
import "./processing/links.js";
|
|
5
5
|
import "typescript";
|
|
6
6
|
import "fs/promises";
|
|
@@ -2,7 +2,7 @@ import { findPath as v, path as C, toSystemPathSeparators as y } from "@arcgis/c
|
|
|
2
2
|
import t from "typescript";
|
|
3
3
|
import E, { supportsColorStderr as S } from "chalk";
|
|
4
4
|
import { styleText as w } from "util";
|
|
5
|
-
const P = "@arcgis/api-extractor", D = "5.1.0-next.
|
|
5
|
+
const P = "@arcgis/api-extractor", D = "5.1.0-next.22", N = {
|
|
6
6
|
name: P,
|
|
7
7
|
version: D
|
|
8
8
|
};
|
|
@@ -7,7 +7,7 @@ export interface IndexedModule {
|
|
|
7
7
|
readonly apiModule: ApiModule;
|
|
8
8
|
readonly classLike?: ApiClassDeclaration | ApiCustomElementDeclaration | ApiMixinDeclaration;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Superclasses ancestors. Sorted from most immediate to furthest
|
|
11
11
|
* ancestor.
|
|
12
12
|
*
|
|
13
13
|
* The type reference may refer to a local module or an external package.
|
|
@@ -1,82 +1,81 @@
|
|
|
1
|
-
function y(
|
|
2
|
-
const
|
|
3
|
-
return k(
|
|
1
|
+
function y(t) {
|
|
2
|
+
const o = g(t.modules);
|
|
3
|
+
return k(o), o;
|
|
4
4
|
}
|
|
5
|
-
function g(
|
|
6
|
-
const
|
|
7
|
-
for (let
|
|
8
|
-
const n = s
|
|
5
|
+
function g(t) {
|
|
6
|
+
const o = /* @__PURE__ */ new Map();
|
|
7
|
+
for (let s = 0; s < t.length; ++s) {
|
|
8
|
+
const n = t[s];
|
|
9
9
|
let i;
|
|
10
10
|
for (let a = 0; a < n.declarations.length; ++a) {
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
i =
|
|
11
|
+
const e = n.declarations[a];
|
|
12
|
+
if (e.kind === "class" || e.kind === "mixin") {
|
|
13
|
+
i = e;
|
|
14
14
|
break;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
o.set(n.path, {
|
|
18
18
|
apiModule: n,
|
|
19
19
|
classLike: i,
|
|
20
20
|
ancestors: void 0,
|
|
21
21
|
children: void 0
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return o;
|
|
25
25
|
}
|
|
26
|
-
function k(
|
|
27
|
-
for (const
|
|
28
|
-
p(
|
|
26
|
+
function k(t) {
|
|
27
|
+
for (const o of t.values())
|
|
28
|
+
p(o, t);
|
|
29
29
|
}
|
|
30
|
-
function p(
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
30
|
+
function p(t, o) {
|
|
31
|
+
const s = t.classLike;
|
|
32
|
+
if (s === void 0)
|
|
33
33
|
return;
|
|
34
|
-
const n =
|
|
35
|
-
if (!(
|
|
36
|
-
if (
|
|
37
|
-
for (let a =
|
|
38
|
-
|
|
39
|
-
n.superclass !== void 0 &&
|
|
34
|
+
const n = s;
|
|
35
|
+
if (!(t.ancestors !== void 0 || s.mixins === void 0 && n.superclass === void 0)) {
|
|
36
|
+
if (t.ancestors ??= [], s.mixins !== void 0)
|
|
37
|
+
for (let a = s.mixins.length - 1; a >= 0; --a)
|
|
38
|
+
f(s.mixins[a], t, o);
|
|
39
|
+
n.superclass !== void 0 && v(n.superclass, t, o);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
if (
|
|
44
|
-
const n =
|
|
45
|
-
p(n,
|
|
42
|
+
function f(t, o, s) {
|
|
43
|
+
if (t.module !== void 0 && t.package === void 0) {
|
|
44
|
+
const n = s.get(t.module);
|
|
45
|
+
p(n, s), n.children ??= [], n.children.push(o);
|
|
46
46
|
}
|
|
47
|
-
t.ancestors.push(s);
|
|
48
47
|
}
|
|
49
|
-
function
|
|
50
|
-
if (!(
|
|
51
|
-
|
|
48
|
+
function v(t, o, s) {
|
|
49
|
+
if (!(t.module !== void 0 && t.package === void 0)) {
|
|
50
|
+
o.ancestors.push(t);
|
|
52
51
|
return;
|
|
53
52
|
}
|
|
54
|
-
const i =
|
|
55
|
-
p(i,
|
|
53
|
+
const i = s.get(t.module);
|
|
54
|
+
p(i, s), i.children ??= [], i.children.push(o);
|
|
56
55
|
const a = i.classLike;
|
|
57
|
-
if (a.kind === "mixin" && a.name !==
|
|
56
|
+
if (a.kind === "mixin" && a.name !== t.name && t.name !== "default") {
|
|
58
57
|
const u = i.apiModule.declarations;
|
|
59
|
-
for (let
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
62
|
-
const l =
|
|
58
|
+
for (let r = 0; r < u.length; ++r) {
|
|
59
|
+
const d = u[r];
|
|
60
|
+
if (d.name === t.name) {
|
|
61
|
+
const l = d;
|
|
63
62
|
for (let m = l.supertypes.length - 1; m >= 1; --m) {
|
|
64
|
-
const c = l.supertypes[m],
|
|
63
|
+
const c = l.supertypes[m], h = c.module === void 0 && c.package === void 0 ? {
|
|
65
64
|
name: c.name,
|
|
66
|
-
module:
|
|
65
|
+
module: t.module,
|
|
67
66
|
package: void 0,
|
|
68
67
|
viewUrl: c.viewUrl,
|
|
69
68
|
typeArguments: c.typeArguments
|
|
70
69
|
} : c;
|
|
71
|
-
|
|
70
|
+
f(h, o, s);
|
|
72
71
|
}
|
|
73
|
-
|
|
72
|
+
v(l.supertypes[0], o, s);
|
|
74
73
|
break;
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
76
|
} else
|
|
78
|
-
|
|
79
|
-
i.ancestors !== void 0 &&
|
|
77
|
+
o.ancestors.push(t);
|
|
78
|
+
i.ancestors !== void 0 && o.ancestors.push(...i.ancestors);
|
|
80
79
|
}
|
|
81
80
|
export {
|
|
82
81
|
y as createIndex
|
package/dist/vite/plugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as T, m as J } from "../worker-
|
|
2
|
-
import { A as b, w as S } from "../ApiExtractor-
|
|
3
|
-
import { p as k, l as A } from "../typeScript-
|
|
1
|
+
import { l as T, m as J } from "../worker-BsfBxW8W.js";
|
|
2
|
+
import { A as b, w as S } from "../ApiExtractor-DobTJSVk.js";
|
|
3
|
+
import { p as k, l as A } from "../typeScript-DjfduZgN.js";
|
|
4
4
|
import { writeFile as C } from "node:fs/promises";
|
|
5
5
|
import { path as w } from "@arcgis/components-build-utils";
|
|
6
6
|
const M = k.name;
|
package/dist/vite/typeScript.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { path as $e, existsAsync as Qt, getCwd as Pi, retrievePackageJson as lt, toPosixPathSeparators as xi } from "@arcgis/components-build-utils";
|
|
2
|
-
import { b as Ri, p as Di, l as Li } from "./typeScript-
|
|
2
|
+
import { b as Ri, p as Di, l as Li } from "./typeScript-DjfduZgN.js";
|
|
3
3
|
import { getDefaultBasePath as Yt, buildViewUrl as Ii, getViewUrl as Ge } from "./extractor/processing/links.js";
|
|
4
4
|
import o from "typescript";
|
|
5
5
|
import "fs/promises";
|
|
6
|
-
import { a as
|
|
6
|
+
import { a as ie, c as Tt, b as Zt, g as ae, l as Ze, o as ei, p as Y, f as Ai, e as De, m as ki, q as Fi, r as wi, s as ti, t as Ni } from "./apiHelpers-BYzO767m.js";
|
|
7
7
|
import { maybeEscapePropertyName as xt, printTypeAlias as Rt, printInterface as Oi, printFunction as Gi, printVariable as Vi, printClass as _i, printMethod as Wi, printProperty as fe, printGetterSetter as Ki, printSignature as Hi } from "./utils/partPrinter.js";
|
|
8
|
-
import
|
|
8
|
+
import oe from "chalk";
|
|
9
9
|
import { readFile as Dt, opendir as Lt, rm as $i } from "node:fs/promises";
|
|
10
10
|
import { pathIsComponentEntrypoint as Bi, findDeclaredComponent as Ui } from "./extractor/webComponent/findComponents.js";
|
|
11
11
|
import { renameComponentFolder as Ve, addComponentPathMapping as zi } from "./extractor/webComponent/pathMapping.js";
|
|
12
|
-
import { getBasename as
|
|
12
|
+
import { getBasename as ee, getPackageNameFromExternalSpecifier as ct, extractInitializer as Be, extractBooleanInitializer as Z, findDecorator as xe, getMemberName as Re } from "./utils/astHelpers.js";
|
|
13
13
|
import { readFileSync as ji, existsSync as ue } from "node:fs";
|
|
14
14
|
import "util";
|
|
15
15
|
import { uncapitalize as Ji, camelToKebab as qi, kebabToPascal as Xi } from "@arcgis/toolkit/string";
|
|
@@ -372,7 +372,7 @@ function ii(e, t) {
|
|
|
372
372
|
else if (a === "slot")
|
|
373
373
|
e.slots ??= [], e.slots.push(ot(s));
|
|
374
374
|
else if (a === "esriCompatibilityName") {
|
|
375
|
-
const l =
|
|
375
|
+
const l = ie(e);
|
|
376
376
|
l.esriCompatibilityNames ??= [], l.esriCompatibilityNames.push(s ?? "");
|
|
377
377
|
} else a === "readonly" || (e.docsTags ??= [], e.docsTags.push(i));
|
|
378
378
|
}
|
|
@@ -553,18 +553,18 @@ function ua(e, t) {
|
|
|
553
553
|
if (_.customElement !== !0)
|
|
554
554
|
continue;
|
|
555
555
|
const W = _;
|
|
556
|
-
if (W.privacy !== void 0 ||
|
|
556
|
+
if (W.privacy !== void 0 || ie(W).hasExplicitAbstract === !0)
|
|
557
557
|
continue;
|
|
558
558
|
const { name: F, tagName: N, pascalCaseName: w, events: H } = W;
|
|
559
559
|
i += `import type { ${F} } from "./${R.path}/customElement.js";
|
|
560
560
|
`, n += `import type { ${F} } from "../${R.path}/customElement.js";
|
|
561
561
|
`;
|
|
562
562
|
const [me, ke] = un(W.name, W.members);
|
|
563
|
-
let
|
|
563
|
+
let ne = "", q = "";
|
|
564
564
|
if (H !== void 0) {
|
|
565
565
|
for (let pe = 0; pe < H.length; ++pe) {
|
|
566
566
|
const Fe = H[pe], Pt = `EventHandler<${F}["${Fe.name}"]>`;
|
|
567
|
-
|
|
567
|
+
ne += ` ${xt(`on${Fe.name}`)}?: ${Pt};
|
|
568
568
|
`, q += ` ${xt(`on${Fe.name[0].toUpperCase()}${Fe.name.slice(1)}`)}?: ${Pt};
|
|
569
569
|
`;
|
|
570
570
|
}
|
|
@@ -580,15 +580,15 @@ function ua(e, t) {
|
|
|
580
580
|
|
|
581
581
|
`, l += ` "${N}": ${F};
|
|
582
582
|
`, r += `interface Lumina${w} extends ${me}h.JSX.HTMLAttributes<${F}> {
|
|
583
|
-
${
|
|
583
|
+
${ne}}
|
|
584
584
|
|
|
585
585
|
`, c += ` "${N}": Lumina${w};
|
|
586
586
|
`, m += `interface Preact${w} extends ${me}HTMLAttributes<${F}> {
|
|
587
|
-
${
|
|
587
|
+
${ne}}
|
|
588
588
|
|
|
589
589
|
`, d += ` "${N}": Preact${w};
|
|
590
590
|
`, p += `interface React${w} extends ${me}HTMLProps<${F}> {
|
|
591
|
-
${
|
|
591
|
+
${ne}}
|
|
592
592
|
|
|
593
593
|
`, f += ` "${N}": React${w};
|
|
594
594
|
`, u += `interface Stencil${w} extends ${me}StencilJsx.HTMLAttributes<${F}> {
|
|
@@ -868,7 +868,7 @@ function Ft(e) {
|
|
|
868
868
|
if (e.kind === "class" || e.kind === "mixin")
|
|
869
869
|
n = wt(e);
|
|
870
870
|
else if (e.kind === "interface") {
|
|
871
|
-
const a =
|
|
871
|
+
const a = ie(e);
|
|
872
872
|
if (e.supertypes === void 0 && e.type === void 0 && e.members?.length === 1 && (e.members[0].kind === "call-signature" || e.members[0].kind === "constructor")) {
|
|
873
873
|
const l = e.members[0];
|
|
874
874
|
let r = ri(l, !0);
|
|
@@ -916,7 +916,7 @@ function Ft(e) {
|
|
|
916
916
|
return `${he(t)}${n}`;
|
|
917
917
|
}
|
|
918
918
|
function wt(e) {
|
|
919
|
-
const t =
|
|
919
|
+
const t = ie(e), n = t.isDefaultExported === !0, i = dt(e), a = e, s = e;
|
|
920
920
|
let l, r = a.mixins ?? s.supertypes;
|
|
921
921
|
if (r === void 0)
|
|
922
922
|
t.superClassText !== void 0 && (l = t.superClassText);
|
|
@@ -946,7 +946,7 @@ declare const ${l}:`, t.superClassText !== void 0 && (c += ` typeof ${t.superCla
|
|
|
946
946
|
function dt(e) {
|
|
947
947
|
const t = e.members;
|
|
948
948
|
let n = "";
|
|
949
|
-
const i =
|
|
949
|
+
const i = ie(e);
|
|
950
950
|
if (e.kind === "mixin" && (n += `constructor(...args: any[]);
|
|
951
951
|
`), i.eventTypesProperty !== void 0) {
|
|
952
952
|
let l = vn;
|
|
@@ -1211,7 +1211,7 @@ function di(e, t, n = "*", i) {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
function An(e, t, n) {
|
|
1213
1213
|
if (!(e === void 0 || e === "interfaces.d.ts")) {
|
|
1214
|
-
const i = `https://${n.config.documentation.host}${kn}${
|
|
1214
|
+
const i = `https://${n.config.documentation.host}${kn}${ee(e)}/`;
|
|
1215
1215
|
return Ii(i, t === "default" || t === "*" ? void 0 : t, void 0);
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
@@ -1365,7 +1365,7 @@ function je(e, t, n, i, a) {
|
|
|
1365
1365
|
end: a
|
|
1366
1366
|
};
|
|
1367
1367
|
n.localDeclarations.has(c) || n.emitError(
|
|
1368
|
-
`@public declaration referenced non-public ${
|
|
1368
|
+
`@public declaration referenced non-public ${oe.red(c)}. Either mark it @public or refactor out the reference. Note that Enums are not supported in public docs per https://devtopia.esri.com/WebGIS/arcgis-js-api/discussions/73576.`,
|
|
1369
1369
|
{
|
|
1370
1370
|
file: n.file,
|
|
1371
1371
|
node: void 0
|
|
@@ -1405,7 +1405,7 @@ function Nn(e, t, n) {
|
|
|
1405
1405
|
return _t(f), f;
|
|
1406
1406
|
}
|
|
1407
1407
|
if (e.startsWith(t.basePath)) {
|
|
1408
|
-
const r = e.slice(t.basePath.length), c = Ve(
|
|
1408
|
+
const r = e.slice(t.basePath.length), c = Ve(ee(r), t);
|
|
1409
1409
|
return c === t.apiModule.path ? {
|
|
1410
1410
|
packageName: void 0,
|
|
1411
1411
|
modulePath: void 0
|
|
@@ -1434,7 +1434,7 @@ function _t(e) {
|
|
|
1434
1434
|
e.packageName?.startsWith("@types/") === !0 && (e.packageName = e.packageName.slice(7));
|
|
1435
1435
|
}
|
|
1436
1436
|
function Wt(e, t, n, i) {
|
|
1437
|
-
const a =
|
|
1437
|
+
const a = ee(e);
|
|
1438
1438
|
if (t.exports === void 0)
|
|
1439
1439
|
return `${a}.js`;
|
|
1440
1440
|
const s = `./${a}`, l = "@arcgis/lumina" in (t.dependencies ?? {}) && s.endsWith("/customElement") ? `${s.slice(0, -13)}index` : s;
|
|
@@ -1448,7 +1448,7 @@ function Wt(e, t, n, i) {
|
|
|
1448
1448
|
return m.modulePath;
|
|
1449
1449
|
}
|
|
1450
1450
|
return n.emitError(
|
|
1451
|
-
`Need explicit type annotation for where the ${
|
|
1451
|
+
`Need explicit type annotation for where the ${oe.red(i)} from ${t.name}/${e} is being used implicitly. Reason: Unable to find an "exports" compatible import path to insert the import of this type in the emitted .d.ts.`,
|
|
1452
1452
|
{ file: n.file, node: void 0 }
|
|
1453
1453
|
), e;
|
|
1454
1454
|
}
|
|
@@ -1475,7 +1475,7 @@ function ft(e, t, n) {
|
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
1477
|
function Vn(e, t, n) {
|
|
1478
|
-
const i =
|
|
1478
|
+
const i = ee(t);
|
|
1479
1479
|
if (i === n)
|
|
1480
1480
|
return e;
|
|
1481
1481
|
const a = i.indexOf("*");
|
|
@@ -1486,7 +1486,7 @@ function Vn(e, t, n) {
|
|
|
1486
1486
|
return;
|
|
1487
1487
|
const l = i.slice(a + 1), r = n.slice(s.length), c = t.slice(i.length);
|
|
1488
1488
|
if (l === "") {
|
|
1489
|
-
const p =
|
|
1489
|
+
const p = ee(e), f = e.slice(p.length), u = p === e && c === "" ? ".js" : f;
|
|
1490
1490
|
return p.slice(0, -1) + r + u;
|
|
1491
1491
|
}
|
|
1492
1492
|
if (!r.endsWith(l))
|
|
@@ -1954,7 +1954,7 @@ function Ke(e, t = 0) {
|
|
|
1954
1954
|
d.wasUsed = !0;
|
|
1955
1955
|
const g = d.type === "named";
|
|
1956
1956
|
d.replacementName !== void 0 && (Me(a, d.replacementName), r = l + d.replacementName.length), d.replacementName !== void 0 && (M.functionLikeTypeParameters?.has(d.replacementName) === !0 || M.objectLikeTypeParameters?.has(d.replacementName) === !0) && M.emitError(
|
|
1957
|
-
`Can't do a type replacement of ${
|
|
1957
|
+
`Can't do a type replacement of ${oe.green(s)} to ${oe.red(d.replacementName)} as the latter name conflicts with a type parameter name in the current scope. Rename the type parameter or refactor out the type replacement.`,
|
|
1958
1958
|
{ file: M.file, node: e }
|
|
1959
1959
|
);
|
|
1960
1960
|
const E = g ? d.actualName ?? d.replacementName ?? s : void 0;
|
|
@@ -1962,7 +1962,7 @@ function Ke(e, t = 0) {
|
|
|
1962
1962
|
if (M.config.strict) {
|
|
1963
1963
|
const h = ct(d.specifier);
|
|
1964
1964
|
M.runtimeDependencyNames.has(h) || M.emitError(
|
|
1965
|
-
h === "esri" ? `Found unexpected absolute path import of ${
|
|
1965
|
+
h === "esri" ? `Found unexpected absolute path import of ${oe.red(E ?? d.type)} from ${oe.red(d.specifier)}. Did you mean to use a relative import instead?` : `Type ${oe.red(E ?? d.type)} imported from ${oe.red(h)} cannot be referenced in public types as this dependency is not declared as a "dependency" in the package.json`,
|
|
1966
1966
|
{ file: M.file, node: e }
|
|
1967
1967
|
);
|
|
1968
1968
|
}
|
|
@@ -2352,7 +2352,7 @@ function Ae(e, t, n, i) {
|
|
|
2352
2352
|
{ file: i.file, node: S },
|
|
2353
2353
|
`Public parameter ${N} must have a type annotation or a default value`,
|
|
2354
2354
|
i
|
|
2355
|
-
) : ht(S.initializer, G.false, i.file, i)), ke = z(me, i),
|
|
2355
|
+
) : ht(S.initializer, G.false, i.file, i)), ke = z(me, i), ne = {
|
|
2356
2356
|
name: N,
|
|
2357
2357
|
deprecated: void 0,
|
|
2358
2358
|
summary: void 0,
|
|
@@ -2363,7 +2363,7 @@ function Ae(e, t, n, i) {
|
|
|
2363
2363
|
type: ke,
|
|
2364
2364
|
default: Be(S.initializer, void 0, i.file)
|
|
2365
2365
|
};
|
|
2366
|
-
|
|
2366
|
+
ne.optional = Bt(S, ne), y.parameters.push(ne);
|
|
2367
2367
|
}
|
|
2368
2368
|
if (i.config.strict && !T && x !== y.parameters.length && i.emitError(
|
|
2369
2369
|
`Expected @param tags to match the number of parameters on a public function. Found ${P.length} @param tags for ${y.parameters.length} TypeScript parameters. Documentation: https://webgis.esri.com/webgis/core/core/documenting-api#param${g ? " and https://webgis.esri.com/webgis/core/core/documenting-api#constructor" : ""}`,
|
|
@@ -2411,9 +2411,9 @@ function ho(e) {
|
|
|
2411
2411
|
return St(), Mt(e), yi();
|
|
2412
2412
|
}
|
|
2413
2413
|
let Le = !1, se = !1, re = !1, Ie = !1, le = !1, bt = !1;
|
|
2414
|
-
const ce = [],
|
|
2414
|
+
const ce = [], te = [];
|
|
2415
2415
|
function St() {
|
|
2416
|
-
Le = !1, se = !1, re = !1, Ie = !1, le = !1, bt = !1, ce.length = 0,
|
|
2416
|
+
Le = !1, se = !1, re = !1, Ie = !1, le = !1, bt = !1, ce.length = 0, te.length = 0;
|
|
2417
2417
|
}
|
|
2418
2418
|
function yi() {
|
|
2419
2419
|
if (!re && !Ie && !le && !Le)
|
|
@@ -2423,9 +2423,9 @@ function yi() {
|
|
|
2423
2423
|
for (let t = 0; t < ce.length; ++t)
|
|
2424
2424
|
e.push({ type: "string", value: ce[t] });
|
|
2425
2425
|
else re && e.push(Eo);
|
|
2426
|
-
if (
|
|
2427
|
-
for (let t = 0; t <
|
|
2428
|
-
e.push({ type: "number", value:
|
|
2426
|
+
if (te.length > 0)
|
|
2427
|
+
for (let t = 0; t < te.length; ++t)
|
|
2428
|
+
e.push({ type: "number", value: te[t] });
|
|
2429
2429
|
else le && e.push(Co);
|
|
2430
2430
|
return Ie && e.push(bo), Le ? e.push(Mo) : se && e.push(Po), e;
|
|
2431
2431
|
}
|
|
@@ -2455,11 +2455,11 @@ function Pe(e, t) {
|
|
|
2455
2455
|
re = !0, ce.push(e.text);
|
|
2456
2456
|
return;
|
|
2457
2457
|
case o.SyntaxKind.NumericLiteral:
|
|
2458
|
-
le = !0,
|
|
2458
|
+
le = !0, te.push(e.text);
|
|
2459
2459
|
return;
|
|
2460
2460
|
case o.SyntaxKind.PrefixUnaryExpression:
|
|
2461
2461
|
const n = e.operand;
|
|
2462
|
-
n.kind === o.SyntaxKind.NumericLiteral ? (
|
|
2462
|
+
n.kind === o.SyntaxKind.NumericLiteral ? (te.push(`-${n.text}`), le = !0) : se = !0;
|
|
2463
2463
|
return;
|
|
2464
2464
|
case o.SyntaxKind.VoidKeyword:
|
|
2465
2465
|
case o.SyntaxKind.UndefinedKeyword:
|
|
@@ -2469,7 +2469,7 @@ function Pe(e, t) {
|
|
|
2469
2469
|
const i = e.types, a = Math.min(i.length, Qe);
|
|
2470
2470
|
for (let l = 0; l < a; ++l)
|
|
2471
2471
|
Pe(i[l], t);
|
|
2472
|
-
i.length > Qe && (ce.length = 0,
|
|
2472
|
+
i.length > Qe && (ce.length = 0, te.length = 0);
|
|
2473
2473
|
return;
|
|
2474
2474
|
case o.SyntaxKind.ParenthesizedType:
|
|
2475
2475
|
Pe(e.type, t);
|
|
@@ -2509,14 +2509,14 @@ function Mt(e) {
|
|
|
2509
2509
|
const t = Math.min(e.types.length, Qe);
|
|
2510
2510
|
for (let n = 0; n < t; ++n)
|
|
2511
2511
|
Ut(e.types[n]);
|
|
2512
|
-
e.types.length > Qe && (ce.length = 0,
|
|
2512
|
+
e.types.length > Qe && (ce.length = 0, te.length = 0);
|
|
2513
2513
|
} else
|
|
2514
2514
|
Ut(e);
|
|
2515
2515
|
}
|
|
2516
2516
|
function Ut(e) {
|
|
2517
2517
|
const t = e.flags;
|
|
2518
2518
|
let n = !1;
|
|
2519
|
-
if (t & o.TypeFlags.StringLiteral ? (n = !0, re = !0, ce.push(e.value)) : t & o.TypeFlags.StringLike && (n = !0, re = !0), t & o.TypeFlags.NumberLiteral ? (n = !0, le = !0,
|
|
2519
|
+
if (t & o.TypeFlags.StringLiteral ? (n = !0, re = !0, ce.push(e.value)) : t & o.TypeFlags.StringLike && (n = !0, re = !0), t & o.TypeFlags.NumberLiteral ? (n = !0, le = !0, te.push(e.value.toString())) : t & o.TypeFlags.NumberLike && (n = !0, le = !0), t & o.TypeFlags.BooleanLike && (n = !0, Ie = !0), t & o.TypeFlags.Any) {
|
|
2520
2520
|
if (e.intrinsicName === "error") {
|
|
2521
2521
|
se = !0, bt = !0;
|
|
2522
2522
|
return;
|
|
@@ -2604,7 +2604,7 @@ function Lo(e, t, n, i) {
|
|
|
2604
2604
|
return;
|
|
2605
2605
|
}
|
|
2606
2606
|
for (const a of t.properties)
|
|
2607
|
-
!o.isPropertyAssignment(a) || !o.isIdentifier(a.name) || (a.name.text === "cancelable" && !
|
|
2607
|
+
!o.isPropertyAssignment(a) || !o.isIdentifier(a.name) || (a.name.text === "cancelable" && !Z(a.initializer, i) && (n.cancelable = !1), a.name.text === "bubbles" && !Z(a.initializer, i) && (n.bubbles = !1), a.name.text === "composed" && !Z(a.initializer, i) && (n.composed = !1));
|
|
2608
2608
|
}
|
|
2609
2609
|
}
|
|
2610
2610
|
function zt(e, t) {
|
|
@@ -2658,7 +2658,7 @@ function vi(e, t, n, i) {
|
|
|
2658
2658
|
continue;
|
|
2659
2659
|
}
|
|
2660
2660
|
const R = S.name.escapedText;
|
|
2661
|
-
R === "readOnly" &&
|
|
2661
|
+
R === "readOnly" && Z(S.initializer, i) ? n = !0 : R === "constructOnly" && Z(S.initializer, i) ? d.isConstructorOnly = !0 : R === "type" ? d.hasAutoCasting = !0 : R === "types" && Io(
|
|
2662
2662
|
d,
|
|
2663
2663
|
S.initializer?.kind === o.SyntaxKind.ObjectLiteralExpression ? S.initializer : void 0
|
|
2664
2664
|
);
|
|
@@ -2692,13 +2692,13 @@ function vi(e, t, n, i) {
|
|
|
2692
2692
|
if (!(!o.isPropertyAssignment(R) || !o.isIdentifier(R.name)))
|
|
2693
2693
|
switch (R.name.escapedText) {
|
|
2694
2694
|
case "attribute":
|
|
2695
|
-
o.isStringLiteral(R.initializer) ? b = R.initializer.text : b =
|
|
2695
|
+
o.isStringLiteral(R.initializer) ? b = R.initializer.text : b = Z(R.initializer, i);
|
|
2696
2696
|
continue;
|
|
2697
2697
|
case "reflect":
|
|
2698
|
-
|
|
2698
|
+
Z(R.initializer, i) && (b ??= !0, h = !0);
|
|
2699
2699
|
continue;
|
|
2700
2700
|
case "readOnly":
|
|
2701
|
-
|
|
2701
|
+
Z(R.initializer, i) && (n = !0);
|
|
2702
2702
|
continue;
|
|
2703
2703
|
case "type":
|
|
2704
2704
|
case "converter":
|
|
@@ -2874,6 +2874,7 @@ function Ye(e, t) {
|
|
|
2874
2874
|
supertypes: void 0,
|
|
2875
2875
|
mixins: void 0,
|
|
2876
2876
|
encapsulation: void 0,
|
|
2877
|
+
formAssociated: void 0,
|
|
2877
2878
|
members: [],
|
|
2878
2879
|
attributes: void 0,
|
|
2879
2880
|
events: void 0,
|
|
@@ -2965,7 +2966,7 @@ function Ao(e, t, n, i, a) {
|
|
|
2965
2966
|
const p = a.moduleContext.importsMap.LitElement;
|
|
2966
2967
|
p === void 0 ? a.emitError("Expected LitElement import to be defined", { file: a.file, node: i }) : p.actualName = "PublicLitElement";
|
|
2967
2968
|
}
|
|
2968
|
-
const d =
|
|
2969
|
+
const d = ie(n);
|
|
2969
2970
|
d.superClassText = m.printableText, m.printableText = void 0, n.superclass = m;
|
|
2970
2971
|
break;
|
|
2971
2972
|
} else {
|
|
@@ -2975,7 +2976,7 @@ function Ao(e, t, n, i, a) {
|
|
|
2975
2976
|
c = r.expression, m = r.typeArguments;
|
|
2976
2977
|
else if (o.isTypeReferenceNode(r) && (c = r.typeName, m = r.typeArguments, c.escapedText === "Record" && m?.length === 2 && m[0].kind === o.SyntaxKind.NeverKeyword && m[1].kind === o.SyntaxKind.NeverKeyword))
|
|
2977
2978
|
continue;
|
|
2978
|
-
const d = Ee(c, m, a), p =
|
|
2979
|
+
const d = Ee(c, m, a), p = ie(n);
|
|
2979
2980
|
p.superTypesText ??= [], p.superTypesText.push(d.printableText), d.printableText = void 0, n.supertypes ??= [], n.supertypes.push(d);
|
|
2980
2981
|
}
|
|
2981
2982
|
}
|
|
@@ -2998,7 +2999,7 @@ function Si(e, t, n, i) {
|
|
|
2998
2999
|
E.docsTags.includes(V.private) ? a && i.config.context.includeLuminaPrivateComponents ? u = Ce : u = void 0 : u = E;
|
|
2999
3000
|
} else u === void 0 && a && i.config.context.includeLuminaPrivateComponents && Jt(r, i.pairedSetter, !1) && (u = Ce);
|
|
3000
3001
|
if (u === void 0) {
|
|
3001
|
-
a && o.isPropertyDeclaration(r) && o.isIdentifier(r.name) && r.name.escapedText === "shadowRootOptions" && r.initializer !== void 0 && o.isIdentifier(r.initializer) && r.initializer.escapedText === "noShadowRoot" && (i.apiObject.encapsulation = "none");
|
|
3002
|
+
a && o.isPropertyDeclaration(r) && o.isIdentifier(r.name) && (r.name.escapedText === "shadowRootOptions" && r.initializer !== void 0 && o.isIdentifier(r.initializer) && r.initializer.escapedText === "noShadowRoot" && (i.apiObject.encapsulation = "none"), r.name.escapedText === "formAssociated" && r.initializer !== void 0 && Z(r.initializer, i) && (i.apiObject.formAssociated = !0));
|
|
3002
3003
|
continue;
|
|
3003
3004
|
}
|
|
3004
3005
|
i.jsDoc = u;
|
|
@@ -3007,7 +3008,7 @@ function Si(e, t, n, i) {
|
|
|
3007
3008
|
0,
|
|
3008
3009
|
rt.members.length,
|
|
3009
3010
|
r
|
|
3010
|
-
), Ti(e, rt, i),
|
|
3011
|
+
), Ti(e, rt, i), ie(e).emitAsTypeAlias = !0) : i.emitError(`@public used on unsupported member kind: ${o.SyntaxKind[r.kind]}`, {
|
|
3011
3012
|
file: i.file,
|
|
3012
3013
|
node: r
|
|
3013
3014
|
}), g !== void 0 && s.push(g);
|
|
@@ -3133,6 +3134,7 @@ function Fo(e, t) {
|
|
|
3133
3134
|
supertypes: void 0,
|
|
3134
3135
|
mixins: void 0,
|
|
3135
3136
|
encapsulation: void 0,
|
|
3137
|
+
formAssociated: void 0,
|
|
3136
3138
|
members: [],
|
|
3137
3139
|
attributes: void 0,
|
|
3138
3140
|
events: void 0,
|
|
@@ -3232,7 +3234,7 @@ function No(e, t, n) {
|
|
|
3232
3234
|
])
|
|
3233
3235
|
],
|
|
3234
3236
|
[]
|
|
3235
|
-
), s = Ye(a, n), l = s, r =
|
|
3237
|
+
), s = Ye(a, n), l = s, r = ie(l);
|
|
3236
3238
|
return l.kind = "interface", l.supertypes = s.mixins, s.mixins = void 0, s.superclass !== void 0 && (s.superclass.printableText = r.superClassText, l.supertypes ??= [], l.supertypes.unshift(s.superclass), r.superClassText = void 0, s.superclass = void 0), n.moduleHasClass = i, r.isMixinBaseClass = !0, l;
|
|
3237
3239
|
}
|
|
3238
3240
|
function Oo(e, t) {
|
|
@@ -3318,7 +3320,7 @@ function Vo(e, t) {
|
|
|
3318
3320
|
if (i.isEmptyModule)
|
|
3319
3321
|
return;
|
|
3320
3322
|
}
|
|
3321
|
-
const a = n.slice(t.config.context.basePath.length), s =
|
|
3323
|
+
const a = n.slice(t.config.context.basePath.length), s = ee(a), l = Ve(s, t, !0), r = t.componentTagName === void 0 ? l : `${l}/customElement`;
|
|
3322
3324
|
t.mixinName = void 0, t.moduleHasClass = !1, t.apiClassLikeName = void 0, t.isInLuminaMinimalExtraction = t.config.context.isLuminaMinimalExtraction;
|
|
3323
3325
|
const c = /* @__PURE__ */ Object.create(null), m = t.localDeclarations;
|
|
3324
3326
|
m.clear();
|
|
@@ -3358,7 +3360,7 @@ function Vo(e, t) {
|
|
|
3358
3360
|
const D = y.importClause;
|
|
3359
3361
|
if (D === void 0)
|
|
3360
3362
|
continue;
|
|
3361
|
-
const x = y.moduleSpecifier.text, T = !x.startsWith("."), K = T ? x :
|
|
3363
|
+
const x = y.moduleSpecifier.text, T = !x.startsWith("."), K = T ? x : ee(x), O = T ? void 0 : Ve(pt(s, K), t), J = O === void 0 ? void 0 : t.config.types.typeReplacements[O];
|
|
3362
3364
|
if (Pn(y, t), D.name !== void 0) {
|
|
3363
3365
|
const C = D.name.escapedText, S = J?.[C], R = S?.[1], A = S === void 0 ? !T && x.endsWith(".json") ? x : K : ye(r, S[0]), _ = S?.[0] ?? O;
|
|
3364
3366
|
c[C] = {
|
|
@@ -3402,7 +3404,7 @@ function Vo(e, t) {
|
|
|
3402
3404
|
}
|
|
3403
3405
|
} else if (o.isExportDeclaration(y) && y.moduleSpecifier !== void 0 && !t.isInLuminaMinimalExtraction) {
|
|
3404
3406
|
if (j(y, !0, t) !== void 0) {
|
|
3405
|
-
const x = y.moduleSpecifier.text, T = !x.startsWith("."), K = T ? x : pt(s,
|
|
3407
|
+
const x = y.moduleSpecifier.text, T = !x.startsWith("."), K = T ? x : pt(s, ee(x)), O = T ? void 0 : Ve(K, t), J = T ? x : ye(r, O);
|
|
3406
3408
|
u.reExports ??= [];
|
|
3407
3409
|
const $ = [];
|
|
3408
3410
|
if (y.exportClause?.kind === o.SyntaxKind.NamedExports) {
|
|
@@ -3593,7 +3595,7 @@ async function Sa(e) {
|
|
|
3593
3595
|
}
|
|
3594
3596
|
p = !0, u.extractedNames = u.pendingNames === void 0 ? void 0 : new Set(u.pendingNames);
|
|
3595
3597
|
let v = e.basePath + u.sourcePath, b = !1, h = e.program?.getSourceFile(v) ?? e.program?.getSourceFile(`${v}.ts`) ?? e.program?.getSourceFile(`${v}.tsx`) ?? e.program?.getSourceFile(`${v}.d.ts`);
|
|
3596
|
-
if (h === void 0 && (h = e.program?.getSourceFile(`${v}/index.ts`) ?? e.program?.getSourceFile(`${v}/index.tsx`) ?? e.program?.getSourceFile(`${v}/index.d.ts`), h !== void 0 && (b = !0)), e.program === void 0 && (
|
|
3598
|
+
if (h === void 0 && (h = e.program?.getSourceFile(`${v}/index.ts`) ?? e.program?.getSourceFile(`${v}/index.tsx`) ?? e.program?.getSourceFile(`${v}/index.d.ts`), h !== void 0 && (b = !0)), e.program === void 0 && (ee(v) === v && (v = ue(`${v}.ts`) ? `${v}.ts` : ue(`${v}.tsx`) ? `${v}.tsx` : ue(`${v}.d.ts`) ? `${v}.d.ts` : void 0, v === void 0 && (v = ue(`${v}/index.ts`) ? `${v}/index.ts` : ue(`${v}/index.tsx`) ? `${v}/index.tsx` : ue(`${v}/index.d.ts`) ? `${v}/index.d.ts` : void 0, v !== void 0 && (b = !0))), v !== void 0 && (h = Xt(v, await Dt(v, "utf8")))), h !== void 0) {
|
|
3597
3599
|
const L = h.fileName.slice(e.basePath.length);
|
|
3598
3600
|
L !== u.sourcePath && (u.sourcePath = L), b && (u.actualModulePath = `${g}/index`), d(h);
|
|
3599
3601
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/api-extractor",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"chalk": "^5.4.1",
|
|
54
54
|
"commander": "^14.0.0",
|
|
55
55
|
"tslib": "^2.8.1",
|
|
56
|
-
"@arcgis/components-build-utils": "5.1.0-next.
|
|
57
|
-
"@arcgis/toolkit": "5.1.0-next.
|
|
56
|
+
"@arcgis/components-build-utils": "5.1.0-next.22",
|
|
57
|
+
"@arcgis/toolkit": "5.1.0-next.22"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"typescript": "~5.9.3",
|