@arcgis/lumina-compiler 5.2.0-next.111 → 5.2.0-next.113
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 +305 -321
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1368,10 +1368,11 @@ ${e.map((t) => ` "/${t}",`).join(`
|
|
|
1368
1368
|
}`, Fr = "@arcgis/lumina-compiler", $i = {
|
|
1369
1369
|
name: Fr
|
|
1370
1370
|
};
|
|
1371
|
+
var Rr = ["@arcgis-ba/ge4", "@arcgis-ba/utils", "@arcgis/api-extractor", "@arcgis/arcade-languageservice", "@arcgis/arcade-parser", "@arcgis/core", "@arcgis/languages-api-utils", "@arcgis/languages-sdk-spec", "@arcgis/lumina", "@arcgis/lumina-compiler", "@arcgis/node-toolkit", "@arcgis/stencil-to-lumina", "@arcgis/toolkit", "@arcgis/typescript-config"];
|
|
1371
1372
|
async function Pi(e, t) {
|
|
1372
|
-
return ne ??=
|
|
1373
|
+
return ne ??= Or(e, t), await ne;
|
|
1373
1374
|
}
|
|
1374
|
-
function
|
|
1375
|
+
function Dr() {
|
|
1375
1376
|
if (xe === void 0)
|
|
1376
1377
|
throw Error(
|
|
1377
1378
|
b(
|
|
@@ -1391,9 +1392,9 @@ function ki() {
|
|
|
1391
1392
|
);
|
|
1392
1393
|
return et;
|
|
1393
1394
|
}
|
|
1394
|
-
async function
|
|
1395
|
+
async function Or(e, t) {
|
|
1395
1396
|
const i = j(e), s = i.dependencies ?? {}, n = i.peerDependencies ?? {}, a = (await Promise.all(
|
|
1396
|
-
[...Object.keys(s), ...Object.keys(n)].filter((l) => !
|
|
1397
|
+
[...Object.keys(s), ...Object.keys(n)].filter((l) => !Mr.has(l)).flatMap(async (l) => await Ii(l, e))
|
|
1397
1398
|
)).filter(R);
|
|
1398
1399
|
xe ??= a, et = Object.fromEntries(a.flatMap((l) => Object.entries(l.components)));
|
|
1399
1400
|
const c = t?.serve?.extraDependencies?.map(
|
|
@@ -1401,14 +1402,9 @@ async function Dr(e, t) {
|
|
|
1401
1402
|
), d = c === void 0 ? a : a.filter((l) => !c.includes(l.packageName));
|
|
1402
1403
|
return xe ??= d, d;
|
|
1403
1404
|
}
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1406
|
-
"@arcgis/node-toolkit",
|
|
1407
|
-
"@arcgis/toolkit",
|
|
1408
|
-
"@arcgis/core",
|
|
1409
|
-
"@arcgis/languages-api-utils",
|
|
1405
|
+
const Mr = /* @__PURE__ */ new Set([
|
|
1406
|
+
...Rr,
|
|
1410
1407
|
"@arcgis/languages-sdk-specs",
|
|
1411
|
-
"@arcgis/lumina",
|
|
1412
1408
|
"@commander-js/extra-typings",
|
|
1413
1409
|
"@custom-elements-manifest/analyzer",
|
|
1414
1410
|
"@esri/calcite-ui-icons",
|
|
@@ -1442,11 +1438,11 @@ const Or = /* @__PURE__ */ new Set([
|
|
|
1442
1438
|
]);
|
|
1443
1439
|
let xe, et, ne;
|
|
1444
1440
|
async function Ii(e, t) {
|
|
1445
|
-
const i = await $e(e, t), s = await ni(i), n = "exports" in s, r =
|
|
1441
|
+
const i = await $e(e, t), s = await ni(i), n = "exports" in s, r = Gr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
|
|
1446
1442
|
if (a ? await _(c) : !1) {
|
|
1447
|
-
const g = await z(c, "utf8"), h =
|
|
1443
|
+
const g = await z(c, "utf8"), h = Jr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
|
|
1448
1444
|
try {
|
|
1449
|
-
const C = JSON.parse(w), E =
|
|
1445
|
+
const C = JSON.parse(w), E = qr(C, { packageName: e, getImportPath: r });
|
|
1450
1446
|
return { packageName: e, type: "stencil", components: E, packageLocation: i, packageJson: s };
|
|
1451
1447
|
} catch (C) {
|
|
1452
1448
|
T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
|
|
@@ -1455,7 +1451,7 @@ Error: ${String(C)}`);
|
|
|
1455
1451
|
}
|
|
1456
1452
|
const l = Pt(s.customElements);
|
|
1457
1453
|
if (l != null) {
|
|
1458
|
-
const g = u.join(i, l), h = JSON.parse(await z(g, "utf-8")), y =
|
|
1454
|
+
const g = u.join(i, l), h = JSON.parse(await z(g, "utf-8")), y = Br(h), v = xi(h, {
|
|
1459
1455
|
packageName: e,
|
|
1460
1456
|
getImportPath: r
|
|
1461
1457
|
});
|
|
@@ -1463,7 +1459,7 @@ Error: ${String(C)}`);
|
|
|
1463
1459
|
}
|
|
1464
1460
|
const p = Pt(s["web-types"]);
|
|
1465
1461
|
if (p != null) {
|
|
1466
|
-
const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y =
|
|
1462
|
+
const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = _r(h, {
|
|
1467
1463
|
packageName: e,
|
|
1468
1464
|
getImportPath: r
|
|
1469
1465
|
});
|
|
@@ -1471,7 +1467,7 @@ Error: ${String(C)}`);
|
|
|
1471
1467
|
}
|
|
1472
1468
|
const m = u.join(i, "dist/components");
|
|
1473
1469
|
if (await _(m)) {
|
|
1474
|
-
const g = await
|
|
1470
|
+
const g = await Vr(m, {
|
|
1475
1471
|
packageName: e,
|
|
1476
1472
|
getImportPath: r
|
|
1477
1473
|
});
|
|
@@ -1479,7 +1475,7 @@ Error: ${String(C)}`);
|
|
|
1479
1475
|
}
|
|
1480
1476
|
}
|
|
1481
1477
|
const Pt = (e) => Array.isArray(e) ? e[0] : e;
|
|
1482
|
-
function
|
|
1478
|
+
function Jr(e, t) {
|
|
1483
1479
|
const i = e.indexOf(t);
|
|
1484
1480
|
return i === -1 ? -1 : i + t.length;
|
|
1485
1481
|
}
|
|
@@ -1520,11 +1516,11 @@ function xi(e, t, i = !1) {
|
|
|
1520
1516
|
}
|
|
1521
1517
|
return s;
|
|
1522
1518
|
}
|
|
1523
|
-
const
|
|
1519
|
+
const Br = (e) => (
|
|
1524
1520
|
// Since 5.0
|
|
1525
1521
|
e.compiler?.name === "@arcgis/api-extractor" || // Before 5.0
|
|
1526
1522
|
e.compiler?.name === $i.name
|
|
1527
|
-
),
|
|
1523
|
+
), _r = (e, t) => Object.fromEntries(
|
|
1528
1524
|
(e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
|
|
1529
1525
|
(i) => [
|
|
1530
1526
|
i.name,
|
|
@@ -1535,7 +1531,7 @@ const Jr = (e) => (
|
|
|
1535
1531
|
}
|
|
1536
1532
|
]
|
|
1537
1533
|
) ?? []
|
|
1538
|
-
),
|
|
1534
|
+
), Kr = 1, Wr = 2, Ur = 4, zr = 8, Hr = Kr | Wr | Ur | zr, qr = (e, t) => Object.fromEntries(
|
|
1539
1535
|
e.flatMap(
|
|
1540
1536
|
([i, s]) => s.map(
|
|
1541
1537
|
([n, r, a]) => [
|
|
@@ -1544,13 +1540,13 @@ const Jr = (e) => (
|
|
|
1544
1540
|
packageName: t.packageName,
|
|
1545
1541
|
modulePath: t.getImportPath(r),
|
|
1546
1542
|
propToAttribute: Object.fromEntries(
|
|
1547
|
-
Object.entries(a ?? {}).filter(([c, [d]]) => d &
|
|
1543
|
+
Object.entries(a ?? {}).filter(([c, [d]]) => d & Hr).map(([c, [d, l = c]]) => [c, l])
|
|
1548
1544
|
)
|
|
1549
1545
|
}
|
|
1550
1546
|
]
|
|
1551
1547
|
)
|
|
1552
1548
|
)
|
|
1553
|
-
),
|
|
1549
|
+
), Vr = async (e, t) => Object.fromEntries(
|
|
1554
1550
|
(await ot(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
|
|
1555
1551
|
const s = i.slice(0, -5);
|
|
1556
1552
|
return [
|
|
@@ -1562,12 +1558,12 @@ const Jr = (e) => (
|
|
|
1562
1558
|
}
|
|
1563
1559
|
];
|
|
1564
1560
|
})
|
|
1565
|
-
),
|
|
1566
|
-
function
|
|
1561
|
+
), Gr = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, Xr = (e) => e.startsWith("/") ? e : `/${e}`, dt = (e, t) => `${e}@fs${Xr(t)}`;
|
|
1562
|
+
function Yr(e, t) {
|
|
1567
1563
|
const i = u.resolve(e), s = u.resolve(i, t.split(/[?#]/u)[0].replace(/^[/\\]+/u, "")), n = u.relative(i, s);
|
|
1568
1564
|
return n === ".." || n.startsWith(`..${u.sep}`) || u.isAbsolute(n) ? void 0 : s;
|
|
1569
1565
|
}
|
|
1570
|
-
const Ai = "packages/core-packages/core/src",
|
|
1566
|
+
const Ai = "packages/core-packages/core/src", Qr = "packages/core-packages/core/output/npm/esm", te = !import.meta.url.includes("node_modules");
|
|
1571
1567
|
function pt(e) {
|
|
1572
1568
|
return te && e.name !== "@esri/calcite-components" ? oi().version : e.version;
|
|
1573
1569
|
}
|
|
@@ -1584,9 +1580,9 @@ function ie(e, t, i = ut, s = "max-age=31536000, immutable") {
|
|
|
1584
1580
|
throw Error(b(tt, "serveAssets() is only available when Vite is running in serve mode"));
|
|
1585
1581
|
const n = e._serverConfigured, r = e.server.middlewares.stack.length;
|
|
1586
1582
|
if (t.forEach((a) => {
|
|
1587
|
-
const c = Fi(a), d = Di(e.dir, Ri(c)), l =
|
|
1583
|
+
const c = Fi(a), d = Di(e.dir, Ri(c)), l = en(e.viteConfig.base, d, e.dir.distCdn);
|
|
1588
1584
|
e.server.middlewares.use(l, (p, m, f) => {
|
|
1589
|
-
const g =
|
|
1585
|
+
const g = tn(p.url), h = c.type === "directory" ? Yr(c.source, g) : c.source, y = u.join(d, g), v = i.find((w) => w.match(y, e));
|
|
1590
1586
|
return h === void 0 ? (m.statusCode = 403, m.end(), !0) : ((typeof h == "function" ? Promise.resolve(h()) : z(h)).then((w) => {
|
|
1591
1587
|
const C = (typeof h == "function" ? void 0 : v?.transform(w.toString("utf8"), y, e)) ?? w;
|
|
1592
1588
|
m.setHeader("Cache-Control", s), m.setHeader("Content-Type", Bs.lookup(g) || "application/octet-stream"), m.write(C), m.end();
|
|
@@ -1659,34 +1655,34 @@ function Ri(e) {
|
|
|
1659
1655
|
return e.destination === "" ? u.basename(e.source) : e.destination.endsWith(u.sep) ? e.type === "directory" && e.destination === u.sep ? e.destination : u.join(e.destination, u.basename(e.source)) : e.destination;
|
|
1660
1656
|
}
|
|
1661
1657
|
function Di({ dist: e, distCdnAssets: t }, i) {
|
|
1662
|
-
const s =
|
|
1658
|
+
const s = Zr(i), n = u.join(
|
|
1663
1659
|
t,
|
|
1664
1660
|
s ? u.relative(t, i) : i
|
|
1665
1661
|
), r = u.relative(e, n), a = Oi(r);
|
|
1666
1662
|
return u.join(e, a);
|
|
1667
1663
|
}
|
|
1668
|
-
function
|
|
1664
|
+
function Zr(e) {
|
|
1669
1665
|
if (e.startsWith(u.sep)) {
|
|
1670
1666
|
const t = si(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
|
|
1671
1667
|
return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
|
|
1672
1668
|
} else
|
|
1673
1669
|
return !!(!ii && u.isAbsolute(e));
|
|
1674
1670
|
}
|
|
1675
|
-
function
|
|
1671
|
+
function en(e, t, i) {
|
|
1676
1672
|
const s = Oi(u.relative(i, t)), n = s.startsWith("/") ? s.slice(1) : s;
|
|
1677
1673
|
return `${e}${n}`;
|
|
1678
1674
|
}
|
|
1679
|
-
const Oi = (e) => e.replaceAll("../", ""),
|
|
1675
|
+
const Oi = (e) => e.replaceAll("../", ""), tn = (e = "") => e.split("?")[0].split("#")[0];
|
|
1680
1676
|
async function Mi(e) {
|
|
1681
1677
|
const t = new Set(e.map(u.dirname));
|
|
1682
1678
|
await Promise.all(Array.from(t, async (i) => await X(i, { recursive: !0 })));
|
|
1683
1679
|
}
|
|
1684
|
-
const
|
|
1680
|
+
const sn = {
|
|
1685
1681
|
match: (e, t) => t.environment === "production" && e.endsWith(".json"),
|
|
1686
1682
|
transform: (e) => JSON.stringify(JSON.parse(e))
|
|
1687
|
-
}, ut = [
|
|
1683
|
+
}, ut = [sn], Ae = "@arcgis/core", me = "@arcgis/core/assets", Ke = j(), H = Ae in (Ke.dependencies ?? {}) || Ae in (Ke.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
|
|
1688
1684
|
Ke.name === "@arcgis/lumina";
|
|
1689
|
-
async function
|
|
1685
|
+
async function rn(e, t, i, s) {
|
|
1690
1686
|
if (!H)
|
|
1691
1687
|
return [];
|
|
1692
1688
|
const n = e._localCdnCore, r = n?.packageLocation ?? await $e(Ae);
|
|
@@ -1710,9 +1706,9 @@ async function sn(e, t, i, s) {
|
|
|
1710
1706
|
Ji(c)
|
|
1711
1707
|
];
|
|
1712
1708
|
} else
|
|
1713
|
-
return
|
|
1709
|
+
return nn(t, r, n?.sourceLocation !== void 0);
|
|
1714
1710
|
}
|
|
1715
|
-
function
|
|
1711
|
+
function nn(e, t, i) {
|
|
1716
1712
|
const s = `${e}${me}`;
|
|
1717
1713
|
return [
|
|
1718
1714
|
// Browser tests import this as a Vite CSS module and adopt its stylesheet, so CSS must remain on the /@fs route.
|
|
@@ -1731,7 +1727,7 @@ function rn(e, t, i) {
|
|
|
1731
1727
|
}
|
|
1732
1728
|
];
|
|
1733
1729
|
}
|
|
1734
|
-
async function
|
|
1730
|
+
async function on(e) {
|
|
1735
1731
|
const t = e._localCdnCore, i = t?.packageLocation ?? await $e(Ae), s = t?.sourceLocation !== void 0 ? [
|
|
1736
1732
|
{
|
|
1737
1733
|
type: "directory",
|
|
@@ -1783,17 +1779,17 @@ const Ji = (e) => ({
|
|
|
1783
1779
|
// This is used be the theme switcher in `@arcgis/storybook-utils`
|
|
1784
1780
|
id: "arcgisCoreStylesheet"
|
|
1785
1781
|
}), mt = "customElement.js";
|
|
1786
|
-
function
|
|
1782
|
+
function an(e, t) {
|
|
1787
1783
|
if (!t.startsWith(e))
|
|
1788
1784
|
return t;
|
|
1789
1785
|
const s = t.split(u.sep);
|
|
1790
|
-
return s.at(
|
|
1786
|
+
return s.at(cn) !== s.at(ln) ? t : u.join(s.slice(0, -1).join(u.sep), mt);
|
|
1791
1787
|
}
|
|
1792
|
-
const
|
|
1788
|
+
const cn = -1, ln = -2, dn = /["']\.\.?\/[^'"]+/gu, pn = (e, t, i, s) => e.replaceAll(dn, (n) => {
|
|
1793
1789
|
const r = n.slice(1);
|
|
1794
1790
|
if (!r.startsWith("./") && !r.startsWith("../"))
|
|
1795
1791
|
return n;
|
|
1796
|
-
const a = u.join(s, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ?
|
|
1792
|
+
const a = u.join(s, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? an(t.dir.distComponents, a) : a, d = c.startsWith(t.dir.distComponents) ? t.dir.dist + Ge(c.slice(t.dir.dist.length), t.apiExtractor) : c;
|
|
1797
1793
|
if (i === s && a === d)
|
|
1798
1794
|
return n;
|
|
1799
1795
|
const l = he(i, d), p = n.endsWith("/") ? `${l}/` : l;
|
|
@@ -1802,7 +1798,7 @@ const an = -1, cn = -2, ln = /["']\.\.?\/[^'"]+/gu, dn = (e, t, i, s) => e.repla
|
|
|
1802
1798
|
const i = u.relative(e, t);
|
|
1803
1799
|
return i.startsWith(".") ? i : `.${u.sep}${i}`;
|
|
1804
1800
|
};
|
|
1805
|
-
async function
|
|
1801
|
+
async function un(e, t, i) {
|
|
1806
1802
|
const s = u.resolve(e.dir.root, t);
|
|
1807
1803
|
e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Os(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Ms(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
|
|
1808
1804
|
const n = [
|
|
@@ -1859,7 +1855,7 @@ const Bi = /* @__PURE__ */ new Set([
|
|
|
1859
1855
|
"extras",
|
|
1860
1856
|
"support"
|
|
1861
1857
|
]), O = "@arcgis/lumina:buildCdn", le = "cdn", _i = "index", Z = "main";
|
|
1862
|
-
function
|
|
1858
|
+
function mn(e) {
|
|
1863
1859
|
const { skip: t = !1, namespace: i, esbuildOptions: s = {}, entrypointTransformer: n } = e.options.build?.cdn ?? {}, r = e.options.build?.webApp?.destination, a = i !== void 0;
|
|
1864
1860
|
if (a) {
|
|
1865
1861
|
if (i.toLowerCase() !== i)
|
|
@@ -1892,7 +1888,7 @@ function un(e) {
|
|
|
1892
1888
|
);
|
|
1893
1889
|
return;
|
|
1894
1890
|
}
|
|
1895
|
-
const d = H && j().name !== "@arcgis/embeddable-components", l = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await
|
|
1891
|
+
const d = H && j().name !== "@arcgis/embeddable-components", l = Date.now(), p = Array.isArray(s.entryPoints) ? s.entryPoints.map((g) => typeof g == "string" ? { in: g, out: "" } : g) : typeof s.entryPoints == "object" ? Object.entries(s.entryPoints).map(([g, h]) => ({ in: h, out: g })) : [], m = await fn(
|
|
1896
1892
|
e,
|
|
1897
1893
|
c,
|
|
1898
1894
|
s,
|
|
@@ -1900,7 +1896,7 @@ function un(e) {
|
|
|
1900
1896
|
n,
|
|
1901
1897
|
d
|
|
1902
1898
|
);
|
|
1903
|
-
await
|
|
1899
|
+
await gn(
|
|
1904
1900
|
m,
|
|
1905
1901
|
e,
|
|
1906
1902
|
a ? `${c}.esm` : c,
|
|
@@ -1908,11 +1904,11 @@ function un(e) {
|
|
|
1908
1904
|
d
|
|
1909
1905
|
);
|
|
1910
1906
|
const f = Date.now();
|
|
1911
|
-
T.info(O, `CDN was built in ${f - l}ms`), r && await
|
|
1907
|
+
T.info(O, `CDN was built in ${f - l}ms`), r && await un(e, r, `${a ? `${c}.esm` : c}.js`);
|
|
1912
1908
|
}
|
|
1913
1909
|
};
|
|
1914
1910
|
}
|
|
1915
|
-
async function
|
|
1911
|
+
async function fn(e, t, i, s, n, r) {
|
|
1916
1912
|
const a = e.environment;
|
|
1917
1913
|
if (i.minify && r)
|
|
1918
1914
|
throw Error(
|
|
@@ -2021,7 +2017,7 @@ ${Ei(e._globalCssString, e)}`, d = n?.(c, e) ?? c;
|
|
|
2021
2017
|
});
|
|
2022
2018
|
}
|
|
2023
2019
|
const It = "stdin.js";
|
|
2024
|
-
async function
|
|
2020
|
+
async function gn(e, t, i, s, n) {
|
|
2025
2021
|
const r = t.dir.distCdn, a = `${i}.js`;
|
|
2026
2022
|
let c;
|
|
2027
2023
|
n && (c = new Set(s.map((p) => `${p.out}.js`)), c.add(a));
|
|
@@ -2035,13 +2031,13 @@ async function fn(e, t, i, s, n) {
|
|
|
2035
2031
|
}, f = G(p.path.slice(r.length));
|
|
2036
2032
|
if (f === It) {
|
|
2037
2033
|
if (n) {
|
|
2038
|
-
const h = p.text.match(
|
|
2034
|
+
const h = p.text.match(hn)?.[0];
|
|
2039
2035
|
if (h === void 0)
|
|
2040
2036
|
throw Error(
|
|
2041
2037
|
`Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. ${It} contents:
|
|
2042
2038
|
${p.text}`
|
|
2043
2039
|
);
|
|
2044
|
-
m.code = `${m.code.trimEnd()}${
|
|
2040
|
+
m.code = `${m.code.trimEnd()}${yn(h, s)}`, m.isAsync = !1;
|
|
2045
2041
|
}
|
|
2046
2042
|
return [a, m];
|
|
2047
2043
|
}
|
|
@@ -2071,8 +2067,8 @@ ${p.text}`
|
|
|
2071
2067
|
}
|
|
2072
2068
|
await Promise.all(l.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await K(r + p, m)));
|
|
2073
2069
|
}
|
|
2074
|
-
const
|
|
2075
|
-
function
|
|
2070
|
+
const hn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
|
|
2071
|
+
function yn(e, t) {
|
|
2076
2072
|
let i = [
|
|
2077
2073
|
"window.$arcgis",
|
|
2078
2074
|
"||",
|
|
@@ -2121,7 +2117,7 @@ function Ki(e, t) {
|
|
|
2121
2117
|
e.isProcessing = !0;
|
|
2122
2118
|
const i = [], s = [], n = [], r = /* @__PURE__ */ new Set(), a = [];
|
|
2123
2119
|
let c = 0;
|
|
2124
|
-
const d = e.code.matchAll(
|
|
2120
|
+
const d = e.code.matchAll(vn);
|
|
2125
2121
|
for (const S of d) {
|
|
2126
2122
|
const [A, L, U, F, N] = S, B = N.startsWith(Le);
|
|
2127
2123
|
if (c !== 0 && c !== S.index) {
|
|
@@ -2163,7 +2159,7 @@ ${D.code}`
|
|
|
2163
2159
|
e.code = At(e.code, t);
|
|
2164
2160
|
return;
|
|
2165
2161
|
}
|
|
2166
|
-
const p =
|
|
2162
|
+
const p = Sn(r);
|
|
2167
2163
|
let m = e.code.slice(0, c);
|
|
2168
2164
|
for (let S = a.length - 1; S >= 0; S--) {
|
|
2169
2165
|
const [A, L, U, F] = a[S];
|
|
@@ -2182,7 +2178,7 @@ ${D.code}`
|
|
|
2182
2178
|
}
|
|
2183
2179
|
const Wi = "export default $arcgis.t(";
|
|
2184
2180
|
function xt(e) {
|
|
2185
|
-
const t =
|
|
2181
|
+
const t = bn.exec(e.code), i = t?.index ?? e.code.length;
|
|
2186
2182
|
let s = "";
|
|
2187
2183
|
if (t !== null) {
|
|
2188
2184
|
const n = t[1].split(",");
|
|
@@ -2198,7 +2194,7 @@ function xt(e) {
|
|
|
2198
2194
|
}
|
|
2199
2195
|
return [i, s];
|
|
2200
2196
|
}
|
|
2201
|
-
const
|
|
2197
|
+
const vn = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, bn = /export\{([^}]+)\};\n$/u, Le = "@arcgis/core/";
|
|
2202
2198
|
function Ui(e, t) {
|
|
2203
2199
|
if (!e.startsWith("./"))
|
|
2204
2200
|
return;
|
|
@@ -2210,7 +2206,7 @@ function Ui(e, t) {
|
|
|
2210
2206
|
return s;
|
|
2211
2207
|
}
|
|
2212
2208
|
function At(e, t) {
|
|
2213
|
-
return e.replaceAll(
|
|
2209
|
+
return e.replaceAll(wn, (i, s) => {
|
|
2214
2210
|
if (s.startsWith(Le))
|
|
2215
2211
|
return `$arcgis.t(m=>m[0],"${zi(s.slice(Le.length))}")`;
|
|
2216
2212
|
if (s.startsWith("./")) {
|
|
@@ -2221,28 +2217,28 @@ function At(e, t) {
|
|
|
2221
2217
|
return i;
|
|
2222
2218
|
});
|
|
2223
2219
|
}
|
|
2224
|
-
const
|
|
2225
|
-
function
|
|
2220
|
+
const wn = /(?<![.\w\d])import\("([^"]+)"\)/gu, zi = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
|
|
2221
|
+
function Sn(e) {
|
|
2226
2222
|
const t = [it];
|
|
2227
2223
|
return () => {
|
|
2228
2224
|
for (; ; ) {
|
|
2229
|
-
const i =
|
|
2230
|
-
if (
|
|
2225
|
+
const i = Tn(t);
|
|
2226
|
+
if ($n(t), !e.has(i))
|
|
2231
2227
|
return e.add(i), i;
|
|
2232
2228
|
}
|
|
2233
2229
|
};
|
|
2234
2230
|
}
|
|
2235
|
-
const it = 0, ft = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hi = `${ft}0123456789`,
|
|
2236
|
-
function
|
|
2231
|
+
const it = 0, ft = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hi = `${ft}0123456789`, Cn = ft.length, En = Hi.length;
|
|
2232
|
+
function Tn(e) {
|
|
2237
2233
|
let t = ft[e[0]];
|
|
2238
2234
|
for (let i = 1; i < e.length; ++i)
|
|
2239
2235
|
t += Hi[e[i]];
|
|
2240
2236
|
return t;
|
|
2241
2237
|
}
|
|
2242
|
-
function
|
|
2238
|
+
function $n(e) {
|
|
2243
2239
|
let t = e.length - 1;
|
|
2244
2240
|
for (; t >= 0; ) {
|
|
2245
|
-
const i = t === 0 ?
|
|
2241
|
+
const i = t === 0 ? Cn : En;
|
|
2246
2242
|
if (e[t] += 1, e[t] >= i)
|
|
2247
2243
|
e[t] = it, t--;
|
|
2248
2244
|
else
|
|
@@ -2254,7 +2250,7 @@ function De(e = j(), t = !1) {
|
|
|
2254
2250
|
const i = e.name === "@esri/calcite-components", s = pt(e) ?? e.version, n = s.includes("next");
|
|
2255
2251
|
if (i && n)
|
|
2256
2252
|
return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${s}/dist/${le}/`;
|
|
2257
|
-
const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a =
|
|
2253
|
+
const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = Pn(e.name), c = kn(s);
|
|
2258
2254
|
if (c === void 0)
|
|
2259
2255
|
throw Error(
|
|
2260
2256
|
b(
|
|
@@ -2264,15 +2260,15 @@ function De(e = j(), t = !1) {
|
|
|
2264
2260
|
);
|
|
2265
2261
|
return a === "core" ? `https://${r}/${c}/` : i ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
|
|
2266
2262
|
}
|
|
2267
|
-
const
|
|
2268
|
-
function
|
|
2263
|
+
const Pn = (e) => e.split("/").pop() ?? e;
|
|
2264
|
+
function kn(e) {
|
|
2269
2265
|
const t = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<prerelease>-.*)?$/u, i = e.match(t);
|
|
2270
2266
|
if (i?.groups === void 0)
|
|
2271
2267
|
return;
|
|
2272
2268
|
const { major: s, minor: n, patch: r, prerelease: a } = i.groups, c = `${s}.${n}.${r}`;
|
|
2273
2269
|
return a?.startsWith("-next") ? `${c}-next` : c;
|
|
2274
2270
|
}
|
|
2275
|
-
async function
|
|
2271
|
+
async function In(e, t, i, s, n) {
|
|
2276
2272
|
const r = t.packageName, { hasCss: a, cdnName: c } = await qi(t.packageLocation) ?? {};
|
|
2277
2273
|
if (i === "cdn") {
|
|
2278
2274
|
const m = t.cdnUrl ?? De(t.packageJson, n);
|
|
@@ -2338,7 +2334,7 @@ async function Lt(e, t) {
|
|
|
2338
2334
|
cdnName: t
|
|
2339
2335
|
} : void 0;
|
|
2340
2336
|
}
|
|
2341
|
-
async function
|
|
2337
|
+
async function xn(e, t, i, s, n) {
|
|
2342
2338
|
const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await qi(t.packageLocation) : void 0, c = a?.cdnName ?? le, d = a === void 0 ? `${_i}.js` : `${a.cdnName}.esm.js`;
|
|
2343
2339
|
if (i === "cdn")
|
|
2344
2340
|
return {
|
|
@@ -2348,7 +2344,7 @@ async function In(e, t, i, s, n) {
|
|
|
2348
2344
|
src: `${t.cdnUrl ?? De(t.packageJson, n)}${d}`
|
|
2349
2345
|
}
|
|
2350
2346
|
};
|
|
2351
|
-
const l =
|
|
2347
|
+
const l = An(t.packageJson), p = `${t.packageName}/${u.normalize(l)}${Q}`, m = [
|
|
2352
2348
|
`import styles$${s} from "${p}";`,
|
|
2353
2349
|
`document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${s}.styleSheet];`
|
|
2354
2350
|
], f = `${t.packageName}/loader`;
|
|
@@ -2367,7 +2363,7 @@ async function In(e, t, i, s, n) {
|
|
|
2367
2363
|
]
|
|
2368
2364
|
};
|
|
2369
2365
|
}
|
|
2370
|
-
function
|
|
2366
|
+
function An(e) {
|
|
2371
2367
|
const { exports: t } = e;
|
|
2372
2368
|
if (t === void 0)
|
|
2373
2369
|
throw new Error(
|
|
@@ -2385,11 +2381,11 @@ async function Nt(e, t) {
|
|
|
2385
2381
|
const a = async (m) => (await Promise.all(
|
|
2386
2382
|
m.map(async (f) => {
|
|
2387
2383
|
const g = r++;
|
|
2388
|
-
return f.type === "stencil" ? await
|
|
2384
|
+
return f.type === "stencil" ? await In(n, f, i, g, s) : f.type === "@arcgis/lumina" ? await xn(n, f, i, g, s) : void 0;
|
|
2389
2385
|
})
|
|
2390
2386
|
)).filter(R).flat(), c = await Promise.all([
|
|
2391
2387
|
// This may contain an import map so must be first
|
|
2392
|
-
|
|
2388
|
+
rn(e, n, i, s),
|
|
2393
2389
|
ne.then(a),
|
|
2394
2390
|
Vi(e).then(a)
|
|
2395
2391
|
]), d = u.join(e.dir.src, "loader.ts"), l = t ?? (i === "cdn" ? `./${e.options.build?.cdn?.namespace ?? le}/` : void 0);
|
|
@@ -2429,8 +2425,8 @@ async function Vi(e) {
|
|
|
2429
2425
|
})
|
|
2430
2426
|
).then((i) => i.filter(R)), await e._serveOnlyDependencies);
|
|
2431
2427
|
}
|
|
2432
|
-
const
|
|
2433
|
-
async function
|
|
2428
|
+
const Ln = "/C:@arcgis/lumina-compiler/testSetupFile", Nn = /^\/C:@arcgis\/lumina-compiler\/testSetupFile/u, We = [Ln];
|
|
2429
|
+
async function jn(e) {
|
|
2434
2430
|
if (
|
|
2435
2431
|
/**
|
|
2436
2432
|
* Only import custom element dependencies if we are running in Vitest browser mode.
|
|
@@ -2468,16 +2464,16 @@ async function Nn(e) {
|
|
|
2468
2464
|
`);
|
|
2469
2465
|
return [jt(e), i].join("");
|
|
2470
2466
|
}
|
|
2471
|
-
const jt = (e) => [e.isInPuppeteerTestBackEnd ?
|
|
2467
|
+
const jt = (e) => [e.isInPuppeteerTestBackEnd ? Fn : "", Rn].join(""), Fn = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
|
|
2472
2468
|
setupPuppeteerTest();
|
|
2473
|
-
`,
|
|
2469
|
+
`, Rn = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
|
|
2474
2470
|
setupLuminaTest();
|
|
2475
|
-
`,
|
|
2471
|
+
`, Dn = "@arcgis/lumina:generateLoaderTs";
|
|
2476
2472
|
let Ne;
|
|
2477
|
-
function
|
|
2473
|
+
function On(e) {
|
|
2478
2474
|
const t = /[\\\/]src[\\\/]loader\.ts$/u;
|
|
2479
2475
|
return [Ws(e.apiExtractorPluginConfig), {
|
|
2480
|
-
name:
|
|
2476
|
+
name: Dn,
|
|
2481
2477
|
configResolved() {
|
|
2482
2478
|
Ne = `${e.dir.root}src/loader.ts`;
|
|
2483
2479
|
},
|
|
@@ -2502,9 +2498,9 @@ function Dn(e) {
|
|
|
2502
2498
|
name: "@arcgis/lumina:generateTestSetupVirtualFile",
|
|
2503
2499
|
load: {
|
|
2504
2500
|
filter: {
|
|
2505
|
-
id:
|
|
2501
|
+
id: Nn
|
|
2506
2502
|
},
|
|
2507
|
-
handler: async () => await
|
|
2503
|
+
handler: async () => await jn(e)
|
|
2508
2504
|
}
|
|
2509
2505
|
}];
|
|
2510
2506
|
}
|
|
@@ -2518,7 +2514,7 @@ const Rt = (e) => {
|
|
|
2518
2514
|
path: u.join("/", u.relative(e.dir.root, Ne))
|
|
2519
2515
|
});
|
|
2520
2516
|
};
|
|
2521
|
-
function
|
|
2517
|
+
function Mn(e) {
|
|
2522
2518
|
let t;
|
|
2523
2519
|
const i = () => [
|
|
2524
2520
|
...e.options.assets?.transformers ?? [],
|
|
@@ -2572,7 +2568,7 @@ const Gi = (e, t) => ({
|
|
|
2572
2568
|
type: "directory",
|
|
2573
2569
|
source: e,
|
|
2574
2570
|
destination: u.basename(t)
|
|
2575
|
-
}), Xi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize",
|
|
2571
|
+
}), Xi = { type: "directory", source: "assets/", destination: "" }, Ue = "@arcgis/lumina:printTotalBuildSize", Jn = (e) => ({
|
|
2576
2572
|
name: Ue,
|
|
2577
2573
|
apply: () => e.viteCommand === "build",
|
|
2578
2574
|
configResolved(t) {
|
|
@@ -2591,10 +2587,10 @@ const Gi = (e, t) => ({
|
|
|
2591
2587
|
const m = console.log;
|
|
2592
2588
|
console.log = function(...g) {
|
|
2593
2589
|
if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
|
|
2594
|
-
const [h, y] = g[0].match(
|
|
2590
|
+
const [h, y] = g[0].match(_n) ?? [];
|
|
2595
2591
|
if (!h)
|
|
2596
2592
|
return;
|
|
2597
|
-
p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(
|
|
2593
|
+
p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Kn, "").length);
|
|
2598
2594
|
const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
|
|
2599
2595
|
y ? (l += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : c += v;
|
|
2600
2596
|
}
|
|
@@ -2610,7 +2606,7 @@ const Gi = (e, t) => ({
|
|
|
2610
2606
|
[
|
|
2611
2607
|
Mt,
|
|
2612
2608
|
y,
|
|
2613
|
-
|
|
2609
|
+
Bn,
|
|
2614
2610
|
"*",
|
|
2615
2611
|
" ".repeat(p - `${y}*`.length - h.length),
|
|
2616
2612
|
h,
|
|
@@ -2621,10 +2617,12 @@ const Gi = (e, t) => ({
|
|
|
2621
2617
|
}
|
|
2622
2618
|
};
|
|
2623
2619
|
}
|
|
2624
|
-
}), Ot = "\x1B[22m\x1B[1m\x1B[22m", Mt = "\x1B[2m",
|
|
2620
|
+
}), Ot = "\x1B[22m\x1B[1m\x1B[22m", Mt = "\x1B[2m", Bn = "\x1B[22m\x1B[36m", _n = /\d+(?:,\d+)?\.\d{2} kB/gu, Kn = /\x1B\[\d+m/gu, Wn = new Intl.NumberFormat("en", {
|
|
2625
2621
|
maximumFractionDigits: 2,
|
|
2626
2622
|
minimumFractionDigits: 2
|
|
2627
|
-
}), Jt = (e) => `${
|
|
2623
|
+
}), Jt = (e) => `${Wn.format(e)} kB`, Un = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", mt.slice(0, -3)));
|
|
2624
|
+
var zn = ["@arcgis-ba/ge4", "@arcgis-ba/utils", "@arcgis-test/lit-components/loader", "@arcgis/ai-components/loader", "@arcgis/api-extractor", "@arcgis/arcade-languageservice", "@arcgis/arcade-parser", "@arcgis/charts-components/loader", "@arcgis/coding-components/loader", "@arcgis/common-components/loader", "@arcgis/core", "@arcgis/embeddable-components/loader", "@arcgis/languages-api-utils", "@arcgis/languages-sdk-spec", "@arcgis/lumina", "@arcgis/map-components/loader", "@arcgis/node-toolkit", "@arcgis/portal-components/loader", "@arcgis/stencil-to-lumina", "@arcgis/toolkit", "@arcgis/typescript-config"];
|
|
2625
|
+
const Bt = "@arcgis/lumina:configureVite", Hn = (e) => ({
|
|
2628
2626
|
name: Bt,
|
|
2629
2627
|
async config({
|
|
2630
2628
|
server: t,
|
|
@@ -2715,21 +2713,7 @@ const Gi = (e, t) => ({
|
|
|
2715
2713
|
*/
|
|
2716
2714
|
exclude: [
|
|
2717
2715
|
...te ? [
|
|
2718
|
-
|
|
2719
|
-
"@arcgis/core",
|
|
2720
|
-
"@arcgis/toolkit",
|
|
2721
|
-
"@arcgis-ba/data-browser/loader",
|
|
2722
|
-
"@arcgis-ba/report-player/loader",
|
|
2723
|
-
"@arcgis/ai-components/loader",
|
|
2724
|
-
"@arcgis/ai-playground/loader",
|
|
2725
|
-
"@arcgis/charts-components/loader",
|
|
2726
|
-
"@arcgis/coding-components/loader",
|
|
2727
|
-
"@arcgis/common-components/loader",
|
|
2728
|
-
"@arcgis/imagery-components/loader",
|
|
2729
|
-
"@arcgis/map-config-components/loader",
|
|
2730
|
-
"@arcgis/embeddable-components/loader",
|
|
2731
|
-
"@arcgis/map-components/loader",
|
|
2732
|
-
"@arcgis/portal-components/loader",
|
|
2716
|
+
...zn,
|
|
2733
2717
|
// This exact import is also supplied through optimizableImports in `dependencies/arcgisCore.ts`
|
|
2734
2718
|
// Optimizing it in the monorepo creates a separate core config instance, so the app does not receive the
|
|
2735
2719
|
// configured assetsPath.
|
|
@@ -2861,15 +2845,15 @@ const Gi = (e, t) => ({
|
|
|
2861
2845
|
e._originalRollupInputOptions ??= t.input;
|
|
2862
2846
|
const s = { ...e._originalRollupInputOptions };
|
|
2863
2847
|
i.forEach((n) => {
|
|
2864
|
-
const r =
|
|
2848
|
+
const r = Un(n);
|
|
2865
2849
|
s[r] = n;
|
|
2866
2850
|
}), t.input = s;
|
|
2867
2851
|
}
|
|
2868
|
-
}), Se = "@arcgis/lumina:serveLocalCdn",
|
|
2852
|
+
}), Se = "@arcgis/lumina:serveLocalCdn", qn = /^\/?@arcgis\/core(?=\/|$)/u, Yi = "/index.js", Vn = je(Yi), st = `\0${Se}:index`, Gn = je(st), Xn = 3e3, Yn = [
|
|
2869
2853
|
/^https?:\/\/localhost(?::[0-9]+)?$/u,
|
|
2870
2854
|
/^https?:\/\/(?:[a-z0-9-]+\.)*(?:arcgis|esri)\.com(?::[0-9]+)?$/iu
|
|
2871
2855
|
];
|
|
2872
|
-
function
|
|
2856
|
+
function Qn(e) {
|
|
2873
2857
|
if (!H)
|
|
2874
2858
|
return;
|
|
2875
2859
|
const t = j().name, i = t.split("/").pop() ?? t, s = `/${i}/index.js`, n = je(s), r = `\0${Se}:${i}`, a = je(r);
|
|
@@ -2877,30 +2861,30 @@ function Xn(e) {
|
|
|
2877
2861
|
name: Se,
|
|
2878
2862
|
enforce: "pre",
|
|
2879
2863
|
apply(c) {
|
|
2880
|
-
const d =
|
|
2864
|
+
const d = to(e, c);
|
|
2881
2865
|
return d || (e._localCdnCore = void 0), d;
|
|
2882
2866
|
},
|
|
2883
2867
|
config: {
|
|
2884
2868
|
order: "post",
|
|
2885
2869
|
handler(c, d) {
|
|
2886
|
-
const l = c.server, p = Li(d), m = p ? Ai :
|
|
2870
|
+
const l = c.server, p = Li(d), m = p ? Ai : Qr, f = ri(m, import.meta.dirname);
|
|
2887
2871
|
if (f === void 0)
|
|
2888
2872
|
throw Error(b(Se, `Unable to find ${m}.`));
|
|
2889
2873
|
return e._localCdnCore = p ? { packageLocation: u.dirname(f), sourceLocation: f } : { packageLocation: f }, {
|
|
2890
2874
|
server: {
|
|
2891
|
-
port: l?.port ??
|
|
2892
|
-
cors: l?.cors ?? { origin:
|
|
2875
|
+
port: l?.port ?? Xn,
|
|
2876
|
+
cors: l?.cors ?? { origin: Yn }
|
|
2893
2877
|
},
|
|
2894
2878
|
resolve: {
|
|
2895
2879
|
// The alias also matches CDN-rooted requests such as /@arcgis/core/WebMap.js. Vite resolves .js requests
|
|
2896
2880
|
// to TypeScript in source mode and handles relative and bare imports from the resulting filesystem path.
|
|
2897
|
-
alias: [{ find:
|
|
2881
|
+
alias: [{ find: qn, replacement: f }]
|
|
2898
2882
|
}
|
|
2899
2883
|
};
|
|
2900
2884
|
}
|
|
2901
2885
|
},
|
|
2902
2886
|
resolveId: {
|
|
2903
|
-
filter: { id: [
|
|
2887
|
+
filter: { id: [Vn, n] },
|
|
2904
2888
|
handler(c) {
|
|
2905
2889
|
if (c === Yi)
|
|
2906
2890
|
return st;
|
|
@@ -2909,17 +2893,17 @@ function Xn(e) {
|
|
|
2909
2893
|
}
|
|
2910
2894
|
},
|
|
2911
2895
|
load: {
|
|
2912
|
-
filter: { id: [
|
|
2896
|
+
filter: { id: [Gn, a] },
|
|
2913
2897
|
async handler(c) {
|
|
2914
2898
|
if (c === st)
|
|
2915
2899
|
return `import ${JSON.stringify(s)};
|
|
2916
2900
|
`;
|
|
2917
2901
|
if (c === r)
|
|
2918
|
-
return await
|
|
2902
|
+
return await eo(e);
|
|
2919
2903
|
}
|
|
2920
2904
|
},
|
|
2921
2905
|
handleHotUpdate({ file: c, server: d }) {
|
|
2922
|
-
if (
|
|
2906
|
+
if (Zn(c, e._localCdnCore?.sourceLocation))
|
|
2923
2907
|
return d.ws.send({ type: "full-reload" }), [];
|
|
2924
2908
|
}
|
|
2925
2909
|
};
|
|
@@ -2927,30 +2911,30 @@ function Xn(e) {
|
|
|
2927
2911
|
function je(e) {
|
|
2928
2912
|
return new RegExp(`^${RegExp.escape(e)}$`, "u");
|
|
2929
2913
|
}
|
|
2930
|
-
function
|
|
2914
|
+
function Zn(e, t) {
|
|
2931
2915
|
return t !== void 0 && e.startsWith(u.join(t, u.sep));
|
|
2932
2916
|
}
|
|
2933
|
-
async function
|
|
2917
|
+
async function eo(e) {
|
|
2934
2918
|
const t = e.viteConfig.server, i = t.origin?.replace(/\/$/u, "") ?? `${t.https ? "https" : "http"}://localhost:${String(t.port)}`;
|
|
2935
2919
|
return `${(await oe(e, `${i}/`)).flatMap((n) => "javascriptCode" in n ? n.javascriptCode : []).join(`
|
|
2936
2920
|
`)}
|
|
2937
2921
|
`;
|
|
2938
2922
|
}
|
|
2939
|
-
function
|
|
2923
|
+
function to(e, t) {
|
|
2940
2924
|
return te && e.viteCommand === "serve" && !e.isInTest && t.resolve?.conditions?.includes("storybook") !== !0 && t.server?.middlewareMode !== !0;
|
|
2941
2925
|
}
|
|
2942
|
-
const
|
|
2926
|
+
const io = (e) => ({
|
|
2943
2927
|
name: "@arcgis/lumina:setAssetPath",
|
|
2944
2928
|
apply: () => e.viteCommand === "build",
|
|
2945
2929
|
config: (t) => ({
|
|
2946
2930
|
base: t.base ?? e.options.assets?.defaultPath ?? De()
|
|
2947
2931
|
})
|
|
2948
2932
|
});
|
|
2949
|
-
function
|
|
2933
|
+
function so(e = j()) {
|
|
2950
2934
|
const t = pt(e) ?? "0.0.1";
|
|
2951
2935
|
return Ss(t);
|
|
2952
2936
|
}
|
|
2953
|
-
const
|
|
2937
|
+
const ro = (e) => `/* ${e} */`, k = (e) => (t, i) => {
|
|
2954
2938
|
Object.defineProperty(t, i, {
|
|
2955
2939
|
get() {
|
|
2956
2940
|
throw Error(
|
|
@@ -2990,7 +2974,7 @@ const ue = {
|
|
|
2990
2974
|
stencilLikeDocsJson: "docs/docs.json"
|
|
2991
2975
|
}, rt = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
|
|
2992
2976
|
async function Qi(e, t, i = j()) {
|
|
2993
|
-
const s =
|
|
2977
|
+
const s = no(e, i), n = u.join(t, "lumina.ts"), a = await _(n) ? await z(n, "utf8") : "";
|
|
2994
2978
|
if (a.trim().replaceAll(`\r
|
|
2995
2979
|
`, `
|
|
2996
2980
|
`) === s.trim())
|
|
@@ -3010,7 +2994,7 @@ ${a}`
|
|
|
3010
2994
|
);
|
|
3011
2995
|
return ai(n, s), !0;
|
|
3012
2996
|
}
|
|
3013
|
-
function
|
|
2997
|
+
function no(e, t = j()) {
|
|
3014
2998
|
const i = e.filter((d) => d.type === "@arcgis/lumina").map((d) => `
|
|
3015
2999
|
/// <reference types="${d.packageName}/types/lumina" />`), s = e.filter((d) => d.type === "stencil"), n = s.map(
|
|
3016
3000
|
(d, l) => `
|
|
@@ -3021,7 +3005,7 @@ declare module "@arcgis/lumina" {
|
|
|
3021
3005
|
interface ImportStencilElements extends ${s.map((d, l) => `JSX$${l}.IntrinsicElements`).join(", ")} {}
|
|
3022
3006
|
}`, a = t.devDependencies ?? {};
|
|
3023
3007
|
return [
|
|
3024
|
-
|
|
3008
|
+
oo,
|
|
3025
3009
|
a.vitest ? `
|
|
3026
3010
|
/// <reference types="vitest/config" />
|
|
3027
3011
|
/// <reference types="vitest/browser" />` : "",
|
|
@@ -3032,7 +3016,7 @@ declare module "@arcgis/lumina" {
|
|
|
3032
3016
|
`
|
|
3033
3017
|
].join("");
|
|
3034
3018
|
}
|
|
3035
|
-
const
|
|
3019
|
+
const oo = `/**
|
|
3036
3020
|
* This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
|
|
3037
3021
|
* Manual edits will be overwritten.
|
|
3038
3022
|
*
|
|
@@ -3051,13 +3035,13 @@ const ro = `/**
|
|
|
3051
3035
|
* is doing:
|
|
3052
3036
|
* https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
|
|
3053
3037
|
*/
|
|
3054
|
-
e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0,
|
|
3038
|
+
e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, ao = (e) => ({
|
|
3055
3039
|
name: Ce,
|
|
3056
3040
|
async configureServer(t) {
|
|
3057
|
-
H && (e.server = t, await
|
|
3041
|
+
H && (e.server = t, await on(e));
|
|
3058
3042
|
},
|
|
3059
3043
|
configResolved() {
|
|
3060
|
-
!e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise =
|
|
3044
|
+
!e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = co(e).catch(
|
|
3061
3045
|
(t) => T.error(Ce, `Failed to update package's src/lumina.ts: ${String(t)}`)
|
|
3062
3046
|
));
|
|
3063
3047
|
},
|
|
@@ -3107,25 +3091,25 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
|
|
|
3107
3091
|
await e._updateLuminaTsPromise;
|
|
3108
3092
|
}
|
|
3109
3093
|
});
|
|
3110
|
-
async function
|
|
3094
|
+
async function co(e) {
|
|
3111
3095
|
const i = (await Promise.all([ne, Vi(e)])).flat();
|
|
3112
3096
|
if (!await Qi(i, e.dir.src))
|
|
3113
3097
|
return;
|
|
3114
3098
|
let n = !1;
|
|
3115
3099
|
function r() {
|
|
3116
|
-
n || T.warn(Ce,
|
|
3100
|
+
n || T.warn(Ce, lo), n = !0;
|
|
3117
3101
|
}
|
|
3118
3102
|
process.on("exit", () => {
|
|
3119
3103
|
r(), clearTimeout(c);
|
|
3120
3104
|
});
|
|
3121
3105
|
const c = setTimeout(r, 2e3);
|
|
3122
3106
|
}
|
|
3123
|
-
const
|
|
3107
|
+
const lo = Us(
|
|
3124
3108
|
"greenBright",
|
|
3125
3109
|
`lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
|
|
3126
3110
|
If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
|
|
3127
3111
|
);
|
|
3128
|
-
async function
|
|
3112
|
+
async function po(e) {
|
|
3129
3113
|
const t = e.options.apiExtractor?.configFilePath === "" ? void 0 : await Hs(process.cwd()), i = e.apiExtractorPluginConfig.unsafeConfigOverride === void 0 || t === void 0 ? t ?? e.apiExtractorPluginConfig.unsafeConfigOverride : Tt(t, e.apiExtractorPluginConfig.unsafeConfigOverride);
|
|
3130
3114
|
e._documentationFileNames.apiJson = i?.context?.apiJsonEmitPath === void 0 ? e.options.documentation?.apiJsonFileName === !1 ? void 0 : e.options.documentation?.apiJsonFileName ? pe(e.options.documentation.apiJsonFileName) : ue.apiJson : i.context.apiJsonEmitPath || void 0, e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
|
|
3131
3115
|
{
|
|
@@ -3240,10 +3224,10 @@ function _t(e, t) {
|
|
|
3240
3224
|
}
|
|
3241
3225
|
e._localDefinedComponents = void 0, e.privateApiJson = t, e.apiJsonComponents = s, e.apiJson = i, n !== void 0 && (e.componentFilesPromise = Promise.resolve(n));
|
|
3242
3226
|
}
|
|
3243
|
-
var
|
|
3227
|
+
var uo = Object.defineProperty, I = (e, t, i, s) => {
|
|
3244
3228
|
for (var n = void 0, r = e.length - 1, a; r >= 0; r--)
|
|
3245
3229
|
(a = e[r]) && (n = a(t, i, n) || n);
|
|
3246
|
-
return n &&
|
|
3230
|
+
return n && uo(t, i, n), n;
|
|
3247
3231
|
};
|
|
3248
3232
|
const V = "@arcgis/lumina:context";
|
|
3249
3233
|
class $ {
|
|
@@ -3320,7 +3304,7 @@ class $ {
|
|
|
3320
3304
|
webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? pe(i.jetBrains.webTypesFileName) : ue.webTypes,
|
|
3321
3305
|
vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? pe(i.vsCode.htmlFileName) : ue.vsCodeHtml,
|
|
3322
3306
|
vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? pe(i.vsCode.cssFileName) : ue.vsCodeCss
|
|
3323
|
-
}, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise =
|
|
3307
|
+
}, this.apiExtractorPluginConfig = this.options.apiExtractor ?? {}, this.configsPromise = po(this);
|
|
3324
3308
|
const s = process.cwd().length + 1;
|
|
3325
3309
|
this.componentFilesPromise = this.configsPromise.then(() => {
|
|
3326
3310
|
const r = this.apiExtractorPluginConfig.unsafeConfigOverride.types.typeScriptConfig.config.fileNames, a = [];
|
|
@@ -3330,8 +3314,8 @@ class $ {
|
|
|
3330
3314
|
}
|
|
3331
3315
|
return a;
|
|
3332
3316
|
}), Pi(void 0, t);
|
|
3333
|
-
const n = t.build?.preamble ??
|
|
3334
|
-
this.banner =
|
|
3317
|
+
const n = t.build?.preamble ?? so();
|
|
3318
|
+
this.banner = ro(n);
|
|
3335
3319
|
}
|
|
3336
3320
|
_inferBuildSetup({ command: t, mode: i }, s) {
|
|
3337
3321
|
this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (T.warn($i.name, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
|
|
@@ -3482,7 +3466,7 @@ I([
|
|
|
3482
3466
|
I([
|
|
3483
3467
|
k("configResolved()")
|
|
3484
3468
|
], $.prototype, "_typeScriptPrinter");
|
|
3485
|
-
function
|
|
3469
|
+
function mo(e, t, i) {
|
|
3486
3470
|
const s = ki()[t] ?? es(e)[t];
|
|
3487
3471
|
if (s === void 0) {
|
|
3488
3472
|
if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
|
|
@@ -3497,7 +3481,7 @@ function po(e, t, i) {
|
|
|
3497
3481
|
}
|
|
3498
3482
|
return s;
|
|
3499
3483
|
}
|
|
3500
|
-
function
|
|
3484
|
+
function fo(e, t) {
|
|
3501
3485
|
return e.packageName === void 0 ? he(t, e.modulePath) : u.join(e.packageName, e.modulePath);
|
|
3502
3486
|
}
|
|
3503
3487
|
function es(e) {
|
|
@@ -3512,8 +3496,8 @@ function es(e) {
|
|
|
3512
3496
|
e.viteCommand === "build"
|
|
3513
3497
|
), e._localDefinedComponents;
|
|
3514
3498
|
}
|
|
3515
|
-
const Kt = "makeRuntime(",
|
|
3516
|
-
name:
|
|
3499
|
+
const Kt = "makeRuntime(", go = "@arcgis/core", ho = "@arcgis/lumina:injectRuntimeOptions", yo = (e) => ({
|
|
3500
|
+
name: ho,
|
|
3517
3501
|
transform: {
|
|
3518
3502
|
filter: {
|
|
3519
3503
|
id: /\/src\/runtime\.ts$/u
|
|
@@ -3540,7 +3524,7 @@ const Kt = "makeRuntime(", mo = "@arcgis/core", fo = "@arcgis/lumina:injectRunti
|
|
|
3540
3524
|
// Dependency injection. Lumina cannot directly import these to avoid
|
|
3541
3525
|
// a cyclical dependency.
|
|
3542
3526
|
H ? `
|
|
3543
|
-
import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${
|
|
3527
|
+
import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${go}/applications/Components/reactiveUtils.js";
|
|
3544
3528
|
createObservable,
|
|
3545
3529
|
runtime.t = trackAccess;
|
|
3546
3530
|
runtime.o = createObservable;
|
|
@@ -3552,11 +3536,11 @@ runtime.r = runTracked;` : ""
|
|
|
3552
3536
|
}
|
|
3553
3537
|
}
|
|
3554
3538
|
});
|
|
3555
|
-
function
|
|
3539
|
+
function vo(e) {
|
|
3556
3540
|
return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${le}/${Z}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
|
|
3557
3541
|
`;
|
|
3558
3542
|
}
|
|
3559
|
-
const we = "@arcgis/lumina:addNonLazyImports",
|
|
3543
|
+
const we = "@arcgis/lumina:addNonLazyImports", bo = (e) => ({
|
|
3560
3544
|
name: we,
|
|
3561
3545
|
apply: () => e.viteCommand === "build",
|
|
3562
3546
|
generateBundle(t, i) {
|
|
@@ -3568,7 +3552,7 @@ const we = "@arcgis/lumina:addNonLazyImports", yo = (e) => ({
|
|
|
3568
3552
|
if (d !== a && (c.fileName = d), c.type === "chunk") {
|
|
3569
3553
|
const l = u.dirname(u.join(e.dir.dist, a)), p = d === a ? l : u.dirname(u.join(e.dir.dist, d));
|
|
3570
3554
|
let m = c.code;
|
|
3571
|
-
m =
|
|
3555
|
+
m = pn(m, e, p, l), !e.isInStorybook && d === "chunks/runtime.js" && (r = !0, m = vo(e) + m), m = `${e.banner}${n}${m}`, c.code = m;
|
|
3572
3556
|
}
|
|
3573
3557
|
}), !r && !e.isInStorybook)
|
|
3574
3558
|
throw Error(b(we, "Expected to find a chunks/runtime.js file in the Vite's build output."));
|
|
@@ -3605,10 +3589,10 @@ Possible causes:
|
|
|
3605
3589
|
return [];
|
|
3606
3590
|
const d = u.dirname(r), l = e.dir.src + Ge(d.slice(e.dir.src.length), e.apiExtractor), p = u.relative(e.dir.src, l);
|
|
3607
3591
|
function m(P) {
|
|
3608
|
-
const x =
|
|
3592
|
+
const x = mo(e, P, r);
|
|
3609
3593
|
if (x === void 0)
|
|
3610
3594
|
return;
|
|
3611
|
-
const S =
|
|
3595
|
+
const S = fo(x, p);
|
|
3612
3596
|
if (S !== `./${p}`)
|
|
3613
3597
|
return S.startsWith(".") ? `${S}/${Wt}` : S;
|
|
3614
3598
|
}
|
|
@@ -3653,14 +3637,14 @@ function ee(e) {
|
|
|
3653
3637
|
return (
|
|
3654
3638
|
// Inlined string literal
|
|
3655
3639
|
typeof e == "string" || // Syntax kinds that are never undefined
|
|
3656
|
-
|
|
3640
|
+
wo.has(e.kind) || // Ternary with both branches never undefined
|
|
3657
3641
|
o.isConditionalExpression(e) && ee(e.whenTrue) && ee(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
|
|
3658
|
-
o.isBinaryExpression(e) && (
|
|
3642
|
+
o.isBinaryExpression(e) && (So.has(e.operatorToken.kind) || ee(e.left) && ee(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
|
|
3659
3643
|
(o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ee(e.expression) || // JSX that got converted to html`<p>Something</p>`
|
|
3660
3644
|
o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && lr.has(e.tag.text)
|
|
3661
3645
|
);
|
|
3662
3646
|
}
|
|
3663
|
-
const
|
|
3647
|
+
const wo = /* @__PURE__ */ new Set([
|
|
3664
3648
|
o.SyntaxKind.NumericLiteral,
|
|
3665
3649
|
o.SyntaxKind.BigIntLiteral,
|
|
3666
3650
|
o.SyntaxKind.StringLiteral,
|
|
@@ -3679,7 +3663,7 @@ const vo = /* @__PURE__ */ new Set([
|
|
|
3679
3663
|
o.SyntaxKind.ClassExpression,
|
|
3680
3664
|
// Trust? Trust.
|
|
3681
3665
|
o.SyntaxKind.NonNullExpression
|
|
3682
|
-
]),
|
|
3666
|
+
]), So = /* @__PURE__ */ new Set([
|
|
3683
3667
|
o.SyntaxKind.PlusEqualsToken,
|
|
3684
3668
|
o.SyntaxKind.MinusEqualsToken,
|
|
3685
3669
|
o.SyntaxKind.AsteriskAsteriskEqualsToken,
|
|
@@ -3714,9 +3698,9 @@ const vo = /* @__PURE__ */ new Set([
|
|
|
3714
3698
|
o.SyntaxKind.SlashToken,
|
|
3715
3699
|
o.SyntaxKind.PercentToken,
|
|
3716
3700
|
o.SyntaxKind.AsteriskAsteriskToken
|
|
3717
|
-
]),
|
|
3701
|
+
]), Co = {
|
|
3718
3702
|
property(e, t, i, s) {
|
|
3719
|
-
const n =
|
|
3703
|
+
const n = Eo(s, i, e), r = n?.type === "stringifiedReflected", a = n?.type === "reflected" || r;
|
|
3720
3704
|
if (a) {
|
|
3721
3705
|
const f = He(t);
|
|
3722
3706
|
if (f === !0)
|
|
@@ -3733,7 +3717,7 @@ const vo = /* @__PURE__ */ new Set([
|
|
|
3733
3717
|
p,
|
|
3734
3718
|
e,
|
|
3735
3719
|
m ? "" : void 0
|
|
3736
|
-
), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ?
|
|
3720
|
+
), h = i === "value" && (s === "input" || s === "textarea" || s === ke) ? $o(f, e) : f;
|
|
3737
3721
|
if (h !== p)
|
|
3738
3722
|
return [m ? `.${i}` : n.name, l, h];
|
|
3739
3723
|
}
|
|
@@ -3806,7 +3790,7 @@ const vo = /* @__PURE__ */ new Set([
|
|
|
3806
3790
|
return [o.factory.createIdentifier(n)];
|
|
3807
3791
|
}
|
|
3808
3792
|
};
|
|
3809
|
-
function
|
|
3793
|
+
function Eo(e, t, i) {
|
|
3810
3794
|
if (typeof e == "string") {
|
|
3811
3795
|
const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
|
|
3812
3796
|
if (r !== void 0)
|
|
@@ -3900,7 +3884,7 @@ function Ht(e, t, i) {
|
|
|
3900
3884
|
`${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
|
|
3901
3885
|
);
|
|
3902
3886
|
const s = t.expression;
|
|
3903
|
-
if (
|
|
3887
|
+
if (To(s)) {
|
|
3904
3888
|
const r = i === "class" ? "safeClassMap" : "safeStyleMap";
|
|
3905
3889
|
e.neededImports.add(r);
|
|
3906
3890
|
const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
|
|
@@ -3910,15 +3894,15 @@ function Ht(e, t, i) {
|
|
|
3910
3894
|
} else
|
|
3911
3895
|
return [i, ...Ee(e, t, !0)];
|
|
3912
3896
|
}
|
|
3913
|
-
const
|
|
3914
|
-
function
|
|
3897
|
+
const To = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
|
|
3898
|
+
function $o(e, t) {
|
|
3915
3899
|
t.neededImports.add("live");
|
|
3916
3900
|
const i = t.importRenames.live;
|
|
3917
3901
|
return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
|
|
3918
3902
|
typeof e == "string" ? o.factory.createStringLiteral(e) : e
|
|
3919
3903
|
]);
|
|
3920
3904
|
}
|
|
3921
|
-
function
|
|
3905
|
+
function Po(e) {
|
|
3922
3906
|
if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in qt && e.expression.arguments.length <= 1)
|
|
3923
3907
|
return {
|
|
3924
3908
|
propType: qt[e.expression.expression.text],
|
|
@@ -3936,15 +3920,15 @@ const qt = {
|
|
|
3936
3920
|
bindBooleanAttribute: "booleanAttribute",
|
|
3937
3921
|
bindEvent: "event"
|
|
3938
3922
|
};
|
|
3939
|
-
function
|
|
3940
|
-
return
|
|
3923
|
+
function ko(e, t, i) {
|
|
3924
|
+
return xo.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : pi.has(e) || e.includes("-") ? "attribute" : !lt(i) && (ui.has(e) || (i === Ye ? !1 : i === ke ? (
|
|
3941
3925
|
// When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
|
|
3942
3926
|
Object.values(Qe).some((r) => r.has(e))
|
|
3943
3927
|
) : Qe[i]?.has(e) === !0)) ? $t.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === Ye || i !== ke && (at.has(i) || ct.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : $t.has(e) ? "booleanAttribute" : "attribute" : "property";
|
|
3944
3928
|
}
|
|
3945
|
-
const
|
|
3929
|
+
const Io = ["class", "style", "ref", "directives", "key", "deferLoad"], xo = new Set(Io), Ao = (e) => typeof e != "string" || e.trim().length > 0;
|
|
3946
3930
|
function Oe({ key: e, parts: t, litTag: i }, s) {
|
|
3947
|
-
const n =
|
|
3931
|
+
const n = Lo(t);
|
|
3948
3932
|
if (n.length % 2 === 0)
|
|
3949
3933
|
throw new Error("Normalized template parts array length must be odd");
|
|
3950
3934
|
const [r, ...a] = n;
|
|
@@ -3965,11 +3949,11 @@ function Oe({ key: e, parts: t, litTag: i }, s) {
|
|
|
3965
3949
|
const d = s.importRenames[c], l = o.factory.createTaggedTemplateExpression(
|
|
3966
3950
|
o.factory.createIdentifier(d),
|
|
3967
3951
|
void 0,
|
|
3968
|
-
a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r),
|
|
3952
|
+
a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), No(a))
|
|
3969
3953
|
);
|
|
3970
3954
|
return qe(s, e, l);
|
|
3971
3955
|
}
|
|
3972
|
-
const
|
|
3956
|
+
const Lo = (e) => e.reduce(
|
|
3973
3957
|
(t, i, s) => {
|
|
3974
3958
|
const n = t.at(-1), r = typeof n == "string", a = typeof i == "string";
|
|
3975
3959
|
if (r && a)
|
|
@@ -3979,7 +3963,7 @@ const xo = (e) => e.reduce(
|
|
|
3979
3963
|
},
|
|
3980
3964
|
[""]
|
|
3981
3965
|
);
|
|
3982
|
-
function
|
|
3966
|
+
function No(e) {
|
|
3983
3967
|
if (!(e.length % 2 === 0))
|
|
3984
3968
|
throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
|
|
3985
3969
|
const i = e.length / 2;
|
|
@@ -4018,13 +4002,13 @@ function ss(e, t) {
|
|
|
4018
4002
|
);
|
|
4019
4003
|
}
|
|
4020
4004
|
const ht = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
|
|
4021
|
-
function
|
|
4005
|
+
function jo(e) {
|
|
4022
4006
|
const t = ht(e);
|
|
4023
4007
|
if (t.length === 0)
|
|
4024
4008
|
return [e || " "];
|
|
4025
4009
|
const i = t.reduceRight(
|
|
4026
4010
|
([n, ...r], a) => {
|
|
4027
|
-
const c =
|
|
4011
|
+
const c = Fo(n), d = rs(c.slice(a.pos, a.end));
|
|
4028
4012
|
return [
|
|
4029
4013
|
c.slice(0, a.pos),
|
|
4030
4014
|
/**
|
|
@@ -4043,12 +4027,12 @@ function Lo(e) {
|
|
|
4043
4027
|
return (typeof s != "string" || s.trim() !== "") && i.push(" "), i;
|
|
4044
4028
|
}
|
|
4045
4029
|
const rs = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
|
|
4046
|
-
function
|
|
4030
|
+
function Fo(e) {
|
|
4047
4031
|
if (typeof e == "string")
|
|
4048
4032
|
return e;
|
|
4049
4033
|
throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
|
|
4050
4034
|
}
|
|
4051
|
-
function
|
|
4035
|
+
function Ro(e, t) {
|
|
4052
4036
|
if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
|
|
4053
4037
|
return t;
|
|
4054
4038
|
const s = t.arguments[0];
|
|
@@ -4082,7 +4066,7 @@ function jo(e, t) {
|
|
|
4082
4066
|
const f = p.attributes.properties[m];
|
|
4083
4067
|
if (f === void 0 || !o.isJsxAttribute(f))
|
|
4084
4068
|
return t;
|
|
4085
|
-
const g = gt(f.initializer, e.sourceFile), h =
|
|
4069
|
+
const g = gt(f.initializer, e.sourceFile), h = Do(r, s, g, d, e);
|
|
4086
4070
|
if (h === void 0)
|
|
4087
4071
|
return t;
|
|
4088
4072
|
e.liftedKeys.add(f.name), e.neededImports.add("repeat");
|
|
@@ -4115,7 +4099,7 @@ function ns(e) {
|
|
|
4115
4099
|
void 0
|
|
4116
4100
|
), t;
|
|
4117
4101
|
}
|
|
4118
|
-
function
|
|
4102
|
+
function Do(e, t, i, s, n) {
|
|
4119
4103
|
const r = J(i);
|
|
4120
4104
|
if (r === void 0)
|
|
4121
4105
|
return;
|
|
@@ -4131,7 +4115,7 @@ function Fo(e, t, i, s, n) {
|
|
|
4131
4115
|
return;
|
|
4132
4116
|
}
|
|
4133
4117
|
if (!s) {
|
|
4134
|
-
const d =
|
|
4118
|
+
const d = Mo(r, a, t);
|
|
4135
4119
|
if (d === void 0)
|
|
4136
4120
|
return;
|
|
4137
4121
|
a = d;
|
|
@@ -4170,7 +4154,7 @@ function J(e) {
|
|
|
4170
4154
|
}
|
|
4171
4155
|
return t;
|
|
4172
4156
|
} else {
|
|
4173
|
-
if (
|
|
4157
|
+
if (Oo.has(e.kind))
|
|
4174
4158
|
return [];
|
|
4175
4159
|
{
|
|
4176
4160
|
const t = ge(e);
|
|
@@ -4178,7 +4162,7 @@ function J(e) {
|
|
|
4178
4162
|
}
|
|
4179
4163
|
}
|
|
4180
4164
|
}
|
|
4181
|
-
const
|
|
4165
|
+
const Oo = /* @__PURE__ */ new Set([
|
|
4182
4166
|
o.SyntaxKind.NumericLiteral,
|
|
4183
4167
|
o.SyntaxKind.BigIntLiteral,
|
|
4184
4168
|
o.SyntaxKind.StringLiteral,
|
|
@@ -4187,12 +4171,12 @@ const Ro = /* @__PURE__ */ new Set([
|
|
|
4187
4171
|
o.SyntaxKind.FalseKeyword,
|
|
4188
4172
|
o.SyntaxKind.NullKeyword,
|
|
4189
4173
|
o.SyntaxKind.TrueKeyword
|
|
4190
|
-
]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, os = (e, t) => o.isObjectBindingPattern(e) ?
|
|
4191
|
-
function
|
|
4174
|
+
]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, os = (e, t) => o.isObjectBindingPattern(e) ? _o(e, t) : e;
|
|
4175
|
+
function Mo(e, t, i) {
|
|
4192
4176
|
if (e.every(Fe, t))
|
|
4193
4177
|
return t;
|
|
4194
4178
|
if (o.isIdentifier(t)) {
|
|
4195
|
-
const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) =>
|
|
4179
|
+
const s = o.isBlock(i.body) ? Xe(i.body.statements, (r) => Jo(r, t)) : void 0;
|
|
4196
4180
|
if (s === void 0)
|
|
4197
4181
|
return;
|
|
4198
4182
|
const n = os(s, e);
|
|
@@ -4200,7 +4184,7 @@ function Do(e, t, i) {
|
|
|
4200
4184
|
return n;
|
|
4201
4185
|
}
|
|
4202
4186
|
}
|
|
4203
|
-
function
|
|
4187
|
+
function Jo(e, t) {
|
|
4204
4188
|
if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
|
|
4205
4189
|
return;
|
|
4206
4190
|
const i = e.declarationList.declarations[0];
|
|
@@ -4208,13 +4192,13 @@ function Oo(e, t) {
|
|
|
4208
4192
|
}
|
|
4209
4193
|
function Fe(e) {
|
|
4210
4194
|
const t = this;
|
|
4211
|
-
return o.isIdentifier(t) ? t.text === e : t.elements.some(
|
|
4195
|
+
return o.isIdentifier(t) ? t.text === e : t.elements.some(Bo, e);
|
|
4212
4196
|
}
|
|
4213
|
-
function
|
|
4197
|
+
function Bo(e) {
|
|
4214
4198
|
const t = this;
|
|
4215
4199
|
return o.isOmittedExpression(e) ? !1 : Fe.call(e.name, t);
|
|
4216
4200
|
}
|
|
4217
|
-
function
|
|
4201
|
+
function _o(e, t) {
|
|
4218
4202
|
let i = !1;
|
|
4219
4203
|
const s = e.elements.filter((n) => o.isIdentifier(n.name) ? t.includes(n.name.text) : (i = !0, !0));
|
|
4220
4204
|
return i || s.length === 0 ? e : o.factory.updateObjectBindingPattern(e, s);
|
|
@@ -4223,13 +4207,13 @@ const as = (e, t) => t.liftedKeys.has(e);
|
|
|
4223
4207
|
function q(e, t, i) {
|
|
4224
4208
|
if (fe(i))
|
|
4225
4209
|
return cs(e, i);
|
|
4226
|
-
const s = o.isCallExpression(i) ?
|
|
4210
|
+
const s = o.isCallExpression(i) ? Ro(e, i) : i, n = o.visitEachChild(
|
|
4227
4211
|
s,
|
|
4228
4212
|
// Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
|
|
4229
4213
|
q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
|
|
4230
4214
|
e.transformationContext
|
|
4231
4215
|
);
|
|
4232
|
-
return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || mr(i.right)) ?
|
|
4216
|
+
return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || fe(ge(i.right)) || mr(i.right)) ? Uo(n) : n;
|
|
4233
4217
|
}
|
|
4234
4218
|
function cs(e, t) {
|
|
4235
4219
|
const i = ls(e, t);
|
|
@@ -4246,10 +4230,10 @@ function ls(e, t) {
|
|
|
4246
4230
|
const S = o.isIdentifier(r) && r.text === Ys ? Te(i, e) : {
|
|
4247
4231
|
// No need to wrap the function call in a lit-html tag
|
|
4248
4232
|
litTag: void 0,
|
|
4249
|
-
parts: [
|
|
4233
|
+
parts: [Wo(e, t, r, i)]
|
|
4250
4234
|
};
|
|
4251
4235
|
return {
|
|
4252
|
-
key:
|
|
4236
|
+
key: Ko(n, e),
|
|
4253
4237
|
...S
|
|
4254
4238
|
};
|
|
4255
4239
|
}
|
|
@@ -4266,13 +4250,13 @@ Found ${x.getText(e.sourceFile)}`
|
|
|
4266
4250
|
const { name: S, initializer: A } = x;
|
|
4267
4251
|
if (o.isJsxNamespacedName(S))
|
|
4268
4252
|
throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
|
|
4269
|
-
const L = S.text, U =
|
|
4253
|
+
const L = S.text, U = Po(A), F = U?.propType ?? ko(L, A, c);
|
|
4270
4254
|
m?.delete(L);
|
|
4271
|
-
const N =
|
|
4255
|
+
const N = Co[F](e, U?.initializer ?? A, L, c);
|
|
4272
4256
|
if (N.length === 0)
|
|
4273
4257
|
return [];
|
|
4274
|
-
const B = e.compiler.shouldMinifyJsx ? [" "] :
|
|
4275
|
-
return F === "key" ? (f = typeof N[0] == "object" && !as(S, e) ? N[0] : void 0, B.some(
|
|
4258
|
+
const B = e.compiler.shouldMinifyJsx ? [" "] : jo(is(S, e));
|
|
4259
|
+
return F === "key" ? (f = typeof N[0] == "object" && !as(S, e) ? N[0] : void 0, B.some(Ao) ? B : []) : F === "directives" || F === "ref" || L === "deferLoad" ? (h ||= F === "deferLoad", g.push(
|
|
4276
4260
|
...B,
|
|
4277
4261
|
...N.flatMap(
|
|
4278
4262
|
(D, M) => typeof D == "string" || M === 0 || typeof N[M - 1] == "string" ? D : [" ", D]
|
|
@@ -4312,12 +4296,12 @@ Found ${x.getText(e.sourceFile)}`
|
|
|
4312
4296
|
];
|
|
4313
4297
|
return { key: f, parts: P, litTag: d };
|
|
4314
4298
|
}
|
|
4315
|
-
function
|
|
4299
|
+
function Ko(e, t) {
|
|
4316
4300
|
const i = e.attributes.properties[ds(e)];
|
|
4317
4301
|
return i && o.isJsxAttribute(i) && !as(i.name, t) ? gt(i.initializer, t.sourceFile) : void 0;
|
|
4318
4302
|
}
|
|
4319
4303
|
const ds = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
|
|
4320
|
-
function
|
|
4304
|
+
function Wo(e, t, i, s) {
|
|
4321
4305
|
const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
|
|
4322
4306
|
if (o.isJsxSpreadAttribute(d))
|
|
4323
4307
|
return ss(is(d, e), o.factory.createSpreadAssignment(d.expression));
|
|
@@ -4361,7 +4345,7 @@ function Te(e, t) {
|
|
|
4361
4345
|
});
|
|
4362
4346
|
return { litTag: i, parts: s };
|
|
4363
4347
|
}
|
|
4364
|
-
function
|
|
4348
|
+
function Uo(e) {
|
|
4365
4349
|
return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
|
|
4366
4350
|
e,
|
|
4367
4351
|
o.factory.createToken(o.SyntaxKind.BarBarToken),
|
|
@@ -4417,11 +4401,11 @@ const ps = (e) => e.reduce((t, [i, s]) => (t[i] ??= [], t[i].push(s), t), {}), u
|
|
|
4417
4401
|
([e, t]) => t.map((i) => [i, e])
|
|
4418
4402
|
)
|
|
4419
4403
|
), ms = new Set(Object.keys(us));
|
|
4420
|
-
function
|
|
4404
|
+
function zo(e, t) {
|
|
4421
4405
|
const i = t.importClause, s = i === void 0, n = t.moduleSpecifier;
|
|
4422
4406
|
if (!o.isStringLiteral(n))
|
|
4423
4407
|
return t;
|
|
4424
|
-
const r =
|
|
4408
|
+
const r = Ho(e.sourceFile.fileName, n.text, ""), a = !i?.isTypeOnly;
|
|
4425
4409
|
if (a && e.existingImportedModules.add(r), gr.test(n.text) && // If id already includes ?, bypass our custom behavior
|
|
4426
4410
|
!n.text.includes("?")) {
|
|
4427
4411
|
if (s) {
|
|
@@ -4499,11 +4483,11 @@ function Wo(e, t) {
|
|
|
4499
4483
|
}
|
|
4500
4484
|
return t;
|
|
4501
4485
|
}
|
|
4502
|
-
const fs = (e, t) => e === ce && re.staticHtml.includes(t) ? ae : e === se && re.staticSvg.includes(t) ? Y : e,
|
|
4503
|
-
function
|
|
4504
|
-
return o.isImportDeclaration(e) ?
|
|
4486
|
+
const fs = (e, t) => e === ce && re.staticHtml.includes(t) ? ae : e === se && re.staticSvg.includes(t) ? Y : e, Ho = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
|
|
4487
|
+
function qo(e) {
|
|
4488
|
+
return o.isImportDeclaration(e) ? Vo(this, e) : e;
|
|
4505
4489
|
}
|
|
4506
|
-
function
|
|
4490
|
+
function Vo(e, t) {
|
|
4507
4491
|
const i = t.importClause, s = i?.namedBindings, n = t.moduleSpecifier;
|
|
4508
4492
|
if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !ms.has(n.text))
|
|
4509
4493
|
return t;
|
|
@@ -4528,7 +4512,7 @@ function Ho(e, t) {
|
|
|
4528
4512
|
t.attributes
|
|
4529
4513
|
) : t;
|
|
4530
4514
|
}
|
|
4531
|
-
function
|
|
4515
|
+
function Go(e) {
|
|
4532
4516
|
const t = ps(
|
|
4533
4517
|
Array.from(e.neededImports, (i) => [re[i][0], i])
|
|
4534
4518
|
);
|
|
@@ -4554,8 +4538,8 @@ function gs(e, t) {
|
|
|
4554
4538
|
o.factory.createIdentifier(s)
|
|
4555
4539
|
);
|
|
4556
4540
|
}
|
|
4557
|
-
function
|
|
4558
|
-
const t =
|
|
4541
|
+
function Xo(e) {
|
|
4542
|
+
const t = Dr().map(({ packageName: i }) => i);
|
|
4559
4543
|
return e.existingImportedModules.forEach((i) => {
|
|
4560
4544
|
if (u.isAbsolute(i))
|
|
4561
4545
|
return;
|
|
@@ -4568,7 +4552,7 @@ function Vo(e) {
|
|
|
4568
4552
|
}
|
|
4569
4553
|
}), [];
|
|
4570
4554
|
}
|
|
4571
|
-
function
|
|
4555
|
+
function Yo(e) {
|
|
4572
4556
|
if (e.compiler.viteCommand === "serve")
|
|
4573
4557
|
return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
|
|
4574
4558
|
const t = e.compiler._customElementDependencies;
|
|
@@ -4583,7 +4567,7 @@ function Go(e) {
|
|
|
4583
4567
|
t[s] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[s].referencedBy.push(e.sourceFile.fileName);
|
|
4584
4568
|
}), [];
|
|
4585
4569
|
}
|
|
4586
|
-
const
|
|
4570
|
+
const Qo = (e, t) => {
|
|
4587
4571
|
const i = e.pragmas;
|
|
4588
4572
|
if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
|
|
4589
4573
|
return e.statements;
|
|
@@ -4607,7 +4591,7 @@ const Xo = (e, t) => {
|
|
|
4607
4591
|
localComponents: es(t.compiler),
|
|
4608
4592
|
sourceFile: e,
|
|
4609
4593
|
transformationContext: t.transformation,
|
|
4610
|
-
importRenames:
|
|
4594
|
+
importRenames: Zo(e),
|
|
4611
4595
|
existingImportedModules: /* @__PURE__ */ new Set(),
|
|
4612
4596
|
importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
|
|
4613
4597
|
existingLitImports: /* @__PURE__ */ new Set(),
|
|
@@ -4621,7 +4605,7 @@ const Xo = (e, t) => {
|
|
|
4621
4605
|
let a = [];
|
|
4622
4606
|
if (e.statements.every((d) => {
|
|
4623
4607
|
if (o.isImportDeclaration(d)) {
|
|
4624
|
-
const l =
|
|
4608
|
+
const l = zo(r, d);
|
|
4625
4609
|
if (l === void 0)
|
|
4626
4610
|
return !0;
|
|
4627
4611
|
if (a.push(l), r.hasNonLuminaJsxImport)
|
|
@@ -4631,11 +4615,11 @@ const Xo = (e, t) => {
|
|
|
4631
4615
|
return !0;
|
|
4632
4616
|
}), r.hasNonLuminaJsxImport)
|
|
4633
4617
|
return e.statements;
|
|
4634
|
-
if (r.neededImports.size > 0 && (a = a.map(
|
|
4618
|
+
if (r.neededImports.size > 0 && (a = a.map(qo, r), r.existingLitImports.size > 0))
|
|
4635
4619
|
throw new Error(
|
|
4636
4620
|
`Expected context.existingLitImports to be empty by now. Found: ${Array.from(r.existingLitImports).join(", ")}`
|
|
4637
4621
|
);
|
|
4638
|
-
const c = [
|
|
4622
|
+
const c = [Go, Xo, Yo].flatMap(
|
|
4639
4623
|
(d) => d(r)
|
|
4640
4624
|
);
|
|
4641
4625
|
if (r.neededImports.size > 0)
|
|
@@ -4644,18 +4628,18 @@ const Xo = (e, t) => {
|
|
|
4644
4628
|
);
|
|
4645
4629
|
return [...c, ...a];
|
|
4646
4630
|
};
|
|
4647
|
-
function
|
|
4648
|
-
return
|
|
4631
|
+
function Zo(e) {
|
|
4632
|
+
return ea(e), Object.fromEntries(
|
|
4649
4633
|
ur.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
|
|
4650
4634
|
);
|
|
4651
4635
|
}
|
|
4652
|
-
function
|
|
4636
|
+
function ea(e) {
|
|
4653
4637
|
if (!("identifiers" in e))
|
|
4654
4638
|
throw new Error(
|
|
4655
4639
|
"Expected sourceFile to have an undocumented identifiers property that is a Map<string,string>. If this error is thrown, it may mean Lumina Compiler needs to be updated to support the version of TypeScript being used."
|
|
4656
4640
|
);
|
|
4657
4641
|
}
|
|
4658
|
-
const Gt = "customElement",
|
|
4642
|
+
const Gt = "customElement", ta = (e, t) => {
|
|
4659
4643
|
const i = [];
|
|
4660
4644
|
if (t.apiModule?.declarations.forEach((r) => {
|
|
4661
4645
|
const a = r;
|
|
@@ -4685,7 +4669,7 @@ const Gt = "customElement", Zo = (e, t) => {
|
|
|
4685
4669
|
o.factory.createStringLiteral(s)
|
|
4686
4670
|
), ...e.statements, ...i];
|
|
4687
4671
|
};
|
|
4688
|
-
function
|
|
4672
|
+
function ia(e, t, i) {
|
|
4689
4673
|
return t.size === 0 ? e : [
|
|
4690
4674
|
o.factory.createPropertyDeclaration(
|
|
4691
4675
|
[
|
|
@@ -4700,7 +4684,7 @@ function ea(e, t, i) {
|
|
|
4700
4684
|
t.entries(),
|
|
4701
4685
|
([s, n]) => o.factory.createPropertyAssignment(
|
|
4702
4686
|
ci(s) ? o.factory.createStringLiteral(s) : s,
|
|
4703
|
-
|
|
4687
|
+
sa(n, i)
|
|
4704
4688
|
)
|
|
4705
4689
|
)
|
|
4706
4690
|
)
|
|
@@ -4708,7 +4692,7 @@ function ea(e, t, i) {
|
|
|
4708
4692
|
...e
|
|
4709
4693
|
];
|
|
4710
4694
|
}
|
|
4711
|
-
function
|
|
4695
|
+
function sa(e, t) {
|
|
4712
4696
|
let i = 0, s = !0;
|
|
4713
4697
|
const n = [], r = [];
|
|
4714
4698
|
for (const d of e.properties)
|
|
@@ -4753,7 +4737,7 @@ function ta(e, t) {
|
|
|
4753
4737
|
...t ? [] : [o.factory.createObjectLiteralExpression(r)]
|
|
4754
4738
|
]);
|
|
4755
4739
|
}
|
|
4756
|
-
function
|
|
4740
|
+
function ra(e, t, i) {
|
|
4757
4741
|
let s = -1, n = -1, r = -1;
|
|
4758
4742
|
e.options?.properties.forEach((p, m) => {
|
|
4759
4743
|
if (o.isSpreadAssignment(p))
|
|
@@ -4765,23 +4749,23 @@ function ia(e, t, i) {
|
|
|
4765
4749
|
f === "type" ? s = m : f === "attribute" ? n = m : f === "readOnly" && (r = m);
|
|
4766
4750
|
}
|
|
4767
4751
|
});
|
|
4768
|
-
const a = i.attribute === void 0 && n === -1, c = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d =
|
|
4752
|
+
const a = i.attribute === void 0 && n === -1, c = i.readonly === !0 && i.docsOnlyReadonly !== !0 && r === -1, d = na(e, i, s), l = [
|
|
4769
4753
|
...a ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
|
|
4770
4754
|
...c ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
|
|
4771
4755
|
...d !== void 0 ? [d] : []
|
|
4772
4756
|
];
|
|
4773
4757
|
return l.length > 0 ? e.options === void 0 ? o.factory.createObjectLiteralExpression(l, !1) : o.factory.updateObjectLiteralExpression(e.options, [...e.options.properties, ...l]) : e.options;
|
|
4774
4758
|
}
|
|
4775
|
-
function
|
|
4759
|
+
function na(e, t, i) {
|
|
4776
4760
|
if (t.attribute === void 0)
|
|
4777
4761
|
return;
|
|
4778
|
-
const s =
|
|
4762
|
+
const s = oa(t.type.values);
|
|
4779
4763
|
return s === "Other" || t.readonly === !0 && (s !== "Boolean" || t.reflects === void 0) || e.options?.properties[i] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
|
|
4780
4764
|
o.factory.createIdentifier("type"),
|
|
4781
4765
|
o.factory.createIdentifier(s)
|
|
4782
4766
|
);
|
|
4783
4767
|
}
|
|
4784
|
-
function
|
|
4768
|
+
function oa(e) {
|
|
4785
4769
|
let t = !1, i = !1, s = !1;
|
|
4786
4770
|
if (e?.forEach((n) => {
|
|
4787
4771
|
t ||= n.type === "number", i ||= n.type === "boolean", s ||= n.type === "string" || n.type === "any" || n.type === "unknown";
|
|
@@ -4793,7 +4777,7 @@ function ra(e) {
|
|
|
4793
4777
|
}
|
|
4794
4778
|
return "Other";
|
|
4795
4779
|
}
|
|
4796
|
-
function
|
|
4780
|
+
function aa(e, t, i, s, n, r) {
|
|
4797
4781
|
if (i.modifiers === void 0)
|
|
4798
4782
|
return i;
|
|
4799
4783
|
let a = -1, c = -1;
|
|
@@ -4803,7 +4787,7 @@ function na(e, t, i, s, n, r) {
|
|
|
4803
4787
|
p === "property" && (a = l), p === "state" && (c = l);
|
|
4804
4788
|
}
|
|
4805
4789
|
}), a !== -1) {
|
|
4806
|
-
const d =
|
|
4790
|
+
const d = ca(e, t, i, s, n), l = Xt(i, a, n), p = ra(l, n, d);
|
|
4807
4791
|
return r.set(d.name, p ?? o.factory.createObjectLiteralExpression()), l.options = p, Yt(i, a);
|
|
4808
4792
|
} else if (c !== -1) {
|
|
4809
4793
|
const d = Xt(i, c, n), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), p = d.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(d.options, [...d.options.properties, l]), m = li(i.name);
|
|
@@ -4813,7 +4797,7 @@ function na(e, t, i, s, n, r) {
|
|
|
4813
4797
|
} else
|
|
4814
4798
|
return i;
|
|
4815
4799
|
}
|
|
4816
|
-
function
|
|
4800
|
+
function ca(e, t, i, s, n) {
|
|
4817
4801
|
const r = t ?? (e.compiler.isInTest ? {
|
|
4818
4802
|
members: []
|
|
4819
4803
|
} : void 0);
|
|
@@ -4873,7 +4857,7 @@ function Yt(e, t) {
|
|
|
4873
4857
|
e.initializer
|
|
4874
4858
|
);
|
|
4875
4859
|
}
|
|
4876
|
-
function
|
|
4860
|
+
function la(e, t, i, s) {
|
|
4877
4861
|
let n;
|
|
4878
4862
|
if (e.apiJsonEnabled)
|
|
4879
4863
|
for (let d = 0; d < e.privateApiJson.modules.length; ++d) {
|
|
@@ -4896,9 +4880,9 @@ function aa(e, t, i, s) {
|
|
|
4896
4880
|
} finally {
|
|
4897
4881
|
c = i.statements, i.statements = a;
|
|
4898
4882
|
}
|
|
4899
|
-
return
|
|
4883
|
+
return da(i, c);
|
|
4900
4884
|
}
|
|
4901
|
-
const
|
|
4885
|
+
const da = (e, t) => o.factory.updateSourceFile(
|
|
4902
4886
|
e,
|
|
4903
4887
|
t,
|
|
4904
4888
|
/*
|
|
@@ -4913,10 +4897,10 @@ const ca = (e, t) => o.factory.updateSourceFile(
|
|
|
4913
4897
|
e.hasNoDefaultLib,
|
|
4914
4898
|
e.libReferenceDirectives
|
|
4915
4899
|
);
|
|
4916
|
-
function
|
|
4900
|
+
function pa(e, t) {
|
|
4917
4901
|
t.compiler.viteCommand === "build" && ("emitNode" in e && (e.emitNode ??= {}), o.setEmitFlags(e, o.EmitFlags.NoComments));
|
|
4918
4902
|
}
|
|
4919
|
-
const
|
|
4903
|
+
const ua = (e, t) => {
|
|
4920
4904
|
let i;
|
|
4921
4905
|
if (t.apiModule !== void 0)
|
|
4922
4906
|
for (let d = 0; d < t.apiModule.declarations.length; ++d) {
|
|
@@ -4932,10 +4916,10 @@ const da = (e, t) => {
|
|
|
4932
4916
|
function n() {
|
|
4933
4917
|
s = /* @__PURE__ */ new Map();
|
|
4934
4918
|
}
|
|
4935
|
-
const r = (d) =>
|
|
4919
|
+
const r = (d) => ia(d, s, t.compiler.shouldMinify);
|
|
4936
4920
|
function a(d, l) {
|
|
4937
|
-
const p =
|
|
4938
|
-
return
|
|
4921
|
+
const p = fa(t, i, d, l, e, s);
|
|
4922
|
+
return pa(p, t), p;
|
|
4939
4923
|
}
|
|
4940
4924
|
return e.statements.map(
|
|
4941
4925
|
(d) => hs(a, d, t, n, r)
|
|
@@ -4968,11 +4952,11 @@ function hs(e, t, i, s, n = di) {
|
|
|
4968
4952
|
i.transformation
|
|
4969
4953
|
) : t;
|
|
4970
4954
|
}
|
|
4971
|
-
const
|
|
4972
|
-
function
|
|
4955
|
+
const ma = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
|
|
4956
|
+
function fa(e, t, i, s, n, r) {
|
|
4973
4957
|
if (o.isMethodDeclaration(i)) {
|
|
4974
4958
|
const a = i.modifiers?.filter(
|
|
4975
|
-
(c) => !o.isDecorator(c) || !
|
|
4959
|
+
(c) => !o.isDecorator(c) || !ga(c)
|
|
4976
4960
|
);
|
|
4977
4961
|
if (a?.length !== i.modifiers?.length)
|
|
4978
4962
|
return o.factory.updateMethodDeclaration(
|
|
@@ -4986,7 +4970,7 @@ function ua(e, t, i, s, n, r) {
|
|
|
4986
4970
|
i.type,
|
|
4987
4971
|
i.body
|
|
4988
4972
|
);
|
|
4989
|
-
if ("text" in i.name &&
|
|
4973
|
+
if ("text" in i.name && ma.has(i.name.text) && i.body) {
|
|
4990
4974
|
const c = i.name.text;
|
|
4991
4975
|
return i.body.statements.some(
|
|
4992
4976
|
(l) => o.isExpressionStatement(l) && o.isCallExpression(l.expression) && o.isPropertyAccessExpression(l.expression.expression) && l.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && l.expression.expression.name.text === c
|
|
@@ -5012,14 +4996,14 @@ function ua(e, t, i, s, n, r) {
|
|
|
5012
4996
|
);
|
|
5013
4997
|
}
|
|
5014
4998
|
}
|
|
5015
|
-
return o.isPropertyDeclaration(i) || o.isAccessor(i) ?
|
|
5016
|
-
}
|
|
5017
|
-
const
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
],
|
|
5022
|
-
name:
|
|
4999
|
+
return o.isPropertyDeclaration(i) || o.isAccessor(i) ? aa(e, t, i, s, n, r) : i;
|
|
5000
|
+
}
|
|
5001
|
+
const ga = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", ha = [
|
|
5002
|
+
Qo,
|
|
5003
|
+
ta,
|
|
5004
|
+
ua
|
|
5005
|
+
], ya = "@arcgis/lumina:transformComponents", va = (e) => ({
|
|
5006
|
+
name: ya,
|
|
5023
5007
|
transform: {
|
|
5024
5008
|
// Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
|
|
5025
5009
|
// Also, we need to run on the original fs file, before other transforms so
|
|
@@ -5039,11 +5023,11 @@ const ma = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
|
|
|
5039
5023
|
e.apiJsonDeferred === void 0 ? [ne] : [ne, e.apiJsonDeferred.promise]
|
|
5040
5024
|
);
|
|
5041
5025
|
const n = e.getSourceFile(i, t), a = o.transform(n, [
|
|
5042
|
-
(f) => () =>
|
|
5026
|
+
(f) => () => la(e, f, n, [
|
|
5043
5027
|
...e.options.types?.sourceFileTransformers ?? [],
|
|
5044
|
-
...
|
|
5028
|
+
...ha
|
|
5045
5029
|
])
|
|
5046
|
-
]).transformed[0], c = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : Et.createSourceMapGenerator(
|
|
5030
|
+
]).transformed[0], c = e._typeScriptPrinter, d = e.viteConfig.build.sourcemap === !1 ? void 0 : Et.createSourceMapGenerator(ba, u.basename(i), "", u.dirname(i), {}), l = Et.createTextWriter(`
|
|
5047
5031
|
`);
|
|
5048
5032
|
c.writeFile(a, l, d);
|
|
5049
5033
|
const p = l.getText(), m = d?.toJSON();
|
|
@@ -5053,10 +5037,10 @@ const ma = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
|
|
|
5053
5037
|
};
|
|
5054
5038
|
}
|
|
5055
5039
|
}
|
|
5056
|
-
}),
|
|
5040
|
+
}), ba = {
|
|
5057
5041
|
getCurrentDirectory: o.sys.getCurrentDirectory,
|
|
5058
5042
|
getCanonicalFileName: o.sys.useCaseSensitiveFileNames ? di : (e) => e.toLowerCase()
|
|
5059
|
-
},
|
|
5043
|
+
}, wa = (e) => ({
|
|
5060
5044
|
name: "@arcgis/lumina:handleDynamicAssets",
|
|
5061
5045
|
configureServer(t) {
|
|
5062
5046
|
e.server = t, Qt(e).forEach(({ assets: i, transformers: s }) => ie(e, i, s));
|
|
@@ -5075,20 +5059,20 @@ function Qt(e) {
|
|
|
5075
5059
|
"type" in s ? t.push(s) : "assets" in s && t.push(...s.assets);
|
|
5076
5060
|
}), t.length > 0 && i.push({ assets: t }), e.isInBuildWatch || (e.assetsToProvide = void 0), i;
|
|
5077
5061
|
}
|
|
5078
|
-
const nt = "@arcgis/lumina:updatePackageJson",
|
|
5062
|
+
const nt = "@arcgis/lumina:updatePackageJson", Sa = (e) => ({
|
|
5079
5063
|
name: nt,
|
|
5080
5064
|
apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
|
|
5081
5065
|
configResolved() {
|
|
5082
|
-
|
|
5066
|
+
Ca(e).catch(
|
|
5083
5067
|
(t) => T.error(nt, `Failed to update package's package.json:${String(t)}`)
|
|
5084
5068
|
);
|
|
5085
5069
|
}
|
|
5086
5070
|
});
|
|
5087
|
-
async function
|
|
5088
|
-
const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s =
|
|
5071
|
+
async function Ca(e) {
|
|
5072
|
+
const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await z(t, "utf-8")), s = Ea(i, e);
|
|
5089
5073
|
s && ai(t, JSON.stringify(s, null, 2));
|
|
5090
5074
|
}
|
|
5091
|
-
function
|
|
5075
|
+
function Ea(e, t) {
|
|
5092
5076
|
const i = e?.devDependencies ?? {};
|
|
5093
5077
|
Object.keys(e?.peerDependencies ?? {}).forEach((l) => {
|
|
5094
5078
|
l in i || T.warn(
|
|
@@ -5127,21 +5111,21 @@ function Sa(e, t) {
|
|
|
5127
5111
|
if (s)
|
|
5128
5112
|
return e;
|
|
5129
5113
|
}
|
|
5130
|
-
const
|
|
5114
|
+
const Ta = (e) => ({
|
|
5131
5115
|
deprecation: "docs.json is deprecated and will be removed in a future release. Use api.json instead",
|
|
5132
5116
|
timestamp: e.apiJson.timestamp,
|
|
5133
5117
|
compiler: e.apiJson.compiler,
|
|
5134
|
-
components:
|
|
5118
|
+
components: $a(e),
|
|
5135
5119
|
typeLibrary: {}
|
|
5136
5120
|
});
|
|
5137
|
-
function
|
|
5121
|
+
function $a(e) {
|
|
5138
5122
|
const t = [];
|
|
5139
5123
|
for (const i of e.apiJson.modules)
|
|
5140
5124
|
for (const s of i.declarations)
|
|
5141
|
-
s.customElement === !0 && t.push(
|
|
5125
|
+
s.customElement === !0 && t.push(Pa(s, i.sourcePath));
|
|
5142
5126
|
return t;
|
|
5143
5127
|
}
|
|
5144
|
-
function
|
|
5128
|
+
function Pa(e, t) {
|
|
5145
5129
|
const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
|
|
5146
5130
|
return {
|
|
5147
5131
|
filePath: t,
|
|
@@ -5156,9 +5140,9 @@ function Ta(e, t) {
|
|
|
5156
5140
|
dependencies: [],
|
|
5157
5141
|
dependencyGraph: {},
|
|
5158
5142
|
deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
|
|
5159
|
-
props: e.members.map(
|
|
5160
|
-
methods: e.members.map(
|
|
5161
|
-
events: e.events?.map(
|
|
5143
|
+
props: e.members.map(ka).filter(R),
|
|
5144
|
+
methods: e.members.map(Ia).filter(R),
|
|
5145
|
+
events: e.events?.map(xa) ?? [],
|
|
5162
5146
|
styles: e.cssProperties?.map(({ name: s, description: n, deprecated: r }) => ({
|
|
5163
5147
|
name: s,
|
|
5164
5148
|
annotation: "prop",
|
|
@@ -5183,7 +5167,7 @@ function Ve(e, t = "") {
|
|
|
5183
5167
|
}
|
|
5184
5168
|
return t;
|
|
5185
5169
|
}
|
|
5186
|
-
function
|
|
5170
|
+
function ka(e) {
|
|
5187
5171
|
if (e.kind !== "field")
|
|
5188
5172
|
return;
|
|
5189
5173
|
const t = e, i = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], s = t.readonly ? [{ name: "readonly", text: "" }] : [], n = t.docsTags?.some((r) => r.name === "required") ?? !1;
|
|
@@ -5224,7 +5208,7 @@ const vt = (e) => Object.fromEntries(
|
|
|
5224
5208
|
]
|
|
5225
5209
|
) ?? []
|
|
5226
5210
|
);
|
|
5227
|
-
function
|
|
5211
|
+
function Ia(e) {
|
|
5228
5212
|
if (e.kind !== "method")
|
|
5229
5213
|
return;
|
|
5230
5214
|
const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], s = t.parameters?.map(({ name: n, type: r, description: a }) => ({
|
|
@@ -5255,7 +5239,7 @@ function Pa(e) {
|
|
|
5255
5239
|
deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
|
|
5256
5240
|
};
|
|
5257
5241
|
}
|
|
5258
|
-
function
|
|
5242
|
+
function xa(e) {
|
|
5259
5243
|
const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
|
|
5260
5244
|
return {
|
|
5261
5245
|
event: e.name,
|
|
@@ -5281,7 +5265,7 @@ const ye = {
|
|
|
5281
5265
|
methods: "Methods"
|
|
5282
5266
|
};
|
|
5283
5267
|
function ys(e) {
|
|
5284
|
-
const t =
|
|
5268
|
+
const t = Aa(e.slots), i = La(e.events), s = Na(e.cssProperties), n = ja(e.cssParts), r = Fa(e.members), a = e.description?.trim();
|
|
5285
5269
|
return [...a ? [`${a}
|
|
5286
5270
|
--`] : [], i, r, t, s, n].filter(Boolean).join(`
|
|
5287
5271
|
|
|
@@ -5289,23 +5273,23 @@ function ys(e) {
|
|
|
5289
5273
|
}
|
|
5290
5274
|
const ve = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
|
|
5291
5275
|
${t.join(`
|
|
5292
|
-
`)}`,
|
|
5276
|
+
`)}`, Aa = (e) => ve(
|
|
5293
5277
|
ye.slots,
|
|
5294
5278
|
e?.filter((t) => t.deprecated === void 0).map(
|
|
5295
5279
|
(t) => `- ${t.name ? `**${t.name}**` : "_default_"}${t.description === void 0 ? "" : ` - ${t.description}`}`
|
|
5296
5280
|
)
|
|
5297
|
-
),
|
|
5281
|
+
), La = (e) => ve(
|
|
5298
5282
|
ye.events,
|
|
5299
5283
|
e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
|
|
5300
|
-
),
|
|
5284
|
+
), Na = (e = []) => ve(
|
|
5301
5285
|
ye.cssProperties,
|
|
5302
5286
|
e?.filter((t) => t.deprecated === void 0).map(
|
|
5303
5287
|
(t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`} ${t.default ? `_(default: ${t.default})_}` : ""}`
|
|
5304
5288
|
)
|
|
5305
|
-
),
|
|
5289
|
+
), ja = (e) => ve(
|
|
5306
5290
|
ye.cssParts,
|
|
5307
5291
|
e?.filter((t) => t.deprecated === void 0).map((t) => `- **${t.name}**${t.description === void 0 ? "" : ` - ${t.description}`}`)
|
|
5308
|
-
),
|
|
5292
|
+
), Fa = (e) => ve(
|
|
5309
5293
|
ye.methods,
|
|
5310
5294
|
e.filter(Fs).filter((t) => t.deprecated === void 0).map(
|
|
5311
5295
|
(t) => `- \`${t.name}${t.signature}\`${t.description ? ` - ${t.description}` : ""}`
|
|
@@ -5330,7 +5314,7 @@ ${t.join(`
|
|
|
5330
5314
|
description: t.tagName + (i.description === void 0 ? "" : `: ${i.description}`)
|
|
5331
5315
|
})) ?? []
|
|
5332
5316
|
);
|
|
5333
|
-
function
|
|
5317
|
+
function Ra(e) {
|
|
5334
5318
|
if (e.attributes === void 0)
|
|
5335
5319
|
return [];
|
|
5336
5320
|
const t = [];
|
|
@@ -5341,7 +5325,7 @@ function ja(e) {
|
|
|
5341
5325
|
description: s.description || void 0,
|
|
5342
5326
|
default: s.default,
|
|
5343
5327
|
value: {
|
|
5344
|
-
type:
|
|
5328
|
+
type: Da(
|
|
5345
5329
|
s.type.values?.map(
|
|
5346
5330
|
(n) => n.type === "string" && n.value !== void 0 ? `"${n.value}"` : n.value ?? n.type
|
|
5347
5331
|
)
|
|
@@ -5351,9 +5335,9 @@ function ja(e) {
|
|
|
5351
5335
|
}
|
|
5352
5336
|
return t;
|
|
5353
5337
|
}
|
|
5354
|
-
const
|
|
5355
|
-
function
|
|
5356
|
-
const i =
|
|
5338
|
+
const Da = (e) => e?.length === 1 ? e[0] : e;
|
|
5339
|
+
function Oa(e, t) {
|
|
5340
|
+
const i = Ma(e), s = vs(e), n = bs(e), r = j();
|
|
5357
5341
|
return {
|
|
5358
5342
|
$schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
5359
5343
|
name: r.name,
|
|
@@ -5371,11 +5355,11 @@ function Ra(e, t) {
|
|
|
5371
5355
|
}
|
|
5372
5356
|
};
|
|
5373
5357
|
}
|
|
5374
|
-
const
|
|
5358
|
+
const Ma = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
|
|
5375
5359
|
name: t.tagName,
|
|
5376
5360
|
description: ys(t),
|
|
5377
5361
|
"doc-url": t.demos?.[0]?.url,
|
|
5378
|
-
attributes:
|
|
5362
|
+
attributes: Ra(t),
|
|
5379
5363
|
slots: t.slots?.map((i) => ({
|
|
5380
5364
|
name: i.name,
|
|
5381
5365
|
description: i.description
|
|
@@ -5383,10 +5367,10 @@ const Da = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
|
|
|
5383
5367
|
// REFACTOR: this was deprecated in the spec: https://github.com/JetBrains/web-types/blob/11e46e47cb65edc1930dc1fae854005ad45ac08f/schema/web-types.json#L866
|
|
5384
5368
|
events: Zt(t),
|
|
5385
5369
|
js: {
|
|
5386
|
-
properties:
|
|
5370
|
+
properties: Ja(t),
|
|
5387
5371
|
events: Zt(t)
|
|
5388
5372
|
}
|
|
5389
|
-
})),
|
|
5373
|
+
})), Ja = (e) => e.members.filter(Rs).filter((t) => t.deprecated === void 0).map((t) => ({
|
|
5390
5374
|
name: t.name,
|
|
5391
5375
|
description: t.description,
|
|
5392
5376
|
type: t.type?.text
|
|
@@ -5394,34 +5378,34 @@ const Da = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
|
|
|
5394
5378
|
name: t.name,
|
|
5395
5379
|
type: t.type?.text,
|
|
5396
5380
|
description: t.description
|
|
5397
|
-
})) ?? [],
|
|
5381
|
+
})) ?? [], Ba = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
|
|
5398
5382
|
name: t.tagName,
|
|
5399
5383
|
description: ys(t),
|
|
5400
|
-
attributes:
|
|
5384
|
+
attributes: _a(t),
|
|
5401
5385
|
references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
|
|
5402
|
-
})),
|
|
5386
|
+
})), _a = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
|
|
5403
5387
|
name: t.name,
|
|
5404
5388
|
description: t.description || void 0,
|
|
5405
|
-
values:
|
|
5406
|
-
})) ?? [],
|
|
5389
|
+
values: Ka(t)
|
|
5390
|
+
})) ?? [], Ka = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Wa = (e) => ({
|
|
5407
5391
|
$schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
|
|
5408
5392
|
version: 1.1,
|
|
5409
|
-
tags:
|
|
5410
|
-
}),
|
|
5393
|
+
tags: Ba(e)
|
|
5394
|
+
}), Ua = (e) => ({
|
|
5411
5395
|
$schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
|
|
5412
5396
|
version: 1.1,
|
|
5413
5397
|
properties: vs(e),
|
|
5414
5398
|
pseudoElements: bs(e)
|
|
5415
|
-
}),
|
|
5416
|
-
function
|
|
5399
|
+
}), za = "@arcgis/lumina:generateDocs";
|
|
5400
|
+
function Ha(e) {
|
|
5417
5401
|
return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
|
|
5418
5402
|
{
|
|
5419
5403
|
type: "dynamic",
|
|
5420
|
-
source: () => JSON.stringify(
|
|
5404
|
+
source: () => JSON.stringify(Ta(e), null, rt(e)),
|
|
5421
5405
|
destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
|
|
5422
5406
|
}
|
|
5423
5407
|
]), {
|
|
5424
|
-
name:
|
|
5408
|
+
name: za,
|
|
5425
5409
|
async writeBundle() {
|
|
5426
5410
|
if (e.isInStorybook)
|
|
5427
5411
|
return;
|
|
@@ -5431,51 +5415,51 @@ function Ua(e) {
|
|
|
5431
5415
|
await Mi(c);
|
|
5432
5416
|
const d = [];
|
|
5433
5417
|
if (n !== void 0) {
|
|
5434
|
-
const l = JSON.stringify(
|
|
5418
|
+
const l = JSON.stringify(Wa(e.apiJsonComponents), null, t);
|
|
5435
5419
|
d.push(K(n, l));
|
|
5436
5420
|
}
|
|
5437
5421
|
if (r !== void 0) {
|
|
5438
|
-
const l = JSON.stringify(
|
|
5422
|
+
const l = JSON.stringify(Ua(e.apiJsonComponents), null, t);
|
|
5439
5423
|
d.push(K(r, l));
|
|
5440
5424
|
}
|
|
5441
5425
|
if (a !== void 0) {
|
|
5442
|
-
const l =
|
|
5426
|
+
const l = Oa(e.apiJsonComponents, typeof i == "object" ? i : {});
|
|
5443
5427
|
d.push(K(a, JSON.stringify(l, null, t)));
|
|
5444
5428
|
}
|
|
5445
5429
|
await Promise.all(d);
|
|
5446
5430
|
}
|
|
5447
5431
|
};
|
|
5448
5432
|
}
|
|
5449
|
-
function
|
|
5433
|
+
function qa(e) {
|
|
5450
5434
|
return {
|
|
5451
5435
|
name: "@arcgis/lumina:buildWrappers",
|
|
5452
5436
|
apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
|
|
5453
5437
|
async writeBundle() {
|
|
5454
5438
|
e.isInStorybook || await Promise.all(
|
|
5455
5439
|
e.options.build?.wrappers?.map(async (t) => {
|
|
5456
|
-
t.type === "react18" && await
|
|
5440
|
+
t.type === "react18" && await Xa(e, t);
|
|
5457
5441
|
}) ?? []
|
|
5458
5442
|
);
|
|
5459
5443
|
}
|
|
5460
5444
|
};
|
|
5461
5445
|
}
|
|
5462
|
-
const
|
|
5463
|
-
import React from "${
|
|
5446
|
+
const Va = "react", ei = "@lit/react", Ga = `
|
|
5447
|
+
import React from "${Va}";
|
|
5464
5448
|
import { createComponent } from "${ei}";
|
|
5465
5449
|
import type { EventName } from "${ei}";
|
|
5466
5450
|
import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
|
|
5467
5451
|
|
|
5468
5452
|
const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
|
|
5469
5453
|
`;
|
|
5470
|
-
async function
|
|
5454
|
+
async function Xa(e, t) {
|
|
5471
5455
|
const { name: i } = j(), s = [];
|
|
5472
5456
|
for (const a of e.apiJson.modules)
|
|
5473
5457
|
for (const c of a.declarations)
|
|
5474
|
-
c.customElement === !0 && s.push(
|
|
5475
|
-
const n = [`/// <reference types="${i}" preserve="true" />`,
|
|
5458
|
+
c.customElement === !0 && s.push(Ya(c));
|
|
5459
|
+
const n = [`/// <reference types="${i}" preserve="true" />`, Ga, ...s].join(""), r = u.resolve(t.proxiesFile);
|
|
5476
5460
|
await X(u.dirname(r), { recursive: !0 }), await K(r, n);
|
|
5477
5461
|
}
|
|
5478
|
-
function
|
|
5462
|
+
function Ya(e) {
|
|
5479
5463
|
const t = e.events?.map(
|
|
5480
5464
|
(i) => ` ${Vs(`on${Cs(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
|
|
5481
5465
|
).join(`
|
|
@@ -5492,30 +5476,30 @@ ${t}
|
|
|
5492
5476
|
);
|
|
5493
5477
|
`;
|
|
5494
5478
|
}
|
|
5495
|
-
function
|
|
5479
|
+
function Pc(e = {}) {
|
|
5496
5480
|
const t = new $(e), s = [
|
|
5497
5481
|
t._plugin,
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
Dn(t),
|
|
5503
|
-
Ua(t),
|
|
5504
|
-
ha(t),
|
|
5505
|
-
go(t),
|
|
5506
|
-
hr(t),
|
|
5482
|
+
Hn(t),
|
|
5483
|
+
Qn(t),
|
|
5484
|
+
io(t),
|
|
5485
|
+
Sa(t),
|
|
5507
5486
|
On(t),
|
|
5487
|
+
Ha(t),
|
|
5508
5488
|
va(t),
|
|
5509
5489
|
yo(t),
|
|
5510
|
-
|
|
5490
|
+
hr(t),
|
|
5491
|
+
Mn(t),
|
|
5492
|
+
wa(t),
|
|
5493
|
+
bo(t),
|
|
5494
|
+
ao(t),
|
|
5511
5495
|
Xs(t),
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5496
|
+
mn(t),
|
|
5497
|
+
qa(t),
|
|
5498
|
+
Jn(t)
|
|
5515
5499
|
].filter(R);
|
|
5516
5500
|
return s.context = t, s;
|
|
5517
5501
|
}
|
|
5518
|
-
const
|
|
5502
|
+
const kc = {
|
|
5519
5503
|
initializeComponentDependencies: Pi,
|
|
5520
5504
|
updateLuminaTs: Qi,
|
|
5521
5505
|
propertyToAttributeMappings: W,
|
|
@@ -5527,7 +5511,7 @@ const $c = {
|
|
|
5527
5511
|
htmlAlwaysAttributes: Qe
|
|
5528
5512
|
};
|
|
5529
5513
|
export {
|
|
5530
|
-
|
|
5514
|
+
kc as exportsForCodemod,
|
|
5531
5515
|
De as inferCdnUrl,
|
|
5532
|
-
|
|
5516
|
+
Pc as useLumina
|
|
5533
5517
|
};
|