@arcgis/lumina-compiler 4.33.0-next.165 → 4.33.0-next.166
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/index.js +178 -182
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { nodeExternals as ms } from "rollup-plugin-node-externals";
|
|
2
|
-
import { stringToStartsWithGlob as
|
|
2
|
+
import { stringToStartsWithGlob as Bt, path as u, toSystemPathSeparators as Y, retrievePackageJson as R, fetchPackageLocation as _e, asyncRetrievePackageJson as He, existsAsync as U, findPath as fs, toPosixPathSeparators as Le, isPosix as Oi, getCwd as Ji } from "@arcgis/components-build-utils";
|
|
3
3
|
import ys from "vite-plugin-dts";
|
|
4
4
|
import o from "typescript";
|
|
5
5
|
import { f as w, l as C } from "./logger-KpGU2b3R.js";
|
|
6
|
-
import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageIdentifier as Ki, setApiDocFromJsDoc as ue, ApiExtractor as gs, hasIgnoredModifier as hs, symbolToDocs as
|
|
7
|
-
import { isNotUndefined as j, mappedFind as ye, camelToKebab as
|
|
6
|
+
import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageIdentifier as Ki, setApiDocFromJsDoc as ue, ApiExtractor as gs, hasIgnoredModifier as hs, symbolToDocs as Wt, setDefaultFromInitializer as _t, multipleJsDocTags as vs, findDecorator as Ht, isApiMethod as Ss, isApiProperty as bs } from "@arcgis/api-extractor";
|
|
7
|
+
import { isNotUndefined as j, mappedFind as ye, camelToKebab as Tt, kebabToPascal as ws, uncapitalize as mt, identity as Bi, Deferred as Ts, getPreamble as Es, capitalize as Cs } from "@arcgis/components-utils";
|
|
8
8
|
import { readdir as Ue, readFile as J, rm as $s, mkdir as z, cp as Ps, writeFile as F, copyFile as xs } from "node:fs/promises";
|
|
9
|
-
import { lazyMetaSubItemJoiner as ks, lazyMetaItemJoiner as et, lazyMetaGroupJoiner as As, propertyFlagAttribute as
|
|
9
|
+
import { lazyMetaSubItemJoiner as ks, lazyMetaItemJoiner as et, lazyMetaGroupJoiner as As, propertyFlagAttribute as Ut, propertyFlagReflect as Is, propertyFlagBoolean as Ls, propertyFlagNumber as Fs, propertyFlagState as Ns, propertyFlagReadOnly as Ds, propertyFlagNoAccessor as js } from "@arcgis/lumina/config";
|
|
10
10
|
import { build as Rs } from "esbuild";
|
|
11
11
|
import { glob as Ms } from "glob";
|
|
12
12
|
import Os from "mime-types";
|
|
@@ -26,9 +26,9 @@ function Ks(e) {
|
|
|
26
26
|
// Externalize all @lit/ and @lit-labs/ packages
|
|
27
27
|
/^@lit[-/]/u,
|
|
28
28
|
/^lit$/u,
|
|
29
|
-
...Array.isArray(t) ? t.map(
|
|
29
|
+
...Array.isArray(t) ? t.map(Bt) : []
|
|
30
30
|
],
|
|
31
|
-
exclude: Array.isArray(i) ? i.map(
|
|
31
|
+
exclude: Array.isArray(i) ? i.map(Bt) : []
|
|
32
32
|
}),
|
|
33
33
|
configResolved() {
|
|
34
34
|
e.isInStorybook && (r.resolveId = void 0);
|
|
@@ -36,7 +36,7 @@ function Ks(e) {
|
|
|
36
36
|
};
|
|
37
37
|
return r;
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const Et = "customElement.js", _i = "customElement.d.ts", Bs = "playwright";
|
|
40
40
|
function Ws(e, t, i) {
|
|
41
41
|
const s = i.split(u.sep).slice(2);
|
|
42
42
|
let r = t._componentPathMapping;
|
|
@@ -84,7 +84,7 @@ function Hi(e, t, i = ".d.ts") {
|
|
|
84
84
|
const s = (i === "" ? t : t.slice(0, -i.length)).split(u.sep);
|
|
85
85
|
return s.at(Us) !== s.at(zs) ? t : u.join(
|
|
86
86
|
s.slice(0, -1).join(u.sep),
|
|
87
|
-
i === "" ?
|
|
87
|
+
i === "" ? Et : _i
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
const Us = -1, zs = -2, qs = /["']\.\.?\/[^'"]+/gu, Ui = (e, t, i, n) => e.replaceAll(qs, (s) => {
|
|
@@ -104,7 +104,7 @@ function Gs(e) {
|
|
|
104
104
|
return `/// <reference types="../../index.d.ts" />
|
|
105
105
|
${e}`;
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const zt = "customElement", Vs = (e, t) => {
|
|
108
108
|
const { filePath: i, content: n } = e;
|
|
109
109
|
if (!i.startsWith(t.dir.distComponents))
|
|
110
110
|
return e;
|
|
@@ -123,7 +123,7 @@ const Ut = "customElement", Vs = (e, t) => {
|
|
|
123
123
|
if (t.apiModule?.declarations.forEach((r) => {
|
|
124
124
|
"customElement" in r && i.push(
|
|
125
125
|
o.factory.createExpressionStatement(
|
|
126
|
-
o.factory.createCallExpression(o.factory.createIdentifier(
|
|
126
|
+
o.factory.createCallExpression(o.factory.createIdentifier(zt), void 0, [
|
|
127
127
|
o.factory.createStringLiteral(r.tagName),
|
|
128
128
|
o.factory.createIdentifier(r.name)
|
|
129
129
|
])
|
|
@@ -141,7 +141,7 @@ const Ut = "customElement", Vs = (e, t) => {
|
|
|
141
141
|
!1,
|
|
142
142
|
void 0,
|
|
143
143
|
o.factory.createNamedImports([
|
|
144
|
-
o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(
|
|
144
|
+
o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(zt))
|
|
145
145
|
])
|
|
146
146
|
),
|
|
147
147
|
o.factory.createStringLiteral(n)
|
|
@@ -184,11 +184,11 @@ const Qs = (e) => (t, i) => (
|
|
|
184
184
|
)
|
|
185
185
|
), Zs = (e, t) => t.isInStorybook ? !1 : e, Ys = (e, t) => (
|
|
186
186
|
// Short-circuit quickly if file doesn't look like the one we want to exclude
|
|
187
|
-
e.filePath.endsWith(
|
|
188
|
-
),
|
|
187
|
+
e.filePath.endsWith(qt) && e.filePath === u.join(t.dir.dist, qt) ? !1 : e
|
|
188
|
+
), qt = "lumina.d.ts", er = (e, t) => {
|
|
189
189
|
const i = t.dir.dist, n = `${i}src/`;
|
|
190
190
|
return e.filePath.startsWith(n) ? { ...e, filePath: `${i}${e.filePath.slice(n.length)}` } : !1;
|
|
191
|
-
},
|
|
191
|
+
}, Ct = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), tr = (e) => Ct(e.filePath) || e.filePath.includes(".stories.") || e.filePath.includes(".story.") ? !1 : e, ir = (e) => e.content.includes("__esri.") ? {
|
|
192
192
|
filePath: e.filePath,
|
|
193
193
|
content: `/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
194
194
|
${e.content}`
|
|
@@ -262,7 +262,7 @@ const lr = (e, t) => o.factory.updateSourceFile(
|
|
|
262
262
|
e.typeReferenceDirectives,
|
|
263
263
|
e.hasNoDefaultLib,
|
|
264
264
|
e.libReferenceDirectives
|
|
265
|
-
), dr = (e) => `${
|
|
265
|
+
), dr = (e) => `${Gt}${" ".repeat(e.length - Gt.length - Vt.length)}${Vt}`, Gt = "/*", Vt = "*/", pr = (e) => e.statements.map(yr), ur = "@arcgis/lumina", mr = "LitElement", fr = "PublicLitElement", Vi = "TargetedEvent";
|
|
266
266
|
function yr(e) {
|
|
267
267
|
if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === ur && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
|
|
268
268
|
const t = e.importClause.namedBindings.elements.findIndex(
|
|
@@ -339,7 +339,7 @@ function Sr(e, t, i) {
|
|
|
339
339
|
if (r === void 0)
|
|
340
340
|
return e;
|
|
341
341
|
const a = [], c = /* @__PURE__ */ new Set(), l = [], d = [];
|
|
342
|
-
|
|
342
|
+
ft = void 0;
|
|
343
343
|
for (let y = 0; y < n.members.length; y++) {
|
|
344
344
|
const g = n.members[y], h = br(g, r, l, c, t);
|
|
345
345
|
h === void 0 ? a.push(g) : Array.isArray(h) ? d.push(...h) : (o.setEmitFlags(h, o.EmitFlags.NoComments), d.push(h));
|
|
@@ -377,7 +377,7 @@ function Sr(e, t, i) {
|
|
|
377
377
|
} else
|
|
378
378
|
return e;
|
|
379
379
|
}
|
|
380
|
-
let
|
|
380
|
+
let ft;
|
|
381
381
|
function br(e, t, i, n, s) {
|
|
382
382
|
const r = X(e.name);
|
|
383
383
|
if (r === void 0)
|
|
@@ -385,15 +385,15 @@ function br(e, t, i, n, s) {
|
|
|
385
385
|
const a = t.members.find((l) => l.name === r);
|
|
386
386
|
if (a?.privacy !== void 0)
|
|
387
387
|
return;
|
|
388
|
-
const c =
|
|
389
|
-
if (
|
|
388
|
+
const c = ft;
|
|
389
|
+
if (ft = r, a === void 0) {
|
|
390
390
|
if (o.isPropertyDeclaration(e)) {
|
|
391
391
|
const l = t.events?.find((p) => p.name === r);
|
|
392
392
|
if (l === void 0)
|
|
393
393
|
return;
|
|
394
394
|
const d = o.factory.updatePropertyDeclaration(
|
|
395
395
|
e,
|
|
396
|
-
|
|
396
|
+
Zt(e.modifiers),
|
|
397
397
|
e.name,
|
|
398
398
|
void 0,
|
|
399
399
|
Er(e.type, s),
|
|
@@ -407,19 +407,19 @@ function br(e, t, i, n, s) {
|
|
|
407
407
|
if (a.readonly === !0) {
|
|
408
408
|
const l = o.factory.updatePropertyDeclaration(
|
|
409
409
|
e,
|
|
410
|
-
|
|
410
|
+
Zt(e.modifiers),
|
|
411
411
|
e.name,
|
|
412
412
|
void 0,
|
|
413
|
-
|
|
413
|
+
Qt(n, e.type, s),
|
|
414
414
|
e.initializer
|
|
415
415
|
);
|
|
416
416
|
return o.setSyntheticLeadingComments(l, V(a)), l;
|
|
417
417
|
} else if (a.getterType !== void 0) {
|
|
418
|
-
const l =
|
|
418
|
+
const l = Xt.exec(a.getterType.text)?.groups;
|
|
419
419
|
if (l === void 0)
|
|
420
420
|
return C.error(
|
|
421
421
|
"@arcgis/lumina:transformComponentMembers",
|
|
422
|
-
`Expected bound accessor getter type to match ${
|
|
422
|
+
`Expected bound accessor getter type to match ${Xt}, but got ${a.getterType.text}`,
|
|
423
423
|
s.fileName
|
|
424
424
|
), e;
|
|
425
425
|
n.add(l.accessor);
|
|
@@ -457,7 +457,7 @@ function br(e, t, i, n, s) {
|
|
|
457
457
|
)
|
|
458
458
|
];
|
|
459
459
|
} else
|
|
460
|
-
return
|
|
460
|
+
return Qt(n, e.type, s), o.setSyntheticLeadingComments(e, V(a)), e;
|
|
461
461
|
else if (o.isGetAccessor(e) || o.isSetAccessor(e)) {
|
|
462
462
|
if (o.isSetAccessor(e)) {
|
|
463
463
|
if (a.readonly === !0)
|
|
@@ -473,8 +473,8 @@ function br(e, t, i, n, s) {
|
|
|
473
473
|
} else if (o.isMethodDeclaration(e))
|
|
474
474
|
return o.setSyntheticLeadingComments(e, V(a)), e;
|
|
475
475
|
}
|
|
476
|
-
const
|
|
477
|
-
function
|
|
476
|
+
const Xt = /^typeof this\.(?<accessor>[^.]+)\.(?<boundProperty>[^.]+)$/u;
|
|
477
|
+
function Qt(e, t, i) {
|
|
478
478
|
const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(wr) ?? [];
|
|
479
479
|
for (const r of s)
|
|
480
480
|
e.add(r);
|
|
@@ -525,7 +525,7 @@ function Tr(e) {
|
|
|
525
525
|
}
|
|
526
526
|
return e;
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function Zt(e) {
|
|
529
529
|
return e?.some((i) => i.kind === o.SyntaxKind.ReadonlyKeyword) ? e : [o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword), ...e ?? []];
|
|
530
530
|
}
|
|
531
531
|
function ke(e) {
|
|
@@ -549,12 +549,12 @@ function Er(e, t) {
|
|
|
549
549
|
t.fileName
|
|
550
550
|
), e);
|
|
551
551
|
}
|
|
552
|
-
const Cr = [pr, vr],
|
|
552
|
+
const Cr = [pr, vr], Yt = "@arcgis/lumina:componentDtsTransformer";
|
|
553
553
|
function $r(e) {
|
|
554
554
|
let t;
|
|
555
555
|
const i = Pr(e);
|
|
556
556
|
return {
|
|
557
|
-
name:
|
|
557
|
+
name: Yt,
|
|
558
558
|
supports(n) {
|
|
559
559
|
return t ??= new Set(e.componentFiles), n.endsWith(".tsx") && t.has(n);
|
|
560
560
|
},
|
|
@@ -563,7 +563,7 @@ function $r(e) {
|
|
|
563
563
|
return [];
|
|
564
564
|
const s = e.typeScriptProgram.getSourceFile(n);
|
|
565
565
|
if (s === void 0)
|
|
566
|
-
throw Error(w(
|
|
566
|
+
throw Error(w(Yt, `Could not find source file: ${Y(n)}`));
|
|
567
567
|
const r = [];
|
|
568
568
|
return e.typeScriptProgram.emit(
|
|
569
569
|
s,
|
|
@@ -673,7 +673,7 @@ function Ir(e) {
|
|
|
673
673
|
}
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
|
-
const Lr = "Fragment", tt = "DynamicHtmlTag", it = "DynamicSvgTag", Re = Symbol("dynamic html tag name"),
|
|
676
|
+
const Lr = "Fragment", tt = "DynamicHtmlTag", it = "DynamicSvgTag", Re = Symbol("dynamic html tag name"), yt = Symbol("dynamic svg tag name"), Qi = /* @__PURE__ */ new Set([
|
|
677
677
|
/**
|
|
678
678
|
* There is a "className" property. However, in JSX typings we use "class"
|
|
679
679
|
* instead to keep name shorter and to match Stencil's name. Thus, it should
|
|
@@ -713,7 +713,7 @@ const Lr = "Fragment", tt = "DynamicHtmlTag", it = "DynamicSvgTag", Re = Symbol(
|
|
|
713
713
|
"exportParts",
|
|
714
714
|
"hreflang",
|
|
715
715
|
"media"
|
|
716
|
-
]),
|
|
716
|
+
]), gt = {
|
|
717
717
|
button: /* @__PURE__ */ new Set(["popoverTarget"]),
|
|
718
718
|
input: /* @__PURE__ */ new Set(["list", "capture"]),
|
|
719
719
|
iframe: /* @__PURE__ */ new Set(["sandbox"]),
|
|
@@ -1545,7 +1545,7 @@ function Yi(e) {
|
|
|
1545
1545
|
e.stringifiedNonReflected
|
|
1546
1546
|
));
|
|
1547
1547
|
}
|
|
1548
|
-
const
|
|
1548
|
+
const ei = /* @__PURE__ */ new Set(["itemScope"]), en = /* @__PURE__ */ new Set([
|
|
1549
1549
|
"abort",
|
|
1550
1550
|
"animationCancel",
|
|
1551
1551
|
"animationEnd",
|
|
@@ -1661,7 +1661,7 @@ const Yt = /* @__PURE__ */ new Set(["itemScope"]), en = /* @__PURE__ */ new Set(
|
|
|
1661
1661
|
"source",
|
|
1662
1662
|
"track",
|
|
1663
1663
|
"wbr"
|
|
1664
|
-
]),
|
|
1664
|
+
]), $t = /* @__PURE__ */ new Set([
|
|
1665
1665
|
"animate",
|
|
1666
1666
|
"animateMotion",
|
|
1667
1667
|
"animateTransform",
|
|
@@ -1720,7 +1720,7 @@ const Yt = /* @__PURE__ */ new Set(["itemScope"]), en = /* @__PURE__ */ new Set(
|
|
|
1720
1720
|
"tspan",
|
|
1721
1721
|
"use",
|
|
1722
1722
|
"view"
|
|
1723
|
-
]), Nr = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]),
|
|
1723
|
+
]), Nr = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), Pt = /* @__PURE__ */ new Set([
|
|
1724
1724
|
"annotation-xml",
|
|
1725
1725
|
"annotation",
|
|
1726
1726
|
"maction",
|
|
@@ -1796,9 +1796,9 @@ function Or(e, t, i) {
|
|
|
1796
1796
|
}
|
|
1797
1797
|
return Rr.get(e) || tn(e.charCodeAt(0));
|
|
1798
1798
|
}
|
|
1799
|
-
const Jr = (e) => e.replace(jr, Or),
|
|
1799
|
+
const Jr = (e) => e.replace(jr, Or), ti = /[^\u0000-\u007F]/g;
|
|
1800
1800
|
function Kr(e) {
|
|
1801
|
-
return e = Jr(e),
|
|
1801
|
+
return e = Jr(e), ti.test(e) ? e.replace(ti, (t) => tn(t.charCodeAt(0))) : e;
|
|
1802
1802
|
}
|
|
1803
1803
|
const Br = Kr, Wr = 0, _r = 48, Hr = 57, Ur = /\$\{/gu, zr = (e) => e.replace(Ur, "\\${");
|
|
1804
1804
|
function qr(e) {
|
|
@@ -1818,9 +1818,9 @@ const ze = (e) => zr(Br(e)), Gr = (e) => !Vr.test(e), Vr = /^[^\s"'=<>`]+$/u, Xr
|
|
|
1818
1818
|
"&": "&",
|
|
1819
1819
|
"<": "<",
|
|
1820
1820
|
">": ">"
|
|
1821
|
-
}, nn = (e) => e.replace(Xr, (t) => Qr[t]),
|
|
1821
|
+
}, nn = (e) => e.replace(Xr, (t) => Qr[t]), xt = (e) => typeof e == "string" && e.includes("-") && !Dr.has(e), Zr = async (e) => Object.fromEntries(
|
|
1822
1822
|
(await e.componentFilesPromise).map((t) => [sn(t), t])
|
|
1823
|
-
), sn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..",
|
|
1823
|
+
), sn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", Et.slice(0, -3))), kt = async (e, t, i = t) => await Ue(i, { recursive: !0 }).catch((n) => {
|
|
1824
1824
|
if (String(n).includes("ENOENT"))
|
|
1825
1825
|
return C.error("@arcgis/lumina", `Unable to find the ${i} directory (cwd: ${process.cwd()})`), [];
|
|
1826
1826
|
throw n;
|
|
@@ -1841,7 +1841,7 @@ function he(e, t) {
|
|
|
1841
1841
|
const [i, n] = e.slice(0, -4).split(u.sep).slice(Yr);
|
|
1842
1842
|
return i === n;
|
|
1843
1843
|
}
|
|
1844
|
-
const Yr = -2,
|
|
1844
|
+
const Yr = -2, ii = 5, ni = 1, si = 1, ri = 3, oi = 4, qe = o;
|
|
1845
1845
|
eo(qe.createSourceMapGenerator);
|
|
1846
1846
|
to(qe.createTextWriter);
|
|
1847
1847
|
io(qe.getNewLineCharacter);
|
|
@@ -1851,9 +1851,9 @@ function eo(e) {
|
|
|
1851
1851
|
throw new Error(
|
|
1852
1852
|
"Failed to find ts.createSourceMapGenerator() function. Lumina needs to be updated to support the new TypeScript version"
|
|
1853
1853
|
);
|
|
1854
|
-
if (e.length !==
|
|
1854
|
+
if (e.length !== ii)
|
|
1855
1855
|
throw new Error(
|
|
1856
|
-
`ts.createSourceMapGenerator() signature changed. Expected ${
|
|
1856
|
+
`ts.createSourceMapGenerator() signature changed. Expected ${ii} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1857
1857
|
);
|
|
1858
1858
|
}
|
|
1859
1859
|
function to(e) {
|
|
@@ -1861,9 +1861,9 @@ function to(e) {
|
|
|
1861
1861
|
throw new Error(
|
|
1862
1862
|
"Failed to find ts.createTextWriter() function. Lumina needs to be updated to support the new TypeScript version"
|
|
1863
1863
|
);
|
|
1864
|
-
if (e.length !==
|
|
1864
|
+
if (e.length !== ni)
|
|
1865
1865
|
throw new Error(
|
|
1866
|
-
`ts.createTextWriter() signature changed. Expected ${
|
|
1866
|
+
`ts.createTextWriter() signature changed. Expected ${ni} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1867
1867
|
);
|
|
1868
1868
|
}
|
|
1869
1869
|
function io(e) {
|
|
@@ -1871,9 +1871,9 @@ function io(e) {
|
|
|
1871
1871
|
throw new Error(
|
|
1872
1872
|
"Failed to find ts.getNewLineCharacter() function. Lumina needs to be updated to support the new TypeScript version"
|
|
1873
1873
|
);
|
|
1874
|
-
if (e.length !==
|
|
1874
|
+
if (e.length !== si)
|
|
1875
1875
|
throw new Error(
|
|
1876
|
-
`ts.getNewLineCharacter() signature changed. Expected ${
|
|
1876
|
+
`ts.getNewLineCharacter() signature changed. Expected ${si} argument. Lumina needs to be updated to support the new TypeScript version`
|
|
1877
1877
|
);
|
|
1878
1878
|
}
|
|
1879
1879
|
function no(e) {
|
|
@@ -1881,9 +1881,9 @@ function no(e) {
|
|
|
1881
1881
|
throw new Error(
|
|
1882
1882
|
"Failed to find ts.Printer.writeFile() function. Lumina needs to be updated to support the new TypeScript version"
|
|
1883
1883
|
);
|
|
1884
|
-
if (e.length !==
|
|
1884
|
+
if (e.length !== ri)
|
|
1885
1885
|
throw new Error(
|
|
1886
|
-
`ts.Printer.writeFile() signature changed. Expected ${
|
|
1886
|
+
`ts.Printer.writeFile() signature changed. Expected ${ri} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1887
1887
|
);
|
|
1888
1888
|
}
|
|
1889
1889
|
function so(e) {
|
|
@@ -1891,17 +1891,17 @@ function so(e) {
|
|
|
1891
1891
|
throw new Error(
|
|
1892
1892
|
"Failed to find ts.Printer.writeNode() function. Lumina needs to be updated to support the new TypeScript version"
|
|
1893
1893
|
);
|
|
1894
|
-
if (e.length !==
|
|
1894
|
+
if (e.length !== oi)
|
|
1895
1895
|
throw new Error(
|
|
1896
|
-
`ts.Printer.writeNode() signature changed. Expected ${
|
|
1896
|
+
`ts.Printer.writeNode() signature changed. Expected ${oi} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1897
1897
|
);
|
|
1898
1898
|
}
|
|
1899
1899
|
function rn(e) {
|
|
1900
1900
|
const t = me.createPrinter(e);
|
|
1901
1901
|
return no(t.writeFile), so(t.writeNode), t;
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1904
|
-
const t = o.isUnionTypeNode(e) ? e.types.map(
|
|
1903
|
+
function ai(e) {
|
|
1904
|
+
const t = o.isUnionTypeNode(e) ? e.types.map(ci) : [ci(e)], i = new Set(t), n = i.delete("true"), s = i.delete("false");
|
|
1905
1905
|
(n || s) && i.add("boolean");
|
|
1906
1906
|
let r = Array.from(i).sort();
|
|
1907
1907
|
if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > ro))
|
|
@@ -1941,8 +1941,8 @@ function po(e, t) {
|
|
|
1941
1941
|
}
|
|
1942
1942
|
const uo = /"[^"]+"|'[^"]+'|\w+/gu;
|
|
1943
1943
|
function Me(e, t, i, n, s = !1) {
|
|
1944
|
-
let { typeNode: r, references: a } =
|
|
1945
|
-
c === void 0 && ({ typeNode: r, references: a } =
|
|
1944
|
+
let { typeNode: r, references: a } = di(e, t, i, n), c = ai(r);
|
|
1945
|
+
c === void 0 && ({ typeNode: r, references: a } = di(e, t, i, n, !1), c = ai(r) ?? []);
|
|
1946
1946
|
const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = on(l), p = ao(l), m = po(a, d);
|
|
1947
1947
|
return {
|
|
1948
1948
|
text: d,
|
|
@@ -1950,7 +1950,7 @@ function Me(e, t, i, n, s = !1) {
|
|
|
1950
1950
|
values: p
|
|
1951
1951
|
};
|
|
1952
1952
|
}
|
|
1953
|
-
function
|
|
1953
|
+
function ci(e) {
|
|
1954
1954
|
mo.writeNode(o.EmitHint.Unspecified, e, void 0, nt);
|
|
1955
1955
|
const t = nt.getText();
|
|
1956
1956
|
return nt.clear(), t;
|
|
@@ -1960,15 +1960,15 @@ const mo = rn({ removeComments: !0 }), nt = me.createTextWriter(`
|
|
|
1960
1960
|
function go(e, t, i, n = !0) {
|
|
1961
1961
|
const s = /* @__PURE__ */ new Map();
|
|
1962
1962
|
se(t, s, i, n);
|
|
1963
|
-
const r = t.flags & o.TypeFlags.Union ? t.types.every(
|
|
1963
|
+
const r = t.flags & o.TypeFlags.Union ? t.types.every(li) : li(t), a = e.typeToTypeNode(
|
|
1964
1964
|
t,
|
|
1965
1965
|
void 0,
|
|
1966
1966
|
yo & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
|
|
1967
1967
|
);
|
|
1968
1968
|
return s.forEach(ho), a === void 0 ? (C.warn("@arcgis/lumina", "Unexpected case: Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
|
|
1969
1969
|
}
|
|
1970
|
-
const
|
|
1971
|
-
function
|
|
1970
|
+
const li = (e) => e.flags & o.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & o.TypeFlags.PossiblyFalsy);
|
|
1971
|
+
function di(e, t, i, n, s = !0) {
|
|
1972
1972
|
const r = [], a = /* @__PURE__ */ new Set();
|
|
1973
1973
|
function c(d, p) {
|
|
1974
1974
|
const m = d.aliasSymbol ?? d.symbol;
|
|
@@ -2059,7 +2059,7 @@ function vo(e, t, i, n) {
|
|
|
2059
2059
|
name: t,
|
|
2060
2060
|
package: r,
|
|
2061
2061
|
module: a.length > 0 ? a : void 0,
|
|
2062
|
-
viewUrl: r === "@arcgis/core" && a === "interfaces.d.ts" ?
|
|
2062
|
+
viewUrl: r === "@arcgis/core" && a === "interfaces.d.ts" ? pi(e, s[0], "core") : r === "typescript" ? pi(e, s[0], "typescript") : void 0
|
|
2063
2063
|
} : {
|
|
2064
2064
|
name: t,
|
|
2065
2065
|
package: void 0,
|
|
@@ -2091,24 +2091,24 @@ function ln(e) {
|
|
|
2091
2091
|
return { packageName: s, moduleName: r };
|
|
2092
2092
|
}
|
|
2093
2093
|
const To = (e) => e.includes("/node_modules/") || e.includes("/dist/");
|
|
2094
|
-
function
|
|
2094
|
+
function pi(e, t, i) {
|
|
2095
2095
|
const n = e.declarations;
|
|
2096
2096
|
if (n !== void 0)
|
|
2097
2097
|
for (const s of n) {
|
|
2098
|
-
const r =
|
|
2098
|
+
const r = ui(s, t, i);
|
|
2099
2099
|
if (r !== void 0)
|
|
2100
2100
|
return r;
|
|
2101
2101
|
if (!("members" in s))
|
|
2102
2102
|
continue;
|
|
2103
2103
|
const a = s.members;
|
|
2104
2104
|
for (const c of a) {
|
|
2105
|
-
const l =
|
|
2105
|
+
const l = ui(c, t, i);
|
|
2106
2106
|
if (l !== void 0)
|
|
2107
2107
|
return Eo(l);
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2111
|
+
function ui(e, t, i) {
|
|
2112
2112
|
const n = e.jsDoc?.[0];
|
|
2113
2113
|
if (n !== void 0)
|
|
2114
2114
|
return ye([n, ...n.tags ?? []], ({ comment: s }) => {
|
|
@@ -2346,7 +2346,7 @@ function qo(e) {
|
|
|
2346
2346
|
}
|
|
2347
2347
|
function yn(e) {
|
|
2348
2348
|
const t = e.members.filter((r) => r.kind === "field").map((r) => {
|
|
2349
|
-
const a = typeof r.attribute == "string", c = a && r.attribute !==
|
|
2349
|
+
const a = typeof r.attribute == "string", c = a && r.attribute !== Tt(r.name);
|
|
2350
2350
|
return a && !c ? [r.name] : [r.name, c ? String(r.attribute) : ""];
|
|
2351
2351
|
}), i = e.members.filter(
|
|
2352
2352
|
(r) => r.kind === "method" && /**
|
|
@@ -2462,14 +2462,14 @@ function re(e, t) {
|
|
|
2462
2462
|
)
|
|
2463
2463
|
);
|
|
2464
2464
|
}
|
|
2465
|
-
const
|
|
2465
|
+
const At = "@arcgis/lumina-compiler";
|
|
2466
2466
|
class Je extends gs {
|
|
2467
2467
|
constructor(t, i) {
|
|
2468
2468
|
super({ isFullApiExtraction: t.isFullApiExtraction, cwd: t.dir.root }), this.context = t, this.isPathOnly = i, this.localCssImports = void 0, this.localDeclaredComponents = void 0, this.indexedComponents = /* @__PURE__ */ new Map(), this.apiComponent = void 0, this.pairedSetter = void 0, this.copyDocDefinitions = void 0, this._resolvedInheritance = /* @__PURE__ */ new Map(), this.copyDocDefinitions = t.options.documentation?.copyDefinitions;
|
|
2469
2469
|
}
|
|
2470
2470
|
extract(t) {
|
|
2471
2471
|
const i = super.extract(t);
|
|
2472
|
-
return i.compiler.name =
|
|
2472
|
+
return i.compiler.name = At, i;
|
|
2473
2473
|
}
|
|
2474
2474
|
extractModules(t) {
|
|
2475
2475
|
const i = super.extractModules(t);
|
|
@@ -2559,7 +2559,7 @@ class Je extends gs {
|
|
|
2559
2559
|
this.localCssImports = void 0;
|
|
2560
2560
|
}
|
|
2561
2561
|
ue(t.name, this.context.typeScriptTypeChecker, s);
|
|
2562
|
-
const c =
|
|
2562
|
+
const c = mt(s.name);
|
|
2563
2563
|
s.members.push({
|
|
2564
2564
|
kind: "method",
|
|
2565
2565
|
name: "componentOnReady",
|
|
@@ -2585,11 +2585,10 @@ class Je extends gs {
|
|
|
2585
2585
|
{
|
|
2586
2586
|
name: "example",
|
|
2587
2587
|
text: `\`\`\`js
|
|
2588
|
-
const ${c} = document.
|
|
2588
|
+
const ${c} = document.querySelector("${s.tagName}");
|
|
2589
2589
|
document.body.append(${c});
|
|
2590
|
-
${c}.componentOnReady()
|
|
2591
|
-
|
|
2592
|
-
});
|
|
2590
|
+
await ${c}.componentOnReady();
|
|
2591
|
+
console.log("${s.tagName} is ready to go!");
|
|
2593
2592
|
\`\`\``
|
|
2594
2593
|
}
|
|
2595
2594
|
]
|
|
@@ -2651,7 +2650,7 @@ ${c}.componentOnReady().then(() => {
|
|
|
2651
2650
|
default: void 0,
|
|
2652
2651
|
deprecated: void 0,
|
|
2653
2652
|
readonly: c || (s ? t.modifiers?.some((d) => d.kind === o.SyntaxKind.ReadonlyKeyword) : o.isGetAccessor(t) && this.pairedSetter === void 0) ? !0 : void 0,
|
|
2654
|
-
attribute: r === !1 ? void 0 : typeof r == "string" ? r :
|
|
2653
|
+
attribute: r === !1 ? void 0 : typeof r == "string" ? r : Tt(i),
|
|
2655
2654
|
reflects: a || void 0,
|
|
2656
2655
|
docsTags: void 0,
|
|
2657
2656
|
getterType: void 0,
|
|
@@ -2672,11 +2671,11 @@ ${c}.componentOnReady().then(() => {
|
|
|
2672
2671
|
* When doing full API extraction, extract additional details for a field.
|
|
2673
2672
|
*/
|
|
2674
2673
|
extractComponentFieldDetails(t, i) {
|
|
2675
|
-
const n = i.readonly === !0, s = this.context.typeScriptTypeChecker, r = s.getSymbolAtLocation(t.name), a = r === void 0 ? void 0 :
|
|
2674
|
+
const n = i.readonly === !0, s = this.context.typeScriptTypeChecker, r = s.getSymbolAtLocation(t.name), a = r === void 0 ? void 0 : Wt(s, r), c = new Set(a?.docsTags.map((h) => h.name) ?? []);
|
|
2676
2675
|
ue(t.name, this.context.typeScriptTypeChecker, i, a);
|
|
2677
2676
|
let l = !n && i.readonly === !0;
|
|
2678
2677
|
const d = this.pairedSetter ?? t, p = i.default;
|
|
2679
|
-
|
|
2678
|
+
_t(t, i, this.file);
|
|
2680
2679
|
const m = p === void 0 && i.default === "true", f = i.docsTags?.some((h) => h.name === "required") ?? !1;
|
|
2681
2680
|
i.type = // Messages overrides type can be verbose, so we display a simplified type
|
|
2682
2681
|
// in the documentation. The full type is still present in the .d.ts files.
|
|
@@ -2687,7 +2686,7 @@ ${c}.componentOnReady().then(() => {
|
|
|
2687
2686
|
if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || y) {
|
|
2688
2687
|
const h = t.initializer, v = s.getSymbolAtLocation(h), S = v !== void 0 && ((v.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? s.getAliasedSymbol(v) : v, T = S?.getDeclarations() ?? [];
|
|
2689
2688
|
if (S !== void 0) {
|
|
2690
|
-
const $ =
|
|
2689
|
+
const $ = Wt(s, S);
|
|
2691
2690
|
if ($.docsTags.length > 0) {
|
|
2692
2691
|
$.docsTags = $.docsTags.filter(
|
|
2693
2692
|
(E) => !c.has(E.name) || vs.has(E.name)
|
|
@@ -2704,7 +2703,7 @@ ${c}.componentOnReady().then(() => {
|
|
|
2704
2703
|
if (x ??= o.isGetAccessor($) ? $ : void 0, L ??= o.isSetAccessor($) ? $ : void 0, !("initializer" in $))
|
|
2705
2704
|
return;
|
|
2706
2705
|
const b = $;
|
|
2707
|
-
l ||= b.modifiers?.some((E) => E.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1,
|
|
2706
|
+
l ||= b.modifiers?.some((E) => E.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, _t(b, i, b.getSourceFile());
|
|
2708
2707
|
}), y && x !== void 0 && L !== void 0 && x.type?.getText() !== L.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${h.getText(this.file)}` });
|
|
2709
2708
|
}
|
|
2710
2709
|
if (l && (i.readonly = !0, n || (i.docsOnlyReadonly = !0)), i.type.values && i.type.values.length > 0 && i.type.values?.every((h) => h.type === "boolean") && (i.default ? m && this.context.viteCommand === "build" && i.deprecated === void 0 && (Je.loggedBooleanWarning || this.context.logLintWarning(
|
|
@@ -2722,11 +2721,11 @@ ${c}.componentOnReady().then(() => {
|
|
|
2722
2721
|
* Find the properties given to the `@property()` decorator.
|
|
2723
2722
|
*/
|
|
2724
2723
|
findPropertyOptions(t) {
|
|
2725
|
-
const i =
|
|
2724
|
+
const i = Ht(t, "property");
|
|
2726
2725
|
return i === void 0 ? void 0 : i.arguments?.find(o.isObjectLiteralExpression)?.properties ?? [];
|
|
2727
2726
|
}
|
|
2728
2727
|
extractComponentMethod(t, i) {
|
|
2729
|
-
if (
|
|
2728
|
+
if (Ht(t, "method") === void 0)
|
|
2730
2729
|
return;
|
|
2731
2730
|
const n = {
|
|
2732
2731
|
kind: "method",
|
|
@@ -2840,7 +2839,7 @@ const le = {
|
|
|
2840
2839
|
package: "@arcgis/lumina"
|
|
2841
2840
|
}, st = (e, t) => e.name.localeCompare(t.name);
|
|
2842
2841
|
async function ta(e, t) {
|
|
2843
|
-
t || (e.componentFilesPromise =
|
|
2842
|
+
t || (e.componentFilesPromise = kt(e, e.dir.srcComponents));
|
|
2844
2843
|
const i = await e.componentFilesPromise, n = await pa(e, i);
|
|
2845
2844
|
await e.componentStoriesPromise, e._componentPathMapping = {}, e._localDefinedComponents = void 0;
|
|
2846
2845
|
const s = gn(n, e, !1);
|
|
@@ -2935,19 +2934,16 @@ function Ie(e, t, i) {
|
|
|
2935
2934
|
0
|
|
2936
2935
|
), e.text = e.text.replaceAll(
|
|
2937
2936
|
da,
|
|
2938
|
-
(n, s) =>
|
|
2937
|
+
(n, s) => It(t.get(s)) ?? n
|
|
2939
2938
|
), e.values?.forEach(oa, t));
|
|
2940
2939
|
}
|
|
2941
2940
|
function O(e, t, i) {
|
|
2942
|
-
if (e.description && (e.description = e.description.replaceAll(
|
|
2941
|
+
if (e.description && (e.description = e.description.replaceAll(rt, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl)), e.docsTags)
|
|
2943
2942
|
for (const n of e.docsTags)
|
|
2944
|
-
n.text && (n.text = n.text.replaceAll(
|
|
2945
|
-
typeof e.deprecated == "string" && (e.deprecated = e.deprecated.replaceAll(
|
|
2946
|
-
i.alternativeDocumentationUrl,
|
|
2947
|
-
i.normalizedDocumentationUrl
|
|
2948
|
-
));
|
|
2943
|
+
n.text && (n.text = n.text.replaceAll(rt, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
|
|
2944
|
+
typeof e.deprecated == "string" && (e.deprecated = e.deprecated.replaceAll(rt, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
|
|
2949
2945
|
}
|
|
2950
|
-
const
|
|
2946
|
+
const rt = /\{@link ([^}]+)\}/gu, sa = (e, t) => (i, n) => {
|
|
2951
2947
|
let s = n.indexOf(" ");
|
|
2952
2948
|
s === -1 && (s = n.length);
|
|
2953
2949
|
const r = n.slice(0, s), a = n.slice(s + 1);
|
|
@@ -2983,7 +2979,7 @@ function ra(e, t, i, n) {
|
|
|
2983
2979
|
const s = t.get(e.name);
|
|
2984
2980
|
if (s !== void 0) {
|
|
2985
2981
|
const r = e.name.length;
|
|
2986
|
-
e.name =
|
|
2982
|
+
e.name = It(s);
|
|
2987
2983
|
const a = e.name.length - r - mi;
|
|
2988
2984
|
e.viewUrl = s.demos?.at(0)?.url.replace(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl), e.start = e.start - mi, e.end = e.end + a, n += a - la;
|
|
2989
2985
|
}
|
|
@@ -2991,9 +2987,9 @@ function ra(e, t, i, n) {
|
|
|
2991
2987
|
return n;
|
|
2992
2988
|
}
|
|
2993
2989
|
function oa(e) {
|
|
2994
|
-
e.type.startsWith("ToElement<") && (e.type =
|
|
2990
|
+
e.type.startsWith("ToElement<") && (e.type = It(this.get(e.type.slice(10, -1))) ?? e.type);
|
|
2995
2991
|
}
|
|
2996
|
-
const
|
|
2992
|
+
const It = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, aa = "ToElement<", mi = aa.length, ca = ">", la = ca.length, da = /ToElement<(\w+)>/gu;
|
|
2997
2993
|
async function pa(e, t) {
|
|
2998
2994
|
if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
|
|
2999
2995
|
const i = e.typeScriptProgram.getSourceFiles(), n = new Set(t);
|
|
@@ -3010,30 +3006,30 @@ async function vn(e) {
|
|
|
3010
3006
|
return ve ??= ma(e), await ve;
|
|
3011
3007
|
}
|
|
3012
3008
|
function ua() {
|
|
3013
|
-
if (
|
|
3009
|
+
if (ht === void 0)
|
|
3014
3010
|
throw Error(
|
|
3015
3011
|
w(
|
|
3016
3012
|
"@arcgis/lumina:retrieveComponentDependencies",
|
|
3017
3013
|
"Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
|
|
3018
3014
|
)
|
|
3019
3015
|
);
|
|
3020
|
-
return
|
|
3016
|
+
return ht;
|
|
3021
3017
|
}
|
|
3022
3018
|
function Sn() {
|
|
3023
|
-
if (
|
|
3019
|
+
if (vt === void 0)
|
|
3024
3020
|
throw Error(
|
|
3025
3021
|
w(
|
|
3026
3022
|
"@arcgis/lumina:retrieveFlatComponentDependencies",
|
|
3027
3023
|
"Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
|
|
3028
3024
|
)
|
|
3029
3025
|
);
|
|
3030
|
-
return
|
|
3026
|
+
return vt;
|
|
3031
3027
|
}
|
|
3032
3028
|
async function ma(e) {
|
|
3033
3029
|
const t = R(e), i = t.dependencies ?? {}, n = t.peerDependencies ?? {}, r = (await Promise.all(
|
|
3034
3030
|
[...Object.keys(i), ...Object.keys(n)].filter((a) => !fa.has(a)).flatMap(async (a) => await bn(a, e))
|
|
3035
3031
|
)).filter(j);
|
|
3036
|
-
return
|
|
3032
|
+
return ht ??= r, vt = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
|
|
3037
3033
|
}
|
|
3038
3034
|
const fa = /* @__PURE__ */ new Set([
|
|
3039
3035
|
"@arcgis/arcade-languageservice",
|
|
@@ -3071,7 +3067,7 @@ const fa = /* @__PURE__ */ new Set([
|
|
|
3071
3067
|
"vscode-languageserver-textdocument",
|
|
3072
3068
|
"vscode-languageserver-types"
|
|
3073
3069
|
]);
|
|
3074
|
-
let
|
|
3070
|
+
let ht, vt, ve;
|
|
3075
3071
|
async function bn(e, t) {
|
|
3076
3072
|
const i = await _e(e, t), n = await He(i), s = "exports" in n, r = ba.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
|
|
3077
3073
|
if (a ? await U(c) : !1) {
|
|
@@ -3133,7 +3129,7 @@ function wn(e, t) {
|
|
|
3133
3129
|
}
|
|
3134
3130
|
return i;
|
|
3135
3131
|
}
|
|
3136
|
-
const ga = (e) => e.compiler?.name ===
|
|
3132
|
+
const ga = (e) => e.compiler?.name === At, ha = (e, t) => Object.fromEntries(
|
|
3137
3133
|
(e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
|
|
3138
3134
|
(i) => [
|
|
3139
3135
|
i.name,
|
|
@@ -3174,7 +3170,7 @@ const ga = (e) => e.compiler?.name === kt, ha = (e, t) => Object.fromEntries(
|
|
|
3174
3170
|
}
|
|
3175
3171
|
];
|
|
3176
3172
|
})
|
|
3177
|
-
), ba = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, wa = (e) => e.startsWith("/") ? e : `/${e}`,
|
|
3173
|
+
), ba = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, wa = (e) => e.startsWith("/") ? e : `/${e}`, Lt = (e, t) => `${e}@fs${wa(t)}`;
|
|
3178
3174
|
function Ge(e = R(), t = !1, i = e.name === "@esri/calcite-components") {
|
|
3179
3175
|
const n = e.version.includes("next"), s = e.name === "@esri/calcite-components";
|
|
3180
3176
|
if (s && n)
|
|
@@ -3278,7 +3274,7 @@ const Aa = /* @__PURE__ */ new Set([
|
|
|
3278
3274
|
property(e, t, i, n) {
|
|
3279
3275
|
const s = Fa(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
|
|
3280
3276
|
if (a) {
|
|
3281
|
-
const f =
|
|
3277
|
+
const f = at(t);
|
|
3282
3278
|
if (f === !0)
|
|
3283
3279
|
return [s.name];
|
|
3284
3280
|
if (f === !1)
|
|
@@ -3300,7 +3296,7 @@ const Aa = /* @__PURE__ */ new Set([
|
|
|
3300
3296
|
return [`.${i}`, ...c];
|
|
3301
3297
|
},
|
|
3302
3298
|
attribute(e, t, i) {
|
|
3303
|
-
const n = t === void 0 ||
|
|
3299
|
+
const n = t === void 0 || at(t);
|
|
3304
3300
|
if (n === !0)
|
|
3305
3301
|
return [i];
|
|
3306
3302
|
if (n === !1)
|
|
@@ -3309,7 +3305,7 @@ const Aa = /* @__PURE__ */ new Set([
|
|
|
3309
3305
|
return [i, ...a];
|
|
3310
3306
|
},
|
|
3311
3307
|
booleanAttribute(e, t, i) {
|
|
3312
|
-
const n = t === void 0 ||
|
|
3308
|
+
const n = t === void 0 || at(t);
|
|
3313
3309
|
return n === !0 ? [i] : n === !1 ? [] : [`?${i}`, ...Ne(e, t, !1)];
|
|
3314
3310
|
},
|
|
3315
3311
|
event(e, t, i) {
|
|
@@ -3317,8 +3313,8 @@ const Aa = /* @__PURE__ */ new Set([
|
|
|
3317
3313
|
throw new Error(
|
|
3318
3314
|
`Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
|
|
3319
3315
|
);
|
|
3320
|
-
const n = i.slice(2), s =
|
|
3321
|
-
return [`@${en.has(s) ? n.toLowerCase() :
|
|
3316
|
+
const n = i.slice(2), s = mt(n);
|
|
3317
|
+
return [`@${en.has(s) ? n.toLowerCase() : mt(n)}=`, ...Dt(e, t, void 0)];
|
|
3322
3318
|
},
|
|
3323
3319
|
directives(e, t) {
|
|
3324
3320
|
if (t === void 0 || !o.isJsxExpression(t))
|
|
@@ -3352,11 +3348,11 @@ const Aa = /* @__PURE__ */ new Set([
|
|
|
3352
3348
|
},
|
|
3353
3349
|
class: hi,
|
|
3354
3350
|
style: hi,
|
|
3355
|
-
key: (e, t) => [
|
|
3351
|
+
key: (e, t) => [Ft(t, e.sourceFile)],
|
|
3356
3352
|
deferLoad(e, t, i, n) {
|
|
3357
3353
|
if (typeof n != "string")
|
|
3358
3354
|
throw Error("deferLoad prop is not currently supported on dynamic tag names.");
|
|
3359
|
-
if (!
|
|
3355
|
+
if (!xt(n))
|
|
3360
3356
|
throw Error(`deferLoad prop is only supported on custom elements. Found ${String(n)}`);
|
|
3361
3357
|
e.neededImports.add("deferLoad");
|
|
3362
3358
|
const s = e.importRenames.deferLoad;
|
|
@@ -3369,22 +3365,22 @@ function Fa(e, t, i) {
|
|
|
3369
3365
|
if (r !== void 0)
|
|
3370
3366
|
return { name: r, type: "reflected" };
|
|
3371
3367
|
}
|
|
3372
|
-
const n =
|
|
3368
|
+
const n = ot(W.common, t);
|
|
3373
3369
|
if (n !== void 0)
|
|
3374
3370
|
return n;
|
|
3375
3371
|
if (typeof e == "string") {
|
|
3376
|
-
const s =
|
|
3372
|
+
const s = ot(W.perElement[e], t);
|
|
3377
3373
|
if (s !== void 0)
|
|
3378
3374
|
return s;
|
|
3379
3375
|
} else {
|
|
3380
3376
|
const s = Object.values(W.perElement).map(
|
|
3381
|
-
(a) =>
|
|
3377
|
+
(a) => ot(a, t)
|
|
3382
3378
|
), r = ye(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? ye(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
|
|
3383
3379
|
if (r !== void 0)
|
|
3384
3380
|
return r;
|
|
3385
3381
|
}
|
|
3386
3382
|
}
|
|
3387
|
-
function
|
|
3383
|
+
function ot(e, t) {
|
|
3388
3384
|
const i = e?.reflected?.[t];
|
|
3389
3385
|
if (i !== void 0)
|
|
3390
3386
|
return { name: i, type: "reflected" };
|
|
@@ -3395,14 +3391,14 @@ function rt(e, t) {
|
|
|
3395
3391
|
if (s !== void 0)
|
|
3396
3392
|
return { name: s, type: "stringifiedNonReflected" };
|
|
3397
3393
|
}
|
|
3398
|
-
function
|
|
3394
|
+
function Ft(e, t) {
|
|
3399
3395
|
if (e !== void 0 && o.isJsxExpression(e) && e.expression !== void 0)
|
|
3400
3396
|
return e.expression;
|
|
3401
3397
|
if (e !== void 0 && o.isStringLiteral(e))
|
|
3402
3398
|
return e;
|
|
3403
3399
|
throw new Error(`key prop value must be an expression. Found ${String(e?.getText(t))}`);
|
|
3404
3400
|
}
|
|
3405
|
-
function
|
|
3401
|
+
function at(e) {
|
|
3406
3402
|
if (e === void 0)
|
|
3407
3403
|
return !0;
|
|
3408
3404
|
if (o.isJsxExpression(e)) {
|
|
@@ -3429,7 +3425,7 @@ function Ne(e, t, i = !1) {
|
|
|
3429
3425
|
return [`=${t.expression.getText(e.sourceFile)}`];
|
|
3430
3426
|
}
|
|
3431
3427
|
}
|
|
3432
|
-
return ["=", ...
|
|
3428
|
+
return ["=", ...Dt(e, t, void 0)];
|
|
3433
3429
|
}
|
|
3434
3430
|
function gi(e, t) {
|
|
3435
3431
|
if (!t)
|
|
@@ -3494,10 +3490,10 @@ const vi = {
|
|
|
3494
3490
|
bindEvent: "event"
|
|
3495
3491
|
};
|
|
3496
3492
|
function Ra(e, t, i) {
|
|
3497
|
-
return Oa.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (Qi.has(e) || e.includes("-")) && (e !== "itemId" || i !== "arcgis-map" && i !== "arcgis-scene") ? "attribute" : !
|
|
3493
|
+
return Oa.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (Qi.has(e) || e.includes("-")) && (e !== "itemId" || i !== "arcgis-map" && i !== "arcgis-scene") ? "attribute" : !xt(i) && (Zi.has(e) || (i === yt ? !1 : i === Re ? (
|
|
3498
3494
|
// When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
|
|
3499
|
-
Object.values(
|
|
3500
|
-
) :
|
|
3495
|
+
Object.values(gt).some((r) => r.has(e))
|
|
3496
|
+
) : gt[i]?.has(e) === !0)) ? ei.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === yt || i !== Re && ($t.has(i) || Pt.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : ei.has(e) ? "booleanAttribute" : "attribute" : "property";
|
|
3501
3497
|
}
|
|
3502
3498
|
const Ma = ["class", "style", "ref", "directives", "key", "deferLoad"], Oa = new Set(Ma), Ja = (e) => typeof e != "string" || e.trim().length > 0;
|
|
3503
3499
|
function Ve({ key: e, parts: t, litTag: i }, n) {
|
|
@@ -3509,9 +3505,9 @@ function Ve({ key: e, parts: t, litTag: i }, n) {
|
|
|
3509
3505
|
throw new Error("First normalized template part must be a string");
|
|
3510
3506
|
if (i === void 0) {
|
|
3511
3507
|
if (a.length === 0)
|
|
3512
|
-
return
|
|
3508
|
+
return ct(n, e, o.factory.createStringLiteral(r));
|
|
3513
3509
|
if (r === "" && a.length === 2 && a[1] === "")
|
|
3514
|
-
return
|
|
3510
|
+
return ct(
|
|
3515
3511
|
n,
|
|
3516
3512
|
e,
|
|
3517
3513
|
typeof a[0] == "string" ? o.factory.createStringLiteral(r) : a[0]
|
|
@@ -3527,7 +3523,7 @@ function Ve({ key: e, parts: t, litTag: i }, n) {
|
|
|
3527
3523
|
Ba(a)
|
|
3528
3524
|
)
|
|
3529
3525
|
);
|
|
3530
|
-
return
|
|
3526
|
+
return ct(n, e, p);
|
|
3531
3527
|
}
|
|
3532
3528
|
const Ka = (e) => e.reduce(
|
|
3533
3529
|
(t, i, n) => {
|
|
@@ -3564,7 +3560,7 @@ function Ba(e) {
|
|
|
3564
3560
|
);
|
|
3565
3561
|
});
|
|
3566
3562
|
}
|
|
3567
|
-
function
|
|
3563
|
+
function ct(e, t, i) {
|
|
3568
3564
|
if (t === void 0)
|
|
3569
3565
|
return i;
|
|
3570
3566
|
e.neededImports.add("keyed");
|
|
@@ -3573,7 +3569,7 @@ function at(e, t, i) {
|
|
|
3573
3569
|
}
|
|
3574
3570
|
const Pn = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
|
|
3575
3571
|
function xn(e, t) {
|
|
3576
|
-
const i =
|
|
3572
|
+
const i = Nt(e);
|
|
3577
3573
|
return i.length === 0 ? t : o.setSyntheticLeadingComments(
|
|
3578
3574
|
t,
|
|
3579
3575
|
i.map((n) => ({
|
|
@@ -3584,9 +3580,9 @@ function xn(e, t) {
|
|
|
3584
3580
|
}))
|
|
3585
3581
|
);
|
|
3586
3582
|
}
|
|
3587
|
-
const
|
|
3583
|
+
const Nt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
|
|
3588
3584
|
function Wa(e) {
|
|
3589
|
-
const t =
|
|
3585
|
+
const t = Nt(e);
|
|
3590
3586
|
if (t.length === 0)
|
|
3591
3587
|
return [e || " "];
|
|
3592
3588
|
const i = t.reduceRight(
|
|
@@ -3649,7 +3645,7 @@ function Ha(e, t) {
|
|
|
3649
3645
|
const f = p.attributes.properties[m];
|
|
3650
3646
|
if (f === void 0 || !o.isJsxAttribute(f))
|
|
3651
3647
|
return t;
|
|
3652
|
-
const y =
|
|
3648
|
+
const y = Ft(f.initializer, e.sourceFile), g = Ua(r, n, y, l, e);
|
|
3653
3649
|
if (g === void 0)
|
|
3654
3650
|
return t;
|
|
3655
3651
|
e.liftedKeys.add(f.name), e.neededImports.add("repeat");
|
|
@@ -3834,7 +3830,7 @@ function Nn(e, t) {
|
|
|
3834
3830
|
...$
|
|
3835
3831
|
};
|
|
3836
3832
|
}
|
|
3837
|
-
const c = r.text === tt ? Re : r.text === it ?
|
|
3833
|
+
const c = r.text === tt ? Re : r.text === it ? yt : r.text, l = r.text === tt ? ae : r.text === it ? Z : Nr.has(c) ? Tn : $t.has(c) ? oe : ce, d = xt(c);
|
|
3838
3834
|
let p;
|
|
3839
3835
|
d && e.compiler.viteCommand === "build" && (p = ic(e, c));
|
|
3840
3836
|
let m;
|
|
@@ -3866,7 +3862,7 @@ Found ${L.getText(e.sourceFile)}`
|
|
|
3866
3862
|
"mustIncludeAllRequiredProperties",
|
|
3867
3863
|
e.sourceFile.fileName,
|
|
3868
3864
|
`Missing required properties for <${c}> }: ${Array.from(p).join(", ")}`
|
|
3869
|
-
), f.length > 0 && g.push(...f), typeof c == "string" &&
|
|
3865
|
+
), f.length > 0 && g.push(...f), typeof c == "string" && Pt.has(c))
|
|
3870
3866
|
throw Error(
|
|
3871
3867
|
`JSX syntax for MathML elements is not yet supported. If you need it, please request it. Otherwise, use the \`math\` function from Lit directly. Tried to use the "${c}" element`
|
|
3872
3868
|
);
|
|
@@ -3897,7 +3893,7 @@ Found ${L.getText(e.sourceFile)}`
|
|
|
3897
3893
|
}
|
|
3898
3894
|
function Ya(e, t) {
|
|
3899
3895
|
const i = e.attributes.properties[Dn(e)];
|
|
3900
|
-
return i && o.isJsxAttribute(i) && !Ln(i.name, t) ?
|
|
3896
|
+
return i && o.isJsxAttribute(i) && !Ln(i.name, t) ? Ft(i.initializer, t.sourceFile) : void 0;
|
|
3901
3897
|
}
|
|
3902
3898
|
const Dn = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
|
|
3903
3899
|
function ec(e, t, i, n) {
|
|
@@ -3927,7 +3923,7 @@ function De(e, t) {
|
|
|
3927
3923
|
if (o.isJsxText(s))
|
|
3928
3924
|
return [t.compiler.shouldMinifyJsx ? qr(s.text) : s.text];
|
|
3929
3925
|
if (o.isJsxExpression(s))
|
|
3930
|
-
return
|
|
3926
|
+
return Dt(t, s, s);
|
|
3931
3927
|
{
|
|
3932
3928
|
const r = Nn(t, s);
|
|
3933
3929
|
if (r.key === void 0 && r.litTag !== ae && r.litTag !== Z) {
|
|
@@ -3951,12 +3947,12 @@ function tc(e) {
|
|
|
3951
3947
|
o.factory.createStringLiteral("")
|
|
3952
3948
|
) : e;
|
|
3953
3949
|
}
|
|
3954
|
-
function
|
|
3950
|
+
function Dt(e, t, i) {
|
|
3955
3951
|
if (t.expression === void 0) {
|
|
3956
3952
|
if (e.compiler.shouldMinifyJsx)
|
|
3957
3953
|
return [];
|
|
3958
3954
|
const n = t.getText(e.sourceFile).slice(1, -1);
|
|
3959
|
-
return
|
|
3955
|
+
return Nt(n).length === 0 ? [] : [xn(n, o.factory.createIdentifier("undefined"))];
|
|
3960
3956
|
}
|
|
3961
3957
|
return o.isStringLiteral(t.expression) ? [nn(t.expression.text)] : (
|
|
3962
3958
|
/**
|
|
@@ -4264,7 +4260,7 @@ function gc(e, t) {
|
|
|
4264
4260
|
return !0;
|
|
4265
4261
|
const d = l.name.text, p = l.initializer, m = p.kind === o.SyntaxKind.TrueKeyword, f = p.kind === o.SyntaxKind.FalseKeyword;
|
|
4266
4262
|
if (d === "attribute")
|
|
4267
|
-
return n = !1, i |= m ?
|
|
4263
|
+
return n = !1, i |= m ? Ut : 0, !m && !f;
|
|
4268
4264
|
if (d === "reflect")
|
|
4269
4265
|
return i |= m ? Is : 0, !1;
|
|
4270
4266
|
if (d === "type" && o.isIdentifier(p)) {
|
|
@@ -4281,7 +4277,7 @@ function gc(e, t) {
|
|
|
4281
4277
|
}
|
|
4282
4278
|
return !0;
|
|
4283
4279
|
}
|
|
4284
|
-
n && (i |=
|
|
4280
|
+
n && (i |= Ut);
|
|
4285
4281
|
const c = o.factory.createNumericLiteral(i);
|
|
4286
4282
|
return s.length === 0 && (t || r.length === 0) ? c : o.factory.createArrayLiteralExpression([
|
|
4287
4283
|
c,
|
|
@@ -4393,7 +4389,7 @@ function Tc(e, t, i, n) {
|
|
|
4393
4389
|
throw Error(
|
|
4394
4390
|
`Failed to statically determine the property name: ${t.getText(n)} in ${i} in ${n.fileName}`
|
|
4395
4391
|
);
|
|
4396
|
-
r.name = a, r.attribute ??=
|
|
4392
|
+
r.name = a, r.attribute ??= Tt(a);
|
|
4397
4393
|
}
|
|
4398
4394
|
return r;
|
|
4399
4395
|
}
|
|
@@ -4530,12 +4526,12 @@ function $c(e, t, i, n, s) {
|
|
|
4530
4526
|
}
|
|
4531
4527
|
return o.isPropertyDeclaration(t) || o.isAccessor(t) ? wc(e, t, i, n, s) : t;
|
|
4532
4528
|
}
|
|
4533
|
-
const Pc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method",
|
|
4534
|
-
|
|
4529
|
+
const Pc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", St = "@arcgis/core", lt = R(), Ce = St in (lt.dependencies ?? {}) || St in (lt.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
|
|
4530
|
+
lt.name === "@arcgis/lumina";
|
|
4535
4531
|
async function xc(e, t) {
|
|
4536
4532
|
if (!Ce)
|
|
4537
4533
|
return [];
|
|
4538
|
-
const i = await _e(
|
|
4534
|
+
const i = await _e(St);
|
|
4539
4535
|
if (t === "cdn") {
|
|
4540
4536
|
const n = await He(i), s = Ge({ name: "", version: n.version }, !0);
|
|
4541
4537
|
return [
|
|
@@ -4556,7 +4552,7 @@ async function xc(e, t) {
|
|
|
4556
4552
|
Ei(s)
|
|
4557
4553
|
];
|
|
4558
4554
|
} else
|
|
4559
|
-
return [Ei(
|
|
4555
|
+
return [Ei(Lt(e, `${i}/assets/`))];
|
|
4560
4556
|
}
|
|
4561
4557
|
const Ei = (e) => ({
|
|
4562
4558
|
// Not using join() because it would turn https:// into https:/
|
|
@@ -4603,7 +4599,7 @@ const Ic = [
|
|
|
4603
4599
|
order: "pre",
|
|
4604
4600
|
async handler(t, i) {
|
|
4605
4601
|
if (!i.endsWith(".tsx")) {
|
|
4606
|
-
if (e.isInTest && i.endsWith(".ts") &&
|
|
4602
|
+
if (e.isInTest && i.endsWith(".ts") && Ct(i) && t.includes("extends LitElement"))
|
|
4607
4603
|
C.warn(
|
|
4608
4604
|
$i,
|
|
4609
4605
|
"It looks like you may be trying to define a component inside a test file. This is supported, but you must use the .tsx file extension for you test",
|
|
@@ -4711,7 +4707,7 @@ function Dc(e, t) {
|
|
|
4711
4707
|
if (e.isInStorybook && e.viteCommand === "serve") {
|
|
4712
4708
|
const i = (a, c, l, ...d) => {
|
|
4713
4709
|
const p = a.filter(
|
|
4714
|
-
(m) => (!m.includes(".stories.") || m.endsWith(".tsx")) && !
|
|
4710
|
+
(m) => (!m.includes(".stories.") || m.endsWith(".tsx")) && !Ct(m)
|
|
4715
4711
|
);
|
|
4716
4712
|
return e.typeScriptHost = l, o.createAbstractBuilder(p, c, l, ...d);
|
|
4717
4713
|
}, n = o.createWatchCompilerHost(
|
|
@@ -4781,7 +4777,7 @@ const _n = /* @__PURE__ */ new Set([
|
|
|
4781
4777
|
"collection",
|
|
4782
4778
|
"extras",
|
|
4783
4779
|
"support"
|
|
4784
|
-
]), _ = "@arcgis/lumina:buildCdn",
|
|
4780
|
+
]), _ = "@arcgis/lumina:buildCdn", jt = "cdn", Hn = "index", we = "main";
|
|
4785
4781
|
function Rc(e) {
|
|
4786
4782
|
const { skip: t = !1, namespace: i, esbuildOptions: n = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination, r = i !== void 0;
|
|
4787
4783
|
if (r) {
|
|
@@ -5001,8 +4997,8 @@ function Un(e, t) {
|
|
|
5001
4997
|
if (I !== void 0) {
|
|
5002
4998
|
const xe = [];
|
|
5003
4999
|
for (const Ye of I.slice(1, -1).split(",")) {
|
|
5004
|
-
const [
|
|
5005
|
-
G || r.add(
|
|
5000
|
+
const [Jt, Kt = Jt] = Ye.split(" as ");
|
|
5001
|
+
G || r.add(Kt), xe.push(`${Jt}:${Kt}`);
|
|
5006
5002
|
}
|
|
5007
5003
|
if (G) {
|
|
5008
5004
|
const Ye = K.oldSingleExportName === void 0 ? `{${xe.join(",")}}` : xe[0].split(":")[1];
|
|
@@ -5091,9 +5087,9 @@ function Hc(e) {
|
|
|
5091
5087
|
}
|
|
5092
5088
|
};
|
|
5093
5089
|
}
|
|
5094
|
-
const Gn = 0,
|
|
5090
|
+
const Gn = 0, Rt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Vn = `${Rt}0123456789`, Uc = Rt.length, zc = Vn.length;
|
|
5095
5091
|
function qc(e) {
|
|
5096
|
-
let t =
|
|
5092
|
+
let t = Rt[e[0]];
|
|
5097
5093
|
for (let i = 1; i < e.length; i++)
|
|
5098
5094
|
t += Vn[e[i]];
|
|
5099
5095
|
return t;
|
|
@@ -5147,7 +5143,7 @@ async function Vc(e, t, i, n) {
|
|
|
5147
5143
|
...d,
|
|
5148
5144
|
`import { defineCustomElements as defineCustomElements$${n} } from "${p}";`,
|
|
5149
5145
|
`defineCustomElements$${n}(globalThis.window, {`,
|
|
5150
|
-
` resourcesUrl: "${
|
|
5146
|
+
` resourcesUrl: "${Lt(e, r)}/dist/${c}/",`,
|
|
5151
5147
|
"});"
|
|
5152
5148
|
]
|
|
5153
5149
|
}
|
|
@@ -5180,7 +5176,7 @@ async function Xc(e, t, i, n) {
|
|
|
5180
5176
|
}
|
|
5181
5177
|
};
|
|
5182
5178
|
}
|
|
5183
|
-
const l = c?.cdnName ??
|
|
5179
|
+
const l = c?.cdnName ?? jt, d = Qc(a), p = `${s}/${u.normalize(d)}${Q}`, m = [
|
|
5184
5180
|
`import styles$${n} from "${p}";`,
|
|
5185
5181
|
`document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
|
|
5186
5182
|
], f = `${s}/loader`;
|
|
@@ -5194,7 +5190,7 @@ async function Xc(e, t, i, n) {
|
|
|
5194
5190
|
...m,
|
|
5195
5191
|
`import { defineCustomElements as defineCustomElements$${n} } from "${f}";`,
|
|
5196
5192
|
`defineCustomElements$${n}({`,
|
|
5197
|
-
` resourcesUrl: "${
|
|
5193
|
+
` resourcesUrl: "${Lt(e, r)}/dist/${l}/",`,
|
|
5198
5194
|
"});"
|
|
5199
5195
|
]
|
|
5200
5196
|
};
|
|
@@ -5237,7 +5233,7 @@ async function Zc(e) {
|
|
|
5237
5233
|
javascriptCode: [
|
|
5238
5234
|
`import { defineCustomElements } from "${a}";`,
|
|
5239
5235
|
"globalThis.devOnly$ownTagNames = new Set();",
|
|
5240
|
-
`defineCustomElements(${t === "cdn" ? `{resourcesUrl:"./${e.options.build?.cdn?.namespace ??
|
|
5236
|
+
`defineCustomElements(${t === "cdn" ? `{resourcesUrl:"./${e.options.build?.cdn?.namespace ?? jt}/"}` : ""});`
|
|
5241
5237
|
]
|
|
5242
5238
|
}
|
|
5243
5239
|
];
|
|
@@ -5261,7 +5257,7 @@ async function Qn(e) {
|
|
|
5261
5257
|
})
|
|
5262
5258
|
).then((i) => i.filter(j)), await e._serveOnlyDependencies);
|
|
5263
5259
|
}
|
|
5264
|
-
const Zn = "/@arcgis/lumina-compiler/testSetupFile",
|
|
5260
|
+
const Zn = "/@arcgis/lumina-compiler/testSetupFile", dt = [Zn];
|
|
5265
5261
|
async function Yc(e) {
|
|
5266
5262
|
if (!e.viteConfig.test?.browser?.enabled)
|
|
5267
5263
|
return ki(e);
|
|
@@ -5337,7 +5333,7 @@ function il(e) {
|
|
|
5337
5333
|
);
|
|
5338
5334
|
}), g.watcher.on("add", h), g.watcher.on("unlink", h), g.watcher.on(
|
|
5339
5335
|
"addDir",
|
|
5340
|
-
(v) => v.startsWith(e.dir.srcComponents) ? void
|
|
5336
|
+
(v) => v.startsWith(e.dir.srcComponents) ? void kt(e, e.dir.srcComponents, v).then(
|
|
5341
5337
|
(S) => S.length > 0 ? m() : void 0
|
|
5342
5338
|
) : void 0
|
|
5343
5339
|
), g.watcher.on("unlinkDir", (v) => {
|
|
@@ -5405,10 +5401,10 @@ function il(e) {
|
|
|
5405
5401
|
});
|
|
5406
5402
|
return d;
|
|
5407
5403
|
}
|
|
5408
|
-
const
|
|
5409
|
-
function fe(e, t, i =
|
|
5404
|
+
const bt = "@arcgis/lumina:provideAssets";
|
|
5405
|
+
function fe(e, t, i = Mt) {
|
|
5410
5406
|
if (e.viteCommand !== "serve")
|
|
5411
|
-
throw Error(w(
|
|
5407
|
+
throw Error(w(bt, "serveAssets() is only available when Vite is running in serve mode"));
|
|
5412
5408
|
const n = e._serverConfigured, s = e.server.middlewares.stack.length;
|
|
5413
5409
|
if (t.forEach((r) => {
|
|
5414
5410
|
const a = es(r), c = is(e.dir, ts(a)), l = sl(e.viteConfig.base, c, e.dir.distCdn);
|
|
@@ -5419,7 +5415,7 @@ function fe(e, t, i = Rt) {
|
|
|
5419
5415
|
p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Os.lookup(f) || "application/octet-stream"), p.write(S), p.end();
|
|
5420
5416
|
}).catch((v) => {
|
|
5421
5417
|
(a.type !== "directory" || process.env.DEBUG) && C.warn(
|
|
5422
|
-
|
|
5418
|
+
bt,
|
|
5423
5419
|
`Error occurred when trying to serve a file in response to request for "${d.originalUrl ?? f}":${String(v)}`
|
|
5424
5420
|
), m();
|
|
5425
5421
|
}), !0;
|
|
@@ -5429,7 +5425,7 @@ function fe(e, t, i = Rt) {
|
|
|
5429
5425
|
e.server.middlewares.stack.splice(0, 0, ...r);
|
|
5430
5426
|
}
|
|
5431
5427
|
}
|
|
5432
|
-
async function Yn(e, t, i =
|
|
5428
|
+
async function Yn(e, t, i = Mt) {
|
|
5433
5429
|
await Promise.all(
|
|
5434
5430
|
t.map(async (n) => {
|
|
5435
5431
|
const s = es(n), r = is(e.dir, ts(s));
|
|
@@ -5477,7 +5473,7 @@ function ts(e) {
|
|
|
5477
5473
|
if (e.type === "file")
|
|
5478
5474
|
throw Error(
|
|
5479
5475
|
w(
|
|
5480
|
-
|
|
5476
|
+
bt,
|
|
5481
5477
|
`Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${Y(e.source)}. If source is meant to be a directory, change to "type":"directory". If source is a file, make sure source path does not end with / or \\`
|
|
5482
5478
|
)
|
|
5483
5479
|
);
|
|
@@ -5511,12 +5507,12 @@ async function ss(e) {
|
|
|
5511
5507
|
const ol = {
|
|
5512
5508
|
match: (e, t) => t.environment === "production" && e.endsWith(".json"),
|
|
5513
5509
|
transform: (e) => JSON.stringify(JSON.parse(e))
|
|
5514
|
-
},
|
|
5510
|
+
}, Mt = [ol];
|
|
5515
5511
|
function al(e) {
|
|
5516
5512
|
let t;
|
|
5517
5513
|
const i = () => [
|
|
5518
5514
|
...e.options.assets?.transformers ?? [],
|
|
5519
|
-
...
|
|
5515
|
+
...Mt
|
|
5520
5516
|
];
|
|
5521
5517
|
return {
|
|
5522
5518
|
name: "@arcgis/lumina:handleStaticAssets",
|
|
@@ -5602,18 +5598,18 @@ export * from "@arcgis/lumina/stencilSsrCompatibility";`;
|
|
|
5602
5598
|
}
|
|
5603
5599
|
};
|
|
5604
5600
|
}
|
|
5605
|
-
const
|
|
5606
|
-
name:
|
|
5601
|
+
const pt = "@arcgis/lumina:printTotalBuildSize", dl = (e) => ({
|
|
5602
|
+
name: pt,
|
|
5607
5603
|
apply: () => e.viteCommand === "build",
|
|
5608
5604
|
configResolved(t) {
|
|
5609
5605
|
const i = t.plugins.find(({ name: s }) => s === "vite:reporter");
|
|
5610
5606
|
if (i === void 0) {
|
|
5611
|
-
C.warn(
|
|
5607
|
+
C.warn(pt, "Unable to find the vite's built-in vite:reporter plugin");
|
|
5612
5608
|
return;
|
|
5613
5609
|
}
|
|
5614
5610
|
const n = i.writeBundle;
|
|
5615
5611
|
if (typeof n != "function")
|
|
5616
|
-
throw Error(w(
|
|
5612
|
+
throw Error(w(pt, "Expected vite:reporter to declare a writeBundle() function"));
|
|
5617
5613
|
i.writeBundle = async function(r, a) {
|
|
5618
5614
|
let c = 0, l = 0, d = 0, p = 0;
|
|
5619
5615
|
const m = console.log;
|
|
@@ -5756,7 +5752,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", dl = (e) => ({
|
|
|
5756
5752
|
"@lit/context"
|
|
5757
5753
|
]
|
|
5758
5754
|
};
|
|
5759
|
-
if (typeof l.setupFiles == "string" ? l.setupFiles = [...
|
|
5755
|
+
if (typeof l.setupFiles == "string" ? l.setupFiles = [...dt, l.setupFiles] : Array.isArray(l.setupFiles) ? l.setupFiles = [...dt, ...l.setupFiles] : l.setupFiles = [...dt], e.isInPuppeteerTestBackEnd) {
|
|
5760
5756
|
if (p?.enabled === !0)
|
|
5761
5757
|
throw Error(
|
|
5762
5758
|
w(Ni, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
|
|
@@ -6094,7 +6090,7 @@ class P {
|
|
|
6094
6090
|
this.viteConfig = s;
|
|
6095
6091
|
const r = s.build.minify !== !1;
|
|
6096
6092
|
this.shouldMinify = r && this.viteCommand !== "serve", Object.hasOwn(this, "shouldMinifyJsx") || (this.shouldMinifyJsx = this.viteCommand !== "serve" || this.isInTest);
|
|
6097
|
-
const a = u.join(s.root, u.sep), c = u.join(a, "src", u.sep), l = u.join(c, "components", u.sep), d = u.join(u.resolve(a, s.build.outDir), u.sep), p = u.join(u.relative(a, d), u.sep), m = u.join(d, "components", u.sep), f = u.join(d, this.options.build?.cdn?.namespace ??
|
|
6093
|
+
const a = u.join(s.root, u.sep), c = u.join(a, "src", u.sep), l = u.join(c, "components", u.sep), d = u.join(u.resolve(a, s.build.outDir), u.sep), p = u.join(u.relative(a, d), u.sep), m = u.join(d, "components", u.sep), f = u.join(d, this.options.build?.cdn?.namespace ?? jt, u.sep), y = u.join(f, "assets", u.sep);
|
|
6098
6094
|
if (this.dir = {
|
|
6099
6095
|
root: a,
|
|
6100
6096
|
src: c,
|
|
@@ -6149,12 +6145,12 @@ class P {
|
|
|
6149
6145
|
webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? de(i.jetBrains.webTypesFileName) : pe.webTypes,
|
|
6150
6146
|
vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? de(i.vsCode.htmlFileName) : pe.vsCodeHtml,
|
|
6151
6147
|
vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? de(i.vsCode.cssFileName) : pe.vsCodeCss
|
|
6152
|
-
}, vn(), this.componentFilesPromise =
|
|
6148
|
+
}, vn(), this.componentFilesPromise = kt(this, u.resolve("src/components")), Nc(this);
|
|
6153
6149
|
const n = t.build?.preamble ?? hl();
|
|
6154
6150
|
this.banner = vl(n);
|
|
6155
6151
|
}
|
|
6156
6152
|
_inferBuildSetup({ command: t, mode: i }, n) {
|
|
6157
|
-
this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (C.warn(
|
|
6153
|
+
this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (C.warn(At, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
|
|
6158
6154
|
const s = n?.__IS_IN_PUPPETEER__ === !0, r = this.viteCommand === "serve" && this.isInTest && this.options.puppeteerTesting?.enabled === !0;
|
|
6159
6155
|
this.isInPuppeteerTestBackEnd = r && !s, this.isInPuppeteerTestFrontEnd = r && s, i === "production" ? this._silencedRules = this.options.linting?.silence : [this.normalizedDocumentationUrl, this.alternativeDocumentationUrl] = [
|
|
6160
6156
|
this.alternativeDocumentationUrl,
|
|
@@ -6309,8 +6305,8 @@ A([
|
|
|
6309
6305
|
A([
|
|
6310
6306
|
k("configResolved()")
|
|
6311
6307
|
], P.prototype, "_typeScriptPrinter");
|
|
6312
|
-
const
|
|
6313
|
-
name:
|
|
6308
|
+
const ut = "@arcgis/lumina:addNonLazyImports", Nl = (e) => ({
|
|
6309
|
+
name: ut,
|
|
6314
6310
|
apply: () => e.viteCommand === "build",
|
|
6315
6311
|
generateBundle(t, i) {
|
|
6316
6312
|
Object.entries(i).forEach(([n, s]) => {
|
|
@@ -6337,7 +6333,7 @@ const pt = "@arcgis/lumina:addNonLazyImports", Nl = (e) => ({
|
|
|
6337
6333
|
const p = Y(r);
|
|
6338
6334
|
throw Error(
|
|
6339
6335
|
w(
|
|
6340
|
-
|
|
6336
|
+
ut,
|
|
6341
6337
|
`Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...c].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.`
|
|
6342
6338
|
)
|
|
6343
6339
|
);
|
|
@@ -6361,7 +6357,7 @@ const pt = "@arcgis/lumina:addNonLazyImports", Nl = (e) => ({
|
|
|
6361
6357
|
if (E !== void 0) {
|
|
6362
6358
|
if (f.has(b)) {
|
|
6363
6359
|
C.warn(
|
|
6364
|
-
|
|
6360
|
+
ut,
|
|
6365
6361
|
`"${b}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
|
|
6366
6362
|
);
|
|
6367
6363
|
return;
|
|
@@ -6369,7 +6365,7 @@ const pt = "@arcgis/lumina:addNonLazyImports", Nl = (e) => ({
|
|
|
6369
6365
|
return S.add(h(E)), `.set("${b}", () => import("${E}"))
|
|
6370
6366
|
`;
|
|
6371
6367
|
}
|
|
6372
|
-
}).filter(j), x = `${v}export * from "./${
|
|
6368
|
+
}).filter(j), x = `${v}export * from "./${Et}";`, L = Array.from(S).join("") + x, $ = T.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
|
|
6373
6369
|
${x}
|
|
6374
6370
|
deferredLoaders${T.join("")};` : x;
|
|
6375
6371
|
return [
|
|
@@ -6398,12 +6394,12 @@ function ji(e) {
|
|
|
6398
6394
|
"type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
|
|
6399
6395
|
}), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
|
|
6400
6396
|
}
|
|
6401
|
-
const
|
|
6402
|
-
name:
|
|
6397
|
+
const wt = "@arcgis/lumina:updatePackageJson", Rl = (e) => ({
|
|
6398
|
+
name: wt,
|
|
6403
6399
|
apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
|
|
6404
6400
|
configResolved() {
|
|
6405
6401
|
Ml(e).catch(
|
|
6406
|
-
(t) => C.error(
|
|
6402
|
+
(t) => C.error(wt, `Failed to update package's package.json:${String(t)}`)
|
|
6407
6403
|
);
|
|
6408
6404
|
}
|
|
6409
6405
|
});
|
|
@@ -6415,7 +6411,7 @@ function Ol(e, t) {
|
|
|
6415
6411
|
const i = e?.devDependencies ?? {};
|
|
6416
6412
|
Object.keys(e?.peerDependencies ?? {}).forEach((d) => {
|
|
6417
6413
|
d in i || C.warn(
|
|
6418
|
-
|
|
6414
|
+
wt,
|
|
6419
6415
|
`Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${d}" that is not a devDependency. Please edit your package.json`
|
|
6420
6416
|
);
|
|
6421
6417
|
});
|
|
@@ -6502,7 +6498,7 @@ function Wl(e) {
|
|
|
6502
6498
|
complexType: t.type === void 0 ? void 0 : {
|
|
6503
6499
|
original: t.type.text,
|
|
6504
6500
|
resolved: t.type.text,
|
|
6505
|
-
references:
|
|
6501
|
+
references: Ot(t.type.references)
|
|
6506
6502
|
},
|
|
6507
6503
|
mutable: !0,
|
|
6508
6504
|
attr: "attribute" in t && typeof t.attribute == "string" ? t.attribute : void 0,
|
|
@@ -6521,7 +6517,7 @@ function Wl(e) {
|
|
|
6521
6517
|
required: s
|
|
6522
6518
|
};
|
|
6523
6519
|
}
|
|
6524
|
-
const
|
|
6520
|
+
const Ot = (e) => Object.fromEntries(
|
|
6525
6521
|
e?.map(
|
|
6526
6522
|
(t) => [
|
|
6527
6523
|
t.name,
|
|
@@ -6552,7 +6548,7 @@ function _l(e) {
|
|
|
6552
6548
|
signature: t.signature ?? "()=>unknown",
|
|
6553
6549
|
parameters: n,
|
|
6554
6550
|
return: t.return?.type?.text ?? "void",
|
|
6555
|
-
references:
|
|
6551
|
+
references: Ot([
|
|
6556
6552
|
...t.return?.type?.references ?? [],
|
|
6557
6553
|
...t.parameters?.flatMap((s) => s.type.references ?? []) ?? []
|
|
6558
6554
|
])
|
|
@@ -6573,7 +6569,7 @@ function Hl(e) {
|
|
|
6573
6569
|
complexType: {
|
|
6574
6570
|
original: e.type.text,
|
|
6575
6571
|
resolved: e.type.text,
|
|
6576
|
-
references:
|
|
6572
|
+
references: Ot(e.type.references)
|
|
6577
6573
|
},
|
|
6578
6574
|
cancelable: e.cancelable ?? !0,
|
|
6579
6575
|
composed: e.composed ?? !0,
|
|
@@ -7026,11 +7022,11 @@ const Bd = {
|
|
|
7026
7022
|
propertyToAttributeMappings: W,
|
|
7027
7023
|
findDeclaredComponents: zi,
|
|
7028
7024
|
nativeEvents: en,
|
|
7029
|
-
svgElements:
|
|
7030
|
-
mathMlElements:
|
|
7025
|
+
svgElements: $t,
|
|
7026
|
+
mathMlElements: Pt,
|
|
7031
7027
|
alwaysAttributes: Qi,
|
|
7032
7028
|
nativeAlwaysAttributes: Zi,
|
|
7033
|
-
htmlAlwaysAttributes:
|
|
7029
|
+
htmlAlwaysAttributes: gt,
|
|
7034
7030
|
isPropertyEscapeNeeded: Xe
|
|
7035
7031
|
};
|
|
7036
7032
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/lumina-compiler",
|
|
3
|
-
"version": "4.33.0-next.
|
|
3
|
+
"version": "4.33.0-next.166",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcgis/api-extractor": "4.33.0-next.
|
|
22
|
-
"@arcgis/components-build-utils": "4.33.0-next.
|
|
23
|
-
"@arcgis/components-utils": "4.33.0-next.
|
|
21
|
+
"@arcgis/api-extractor": "4.33.0-next.166",
|
|
22
|
+
"@arcgis/components-build-utils": "4.33.0-next.166",
|
|
23
|
+
"@arcgis/components-utils": "4.33.0-next.166",
|
|
24
24
|
"chalk": "^5.3.0",
|
|
25
25
|
"esbuild": "^0.25.4",
|
|
26
26
|
"glob": "^11.0.0",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"vitest-fail-on-console": "^0.7.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@arcgis/lumina": "~4.33.0-next.
|
|
40
|
+
"@arcgis/lumina": "~4.33.0-next.166"
|
|
41
41
|
}
|
|
42
42
|
}
|