@arcgis/lumina-compiler 4.34.0-next.145 → 4.34.0-next.146

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 CHANGED
@@ -1,13 +1,13 @@
1
- import { externalizeDependencies as ds, path as m, toSystemPathSeparators as ce, retrievePackageJson as R, fetchPackageLocation as Di, asyncRetrievePackageJson as ji, existsAsync as H, findPath as ps, toPosixPathSeparators as Me, isPosix as Ri, getCwd as Mi } from "@arcgis/components-build-utils";
1
+ import { externalizeDependencies as ds, path as m, toSystemPathSeparators as le, retrievePackageJson as R, fetchPackageLocation as Di, asyncRetrievePackageJson as ji, existsAsync as H, findPath as ps, toPosixPathSeparators as Me, isPosix as Ri, getCwd as Mi } from "@arcgis/components-build-utils";
2
2
  import us from "vite-plugin-dts";
3
3
  import o from "typescript";
4
4
  import { f as E, l as T } from "./logger-hJvg0JOj.js";
5
- import { getMemberName as Q, apiMemberToSynthesizedComments as G, globalPackageIdentifier as Oi, setApiDocFromJsDoc as he, apiExtractorError as X, ApiExtractor as ms, hasIgnoredModifier as fs, symbolToDocs as Bt, setDefaultFromInitializer as Wt, multipleJsDocTags as gs, findDecorator as _t, isApiMethod as ys, isApiProperty as hs } from "@arcgis/api-extractor";
5
+ import { getMemberName as Q, apiMemberToSynthesizedComments as G, globalPackageIdentifier as Oi, setApiDocFromJsDoc as ve, apiExtractorError as X, ApiExtractor as ms, hasIgnoredModifier as fs, symbolToDocs as Bt, setDefaultFromInitializer as Wt, multipleJsDocTags as gs, findDecorator as _t, isApiMethod as ys, isApiProperty as hs } from "@arcgis/api-extractor";
6
6
  import { isNotUndefined as D } from "@arcgis/toolkit/predicate";
7
7
  import { camelToKebab as Ct, kebabToPascal as vs, uncapitalize as ft, getPreamble as bs, capitalize as Ss } from "@arcgis/toolkit/string";
8
8
  import { lazyMetaSubItemJoiner as ws, lazyMetaItemJoiner as it, lazyMetaGroupJoiner as Ts, propertyFlagAttribute as Ht, propertyFlagReflect as Es, propertyFlagBoolean as Cs, propertyFlagNumber as $s, propertyFlagState as Ps, propertyFlagReadOnly as xs, propertyFlagNoAccessor as ks } from "@arcgis/lumina/config";
9
9
  import { readdir as Ge, readFile as B, rm as Is, mkdir as Z, cp as As, writeFile as F, copyFile as Ls } from "node:fs/promises";
10
- import { mappedFind as Se } from "@arcgis/toolkit/array";
10
+ import { mappedFind as we } from "@arcgis/toolkit/array";
11
11
  import { build as Ns } from "esbuild";
12
12
  import { identity as Ji } from "@arcgis/toolkit/function";
13
13
  import { Deferred as Ki } from "@arcgis/toolkit/promise";
@@ -41,7 +41,7 @@ function Js(e, t, i) {
41
41
  c === s.length - 1 ? r[""] ??= e : (r[a] ??= {}, r = r[a]);
42
42
  }), r[""];
43
43
  }
44
- function we(e, t, i) {
44
+ function Te(e, t, i) {
45
45
  if (!e.startsWith(t))
46
46
  return e;
47
47
  const n = e.slice(t.length), s = Ks(n, i);
@@ -60,7 +60,7 @@ function Ks(e, t) {
60
60
  return e;
61
61
  }
62
62
  const Bs = ({ filePath: e, content: t }, i) => {
63
- const n = e.startsWith(i.dir.distComponents) ? we(
63
+ const n = e.startsWith(i.dir.distComponents) ? Te(
64
64
  _i(i.dir.distComponents, e),
65
65
  i.dir.distComponents,
66
66
  i
@@ -88,12 +88,12 @@ const Ws = -1, _s = -2, Hs = /["']\.\.?\/[^'"]+/gu, Hi = (e, t, i, n) => e.repla
88
88
  const r = s.slice(1);
89
89
  if (!r.startsWith("./") && !r.startsWith("../"))
90
90
  return s;
91
- const a = m.join(n, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? _i(t.dir.distComponents, a, "") : a, d = we(c, t.dir.distComponents, t);
91
+ const a = m.join(n, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? _i(t.dir.distComponents, a, "") : a, d = Te(c, t.dir.distComponents, t);
92
92
  if (i === n && a === d)
93
93
  return s;
94
- const l = le(i, d), p = s.endsWith("/") ? `${l}/` : l;
94
+ const l = de(i, d), p = s.endsWith("/") ? `${l}/` : l;
95
95
  return `${s[0]}${p}`;
96
- }), le = (e, t) => {
96
+ }), de = (e, t) => {
97
97
  const i = m.relative(e, t);
98
98
  return i.startsWith(".") ? i : `.${m.sep}${i}`;
99
99
  };
@@ -232,7 +232,7 @@ function rr(e, t, i) {
232
232
  function Vi(e, t, i, n) {
233
233
  const s = {
234
234
  compiler: e,
235
- apiModule: e.isInPuppeteerTestBackEnd ? void 0 : rr(i.fileName, e.dir.root, e.privateApiJson),
235
+ apiModule: e.apiJsonEnabled ? rr(i.fileName, e.dir.root, e.privateApiJson) : void 0,
236
236
  transformation: t
237
237
  }, r = i.statements;
238
238
  let a = i.statements;
@@ -569,7 +569,7 @@ function Tr(e) {
569
569
  return [];
570
570
  const s = e.typeScriptProgram.getSourceFile(n);
571
571
  if (s === void 0)
572
- throw Error(E(Xt, `Could not find source file: ${ce(n)}`));
572
+ throw Error(E(Xt, `Could not find source file: ${le(n)}`));
573
573
  const r = [];
574
574
  return e.typeScriptProgram.emit(
575
575
  s,
@@ -1803,15 +1803,15 @@ function Jr(e) {
1803
1803
  }
1804
1804
  return t.length === 0 ? void 0 : t;
1805
1805
  }
1806
- const Kr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Br = /\n\s+\*? ?/gu, Wr = ["keyed", "ref", "repeat", "live"], de = "staticHtml", Y = "staticSvg", pe = "html", oe = "svg", nn = Symbol("maybe HTML namespace or maybe SVG"), sn = "css", rn = "mathml", on = [sn, pe, rn, de, Y, oe], _r = new Set(on), Hr = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], Ur = "nothing", zr = [...Wr, ...on, ...Hr, Ur], qr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => Te(t)), Te = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), ae = {
1807
- [pe]: ["lit", "lit/html.js", "lit-html"],
1806
+ const Kr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Br = /\n\s+\*? ?/gu, Wr = ["keyed", "ref", "repeat", "live"], pe = "staticHtml", Y = "staticSvg", ue = "html", oe = "svg", nn = Symbol("maybe HTML namespace or maybe SVG"), sn = "css", rn = "mathml", on = [sn, ue, rn, pe, Y, oe], _r = new Set(on), Hr = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], Ur = "nothing", zr = [...Wr, ...on, ...Hr, Ur], qr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => Ee(t)), Ee = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), ae = {
1807
+ [ue]: ["lit", "lit/html.js", "lit-html"],
1808
1808
  /**
1809
1809
  * Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
1810
1810
  * "staticSvg", leading to collision. We have to import them "as", as well as
1811
1811
  * check for existing "html" and "svg" imports from these locations to prevent
1812
1812
  * collisions.
1813
1813
  */
1814
- [de]: ["lit/static-html.js", "lit-html/static.js"],
1814
+ [pe]: ["lit/static-html.js", "lit-html/static.js"],
1815
1815
  [oe]: ["lit", "lit-html", "lit/html.js"],
1816
1816
  [Y]: ["lit/static-html.js", "lit-html/static.js"],
1817
1817
  [rn]: ["lit", "lit-html", "lit/html.js"],
@@ -1825,15 +1825,15 @@ const Kr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Br = /\n\s+\
1825
1825
  repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
1826
1826
  ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
1827
1827
  nothing: ["lit", "@arcgis/lumina", "lit/html.js", "lit-html", "lit-element/lit-element.js"]
1828
- }, an = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, me = "@arcgis/lumina:loadLitCss", _e = "?litCss", ee = "?layeredLitCss", vt = "?globalFileLitCss", Vr = (e) => ({
1829
- name: me,
1828
+ }, an = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, fe = "@arcgis/lumina:loadLitCss", _e = "?litCss", ee = "?layeredLitCss", vt = "?globalFileLitCss", Vr = (e) => ({
1829
+ name: fe,
1830
1830
  enforce: "pre",
1831
1831
  configResolved(t) {
1832
1832
  const i = t.plugins.find(({ name: r }) => r === "vite:css-post");
1833
1833
  if (i === void 0)
1834
1834
  throw Error(
1835
1835
  E(
1836
- me,
1836
+ fe,
1837
1837
  "Unable to find the vite's built-in vite:css-post plugin. This may indicate you are trying to use Lumina with a different Vite version than it was designed for. Use `npm list vite`/`yarn why vite` to check the Vite version you are using."
1838
1838
  )
1839
1839
  );
@@ -1841,7 +1841,7 @@ const Kr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Br = /\n\s+\
1841
1841
  if (typeof n != "object" || typeof n.handler != "function")
1842
1842
  throw Error(
1843
1843
  E(
1844
- me,
1844
+ fe,
1845
1845
  "Expected vite:css-post to declare a transform:{handler()} property. This may indicate you are trying to use Vite 6 with Lumina version that is designed for Vite 7. Use `npm list vite`/`yarn why vite` to check the Vite version you are using."
1846
1846
  )
1847
1847
  );
@@ -1849,7 +1849,7 @@ const Kr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Br = /\n\s+\
1849
1849
  if (s.length !== 1)
1850
1850
  throw Error(
1851
1851
  E(
1852
- me,
1852
+ fe,
1853
1853
  `Expected vite:css-post's transform handler to have only a single property: handler. Found: ${s.join(",")}. This may indicate you are trying to use Lumina with a different Vite version than it was designed for. Use \`npm list vite\`/\`yarn why vite\` to check the Vite version you are using.`
1854
1854
  )
1855
1855
  );
@@ -1867,7 +1867,7 @@ const Kr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Br = /\n\s+\
1867
1867
  const p = `${a}?inline`, u = await n.handler.call(this, r, p), { code: f, ...g } = typeof u == "string" ? { code: u } : u ?? {};
1868
1868
  if (typeof f != "string" || !f.startsWith(cn) || !f.endsWith(Gr))
1869
1869
  return T.warn(
1870
- me,
1870
+ fe,
1871
1871
  `Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
1872
1872
  f
1873
1873
  )}`
@@ -1885,10 +1885,10 @@ const Kr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Br = /\n\s+\
1885
1885
  if (v.cssProperties === void 0)
1886
1886
  v.cssProperties = Array.from(y);
1887
1887
  else {
1888
- const b = new Set(v.cssProperties.map((w) => w.name));
1888
+ const b = new Set(v.cssProperties.map((S) => S.name));
1889
1889
  v.cssProperties = [
1890
1890
  ...v.cssProperties,
1891
- ...y.filter((w) => !b.has(w.name))
1891
+ ...y.filter((S) => !b.has(S.name))
1892
1892
  ];
1893
1893
  }
1894
1894
  }
@@ -1939,7 +1939,7 @@ function so(e) {
1939
1939
  const t = e.options.css?.globalStylesPath;
1940
1940
  if (t === void 0)
1941
1941
  return "";
1942
- const i = le(e.dir.src, t);
1942
+ const i = de(e.dir.src, t);
1943
1943
  return e.viteCommand === "serve" || e.isInStorybook ? [
1944
1944
  `import globalStyles from "${i}${ee}";`,
1945
1945
  "document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
@@ -2036,13 +2036,13 @@ ${e.map((t) => ` "/${t}",`).join(`
2036
2036
  if (!a.endsWith(".tsx"))
2037
2037
  return;
2038
2038
  const c = m.join(i, a);
2039
- if (Ee(c, t))
2039
+ if (Ce(c, t))
2040
2040
  return c;
2041
2041
  a.endsWith(".stories.tsx") && c.startsWith(t) && s.push(c);
2042
2042
  }).filter(D);
2043
2043
  return e.componentFiles = r, e.componentStoryFiles = s, r;
2044
2044
  });
2045
- function Ee(e, t) {
2045
+ function Ce(e, t) {
2046
2046
  if (!e.startsWith(t) || !e.endsWith(".tsx"))
2047
2047
  return !1;
2048
2048
  const [i, n] = e.slice(0, -4).split(m.sep).slice(go);
@@ -2052,7 +2052,7 @@ const go = -2, Zt = 5, Yt = 1, ei = 1, ti = 3, ii = 4, Xe = o;
2052
2052
  yo(Xe.createSourceMapGenerator);
2053
2053
  ho(Xe.createTextWriter);
2054
2054
  vo(Xe.getNewLineCharacter);
2055
- const ve = Xe;
2055
+ const be = Xe;
2056
2056
  function yo(e) {
2057
2057
  if (typeof e != "function")
2058
2058
  throw new Error(
@@ -2104,7 +2104,7 @@ function So(e) {
2104
2104
  );
2105
2105
  }
2106
2106
  function fn(e) {
2107
- const t = ve.createPrinter(e);
2107
+ const t = be.createPrinter(e);
2108
2108
  return bo(t.writeFile), So(t.writeNode), t;
2109
2109
  }
2110
2110
  function ni(e) {
@@ -2162,7 +2162,7 @@ function si(e) {
2162
2162
  const t = rt.getText();
2163
2163
  return rt.clear(), t;
2164
2164
  }
2165
- const ko = fn({ removeComments: !0 }), rt = ve.createTextWriter(`
2165
+ const ko = fn({ removeComments: !0 }), rt = be.createTextWriter(`
2166
2166
  `), hn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, Io = hn & o.TypeFormatFlags.NodeBuilderFlagsMask, Ao = Io | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
2167
2167
  function Lo(e, t, i, n = !0) {
2168
2168
  const s = /* @__PURE__ */ new Map();
@@ -2290,7 +2290,7 @@ function Do(e, t) {
2290
2290
  };
2291
2291
  }
2292
2292
  function jo(e, t) {
2293
- return Ee(e, t.srcComponents) ? m.join(t.dist, mn(e, t.src)) : e.startsWith(t.src) ? m.join(t.dist, e.slice(t.src.length)) : e;
2293
+ return Ce(e, t.srcComponents) ? m.join(t.dist, mn(e, t.src)) : e.startsWith(t.src) ? m.join(t.dist, e.slice(t.src.length)) : e;
2294
2294
  }
2295
2295
  const Ro = (e) => e.endsWith(".js") || e.endsWith(".d.ts") ? e : `${e.endsWith(".ts") ? e.slice(0, -3) : e.endsWith(".tsx") ? e.slice(0, -4) : e}.d.ts`;
2296
2296
  function vn(e) {
@@ -2318,7 +2318,7 @@ function ai(e, t, i) {
2318
2318
  function ci(e, t, i) {
2319
2319
  const n = e.jsDoc?.[0];
2320
2320
  if (n !== void 0)
2321
- return Se([n, ...n.tags ?? []], ({ comment: s }) => {
2321
+ return we([n, ...n.tags ?? []], ({ comment: s }) => {
2322
2322
  if (i === "typescript" && typeof s == "string") {
2323
2323
  const r = s.indexOf("[MDN Reference](");
2324
2324
  if (r === -1)
@@ -2326,7 +2326,7 @@ function ci(e, t, i) {
2326
2326
  const a = r + 16, c = s.indexOf(")", a);
2327
2327
  return c === -1 ? void 0 : s.slice(a, c);
2328
2328
  } else if (i === "core" && Array.isArray(s))
2329
- return Se(s, (r) => {
2329
+ return we(s, (r) => {
2330
2330
  if (!o.isJSDocLinkLike(r))
2331
2331
  return;
2332
2332
  const a = r.getText(t);
@@ -2360,7 +2360,7 @@ function Ko(e, t, i, n, s) {
2360
2360
  }
2361
2361
  t.parameters.length === 0 && (t.parameters = void 0);
2362
2362
  const a = i.getReturnTypeOfSignature(r), c = He(i, a, n, s), d = i.signatureToString(r, e, hn, o.SignatureKind.Call);
2363
- he(e.name, i, t), t.return = {
2363
+ ve(e.name, i, t), t.return = {
2364
2364
  type: c
2365
2365
  }, t.signature = d.replace(" =>", ":");
2366
2366
  }
@@ -2390,7 +2390,7 @@ function Wo(e, t, i, n) {
2390
2390
  composed: void 0,
2391
2391
  privacy: void 0
2392
2392
  };
2393
- return he(e.name, s, g), _o(e, g, n), g.privacy === void 0 ? g : void 0;
2393
+ return ve(e.name, s, g), _o(e, g, n), g.privacy === void 0 ? g : void 0;
2394
2394
  }
2395
2395
  }
2396
2396
  const De = "createEvent";
@@ -2484,7 +2484,7 @@ class Ue extends ms {
2484
2484
  description: void 0,
2485
2485
  demos: void 0,
2486
2486
  docsTags: void 0,
2487
- superclass: fe,
2487
+ superclass: ge,
2488
2488
  encapsulation: void 0,
2489
2489
  /**
2490
2490
  * We use the tag name rather than the class name to generate the
@@ -2514,7 +2514,7 @@ class Ue extends ms {
2514
2514
  return;
2515
2515
  } else if (o.isIdentifier(r)) {
2516
2516
  const a = r.text;
2517
- a !== fe.name && (s.superclass = {
2517
+ a !== ge.name && (s.superclass = {
2518
2518
  name: a
2519
2519
  });
2520
2520
  }
@@ -2530,7 +2530,7 @@ class Ue extends ms {
2530
2530
  }
2531
2531
  this.localCssImports = void 0;
2532
2532
  }
2533
- he(t.name, this.context.typeScriptTypeChecker, s);
2533
+ ve(t.name, this.context.typeScriptTypeChecker, s);
2534
2534
  const c = ft(s.name);
2535
2535
  s.members.push({
2536
2536
  kind: "method",
@@ -2552,7 +2552,7 @@ class Ue extends ms {
2552
2552
  description: "Create a promise that resolves once component is fully loaded.",
2553
2553
  signature: "(): Promise<void>",
2554
2554
  async: !0,
2555
- inheritedFrom: fe,
2555
+ inheritedFrom: ge,
2556
2556
  docsTags: [
2557
2557
  {
2558
2558
  name: "example",
@@ -2644,7 +2644,7 @@ console.log("${s.tagName} is ready to go!");
2644
2644
  */
2645
2645
  extractComponentFieldDetails(t, i) {
2646
2646
  const n = i.readonly === !0, s = this.context.typeScriptTypeChecker, r = s.getSymbolAtLocation(t.name), a = r === void 0 ? void 0 : Bt(s, r), c = new Set(a?.docsTags.map((h) => h.name) ?? []);
2647
- he(t.name, this.context.typeScriptTypeChecker, i, a);
2647
+ ve(t.name, this.context.typeScriptTypeChecker, i, a);
2648
2648
  let d = !n && i.readonly === !0;
2649
2649
  const l = this.pairedSetter ?? t, p = i.default;
2650
2650
  Wt(t, i, this.file);
@@ -2656,27 +2656,27 @@ console.log("${s.tagName} is ready to go!");
2656
2656
  } : $o(this.context, l, f, this.file);
2657
2657
  const g = o.isPropertyDeclaration(t) && t.type !== void 0 && t.initializer !== void 0 && o.isPropertyAccessExpression(t.initializer) && o.isPropertyAccessExpression(t.initializer.expression) && t.initializer.expression.expression.kind === o.SyntaxKind.ThisKeyword && o.isIdentifier(t.initializer.expression.name) && o.isIdentifier(t.initializer.name);
2658
2658
  if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || g) {
2659
- const h = t.initializer, v = s.getSymbolAtLocation(h), b = v !== void 0 && ((v.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? s.getAliasedSymbol(v) : v, w = b?.getDeclarations() ?? [];
2659
+ const h = t.initializer, v = s.getSymbolAtLocation(h), b = v !== void 0 && ((v.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? s.getAliasedSymbol(v) : v, S = b?.getDeclarations() ?? [];
2660
2660
  if (b !== void 0) {
2661
- const P = Bt(s, b);
2662
- if (P.docsTags.length > 0) {
2663
- P.docsTags = P.docsTags.filter(
2664
- (C) => !c.has(C.name) || gs.has(C.name)
2661
+ const I = Bt(s, b);
2662
+ if (I.docsTags.length > 0) {
2663
+ I.docsTags = I.docsTags.filter(
2664
+ (P) => !c.has(P.name) || gs.has(P.name)
2665
2665
  );
2666
- const S = i.description;
2667
- he(t.name, s, i, P), P.docsTags.forEach((C) => {
2668
- c.add(C.name);
2669
- }), i.description = S ?? i.description;
2666
+ const w = i.description;
2667
+ ve(t.name, s, i, I), I.docsTags.forEach((P) => {
2668
+ c.add(P.name);
2669
+ }), i.description = w ?? i.description;
2670
2670
  } else
2671
- i.description ||= P.description;
2671
+ i.description ||= I.description;
2672
2672
  }
2673
- let I, A;
2674
- w.forEach((P) => {
2675
- if (I ??= o.isGetAccessor(P) ? P : void 0, A ??= o.isSetAccessor(P) ? P : void 0, !("initializer" in P))
2673
+ let $, A;
2674
+ S.forEach((I) => {
2675
+ if ($ ??= o.isGetAccessor(I) ? I : void 0, A ??= o.isSetAccessor(I) ? I : void 0, !("initializer" in I))
2676
2676
  return;
2677
- const S = P;
2678
- d ||= S.modifiers?.some((C) => C.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Wt(S, i, S.getSourceFile());
2679
- }), g && I !== void 0 && A !== void 0 && I.type?.getText() !== A.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${h.getText(this.file)}` });
2677
+ const w = I;
2678
+ d ||= w.modifiers?.some((P) => P.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Wt(w, i, w.getSourceFile());
2679
+ }), g && $ !== void 0 && A !== void 0 && $.type?.getText() !== A.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${h.getText(this.file)}` });
2680
2680
  }
2681
2681
  if (d && (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 ? u && this.context.viteCommand === "build" && i.deprecated === void 0 && (Ue.loggedBooleanWarning || this.context.logLintWarning(
2682
2682
  `Boolean properties should default to "false". Found default value "true" in ${this.apiComponent.name}.${i.name}. See https://qawebgis.esri.com/components/lumina/properties#boolean-properties`
@@ -2768,7 +2768,7 @@ console.log("${s.tagName} is ready to go!");
2768
2768
  */
2769
2769
  inheritMembers(t, i, n = t.superclass, s, r, a) {
2770
2770
  const c = n.name;
2771
- if (c === void 0 || c === fe.name)
2771
+ if (c === void 0 || c === ge.name)
2772
2772
  return;
2773
2773
  const d = this._resolvedInheritance.get(c) ?? this.resolveInheritance(c, i) ?? (this.isPathOnly ? this.resolveInheritance(c, this.context.privateApiJson.modules) : void 0);
2774
2774
  if (d !== void 0) {
@@ -2785,7 +2785,7 @@ console.log("${s.tagName} is ready to go!");
2785
2785
  for (const l of d.events)
2786
2786
  a.has(l.name) || (t.events.push({ ...l, inheritedFrom: n }), a.add(l.name));
2787
2787
  }
2788
- d.superclass.name !== fe.name && this.inheritMembers(
2788
+ d.superclass.name !== ge.name && this.inheritMembers(
2789
2789
  t,
2790
2790
  i,
2791
2791
  d.superclass,
@@ -2806,7 +2806,7 @@ console.log("${s.tagName} is ready to go!");
2806
2806
  this._resolvedInheritance.set(t, void 0);
2807
2807
  }
2808
2808
  }
2809
- const fe = {
2809
+ const ge = {
2810
2810
  name: "LitElement",
2811
2811
  package: "@arcgis/lumina"
2812
2812
  }, ot = (e, t) => e.name.localeCompare(t.name);
@@ -2951,7 +2951,7 @@ function Vo(e, t, i, n) {
2951
2951
  )), n > 0 && (e.start !== void 0 && (e.start += n), e.end !== void 0 && (e.end += n)), e.package !== void 0)
2952
2952
  return n;
2953
2953
  if (e.module?.startsWith("dist/components/") === !0)
2954
- e.module = we(e.module, "dist/components/", i);
2954
+ e.module = Te(e.module, "dist/components/", i);
2955
2955
  else if (e.module === "index.js" && e.name) {
2956
2956
  const s = t.get(e.name);
2957
2957
  if (s !== void 0) {
@@ -2980,7 +2980,7 @@ async function ea(e, t) {
2980
2980
  );
2981
2981
  }
2982
2982
  async function wn(e, t) {
2983
- return Ce ??= ia(e, t), await Ce;
2983
+ return ce ??= ia(e, t), await ce;
2984
2984
  }
2985
2985
  function ta() {
2986
2986
  if (ze === void 0)
@@ -3049,17 +3049,17 @@ const na = /* @__PURE__ */ new Set([
3049
3049
  "vscode-languageserver-textdocument",
3050
3050
  "vscode-languageserver-types"
3051
3051
  ]);
3052
- let ze, bt, Ce;
3052
+ let ze, bt, ce;
3053
3053
  async function En(e, t) {
3054
3054
  const i = await Di(e, t), n = await ji(i), s = "exports" in n, r = la.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = m.join(i, "dist/esm/loader.js");
3055
3055
  if (a ? await H(c) : !1) {
3056
3056
  const g = await B(c, "utf8"), y = sa(g, "bootstrapLazy("), h = g.indexOf(", options", y), v = g.slice(y, h), b = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
3057
3057
  try {
3058
- const w = JSON.parse(b), I = aa(w, { packageName: e, getImportPath: r });
3059
- return { packageName: e, type: "stencil", components: I, packageLocation: i, packageJson: n };
3060
- } catch (w) {
3058
+ const S = JSON.parse(b), $ = aa(S, { packageName: e, getImportPath: r });
3059
+ return { packageName: e, type: "stencil", components: $, packageLocation: i, packageJson: n };
3060
+ } catch (S) {
3061
3061
  T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
3062
- Error: ${String(w)}`);
3062
+ Error: ${String(S)}`);
3063
3063
  }
3064
3064
  }
3065
3065
  const l = di(n.customElements);
@@ -3372,7 +3372,7 @@ function ya(e, t, i) {
3372
3372
  } else {
3373
3373
  const s = Object.values(U.perElement).map(
3374
3374
  (a) => ct(a, t)
3375
- ), r = Se(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? Se(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3375
+ ), r = we(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? we(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
3376
3376
  if (r !== void 0)
3377
3377
  return r;
3378
3378
  }
@@ -3406,7 +3406,7 @@ function lt(e) {
3406
3406
  }
3407
3407
  }
3408
3408
  function Oe(e, t, i = !1) {
3409
- if (Te(t))
3409
+ if (Ee(t))
3410
3410
  throw new Error(
3411
3411
  `Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
3412
3412
  );
@@ -3510,7 +3510,7 @@ function Ze({ key: e, parts: t, litTag: i }, n) {
3510
3510
  typeof a[0] == "string" ? o.factory.createStringLiteral(r) : a[0]
3511
3511
  );
3512
3512
  }
3513
- const c = typeof i == "string" ? i : pe;
3513
+ const c = typeof i == "string" ? i : ue;
3514
3514
  n.neededImports.add(c);
3515
3515
  const d = n.importRenames[c], l = o.factory.createTaggedTemplateExpression(
3516
3516
  o.factory.createIdentifier(d),
@@ -3618,13 +3618,13 @@ function ka(e, t) {
3618
3618
  const v = c.statements.at(-1);
3619
3619
  if (!(v && o.isReturnStatement(v) && v.expression))
3620
3620
  return t;
3621
- const w = $e(v.expression);
3622
- if (!gi(w))
3621
+ const S = $e(v.expression);
3622
+ if (!gi(S))
3623
3623
  return t;
3624
- const I = c.statements.slice(0, -1);
3625
- if (I.some(kn))
3624
+ const $ = c.statements.slice(0, -1);
3625
+ if ($.some(kn))
3626
3626
  return t;
3627
- d = I.length === 0, l = w;
3627
+ d = $.length === 0, l = S;
3628
3628
  }
3629
3629
  const p = o.isJsxElement(l) ? l.openingElement : l, u = Fn(p);
3630
3630
  if (u === -1)
@@ -3742,7 +3742,7 @@ function La(e, t, i) {
3742
3742
  if (e.every(qe, t))
3743
3743
  return t;
3744
3744
  if (o.isIdentifier(t)) {
3745
- const n = o.isBlock(i.body) ? Se(i.body.statements, (r) => Na(r, t)) : void 0;
3745
+ const n = o.isBlock(i.body) ? we(i.body.statements, (r) => Na(r, t)) : void 0;
3746
3746
  if (n === void 0)
3747
3747
  return;
3748
3748
  const s = In(n, e);
@@ -3770,7 +3770,7 @@ function Da(e, t) {
3770
3770
  return i || n.length === 0 ? e : o.factory.updateObjectBindingPattern(e, n);
3771
3771
  }
3772
3772
  const An = (e, t) => t.liftedKeys.has(e), ja = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
3773
- `), Ra = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ye = (e) => !Ra.test(e), ue = (e) => Ye(e) ? `"${e}"` : e;
3773
+ `), Ra = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Ye = (e) => !Ra.test(e), me = (e) => Ye(e) ? `"${e}"` : e;
3774
3774
  function xe(e, t) {
3775
3775
  const i = [], n = [];
3776
3776
  let s = !1;
@@ -3794,7 +3794,7 @@ type ${e}SetterTypes = ${e}["${Xi}"]` : "", l = c.filter(Boolean).join(", ");
3794
3794
  }
3795
3795
  const yi = (e) => e.map((t) => `'${t}'`).join(" | ");
3796
3796
  function V(e, t, i) {
3797
- if (Te(i))
3797
+ if (Ee(i))
3798
3798
  return Ln(e, i);
3799
3799
  const n = o.isCallExpression(i) ? ka(e, i) : i, s = o.visitEachChild(
3800
3800
  n,
@@ -3802,7 +3802,7 @@ function V(e, t, i) {
3802
3802
  V.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3803
3803
  e.transformationContext
3804
3804
  );
3805
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Te($e(i.right)) || qr(i.right)) ? Ja(s) : s;
3805
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Ee($e(i.right)) || qr(i.right)) ? Ja(s) : s;
3806
3806
  }
3807
3807
  function Ln(e, t) {
3808
3808
  const i = Nn(e, t);
@@ -3816,36 +3816,36 @@ function Nn(e, t) {
3816
3816
  if (o.isJsxNamespacedName(r))
3817
3817
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
3818
3818
  if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== nt && r.text !== st) {
3819
- const S = o.isIdentifier(r) && r.text === kr ? Je(i, e) : {
3819
+ const w = o.isIdentifier(r) && r.text === kr ? Je(i, e) : {
3820
3820
  // No need to wrap the function call in a lit-html tag
3821
3821
  litTag: void 0,
3822
3822
  parts: [Oa(e, t, r, i)]
3823
3823
  };
3824
3824
  return {
3825
3825
  key: Ma(s, e),
3826
- ...S
3826
+ ...w
3827
3827
  };
3828
3828
  }
3829
- const c = r.text === nt ? We : r.text === st ? yt : r.text, d = r.text === nt ? de : r.text === st ? Y : Ar.has(c) ? nn : Pt.has(c) ? oe : pe, l = kt(c), p = l ? e.localComponents[c]?.requiredProperties : void 0, u = p === void 0 ? void 0 : new Set(p);
3829
+ const c = r.text === nt ? We : r.text === st ? yt : r.text, d = r.text === nt ? pe : r.text === st ? Y : Ar.has(c) ? nn : Pt.has(c) ? oe : ue, l = kt(c), p = l ? e.localComponents[c]?.requiredProperties : void 0, u = p === void 0 ? void 0 : new Set(p);
3830
3830
  let f;
3831
3831
  const g = [];
3832
3832
  let y = !1;
3833
- const h = s.attributes.properties.flatMap((P) => {
3834
- if (o.isJsxSpreadAttribute(P))
3833
+ const h = s.attributes.properties.flatMap((I) => {
3834
+ if (o.isJsxSpreadAttribute(I))
3835
3835
  throw Error(
3836
3836
  `JSX spread attribute syntax is not supported. See alternatives: https://qawebgis.esri.com/components/lumina/jsx#spread-attributes
3837
- Found ${P.getText(e.sourceFile)}`
3837
+ Found ${I.getText(e.sourceFile)}`
3838
3838
  );
3839
- const { name: S, initializer: C } = P;
3840
- if (o.isJsxNamespacedName(S))
3841
- throw Error(`JSX namespaced attributes are not supported. Found ${S.getText(e.sourceFile)}`);
3842
- const L = S.text, q = ba(C), j = q?.propType ?? Sa(L, C, c);
3839
+ const { name: w, initializer: P } = I;
3840
+ if (o.isJsxNamespacedName(w))
3841
+ throw Error(`JSX namespaced attributes are not supported. Found ${w.getText(e.sourceFile)}`);
3842
+ const L = w.text, q = ba(P), j = q?.propType ?? Sa(L, P, c);
3843
3843
  u?.delete(L);
3844
- const N = ga[j](e, q?.initializer ?? C, L, c);
3844
+ const N = ga[j](e, q?.initializer ?? P, L, c);
3845
3845
  if (N.length === 0)
3846
3846
  return [];
3847
- const W = e.compiler.shouldMinifyJsx ? [" "] : Pa($n(S, e));
3848
- return j === "key" ? (f = typeof N[0] == "object" && !An(S, e) ? N[0] : void 0, W.some(Ea) ? W : []) : j === "directives" || j === "ref" || L === "deferLoad" ? (y ||= j === "deferLoad", g.push(
3847
+ const W = e.compiler.shouldMinifyJsx ? [" "] : Pa($n(w, e));
3848
+ return j === "key" ? (f = typeof N[0] == "object" && !An(w, e) ? N[0] : void 0, W.some(Ea) ? W : []) : j === "directives" || j === "ref" || L === "deferLoad" ? (y ||= j === "deferLoad", g.push(
3849
3849
  ...W,
3850
3850
  ...N.flatMap(
3851
3851
  (M, J) => typeof M == "string" || J === 0 || typeof N[J - 1] == "string" ? M : [" ", M]
@@ -3866,13 +3866,13 @@ Found ${P.getText(e.sourceFile)}`
3866
3866
  throw Error(
3867
3867
  `Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
3868
3868
  );
3869
- const w = (d === oe || d === Y) && b.parts.length === 0, I = [
3869
+ const S = (d === oe || d === Y) && b.parts.length === 0, $ = [
3870
3870
  "<",
3871
3871
  typeof c == "string" ? c : r,
3872
3872
  ...h,
3873
- w ? `${h.length === 0 ? "" : " "}/>` : ">"
3874
- ], A = v || w ? I : [
3875
- ...I,
3873
+ S ? `${h.length === 0 ? "" : " "}/>` : ">"
3874
+ ], A = v || S ? $ : [
3875
+ ...$,
3876
3876
  /**
3877
3877
  * If parent was an HTML element (e.g. `<svg>`), but children are SVG
3878
3878
  * fragments (e.g. `<circle />`, then wrap the children in their own
@@ -3899,7 +3899,7 @@ function Oa(e, t, i, n) {
3899
3899
  throw Error(`JSX namespaced attributes are not supported. Found ${l.getText(e.sourceFile)}`);
3900
3900
  if (l.text === "key")
3901
3901
  return;
3902
- const u = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Te(p) ? Ln(e, p) : V(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = Ye(l.text) ? o.factory.createStringLiteral(l.text) : l;
3902
+ const u = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Ee(p) ? Ln(e, p) : V(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = Ye(l.text) ? o.factory.createStringLiteral(l.text) : l;
3903
3903
  return o.factory.createPropertyAssignment(f, u);
3904
3904
  }), { parts: a, litTag: c } = Je(n, e);
3905
3905
  return a.length > 0 && r.push(
@@ -3920,7 +3920,7 @@ function Je(e, t) {
3920
3920
  return jt(t, s, s);
3921
3921
  {
3922
3922
  const r = Nn(t, s);
3923
- if (r.key === void 0 && r.litTag !== de && r.litTag !== Y) {
3923
+ if (r.key === void 0 && r.litTag !== pe && r.litTag !== Y) {
3924
3924
  if (r.litTag === nn)
3925
3925
  return r.parts;
3926
3926
  if (i !== void 0 && r.litTag !== void 0 && i !== r.litTag)
@@ -4041,7 +4041,7 @@ function Ka(e, t) {
4041
4041
  a && !l.isTypeOnly && f && g && e.importedFunctionComponentsFromModules.add(r);
4042
4042
  }), t;
4043
4043
  }
4044
- const Mn = (e, t) => e === pe && ae.staticHtml.includes(t) ? de : e === oe && ae.staticSvg.includes(t) ? Y : e, Ba = (e, t, i) => t.startsWith(".") ? m.resolve(e, "..", `${t}${i}`) : t;
4044
+ const Mn = (e, t) => e === ue && ae.staticHtml.includes(t) ? pe : e === oe && ae.staticSvg.includes(t) ? Y : e, Ba = (e, t, i) => t.startsWith(".") ? m.resolve(e, "..", `${t}${i}`) : t;
4045
4045
  function Wa(e) {
4046
4046
  return o.isImportDeclaration(e) ? _a(this, e) : e;
4047
4047
  }
@@ -4089,7 +4089,7 @@ function Ha(e) {
4089
4089
  );
4090
4090
  }
4091
4091
  function On(e, t) {
4092
- const i = e === de ? pe : e === Y ? oe : e, n = t.importRenames[e];
4092
+ const i = e === pe ? ue : e === Y ? oe : e, n = t.importRenames[e];
4093
4093
  return n === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
4094
4094
  !1,
4095
4095
  o.factory.createIdentifier(i),
@@ -4103,7 +4103,7 @@ function Ua(e) {
4103
4103
  return;
4104
4104
  const { packageName: n, moduleName: s } = vn(i);
4105
4105
  if (t.includes(n ?? "") && (s.startsWith("dist/components") || s.startsWith("components"))) {
4106
- const r = ce(e.sourceFile.fileName);
4106
+ const r = le(e.sourceFile.fileName);
4107
4107
  throw new Error(
4108
4108
  `Did not expect to find any explicit imports for "${i}". Found import in ${r}. Imports for web components that your component consumes will be added automatically at build-time as appropriate for a given output target. Type-only imports are still allowed. If you believe this is an error, please notify Lumina maintainers.`
4109
4109
  );
@@ -4130,7 +4130,7 @@ function qa(e, t, i) {
4130
4130
  if (n === void 0) {
4131
4131
  if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
4132
4132
  return;
4133
- const s = ce(i);
4133
+ const s = le(i);
4134
4134
  throw Error(
4135
4135
  E(
4136
4136
  "@arcgis/lumina:resolveTagName",
@@ -4141,7 +4141,7 @@ function qa(e, t, i) {
4141
4141
  return n;
4142
4142
  }
4143
4143
  function Va(e, t) {
4144
- return e.packageName === void 0 ? le(t, e.moduleName) : m.join(e.packageName, e.moduleName);
4144
+ return e.packageName === void 0 ? de(t, e.moduleName) : m.join(e.packageName, e.moduleName);
4145
4145
  }
4146
4146
  function Jn(e) {
4147
4147
  return e._localDefinedComponents ??= Cn(
@@ -4162,7 +4162,7 @@ const Ga = (e, t) => {
4162
4162
  const n = {
4163
4163
  compiler: t.compiler,
4164
4164
  externalComponents: Tn(),
4165
- localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Jn(t.compiler),
4165
+ localComponents: Jn(t.compiler),
4166
4166
  sourceFile: e,
4167
4167
  transformationContext: t.transformation,
4168
4168
  importRenames: Xa(e),
@@ -4525,19 +4525,21 @@ const lc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expressio
4525
4525
  },
4526
4526
  async handler(t, i) {
4527
4527
  const n = e.getSourceFile(i, t);
4528
- await Promise.all([Ce, e.apiJsonDeferred.promise]);
4528
+ await Promise.all(
4529
+ e.apiJsonEnabled ? [ce, e.apiJsonDeferred.promise] : [ce]
4530
+ );
4529
4531
  const r = o.transform(n, [
4530
4532
  (f) => () => Vi(e, f, n, [
4531
4533
  ...e.options.types?.sourceFileTransformers ?? [],
4532
4534
  ...dc
4533
4535
  ])
4534
- ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, d = a.sourceMap ? ve.createSourceMapGenerator(
4536
+ ]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, d = a.sourceMap ? be.createSourceMapGenerator(
4535
4537
  e.typeScriptHost,
4536
4538
  m.basename(i),
4537
4539
  "",
4538
4540
  m.dirname(i),
4539
4541
  a
4540
- ) : void 0, l = ve.createTextWriter(ve.getNewLineCharacter(a));
4542
+ ) : void 0, l = be.createTextWriter(be.getNewLineCharacter(a));
4541
4543
  c.writeFile(r, l, d);
4542
4544
  const p = l.getText(), u = d?.toJSON();
4543
4545
  return {
@@ -4585,7 +4587,7 @@ function fc(e) {
4585
4587
  throw Error(
4586
4588
  E(
4587
4589
  "@arcgis/lumina:loadTypeScriptConfig",
4588
- `Unable to find ${ce(String(t))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`,
4590
+ `Unable to find ${le(String(t))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`,
4589
4591
  process.cwd()
4590
4592
  )
4591
4593
  );
@@ -4703,15 +4705,15 @@ async function hc(e, t, i) {
4703
4705
  s.map(async (l, p) => {
4704
4706
  const f = p === 0 ? l : m.join(r, l), g = m.join(e.dir.root, f), y = m.join(n, f);
4705
4707
  await Z(m.dirname(y), { recursive: !0 });
4706
- const h = await B(g, "utf-8"), v = le(m.dirname(f), `build/${i}`), b = `${d}<script type="module" src="${v}"><\/script>
4707
- `, w = Math.min(
4708
+ const h = await B(g, "utf-8"), v = de(m.dirname(f), `build/${i}`), b = `${d}<script type="module" src="${v}"><\/script>
4709
+ `, S = Math.min(
4708
4710
  ...[h.indexOf("<style>"), h.indexOf("<script"), h.indexOf("</head>")].filter(
4709
- (P) => P !== -1
4711
+ (I) => I !== -1
4710
4712
  )
4711
4713
  );
4712
- if (w === Number.POSITIVE_INFINITY)
4714
+ if (S === Number.POSITIVE_INFINITY)
4713
4715
  throw Error(E("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
4714
- const I = h.slice(0, w) + b + h.slice(w), A = e.options?.build?.webApp?.transformFile?.(I, y, e) ?? I;
4716
+ const $ = h.slice(0, S) + b + h.slice(S), A = e.options?.build?.webApp?.transformFile?.($, y, e) ?? $;
4715
4717
  await F(y, A, "utf-8");
4716
4718
  })
4717
4719
  ), await e.options.build?.webApp?.afterBuildEnd?.(e);
@@ -4963,14 +4965,14 @@ function Hn(e, t) {
4963
4965
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4964
4966
  let c = 0;
4965
4967
  const d = e.code.matchAll(Ec);
4966
- for (const S of d) {
4967
- const [C, L, q, j, N] = S, W = N.startsWith(Ve);
4968
- if (c !== 0 && c !== S.index) {
4969
- const M = e.code.slice(c, S.index);
4968
+ for (const w of d) {
4969
+ const [P, L, q, j, N] = w, W = N.startsWith(Ve);
4970
+ if (c !== 0 && c !== w.index) {
4971
+ const M = e.code.slice(c, w.index);
4970
4972
  s.push(M), a.push([c, M.length, 0, ""]);
4971
4973
  }
4972
- if (c = S.index + C.length, W)
4973
- a.push([S.index, C.length, 0, ""]), n.push(`"${zn(N.slice(Ve.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? q ?? j ?? "");
4974
+ if (c = w.index + P.length, W)
4975
+ a.push([w.index, P.length, 0, ""]), n.push(`"${zn(N.slice(Ve.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? q ?? j ?? "");
4974
4976
  else {
4975
4977
  const M = Un(N, t), J = M?.isAsync === !0;
4976
4978
  if (L !== void 0) {
@@ -4981,16 +4983,16 @@ function Hn(e, t) {
4981
4983
  }
4982
4984
  if (J) {
4983
4985
  const tt = M.oldSingleExportName === void 0 ? `{${Ne.join(",")}}` : Ne[0].split(":")[1];
4984
- a.push([S.index + 6, 0, L.length, tt]);
4986
+ a.push([w.index + 6, 0, L.length, tt]);
4985
4987
  }
4986
4988
  } else if (q === void 0 && j === void 0)
4987
- J && a.push([S.index + 6, 0, 0, ""]);
4989
+ J && a.push([w.index + 6, 0, 0, ""]);
4988
4990
  else {
4989
4991
  if (J)
4990
4992
  throw Error(
4991
4993
  E(
4992
4994
  z,
4993
- `Expected local import specifiers to use only named or side-effect import syntax. Found ${C} in a chunk:
4995
+ `Expected local import specifiers to use only named or side-effect import syntax. Found ${P} in a chunk:
4994
4996
  ${M.code}`
4995
4997
  )
4996
4998
  );
@@ -5006,20 +5008,20 @@ ${M.code}`
5006
5008
  }
5007
5009
  const p = Pc(r);
5008
5010
  let u = e.code.slice(0, c);
5009
- for (let S = a.length - 1; S >= 0; S--) {
5010
- const [C, L, q, j] = a[S];
5011
+ for (let w = a.length - 1; w >= 0; w--) {
5012
+ const [P, L, q, j] = a[w];
5011
5013
  let N = L, W = "";
5012
5014
  if (L === 0) {
5013
5015
  const J = p();
5014
5016
  n.push(J), W = ` ${J} from`, j !== "" ? (N = q + 4, i.push(j)) : i.push("");
5015
5017
  }
5016
- u = u.slice(0, C) + W + u.slice(C + N);
5018
+ u = u.slice(0, P) + W + u.slice(P + N);
5017
5019
  }
5018
- const [f, g] = Si(e), y = i.findLastIndex((S) => S.length > 0), h = i.slice(0, y + 1).join(","), b = `export default $arcgis.t(${i.length === 0 ? "_" : `([${h}])`}=>{`, w = n.join(","), I = `${g}},${w})`;
5020
+ const [f, g] = Si(e), y = i.findLastIndex((w) => w.length > 0), h = i.slice(0, y + 1).join(","), b = `export default $arcgis.t(${i.length === 0 ? "_" : `([${h}])`}=>{`, S = n.join(","), $ = `${g}},${S})`;
5019
5021
  let A = e.code.slice(c, f);
5020
5022
  A = `${s.join("")}${A}`, A = wi(A, t);
5021
- const P = `${u}${b}${A}${I}`;
5022
- e.code = P;
5023
+ const I = `${u}${b}${A}${$}`;
5024
+ e.code = I;
5023
5025
  }
5024
5026
  function Si(e) {
5025
5027
  const t = Cc.exec(e.code), i = t?.index ?? e.code.length;
@@ -5208,7 +5210,7 @@ async function Dc(e) {
5208
5210
  )).filter(D).flat(), a = await Promise.all([
5209
5211
  // This may contain an import map so must be first
5210
5212
  yc(n, t, i),
5211
- Ce.then(r),
5213
+ ce.then(r),
5212
5214
  Gn(e).then(r)
5213
5215
  ]), c = m.join(e.dir.src, "loader.ts");
5214
5216
  return [
@@ -5249,7 +5251,17 @@ async function Gn(e) {
5249
5251
  }
5250
5252
  const jc = "/@arcgis/lumina-compiler/testSetupFile", Rc = /^\/@arcgis\/lumina-compiler\/testSetupFile/u, ut = [jc];
5251
5253
  async function Mc(e) {
5252
- if (!e.viteConfig.test?.browser?.enabled)
5254
+ if (
5255
+ /**
5256
+ * Only import custom element dependencies if we are running in Vitest browser mode.
5257
+ * This keeps node tests lightweight for unit tests that don't deal with web
5258
+ * components.
5259
+ *
5260
+ * For puppeteer front-end, we run Vite rather than Vitest, so setup-file
5261
+ * does not apply (instead we use transformIndexHtml() for dependency loading).
5262
+ */
5263
+ !e.apiJsonEnabled
5264
+ )
5253
5265
  return Ei(e);
5254
5266
  const i = (await Pe(e)).map((n, s) => {
5255
5267
  if ("javascriptCode" in n)
@@ -5300,7 +5312,7 @@ function Kc(e) {
5300
5312
  id: r
5301
5313
  },
5302
5314
  async handler() {
5303
- return !i && !e.isInPuppeteerTestBackEnd && (n ??= Ho(e, t).then(() => {
5315
+ return !i && e.apiJsonEnabled && (n ??= Ho(e, t).then(() => {
5304
5316
  i = !0;
5305
5317
  }), t = !1, await n, e.apiJsonDeferred.resolve()), ao(e);
5306
5318
  }
@@ -5317,7 +5329,7 @@ function Kc(e) {
5317
5329
  * invalidate loader.js, forcing a page reload
5318
5330
  */
5319
5331
  configureServer(g) {
5320
- if (e.isInPuppeteerTestBackEnd)
5332
+ if (!e.apiJsonEnabled)
5321
5333
  return;
5322
5334
  e.isInTest && g.watcher.on("change", (h) => {
5323
5335
  d(h, async () => await B(h, "utf8")).catch(
@@ -5332,7 +5344,7 @@ function Kc(e) {
5332
5344
  e.componentFiles.some((b) => b.startsWith(h)) && l();
5333
5345
  });
5334
5346
  function y(h) {
5335
- Ee(h, e.dir.srcComponents) && l();
5347
+ Ce(h, e.dir.srcComponents) && l();
5336
5348
  }
5337
5349
  },
5338
5350
  buildEnd() {
@@ -5345,33 +5357,33 @@ function Kc(e) {
5345
5357
  let h;
5346
5358
  if (e.isInStorybook) {
5347
5359
  h = await y();
5348
- const w = e.typeScriptProgram.getSourceFile(g);
5349
- if (w === void 0)
5360
+ const S = e.typeScriptProgram.getSourceFile(g);
5361
+ if (S === void 0)
5350
5362
  return;
5351
- if (!(w.text === h)) {
5352
- let S;
5363
+ if (!(S.text === h)) {
5364
+ let w;
5353
5365
  await Promise.race([
5354
5366
  e._typeScriptReload.promise,
5355
- new Promise((C) => {
5356
- S = setTimeout(() => {
5367
+ new Promise((P) => {
5368
+ w = setTimeout(() => {
5357
5369
  T.info(
5358
5370
  a,
5359
5371
  "Timed out waiting for TypeScript to finish type-checking. This may be a bug"
5360
- ), C(void 0);
5372
+ ), P(void 0);
5361
5373
  }, 1e4);
5362
5374
  })
5363
- ]), clearTimeout(S);
5375
+ ]), clearTimeout(w);
5364
5376
  }
5365
5377
  }
5366
- if (!Ee(g, e.dir.srcComponents))
5378
+ if (!Ce(g, e.dir.srcComponents))
5367
5379
  return;
5368
5380
  h ??= await y();
5369
5381
  const b = Uo(e, g, h);
5370
5382
  if (b === void 0)
5371
5383
  return !1;
5372
- for (const w of b) {
5373
- const I = un(w);
5374
- e.server.ws.send({ type: "custom", event: "component-meta-update", data: I });
5384
+ for (const S of b) {
5385
+ const $ = un(S);
5386
+ e.server.ws.send({ type: "custom", event: "component-meta-update", data: $ });
5375
5387
  }
5376
5388
  return p(), !0;
5377
5389
  }
@@ -5397,7 +5409,7 @@ function Kc(e) {
5397
5409
  }];
5398
5410
  }
5399
5411
  const Tt = "@arcgis/lumina:provideAssets";
5400
- function be(e, t, i = Mt) {
5412
+ function Se(e, t, i = Mt) {
5401
5413
  if (e.viteCommand !== "serve")
5402
5414
  throw Error(E(Tt, "serveAssets() is only available when Vite is running in serve mode"));
5403
5415
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
@@ -5469,7 +5481,7 @@ function Zn(e) {
5469
5481
  throw Error(
5470
5482
  E(
5471
5483
  Tt,
5472
- `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${ce(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 \\`
5484
+ `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${le(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 \\`
5473
5485
  )
5474
5486
  );
5475
5487
  return e.destination;
@@ -5515,12 +5527,12 @@ function Uc(e) {
5515
5527
  t = zc(e);
5516
5528
  },
5517
5529
  async configureServer(n) {
5518
- e.server = n, !e.isInPuppeteerTestBackEnd && (be(e, await t, i()), n.watcher.on("addDir", (s) => {
5530
+ e.server = n, Se(e, await t, i()), n.watcher.on("addDir", (s) => {
5519
5531
  if (s.endsWith("assets")) {
5520
5532
  const r = m.dirname(s);
5521
- m.join(r, "/") === e.dir.root ? be(e, [ns], i()) : s.startsWith(e.dir.srcComponents) && be(e, [is(s, r)], i());
5533
+ m.join(r, "/") === e.dir.root ? Se(e, [ns], i()) : s.startsWith(e.dir.srcComponents) && Se(e, [is(s, r)], i());
5522
5534
  }
5523
- }));
5535
+ });
5524
5536
  },
5525
5537
  async writeBundle() {
5526
5538
  await Xn(e, await t, i());
@@ -5612,7 +5624,7 @@ const is = (e, t) => ({
5612
5624
  ...await fo(e)
5613
5625
  }, { loader: y, ...h } = g, v = e.environment === "development" || e.isInTest ? {
5614
5626
  "process.env.ESRI_INTERNAL": "true"
5615
- } : void 0, b = !import.meta.url.includes("node_modules"), w = {
5627
+ } : void 0, b = !import.meta.url.includes("node_modules"), S = {
5616
5628
  /**
5617
5629
  * Dependency pre-bundling by default scouts all index.html files to find
5618
5630
  * what dependencies are used. Since Lumina adds imports to index.html
@@ -5722,7 +5734,7 @@ const is = (e, t) => ({
5722
5734
  */
5723
5735
  forceRerunTriggers: f === void 0 ? ["**/*.{ts,tsx}"] : void 0
5724
5736
  },
5725
- optimizeDeps: w,
5737
+ optimizeDeps: S,
5726
5738
  define: v
5727
5739
  };
5728
5740
  }
@@ -5756,7 +5768,7 @@ const is = (e, t) => ({
5756
5768
  }
5757
5769
  }
5758
5770
  },
5759
- optimizeDeps: w,
5771
+ optimizeDeps: S,
5760
5772
  define: v,
5761
5773
  test: {
5762
5774
  /*
@@ -5805,7 +5817,7 @@ const tl = (e) => `/*! ${e} */`, x = (e) => (t, i) => {
5805
5817
  enumerable: !0
5806
5818
  });
5807
5819
  };
5808
- function ge(e) {
5820
+ function ye(e) {
5809
5821
  if (m.isAbsolute(e))
5810
5822
  throw Error(
5811
5823
  E(
@@ -5815,7 +5827,7 @@ function ge(e) {
5815
5827
  );
5816
5828
  return Me(e);
5817
5829
  }
5818
- const ye = {
5830
+ const he = {
5819
5831
  vsCodeHtml: "docs/vscode.html-custom-data.json",
5820
5832
  vsCodeCss: "docs/vscode.css-custom-data.json",
5821
5833
  webTypes: "docs/web-types.json",
@@ -5948,7 +5960,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5948
5960
  }
5949
5961
  });
5950
5962
  async function ol(e) {
5951
- const i = (await Promise.all([Ce, Gn(e)])).flat();
5963
+ const i = (await Promise.all([ce, Gn(e)])).flat();
5952
5964
  if (!await ss(
5953
5965
  i,
5954
5966
  e.dir.src,
@@ -5989,8 +6001,8 @@ async function cl(e, t) {
5989
6001
  const p = l[1], u = fl(p), f = r.indexOf("{", l.index), g = r.indexOf("}", f), y = r.slice(0, l.index).trimEnd();
5990
6002
  let h = "";
5991
6003
  if (y.endsWith("*/")) {
5992
- const w = y.lastIndexOf("/**");
5993
- h = y.slice(w + 3, -2).trim().replaceAll(ul, "");
6004
+ const S = y.lastIndexOf("/**");
6005
+ h = y.slice(S + 3, -2).trim().replaceAll(ul, "");
5994
6006
  }
5995
6007
  const v = r.slice(f, g).match(pl)?.[1] || u, b = ml(u);
5996
6008
  d.push({
@@ -6024,7 +6036,7 @@ var gl = Object.defineProperty, k = (e, t, i, n) => {
6024
6036
  return s && gl(t, i, s), s;
6025
6037
  };
6026
6038
  const _ = "@arcgis/lumina:context";
6027
- class $ {
6039
+ class C {
6028
6040
  constructor(t) {
6029
6041
  this.typeScriptProgram = void 0, this.typeScriptTypeChecker = void 0, this.typeScriptWatchProgram = void 0, this._typeScriptSourceFiles = /* @__PURE__ */ new Map(), this._typeScriptReload = void 0, this._plugin = {
6030
6042
  name: _,
@@ -6061,9 +6073,11 @@ class $ {
6061
6073
  _,
6062
6074
  "Vite output directory is outside the root directory. This is not officially supported by Lumina and may lead to unexpected behavior. Contact Lumina maintainers if you need this to be supported."
6063
6075
  ), this.isInStorybook = a.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(a.server?.hmr ?? !0);
6064
- const v = this.options.documentation?.publicStoryUrlPrefix;
6065
- this.isFullApiExtraction && typeof v == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await cl(this.componentStoryFiles, v)).then((b) => {
6066
- this.componentStories = b;
6076
+ const v = this.isInTest && a.test?.browser?.enabled === !0 && a.resolve.conditions.includes("node"), b = this.isInTest && a.test?.browser?.enabled !== !0 && a.resolve.conditions.includes("node");
6077
+ this.apiJsonEnabled = !v && !this.isInPuppeteerTestBackEnd && !b, this.apiJsonEnabled || (this._localDefinedComponents = {}, this.options.build ??= {}, this.options.build.dependencies ??= {}, this.options.build.dependencies.silenceUnknownJsxElementUsage = () => !0, this.typeScriptHost = o.createCompilerHost({}, !1));
6078
+ const S = this.options.documentation?.publicStoryUrlPrefix;
6079
+ this.isFullApiExtraction && typeof S == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await cl(this.componentStoryFiles, S)).then(($) => {
6080
+ this.componentStories = $;
6067
6081
  }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), gc(this, a.build.sourcemap !== !1), rs(this) && Pe(this);
6068
6082
  }
6069
6083
  },
@@ -6096,11 +6110,11 @@ class $ {
6096
6110
  );
6097
6111
  const s = t.documentation ?? {};
6098
6112
  this._documentationFileNames = {
6099
- apiJson: s.apiJsonFileName === !1 ? void 0 : s.apiJsonFileName ? ge(s.apiJsonFileName) : ye.apiJson,
6100
- stencilLikeDocsJson: s.stencilLikeDocsJsonFileName === !1 ? void 0 : s.stencilLikeDocsJsonFileName ? ge(s.stencilLikeDocsJsonFileName) : ye.stencilLikeDocsJson,
6101
- webTypes: s.jetBrains === !1 ? void 0 : s.jetBrains?.webTypesFileName ? ge(s.jetBrains.webTypesFileName) : ye.webTypes,
6102
- vsCodeHtml: s.vsCode === !1 ? void 0 : s.vsCode?.htmlFileName ? ge(s.vsCode.htmlFileName) : ye.vsCodeHtml,
6103
- vsCodeCss: s.vsCode === !1 ? void 0 : s.vsCode?.cssFileName ? ge(s.vsCode.cssFileName) : ye.vsCodeCss
6113
+ apiJson: s.apiJsonFileName === !1 ? void 0 : s.apiJsonFileName ? ye(s.apiJsonFileName) : he.apiJson,
6114
+ stencilLikeDocsJson: s.stencilLikeDocsJsonFileName === !1 ? void 0 : s.stencilLikeDocsJsonFileName ? ye(s.stencilLikeDocsJsonFileName) : he.stencilLikeDocsJson,
6115
+ webTypes: s.jetBrains === !1 ? void 0 : s.jetBrains?.webTypesFileName ? ye(s.jetBrains.webTypesFileName) : he.webTypes,
6116
+ vsCodeHtml: s.vsCode === !1 ? void 0 : s.vsCode?.htmlFileName ? ye(s.vsCode.htmlFileName) : he.vsCodeHtml,
6117
+ vsCodeCss: s.vsCode === !1 ? void 0 : s.vsCode?.cssFileName ? ye(s.vsCode.cssFileName) : he.vsCodeCss
6104
6118
  }, wn(void 0, t), this.componentFilesPromise = It(this, m.resolve("src/components")), fc(this);
6105
6119
  const r = t.build?.preamble ?? el();
6106
6120
  this.banner = tl(r);
@@ -6170,7 +6184,7 @@ class $ {
6170
6184
  if (Array.isArray(this.assetsToProvide))
6171
6185
  this.assetsToProvide.push({ assets: t, transformers: i, apply: n });
6172
6186
  else if (this.viteCommand === "serve")
6173
- n === "serve" && be(this, t, i);
6187
+ n === "serve" && Se(this, t, i);
6174
6188
  else
6175
6189
  throw Error(
6176
6190
  E(
@@ -6188,79 +6202,82 @@ class $ {
6188
6202
  }
6189
6203
  k([
6190
6204
  x("buildStart() in build mode or load() serve mode")
6191
- ], $.prototype, "typeScriptHost");
6205
+ ], C.prototype, "typeScriptHost");
6192
6206
  k([
6193
6207
  x("configResolved()")
6194
- ], $.prototype, "shouldMinify");
6208
+ ], C.prototype, "shouldMinify");
6195
6209
  k([
6196
6210
  x("configResolved()")
6197
- ], $.prototype, "shouldMinifyJsx");
6211
+ ], C.prototype, "shouldMinifyJsx");
6198
6212
  k([
6199
6213
  x("configResolved()")
6200
- ], $.prototype, "dir");
6214
+ ], C.prototype, "dir");
6201
6215
  k([
6202
6216
  x("load()")
6203
- ], $.prototype, "apiJson");
6217
+ ], C.prototype, "apiJson");
6204
6218
  k([
6205
6219
  x("load()")
6206
- ], $.prototype, "apiJsonComponents");
6220
+ ], C.prototype, "apiJsonComponents");
6207
6221
  k([
6208
6222
  x("load()")
6209
- ], $.prototype, "privateApiJson");
6223
+ ], C.prototype, "privateApiJson");
6224
+ k([
6225
+ x("configResolved()")
6226
+ ], C.prototype, "apiJsonEnabled");
6210
6227
  k([
6211
6228
  x("load() when in build mode")
6212
- ], $.prototype, "_componentPathMapping");
6229
+ ], C.prototype, "_componentPathMapping");
6213
6230
  k([
6214
6231
  x("apply()")
6215
- ], $.prototype, "environment");
6232
+ ], C.prototype, "environment");
6216
6233
  k([
6217
6234
  x("apply()")
6218
- ], $.prototype, "isInTest");
6235
+ ], C.prototype, "isInTest");
6219
6236
  k([
6220
6237
  x("apply()")
6221
- ], $.prototype, "isInPuppeteerTestBackEnd");
6238
+ ], C.prototype, "isInPuppeteerTestBackEnd");
6222
6239
  k([
6223
6240
  x("apply()")
6224
- ], $.prototype, "isInPuppeteerTestFrontEnd");
6241
+ ], C.prototype, "isInPuppeteerTestFrontEnd");
6225
6242
  k([
6226
6243
  x("configResolved()")
6227
- ], $.prototype, "isInStorybook");
6244
+ ], C.prototype, "isInStorybook");
6228
6245
  k([
6229
6246
  x("configResolved()")
6230
- ], $.prototype, "hmrEnabled");
6247
+ ], C.prototype, "hmrEnabled");
6231
6248
  k([
6232
6249
  x("apply()")
6233
- ], $.prototype, "viteCommand");
6250
+ ], C.prototype, "viteCommand");
6234
6251
  k([
6235
6252
  x("configResolved()")
6236
- ], $.prototype, "isFullApiExtraction");
6253
+ ], C.prototype, "isFullApiExtraction");
6237
6254
  k([
6238
6255
  x("configResolved()")
6239
- ], $.prototype, "viteConfig");
6256
+ ], C.prototype, "viteConfig");
6240
6257
  k([
6241
6258
  x("configResolved()")
6242
- ], $.prototype, "server");
6259
+ ], C.prototype, "server");
6243
6260
  k([
6244
6261
  x("load()")
6245
- ], $.prototype, "componentFiles");
6262
+ ], C.prototype, "componentFiles");
6246
6263
  k([
6247
6264
  x("load()")
6248
- ], $.prototype, "componentStoryFiles");
6265
+ ], C.prototype, "componentStoryFiles");
6249
6266
  k([
6250
6267
  x("configResolved()")
6251
- ], $.prototype, "componentStoriesPromise");
6268
+ ], C.prototype, "componentStoriesPromise");
6252
6269
  k([
6253
6270
  x("load()")
6254
- ], $.prototype, "componentStories");
6271
+ ], C.prototype, "componentStories");
6255
6272
  k([
6256
6273
  x("transform()")
6257
- ], $.prototype, "_globalHydratedCssString");
6274
+ ], C.prototype, "_globalHydratedCssString");
6258
6275
  k([
6259
6276
  x("configResolved()")
6260
- ], $.prototype, "_compilerOptionsForPrinter");
6277
+ ], C.prototype, "_compilerOptionsForPrinter");
6261
6278
  k([
6262
6279
  x("configResolved()")
6263
- ], $.prototype, "_typeScriptPrinter");
6280
+ ], C.prototype, "_typeScriptPrinter");
6264
6281
  const Ii = "makeRuntime(", yl = "@arcgis/core", hl = "@arcgis/lumina:injectRuntimeOptions", vl = (e) => ({
6265
6282
  name: hl,
6266
6283
  transform: {
@@ -6276,7 +6293,7 @@ const Ii = "makeRuntime(", yl = "@arcgis/core", hl = "@arcgis/lumina:injectRunti
6276
6293
  const s = n + Ii.length, r = e.options.css?.commonStylesPath;
6277
6294
  return {
6278
6295
  code: [
6279
- r === void 0 ? "" : `import commonStyles from "${le(e.dir.src, r)}${_e}";`,
6296
+ r === void 0 ? "" : `import commonStyles from "${de(e.dir.src, r)}${_e}";`,
6280
6297
  t.slice(0, s),
6281
6298
  "{",
6282
6299
  "defaultAssetPath:import.meta.env.BASE_URL,",
@@ -6309,7 +6326,7 @@ const Re = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
6309
6326
  generateBundle(t, i) {
6310
6327
  let n = !1;
6311
6328
  if (Object.entries(i).forEach(([s, r]) => {
6312
- const a = we(s, "components/", e);
6329
+ const a = Te(s, "components/", e);
6313
6330
  if (a !== s && (r.fileName = a), r.type === "chunk") {
6314
6331
  const c = m.dirname(m.join(e.dir.dist, s)), d = a === s ? c : m.dirname(m.join(e.dir.dist, a));
6315
6332
  let l = r.code;
@@ -6322,7 +6339,7 @@ const Re = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
6322
6339
  if (e.isInStorybook)
6323
6340
  return;
6324
6341
  const t = e._customElementDependencies, i = Object.entries(t), n = new Set(
6325
- i.map(([r]) => r).filter((r) => Ee(r, e.dir.srcComponents))
6342
+ i.map(([r]) => r).filter((r) => Ce(r, e.dir.srcComponents))
6326
6343
  );
6327
6344
  i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: d }]) => {
6328
6345
  if (n.has(r) || a.length === 0 && c.length === 0)
@@ -6331,7 +6348,7 @@ const Re = "@arcgis/lumina:addNonLazyImports", Sl = (e) => ({
6331
6348
  if (l.forEach((p) => {
6332
6349
  t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
6333
6350
  }), (a.length > 0 || c.length > 0) && l.length === 0) {
6334
- const p = ce(r);
6351
+ const p = le(r);
6335
6352
  throw Error(
6336
6353
  E(
6337
6354
  Re,
@@ -6348,34 +6365,34 @@ Possible causes:
6348
6365
  const s = i.flatMap(([r, { referencedTagNames: a, referencedDeferredTagNames: c }]) => {
6349
6366
  if (!n.has(r))
6350
6367
  return [];
6351
- const d = m.dirname(r), l = we(d, e.dir.srcComponents, e), p = m.relative(e.dir.src, l);
6352
- function u(S) {
6353
- const C = qa(e, S, r);
6354
- if (C === void 0)
6368
+ const d = m.dirname(r), l = Te(d, e.dir.srcComponents, e), p = m.relative(e.dir.src, l);
6369
+ function u(w) {
6370
+ const P = qa(e, w, r);
6371
+ if (P === void 0)
6355
6372
  return;
6356
- const L = Va(C, p);
6373
+ const L = Va(P, p);
6357
6374
  if (L !== `./${p}`)
6358
6375
  return L.startsWith(".") ? `${L}/${Ai}` : L;
6359
6376
  }
6360
- const f = new Set(a), g = new Set(c), y = Array.from(f, u).filter(D), h = (S) => `import "${S}";
6361
- `, v = y.map(h).join(""), b = /* @__PURE__ */ new Set(), w = Array.from(g, (S) => {
6362
- const C = u(S);
6363
- if (C !== void 0) {
6364
- if (f.has(S)) {
6377
+ const f = new Set(a), g = new Set(c), y = Array.from(f, u).filter(D), h = (w) => `import "${w}";
6378
+ `, v = y.map(h).join(""), b = /* @__PURE__ */ new Set(), S = Array.from(g, (w) => {
6379
+ const P = u(w);
6380
+ if (P !== void 0) {
6381
+ if (f.has(w)) {
6365
6382
  T.warn(
6366
6383
  Re,
6367
- `"${S}" 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.`
6384
+ `"${w}" 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.`
6368
6385
  );
6369
6386
  return;
6370
6387
  }
6371
- return b.add(h(C)), `.set("${S}", () => import("${C}"))
6388
+ return b.add(h(P)), `.set("${w}", () => import("${P}"))
6372
6389
  `;
6373
6390
  }
6374
- }).filter(D), I = `${v}export * from "./${$t}";`, A = Array.from(b).join("") + I, P = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
6375
- ${I}
6376
- deferredLoaders${w.join("")};` : I;
6391
+ }).filter(D), $ = `${v}export * from "./${$t}";`, A = Array.from(b).join("") + $, I = S.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
6392
+ ${$}
6393
+ deferredLoaders${S.join("")};` : $;
6377
6394
  return [
6378
- F(m.join(e.dir.dist, p, Ai), P),
6395
+ F(m.join(e.dir.dist, p, Ai), I),
6379
6396
  F(m.join(e.dir.dist, p, wl), A)
6380
6397
  ];
6381
6398
  });
@@ -6384,7 +6401,7 @@ deferredLoaders${w.join("")};` : I;
6384
6401
  }), Ai = "index.js", wl = "index.d.ts", os = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), os(e, e[s].referencedBy, i, n))), Tl = (e) => ({
6385
6402
  name: "@arcgis/lumina:handleDynamicAssets",
6386
6403
  configureServer(t) {
6387
- e.server = t, !e.isInPuppeteerTestBackEnd && Li(e).forEach(({ assets: i, transformers: n }) => be(e, i, n));
6404
+ e.server = t, Li(e).forEach(({ assets: i, transformers: n }) => Se(e, i, n));
6388
6405
  },
6389
6406
  async writeBundle() {
6390
6407
  await Promise.all(
@@ -6439,7 +6456,7 @@ function $l(e, t) {
6439
6456
  const l = s(r.webTypes);
6440
6457
  e["web-types"] !== l && (n = !0, e["web-types"] = l);
6441
6458
  }
6442
- const a = `./${te}.css`, c = t.options.build?.cdn?.namespace !== void 0, d = le(
6459
+ const a = `./${te}.css`, c = t.options.build?.cdn?.namespace !== void 0, d = de(
6443
6460
  t.dir.root,
6444
6461
  m.join(t.dir.distCdn, a)
6445
6462
  );
@@ -6756,7 +6773,7 @@ function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6756
6773
  `interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
6757
6774
  `,
6758
6775
  n.map(
6759
- (a) => ` ${ue(`on${a.name}`)}?: EventHandler<HTML${t}Element["${a.name}"]>;
6776
+ (a) => ` ${me(`on${a.name}`)}?: EventHandler<HTML${t}Element["${a.name}"]>;
6760
6777
  `
6761
6778
  ).join(""),
6762
6779
  "}",
@@ -6790,7 +6807,7 @@ function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6790
6807
  `interface Preact${t} extends ${s}HTMLAttributes<HTML${t}Element> {
6791
6808
  `,
6792
6809
  n.map(
6793
- (a) => ` ${ue(`on${a.name}`)}?: EventHandler<HTML${t}Element["${a.name}"]>;
6810
+ (a) => ` ${me(`on${a.name}`)}?: EventHandler<HTML${t}Element["${a.name}"]>;
6794
6811
  `
6795
6812
  ).join(""),
6796
6813
  "}",
@@ -6835,7 +6852,7 @@ function ed({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6835
6852
  `interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
6836
6853
  `,
6837
6854
  n.map(
6838
- (a) => ` ${ue(`on${a.name}`)}?: EventHandler<HTML${t}Element["${a.name}"]>;
6855
+ (a) => ` ${me(`on${a.name}`)}?: EventHandler<HTML${t}Element["${a.name}"]>;
6839
6856
  `
6840
6857
  ).join(""),
6841
6858
  "}",
@@ -6869,7 +6886,7 @@ function id({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6869
6886
  `interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
6870
6887
  `,
6871
6888
  n.map(
6872
- (a) => ` ${ue(`on${a.name[0].toUpperCase()}${a.name.slice(1)}`)}?: EventHandler<HTML${t}Element["${a.name}"]>;
6889
+ (a) => ` ${me(`on${a.name[0].toUpperCase()}${a.name.slice(1)}`)}?: EventHandler<HTML${t}Element["${a.name}"]>;
6873
6890
  `
6874
6891
  ).join(""),
6875
6892
  "}",
@@ -6946,7 +6963,7 @@ function cd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
6946
6963
  `interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
6947
6964
  `,
6948
6965
  n.map(
6949
- (a) => ` ${ue(`on${a.name}`)}?: EventHandler<HTML${t}Element["${a.name}"]>;
6966
+ (a) => ` ${me(`on${a.name}`)}?: EventHandler<HTML${t}Element["${a.name}"]>;
6950
6967
  `
6951
6968
  ).join(""),
6952
6969
  "}",
@@ -7019,7 +7036,7 @@ async function md(e, t) {
7019
7036
  }
7020
7037
  function fd(e) {
7021
7038
  const t = e.events?.map(
7022
- (i) => ` ${ue(`on${Ss(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
7039
+ (i) => ` ${me(`on${Ss(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
7023
7040
  ).join(`
7024
7041
  `);
7025
7042
  return `
@@ -7034,7 +7051,7 @@ ${t}
7034
7051
  `;
7035
7052
  }
7036
7053
  function Fd(e = {}) {
7037
- const t = new $(e), n = [
7054
+ const t = new C(e), n = [
7038
7055
  t._plugin,
7039
7056
  Zc(t),
7040
7057
  Yc(t),