@arcgis/lumina-compiler 4.34.0-next.85 → 4.34.0-next.88

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,12 +1,12 @@
1
1
  import { externalizeDependencies as ls, path as u, toSystemPathSeparators as te, retrievePackageJson as R, fetchPackageLocation as Ue, asyncRetrievePackageJson as ze, existsAsync as _, findPath as ds, toPosixPathSeparators as Fe, isPosix as Ri, getCwd as Mi } from "@arcgis/components-build-utils";
2
2
  import ps from "vite-plugin-dts";
3
3
  import o from "typescript";
4
- import { f as S, l as T } from "./logger-KpGU2b3R.js";
4
+ import { f as b, l as T } from "./logger-KpGU2b3R.js";
5
5
  import { getMemberName as Q, apiMemberToSynthesizedComments as X, globalPackageIdentifier as Oi, setApiDocFromJsDoc as fe, ApiExtractor as us, hasIgnoredModifier as ms, symbolToDocs as Wt, setDefaultFromInitializer as Bt, multipleJsDocTags as fs, findDecorator as _t, isApiMethod as gs, isApiProperty as ys } from "@arcgis/api-extractor";
6
6
  import { isNotUndefined as j } from "@arcgis/toolkit/predicate";
7
7
  import { readdir as qe, readFile as J, rm as hs, mkdir as Z, cp as vs, writeFile as D, copyFile as ws } from "node:fs/promises";
8
8
  import { mappedFind as he } from "@arcgis/toolkit/array";
9
- import { camelToKebab as Tt, kebabToPascal as Ss, uncapitalize as ft, getPreamble as bs, capitalize as Ts } from "@arcgis/toolkit/string";
9
+ import { camelToKebab as Tt, kebabToPascal as bs, uncapitalize as ft, getPreamble as Ss, capitalize as Ts } from "@arcgis/toolkit/string";
10
10
  import { lazyMetaSubItemJoiner as Es, lazyMetaItemJoiner as tt, lazyMetaGroupJoiner as Cs, propertyFlagAttribute as Ht, propertyFlagReflect as $s, propertyFlagBoolean as xs, propertyFlagNumber as Ps, propertyFlagState as ks, propertyFlagReadOnly as Is, propertyFlagNoAccessor as As } from "@arcgis/lumina/config";
11
11
  import { build as Ls } from "esbuild";
12
12
  import { identity as Ji } from "@arcgis/toolkit/function";
@@ -90,8 +90,8 @@ const Ws = -1, Bs = -2, _s = /["']\.\.?\/[^'"]+/gu, _i = (e, t, i, n) => e.repla
90
90
  const a = u.join(n, r), c = !r.endsWith(".js") && !r.split("/").at(-1).includes(".") ? Bi(t.dir.distComponents, a, "") : a, l = ve(c, t.dir.distComponents, t);
91
91
  if (i === n && a === l)
92
92
  return s;
93
- const d = ce(i, l);
94
- return `${s[0]}${d}`;
93
+ const d = ce(i, l), p = s.endsWith("/") ? `${d}/` : d;
94
+ return `${s[0]}${p}`;
95
95
  }), ce = (e, t) => {
96
96
  const i = u.relative(e, t);
97
97
  return i.startsWith(".") ? i : `.${u.sep}${i}`;
@@ -207,7 +207,7 @@ ${e.content}`
207
207
  const t = e.content.match(tr)?.[1] ?? e.content.match(ir)?.[1];
208
208
  if (t !== void 0)
209
209
  throw Error(
210
- S(
210
+ b(
211
211
  "@arcgis/lumina:failOnJsonImport",
212
212
  `Found a .json import (${t}). This can cause TypeScript errors for consumers of your package. See alternative options: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2047
213
213
  File content:
@@ -397,7 +397,7 @@ function hr(e, t, i, n, s) {
397
397
  Qt(e.modifiers),
398
398
  e.name,
399
399
  void 0,
400
- Sr(e.type, s),
400
+ br(e.type, s),
401
401
  e.initializer
402
402
  );
403
403
  return o.setSyntheticLeadingComments(d, X(l)), d;
@@ -537,7 +537,7 @@ function Ie(e) {
537
537
  )
538
538
  ];
539
539
  }
540
- function Sr(e, t) {
540
+ function br(e, t) {
541
541
  if (e === void 0)
542
542
  return;
543
543
  const i = o.isImportTypeNode(e) && e.qualifier && o.isIdentifier(e.qualifier) && e.qualifier.escapedText === "EventEmitter" ? e.typeArguments ?? [] : o.isTypeReferenceNode(e) && o.isIdentifier(e.typeName) && e.typeName.escapedText === "EventEmitter" ? e.typeArguments ?? [] : void 0;
@@ -550,7 +550,7 @@ function Sr(e, t) {
550
550
  t.fileName
551
551
  ), e);
552
552
  }
553
- const br = [ar, fr], Zt = "@arcgis/lumina:componentDtsTransformer";
553
+ const Sr = [ar, fr], Zt = "@arcgis/lumina:componentDtsTransformer";
554
554
  function Tr(e) {
555
555
  let t;
556
556
  const i = Er(e);
@@ -564,7 +564,7 @@ function Tr(e) {
564
564
  return [];
565
565
  const s = e.typeScriptProgram.getSourceFile(n);
566
566
  if (s === void 0)
567
- throw Error(S(Zt, `Could not find source file: ${te(n)}`));
567
+ throw Error(b(Zt, `Could not find source file: ${te(n)}`));
568
568
  const r = [];
569
569
  return e.typeScriptProgram.emit(
570
570
  s,
@@ -582,7 +582,7 @@ function Tr(e) {
582
582
  };
583
583
  }
584
584
  const Er = (e) => (t) => (i) => zi(e, t, i, [
585
- ...br,
585
+ ...Sr,
586
586
  ...e.options.types?.declarationAstTransformers ?? []
587
587
  ]), Cr = (e) => new Proxy(e, {
588
588
  get: $r,
@@ -681,12 +681,21 @@ const kr = "Fragment", it = "DynamicHtmlTag", nt = "DynamicSvgTag", Me = Symbol(
681
681
  * be set as an attribute since "class" matches the attribute name.
682
682
  */
683
683
  "class",
684
- // Microdata attributes (no equivalent properties)
685
- "itemProp",
686
- "itemScope",
687
- "itemType",
688
- "itemId",
689
- "itemRef",
684
+ /*
685
+ * Microdata attributes (no equivalent properties)
686
+ *
687
+ * This is named itemid rather than itemId to avoid conflict with the itemfid
688
+ * prop in arcgis-map, arcgis-scene, arcgis-embeddable-map, and dashboards.
689
+ * See https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/6903
690
+ *
691
+ * The other microdata are lowercase for consistency and to avoid similar
692
+ * conflicts.
693
+ */
694
+ "itemprop",
695
+ "itemscope",
696
+ "itemtype",
697
+ "itemid",
698
+ "itemtef",
690
699
  // RDFa attributes (no equivalent properties)
691
700
  "about",
692
701
  "datatype",
@@ -2121,19 +2130,19 @@ const uo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, mo = /\n\s+\
2121
2130
  repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
2122
2131
  ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
2123
2132
  nothing: ["lit", "@arcgis/lumina", "lit/html.js", "lit-html", "lit-element/lit-element.js"]
2124
- }, wo = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Ke = new RegExp(`\\.(${wo.join("|")})(\\?|$)`, "u"), So = /^import ["'](?<specifier>[^"']+)["'];$/gmu, bo = () => "throwError", V = "@arcgis/lumina:loadLitCss", ee = "?layered", Ne = "?global", To = (e) => ({
2133
+ }, wo = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Ke = new RegExp(`\\.(${wo.join("|")})(\\?|$)`, "u"), bo = /^import ["'](?<specifier>[^"']+)["'];$/gmu, So = () => "throwError", V = "@arcgis/lumina:loadLitCss", ee = "?layered", Ne = "?global", To = (e) => ({
2125
2134
  name: V,
2126
2135
  enforce: "pre",
2127
2136
  configResolved(t) {
2128
2137
  const i = t.plugins.find(({ name: s }) => s === "vite:css-post");
2129
2138
  if (i === void 0)
2130
- throw Error(S(V, "Unable to find the vite's built-in vite:css-post plugin"));
2139
+ throw Error(b(V, "Unable to find the vite's built-in vite:css-post plugin"));
2131
2140
  const n = i.transform;
2132
2141
  if (typeof n != "object" || typeof n.handler != "function")
2133
- throw Error(S(V, "Expected vite:css-post to declare a transform:{handler()} property"));
2142
+ throw Error(b(V, "Expected vite:css-post to declare a transform:{handler()} property"));
2134
2143
  if (Object.keys(n).length !== 1)
2135
2144
  throw Error(
2136
- S(V, "Expected vite:css-post's transform handler to have only a single property: handler")
2145
+ b(V, "Expected vite:css-post's transform handler to have only a single property: handler")
2137
2146
  );
2138
2147
  i.transform = async function(r, a) {
2139
2148
  const c = a.endsWith(ee);
@@ -2188,14 +2197,14 @@ const uo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, mo = /\n\s+\
2188
2197
  let s = 0;
2189
2198
  const r = co(i);
2190
2199
  let a = !1;
2191
- const c = t.replaceAll(So, (l, d) => {
2200
+ const c = t.replaceAll(bo, (l, d) => {
2192
2201
  if (!Ke.test(d) || d.includes("?"))
2193
2202
  return l;
2194
2203
  if (r) {
2195
- if ((e.options.css?.sideEffectImportHandling ?? bo)(d, i) === "drop")
2204
+ if ((e.options.css?.sideEffectImportHandling ?? So)(d, i) === "drop")
2196
2205
  return a = !0, or(l);
2197
2206
  throw Error(
2198
- S(
2207
+ b(
2199
2208
  V,
2200
2209
  `Found a side-effect CSS import \`${l}\`. Such import is not allowed as it won't work with shadow DOM. This file appears to be external so such import may not be under your control. To ignore this import, please set the css.sideEffectImportHandling property in useLumina() plugin to a function that will return "drop" for this import to indicate that you wish to have this style import dropped. Then, you would have to import the dropped manually in your component like so: \`import { styles } from "example.css";\` and then add \`static override styles = styles;\` to your component`,
2201
2210
  i
@@ -2219,7 +2228,7 @@ const uo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, mo = /\n\s+\
2219
2228
  if (d.endsWith(Ne))
2220
2229
  return l;
2221
2230
  throw Error(
2222
- S(
2231
+ b(
2223
2232
  V,
2224
2233
  `Found a side-effect CSS import \`${l}\`. Such import is not allowed as it won't work with shadow DOM. Please use \`import { styles } from "example.css";\` instead and then add \`static override styles = styles;\` to your component`,
2225
2234
  i
@@ -2419,14 +2428,14 @@ function zo(e, t, i) {
2419
2428
  if (s !== void 0) {
2420
2429
  if (!o.isObjectLiteralExpression(s))
2421
2430
  throw Error(
2422
- S(
2431
+ b(
2423
2432
  "@arcgis/lumina:extractEventMeta",
2424
2433
  `Expected object literal expression as first argument of ${Ae}(). Found ${t.name} = createEvent(${s.getText(i)})`
2425
2434
  )
2426
2435
  );
2427
2436
  if (s.properties.some((r) => o.isSpreadAssignment(r)))
2428
2437
  throw Error(
2429
- S(
2438
+ b(
2430
2439
  "@arcgis/lumina:extractEventMeta",
2431
2440
  `Unexpected spread syntax in ${Ae}() argument. ${Ae}() arguments must be statically parsable at compile time`
2432
2441
  )
@@ -2441,7 +2450,7 @@ function re(e, t) {
2441
2450
  if (e.kind === o.SyntaxKind.FalseKeyword)
2442
2451
  return !1;
2443
2452
  throw Error(
2444
- S(
2453
+ b(
2445
2454
  "@arcgis/lumina:extractBooleanInitializer",
2446
2455
  `Expected boolean literal. Instead found ${e?.getText(t)}`
2447
2456
  )
@@ -2507,7 +2516,7 @@ class We extends us {
2507
2516
  * prefix (Arcgis), where as tag name always does. This also matches
2508
2517
  * Stencil's behavior.
2509
2518
  */
2510
- pascalCaseName: Ss(n),
2519
+ pascalCaseName: bs(n),
2511
2520
  privacy: void 0,
2512
2521
  importPath: "",
2513
2522
  members: [],
@@ -2520,7 +2529,7 @@ class We extends us {
2520
2529
  }, r = t.heritageClauses?.find((a) => a.token === o.SyntaxKind.ExtendsKeyword)?.types[0]?.expression;
2521
2530
  if (r === void 0)
2522
2531
  throw Error(
2523
- S(
2532
+ b(
2524
2533
  "@arcgis/lumina:extractComponentDeclaration",
2525
2534
  `Lumina component must extend LitElement class. Found ${i} in ${this.apiModule.path} that does not extend any class.`
2526
2535
  )
@@ -2676,10 +2685,10 @@ console.log("${s.tagName} is ready to go!");
2676
2685
  x.docsTags = x.docsTags.filter(
2677
2686
  (C) => !c.has(C.name) || fs.has(C.name)
2678
2687
  );
2679
- const b = i.description;
2688
+ const S = i.description;
2680
2689
  fe(t.name, s, i, x), x.docsTags.forEach((C) => {
2681
2690
  c.add(C.name);
2682
- }), i.description = b ?? i.description;
2691
+ }), i.description = S ?? i.description;
2683
2692
  } else
2684
2693
  i.description ||= x.description;
2685
2694
  }
@@ -2687,8 +2696,8 @@ console.log("${s.tagName} is ready to go!");
2687
2696
  E.forEach((x) => {
2688
2697
  if ($ ??= o.isGetAccessor(x) ? x : void 0, A ??= o.isSetAccessor(x) ? x : void 0, !("initializer" in x))
2689
2698
  return;
2690
- const b = x;
2691
- l ||= b.modifiers?.some((C) => C.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Bt(b, i, b.getSourceFile());
2699
+ const S = x;
2700
+ l ||= S.modifiers?.some((C) => C.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Bt(S, i, S.getSourceFile());
2692
2701
  }), g && $ !== void 0 && A !== void 0 && $.type?.getText() !== A.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${v.getText(this.file)}` });
2693
2702
  }
2694
2703
  if (l && (i.readonly = !0, n || (i.docsOnlyReadonly = !0)), i.type.values && i.type.values.length > 0 && i.type.values?.every((v) => v.type === "boolean") && (i.default ? m && this.context.viteCommand === "build" && i.deprecated === void 0 && (We.loggedBooleanWarning || this.context.logLintWarning(
@@ -2988,12 +2997,12 @@ async function na(e, t) {
2988
2997
  );
2989
2998
  }
2990
2999
  async function vn(e, t) {
2991
- return Se ??= ra(e, t), await Se;
3000
+ return be ??= ra(e, t), await be;
2992
3001
  }
2993
3002
  function sa() {
2994
3003
  if (Be === void 0)
2995
3004
  throw Error(
2996
- S(
3005
+ b(
2997
3006
  "@arcgis/lumina:retrieveComponentDependencies",
2998
3007
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
2999
3008
  )
@@ -3003,7 +3012,7 @@ function sa() {
3003
3012
  function wn() {
3004
3013
  if (vt === void 0)
3005
3014
  throw Error(
3006
- S(
3015
+ b(
3007
3016
  "@arcgis/lumina:retrieveFlatComponentDependencies",
3008
3017
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
3009
3018
  )
@@ -3012,7 +3021,7 @@ function wn() {
3012
3021
  }
3013
3022
  async function ra(e, t) {
3014
3023
  const i = R(e), n = i.dependencies ?? {}, s = i.peerDependencies ?? {}, a = (await Promise.all(
3015
- [...Object.keys(n), ...Object.keys(s)].filter((d) => !oa.has(d)).flatMap(async (d) => await Sn(d, e))
3024
+ [...Object.keys(n), ...Object.keys(s)].filter((d) => !oa.has(d)).flatMap(async (d) => await bn(d, e))
3016
3025
  )).filter(j);
3017
3026
  Be ??= a, vt = Object.fromEntries(a.flatMap((d) => Object.entries(d.components)));
3018
3027
  const c = t?.serve?.extraDependencies?.map(
@@ -3056,8 +3065,8 @@ const oa = /* @__PURE__ */ new Set([
3056
3065
  "vscode-languageserver-textdocument",
3057
3066
  "vscode-languageserver-types"
3058
3067
  ]);
3059
- let Be, vt, Se;
3060
- async function Sn(e, t) {
3068
+ let Be, vt, be;
3069
+ async function bn(e, t) {
3061
3070
  const i = await Ue(e, t), n = await ze(i), s = "exports" in n, r = ua.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
3062
3071
  if (a ? await _(c) : !1) {
3063
3072
  const g = await J(c, "utf8"), y = aa(g, "bootstrapLazy("), v = g.indexOf(", options", y), h = g.slice(y, v), w = h.startsWith('JSON.parse("') ? h.slice(12, -2).replaceAll('\\"', '"') : h;
@@ -3071,7 +3080,7 @@ Error: ${String(E)}`);
3071
3080
  }
3072
3081
  const d = ui(n.customElements);
3073
3082
  if (d != null) {
3074
- const g = u.join(i, d), y = JSON.parse(await J(g, "utf-8")), v = ca(y), h = bn(y, {
3083
+ const g = u.join(i, d), y = JSON.parse(await J(g, "utf-8")), v = ca(y), h = Sn(y, {
3075
3084
  packageName: e,
3076
3085
  getImportPath: r
3077
3086
  });
@@ -3100,7 +3109,7 @@ function aa(e, t) {
3100
3109
  const i = e.indexOf(t);
3101
3110
  return i === -1 ? -1 : i + t.length;
3102
3111
  }
3103
- function bn(e, t) {
3112
+ function Sn(e, t) {
3104
3113
  const i = {};
3105
3114
  for (const n of e.modules ?? [])
3106
3115
  if (n.declarations !== void 0)
@@ -3277,7 +3286,7 @@ const ya = /* @__PURE__ */ new Set([
3277
3286
  p,
3278
3287
  e,
3279
3288
  m ? "" : void 0
3280
- ), y = i === "value" && (n === "input" || n === "textarea" || n === Me) ? ba(f, e) : f;
3289
+ ), y = i === "value" && (n === "input" || n === "textarea" || n === Me) ? Sa(f, e) : f;
3281
3290
  if (y !== p)
3282
3291
  return [m ? `.${i}` : s.name, d, y];
3283
3292
  }
@@ -3444,7 +3453,7 @@ function gi(e, t, i) {
3444
3453
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3445
3454
  );
3446
3455
  const n = t.expression;
3447
- if (Sa(n)) {
3456
+ if (ba(n)) {
3448
3457
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3449
3458
  e.neededImports.add(r);
3450
3459
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3454,8 +3463,8 @@ function gi(e, t, i) {
3454
3463
  } else
3455
3464
  return [i, ...De(e, t, !0)];
3456
3465
  }
3457
- const Sa = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3458
- function ba(e, t) {
3466
+ const ba = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3467
+ function Sa(e, t) {
3459
3468
  t.neededImports.add("live");
3460
3469
  const i = t.importRenames.live;
3461
3470
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
@@ -3481,7 +3490,7 @@ const yi = {
3481
3490
  bindEvent: "event"
3482
3491
  };
3483
3492
  function Ea(e, t, i) {
3484
- return $a.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (Vi.has(e) || e.includes("-")) && (e !== "itemId" || i !== "arcgis-map" && i !== "arcgis-scene") ? "attribute" : !Pt(i) && (Xi.has(e) || (i === yt ? !1 : i === Me ? (
3493
+ return $a.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : Vi.has(e) || e.includes("-") ? "attribute" : !Pt(i) && (Xi.has(e) || (i === yt ? !1 : i === Me ? (
3485
3494
  // When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
3486
3495
  Object.values(ht).some((r) => r.has(e))
3487
3496
  ) : ht[i]?.has(e) === !0)) ? Yt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === yt || i !== Me && ($t.has(i) || xt.has(i)) ? e in H.common.reflected || e in H.common.stringifiedReflected || e in H.common.stringifiedNonReflected ? "property" : Yt.has(e) ? "booleanAttribute" : "attribute" : "property";
@@ -3602,7 +3611,7 @@ function La(e, t) {
3602
3611
  if (!(typeof r == "object" && // If .map() callback has 3rd argument, it's not supported
3603
3612
  n.parameters.length <= 2))
3604
3613
  return t;
3605
- const c = be(n.body);
3614
+ const c = Se(n.body);
3606
3615
  let l = !0, d;
3607
3616
  if (hi(c))
3608
3617
  d = c;
@@ -3612,7 +3621,7 @@ function La(e, t) {
3612
3621
  const h = c.statements.at(-1);
3613
3622
  if (!(h && o.isReturnStatement(h) && h.expression))
3614
3623
  return t;
3615
- const E = be(h.expression);
3624
+ const E = Se(h.expression);
3616
3625
  if (!hi(E))
3617
3626
  return t;
3618
3627
  const $ = c.statements.slice(0, -1);
@@ -3708,7 +3717,7 @@ function B(e) {
3708
3717
  if (Na.has(e.kind))
3709
3718
  return [];
3710
3719
  {
3711
- const t = be(e);
3720
+ const t = Se(e);
3712
3721
  return t !== e ? B(t) : void 0;
3713
3722
  }
3714
3723
  }
@@ -3722,7 +3731,7 @@ const Na = /* @__PURE__ */ new Set([
3722
3731
  o.SyntaxKind.FalseKeyword,
3723
3732
  o.SyntaxKind.NullKeyword,
3724
3733
  o.SyntaxKind.TrueKeyword
3725
- ]), be = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? be(e.expression) : e, xn = (e, t) => o.isObjectBindingPattern(e) ? Ma(e, t) : e;
3734
+ ]), Se = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Se(e.expression) : e, xn = (e, t) => o.isObjectBindingPattern(e) ? Ma(e, t) : e;
3726
3735
  function Da(e, t, i) {
3727
3736
  if (e.every(_e, t))
3728
3737
  return t;
@@ -3787,7 +3796,7 @@ function q(e, t, i) {
3787
3796
  q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3788
3797
  e.transformationContext
3789
3798
  );
3790
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Je(be(i.right))) ? Ba(s) : s;
3799
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Je(Se(i.right))) ? Ba(s) : s;
3791
3800
  }
3792
3801
  function kn(e, t) {
3793
3802
  const i = In(e, t);
@@ -3823,12 +3832,12 @@ function In(e, t) {
3823
3832
  `JSX spread attribute syntax is not supported. See alternatives: https://qawebgis.esri.com/components/lumina/jsx#spread-attributes
3824
3833
  Found ${A.getText(e.sourceFile)}`
3825
3834
  );
3826
- const { name: x, initializer: b } = A;
3835
+ const { name: x, initializer: S } = A;
3827
3836
  if (o.isJsxNamespacedName(x))
3828
3837
  throw Error(`JSX namespaced attributes are not supported. Found ${x.getText(e.sourceFile)}`);
3829
- const C = x.text, L = Ta(b), F = L?.propType ?? Ea(C, b, c);
3838
+ const C = x.text, L = Ta(S), F = L?.propType ?? Ea(C, S, c);
3830
3839
  p?.delete(C);
3831
- const N = va[F](e, L?.initializer ?? b, C, c);
3840
+ const N = va[F](e, L?.initializer ?? S, C, c);
3832
3841
  if (N.length === 0)
3833
3842
  return [];
3834
3843
  const M = e.compiler.shouldMinifyJsx ? [" "] : Ia(Tn(x, e));
@@ -4116,7 +4125,7 @@ function Qa(e, t, i) {
4116
4125
  return;
4117
4126
  const s = te(i);
4118
4127
  throw Error(
4119
- S(
4128
+ b(
4120
4129
  "@arcgis/lumina:resolveTagName",
4121
4130
  `Unable to resolve the definition of the "${t}" custom element. Used in ${s}. If this is coming from an external package, make sure that package is installed as a peerDependency or a dependency. If in development-only you wish to use a component package that is defined as a devDependency, then provide serve.extraDependencies option to useLumina()`
4122
4131
  )
@@ -4128,7 +4137,7 @@ function Za(e, t) {
4128
4137
  return e.packageName === void 0 ? ce(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4129
4138
  }
4130
4139
  function Rn(e) {
4131
- return e._localDefinedComponents ??= bn(e.privateApiJson, {
4140
+ return e._localDefinedComponents ??= Sn(e.privateApiJson, {
4132
4141
  packageName: void 0,
4133
4142
  getImportPath() {
4134
4143
  throw new Error("Not supposed to be called for local components");
@@ -4325,12 +4334,12 @@ function cc(e, t, i, n, s) {
4325
4334
  }), r !== -1) {
4326
4335
  const c = lc(e, t, i, n), l = wi(t, r, n), d = sc(t, l, e, n, c);
4327
4336
  let p = !1;
4328
- return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, Si(t, l, r, p);
4337
+ return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, bi(t, l, r, p);
4329
4338
  } else if (a !== -1) {
4330
4339
  const c = wi(t, a, n), l = o.factory.createPropertyAssignment("state", o.factory.createTrue()), d = c.options === void 0 ? o.factory.createObjectLiteralExpression([l]) : o.factory.updateObjectLiteralExpression(c.options, [...c.options.properties, l]), p = Q(t.name);
4331
4340
  if (p === void 0)
4332
4341
  throw new Error("Failed to statically determine the state property name");
4333
- return s.set(p, d), Si(t, c, a, !0);
4342
+ return s.set(p, d), bi(t, c, a, !0);
4334
4343
  } else
4335
4344
  return t;
4336
4345
  }
@@ -4365,7 +4374,7 @@ function wi(e, t, i) {
4365
4374
  );
4366
4375
  return { decorator: n, callExpression: s, options: r };
4367
4376
  }
4368
- function Si(e, t, i, n) {
4377
+ function bi(e, t, i, n) {
4369
4378
  const s = n ? void 0 : o.factory.updateDecorator(
4370
4379
  t.decorator,
4371
4380
  o.factory.updateCallExpression(
@@ -4513,12 +4522,12 @@ async function fc(e, t) {
4513
4522
  })
4514
4523
  },
4515
4524
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
4516
- bi(s)
4525
+ Si(s)
4517
4526
  ];
4518
4527
  } else
4519
- return [bi(Lt(e, `${i}/assets/`))];
4528
+ return [Si(Lt(e, `${i}/assets/`))];
4520
4529
  }
4521
- const bi = (e) => ({
4530
+ const Si = (e) => ({
4522
4531
  // Not using join() because it would turn https:// into https:/
4523
4532
  cssHref: `${e}esri/themes/light/main.css`,
4524
4533
  // This is used be the theme switcher in `@arcgis/storybook-utils`
@@ -4574,7 +4583,7 @@ const hc = [
4574
4583
  return;
4575
4584
  }
4576
4585
  const n = e.getSourceFile(i, t);
4577
- await Se;
4586
+ await be;
4578
4587
  const r = o.transform(n, [
4579
4588
  (f) => () => zi(e, f, n, [
4580
4589
  ...e.options.types?.sourceFileTransformers ?? [],
@@ -4628,11 +4637,11 @@ function wc(e) {
4628
4637
  skipLibCheck: !0
4629
4638
  };
4630
4639
  }
4631
- function Sc(e) {
4640
+ function bc(e) {
4632
4641
  const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : ds(t ?? "tsconfig.json");
4633
4642
  if (i === void 0)
4634
4643
  throw Error(
4635
- S(
4644
+ b(
4636
4645
  "@arcgis/lumina:loadTypeScriptConfig",
4637
4646
  `Unable to find ${te(String(t))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`,
4638
4647
  process.cwd()
@@ -4659,7 +4668,7 @@ function On(e) {
4659
4668
  const t = e.target;
4660
4669
  if (t === void 0)
4661
4670
  throw Error(
4662
- S(
4671
+ b(
4663
4672
  "@arcgis/lumina:resolveTargetVersion",
4664
4673
  'TypeScript config must have a "target" property specified (or any parent tsconfig.json file if this config is extending another tsconfig.json)'
4665
4674
  )
@@ -4667,7 +4676,7 @@ function On(e) {
4667
4676
  const i = o.ScriptTarget[t].toLowerCase();
4668
4677
  return i === "latest" ? "esnext" : i;
4669
4678
  }
4670
- function bc(e, t) {
4679
+ function Sc(e, t) {
4671
4680
  if (e.isInStorybook && e.viteCommand === "serve") {
4672
4681
  const i = (a, c, l, ...d) => {
4673
4682
  const p = a.filter(
@@ -4711,7 +4720,7 @@ async function Tc(e, t, i) {
4711
4720
  if (typeof p == "string")
4712
4721
  return `<${d.tag} ${Object.entries(d.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${d.tag}>`;
4713
4722
  }
4714
- throw Error(S("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(d)}`));
4723
+ throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(d)}`));
4715
4724
  }).join(`
4716
4725
  `);
4717
4726
  await Promise.all(
@@ -4722,7 +4731,7 @@ async function Tc(e, t, i) {
4722
4731
  `;
4723
4732
  let E = v.indexOf("<style>");
4724
4733
  if (E === -1 && (E = v.indexOf("</head>")), E === -1)
4725
- throw Error(S("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
4734
+ throw Error(b("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
4726
4735
  const $ = v.slice(0, E) + w + v.slice(E), A = e.options?.build?.webApp?.transformFile?.($, y, e) ?? $;
4727
4736
  await D(y, A, "utf-8");
4728
4737
  })
@@ -4785,14 +4794,14 @@ async function Cc(e, t, i, n, s) {
4785
4794
  const r = e.environment;
4786
4795
  if (i.minify && s)
4787
4796
  throw Error(
4788
- S(
4797
+ b(
4789
4798
  U,
4790
4799
  "Unminified CDN build is not yet supported - open a feature request with Lumina maintainers if it is needed"
4791
4800
  )
4792
4801
  );
4793
4802
  if (i.sourcemap && s)
4794
4803
  throw Error(
4795
- S(
4804
+ b(
4796
4805
  U,
4797
4806
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
4798
4807
  )
@@ -4910,7 +4919,7 @@ function Pc(e, t) {
4910
4919
  continue;
4911
4920
  }
4912
4921
  if (r.out.startsWith(".") || r.out.startsWith("/"))
4913
- throw Error(S(U, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4922
+ throw Error(b(U, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4914
4923
  s.push(r.out);
4915
4924
  }
4916
4925
  i += `"${s.join(",")}".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));`;
@@ -4939,14 +4948,14 @@ function Wn(e, t) {
4939
4948
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4940
4949
  let c = 0;
4941
4950
  const l = e.code.matchAll(kc);
4942
- for (const b of l) {
4943
- const [C, L, F, N, M] = b, z = M.startsWith(He);
4944
- if (c !== 0 && c !== b.index) {
4945
- const K = e.code.slice(c, b.index);
4951
+ for (const S of l) {
4952
+ const [C, L, F, N, M] = S, z = M.startsWith(He);
4953
+ if (c !== 0 && c !== S.index) {
4954
+ const K = e.code.slice(c, S.index);
4946
4955
  s.push(K), a.push([c, K.length, 0, ""]);
4947
4956
  }
4948
- if (c = b.index + C.length, z)
4949
- a.push([b.index, C.length, 0, ""]), n.push(`"${_n(M.slice(He.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? F ?? N ?? "");
4957
+ if (c = S.index + C.length, z)
4958
+ a.push([S.index, C.length, 0, ""]), n.push(`"${_n(M.slice(He.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? F ?? N ?? "");
4950
4959
  else {
4951
4960
  const K = Bn(M, t), G = K?.isAsync === !0;
4952
4961
  if (L !== void 0) {
@@ -4957,14 +4966,14 @@ function Wn(e, t) {
4957
4966
  }
4958
4967
  if (G) {
4959
4968
  const et = K.oldSingleExportName === void 0 ? `{${ke.join(",")}}` : ke[0].split(":")[1];
4960
- a.push([b.index + 6, 0, L.length, et]);
4969
+ a.push([S.index + 6, 0, L.length, et]);
4961
4970
  }
4962
4971
  } else if (F === void 0 && N === void 0)
4963
- G && a.push([b.index + 6, 0, 0, ""]);
4972
+ G && a.push([S.index + 6, 0, 0, ""]);
4964
4973
  else {
4965
4974
  if (G)
4966
4975
  throw Error(
4967
- S(
4976
+ b(
4968
4977
  U,
4969
4978
  `Expected local import specifiers to use only named or side-effect import syntax. Found ${C} in a chunk:
4970
4979
  ${K.code}`
@@ -4980,8 +4989,8 @@ ${K.code}`
4980
4989
  }
4981
4990
  const d = Lc(r);
4982
4991
  let p = e.code.slice(0, c);
4983
- for (let b = a.length - 1; b >= 0; b--) {
4984
- const [C, L, F, N] = a[b];
4992
+ for (let S = a.length - 1; S >= 0; S--) {
4993
+ const [C, L, F, N] = a[S];
4985
4994
  let M = L, z = "";
4986
4995
  if (L === 0) {
4987
4996
  const G = d();
@@ -4992,18 +5001,18 @@ ${K.code}`
4992
5001
  const m = Ic.exec(e.code), f = m?.index ?? e.code.length;
4993
5002
  let g = "";
4994
5003
  if (m !== null) {
4995
- const b = m[1].split(",");
4996
- if (b.length > 1)
4997
- g = `return{${b.map((C) => {
5004
+ const S = m[1].split(",");
5005
+ if (S.length > 1)
5006
+ g = `return{${S.map((C) => {
4998
5007
  const [L, F = L] = C.split(" as ");
4999
5008
  return `${F}:${L}`;
5000
5009
  }).join(",")}}`;
5001
5010
  else {
5002
- const [C, L = C] = b[0].split(" as ");
5011
+ const [C, L = C] = S[0].split(" as ");
5003
5012
  e.oldSingleExportName = L, g = `return ${C}`;
5004
5013
  }
5005
5014
  }
5006
- const y = i.findLastIndex((b) => b.length > 0), v = i.slice(0, y + 1).join(","), w = `export default $arcgis.t(${i.length === 0 ? "_" : `([${v}])`}=>{`, E = n.join(","), $ = `${g}},${E})`;
5015
+ const y = i.findLastIndex((S) => S.length > 0), v = i.slice(0, y + 1).join(","), w = `export default $arcgis.t(${i.length === 0 ? "_" : `([${v}])`}=>{`, E = n.join(","), $ = `${g}},${E})`;
5007
5016
  let A = e.code.slice(c, f);
5008
5017
  A = `${s.join("")}${A}`, A = Ci(A, t);
5009
5018
  const x = `${p}${w}${A}${$}`;
@@ -5015,9 +5024,9 @@ function Bn(e, t) {
5015
5024
  return;
5016
5025
  const i = e.slice(2), n = t.get(i);
5017
5026
  if (n === void 0)
5018
- throw Error(S(U, `Failed to find the ${e} module`));
5027
+ throw Error(b(U, `Failed to find the ${e} module`));
5019
5028
  if (n.isAsync === void 0 && Wn(n, t), n.isAsync === void 0)
5020
- throw Error(S(U, `Failed to infer whether the ${e} module has top-level await`));
5029
+ throw Error(b(U, `Failed to infer whether the ${e} module has top-level await`));
5021
5030
  return n;
5022
5031
  }
5023
5032
  function Ci(e, t) {
@@ -5179,7 +5188,7 @@ async function Jc(e) {
5179
5188
  )).filter(j).flat(), r = await Promise.all([
5180
5189
  // This may contain an import map so must be first
5181
5190
  fc(i, t),
5182
- Se.then(s),
5191
+ be.then(s),
5183
5192
  qn(e).then(s)
5184
5193
  ]), a = u.join(e.dir.src, "loader.ts");
5185
5194
  return [
@@ -5203,10 +5212,10 @@ async function qn(e) {
5203
5212
  const t = e.options?.serve?.extraDependencies ?? [];
5204
5213
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
5205
5214
  t.map(async (i) => {
5206
- const n = typeof i == "string" ? void 0 : i, s = typeof i == "string" ? i : i.name, r = await Sn(s);
5215
+ const n = typeof i == "string" ? void 0 : i, s = typeof i == "string" ? i : i.name, r = await bn(s);
5207
5216
  if (r === void 0)
5208
5217
  throw Error(
5209
- S(
5218
+ b(
5210
5219
  "@arcgis/lumina:computeServeOnlyDependencies",
5211
5220
  `Unable to resolve extra dependency "${s}". Make sure it is a valid Stencil or Lumina package.`
5212
5221
  )
@@ -5237,7 +5246,7 @@ async function Kc(e) {
5237
5246
  ].join(`
5238
5247
  `);
5239
5248
  throw Error(
5240
- S(
5249
+ b(
5241
5250
  "@arcgis/lumina:buildTestSetupFile",
5242
5251
  `Unexpected loader type for the browser test environment: ${JSON.stringify(n)}`
5243
5252
  )
@@ -5362,10 +5371,10 @@ function _c(e) {
5362
5371
  });
5363
5372
  return d;
5364
5373
  }
5365
- const St = "@arcgis/lumina:provideAssets";
5374
+ const bt = "@arcgis/lumina:provideAssets";
5366
5375
  function ye(e, t, i = Mt) {
5367
5376
  if (e.viteCommand !== "serve")
5368
- throw Error(S(St, "serveAssets() is only available when Vite is running in serve mode"));
5377
+ throw Error(b(bt, "serveAssets() is only available when Vite is running in serve mode"));
5369
5378
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
5370
5379
  if (t.forEach((r) => {
5371
5380
  const a = Xn(r), c = Zn(e.dir, Qn(a)), l = Uc(e.viteConfig.base, c, e.dir.distCdn);
@@ -5376,7 +5385,7 @@ function ye(e, t, i = Mt) {
5376
5385
  p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ds.lookup(f) || "application/octet-stream"), p.write(w), p.end();
5377
5386
  }).catch((h) => {
5378
5387
  (a.type !== "directory" || process.env.DEBUG) && T.warn(
5379
- St,
5388
+ bt,
5380
5389
  `Error occurred when trying to serve a file in response to request for "${d.originalUrl ?? f}":${String(h)}`
5381
5390
  ), m();
5382
5391
  }), !0;
@@ -5433,8 +5442,8 @@ function Qn(e) {
5433
5442
  if (e.source.endsWith(u.sep)) {
5434
5443
  if (e.type === "file")
5435
5444
  throw Error(
5436
- S(
5437
- St,
5445
+ b(
5446
+ bt,
5438
5447
  `Unexpectedly tried to provide an asset with type "file", whose source looks like a directory: ${te(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 \\`
5439
5448
  )
5440
5449
  );
@@ -5517,7 +5526,7 @@ const ts = (e, t) => ({
5517
5526
  }
5518
5527
  const n = i.writeBundle;
5519
5528
  if (typeof n != "function")
5520
- throw Error(S(ut, "Expected vite:reporter to declare a writeBundle() function"));
5529
+ throw Error(b(ut, "Expected vite:reporter to declare a writeBundle() function"));
5521
5530
  i.writeBundle = async function(r, a) {
5522
5531
  let c = 0, l = 0, d = 0, p = 0;
5523
5532
  const m = console.log;
@@ -5663,7 +5672,7 @@ const ts = (e, t) => ({
5663
5672
  if (typeof l.setupFiles == "string" ? l.setupFiles = [...pt, l.setupFiles] : Array.isArray(l.setupFiles) ? l.setupFiles = [...pt, ...l.setupFiles] : l.setupFiles = [...pt], e.isInPuppeteerTestBackEnd) {
5664
5673
  if (p?.enabled === !0)
5665
5674
  throw Error(
5666
- S(Li, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5675
+ b(Li, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5667
5676
  );
5668
5677
  return {
5669
5678
  test: {
@@ -5740,13 +5749,13 @@ const ts = (e, t) => ({
5740
5749
  });
5741
5750
  function nl(e = R()) {
5742
5751
  const t = e.version ?? "0.0.1";
5743
- return bs(t);
5752
+ return Ss(t);
5744
5753
  }
5745
5754
  const sl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5746
5755
  Object.defineProperty(t, i, {
5747
5756
  get() {
5748
5757
  throw Error(
5749
- S(
5758
+ b(
5750
5759
  "@arcgis/lumina:context",
5751
5760
  `Tried to access '${String(i)}' before it was set. You can't access this property in global scope. However, it will be accessible by the time the following Vite plugin hook is called: ${e}`
5752
5761
  )
@@ -5767,7 +5776,7 @@ const sl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5767
5776
  function ue(e) {
5768
5777
  if (u.isAbsolute(e))
5769
5778
  throw Error(
5770
- S(
5779
+ b(
5771
5780
  "@arcgis/lumina:context",
5772
5781
  `Documentation file name was expected to be a relative path (relative to dist). Instead, received an absolute path: ${e}`
5773
5782
  )
@@ -5789,7 +5798,7 @@ async function ns(e, t, i, n, s = R()) {
5789
5798
  return !1;
5790
5799
  if (process.env.CI)
5791
5800
  throw Error(
5792
- S(
5801
+ b(
5793
5802
  "@arcgis/lumina:updateLuminaTs",
5794
5803
  `lumina.ts is out of date. Start the vite dev server or build locally at least once to update lumina.ts and commit the updated file. Tried to write the following content:
5795
5804
 
@@ -5898,7 +5907,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5898
5907
  return n.optimizableImports;
5899
5908
  if ("cssHref" in n)
5900
5909
  return [];
5901
- throw Error(S(Re, `Unexpected loader type: ${JSON.stringify(n)}`));
5910
+ throw Error(b(Re, `Unexpected loader type: ${JSON.stringify(n)}`));
5902
5911
  });
5903
5912
  e.viteConfig.optimizeDeps.include ??= [], e.viteConfig.optimizeDeps.include.push(...i);
5904
5913
  },
@@ -5907,7 +5916,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5907
5916
  }
5908
5917
  });
5909
5918
  async function ll(e) {
5910
- const i = (await Promise.all([Se, qn(e)])).flat();
5919
+ const i = (await Promise.all([be, qn(e)])).flat();
5911
5920
  if (!await ns(
5912
5921
  i,
5913
5922
  e.dir.src,
@@ -6008,7 +6017,7 @@ class P {
6008
6017
  distCdnAssets: v
6009
6018
  }, T.initialize(a.logger, l), a.root !== Mi())
6010
6019
  throw Error(
6011
- S(
6020
+ b(
6012
6021
  W,
6013
6022
  "Vite's config.root is not equal process.cwd(). This is not officially supported by Lumina and may lead to unexpected behavior. If you need this to be supported, comment on https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2126 or contact Lumina maintainers."
6014
6023
  )
@@ -6023,7 +6032,7 @@ class P {
6023
6032
  const h = this.options.documentation?.publicStoryUrlPrefix;
6024
6033
  this.isFullApiExtraction && typeof h == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await pl(this.componentStoryFiles, h)).then((w) => {
6025
6034
  this.componentStories = w;
6026
- }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), bc(this, a.build.sourcemap !== !1), ss(this) && Ee(this);
6035
+ }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), Sc(this, a.build.sourcemap !== !1), ss(this) && Ee(this);
6027
6036
  }
6028
6037
  },
6029
6038
  configureServer: {
@@ -6062,7 +6071,7 @@ class P {
6062
6071
  webTypes: s.jetBrains === !1 ? void 0 : s.jetBrains?.webTypesFileName ? ue(s.jetBrains.webTypesFileName) : me.webTypes,
6063
6072
  vsCodeHtml: s.vsCode === !1 ? void 0 : s.vsCode?.htmlFileName ? ue(s.vsCode.htmlFileName) : me.vsCodeHtml,
6064
6073
  vsCodeCss: s.vsCode === !1 ? void 0 : s.vsCode?.cssFileName ? ue(s.vsCode.cssFileName) : me.vsCodeCss
6065
- }, vn(void 0, t), this.componentFilesPromise = kt(this, u.resolve("src/components")), Sc(this);
6074
+ }, vn(void 0, t), this.componentFilesPromise = kt(this, u.resolve("src/components")), bc(this);
6066
6075
  const r = t.build?.preamble ?? nl();
6067
6076
  this.banner = sl(r);
6068
6077
  }
@@ -6086,7 +6095,7 @@ class P {
6086
6095
  return n;
6087
6096
  } else {
6088
6097
  if (this.viteCommand === "build" || this.isInStorybook)
6089
- throw Error(S(W, t, "Unable to find the TypeScript source file"));
6098
+ throw Error(b(W, t, "Unable to find the TypeScript source file"));
6090
6099
  {
6091
6100
  const r = this._typeScriptSourceFiles.get(t);
6092
6101
  r !== void 0 && r.text === i && (n = r);
@@ -6134,7 +6143,7 @@ class P {
6134
6143
  n === "serve" && ye(this, t, i);
6135
6144
  else
6136
6145
  throw Error(
6137
- S(
6146
+ b(
6138
6147
  W,
6139
6148
  "It is too late to call provideAssets() as Vite already wrote the bundle to disk. Please call provideAssets() before Vite's writeBundle()"
6140
6149
  )
@@ -6249,9 +6258,14 @@ const mt = "@arcgis/lumina:addNonLazyImports", wl = (e) => ({
6249
6258
  }), (a.length > 0 || c.length > 0) && d.length === 0) {
6250
6259
  const p = te(r);
6251
6260
  throw Error(
6252
- S(
6261
+ b(
6253
6262
  mt,
6254
- `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...c].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.`
6263
+ `Unable to determine what files imported ${p}. This is necessary because this file referenced other web components (${[...a, ...c].join(", ")}), and so the compiler needs to know what component entrypoints these imports should be added to. Please double check if you are referencing ${p} in the code dynamically in the way that Lumina cannot detect, and report this issue to the Lumina maintainers.
6264
+
6265
+ Possible causes:
6266
+ - You are re-exporting a functional component from a barrel file. Refactor such cases to import the functional component directly from the file that declares it.
6267
+ - Your web component file is not named correctly and is not recognized as a web component. Lumina web component must be written in an \`.tsx\` file inside the \`src/components/\` folder, and the component file name must match the immediate parent folder name (\`src/components/hello-world/hello-world.tsx\`).
6268
+ `
6255
6269
  )
6256
6270
  );
6257
6271
  }
@@ -6260,26 +6274,26 @@ const mt = "@arcgis/lumina:addNonLazyImports", wl = (e) => ({
6260
6274
  if (!n.has(r))
6261
6275
  return [];
6262
6276
  const l = u.dirname(r), d = ve(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
6263
- function m(b) {
6264
- const C = Qa(e, b, r);
6277
+ function m(S) {
6278
+ const C = Qa(e, S, r);
6265
6279
  if (C === void 0)
6266
6280
  return;
6267
6281
  const L = Za(C, p);
6268
6282
  if (L !== `./${p}`)
6269
6283
  return L.startsWith(".") ? `${L}/${Fi}` : L;
6270
6284
  }
6271
- const f = new Set(a), g = new Set(c), y = Array.from(f, m).filter(j), v = (b) => `import "${b}";
6272
- `, h = y.map(v).join(""), w = /* @__PURE__ */ new Set(), E = Array.from(g, (b) => {
6273
- const C = m(b);
6285
+ const f = new Set(a), g = new Set(c), y = Array.from(f, m).filter(j), v = (S) => `import "${S}";
6286
+ `, h = y.map(v).join(""), w = /* @__PURE__ */ new Set(), E = Array.from(g, (S) => {
6287
+ const C = m(S);
6274
6288
  if (C !== void 0) {
6275
- if (f.has(b)) {
6289
+ if (f.has(S)) {
6276
6290
  T.warn(
6277
6291
  mt,
6278
- `"${b}" is used both with and without deferLoad in ${r} (either directly in ${r} or via a functional component). deferLoad will be ignored in this case.`
6292
+ `"${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.`
6279
6293
  );
6280
6294
  return;
6281
6295
  }
6282
- return w.add(v(C)), `.set("${b}", () => import("${C}"))
6296
+ return w.add(v(C)), `.set("${S}", () => import("${C}"))
6283
6297
  `;
6284
6298
  }
6285
6299
  }).filter(j), $ = `${h}export * from "./${Et}";`, A = Array.from(w).join("") + $, x = E.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
@@ -6287,12 +6301,12 @@ ${$}
6287
6301
  deferredLoaders${E.join("")};` : $;
6288
6302
  return [
6289
6303
  D(u.join(e.dir.dist, p, Fi), x),
6290
- D(u.join(e.dir.dist, p, Sl), A)
6304
+ D(u.join(e.dir.dist, p, bl), A)
6291
6305
  ];
6292
6306
  });
6293
6307
  await Promise.all(s);
6294
6308
  }
6295
- }), Fi = "index.js", Sl = "index.d.ts", rs = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), rs(e, e[s].referencedBy, i, n))), bl = (e) => ({
6309
+ }), Fi = "index.js", bl = "index.d.ts", rs = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), rs(e, e[s].referencedBy, i, n))), Sl = (e) => ({
6296
6310
  name: "@arcgis/lumina:handleDynamicAssets",
6297
6311
  configureServer(t) {
6298
6312
  e.server = t, !e.isInPuppeteerTestBackEnd && Ni(e).forEach(({ assets: i, transformers: n }) => ye(e, i, n));
@@ -6311,12 +6325,12 @@ function Ni(e) {
6311
6325
  "type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
6312
6326
  }), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
6313
6327
  }
6314
- const bt = "@arcgis/lumina:updatePackageJson", Tl = (e) => ({
6315
- name: bt,
6328
+ const St = "@arcgis/lumina:updatePackageJson", Tl = (e) => ({
6329
+ name: St,
6316
6330
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
6317
6331
  configResolved() {
6318
6332
  El(e).catch(
6319
- (t) => T.error(bt, `Failed to update package's package.json:${String(t)}`)
6333
+ (t) => T.error(St, `Failed to update package's package.json:${String(t)}`)
6320
6334
  );
6321
6335
  }
6322
6336
  });
@@ -6328,7 +6342,7 @@ function Cl(e, t) {
6328
6342
  const i = e?.devDependencies ?? {};
6329
6343
  Object.keys(e?.peerDependencies ?? {}).forEach((d) => {
6330
6344
  d in i || T.warn(
6331
- bt,
6345
+ St,
6332
6346
  `Every peerDependency should also be a devDependency, or else some tools will get confused (like Turbo Build). Found "${d}" that is not a devDependency. Please edit your package.json`
6333
6347
  );
6334
6348
  });
@@ -6920,7 +6934,7 @@ function Id(e = {}) {
6920
6934
  vc(t),
6921
6935
  To(t),
6922
6936
  Gc(t),
6923
- bl(t),
6937
+ Sl(t),
6924
6938
  wl(t),
6925
6939
  cl(t),
6926
6940
  Rs(t),
@@ -65,6 +65,7 @@ export type LuminaOptions = {
65
65
  readonly assets?: AssetHandlingOptions;
66
66
  readonly linting?: LintingOptions;
67
67
  readonly experimental?: {
68
+ /** @deprecated See https://discord.com/channels/1012791295170859069/1047015641225371718 */
68
69
  readonly stabilizeRef?: boolean;
69
70
  };
70
71
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/lumina-compiler",
3
- "version": "4.34.0-next.85",
3
+ "version": "4.34.0-next.88",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -18,9 +18,9 @@
18
18
  ],
19
19
  "license": "SEE LICENSE IN LICENSE.md",
20
20
  "dependencies": {
21
- "@arcgis/api-extractor": "4.34.0-next.85",
22
- "@arcgis/components-build-utils": "4.34.0-next.85",
23
- "@arcgis/toolkit": "4.34.0-next.85",
21
+ "@arcgis/api-extractor": "4.34.0-next.88",
22
+ "@arcgis/components-build-utils": "4.34.0-next.88",
23
+ "@arcgis/toolkit": "4.34.0-next.88",
24
24
  "chalk": "^5.4.1",
25
25
  "esbuild": "^0.25.5",
26
26
  "glob": "^11.0.3",
@@ -31,7 +31,7 @@
31
31
  "vitest-fail-on-console": "^0.7.1"
32
32
  },
33
33
  "peerDependencies": {
34
- "@arcgis/lumina": "~4.34.0-next.85",
34
+ "@arcgis/lumina": "~4.34.0-next.88",
35
35
  "lit": "^3.3.0",
36
36
  "typescript": "~5.8.3",
37
37
  "vite": "^7.0.0",