@arcgis/api-extractor 5.2.0-next.4 → 5.2.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ApiExtractor-Dgo6jr2j.js → ApiExtractor-Czsu8T1F.js} +39 -39
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.js +2 -2
- package/dist/extractor/extractors/copyDoc.d.ts +10 -4
- package/dist/{typeScript-BsuvRihm.js → typeScript-CzxI8NsH.js} +1 -1
- package/dist/utils/apiHelpers.js +5 -5
- package/dist/utils/hydrateApiType.js +25 -24
- package/dist/vite/plugin.js +3 -3
- package/dist/vite/typeScript.js +1 -1
- package/dist/{worker-D-jUD6OL.js → worker-BmWcv5VA.js} +192 -184
- package/package.json +3 -3
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { path as $e, existsAsync as Zt, getCwd as Ri, retrievePackageJson as dt, toPosixPathSeparators as Li } from "@arcgis/components-build-utils";
|
|
2
|
-
import { b as Ii, p as Ai, l as ki } from "./typeScript-
|
|
2
|
+
import { b as Ii, p as Ai, l as ki } from "./typeScript-CzxI8NsH.js";
|
|
3
3
|
import { getDefaultBasePath as ei, buildViewUrl as Gi, getViewUrl as Ve } from "./extractor/processing/links.js";
|
|
4
4
|
import o from "typescript";
|
|
5
5
|
import "fs/promises";
|
|
6
|
-
import { a as
|
|
7
|
-
import { maybeEscapePropertyName as Rt, printTypeAlias as Lt, printInterface as wi, printFunction as Ui, printVariable as Vi, printClass as Wi, printMethod as _i, printProperty as
|
|
6
|
+
import { a as me, b as ti, c as Et, g as ne, p as j, f as tt, h as ii, d as Oe, e as Fi, i as Oi, j as ni, k as Ni } from "./privateContext-CB7P40up.js";
|
|
7
|
+
import { maybeEscapePropertyName as Rt, printTypeAlias as Lt, printInterface as wi, printFunction as Ui, printVariable as Vi, printClass as Wi, printMethod as _i, printProperty as ye, printGetterSetter as Bi, printSignature as Ki } from "./utils/partPrinter.js";
|
|
8
8
|
import { styleText as ie } from "node:util";
|
|
9
9
|
import { readFile as It, opendir as At, rm as Hi } from "node:fs/promises";
|
|
10
10
|
import { pathIsComponentEntrypoint as $i, findDeclaredComponent as zi } from "./extractor/webComponent/findComponents.js";
|
|
11
11
|
import { renameComponentFolder as We, addComponentPathMapping as ji } from "./extractor/webComponent/pathMapping.js";
|
|
12
|
-
import { getBasename as Z, getPackageNameFromExternalSpecifier as pt, extractInitializer as ze, extractBooleanInitializer as Y, findDecorator as
|
|
13
|
-
import { readFileSync as Ji, existsSync as
|
|
12
|
+
import { getBasename as Z, getPackageNameFromExternalSpecifier as pt, extractInitializer as ze, extractBooleanInitializer as Y, findDecorator as xe, getMemberName as Re } from "./utils/astHelpers.js";
|
|
13
|
+
import { readFileSync as Ji, existsSync as fe } from "node:fs";
|
|
14
14
|
import { uncapitalize as qi, camelToKebab as Qi, kebabToPascal as Xi } from "@arcgis/toolkit/string";
|
|
15
|
-
import { globalPackageIdentifier as
|
|
16
|
-
import { identity as
|
|
15
|
+
import { globalPackageIdentifier as ce, mergeApiNodes as Yi, isApiMethodAsync as Zi } from "./utils/apiHelpers.js";
|
|
16
|
+
import { identity as Se } from "@arcgis/toolkit/function";
|
|
17
17
|
import { pathToFileURL as en } from "node:url";
|
|
18
18
|
import tn from "path";
|
|
19
19
|
import { getWidenedLiteralType as nn, unsafeUndocumentedTs as on, unsafeGetUndocumentedPrinter as an } from "./utils/internalTypeScriptApis.js";
|
|
20
20
|
const kt = "developers.arcgis.com", Gt = "next.gha.afd.arcgis.com";
|
|
21
|
-
function
|
|
21
|
+
function fa(e) {
|
|
22
22
|
if (e.isResolvedConfig === !0)
|
|
23
23
|
return e;
|
|
24
24
|
const t = e.context, n = e.types, i = e.documentation, r = `${t?.cwd === void 0 ? Ri() : $e.resolve(t?.cwd)}/`, l = t?.packageJson ?? dt(r);
|
|
@@ -75,8 +75,8 @@ function ua(e) {
|
|
|
75
75
|
types: {
|
|
76
76
|
typeCheckedExtraction: p,
|
|
77
77
|
fullTypeCheck: d,
|
|
78
|
-
afterDiagnostic: n?.afterDiagnostic ??
|
|
79
|
-
typeScriptInstanceCreated: n?.typeScriptInstanceCreated ??
|
|
78
|
+
afterDiagnostic: n?.afterDiagnostic ?? Se,
|
|
79
|
+
typeScriptInstanceCreated: n?.typeScriptInstanceCreated ?? Se,
|
|
80
80
|
typeScriptConfigPath: m.configPath,
|
|
81
81
|
typeScriptConfig: f,
|
|
82
82
|
compilerOptions: f.config.options,
|
|
@@ -101,7 +101,7 @@ function ua(e) {
|
|
|
101
101
|
detectBrokenLinks: e.verify?.detectBrokenLinks ?? !0
|
|
102
102
|
},
|
|
103
103
|
watch: {
|
|
104
|
-
onUpdate: e.watch?.onUpdate ??
|
|
104
|
+
onUpdate: e.watch?.onUpdate ?? Se,
|
|
105
105
|
// Many reads can happen in a short time (on folder moves, or if prettier re-runs)
|
|
106
106
|
// Shorter than TypeScript's default of 250ms as we are blocked until this
|
|
107
107
|
// timeout is complete. Short timeout for unchecked extraction as it is fast,
|
|
@@ -111,10 +111,10 @@ function ua(e) {
|
|
|
111
111
|
skipWritingUnchanged: P ? !1 : e.watch?.skipWritingUnchanged ?? !0
|
|
112
112
|
},
|
|
113
113
|
strict: e.strict ?? !c,
|
|
114
|
-
afterApiJsonCreate: e.afterApiJsonCreate ??
|
|
114
|
+
afterApiJsonCreate: e.afterApiJsonCreate ?? Se
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
async function
|
|
117
|
+
async function ya(e, t) {
|
|
118
118
|
const n = t !== void 0, i = e ?? process.cwd(), a = $e.resolve(i, t ?? "api-extractor.config.ts"), r = await Zt(a);
|
|
119
119
|
if (n && !r)
|
|
120
120
|
throw Error(`The provided config file at ${a} does not exist.`);
|
|
@@ -129,7 +129,7 @@ async function fa(e, t) {
|
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function va(e, t) {
|
|
133
133
|
const n = e.context, i = t.context, a = e.types, r = t.types, l = e.documentation, s = t.documentation, c = e.verify, p = t.verify, d = e.watch, m = t.watch;
|
|
134
134
|
return {
|
|
135
135
|
isResolvedConfig: e.isResolvedConfig || t.isResolvedConfig || void 0,
|
|
@@ -189,10 +189,10 @@ function ya(e, t) {
|
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
191
|
function Ne(e, t) {
|
|
192
|
-
const n = t ===
|
|
192
|
+
const n = t === Se ? void 0 : t, i = e === Se ? void 0 : e;
|
|
193
193
|
return n !== void 0 && i !== void 0 ? ((...a) => (n(...a), i(...a))) : i ?? n;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function he(e) {
|
|
196
196
|
const t = [], n = e, i = e;
|
|
197
197
|
if (e.deprecated && t.push({
|
|
198
198
|
name: "deprecated",
|
|
@@ -392,7 +392,7 @@ function ai(e, t) {
|
|
|
392
392
|
else if (a === "slot")
|
|
393
393
|
e.slots ??= [], e.slots.push(rt(r));
|
|
394
394
|
else if (a === "esriCompatibilityName") {
|
|
395
|
-
const l =
|
|
395
|
+
const l = me(e);
|
|
396
396
|
l.esriCompatibilityNames ??= [], l.esriCompatibilityNames.push(r ?? "");
|
|
397
397
|
} else a === "readonly" || (e.docsTags ??= [], e.docsTags.push(i));
|
|
398
398
|
}
|
|
@@ -503,7 +503,7 @@ const U = {
|
|
|
503
503
|
}, Le = {
|
|
504
504
|
description: void 0,
|
|
505
505
|
docsTags: []
|
|
506
|
-
},
|
|
506
|
+
}, Pe = {
|
|
507
507
|
description: void 0,
|
|
508
508
|
docsTags: [U.private]
|
|
509
509
|
};
|
|
@@ -563,7 +563,7 @@ export namespace tsx {
|
|
|
563
563
|
return e;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function ga(e, t) {
|
|
567
567
|
let n = `/// <reference types="../index.d.ts" />
|
|
568
568
|
`, i = `
|
|
569
569
|
|
|
@@ -575,17 +575,17 @@ function va(e, t) {
|
|
|
575
575
|
if (V.customElement !== !0)
|
|
576
576
|
continue;
|
|
577
577
|
const W = V;
|
|
578
|
-
if (W.privacy !== void 0 ||
|
|
578
|
+
if (W.privacy !== void 0 || me(W).hasExplicitAbstract === !0)
|
|
579
579
|
continue;
|
|
580
580
|
const { name: G, tagName: O, pascalCaseName: F, events: B } = W;
|
|
581
581
|
i += `import type { ${G} } from "./${x.path}/customElement.js";
|
|
582
582
|
`, n += `import type { ${G} } from "../${x.path}/customElement.js";
|
|
583
583
|
`;
|
|
584
|
-
const [
|
|
584
|
+
const [ue, Ge] = vn(W.name, W.members);
|
|
585
585
|
let te = "", q = "";
|
|
586
586
|
if (B !== void 0) {
|
|
587
|
-
for (let
|
|
588
|
-
const Fe = B[
|
|
587
|
+
for (let pe = 0; pe < B.length; ++pe) {
|
|
588
|
+
const Fe = B[pe], xt = `EventHandler<${G}["${Fe.name}"]>`;
|
|
589
589
|
te += ` ${Rt(`on${Fe.name}`)}?: ${xt};
|
|
590
590
|
`, q += ` ${Rt(`on${Fe.name[0].toUpperCase()}${Fe.name.slice(1)}`)}?: ${xt};
|
|
591
591
|
`;
|
|
@@ -601,19 +601,19 @@ function va(e, t) {
|
|
|
601
601
|
r += ` type HTML${F}Element = ${G};
|
|
602
602
|
|
|
603
603
|
`, l += ` "${O}": ${G};
|
|
604
|
-
`, s += `interface Lumina${F} extends ${
|
|
604
|
+
`, s += `interface Lumina${F} extends ${ue}h.JSX.HTMLAttributes<${G}> {
|
|
605
605
|
${te}}
|
|
606
606
|
|
|
607
607
|
`, c += ` "${O}": Lumina${F};
|
|
608
|
-
`, p += `interface Preact${F} extends ${
|
|
608
|
+
`, p += `interface Preact${F} extends ${ue}HTMLAttributes<${G}> {
|
|
609
609
|
${te}}
|
|
610
610
|
|
|
611
611
|
`, d += ` "${O}": Preact${F};
|
|
612
|
-
`, m += `interface React${F} extends ${
|
|
612
|
+
`, m += `interface React${F} extends ${ue}HTMLProps<${G}> {
|
|
613
613
|
${te}}
|
|
614
614
|
|
|
615
615
|
`, f += ` "${O}": React${F};
|
|
616
|
-
`, u += `interface Stencil${F} extends ${
|
|
616
|
+
`, u += `interface Stencil${F} extends ${ue}StencilJsx.HTMLAttributes<${G}> {
|
|
617
617
|
${q}}
|
|
618
618
|
|
|
619
619
|
`, g += ` "${O}": Stencil${F};
|
|
@@ -706,7 +706,7 @@ function vn(e, t) {
|
|
|
706
706
|
` : "";
|
|
707
707
|
return [r.length === 0 ? "" : `${r}, `, l];
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Sa(e, t) {
|
|
710
710
|
const n = t.moduleMap.get("index");
|
|
711
711
|
if (n === void 0)
|
|
712
712
|
e.unshift(gn);
|
|
@@ -794,7 +794,7 @@ browser will load the assets from.`,
|
|
|
794
794
|
{
|
|
795
795
|
name: "URL",
|
|
796
796
|
module: void 0,
|
|
797
|
-
package:
|
|
797
|
+
package: ce,
|
|
798
798
|
viewUrl: "https://developer.mozilla.org/docs/Web/API/URL",
|
|
799
799
|
start: 0,
|
|
800
800
|
end: 3
|
|
@@ -834,8 +834,8 @@ const gn = {
|
|
|
834
834
|
declarations: [si, li],
|
|
835
835
|
exports: void 0
|
|
836
836
|
};
|
|
837
|
-
function
|
|
838
|
-
const n =
|
|
837
|
+
function Ta(e, t) {
|
|
838
|
+
const n = he(e), i = Ee(n), a = ne(e);
|
|
839
839
|
if (a.index.class?.privacy !== void 0)
|
|
840
840
|
return e.declarations.length > 1 && t.emitError(
|
|
841
841
|
`Did not expect to find any public declarations in a module that declares a private web component. Found: ${e.declarations.filter((s) => s !== a.index.class).map((s) => s.name).join(", ")}`,
|
|
@@ -881,20 +881,20 @@ function Sa(e, t) {
|
|
|
881
881
|
return t.isJsApi ? yn(r, e, t) : (t.isComponentProject && (e.exports?.[0].kind === "custom-element-definition" ? r = `/// <reference path="../../index.d.ts" />
|
|
882
882
|
${r}` : e.path === "index" && (r += t.vanillaComponentTypes)), r);
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function Ee(e) {
|
|
885
885
|
return e === void 0 ? "" : `/*${rn(e)}*/
|
|
886
886
|
`;
|
|
887
887
|
}
|
|
888
888
|
function Ot(e) {
|
|
889
|
-
let t =
|
|
889
|
+
let t = he(e), n = "";
|
|
890
890
|
if (e.kind === "class" || e.kind === "mixin")
|
|
891
891
|
n = Nt(e);
|
|
892
892
|
else if (e.kind === "interface") {
|
|
893
|
-
const a =
|
|
893
|
+
const a = me(e);
|
|
894
894
|
if (e.supertypes === void 0 && e.type === void 0 && e.members?.length === 1 && (e.members[0].kind === "call-signature" || e.members[0].kind === "constructor")) {
|
|
895
895
|
const l = e.members[0];
|
|
896
896
|
let s = di(l, !0);
|
|
897
|
-
const c =
|
|
897
|
+
const c = he(l)?.docsTags;
|
|
898
898
|
c !== void 0 && (t = {
|
|
899
899
|
description: t?.description,
|
|
900
900
|
docsTags: [...c, ...t?.docsTags ?? []]
|
|
@@ -930,10 +930,10 @@ function Ot(e) {
|
|
|
930
930
|
const a = ti(e);
|
|
931
931
|
n += Vi(a.isDefaultExported === !0, e.name, e.type.text);
|
|
932
932
|
}
|
|
933
|
-
return `${
|
|
933
|
+
return `${Ee(t)}${n}`;
|
|
934
934
|
}
|
|
935
935
|
function Nt(e) {
|
|
936
|
-
const t =
|
|
936
|
+
const t = me(e), n = t.isDefaultExported === !0, i = mt(e), a = e, r = e;
|
|
937
937
|
let l, s = a.mixins ?? r.supertypes;
|
|
938
938
|
s === void 0 ? a.superclass !== void 0 && (l = Oe(a.superclass)) : a.superclass === void 0 && s.length === 1 ? (l = Oe(s[0]), s = void 0) : l = `${e.name}Superclass`;
|
|
939
939
|
let c = Wi(
|
|
@@ -957,13 +957,13 @@ declare const ${l}:`, a.superclass !== void 0 && (c += ` typeof ${Oe(a.superclas
|
|
|
957
957
|
function mt(e) {
|
|
958
958
|
const t = e.members;
|
|
959
959
|
let n = "";
|
|
960
|
-
const i =
|
|
960
|
+
const i = me(e);
|
|
961
961
|
if (e.kind === "mixin" && (n += `constructor(...args: any[]);
|
|
962
962
|
`), i.eventTypesProperty !== void 0) {
|
|
963
963
|
let l = Tn;
|
|
964
964
|
if (i.eventTypesProperty.description !== void 0 || i.eventTypesProperty.docsTags !== void 0) {
|
|
965
|
-
const c =
|
|
966
|
-
l =
|
|
965
|
+
const c = he(i.eventTypesProperty);
|
|
966
|
+
l = Ee(c);
|
|
967
967
|
}
|
|
968
968
|
const s = wt(i.eventTypesProperty);
|
|
969
969
|
n += `${l}${s}
|
|
@@ -976,12 +976,12 @@ function mt(e) {
|
|
|
976
976
|
const c = t[s];
|
|
977
977
|
if (c.inheritedFrom !== void 0 || c.privacy === "private")
|
|
978
978
|
continue;
|
|
979
|
-
const d =
|
|
980
|
-
n +=
|
|
979
|
+
const d = he(c);
|
|
980
|
+
n += Ee(d), c.kind === "field" ? (r && c.getterType !== void 0 && (l += ` ${ye(!1, !1, !1, !1, !1, c.docsTags?.includes(U.required) !== !0, c.name, c.type.text)}
|
|
981
981
|
`), n += wt(c)) : n += di(c, !1), n += `
|
|
982
982
|
`;
|
|
983
983
|
}
|
|
984
|
-
l !== "" && (n += `${
|
|
984
|
+
l !== "" && (n += `${ye(!1, !1, !1, !1, !1, !1, ri, `{
|
|
985
985
|
${l}}`)}
|
|
986
986
|
`);
|
|
987
987
|
}
|
|
@@ -997,14 +997,14 @@ ${l}}`)}
|
|
|
997
997
|
for (let c = 0; c < a.events.length; ++c) {
|
|
998
998
|
const p = a.events[c];
|
|
999
999
|
if (p.inheritedFrom === void 0) {
|
|
1000
|
-
const d =
|
|
1001
|
-
n += `${
|
|
1000
|
+
const d = he(p);
|
|
1001
|
+
n += `${Ee(d)}${ye(!1, !1, !1, !0, !1, !1, p.name, `import("${Sn}").TargetedEvent<this, ${p.type.text}>`)}
|
|
1002
1002
|
`;
|
|
1003
1003
|
}
|
|
1004
|
-
s += ` ${
|
|
1004
|
+
s += ` ${ye(!1, !1, !1, !1, !1, !1, p.name, `${l}["${p.name}"]["detail"]`)}
|
|
1005
1005
|
`;
|
|
1006
1006
|
}
|
|
1007
|
-
n += `${
|
|
1007
|
+
n += `${ye(!1, !1, !1, !0, !1, !1, "@eventTypes", `{
|
|
1008
1008
|
${s}}`)}
|
|
1009
1009
|
`;
|
|
1010
1010
|
}
|
|
@@ -1028,7 +1028,7 @@ function wt(e) {
|
|
|
1028
1028
|
);
|
|
1029
1029
|
else {
|
|
1030
1030
|
const r = n.dtsTypeOverride ?? e.type.text, l = i ? !1 : r.endsWith(" | undefined"), s = l ? r.slice(0, -12) : r;
|
|
1031
|
-
t +=
|
|
1031
|
+
t += ye(
|
|
1032
1032
|
e.privacy !== void 0,
|
|
1033
1033
|
n.isAbstract === !0,
|
|
1034
1034
|
e.static === !0,
|
|
@@ -1054,7 +1054,7 @@ function di(e, t) {
|
|
|
1054
1054
|
e.return?.type.text
|
|
1055
1055
|
);
|
|
1056
1056
|
}
|
|
1057
|
-
const Tn =
|
|
1057
|
+
const Tn = Ee({
|
|
1058
1058
|
description: void 0,
|
|
1059
1059
|
docsTags: [
|
|
1060
1060
|
{
|
|
@@ -1064,7 +1064,7 @@ Use EventNames and EventTypes helpers from @arcgis/core/Evented`
|
|
|
1064
1064
|
}
|
|
1065
1065
|
]
|
|
1066
1066
|
});
|
|
1067
|
-
function
|
|
1067
|
+
function ha() {
|
|
1068
1068
|
const e = Date.now();
|
|
1069
1069
|
return () => (Date.now() - e) / hn;
|
|
1070
1070
|
}
|
|
@@ -1121,7 +1121,7 @@ function ut(e, t) {
|
|
|
1121
1121
|
return a === "" ? i : `${a}/${i}`;
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1124
|
+
function ve(e, t) {
|
|
1125
1125
|
let n = 0;
|
|
1126
1126
|
for (; ; ) {
|
|
1127
1127
|
const a = e.indexOf("/", n) + 1;
|
|
@@ -1256,7 +1256,7 @@ function qe(e, t, n, i, a) {
|
|
|
1256
1256
|
}), {
|
|
1257
1257
|
name: p,
|
|
1258
1258
|
module: void 0,
|
|
1259
|
-
package:
|
|
1259
|
+
package: ce,
|
|
1260
1260
|
viewUrl: void 0,
|
|
1261
1261
|
start: i,
|
|
1262
1262
|
end: a
|
|
@@ -1283,14 +1283,14 @@ function qe(e, t, n, i, a) {
|
|
|
1283
1283
|
if (v === void 0) {
|
|
1284
1284
|
for (let R = d.parent; R !== void 0; R = R.parent)
|
|
1285
1285
|
if (o.isModuleDeclaration(R) && o.isIdentifier(R.name)) {
|
|
1286
|
-
P = R.name.escapedText, v = ft[P]?.[1]?.[p], h = `${P}.${p}`,
|
|
1286
|
+
P = R.name.escapedText, v = ft[P]?.[1]?.[p], h = `${P}.${p}`, Me(t, h);
|
|
1287
1287
|
break;
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
return {
|
|
1291
1291
|
name: h,
|
|
1292
1292
|
module: void 0,
|
|
1293
|
-
package:
|
|
1293
|
+
package: ce,
|
|
1294
1294
|
viewUrl: v?.[0]?.startsWith("https") === !1 ? `${yt}${v[0]}` : v?.[0] ?? void 0,
|
|
1295
1295
|
start: i,
|
|
1296
1296
|
end: i + h.length
|
|
@@ -1328,7 +1328,7 @@ function qe(e, t, n, i, a) {
|
|
|
1328
1328
|
i,
|
|
1329
1329
|
i + P.escapedName.length
|
|
1330
1330
|
);
|
|
1331
|
-
return
|
|
1331
|
+
return Me(t, c), Me(t, `${h.name}["@eventTypes"]`), h;
|
|
1332
1332
|
}
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
@@ -1343,7 +1343,7 @@ function qe(e, t, n, i, a) {
|
|
|
1343
1343
|
if (y ? I.wasUsed = !0 : R = n.moduleContext.importsMap[h] !== void 0, R)
|
|
1344
1344
|
continue;
|
|
1345
1345
|
const k = h !== c;
|
|
1346
|
-
k && (
|
|
1346
|
+
k && (Me(t, h), a = i + h.length);
|
|
1347
1347
|
const M = Kn(l), L = M === "named";
|
|
1348
1348
|
L || (g = M), f === void 0 && !n.config.strict && Je(
|
|
1349
1349
|
u,
|
|
@@ -1353,7 +1353,7 @@ function qe(e, t, n, i, a) {
|
|
|
1353
1353
|
), y || (n.moduleContext.importsMap[h] = {
|
|
1354
1354
|
type: M,
|
|
1355
1355
|
modulePath: f === void 0 ? u : void 0,
|
|
1356
|
-
specifier: f === void 0 ?
|
|
1356
|
+
specifier: f === void 0 ? ve(ne(n.apiModule).dtsPath, u) : f + (u === void 0 ? "" : `/${u}`),
|
|
1357
1357
|
replacementName: void 0,
|
|
1358
1358
|
actualName: L && k ? s : void 0,
|
|
1359
1359
|
wasUsed: !0
|
|
@@ -1432,7 +1432,7 @@ function Un(e, t, n) {
|
|
|
1432
1432
|
node: void 0
|
|
1433
1433
|
}
|
|
1434
1434
|
), {
|
|
1435
|
-
packageName:
|
|
1435
|
+
packageName: ce,
|
|
1436
1436
|
modulePath: void 0
|
|
1437
1437
|
};
|
|
1438
1438
|
}
|
|
@@ -1555,7 +1555,7 @@ function H(e, t, n, i) {
|
|
|
1555
1555
|
if (o.isStringLiteral(e) || o.isNoSubstitutionTemplateLiteral(e))
|
|
1556
1556
|
return t === w.false ? o.factory.createKeywordTypeNode(o.SyntaxKind.StringKeyword) : o.factory.createLiteralTypeNode(e);
|
|
1557
1557
|
if (o.isTemplateExpression(e))
|
|
1558
|
-
return
|
|
1558
|
+
return Te(n, t, i) ?? o.factory.createKeywordTypeNode(o.SyntaxKind.StringKeyword);
|
|
1559
1559
|
if (o.isNumericLiteral(e))
|
|
1560
1560
|
return t === w.false ? o.factory.createKeywordTypeNode(o.SyntaxKind.NumberKeyword) : o.factory.createLiteralTypeNode(e);
|
|
1561
1561
|
if (o.isBigIntLiteral(e))
|
|
@@ -1590,14 +1590,14 @@ function H(e, t, n, i) {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
if (o.isPrefixUnaryExpression(e)) {
|
|
1592
1592
|
if (e.operator !== o.SyntaxKind.MinusToken)
|
|
1593
|
-
return
|
|
1593
|
+
return be(n, Q, t, i);
|
|
1594
1594
|
if (t === w.false)
|
|
1595
1595
|
return o.factory.createKeywordTypeNode(o.SyntaxKind.NumberKeyword);
|
|
1596
1596
|
{
|
|
1597
1597
|
const a = H(e.operand, t, n, i);
|
|
1598
1598
|
return o.isLiteralTypeNode(a) ? o.factory.createLiteralTypeNode(
|
|
1599
1599
|
o.factory.createPrefixUnaryExpression(o.SyntaxKind.MinusToken, a.literal)
|
|
1600
|
-
) :
|
|
1600
|
+
) : be(n, Q, t, i);
|
|
1601
1601
|
}
|
|
1602
1602
|
}
|
|
1603
1603
|
if (o.isParenthesizedExpression(e))
|
|
@@ -1634,13 +1634,13 @@ function H(e, t, n, i) {
|
|
|
1634
1634
|
H(e.whenFalse, t, { ...n, node: e.whenFalse }, i)
|
|
1635
1635
|
]);
|
|
1636
1636
|
if (o.isIdentifier(e))
|
|
1637
|
-
return
|
|
1637
|
+
return Te(n, t, i) ?? o.factory.createTypeQueryNode(e);
|
|
1638
1638
|
if (o.isPropertyAccessExpression(e) && o.isIdentifier(e.name)) {
|
|
1639
|
-
const a =
|
|
1639
|
+
const a = Te(n, t, i);
|
|
1640
1640
|
if (a !== void 0)
|
|
1641
1641
|
return a;
|
|
1642
1642
|
const r = H(e.expression, t, n, i);
|
|
1643
|
-
return o.isTypeQueryNode(r) ? o.factory.createTypeQueryNode(o.factory.createQualifiedName(r.exprName, e.name)) : r === gt ? gt :
|
|
1643
|
+
return o.isTypeQueryNode(r) ? o.factory.createTypeQueryNode(o.factory.createQualifiedName(r.exprName, e.name)) : r === gt ? gt : be(n, Q, t, i);
|
|
1644
1644
|
}
|
|
1645
1645
|
if (o.isCallExpression(e)) {
|
|
1646
1646
|
const a = e.expression, r = e.arguments.at(0);
|
|
@@ -1648,13 +1648,13 @@ function H(e, t, n, i) {
|
|
|
1648
1648
|
return o.factory.createTypeReferenceNode(a.expression, [
|
|
1649
1649
|
o.factory.createTypeReferenceNode(r)
|
|
1650
1650
|
]);
|
|
1651
|
-
const l =
|
|
1651
|
+
const l = Te(n, t, i);
|
|
1652
1652
|
if (l !== void 0)
|
|
1653
1653
|
return l;
|
|
1654
1654
|
const s = H(a, t, n, i);
|
|
1655
1655
|
return o.isTypeQueryNode(s) ? o.factory.createTypeReferenceNode(o.factory.createIdentifier("ReturnType"), [
|
|
1656
1656
|
o.factory.createTypeQueryNode(s.exprName, e.typeArguments)
|
|
1657
|
-
]) :
|
|
1657
|
+
]) : be(n, Q, t, i);
|
|
1658
1658
|
}
|
|
1659
1659
|
if (o.isArrowFunction(e)) {
|
|
1660
1660
|
if (i.isInLuminaMinimalExtraction)
|
|
@@ -1666,7 +1666,7 @@ function H(e, t, n, i) {
|
|
|
1666
1666
|
e.type ?? (o.isBlock(e.body) ? Qe(e, i) ?? X(n, Q, i) : H(e.body, a, n, i))
|
|
1667
1667
|
);
|
|
1668
1668
|
}
|
|
1669
|
-
return
|
|
1669
|
+
return be(n, Q, t, i);
|
|
1670
1670
|
}
|
|
1671
1671
|
function $n(e, t, n, i) {
|
|
1672
1672
|
const a = t === w.false ? void 0 : Xn;
|
|
@@ -1679,7 +1679,7 @@ function $n(e, t, n, i) {
|
|
|
1679
1679
|
a,
|
|
1680
1680
|
e.name,
|
|
1681
1681
|
void 0,
|
|
1682
|
-
|
|
1682
|
+
Te(n, t, i) ?? o.factory.createTypeQueryNode(o.factory.createIdentifier(e.name.escapedText))
|
|
1683
1683
|
) : o.isSpreadAssignment(e) ? o.factory.createPropertySignature(
|
|
1684
1684
|
a,
|
|
1685
1685
|
"_spread",
|
|
@@ -1708,10 +1708,10 @@ function $n(e, t, n, i) {
|
|
|
1708
1708
|
void 0
|
|
1709
1709
|
);
|
|
1710
1710
|
}
|
|
1711
|
-
function
|
|
1712
|
-
return
|
|
1711
|
+
function be(e, t, n, i) {
|
|
1712
|
+
return Te(e, n, i) ?? X(e, t, i);
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1714
|
+
function Te(e, t, n) {
|
|
1715
1715
|
const i = n.program?.getTypeChecker?.();
|
|
1716
1716
|
if (i !== void 0 && e.node !== void 0) {
|
|
1717
1717
|
let a;
|
|
@@ -1817,13 +1817,13 @@ function z(e, t) {
|
|
|
1817
1817
|
};
|
|
1818
1818
|
}
|
|
1819
1819
|
let b;
|
|
1820
|
-
const
|
|
1820
|
+
const ge = (e, t, n) => {
|
|
1821
1821
|
switch (t.kind) {
|
|
1822
1822
|
case o.SyntaxKind.TypeReference:
|
|
1823
1823
|
const i = t, a = i.typeName;
|
|
1824
1824
|
switch (a.escapedText) {
|
|
1825
1825
|
case "nil":
|
|
1826
|
-
return
|
|
1826
|
+
return ge(e, io, n);
|
|
1827
1827
|
// Used in public typings in 88 files
|
|
1828
1828
|
// REFACTOR: consider refactoring out Const usages in public API to
|
|
1829
1829
|
// reduce divergence
|
|
@@ -1831,20 +1831,20 @@ const ve = (e, t, n) => {
|
|
|
1831
1831
|
// In public types, Lumina's "component" and "el" have the same type
|
|
1832
1832
|
// eslint-disable-next-line no-fallthrough
|
|
1833
1833
|
case "ToElement":
|
|
1834
|
-
return
|
|
1834
|
+
return ge(e, i.typeArguments[0], n);
|
|
1835
1835
|
/**
|
|
1836
1836
|
* @see https://webgis.esri.com/references/api-extractor/advanced-patterns#publicprivate-type-divergence
|
|
1837
1837
|
*/
|
|
1838
1838
|
case "PublicApiNarrowType":
|
|
1839
1839
|
case "PublicApiRelaxType":
|
|
1840
|
-
return
|
|
1840
|
+
return ge(e, i.typeArguments[1], n);
|
|
1841
1841
|
}
|
|
1842
1842
|
Ke(a);
|
|
1843
1843
|
break;
|
|
1844
1844
|
case o.SyntaxKind.TypeQuery:
|
|
1845
1845
|
const l = Yn(t, b);
|
|
1846
1846
|
if (l !== void 0)
|
|
1847
|
-
return
|
|
1847
|
+
return ge(e, l, n);
|
|
1848
1848
|
Ke(t.exprName, no);
|
|
1849
1849
|
break;
|
|
1850
1850
|
case o.SyntaxKind.PropertyAccessExpression:
|
|
@@ -1866,7 +1866,7 @@ const ve = (e, t, n) => {
|
|
|
1866
1866
|
// Thus print ArcgisHome["el"] as just ArcgisHome
|
|
1867
1867
|
b.isComponentProject && d.indexType.kind === o.SyntaxKind.LiteralType && d.indexType.literal.text === "el"
|
|
1868
1868
|
)
|
|
1869
|
-
return
|
|
1869
|
+
return ge(e, d.objectType, n);
|
|
1870
1870
|
break;
|
|
1871
1871
|
case o.SyntaxKind.ImportType:
|
|
1872
1872
|
b.emitError(
|
|
@@ -1879,7 +1879,7 @@ const ve = (e, t, n) => {
|
|
|
1879
1879
|
}, to = an(
|
|
1880
1880
|
{},
|
|
1881
1881
|
{
|
|
1882
|
-
onEmitNode:
|
|
1882
|
+
onEmitNode: ge
|
|
1883
1883
|
}
|
|
1884
1884
|
), io = o.factory.createIdentifier("null | undefined"), Be = on.createTextWriter(`
|
|
1885
1885
|
`), no = 7, Xe = /* @__PURE__ */ new Set();
|
|
@@ -1964,7 +1964,7 @@ function Ke(e, t = 0) {
|
|
|
1964
1964
|
if (d !== void 0) {
|
|
1965
1965
|
d.wasUsed = !0;
|
|
1966
1966
|
const g = d.type === "named";
|
|
1967
|
-
d.replacementName !== void 0 && (
|
|
1967
|
+
d.replacementName !== void 0 && (Me(a, d.replacementName), s = l + d.replacementName.length), d.replacementName !== void 0 && (b.functionLikeTypeParameters?.has(d.replacementName) === !0 || b.objectLikeTypeParameters?.has(d.replacementName) === !0) && b.emitError(
|
|
1968
1968
|
`Can't do a type replacement of ${ie("green", r)} to ${ie("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.`,
|
|
1969
1969
|
{ file: b.file, node: e }
|
|
1970
1970
|
);
|
|
@@ -2002,7 +2002,7 @@ function Ke(e, t = 0) {
|
|
|
2002
2002
|
$.push({
|
|
2003
2003
|
name: r,
|
|
2004
2004
|
module: void 0,
|
|
2005
|
-
package:
|
|
2005
|
+
package: ce,
|
|
2006
2006
|
viewUrl: m[0]?.startsWith("https") === !1 ? `${yt}${m[0]}` : m[0] ?? void 0,
|
|
2007
2007
|
start: l,
|
|
2008
2008
|
end: s
|
|
@@ -2022,7 +2022,7 @@ function Ke(e, t = 0) {
|
|
|
2022
2022
|
$.push({
|
|
2023
2023
|
name: P.escapedText,
|
|
2024
2024
|
module: void 0,
|
|
2025
|
-
package:
|
|
2025
|
+
package: ce,
|
|
2026
2026
|
viewUrl: g[0]?.startsWith("https") === !1 ? `${yt}${g[0]}` : g[0] ?? void 0,
|
|
2027
2027
|
start: v,
|
|
2028
2028
|
end: h
|
|
@@ -2044,7 +2044,7 @@ function Ke(e, t = 0) {
|
|
|
2044
2044
|
{ file: b.file, node: e }
|
|
2045
2045
|
);
|
|
2046
2046
|
}
|
|
2047
|
-
function
|
|
2047
|
+
function Me(e, t) {
|
|
2048
2048
|
const n = e.escapedText;
|
|
2049
2049
|
Ye = e, Tt = t, yi(), Tt = n;
|
|
2050
2050
|
}
|
|
@@ -2085,7 +2085,7 @@ function ot(e, t, n) {
|
|
|
2085
2085
|
return i;
|
|
2086
2086
|
}
|
|
2087
2087
|
const oo = /* @__PURE__ */ new Set(), ao = /* @__PURE__ */ new Set();
|
|
2088
|
-
function
|
|
2088
|
+
function Ce(e, t, n) {
|
|
2089
2089
|
if (!o.isIdentifier(e) && !o.isQualifiedName(e) && !o.isPropertyAccessExpression(e))
|
|
2090
2090
|
return n.emitError(
|
|
2091
2091
|
"Expected the type nodes in the extends clause to be Identifier, QualifiedName or PropertyAccessExpression.",
|
|
@@ -2143,7 +2143,7 @@ const vi = { text: "unknown", references: void 0, values: void 0, source: void 0
|
|
|
2143
2143
|
{
|
|
2144
2144
|
name: "Record",
|
|
2145
2145
|
module: void 0,
|
|
2146
|
-
package:
|
|
2146
|
+
package: ce,
|
|
2147
2147
|
viewUrl: "https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type",
|
|
2148
2148
|
start: 0,
|
|
2149
2149
|
end: 6
|
|
@@ -2177,7 +2177,10 @@ console.log("${e.tagName} is ready to go!");
|
|
|
2177
2177
|
typeParameters: void 0,
|
|
2178
2178
|
parameters: void 0,
|
|
2179
2179
|
return: mo,
|
|
2180
|
-
inheritedFrom
|
|
2180
|
+
// Must include .inheritedFrom for this member so that it is excluded from
|
|
2181
|
+
// .d.ts printing (TypeScript inherits it from PublicLitElement) and from
|
|
2182
|
+
// the docs search index.
|
|
2183
|
+
inheritedFrom: uo,
|
|
2181
2184
|
signature: "(): Promise<this>",
|
|
2182
2185
|
privacy: void 0,
|
|
2183
2186
|
source: void 0
|
|
@@ -2222,8 +2225,13 @@ const po = tt(), mo = {
|
|
|
2222
2225
|
values: void 0,
|
|
2223
2226
|
source: void 0
|
|
2224
2227
|
}
|
|
2225
|
-
}, uo =
|
|
2226
|
-
|
|
2228
|
+
}, uo = {
|
|
2229
|
+
name: "this",
|
|
2230
|
+
module: void 0,
|
|
2231
|
+
package: void 0,
|
|
2232
|
+
viewUrl: void 0
|
|
2233
|
+
}, fo = de, yo = de, vo = de, go = de, So = de, To = de, ho = de, gi = de;
|
|
2234
|
+
function de(e, t, n, i, a) {
|
|
2227
2235
|
if (i.docsTags === void 0 || n === void 0)
|
|
2228
2236
|
return;
|
|
2229
2237
|
const r = i.docsTags.indexOf(U.copyDoc);
|
|
@@ -2252,7 +2260,7 @@ function bt(e, t, n) {
|
|
|
2252
2260
|
}
|
|
2253
2261
|
});
|
|
2254
2262
|
}
|
|
2255
|
-
const
|
|
2263
|
+
const Eo = ke, lt = ke, Co = ke, Ht = ke, $t = ke;
|
|
2256
2264
|
function ke(e, t, n, i) {
|
|
2257
2265
|
if (t === void 0) {
|
|
2258
2266
|
i.emitError("Computed function/method names are not yet supported.", {
|
|
@@ -2261,7 +2269,7 @@ function ke(e, t, n, i) {
|
|
|
2261
2269
|
});
|
|
2262
2270
|
return;
|
|
2263
2271
|
}
|
|
2264
|
-
const a = n ?? e, r = n !== void 0 && !o.isVariableStatement(n), l = o.isMethodDeclaration(e), s = o.isMethodSignature(e), c = l || s || r, p = n !== void 0 && o.isVariableStatement(n), m = o.isFunctionDeclaration(e) || p, f = !r && !p && o.isFunctionTypeNode(e) || o.isCallSignatureDeclaration(e), u = o.isConstructorDeclaration(e), g = u || o.isConstructSignatureDeclaration(e) || o.isConstructorTypeNode(e), C = i.isInLuminaMinimalExtraction || i.jsDoc ===
|
|
2272
|
+
const a = n ?? e, r = n !== void 0 && !o.isVariableStatement(n), l = o.isMethodDeclaration(e), s = o.isMethodSignature(e), c = l || s || r, p = n !== void 0 && o.isVariableStatement(n), m = o.isFunctionDeclaration(e) || p, f = !r && !p && o.isFunctionTypeNode(e) || o.isCallSignatureDeclaration(e), u = o.isConstructorDeclaration(e), g = u || o.isConstructSignatureDeclaration(e) || o.isConstructorTypeNode(e), C = i.isInLuminaMinimalExtraction || i.jsDoc === Pe, v = tt();
|
|
2265
2273
|
let P, h, R = !1, I = !1;
|
|
2266
2274
|
if (!m && a.modifiers !== void 0)
|
|
2267
2275
|
for (let E = 0; E < a.modifiers.length; ++E)
|
|
@@ -2321,7 +2329,7 @@ function ke(e, t, n, i) {
|
|
|
2321
2329
|
if (q === void 0)
|
|
2322
2330
|
continue;
|
|
2323
2331
|
i.apiObject.members.push(q);
|
|
2324
|
-
const
|
|
2332
|
+
const pe = {
|
|
2325
2333
|
name: A,
|
|
2326
2334
|
deprecated: void 0,
|
|
2327
2335
|
summary: void 0,
|
|
@@ -2332,7 +2340,7 @@ function ke(e, t, n, i) {
|
|
|
2332
2340
|
type: q.type,
|
|
2333
2341
|
default: q.default
|
|
2334
2342
|
};
|
|
2335
|
-
|
|
2343
|
+
pe.optional = zt(S, pe), y.parameters.push(pe);
|
|
2336
2344
|
continue;
|
|
2337
2345
|
}
|
|
2338
2346
|
let G = M[E + _]?.text, O, F;
|
|
@@ -2359,11 +2367,11 @@ function ke(e, t, n, i) {
|
|
|
2359
2367
|
} else
|
|
2360
2368
|
O = A.startsWith("_") ? A.slice(1) : A;
|
|
2361
2369
|
}
|
|
2362
|
-
const
|
|
2370
|
+
const ue = S.type ?? (S.initializer === void 0 ? X(
|
|
2363
2371
|
{ file: i.file, node: S },
|
|
2364
2372
|
`Public parameter ${O} must have a type annotation or a default value`,
|
|
2365
2373
|
i
|
|
2366
|
-
) : Ct(S.initializer, w.false, i.file, i)), Ge = z(
|
|
2374
|
+
) : Ct(S.initializer, w.false, i.file, i)), Ge = z(ue, i), te = {
|
|
2367
2375
|
name: O,
|
|
2368
2376
|
deprecated: void 0,
|
|
2369
2377
|
summary: void 0,
|
|
@@ -2396,13 +2404,13 @@ function ke(e, t, n, i) {
|
|
|
2396
2404
|
return m && (K ? bt(y, !0, i) : N === 0 && i.config.strict && i.emitError("Expected @public function to be exported using named or default export.", {
|
|
2397
2405
|
file: i.file,
|
|
2398
2406
|
node: e
|
|
2399
|
-
})), i.produceDts && (c || g || f ? (R && (v.isAbstract = !0), v.hasQuestionToken = a.questionToken !== void 0 ? !0 : void 0) : v.isDefaultExported = K || void 0), c ?
|
|
2407
|
+
})), i.produceDts && (c || g || f ? (R && (v.isAbstract = !0), v.hasQuestionToken = a.questionToken !== void 0 ? !0 : void 0) : v.isDefaultExported = K || void 0), c ? yo(
|
|
2400
2408
|
i,
|
|
2401
2409
|
n ?? e,
|
|
2402
2410
|
i.config.documentation.copyDocDefinitions.methods,
|
|
2403
2411
|
y,
|
|
2404
2412
|
i.apiObject
|
|
2405
|
-
) : m &&
|
|
2413
|
+
) : m && go(
|
|
2406
2414
|
i,
|
|
2407
2415
|
n ?? e,
|
|
2408
2416
|
i.config.documentation.copyDocDefinitions.functions,
|
|
@@ -2415,10 +2423,10 @@ const zt = (e, t) => (
|
|
|
2415
2423
|
e.questionToken !== void 0 || // If had default value internally, but not publicly, add ?
|
|
2416
2424
|
e.initializer !== void 0 && t.default === void 0 ? !0 : void 0
|
|
2417
2425
|
);
|
|
2418
|
-
function
|
|
2419
|
-
return ht(),
|
|
2426
|
+
function Po(e, t, n) {
|
|
2427
|
+
return ht(), De(e, t), Mt && t !== void 0 && n !== void 0 && (ht(), Dt(t.getTypeAtLocation(n))), Si();
|
|
2420
2428
|
}
|
|
2421
|
-
function
|
|
2429
|
+
function bo(e) {
|
|
2422
2430
|
return ht(), Dt(e), Si();
|
|
2423
2431
|
}
|
|
2424
2432
|
let Ie = !1, ae = !1, re = !1, Ae = !1, se = !1, Mt = !1;
|
|
@@ -2433,15 +2441,15 @@ function Si() {
|
|
|
2433
2441
|
if (le.length > 0)
|
|
2434
2442
|
for (let t = 0; t < le.length; ++t)
|
|
2435
2443
|
e.push({ type: "string", value: le[t] });
|
|
2436
|
-
else re && e.push(
|
|
2444
|
+
else re && e.push(Mo);
|
|
2437
2445
|
if (ee.length > 0)
|
|
2438
2446
|
for (let t = 0; t < ee.length; ++t)
|
|
2439
2447
|
e.push({ type: "number", value: ee[t] });
|
|
2440
|
-
else se && e.push(
|
|
2441
|
-
return Ae && e.push(
|
|
2448
|
+
else se && e.push(Do);
|
|
2449
|
+
return Ae && e.push(xo), Ie ? e.push(Ro) : ae && e.push(Lo), e;
|
|
2442
2450
|
}
|
|
2443
|
-
const
|
|
2444
|
-
function
|
|
2451
|
+
const Mo = { type: "string", value: void 0 }, Do = { type: "number", value: void 0 }, xo = { type: "boolean", value: void 0 }, Ro = { type: "any", value: void 0 }, Lo = { type: "object", value: void 0 };
|
|
2452
|
+
function De(e, t) {
|
|
2445
2453
|
switch (e.kind) {
|
|
2446
2454
|
case o.SyntaxKind.BooleanKeyword:
|
|
2447
2455
|
case o.SyntaxKind.TrueKeyword:
|
|
@@ -2459,7 +2467,7 @@ function Me(e, t) {
|
|
|
2459
2467
|
Ie = !0;
|
|
2460
2468
|
return;
|
|
2461
2469
|
case o.SyntaxKind.LiteralType:
|
|
2462
|
-
|
|
2470
|
+
De(e.literal, t);
|
|
2463
2471
|
return;
|
|
2464
2472
|
case o.SyntaxKind.StringLiteral:
|
|
2465
2473
|
case o.SyntaxKind.NoSubstitutionTemplateLiteral:
|
|
@@ -2479,11 +2487,11 @@ function Me(e, t) {
|
|
|
2479
2487
|
case o.SyntaxKind.UnionType:
|
|
2480
2488
|
const i = e.types, a = Math.min(i.length, Ze);
|
|
2481
2489
|
for (let l = 0; l < a; ++l)
|
|
2482
|
-
|
|
2490
|
+
De(i[l], t);
|
|
2483
2491
|
i.length > Ze && (le.length = 0, ee.length = 0);
|
|
2484
2492
|
return;
|
|
2485
2493
|
case o.SyntaxKind.ParenthesizedType:
|
|
2486
|
-
|
|
2494
|
+
De(e.type, t);
|
|
2487
2495
|
return;
|
|
2488
2496
|
case o.SyntaxKind.TypeQuery:
|
|
2489
2497
|
case o.SyntaxKind.IndexedAccessType:
|
|
@@ -2497,7 +2505,7 @@ function Me(e, t) {
|
|
|
2497
2505
|
return;
|
|
2498
2506
|
case o.SyntaxKind.TypeOperator:
|
|
2499
2507
|
const r = e;
|
|
2500
|
-
r.operator === o.SyntaxKind.KeyOfKeyword ? re = !0 : r.operator === o.SyntaxKind.ReadonlyKeyword ?
|
|
2508
|
+
r.operator === o.SyntaxKind.KeyOfKeyword ? re = !0 : r.operator === o.SyntaxKind.ReadonlyKeyword ? De(r.type, t) : ae = !0;
|
|
2501
2509
|
return;
|
|
2502
2510
|
/*case ts.SyntaxKind.UnknownKeyword:
|
|
2503
2511
|
case ts.SyntaxKind.FunctionType:
|
|
@@ -2534,10 +2542,10 @@ function jt(e) {
|
|
|
2534
2542
|
}
|
|
2535
2543
|
Ie = !0, n = !0;
|
|
2536
2544
|
}
|
|
2537
|
-
t &
|
|
2545
|
+
t & Io || n || (ae = !0);
|
|
2538
2546
|
}
|
|
2539
|
-
const
|
|
2540
|
-
function
|
|
2547
|
+
const Io = o.TypeFlags.Null | o.TypeFlags.VoidLike, Ea = (e) => e.map(Ao).join(" | "), Ao = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
|
|
2548
|
+
function ko(e, t, n) {
|
|
2541
2549
|
let i;
|
|
2542
2550
|
const a = e.initializer;
|
|
2543
2551
|
let r;
|
|
@@ -2586,7 +2594,7 @@ function Ao(e, t, n) {
|
|
|
2586
2594
|
cancelable: void 0,
|
|
2587
2595
|
composed: void 0
|
|
2588
2596
|
};
|
|
2589
|
-
return fn(l, n.jsDoc), r !== void 0 &&
|
|
2597
|
+
return fn(l, n.jsDoc), r !== void 0 && Go(e, r, l, n), vo(
|
|
2590
2598
|
n,
|
|
2591
2599
|
e,
|
|
2592
2600
|
n.config.documentation.copyDocDefinitions.events,
|
|
@@ -2595,7 +2603,7 @@ function Ao(e, t, n) {
|
|
|
2595
2603
|
), l;
|
|
2596
2604
|
}
|
|
2597
2605
|
const He = "createEvent";
|
|
2598
|
-
function
|
|
2606
|
+
function Go(e, t, n, i) {
|
|
2599
2607
|
if (t !== void 0) {
|
|
2600
2608
|
if (!o.isObjectLiteralExpression(t)) {
|
|
2601
2609
|
i.emitError(`Expected object literal expression as first argument of ${He}().`, {
|
|
@@ -2636,7 +2644,7 @@ function Ti(e, t, n, i) {
|
|
|
2636
2644
|
i.emitError("Computed property names are not yet supported", { file: i.file, node: e });
|
|
2637
2645
|
return;
|
|
2638
2646
|
}
|
|
2639
|
-
const a = e, r =
|
|
2647
|
+
const a = e, r = xe(a.modifiers, "property") ?? (i.pairedSetter === void 0 ? void 0 : xe(i.pairedSetter.modifiers, "property")), l = r?.arguments[0], s = l !== void 0 && o.isObjectLiteralExpression(l) ? l.properties : void 0, c = o.isPropertyDeclaration(e) || o.isPropertySignature(e), p = o.isGetAccessor(e), d = Oi(), m = i.isInLuminaMinimalExtraction || i.jsDoc === Pe;
|
|
2640
2648
|
let f = !1, u = !1, g, C = !1, v, P, h;
|
|
2641
2649
|
if (c && e.modifiers !== void 0)
|
|
2642
2650
|
for (let E = 0; E < e.modifiers.length; ++E)
|
|
@@ -2669,7 +2677,7 @@ function Ti(e, t, n, i) {
|
|
|
2669
2677
|
continue;
|
|
2670
2678
|
}
|
|
2671
2679
|
const x = S.name.escapedText;
|
|
2672
|
-
x === "readOnly" && Y(S.initializer, i) ? n = !0 : x === "constructOnly" && Y(S.initializer, i) ? d.isConstructorOnly = !0 : x === "type" ? d.hasAutoCasting = !0 : x === "types" &&
|
|
2680
|
+
x === "readOnly" && Y(S.initializer, i) ? n = !0 : x === "constructOnly" && Y(S.initializer, i) ? d.isConstructorOnly = !0 : x === "type" ? d.hasAutoCasting = !0 : x === "types" && Fo(
|
|
2673
2681
|
d,
|
|
2674
2682
|
S.initializer?.kind === o.SyntaxKind.ObjectLiteralExpression ? S.initializer : void 0
|
|
2675
2683
|
);
|
|
@@ -2682,7 +2690,7 @@ function Ti(e, t, n, i) {
|
|
|
2682
2690
|
if (m)
|
|
2683
2691
|
return;
|
|
2684
2692
|
{
|
|
2685
|
-
const S = c && !v ?
|
|
2693
|
+
const S = c && !v ? ko(e, t, i) : void 0;
|
|
2686
2694
|
if (S !== void 0) {
|
|
2687
2695
|
E.events ??= [], E.events.push(S);
|
|
2688
2696
|
return;
|
|
@@ -2767,7 +2775,7 @@ function Ti(e, t, n, i) {
|
|
|
2767
2775
|
if (N) {
|
|
2768
2776
|
!n && T.readonly === !0 && (T.docsOnlyReadonly = !0);
|
|
2769
2777
|
const E = i.program?.getTypeChecker?.();
|
|
2770
|
-
T.type.values = E !== void 0 && D.pos === -1 && (D.kind === o.SyntaxKind.TypeQuery || D.kind === o.SyntaxKind.IndexedAccessType || D.kind === o.SyntaxKind.ImportType || D.kind === o.SyntaxKind.TypeReference) ?
|
|
2778
|
+
T.type.values = E !== void 0 && D.pos === -1 && (D.kind === o.SyntaxKind.TypeQuery || D.kind === o.SyntaxKind.IndexedAccessType || D.kind === o.SyntaxKind.ImportType || D.kind === o.SyntaxKind.TypeReference) ? bo(E.getTypeAtLocation(y?.parameters[0] ?? e)) : Po(D, E, y?.parameters[0] ?? e), (P === void 0 && T.type.values === void 0 && !i.config.context.isLuminaMinimalExtraction || T.readonly && !T.reflects) && (T.attribute = void 0);
|
|
2771
2779
|
const S = E !== void 0 && o.isPropertyDeclaration(e) && // BUG: should not check node.type here? but do check in property.getterType below
|
|
2772
2780
|
e.type !== void 0 && e.initializer !== void 0 && o.isPropertyAccessExpression(e.initializer) && o.isPropertyAccessExpression(e.initializer.expression) && e.initializer.expression.expression.kind === o.SyntaxKind.ThisKeyword && o.isIdentifier(e.initializer.expression.name) && o.isIdentifier(e.initializer.name);
|
|
2773
2781
|
if (("initializer" in e && e.initializer !== void 0 && (!T.default || !T.description) || S) && !m) {
|
|
@@ -2807,7 +2815,7 @@ function Ti(e, t, n, i) {
|
|
|
2807
2815
|
`${ki}Boolean properties should default to "false". Found default value "true" in ${i.apiObject.name}.${T.name}. See https://webgis.esri.com/references/lumina/properties#boolean-properties`
|
|
2808
2816
|
), i.loggedBooleanWarning = !0));
|
|
2809
2817
|
}
|
|
2810
|
-
return
|
|
2818
|
+
return fo(
|
|
2811
2819
|
i,
|
|
2812
2820
|
e,
|
|
2813
2821
|
i.config.documentation.copyDocDefinitions?.properties,
|
|
@@ -2835,7 +2843,7 @@ function qt(e, t) {
|
|
|
2835
2843
|
}
|
|
2836
2844
|
}
|
|
2837
2845
|
}
|
|
2838
|
-
function
|
|
2846
|
+
function Fo(e, t) {
|
|
2839
2847
|
if (e.hasAutoCasting = !0, e.autoCastingRequiresType = !0, t !== void 0)
|
|
2840
2848
|
for (let n = 0; n < t.properties.length; ++n) {
|
|
2841
2849
|
const i = t.properties[n];
|
|
@@ -2852,7 +2860,7 @@ function et(e, t) {
|
|
|
2852
2860
|
const a = n ? t.componentTagName : void 0, r = !n && mi(i, t);
|
|
2853
2861
|
let l = e.heritageClauses === void 0 || r ? void 0 : e.heritageClauses[0]?.token === o.SyntaxKind.ExtendsKeyword ? e.heritageClauses[0] : e.heritageClauses[1]?.token === o.SyntaxKind.ExtendsKeyword ? e.heritageClauses[1] : void 0;
|
|
2854
2862
|
if (t.config.context.supportApplyMixinsSyntax && !n && l?.types.length === 1 && o.isExpressionWithTypeArguments(l.types[0]) && l.types[0].expression.escapedText === "MixinInstances" && l.types[0].typeArguments?.length === 1) {
|
|
2855
|
-
|
|
2863
|
+
No(i, l.types[0].typeArguments[0], t);
|
|
2856
2864
|
return;
|
|
2857
2865
|
}
|
|
2858
2866
|
const s = n && t.mixinName !== void 0 && l !== void 0 && o.isExpressionWithTypeArguments(l.types[0]) && o.isIdentifier(l.types[0].expression) && l.types[0].expression.escapedText === "TypedBase";
|
|
@@ -2907,15 +2915,15 @@ function et(e, t) {
|
|
|
2907
2915
|
file: t.file,
|
|
2908
2916
|
node: e
|
|
2909
2917
|
}
|
|
2910
|
-
) :
|
|
2918
|
+
) : Oo(l, n, p, e, t), a !== void 0 && co(m, t), d.members.length === 0 && (a === void 0 && (d.members = void 0), r && (t.moduleContext.constructorPropertiesInterface = f));
|
|
2911
2919
|
const g = t.exportDefaultName === i, C = it(e), v = g || C === 2;
|
|
2912
|
-
return (v || a !== void 0) && bt(d, v, t), n ? (a === void 0 ?
|
|
2920
|
+
return (v || a !== void 0) && bt(d, v, t), n ? (a === void 0 ? To(
|
|
2913
2921
|
t,
|
|
2914
2922
|
e,
|
|
2915
2923
|
t.config.documentation.copyDocDefinitions.classes,
|
|
2916
2924
|
m,
|
|
2917
2925
|
t.apiModule
|
|
2918
|
-
) :
|
|
2926
|
+
) : ho(
|
|
2919
2927
|
t,
|
|
2920
2928
|
e,
|
|
2921
2929
|
t.config.documentation.copyDocDefinitions.customElements,
|
|
@@ -2935,7 +2943,7 @@ function et(e, t) {
|
|
|
2935
2943
|
node: e
|
|
2936
2944
|
}), pi(e.modifiers, o.SyntaxKind.AbstractKeyword) ? c.hasExplicitAbstract = !0 : !u && (t.config.strict || a !== void 0) && (c.hasExplicitAbstract = !1))), t.objectLikeTypeParameters = void 0, d;
|
|
2937
2945
|
}
|
|
2938
|
-
function
|
|
2946
|
+
function Oo(e, t, n, i, a) {
|
|
2939
2947
|
for (let r = 0; r < e.types.length; ++r) {
|
|
2940
2948
|
const l = e.types[r];
|
|
2941
2949
|
if (t) {
|
|
@@ -2957,7 +2965,7 @@ function Fo(e, t, n, i, a) {
|
|
|
2957
2965
|
n.mixins ??= [];
|
|
2958
2966
|
const m = c.expression;
|
|
2959
2967
|
n.mixins.unshift(
|
|
2960
|
-
|
|
2968
|
+
Ce(m, c.typeArguments, a)
|
|
2961
2969
|
), c = c.arguments[0];
|
|
2962
2970
|
}
|
|
2963
2971
|
} while (o.isCallExpression(c));
|
|
@@ -2969,13 +2977,13 @@ function Fo(e, t, n, i, a) {
|
|
|
2969
2977
|
break;
|
|
2970
2978
|
} else o.isExpressionWithTypeArguments(c) && (s = c.typeArguments, c = c.expression);
|
|
2971
2979
|
}
|
|
2972
|
-
const p =
|
|
2980
|
+
const p = Ce(
|
|
2973
2981
|
c,
|
|
2974
2982
|
a.isInLuminaMinimalExtraction ? void 0 : s,
|
|
2975
2983
|
a
|
|
2976
2984
|
);
|
|
2977
2985
|
if (p.name === "LitElement") {
|
|
2978
|
-
p.name = "
|
|
2986
|
+
p.name = "HTMLElement", p.package = ce, p.viewUrl = "https://developer.mozilla.org/docs/Web/API/HTMLElement";
|
|
2979
2987
|
const d = a.moduleContext.importsMap.LitElement;
|
|
2980
2988
|
d === void 0 ? a.emitError("Expected LitElement import to be defined", { file: a.file, node: i }) : d.actualName = "PublicLitElement";
|
|
2981
2989
|
}
|
|
@@ -2989,7 +2997,7 @@ function Fo(e, t, n, i, a) {
|
|
|
2989
2997
|
else if (o.isTypeReferenceNode(s) && (c = s.typeName, p = s.typeArguments, c.escapedText === "Record" && p?.length === 2 && p[0].kind === o.SyntaxKind.NeverKeyword && p[1].kind === o.SyntaxKind.NeverKeyword))
|
|
2990
2998
|
continue;
|
|
2991
2999
|
n.supertypes ??= [], n.supertypes.push(
|
|
2992
|
-
|
|
3000
|
+
Ce(c, p, a)
|
|
2993
3001
|
);
|
|
2994
3002
|
}
|
|
2995
3003
|
}
|
|
@@ -2997,9 +3005,9 @@ function Fo(e, t, n, i, a) {
|
|
|
2997
3005
|
function Ei(e, t, n, i) {
|
|
2998
3006
|
i.apiObject = e;
|
|
2999
3007
|
const a = e.customElement === !0, r = e.members, l = t.length;
|
|
3000
|
-
let s, c = t[0], p, d =
|
|
3008
|
+
let s, c = t[0], p, d = Re(c?.name), m = !1;
|
|
3001
3009
|
for (let f = 0; f < l; ++f) {
|
|
3002
|
-
if (s = c, c = t[f + 1], p = d, d =
|
|
3010
|
+
if (s = c, c = t[f + 1], p = d, d = Re(c?.name), i.pairedSetter !== void 0) {
|
|
3003
3011
|
i.pairedSetter = void 0;
|
|
3004
3012
|
continue;
|
|
3005
3013
|
}
|
|
@@ -3009,8 +3017,8 @@ function Ei(e, t, n, i) {
|
|
|
3009
3017
|
let u = oe(s, !0, i) ?? (i.pairedSetter === void 0 ? void 0 : oe(i.pairedSetter, !0, i));
|
|
3010
3018
|
if (u === void 0 && !i.config.strict && (a ? p !== void 0 && Qt(s, i.pairedSetter, !0) : !pi(s.modifiers, o.SyntaxKind.PrivateKeyword))) {
|
|
3011
3019
|
const C = i.pairedSetter === void 0 ? je(s, !1, i, Le) : oe(s, !1, i) ?? je(i.pairedSetter, !1, i, Le);
|
|
3012
|
-
C?.docsTags.includes(U.private) === !0 ? a && i.config.context.includeLuminaPrivateComponents ? u =
|
|
3013
|
-
} else u === void 0 && a && i.config.context.includeLuminaPrivateComponents && Qt(s, i.pairedSetter, !1) && (u =
|
|
3020
|
+
C?.docsTags.includes(U.private) === !0 ? a && i.config.context.includeLuminaPrivateComponents ? u = Pe : u = void 0 : u = C;
|
|
3021
|
+
} else u === void 0 && a && i.config.context.includeLuminaPrivateComponents && Qt(s, i.pairedSetter, !1) && (u = Pe);
|
|
3014
3022
|
if (u === void 0) {
|
|
3015
3023
|
a && o.isPropertyDeclaration(s) && o.isIdentifier(s.name) && (s.name.escapedText === "shadowRootOptions" && s.initializer !== void 0 && o.isIdentifier(s.initializer) && s.initializer.escapedText === "noShadowRoot" && (i.apiObject.encapsulation = "none"), s.name.escapedText === "formAssociated" && s.initializer !== void 0 && Y(s.initializer, i) && (i.apiObject.formAssociated = !0));
|
|
3016
3024
|
continue;
|
|
@@ -3021,7 +3029,7 @@ function Ei(e, t, n, i) {
|
|
|
3021
3029
|
0,
|
|
3022
3030
|
ct.members.length,
|
|
3023
3031
|
s
|
|
3024
|
-
), Ci(e, ct, i),
|
|
3032
|
+
), Ci(e, ct, i), me(e).emitAsTypeAlias = !0) : i.emitError(`@public used on unsupported member kind: ${o.SyntaxKind[s.kind]}`, {
|
|
3025
3033
|
file: i.file,
|
|
3026
3034
|
node: s
|
|
3027
3035
|
}), g !== void 0 && r.push(g);
|
|
@@ -3032,7 +3040,7 @@ const ct = o.factory.createTypeLiteralNode(void 0);
|
|
|
3032
3040
|
function Qt(e, t, n) {
|
|
3033
3041
|
if (e.kind === o.SyntaxKind.PropertyDeclaration || e.kind === o.SyntaxKind.GetAccessor || e.kind === o.SyntaxKind.SetAccessor) {
|
|
3034
3042
|
const i = e;
|
|
3035
|
-
if ((
|
|
3043
|
+
if ((xe(i.modifiers, "property") ?? (t === void 0 ? void 0 : xe(t.modifiers, "property"))) !== void 0)
|
|
3036
3044
|
return !0;
|
|
3037
3045
|
if (!n)
|
|
3038
3046
|
return !1;
|
|
@@ -3045,7 +3053,7 @@ function Qt(e, t, n) {
|
|
|
3045
3053
|
return !1;
|
|
3046
3054
|
}
|
|
3047
3055
|
return e.kind === o.SyntaxKind.PropertyDeclaration && i.initializer !== void 0 && o.isCallExpression(i.initializer) ? o.isIdentifier(i.initializer.expression) && (i.initializer.expression.escapedText === "createEvent" || i.initializer.expression.escapedText === "useCloseEvent" || i.initializer.expression.escapedText === "useArcgisLoadError" || i.initializer.expression.escapedText === "useArcgisViewReadyError" || i.initializer.expression.escapedText === "reEmitEvent") || o.isCallExpression(i.initializer.expression) && o.isIdentifier(i.initializer.expression.expression) && i.initializer.expression.expression.escapedText === "usePropertyChange" : !1;
|
|
3048
|
-
} else return e.kind === o.SyntaxKind.MethodDeclaration ?
|
|
3056
|
+
} else return e.kind === o.SyntaxKind.MethodDeclaration ? xe(e.modifiers, "method") !== void 0 : !1;
|
|
3049
3057
|
}
|
|
3050
3058
|
function Ci(e, t, n) {
|
|
3051
3059
|
const i = z(t, n);
|
|
@@ -3062,7 +3070,7 @@ function Ci(e, t, n) {
|
|
|
3062
3070
|
};
|
|
3063
3071
|
}
|
|
3064
3072
|
}
|
|
3065
|
-
function
|
|
3073
|
+
function No(e, t, n) {
|
|
3066
3074
|
if (!o.isTypeQueryNode(t)) {
|
|
3067
3075
|
n.emitError("Expected a TypeQueryNode for applyMixins syntax", { file: n.file, node: t });
|
|
3068
3076
|
return;
|
|
@@ -3125,10 +3133,10 @@ function Oo(e, t, n) {
|
|
|
3125
3133
|
});
|
|
3126
3134
|
return;
|
|
3127
3135
|
}
|
|
3128
|
-
r.mixins.unshift(
|
|
3136
|
+
r.mixins.unshift(Ce(c, void 0, n));
|
|
3129
3137
|
}
|
|
3130
3138
|
}
|
|
3131
|
-
function
|
|
3139
|
+
function wo(e, t) {
|
|
3132
3140
|
const n = e.type, i = e.name.escapedText, a = mi(i, t), r = ni(), l = {
|
|
3133
3141
|
[j]: r,
|
|
3134
3142
|
kind: "interface",
|
|
@@ -3169,7 +3177,7 @@ function No(e, t) {
|
|
|
3169
3177
|
if (o.isTypeLiteralNode(d))
|
|
3170
3178
|
Ei(s, d.members, i, t);
|
|
3171
3179
|
else if (o.isTypeReferenceNode(d))
|
|
3172
|
-
s.supertypes ??= [], s.supertypes.push(
|
|
3180
|
+
s.supertypes ??= [], s.supertypes.push(Ce(d.typeName, d.typeArguments, t));
|
|
3173
3181
|
else if (o.isFunctionTypeNode(d) || o.isConstructorTypeNode(d)) {
|
|
3174
3182
|
if (t.jsDoc = Le, s.docsTags !== void 0) {
|
|
3175
3183
|
t.jsDoc = { ...Le, docsTags: [] };
|
|
@@ -3179,7 +3187,7 @@ function No(e, t) {
|
|
|
3179
3187
|
}
|
|
3180
3188
|
s.docsTags.length === 0 && (s.docsTags = void 0);
|
|
3181
3189
|
}
|
|
3182
|
-
s.members.push(
|
|
3190
|
+
s.members.push(Co(d, i, void 0, t));
|
|
3183
3191
|
} else
|
|
3184
3192
|
Ci(s, d, t);
|
|
3185
3193
|
}
|
|
@@ -3192,7 +3200,7 @@ function No(e, t) {
|
|
|
3192
3200
|
t.apiModule
|
|
3193
3201
|
), s.members.length === 0 && (s.members = void 0), s;
|
|
3194
3202
|
}
|
|
3195
|
-
function
|
|
3203
|
+
function Uo(e, t, n) {
|
|
3196
3204
|
const i = e.initializer, a = i.body;
|
|
3197
3205
|
let r, l;
|
|
3198
3206
|
for (let d = 0; d < a.statements.length; ++d) {
|
|
@@ -3204,7 +3212,7 @@ function wo(e, t, n) {
|
|
|
3204
3212
|
let u = f.initializer.expression.expression;
|
|
3205
3213
|
for (; o.isCallExpression(u); ) {
|
|
3206
3214
|
const g = u.expression;
|
|
3207
|
-
r ??= [], r.push(
|
|
3215
|
+
r ??= [], r.push(Ce(g, u.typeArguments, n)), u = u.arguments[0];
|
|
3208
3216
|
}
|
|
3209
3217
|
} else o.isClassDeclaration(m) && (l = m);
|
|
3210
3218
|
}
|
|
@@ -3230,7 +3238,7 @@ function wo(e, t, n) {
|
|
|
3230
3238
|
const p = et(l, n);
|
|
3231
3239
|
return p.kind = "mixin", p;
|
|
3232
3240
|
}
|
|
3233
|
-
function
|
|
3241
|
+
function Vo(e, t, n) {
|
|
3234
3242
|
const i = n.moduleHasClass;
|
|
3235
3243
|
n.moduleHasClass = !1;
|
|
3236
3244
|
const a = o.factory.createClassDeclaration(
|
|
@@ -3243,10 +3251,10 @@ function Uo(e, t, n) {
|
|
|
3243
3251
|
])
|
|
3244
3252
|
],
|
|
3245
3253
|
[]
|
|
3246
|
-
), r = et(a, n), l = r, s =
|
|
3254
|
+
), r = et(a, n), l = r, s = me(l);
|
|
3247
3255
|
return l.kind = "interface", l.supertypes = r.mixins, r.mixins = void 0, r.superclass !== void 0 && (l.supertypes ??= [], l.supertypes.unshift(r.superclass), r.superclass = void 0), n.moduleHasClass = i, s.isMixinBaseClass = !0, l;
|
|
3248
3256
|
}
|
|
3249
|
-
function
|
|
3257
|
+
function Wo(e, t) {
|
|
3250
3258
|
const n = e.declarationList.declarations;
|
|
3251
3259
|
n.length !== 1 && t.emitError("Public variable statements must have only a single variable declarations. Found multiple.", {
|
|
3252
3260
|
file: t.file,
|
|
@@ -3265,13 +3273,13 @@ function Vo(e, t) {
|
|
|
3265
3273
|
file: t.file,
|
|
3266
3274
|
node: e
|
|
3267
3275
|
}), t.mixinName !== void 0 && i.initializer !== void 0 && o.isCallExpression(i.initializer) && o.isIdentifier(i.initializer.expression) && i.initializer.expression.escapedText === t.mixinName)
|
|
3268
|
-
return
|
|
3276
|
+
return Vo(i.initializer, r, t);
|
|
3269
3277
|
let c = i.type;
|
|
3270
3278
|
const p = (e.declarationList.flags & o.NodeFlags.Const) !== 0;
|
|
3271
3279
|
if (c === void 0) {
|
|
3272
3280
|
const u = i.initializer;
|
|
3273
3281
|
if (u !== void 0 && o.isArrowFunction(u) && p)
|
|
3274
|
-
return u.typeParameters?.at(0)?.name?.escapedText === "TBase" ?
|
|
3282
|
+
return u.typeParameters?.at(0)?.name?.escapedText === "TBase" ? Uo(i, r, t) : Ht(u, r, e, t);
|
|
3275
3283
|
u === void 0 ? c = X(
|
|
3276
3284
|
{ file: t.file, node: i },
|
|
3277
3285
|
"Public variable must have a type annotation or a default value",
|
|
@@ -3291,7 +3299,7 @@ function Vo(e, t) {
|
|
|
3291
3299
|
type: z(c, t),
|
|
3292
3300
|
default: void 0
|
|
3293
3301
|
};
|
|
3294
|
-
return un(m, t.jsDoc), p && c.kind === o.SyntaxKind.LiteralType || (m.default = ze(i.initializer, m.default, t.file)),
|
|
3302
|
+
return un(m, t.jsDoc), p && c.kind === o.SyntaxKind.LiteralType || (m.default = ze(i.initializer, m.default, t.file)), So(
|
|
3295
3303
|
t,
|
|
3296
3304
|
e,
|
|
3297
3305
|
t.config.documentation.copyDocDefinitions.variables,
|
|
@@ -3305,23 +3313,23 @@ function Pi(e, t, n) {
|
|
|
3305
3313
|
if (n.jsDoc = i, o.isClassDeclaration(e))
|
|
3306
3314
|
return et(e, n);
|
|
3307
3315
|
if (o.isFunctionDeclaration(e))
|
|
3308
|
-
return
|
|
3316
|
+
return Eo(e, e.name.escapedText, void 0, n);
|
|
3309
3317
|
if (o.isInterfaceDeclaration(e))
|
|
3310
3318
|
return et(e, n);
|
|
3311
3319
|
if (o.isTypeAliasDeclaration(e))
|
|
3312
|
-
return
|
|
3320
|
+
return wo(e, n);
|
|
3313
3321
|
if (o.isVariableStatement(e))
|
|
3314
|
-
return
|
|
3322
|
+
return Wo(e, n);
|
|
3315
3323
|
}
|
|
3316
3324
|
}
|
|
3317
|
-
function
|
|
3325
|
+
function _o(e, t) {
|
|
3318
3326
|
const n = t.apiModule.declarations, i = e.statements;
|
|
3319
3327
|
for (let a = 0; a < i.length; ++a) {
|
|
3320
3328
|
const r = i[a], l = Pi(r, a, t);
|
|
3321
3329
|
l !== void 0 && n.push(l);
|
|
3322
3330
|
}
|
|
3323
3331
|
}
|
|
3324
|
-
function
|
|
3332
|
+
function Bo(e, t) {
|
|
3325
3333
|
const n = e.fileName.slice(t.config.context.cwd.length), i = t.watchFiles?.get(n);
|
|
3326
3334
|
if (i !== void 0) {
|
|
3327
3335
|
if (i.module !== void 0)
|
|
@@ -3360,8 +3368,8 @@ function _o(e, t) {
|
|
|
3360
3368
|
description: void 0,
|
|
3361
3369
|
docsTags: []
|
|
3362
3370
|
}), D = y.kind === o.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && y.heritageClauses !== void 0 && y.modifiers !== void 0;
|
|
3363
|
-
L?.docsTags.includes(U.private) === !0 ? D && t.config.context.includeLuminaPrivateComponents ? (M =
|
|
3364
|
-
} else M === void 0 && t.componentTagName !== void 0 && t.config.context.includeLuminaPrivateComponents && y.kind === o.SyntaxKind.ClassDeclaration && (M =
|
|
3371
|
+
L?.docsTags.includes(U.private) === !0 ? D && t.config.context.includeLuminaPrivateComponents ? (M = Pe, t.isInLuminaMinimalExtraction = !0) : M = void 0 : L !== void 0 && (D || g !== void 0 && Nn(y, g)) && (M = L);
|
|
3372
|
+
} else M === void 0 && t.componentTagName !== void 0 && t.config.context.includeLuminaPrivateComponents && y.kind === o.SyntaxKind.ClassDeclaration && (M = Pe, t.isInLuminaMinimalExtraction = !0);
|
|
3365
3373
|
M !== void 0 && !t.config.strict && y.kind === o.SyntaxKind.ClassDeclaration && t.componentTagName !== void 0 && y.heritageClauses !== void 0 && y.modifiers !== void 0 && M.docsTags.includes(U.internal) && (C = !0);
|
|
3366
3374
|
}
|
|
3367
3375
|
if (t.statementJsDocs[I] = M, k || I === 0 && (m = oe(e, !0, t)), M !== void 0)
|
|
@@ -3374,7 +3382,7 @@ function _o(e, t) {
|
|
|
3374
3382
|
continue;
|
|
3375
3383
|
const D = y.moduleSpecifier.text, T = !D.startsWith("."), _ = T ? D : Z(D), N = T ? void 0 : We(ut(r, _), t), J = N === void 0 ? void 0 : t.config.types.typeReplacements[N];
|
|
3376
3384
|
if (Rn(y, t), L.name !== void 0) {
|
|
3377
|
-
const E = L.name.escapedText, S = J?.[E], x = S?.[1], A = S === void 0 ? !T && D.endsWith(".json") ? D : _ :
|
|
3385
|
+
const E = L.name.escapedText, S = J?.[E], x = S?.[1], A = S === void 0 ? !T && D.endsWith(".json") ? D : _ : ve(s, S[0]), V = S?.[0] ?? N;
|
|
3378
3386
|
c[E] = {
|
|
3379
3387
|
type: S?.[2] ?? "default",
|
|
3380
3388
|
modulePath: V,
|
|
@@ -3388,7 +3396,7 @@ function _o(e, t) {
|
|
|
3388
3396
|
if (K === void 0)
|
|
3389
3397
|
continue;
|
|
3390
3398
|
if (K.kind === o.SyntaxKind.NamespaceImport) {
|
|
3391
|
-
const E = K.name.escapedText, S = J?.[E], x = S?.[1], A = S === void 0 ? _ :
|
|
3399
|
+
const E = K.name.escapedText, S = J?.[E], x = S?.[1], A = S === void 0 ? _ : ve(s, S[0]), V = S?.[0] ?? N;
|
|
3392
3400
|
c[E] = {
|
|
3393
3401
|
type: "*",
|
|
3394
3402
|
modulePath: V,
|
|
@@ -3399,7 +3407,7 @@ function _o(e, t) {
|
|
|
3399
3407
|
};
|
|
3400
3408
|
} else
|
|
3401
3409
|
for (let E = 0; E < K.elements.length; ++E) {
|
|
3402
|
-
const S = K.elements[E], x = S.propertyName === void 0 ? void 0 : S.propertyName.escapedText ?? S.propertyName.text, A = S.name.escapedText, V = J?.[x ?? A], W = V?.[1], G = V === void 0 ? _ :
|
|
3410
|
+
const S = K.elements[E], x = S.propertyName === void 0 ? void 0 : S.propertyName.escapedText ?? S.propertyName.text, A = S.name.escapedText, V = J?.[x ?? A], W = V?.[1], G = V === void 0 ? _ : ve(s, V[0]), O = V?.[0] ?? N;
|
|
3403
3411
|
c[A] = {
|
|
3404
3412
|
type: V?.[2] ?? "named",
|
|
3405
3413
|
modulePath: O,
|
|
@@ -3416,13 +3424,13 @@ function _o(e, t) {
|
|
|
3416
3424
|
}
|
|
3417
3425
|
} else if (o.isExportDeclaration(y) && y.moduleSpecifier !== void 0 && !t.isInLuminaMinimalExtraction) {
|
|
3418
3426
|
if (oe(y, !0, t) !== void 0) {
|
|
3419
|
-
const D = y.moduleSpecifier.text, T = !D.startsWith("."), _ = T ? D : ut(r, Z(D)), N = T ? void 0 : We(_, t), J = T ? D :
|
|
3427
|
+
const D = y.moduleSpecifier.text, T = !D.startsWith("."), _ = T ? D : ut(r, Z(D)), N = T ? void 0 : We(_, t), J = T ? D : ve(s, N);
|
|
3420
3428
|
u.reExports ??= [];
|
|
3421
3429
|
const K = [];
|
|
3422
3430
|
if (y.exportClause?.kind === o.SyntaxKind.NamedExports) {
|
|
3423
3431
|
const E = y.exportClause.elements;
|
|
3424
3432
|
for (let S = 0; S < E.length; ++S) {
|
|
3425
|
-
const x = E[S], A =
|
|
3433
|
+
const x = E[S], A = Re(x.name), V = x.propertyName === void 0 ? void 0 : Re(x.propertyName), W = V ?? A, G = V === void 0 ? void 0 : A;
|
|
3426
3434
|
K.push({
|
|
3427
3435
|
exportName: W,
|
|
3428
3436
|
aliasName: G,
|
|
@@ -3432,7 +3440,7 @@ function _o(e, t) {
|
|
|
3432
3440
|
} else
|
|
3433
3441
|
K.push({
|
|
3434
3442
|
exportName: "*",
|
|
3435
|
-
aliasName: y.exportClause === void 0 ? void 0 :
|
|
3443
|
+
aliasName: y.exportClause === void 0 ? void 0 : Re(y.exportClause.name),
|
|
3436
3444
|
isTypeOnly: !1
|
|
3437
3445
|
}), !t.config.strict && N !== void 0 && Je(N, _, "*", t);
|
|
3438
3446
|
u.reExports.push({
|
|
@@ -3455,7 +3463,7 @@ function _o(e, t) {
|
|
|
3455
3463
|
c[k] = {
|
|
3456
3464
|
type: M[2],
|
|
3457
3465
|
modulePath: M[0],
|
|
3458
|
-
specifier:
|
|
3466
|
+
specifier: ve(s, M[0]),
|
|
3459
3467
|
replacementName: M[1],
|
|
3460
3468
|
actualName: void 0,
|
|
3461
3469
|
wasUsed: !1
|
|
@@ -3475,7 +3483,7 @@ function _o(e, t) {
|
|
|
3475
3483
|
declarations: [],
|
|
3476
3484
|
exports: []
|
|
3477
3485
|
};
|
|
3478
|
-
if (t.apiModule = h,
|
|
3486
|
+
if (t.apiModule = h, _o(e, t), d !== void 0) {
|
|
3479
3487
|
let I = !1;
|
|
3480
3488
|
do {
|
|
3481
3489
|
I = !1;
|
|
@@ -3535,7 +3543,7 @@ function _o(e, t) {
|
|
|
3535
3543
|
}
|
|
3536
3544
|
) : (v && m.docsTags.push(U.internal), dn(h, m))), h;
|
|
3537
3545
|
}
|
|
3538
|
-
async function
|
|
3546
|
+
async function Ca(e) {
|
|
3539
3547
|
const t = [], n = e.basePath, i = e.config.context.excludedDirectories, a = `${e.basePath}components/`, r = [], l = !e.config.strict || e.config.context.includeLuminaPrivateComponents;
|
|
3540
3548
|
e.componentPathMapping = /* @__PURE__ */ Object.create(null);
|
|
3541
3549
|
const s = e.isComponentProject ? (m) => $i(m, a) : () => !1, c = e.isComponentProject ? p : d;
|
|
@@ -3551,7 +3559,7 @@ async function Ea(e) {
|
|
|
3551
3559
|
}
|
|
3552
3560
|
const u = s(m);
|
|
3553
3561
|
if (u && l || // Exclude files before paying .toString() cost
|
|
3554
|
-
f.includes(
|
|
3562
|
+
f.includes(zo) && (f.includes(jo) || f.includes(Jo))) {
|
|
3555
3563
|
const C = f.toString("utf8"), v = Yt(m, C);
|
|
3556
3564
|
c(v, u);
|
|
3557
3565
|
}
|
|
@@ -3560,7 +3568,7 @@ async function Ea(e) {
|
|
|
3560
3568
|
const m = e.program.getSourceFiles();
|
|
3561
3569
|
for (let f = 0; f < m.length; ++f) {
|
|
3562
3570
|
const u = m[f], g = u.fileName;
|
|
3563
|
-
if (!
|
|
3571
|
+
if (!Ko(g, e))
|
|
3564
3572
|
continue;
|
|
3565
3573
|
if (g.includes(".stories.")) {
|
|
3566
3574
|
Ut(u.text, g, e);
|
|
@@ -3580,7 +3588,7 @@ async function Ea(e) {
|
|
|
3580
3588
|
}
|
|
3581
3589
|
function d(m) {
|
|
3582
3590
|
e.file = m;
|
|
3583
|
-
const f =
|
|
3591
|
+
const f = Bo(m, e);
|
|
3584
3592
|
f !== void 0 && t.push(f);
|
|
3585
3593
|
}
|
|
3586
3594
|
for (let m = 0; m < r.length; ++m)
|
|
@@ -3612,7 +3620,7 @@ async function Ea(e) {
|
|
|
3612
3620
|
}
|
|
3613
3621
|
m = !0, u.extractedNames = u.pendingNames === void 0 ? void 0 : new Set(u.pendingNames);
|
|
3614
3622
|
let v = e.basePath + u.sourcePath, P = !1, h = e.program?.getSourceFile(v) ?? e.program?.getSourceFile(`${v}.ts`) ?? e.program?.getSourceFile(`${v}.tsx`) ?? e.program?.getSourceFile(`${v}.d.ts`);
|
|
3615
|
-
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 && (P = !0)), e.program === void 0 && (Z(v) === v && (v =
|
|
3623
|
+
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 && (P = !0)), e.program === void 0 && (Z(v) === v && (v = fe(`${v}.ts`) ? `${v}.ts` : fe(`${v}.tsx`) ? `${v}.tsx` : fe(`${v}.d.ts`) ? `${v}.d.ts` : void 0, v === void 0 && (v = fe(`${v}/index.ts`) ? `${v}/index.ts` : fe(`${v}/index.tsx`) ? `${v}/index.tsx` : fe(`${v}/index.d.ts`) ? `${v}/index.d.ts` : void 0, v !== void 0 && (P = !0))), v !== void 0 && (h = Yt(v, await It(v, "utf8")))), h !== void 0) {
|
|
3616
3624
|
const R = h.fileName.slice(e.basePath.length);
|
|
3617
3625
|
R !== u.sourcePath && (u.sourcePath = R), P && (u.actualModulePath = `${g}/index`), d(h);
|
|
3618
3626
|
}
|
|
@@ -3621,10 +3629,10 @@ async function Ea(e) {
|
|
|
3621
3629
|
}
|
|
3622
3630
|
return t;
|
|
3623
3631
|
}
|
|
3624
|
-
const
|
|
3632
|
+
const Ko = (e, t) => Ho(e) && $o(e, t), Ho = (e) => (e.endsWith(".ts") || e.endsWith(".tsx")) && !bi(e), bi = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), $o = (e, t) => e.startsWith(t.basePath) && !t.config.context.excludedDirectories.has(
|
|
3625
3633
|
En(e.slice(t.basePath.length))
|
|
3626
|
-
) && !e.includes("node_modules"), Xt = 32,
|
|
3627
|
-
async function
|
|
3634
|
+
) && !e.includes("node_modules"), Xt = 32, zo = 64, Mi = "@public", jo = Buffer.from(Mi), Di = "@internal", Jo = Buffer.from(Di);
|
|
3635
|
+
async function Pa(e) {
|
|
3628
3636
|
await Zt(e) && await xi(e, /* @__PURE__ */ new Set(), Hi);
|
|
3629
3637
|
}
|
|
3630
3638
|
async function xi(e, t, n) {
|
|
@@ -3678,22 +3686,22 @@ function Yt(e, t) {
|
|
|
3678
3686
|
);
|
|
3679
3687
|
}
|
|
3680
3688
|
export {
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3689
|
+
ve as a,
|
|
3690
|
+
Sa as b,
|
|
3691
|
+
Pa as c,
|
|
3692
|
+
Ta as d,
|
|
3693
|
+
Ca as e,
|
|
3694
|
+
ha as f,
|
|
3695
|
+
Ho as g,
|
|
3696
|
+
$o as h,
|
|
3697
|
+
Ko as i,
|
|
3690
3698
|
bi as j,
|
|
3691
3699
|
Yt as k,
|
|
3692
|
-
|
|
3693
|
-
|
|
3700
|
+
ya as l,
|
|
3701
|
+
va as m,
|
|
3694
3702
|
Wt as n,
|
|
3695
3703
|
Vt as o,
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3704
|
+
ga as p,
|
|
3705
|
+
fa as r,
|
|
3706
|
+
Ea as t
|
|
3699
3707
|
};
|