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

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";
@@ -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,
@@ -2121,19 +2121,19 @@ const uo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, mo = /\n\s+\
2121
2121
  repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
2122
2122
  ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
2123
2123
  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) => ({
2124
+ }, 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
2125
  name: V,
2126
2126
  enforce: "pre",
2127
2127
  configResolved(t) {
2128
2128
  const i = t.plugins.find(({ name: s }) => s === "vite:css-post");
2129
2129
  if (i === void 0)
2130
- throw Error(S(V, "Unable to find the vite's built-in vite:css-post plugin"));
2130
+ throw Error(b(V, "Unable to find the vite's built-in vite:css-post plugin"));
2131
2131
  const n = i.transform;
2132
2132
  if (typeof n != "object" || typeof n.handler != "function")
2133
- throw Error(S(V, "Expected vite:css-post to declare a transform:{handler()} property"));
2133
+ throw Error(b(V, "Expected vite:css-post to declare a transform:{handler()} property"));
2134
2134
  if (Object.keys(n).length !== 1)
2135
2135
  throw Error(
2136
- S(V, "Expected vite:css-post's transform handler to have only a single property: handler")
2136
+ b(V, "Expected vite:css-post's transform handler to have only a single property: handler")
2137
2137
  );
2138
2138
  i.transform = async function(r, a) {
2139
2139
  const c = a.endsWith(ee);
@@ -2188,14 +2188,14 @@ const uo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, mo = /\n\s+\
2188
2188
  let s = 0;
2189
2189
  const r = co(i);
2190
2190
  let a = !1;
2191
- const c = t.replaceAll(So, (l, d) => {
2191
+ const c = t.replaceAll(bo, (l, d) => {
2192
2192
  if (!Ke.test(d) || d.includes("?"))
2193
2193
  return l;
2194
2194
  if (r) {
2195
- if ((e.options.css?.sideEffectImportHandling ?? bo)(d, i) === "drop")
2195
+ if ((e.options.css?.sideEffectImportHandling ?? So)(d, i) === "drop")
2196
2196
  return a = !0, or(l);
2197
2197
  throw Error(
2198
- S(
2198
+ b(
2199
2199
  V,
2200
2200
  `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
2201
  i
@@ -2219,7 +2219,7 @@ const uo = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, mo = /\n\s+\
2219
2219
  if (d.endsWith(Ne))
2220
2220
  return l;
2221
2221
  throw Error(
2222
- S(
2222
+ b(
2223
2223
  V,
2224
2224
  `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
2225
  i
@@ -2419,14 +2419,14 @@ function zo(e, t, i) {
2419
2419
  if (s !== void 0) {
2420
2420
  if (!o.isObjectLiteralExpression(s))
2421
2421
  throw Error(
2422
- S(
2422
+ b(
2423
2423
  "@arcgis/lumina:extractEventMeta",
2424
2424
  `Expected object literal expression as first argument of ${Ae}(). Found ${t.name} = createEvent(${s.getText(i)})`
2425
2425
  )
2426
2426
  );
2427
2427
  if (s.properties.some((r) => o.isSpreadAssignment(r)))
2428
2428
  throw Error(
2429
- S(
2429
+ b(
2430
2430
  "@arcgis/lumina:extractEventMeta",
2431
2431
  `Unexpected spread syntax in ${Ae}() argument. ${Ae}() arguments must be statically parsable at compile time`
2432
2432
  )
@@ -2441,7 +2441,7 @@ function re(e, t) {
2441
2441
  if (e.kind === o.SyntaxKind.FalseKeyword)
2442
2442
  return !1;
2443
2443
  throw Error(
2444
- S(
2444
+ b(
2445
2445
  "@arcgis/lumina:extractBooleanInitializer",
2446
2446
  `Expected boolean literal. Instead found ${e?.getText(t)}`
2447
2447
  )
@@ -2507,7 +2507,7 @@ class We extends us {
2507
2507
  * prefix (Arcgis), where as tag name always does. This also matches
2508
2508
  * Stencil's behavior.
2509
2509
  */
2510
- pascalCaseName: Ss(n),
2510
+ pascalCaseName: bs(n),
2511
2511
  privacy: void 0,
2512
2512
  importPath: "",
2513
2513
  members: [],
@@ -2520,7 +2520,7 @@ class We extends us {
2520
2520
  }, r = t.heritageClauses?.find((a) => a.token === o.SyntaxKind.ExtendsKeyword)?.types[0]?.expression;
2521
2521
  if (r === void 0)
2522
2522
  throw Error(
2523
- S(
2523
+ b(
2524
2524
  "@arcgis/lumina:extractComponentDeclaration",
2525
2525
  `Lumina component must extend LitElement class. Found ${i} in ${this.apiModule.path} that does not extend any class.`
2526
2526
  )
@@ -2676,10 +2676,10 @@ console.log("${s.tagName} is ready to go!");
2676
2676
  x.docsTags = x.docsTags.filter(
2677
2677
  (C) => !c.has(C.name) || fs.has(C.name)
2678
2678
  );
2679
- const b = i.description;
2679
+ const S = i.description;
2680
2680
  fe(t.name, s, i, x), x.docsTags.forEach((C) => {
2681
2681
  c.add(C.name);
2682
- }), i.description = b ?? i.description;
2682
+ }), i.description = S ?? i.description;
2683
2683
  } else
2684
2684
  i.description ||= x.description;
2685
2685
  }
@@ -2687,8 +2687,8 @@ console.log("${s.tagName} is ready to go!");
2687
2687
  E.forEach((x) => {
2688
2688
  if ($ ??= o.isGetAccessor(x) ? x : void 0, A ??= o.isSetAccessor(x) ? x : void 0, !("initializer" in x))
2689
2689
  return;
2690
- const b = x;
2691
- l ||= b.modifiers?.some((C) => C.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Bt(b, i, b.getSourceFile());
2690
+ const S = x;
2691
+ l ||= S.modifiers?.some((C) => C.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, Bt(S, i, S.getSourceFile());
2692
2692
  }), g && $ !== void 0 && A !== void 0 && $.type?.getText() !== A.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${v.getText(this.file)}` });
2693
2693
  }
2694
2694
  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 +2988,12 @@ async function na(e, t) {
2988
2988
  );
2989
2989
  }
2990
2990
  async function vn(e, t) {
2991
- return Se ??= ra(e, t), await Se;
2991
+ return be ??= ra(e, t), await be;
2992
2992
  }
2993
2993
  function sa() {
2994
2994
  if (Be === void 0)
2995
2995
  throw Error(
2996
- S(
2996
+ b(
2997
2997
  "@arcgis/lumina:retrieveComponentDependencies",
2998
2998
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
2999
2999
  )
@@ -3003,7 +3003,7 @@ function sa() {
3003
3003
  function wn() {
3004
3004
  if (vt === void 0)
3005
3005
  throw Error(
3006
- S(
3006
+ b(
3007
3007
  "@arcgis/lumina:retrieveFlatComponentDependencies",
3008
3008
  "Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
3009
3009
  )
@@ -3012,7 +3012,7 @@ function wn() {
3012
3012
  }
3013
3013
  async function ra(e, t) {
3014
3014
  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))
3015
+ [...Object.keys(n), ...Object.keys(s)].filter((d) => !oa.has(d)).flatMap(async (d) => await bn(d, e))
3016
3016
  )).filter(j);
3017
3017
  Be ??= a, vt = Object.fromEntries(a.flatMap((d) => Object.entries(d.components)));
3018
3018
  const c = t?.serve?.extraDependencies?.map(
@@ -3056,8 +3056,8 @@ const oa = /* @__PURE__ */ new Set([
3056
3056
  "vscode-languageserver-textdocument",
3057
3057
  "vscode-languageserver-types"
3058
3058
  ]);
3059
- let Be, vt, Se;
3060
- async function Sn(e, t) {
3059
+ let Be, vt, be;
3060
+ async function bn(e, t) {
3061
3061
  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
3062
  if (a ? await _(c) : !1) {
3063
3063
  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 +3071,7 @@ Error: ${String(E)}`);
3071
3071
  }
3072
3072
  const d = ui(n.customElements);
3073
3073
  if (d != null) {
3074
- const g = u.join(i, d), y = JSON.parse(await J(g, "utf-8")), v = ca(y), h = bn(y, {
3074
+ const g = u.join(i, d), y = JSON.parse(await J(g, "utf-8")), v = ca(y), h = Sn(y, {
3075
3075
  packageName: e,
3076
3076
  getImportPath: r
3077
3077
  });
@@ -3100,7 +3100,7 @@ function aa(e, t) {
3100
3100
  const i = e.indexOf(t);
3101
3101
  return i === -1 ? -1 : i + t.length;
3102
3102
  }
3103
- function bn(e, t) {
3103
+ function Sn(e, t) {
3104
3104
  const i = {};
3105
3105
  for (const n of e.modules ?? [])
3106
3106
  if (n.declarations !== void 0)
@@ -3277,7 +3277,7 @@ const ya = /* @__PURE__ */ new Set([
3277
3277
  p,
3278
3278
  e,
3279
3279
  m ? "" : void 0
3280
- ), y = i === "value" && (n === "input" || n === "textarea" || n === Me) ? ba(f, e) : f;
3280
+ ), y = i === "value" && (n === "input" || n === "textarea" || n === Me) ? Sa(f, e) : f;
3281
3281
  if (y !== p)
3282
3282
  return [m ? `.${i}` : s.name, d, y];
3283
3283
  }
@@ -3444,7 +3444,7 @@ function gi(e, t, i) {
3444
3444
  `${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
3445
3445
  );
3446
3446
  const n = t.expression;
3447
- if (Sa(n)) {
3447
+ if (ba(n)) {
3448
3448
  const r = i === "class" ? "safeClassMap" : "safeStyleMap";
3449
3449
  e.neededImports.add(r);
3450
3450
  const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
@@ -3454,8 +3454,8 @@ function gi(e, t, i) {
3454
3454
  } else
3455
3455
  return [i, ...De(e, t, !0)];
3456
3456
  }
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) {
3457
+ const ba = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
3458
+ function Sa(e, t) {
3459
3459
  t.neededImports.add("live");
3460
3460
  const i = t.importRenames.live;
3461
3461
  return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
@@ -3602,7 +3602,7 @@ function La(e, t) {
3602
3602
  if (!(typeof r == "object" && // If .map() callback has 3rd argument, it's not supported
3603
3603
  n.parameters.length <= 2))
3604
3604
  return t;
3605
- const c = be(n.body);
3605
+ const c = Se(n.body);
3606
3606
  let l = !0, d;
3607
3607
  if (hi(c))
3608
3608
  d = c;
@@ -3612,7 +3612,7 @@ function La(e, t) {
3612
3612
  const h = c.statements.at(-1);
3613
3613
  if (!(h && o.isReturnStatement(h) && h.expression))
3614
3614
  return t;
3615
- const E = be(h.expression);
3615
+ const E = Se(h.expression);
3616
3616
  if (!hi(E))
3617
3617
  return t;
3618
3618
  const $ = c.statements.slice(0, -1);
@@ -3708,7 +3708,7 @@ function B(e) {
3708
3708
  if (Na.has(e.kind))
3709
3709
  return [];
3710
3710
  {
3711
- const t = be(e);
3711
+ const t = Se(e);
3712
3712
  return t !== e ? B(t) : void 0;
3713
3713
  }
3714
3714
  }
@@ -3722,7 +3722,7 @@ const Na = /* @__PURE__ */ new Set([
3722
3722
  o.SyntaxKind.FalseKeyword,
3723
3723
  o.SyntaxKind.NullKeyword,
3724
3724
  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;
3725
+ ]), 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
3726
  function Da(e, t, i) {
3727
3727
  if (e.every(_e, t))
3728
3728
  return t;
@@ -3787,7 +3787,7 @@ function q(e, t, i) {
3787
3787
  q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
3788
3788
  e.transformationContext
3789
3789
  );
3790
- return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Je(be(i.right))) ? Ba(s) : s;
3790
+ return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Je(Se(i.right))) ? Ba(s) : s;
3791
3791
  }
3792
3792
  function kn(e, t) {
3793
3793
  const i = In(e, t);
@@ -3823,12 +3823,12 @@ function In(e, t) {
3823
3823
  `JSX spread attribute syntax is not supported. See alternatives: https://qawebgis.esri.com/components/lumina/jsx#spread-attributes
3824
3824
  Found ${A.getText(e.sourceFile)}`
3825
3825
  );
3826
- const { name: x, initializer: b } = A;
3826
+ const { name: x, initializer: S } = A;
3827
3827
  if (o.isJsxNamespacedName(x))
3828
3828
  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);
3829
+ const C = x.text, L = Ta(S), F = L?.propType ?? Ea(C, S, c);
3830
3830
  p?.delete(C);
3831
- const N = va[F](e, L?.initializer ?? b, C, c);
3831
+ const N = va[F](e, L?.initializer ?? S, C, c);
3832
3832
  if (N.length === 0)
3833
3833
  return [];
3834
3834
  const M = e.compiler.shouldMinifyJsx ? [" "] : Ia(Tn(x, e));
@@ -4116,7 +4116,7 @@ function Qa(e, t, i) {
4116
4116
  return;
4117
4117
  const s = te(i);
4118
4118
  throw Error(
4119
- S(
4119
+ b(
4120
4120
  "@arcgis/lumina:resolveTagName",
4121
4121
  `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
4122
  )
@@ -4128,7 +4128,7 @@ function Za(e, t) {
4128
4128
  return e.packageName === void 0 ? ce(t, e.moduleName) : u.join(e.packageName, e.moduleName);
4129
4129
  }
4130
4130
  function Rn(e) {
4131
- return e._localDefinedComponents ??= bn(e.privateApiJson, {
4131
+ return e._localDefinedComponents ??= Sn(e.privateApiJson, {
4132
4132
  packageName: void 0,
4133
4133
  getImportPath() {
4134
4134
  throw new Error("Not supposed to be called for local components");
@@ -4325,12 +4325,12 @@ function cc(e, t, i, n, s) {
4325
4325
  }), r !== -1) {
4326
4326
  const c = lc(e, t, i, n), l = wi(t, r, n), d = sc(t, l, e, n, c);
4327
4327
  let p = !1;
4328
- return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, Si(t, l, r, p);
4328
+ return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, bi(t, l, r, p);
4329
4329
  } else if (a !== -1) {
4330
4330
  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
4331
  if (p === void 0)
4332
4332
  throw new Error("Failed to statically determine the state property name");
4333
- return s.set(p, d), Si(t, c, a, !0);
4333
+ return s.set(p, d), bi(t, c, a, !0);
4334
4334
  } else
4335
4335
  return t;
4336
4336
  }
@@ -4365,7 +4365,7 @@ function wi(e, t, i) {
4365
4365
  );
4366
4366
  return { decorator: n, callExpression: s, options: r };
4367
4367
  }
4368
- function Si(e, t, i, n) {
4368
+ function bi(e, t, i, n) {
4369
4369
  const s = n ? void 0 : o.factory.updateDecorator(
4370
4370
  t.decorator,
4371
4371
  o.factory.updateCallExpression(
@@ -4513,12 +4513,12 @@ async function fc(e, t) {
4513
4513
  })
4514
4514
  },
4515
4515
  // <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
4516
- bi(s)
4516
+ Si(s)
4517
4517
  ];
4518
4518
  } else
4519
- return [bi(Lt(e, `${i}/assets/`))];
4519
+ return [Si(Lt(e, `${i}/assets/`))];
4520
4520
  }
4521
- const bi = (e) => ({
4521
+ const Si = (e) => ({
4522
4522
  // Not using join() because it would turn https:// into https:/
4523
4523
  cssHref: `${e}esri/themes/light/main.css`,
4524
4524
  // This is used be the theme switcher in `@arcgis/storybook-utils`
@@ -4574,7 +4574,7 @@ const hc = [
4574
4574
  return;
4575
4575
  }
4576
4576
  const n = e.getSourceFile(i, t);
4577
- await Se;
4577
+ await be;
4578
4578
  const r = o.transform(n, [
4579
4579
  (f) => () => zi(e, f, n, [
4580
4580
  ...e.options.types?.sourceFileTransformers ?? [],
@@ -4628,11 +4628,11 @@ function wc(e) {
4628
4628
  skipLibCheck: !0
4629
4629
  };
4630
4630
  }
4631
- function Sc(e) {
4631
+ function bc(e) {
4632
4632
  const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : ds(t ?? "tsconfig.json");
4633
4633
  if (i === void 0)
4634
4634
  throw Error(
4635
- S(
4635
+ b(
4636
4636
  "@arcgis/lumina:loadTypeScriptConfig",
4637
4637
  `Unable to find ${te(String(t))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`,
4638
4638
  process.cwd()
@@ -4659,7 +4659,7 @@ function On(e) {
4659
4659
  const t = e.target;
4660
4660
  if (t === void 0)
4661
4661
  throw Error(
4662
- S(
4662
+ b(
4663
4663
  "@arcgis/lumina:resolveTargetVersion",
4664
4664
  'TypeScript config must have a "target" property specified (or any parent tsconfig.json file if this config is extending another tsconfig.json)'
4665
4665
  )
@@ -4667,7 +4667,7 @@ function On(e) {
4667
4667
  const i = o.ScriptTarget[t].toLowerCase();
4668
4668
  return i === "latest" ? "esnext" : i;
4669
4669
  }
4670
- function bc(e, t) {
4670
+ function Sc(e, t) {
4671
4671
  if (e.isInStorybook && e.viteCommand === "serve") {
4672
4672
  const i = (a, c, l, ...d) => {
4673
4673
  const p = a.filter(
@@ -4711,7 +4711,7 @@ async function Tc(e, t, i) {
4711
4711
  if (typeof p == "string")
4712
4712
  return `<${d.tag} ${Object.entries(d.attrs ?? {}).map(([m, f]) => `${m}="${f}"`).join(" ")}>${p}</${d.tag}>`;
4713
4713
  }
4714
- throw Error(S("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(d)}`));
4714
+ throw Error(b("@arcgis/lumina:buildWebApp", `Unsupported loader type: ${JSON.stringify(d)}`));
4715
4715
  }).join(`
4716
4716
  `);
4717
4717
  await Promise.all(
@@ -4722,7 +4722,7 @@ async function Tc(e, t, i) {
4722
4722
  `;
4723
4723
  let E = v.indexOf("<style>");
4724
4724
  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}`));
4725
+ throw Error(b("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
4726
4726
  const $ = v.slice(0, E) + w + v.slice(E), A = e.options?.build?.webApp?.transformFile?.($, y, e) ?? $;
4727
4727
  await D(y, A, "utf-8");
4728
4728
  })
@@ -4785,14 +4785,14 @@ async function Cc(e, t, i, n, s) {
4785
4785
  const r = e.environment;
4786
4786
  if (i.minify && s)
4787
4787
  throw Error(
4788
- S(
4788
+ b(
4789
4789
  U,
4790
4790
  "Unminified CDN build is not yet supported - open a feature request with Lumina maintainers if it is needed"
4791
4791
  )
4792
4792
  );
4793
4793
  if (i.sourcemap && s)
4794
4794
  throw Error(
4795
- S(
4795
+ b(
4796
4796
  U,
4797
4797
  "Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
4798
4798
  )
@@ -4910,7 +4910,7 @@ function Pc(e, t) {
4910
4910
  continue;
4911
4911
  }
4912
4912
  if (r.out.startsWith(".") || r.out.startsWith("/"))
4913
- throw Error(S(U, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4913
+ throw Error(b(U, `CDN entrypoint path must not start with '.' or '/'. Found: ${r.out}`));
4914
4914
  s.push(r.out);
4915
4915
  }
4916
4916
  i += `"${s.join(",")}".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));`;
@@ -4939,14 +4939,14 @@ function Wn(e, t) {
4939
4939
  const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
4940
4940
  let c = 0;
4941
4941
  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);
4942
+ for (const S of l) {
4943
+ const [C, L, F, N, M] = S, z = M.startsWith(He);
4944
+ if (c !== 0 && c !== S.index) {
4945
+ const K = e.code.slice(c, S.index);
4946
4946
  s.push(K), a.push([c, K.length, 0, ""]);
4947
4947
  }
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 ?? "");
4948
+ if (c = S.index + C.length, z)
4949
+ a.push([S.index, C.length, 0, ""]), n.push(`"${_n(M.slice(He.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? F ?? N ?? "");
4950
4950
  else {
4951
4951
  const K = Bn(M, t), G = K?.isAsync === !0;
4952
4952
  if (L !== void 0) {
@@ -4957,14 +4957,14 @@ function Wn(e, t) {
4957
4957
  }
4958
4958
  if (G) {
4959
4959
  const et = K.oldSingleExportName === void 0 ? `{${ke.join(",")}}` : ke[0].split(":")[1];
4960
- a.push([b.index + 6, 0, L.length, et]);
4960
+ a.push([S.index + 6, 0, L.length, et]);
4961
4961
  }
4962
4962
  } else if (F === void 0 && N === void 0)
4963
- G && a.push([b.index + 6, 0, 0, ""]);
4963
+ G && a.push([S.index + 6, 0, 0, ""]);
4964
4964
  else {
4965
4965
  if (G)
4966
4966
  throw Error(
4967
- S(
4967
+ b(
4968
4968
  U,
4969
4969
  `Expected local import specifiers to use only named or side-effect import syntax. Found ${C} in a chunk:
4970
4970
  ${K.code}`
@@ -4980,8 +4980,8 @@ ${K.code}`
4980
4980
  }
4981
4981
  const d = Lc(r);
4982
4982
  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];
4983
+ for (let S = a.length - 1; S >= 0; S--) {
4984
+ const [C, L, F, N] = a[S];
4985
4985
  let M = L, z = "";
4986
4986
  if (L === 0) {
4987
4987
  const G = d();
@@ -4992,18 +4992,18 @@ ${K.code}`
4992
4992
  const m = Ic.exec(e.code), f = m?.index ?? e.code.length;
4993
4993
  let g = "";
4994
4994
  if (m !== null) {
4995
- const b = m[1].split(",");
4996
- if (b.length > 1)
4997
- g = `return{${b.map((C) => {
4995
+ const S = m[1].split(",");
4996
+ if (S.length > 1)
4997
+ g = `return{${S.map((C) => {
4998
4998
  const [L, F = L] = C.split(" as ");
4999
4999
  return `${F}:${L}`;
5000
5000
  }).join(",")}}`;
5001
5001
  else {
5002
- const [C, L = C] = b[0].split(" as ");
5002
+ const [C, L = C] = S[0].split(" as ");
5003
5003
  e.oldSingleExportName = L, g = `return ${C}`;
5004
5004
  }
5005
5005
  }
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})`;
5006
+ 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
5007
  let A = e.code.slice(c, f);
5008
5008
  A = `${s.join("")}${A}`, A = Ci(A, t);
5009
5009
  const x = `${p}${w}${A}${$}`;
@@ -5015,9 +5015,9 @@ function Bn(e, t) {
5015
5015
  return;
5016
5016
  const i = e.slice(2), n = t.get(i);
5017
5017
  if (n === void 0)
5018
- throw Error(S(U, `Failed to find the ${e} module`));
5018
+ throw Error(b(U, `Failed to find the ${e} module`));
5019
5019
  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`));
5020
+ throw Error(b(U, `Failed to infer whether the ${e} module has top-level await`));
5021
5021
  return n;
5022
5022
  }
5023
5023
  function Ci(e, t) {
@@ -5179,7 +5179,7 @@ async function Jc(e) {
5179
5179
  )).filter(j).flat(), r = await Promise.all([
5180
5180
  // This may contain an import map so must be first
5181
5181
  fc(i, t),
5182
- Se.then(s),
5182
+ be.then(s),
5183
5183
  qn(e).then(s)
5184
5184
  ]), a = u.join(e.dir.src, "loader.ts");
5185
5185
  return [
@@ -5203,10 +5203,10 @@ async function qn(e) {
5203
5203
  const t = e.options?.serve?.extraDependencies ?? [];
5204
5204
  return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
5205
5205
  t.map(async (i) => {
5206
- const n = typeof i == "string" ? void 0 : i, s = typeof i == "string" ? i : i.name, r = await Sn(s);
5206
+ const n = typeof i == "string" ? void 0 : i, s = typeof i == "string" ? i : i.name, r = await bn(s);
5207
5207
  if (r === void 0)
5208
5208
  throw Error(
5209
- S(
5209
+ b(
5210
5210
  "@arcgis/lumina:computeServeOnlyDependencies",
5211
5211
  `Unable to resolve extra dependency "${s}". Make sure it is a valid Stencil or Lumina package.`
5212
5212
  )
@@ -5237,7 +5237,7 @@ async function Kc(e) {
5237
5237
  ].join(`
5238
5238
  `);
5239
5239
  throw Error(
5240
- S(
5240
+ b(
5241
5241
  "@arcgis/lumina:buildTestSetupFile",
5242
5242
  `Unexpected loader type for the browser test environment: ${JSON.stringify(n)}`
5243
5243
  )
@@ -5362,10 +5362,10 @@ function _c(e) {
5362
5362
  });
5363
5363
  return d;
5364
5364
  }
5365
- const St = "@arcgis/lumina:provideAssets";
5365
+ const bt = "@arcgis/lumina:provideAssets";
5366
5366
  function ye(e, t, i = Mt) {
5367
5367
  if (e.viteCommand !== "serve")
5368
- throw Error(S(St, "serveAssets() is only available when Vite is running in serve mode"));
5368
+ throw Error(b(bt, "serveAssets() is only available when Vite is running in serve mode"));
5369
5369
  const n = e._serverConfigured, s = e.server.middlewares.stack.length;
5370
5370
  if (t.forEach((r) => {
5371
5371
  const a = Xn(r), c = Zn(e.dir, Qn(a)), l = Uc(e.viteConfig.base, c, e.dir.distCdn);
@@ -5376,7 +5376,7 @@ function ye(e, t, i = Mt) {
5376
5376
  p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ds.lookup(f) || "application/octet-stream"), p.write(w), p.end();
5377
5377
  }).catch((h) => {
5378
5378
  (a.type !== "directory" || process.env.DEBUG) && T.warn(
5379
- St,
5379
+ bt,
5380
5380
  `Error occurred when trying to serve a file in response to request for "${d.originalUrl ?? f}":${String(h)}`
5381
5381
  ), m();
5382
5382
  }), !0;
@@ -5433,8 +5433,8 @@ function Qn(e) {
5433
5433
  if (e.source.endsWith(u.sep)) {
5434
5434
  if (e.type === "file")
5435
5435
  throw Error(
5436
- S(
5437
- St,
5436
+ b(
5437
+ bt,
5438
5438
  `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
5439
  )
5440
5440
  );
@@ -5517,7 +5517,7 @@ const ts = (e, t) => ({
5517
5517
  }
5518
5518
  const n = i.writeBundle;
5519
5519
  if (typeof n != "function")
5520
- throw Error(S(ut, "Expected vite:reporter to declare a writeBundle() function"));
5520
+ throw Error(b(ut, "Expected vite:reporter to declare a writeBundle() function"));
5521
5521
  i.writeBundle = async function(r, a) {
5522
5522
  let c = 0, l = 0, d = 0, p = 0;
5523
5523
  const m = console.log;
@@ -5663,7 +5663,7 @@ const ts = (e, t) => ({
5663
5663
  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
5664
  if (p?.enabled === !0)
5665
5665
  throw Error(
5666
- S(Li, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5666
+ b(Li, "Can't enable both Vitest browser mode and Puppeteer testing at the same time")
5667
5667
  );
5668
5668
  return {
5669
5669
  test: {
@@ -5740,13 +5740,13 @@ const ts = (e, t) => ({
5740
5740
  });
5741
5741
  function nl(e = R()) {
5742
5742
  const t = e.version ?? "0.0.1";
5743
- return bs(t);
5743
+ return Ss(t);
5744
5744
  }
5745
5745
  const sl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5746
5746
  Object.defineProperty(t, i, {
5747
5747
  get() {
5748
5748
  throw Error(
5749
- S(
5749
+ b(
5750
5750
  "@arcgis/lumina:context",
5751
5751
  `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
5752
  )
@@ -5767,7 +5767,7 @@ const sl = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
5767
5767
  function ue(e) {
5768
5768
  if (u.isAbsolute(e))
5769
5769
  throw Error(
5770
- S(
5770
+ b(
5771
5771
  "@arcgis/lumina:context",
5772
5772
  `Documentation file name was expected to be a relative path (relative to dist). Instead, received an absolute path: ${e}`
5773
5773
  )
@@ -5789,7 +5789,7 @@ async function ns(e, t, i, n, s = R()) {
5789
5789
  return !1;
5790
5790
  if (process.env.CI)
5791
5791
  throw Error(
5792
- S(
5792
+ b(
5793
5793
  "@arcgis/lumina:updateLuminaTs",
5794
5794
  `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
5795
 
@@ -5898,7 +5898,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5898
5898
  return n.optimizableImports;
5899
5899
  if ("cssHref" in n)
5900
5900
  return [];
5901
- throw Error(S(Re, `Unexpected loader type: ${JSON.stringify(n)}`));
5901
+ throw Error(b(Re, `Unexpected loader type: ${JSON.stringify(n)}`));
5902
5902
  });
5903
5903
  e.viteConfig.optimizeDeps.include ??= [], e.viteConfig.optimizeDeps.include.push(...i);
5904
5904
  },
@@ -5907,7 +5907,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
5907
5907
  }
5908
5908
  });
5909
5909
  async function ll(e) {
5910
- const i = (await Promise.all([Se, qn(e)])).flat();
5910
+ const i = (await Promise.all([be, qn(e)])).flat();
5911
5911
  if (!await ns(
5912
5912
  i,
5913
5913
  e.dir.src,
@@ -6008,7 +6008,7 @@ class P {
6008
6008
  distCdnAssets: v
6009
6009
  }, T.initialize(a.logger, l), a.root !== Mi())
6010
6010
  throw Error(
6011
- S(
6011
+ b(
6012
6012
  W,
6013
6013
  "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
6014
  )
@@ -6023,7 +6023,7 @@ class P {
6023
6023
  const h = this.options.documentation?.publicStoryUrlPrefix;
6024
6024
  this.isFullApiExtraction && typeof h == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await pl(this.componentStoryFiles, h)).then((w) => {
6025
6025
  this.componentStories = w;
6026
- }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), bc(this, a.build.sourcemap !== !1), ss(this) && Ee(this);
6026
+ }) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), Sc(this, a.build.sourcemap !== !1), ss(this) && Ee(this);
6027
6027
  }
6028
6028
  },
6029
6029
  configureServer: {
@@ -6062,7 +6062,7 @@ class P {
6062
6062
  webTypes: s.jetBrains === !1 ? void 0 : s.jetBrains?.webTypesFileName ? ue(s.jetBrains.webTypesFileName) : me.webTypes,
6063
6063
  vsCodeHtml: s.vsCode === !1 ? void 0 : s.vsCode?.htmlFileName ? ue(s.vsCode.htmlFileName) : me.vsCodeHtml,
6064
6064
  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);
6065
+ }, vn(void 0, t), this.componentFilesPromise = kt(this, u.resolve("src/components")), bc(this);
6066
6066
  const r = t.build?.preamble ?? nl();
6067
6067
  this.banner = sl(r);
6068
6068
  }
@@ -6086,7 +6086,7 @@ class P {
6086
6086
  return n;
6087
6087
  } else {
6088
6088
  if (this.viteCommand === "build" || this.isInStorybook)
6089
- throw Error(S(W, t, "Unable to find the TypeScript source file"));
6089
+ throw Error(b(W, t, "Unable to find the TypeScript source file"));
6090
6090
  {
6091
6091
  const r = this._typeScriptSourceFiles.get(t);
6092
6092
  r !== void 0 && r.text === i && (n = r);
@@ -6134,7 +6134,7 @@ class P {
6134
6134
  n === "serve" && ye(this, t, i);
6135
6135
  else
6136
6136
  throw Error(
6137
- S(
6137
+ b(
6138
6138
  W,
6139
6139
  "It is too late to call provideAssets() as Vite already wrote the bundle to disk. Please call provideAssets() before Vite's writeBundle()"
6140
6140
  )
@@ -6249,9 +6249,14 @@ const mt = "@arcgis/lumina:addNonLazyImports", wl = (e) => ({
6249
6249
  }), (a.length > 0 || c.length > 0) && d.length === 0) {
6250
6250
  const p = te(r);
6251
6251
  throw Error(
6252
- S(
6252
+ b(
6253
6253
  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.`
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.
6255
+
6256
+ Possible causes:
6257
+ - 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.
6258
+ - 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\`).
6259
+ `
6255
6260
  )
6256
6261
  );
6257
6262
  }
@@ -6260,26 +6265,26 @@ const mt = "@arcgis/lumina:addNonLazyImports", wl = (e) => ({
6260
6265
  if (!n.has(r))
6261
6266
  return [];
6262
6267
  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);
6268
+ function m(S) {
6269
+ const C = Qa(e, S, r);
6265
6270
  if (C === void 0)
6266
6271
  return;
6267
6272
  const L = Za(C, p);
6268
6273
  if (L !== `./${p}`)
6269
6274
  return L.startsWith(".") ? `${L}/${Fi}` : L;
6270
6275
  }
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);
6276
+ const f = new Set(a), g = new Set(c), y = Array.from(f, m).filter(j), v = (S) => `import "${S}";
6277
+ `, h = y.map(v).join(""), w = /* @__PURE__ */ new Set(), E = Array.from(g, (S) => {
6278
+ const C = m(S);
6274
6279
  if (C !== void 0) {
6275
- if (f.has(b)) {
6280
+ if (f.has(S)) {
6276
6281
  T.warn(
6277
6282
  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.`
6283
+ `"${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
6284
  );
6280
6285
  return;
6281
6286
  }
6282
- return w.add(v(C)), `.set("${b}", () => import("${C}"))
6287
+ return w.add(v(C)), `.set("${S}", () => import("${C}"))
6283
6288
  `;
6284
6289
  }
6285
6290
  }).filter(j), $ = `${h}export * from "./${Et}";`, A = Array.from(w).join("") + $, x = E.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
@@ -6287,12 +6292,12 @@ ${$}
6287
6292
  deferredLoaders${E.join("")};` : $;
6288
6293
  return [
6289
6294
  D(u.join(e.dir.dist, p, Fi), x),
6290
- D(u.join(e.dir.dist, p, Sl), A)
6295
+ D(u.join(e.dir.dist, p, bl), A)
6291
6296
  ];
6292
6297
  });
6293
6298
  await Promise.all(s);
6294
6299
  }
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) => ({
6300
+ }), 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
6301
  name: "@arcgis/lumina:handleDynamicAssets",
6297
6302
  configureServer(t) {
6298
6303
  e.server = t, !e.isInPuppeteerTestBackEnd && Ni(e).forEach(({ assets: i, transformers: n }) => ye(e, i, n));
@@ -6311,12 +6316,12 @@ function Ni(e) {
6311
6316
  "type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
6312
6317
  }), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
6313
6318
  }
6314
- const bt = "@arcgis/lumina:updatePackageJson", Tl = (e) => ({
6315
- name: bt,
6319
+ const St = "@arcgis/lumina:updatePackageJson", Tl = (e) => ({
6320
+ name: St,
6316
6321
  apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
6317
6322
  configResolved() {
6318
6323
  El(e).catch(
6319
- (t) => T.error(bt, `Failed to update package's package.json:${String(t)}`)
6324
+ (t) => T.error(St, `Failed to update package's package.json:${String(t)}`)
6320
6325
  );
6321
6326
  }
6322
6327
  });
@@ -6328,7 +6333,7 @@ function Cl(e, t) {
6328
6333
  const i = e?.devDependencies ?? {};
6329
6334
  Object.keys(e?.peerDependencies ?? {}).forEach((d) => {
6330
6335
  d in i || T.warn(
6331
- bt,
6336
+ St,
6332
6337
  `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
6338
  );
6334
6339
  });
@@ -6920,7 +6925,7 @@ function Id(e = {}) {
6920
6925
  vc(t),
6921
6926
  To(t),
6922
6927
  Gc(t),
6923
- bl(t),
6928
+ Sl(t),
6924
6929
  wl(t),
6925
6930
  cl(t),
6926
6931
  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.86",
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.86",
22
+ "@arcgis/components-build-utils": "4.34.0-next.86",
23
+ "@arcgis/toolkit": "4.34.0-next.86",
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.86",
35
35
  "lit": "^3.3.0",
36
36
  "typescript": "~5.8.3",
37
37
  "vite": "^7.0.0",