@arcgis/lumina-compiler 5.2.0-next.125 → 5.2.0-next.126

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.
Files changed (2) hide show
  1. package/dist/index.js +64 -64
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -6,14 +6,14 @@ import { camelToKebab as ti, getPreamble as Ss, uncapitalize as St, capitalize a
6
6
  import { lazyMetaSubItemJoiner as Es, lazyMetaItemJoiner as Je, lazyMetaGroupJoiner as Ts, propertyFlagAttribute as Ct, propertyFlagReflect as $s, propertyFlagBoolean as Ps, propertyFlagNumber as ks, propertyFlagState as Is, propertyFlagReadOnly as xs, propertyFlagNoAccessor as As, propertyFlagUseDefault as Ls } from "@arcgis/lumina/config";
7
7
  import { path as u, isPosix as ii, toPosixPathSeparators as G, toSystemPathSeparators as Re, getCwd as si } from "@arcgis/node-toolkit/path";
8
8
  import { isApiMethodAsync as Ns, globalPackageIdentifier as js, isApiMethod as Fs, isApiProperty as Rs } from "@arcgis/api-extractor/utils/apiHelpers";
9
- import { existsAsync as _, findPath as ri } from "@arcgis/node-toolkit/file";
10
- import { readFile as z, readdir as ot, mkdir as X, writeFile as K, copyFile as Ds, rm as Os, cp as Ms } from "node:fs/promises";
9
+ import { existsAsync as K, findPath as ri } from "@arcgis/node-toolkit/file";
10
+ import { readFile as z, readdir as ot, mkdir as X, writeFile as _, copyFile as Ds, rm as Os, cp as Ms } from "node:fs/promises";
11
11
  import { retrievePackageJson as j, fetchPackageLocation as $e, asyncRetrievePackageJson as ni } from "@arcgis/node-toolkit/packageJson";
12
12
  import { getSystemVersion as oi } from "@arcgis/node-toolkit/workspace";
13
13
  import { build as Js } from "esbuild";
14
14
  import Bs from "mime-types";
15
- import { forEachWithConcurrency as _s } from "@arcgis/toolkit/promise";
16
- import { glob as Ks } from "tinyglobby";
15
+ import { forEachWithConcurrency as Ks } from "@arcgis/toolkit/promise";
16
+ import { glob as _s } from "tinyglobby";
17
17
  import { renameComponentFolder as Ge } from "@arcgis/api-extractor/extractor/webComponent/pathMapping";
18
18
  import { useApiExtractor as Ws } from "@arcgis/api-extractor/vite/plugin";
19
19
  import { writeFileSync as ai } from "node:fs";
@@ -43,7 +43,7 @@ function Xs(e) {
43
43
  e.isInStorybook && (i.resolveId = void 0);
44
44
  }, i;
45
45
  }
46
- const Ys = "Fragment", Be = "DynamicHtmlTag", _e = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), pi = /* @__PURE__ */ new Set([
46
+ const Ys = "Fragment", Be = "DynamicHtmlTag", Ke = "DynamicSvgTag", ke = /* @__PURE__ */ Symbol("dynamic html tag name"), Ye = /* @__PURE__ */ Symbol("dynamic svg tag name"), pi = /* @__PURE__ */ new Set([
47
47
  /**
48
48
  * There is a "className" property. However, in JSX typings we use "class"
49
49
  * instead to keep name shorter and to match Stencil's name. Thus, it should
@@ -1439,7 +1439,7 @@ const Mr = /* @__PURE__ */ new Set([
1439
1439
  let xe, et, ne;
1440
1440
  async function Ii(e, t) {
1441
1441
  const i = await $e(e, t), s = await ni(i), n = "exports" in s, r = Gr.bind(void 0, n), a = "@stencil/core" in (s.dependencies ?? {}) || "@stencil/core" in (s.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
1442
- if (a ? await _(c) : !1) {
1442
+ if (a ? await K(c) : !1) {
1443
1443
  const g = await z(c, "utf8"), h = Jr(g, "bootstrapLazy("), y = g.indexOf(", options", h), v = g.slice(h, y), w = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
1444
1444
  try {
1445
1445
  const C = JSON.parse(w), E = qr(C, { packageName: e, getImportPath: r });
@@ -1459,14 +1459,14 @@ Error: ${String(C)}`);
1459
1459
  }
1460
1460
  const p = Pt(s["web-types"]);
1461
1461
  if (p != null) {
1462
- const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = _r(h, {
1462
+ const g = u.join(i, p), h = JSON.parse(await z(g, "utf-8")), y = Kr(h, {
1463
1463
  packageName: e,
1464
1464
  getImportPath: r
1465
1465
  });
1466
1466
  return { type: "unknown", packageName: e, components: y, packageLocation: i, packageJson: s };
1467
1467
  }
1468
1468
  const m = u.join(i, "dist/components");
1469
- if (await _(m)) {
1469
+ if (await K(m)) {
1470
1470
  const g = await Vr(m, {
1471
1471
  packageName: e,
1472
1472
  getImportPath: r
@@ -1520,7 +1520,7 @@ const Br = (e) => (
1520
1520
  // Since 5.0
1521
1521
  e.compiler?.name === "@arcgis/api-extractor" || // Before 5.0
1522
1522
  e.compiler?.name === $i.name
1523
- ), _r = (e, t) => Object.fromEntries(
1523
+ ), Kr = (e, t) => Object.fromEntries(
1524
1524
  (e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
1525
1525
  (i) => [
1526
1526
  i.name,
@@ -1531,7 +1531,7 @@ const Br = (e) => (
1531
1531
  }
1532
1532
  ]
1533
1533
  ) ?? []
1534
- ), Kr = 1, Wr = 2, Ur = 4, zr = 8, Hr = Kr | Wr | Ur | zr, qr = (e, t) => Object.fromEntries(
1534
+ ), _r = 1, Wr = 2, Ur = 4, zr = 8, Hr = _r | Wr | Ur | zr, qr = (e, t) => Object.fromEntries(
1535
1535
  e.flatMap(
1536
1536
  ([i, s]) => s.map(
1537
1537
  ([n, r, a]) => [
@@ -1607,7 +1607,7 @@ async function ji(e, t, i = ut) {
1607
1607
  const p = u.resolve(l.parentPath, l.name), m = u.relative(a, p), f = u.join(r, m);
1608
1608
  return [p, f];
1609
1609
  });
1610
- await Mi(d.map(([l, p]) => p)), await _s(
1610
+ await Mi(d.map(([l, p]) => p)), await Ks(
1611
1611
  d,
1612
1612
  16,
1613
1613
  async ([l, p]) => await kt(l, p, i, e)
@@ -1617,7 +1617,7 @@ async function ji(e, t, i = ut) {
1617
1617
  else if (n.type === "dynamic") {
1618
1618
  await X(u.dirname(r), { recursive: !0 });
1619
1619
  const a = await Promise.resolve(n.source());
1620
- await K(r, a);
1620
+ await _(r, a);
1621
1621
  }
1622
1622
  })
1623
1623
  );
@@ -1636,7 +1636,7 @@ async function kt(e, t, i, s) {
1636
1636
  await Ds(e, t);
1637
1637
  else {
1638
1638
  const r = await z(e, "utf8"), a = n.transform(r, t, s);
1639
- await K(t, a);
1639
+ await _(t, a);
1640
1640
  }
1641
1641
  }
1642
1642
  function Ri(e) {
@@ -1680,8 +1680,8 @@ async function Mi(e) {
1680
1680
  const sn = {
1681
1681
  match: (e, t) => t.environment === "production" && e.endsWith(".json"),
1682
1682
  transform: (e) => JSON.stringify(JSON.parse(e))
1683
- }, ut = [sn], Ae = "@arcgis/core", me = "@arcgis/core/assets", Ke = j(), H = Ae in (Ke.dependencies ?? {}) || Ae in (Ke.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1684
- Ke.name === "@arcgis/lumina";
1683
+ }, ut = [sn], Ae = "@arcgis/core", me = "@arcgis/core/assets", _e = j(), H = Ae in (_e.dependencies ?? {}) || Ae in (_e.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
1684
+ _e.name === "@arcgis/lumina";
1685
1685
  async function rn(e, t, i, s) {
1686
1686
  if (!H)
1687
1687
  return [];
@@ -1800,10 +1800,10 @@ const cn = -1, ln = -2, dn = /["']\.\.?\/[^'"]+/gu, pn = (e, t, i, s) => e.repla
1800
1800
  };
1801
1801
  async function un(e, t, i) {
1802
1802
  const s = u.resolve(e.dir.root, t);
1803
- e.viteConfig.build.emptyOutDir !== !1 && await _(s) && await Os(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Ms(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1803
+ e.viteConfig.build.emptyOutDir !== !1 && await K(s) && await Os(s, { recursive: !0, force: !0 }), await X(s, { recursive: !0 }), await Ms(e.dir.distCdn, u.join(s, "build"), { recursive: !0 });
1804
1804
  const n = [
1805
1805
  "index.html",
1806
- ...await Ks("**/*.html", {
1806
+ ...await _s("**/*.html", {
1807
1807
  cwd: e.dir.src,
1808
1808
  onlyFiles: !0,
1809
1809
  // The files we are looking for are unlikely to be symbolic links
@@ -1837,7 +1837,7 @@ async function un(e, t, i) {
1837
1837
  if (C === Number.POSITIVE_INFINITY)
1838
1838
  throw Error(b("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${g}`));
1839
1839
  const E = y.slice(0, C) + w + y.slice(C), P = e.options?.build?.webApp?.transformFile?.(E, h, e) ?? E;
1840
- await K(h, P, "utf-8");
1840
+ await _(h, P, "utf-8");
1841
1841
  })
1842
1842
  ), await e.options.build?.webApp?.afterBuildEnd?.(e);
1843
1843
  }
@@ -1854,7 +1854,7 @@ const Bi = /* @__PURE__ */ new Set([
1854
1854
  "collection",
1855
1855
  "extras",
1856
1856
  "support"
1857
- ]), O = "@arcgis/lumina:buildCdn", le = "cdn", _i = "index", Z = "main";
1857
+ ]), O = "@arcgis/lumina:buildCdn", le = "cdn", Ki = "index", Z = "main";
1858
1858
  function mn(e) {
1859
1859
  const { skip: t = !1, namespace: i, esbuildOptions: s = {}, entrypointTransformer: n } = e.options.build?.cdn ?? {}, r = e.options.build?.webApp?.destination, a = i !== void 0;
1860
1860
  if (a) {
@@ -1868,7 +1868,7 @@ function mn(e) {
1868
1868
  'The "namespace" option in the "build.cdn" is deprecated and will be removed in the next major version.'
1869
1869
  );
1870
1870
  }
1871
- const c = i ?? _i;
1871
+ const c = i ?? Ki;
1872
1872
  if (e.provideAssets([
1873
1873
  {
1874
1874
  type: "dynamic",
@@ -2047,7 +2047,7 @@ ${p.text}`
2047
2047
  n && d.forEach((p, m) => {
2048
2048
  if (p.isAsync === void 0)
2049
2049
  if (m.endsWith(".js")) {
2050
- if (Ki(p, d), c?.has(m) === !0 && p.code.includes(Wi))
2050
+ if (_i(p, d), c?.has(m) === !0 && p.code.includes(Wi))
2051
2051
  throw Error(
2052
2052
  b(
2053
2053
  O,
@@ -2065,7 +2065,7 @@ ${p.text}`
2065
2065
  l.set(f, X(r + f, { recursive: !0 }));
2066
2066
  }
2067
2067
  }
2068
- await Promise.all(l.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await K(r + p, m)));
2068
+ await Promise.all(l.values()), await Promise.all(Array.from(d.entries(), async ([p, { code: m }]) => await _(r + p, m)));
2069
2069
  }
2070
2070
  const hn = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
2071
2071
  function yn(e, t) {
@@ -2109,7 +2109,7 @@ function yn(e, t) {
2109
2109
  }
2110
2110
  return i += ")", i;
2111
2111
  }
2112
- function Ki(e, t) {
2112
+ function _i(e, t) {
2113
2113
  if (e.isProcessing) {
2114
2114
  e.isAsync = !0, xt(e);
2115
2115
  return;
@@ -2201,7 +2201,7 @@ function Ui(e, t) {
2201
2201
  const i = e.slice(2), s = t.get(i);
2202
2202
  if (s === void 0)
2203
2203
  throw Error(b(O, `Failed to find the ${e} module`));
2204
- if (s.isAsync === void 0 && Ki(s, t), s.isAsync === void 0)
2204
+ if (s.isAsync === void 0 && _i(s, t), s.isAsync === void 0)
2205
2205
  throw Error(b(O, `Failed to infer whether the ${e} module has top-level await`));
2206
2206
  return s;
2207
2207
  }
@@ -2325,9 +2325,9 @@ async function qi(e) {
2325
2325
  }
2326
2326
  async function Lt(e, t) {
2327
2327
  const i = u.join(e, t, `${t}.css`), s = u.join(e, t, "assets"), n = u.join(e, t, `${t}.esm.js`), [r, a, c] = await Promise.all([
2328
- _(i),
2329
- _(s),
2330
- _(n)
2328
+ K(i),
2329
+ K(s),
2330
+ K(n)
2331
2331
  ]);
2332
2332
  return r || a || c ? {
2333
2333
  hasCss: r,
@@ -2335,7 +2335,7 @@ async function Lt(e, t) {
2335
2335
  } : void 0;
2336
2336
  }
2337
2337
  async function xn(e, t, i, s, n) {
2338
- const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await qi(t.packageLocation) : void 0, c = a?.cdnName ?? le, d = a === void 0 ? `${_i}.js` : `${a.cdnName}.esm.js`;
2338
+ const a = t.packageJson.exports?.[`./${Z}.css`] === void 0 ? await qi(t.packageLocation) : void 0, c = a?.cdnName ?? le, d = a === void 0 ? `${Ki}.js` : `${a.cdnName}.esm.js`;
2339
2339
  if (i === "cdn")
2340
2340
  return {
2341
2341
  tag: "script",
@@ -2556,10 +2556,10 @@ function Mn(e) {
2556
2556
  };
2557
2557
  }
2558
2558
  async function Dt(e) {
2559
- const t = _("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2559
+ const t = K("assets"), i = await e.componentFilesPromise, s = await Promise.all(
2560
2560
  i.map(async (n) => {
2561
2561
  const r = u.dirname(n), a = u.join(r, "assets");
2562
- return await _(a) ? Gi(a, r) : void 0;
2562
+ return await K(a) ? Gi(a, r) : void 0;
2563
2563
  })
2564
2564
  );
2565
2565
  return await t && s.push(Xi), s.filter(R);
@@ -2587,10 +2587,10 @@ const Gi = (e, t) => ({
2587
2587
  const m = console.log;
2588
2588
  console.log = function(...g) {
2589
2589
  if (m.apply(console, g), g.length === 1 && typeof g[0] == "string") {
2590
- const [h, y] = g[0].match(_n) ?? [];
2590
+ const [h, y] = g[0].match(Kn) ?? [];
2591
2591
  if (!h)
2592
2592
  return;
2593
- p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(Kn, "").length);
2593
+ p || (p = g[0].slice(0, g[0].indexOf(h) + h.length).replaceAll(_n, "").length);
2594
2594
  const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
2595
2595
  y ? (l += Number.parseFloat(y.replace(" kB", "").replaceAll(",", "")), d += v) : c += v;
2596
2596
  }
@@ -2617,7 +2617,7 @@ const Gi = (e, t) => ({
2617
2617
  }
2618
2618
  };
2619
2619
  }
2620
- }), Ot = "\x1B[22m\x1B[1m\x1B[22m", Mt = "\x1B[2m", Bn = "\x1B[22m\x1B[36m", _n = /\d+(?:,\d+)?\.\d{2} kB/gu, Kn = /\x1B\[\d+m/gu, Wn = new Intl.NumberFormat("en", {
2620
+ }), Ot = "\x1B[22m\x1B[1m\x1B[22m", Mt = "\x1B[2m", Bn = "\x1B[22m\x1B[36m", Kn = /\d+(?:,\d+)?\.\d{2} kB/gu, _n = /\x1B\[\d+m/gu, Wn = new Intl.NumberFormat("en", {
2621
2621
  maximumFractionDigits: 2,
2622
2622
  minimumFractionDigits: 2
2623
2623
  }), Jt = (e) => `${Wn.format(e)} kB`, Un = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", mt.slice(0, -3)));
@@ -2974,7 +2974,7 @@ const ue = {
2974
2974
  stencilLikeDocsJson: "docs/docs.json"
2975
2975
  }, rt = (e) => e.viteConfig.root.includes("/test-packages/") ? 2 : void 0;
2976
2976
  async function Qi(e, t, i = j()) {
2977
- const s = no(e, i), n = u.join(t, "lumina.ts"), a = await _(n) ? await z(n, "utf8") : "";
2977
+ const s = no(e, i), n = u.join(t, "lumina.ts"), a = await K(n) ? await z(n, "utf8") : "";
2978
2978
  if (a.trim().replaceAll(`\r
2979
2979
  `, `
2980
2980
  `) === s.trim())
@@ -3185,12 +3185,12 @@ async function po(e) {
3185
3185
  }
3186
3186
  Ft(e);
3187
3187
  }
3188
- _t(e, p.apiJson);
3188
+ Kt(e, p.apiJson);
3189
3189
  }
3190
3190
  }
3191
3191
  },
3192
3192
  afterApiJsonCreate: (l) => {
3193
- e.options.apiJson?.afterCreate?.(l.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), _t(e, l.apiJson));
3193
+ e.options.apiJson?.afterCreate?.(l.apiJson, !r), r = !0, (e.viteCommand === "build" ? e.viteConfig.build.watch : e.viteConfig.server.watch) === null && (e.apiJsonDeferred.resolve(), Kt(e, l.apiJson));
3194
3194
  }
3195
3195
  }, c = i === void 0 ? a : Tt(i, a);
3196
3196
  e.apiExtractorPluginConfig.configFilePath = "", e.apiExtractorPluginConfig.unsafeConfigOverride = c;
@@ -3199,7 +3199,7 @@ async function po(e) {
3199
3199
  e.apiExtractor = l, d?.(l);
3200
3200
  };
3201
3201
  }
3202
- function _t(e, t) {
3202
+ function Kt(e, t) {
3203
3203
  const i = { ...t, modules: [] }, s = [], n = e.viteCommand === "build" ? [] : void 0;
3204
3204
  for (const r of t.modules) {
3205
3205
  const a = { ...r, declarations: [] };
@@ -3496,19 +3496,19 @@ function es(e) {
3496
3496
  e.viteCommand === "build"
3497
3497
  ), e._localDefinedComponents;
3498
3498
  }
3499
- const Kt = "makeRuntime(", go = "@arcgis/core", ho = "@arcgis/lumina:injectRuntimeOptions", yo = (e) => ({
3499
+ const _t = "makeRuntime(", go = "@arcgis/core", ho = "@arcgis/lumina:injectRuntimeOptions", yo = (e) => ({
3500
3500
  name: ho,
3501
3501
  transform: {
3502
3502
  filter: {
3503
3503
  id: /\/src\/runtime\.ts$/u
3504
3504
  },
3505
3505
  handler(t, i) {
3506
- const s = t.indexOf(Kt);
3506
+ const s = t.indexOf(_t);
3507
3507
  if (s === -1)
3508
3508
  throw new Error(
3509
3509
  `Failed to find makeRuntime() function call in src/runtime.ts. Id: ${i}. Code: ${t}`
3510
3510
  );
3511
- const n = s + Kt.length, r = e.options.css?.commonStylesPath;
3511
+ const n = s + _t.length, r = e.options.css?.commonStylesPath;
3512
3512
  return {
3513
3513
  code: [
3514
3514
  r === void 0 ? "" : `import commonStyles from "${he(e.dir.src, r)}${Ie}";`,
@@ -3613,7 +3613,7 @@ Possible causes:
3613
3613
  }).filter(R), C = `${v}export * from "./${mt}";`, E = w.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
3614
3614
  ${C}
3615
3615
  deferredLoaders${w.join("")};` : C;
3616
- return await K(u.join(e.dir.dist, p, Wt), E);
3616
+ return await _(u.join(e.dir.dist, p, Wt), E);
3617
3617
  });
3618
3618
  await Promise.all(n);
3619
3619
  }
@@ -4171,7 +4171,7 @@ const Oo = /* @__PURE__ */ new Set([
4171
4171
  o.SyntaxKind.FalseKeyword,
4172
4172
  o.SyntaxKind.NullKeyword,
4173
4173
  o.SyntaxKind.TrueKeyword
4174
- ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, os = (e, t) => o.isObjectBindingPattern(e) ? _o(e, t) : e;
4174
+ ]), ge = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? ge(e.expression) : e, os = (e, t) => o.isObjectBindingPattern(e) ? Ko(e, t) : e;
4175
4175
  function Mo(e, t, i) {
4176
4176
  if (e.every(Fe, t))
4177
4177
  return t;
@@ -4198,7 +4198,7 @@ function Bo(e) {
4198
4198
  const t = this;
4199
4199
  return o.isOmittedExpression(e) ? !1 : Fe.call(e.name, t);
4200
4200
  }
4201
- function _o(e, t) {
4201
+ function Ko(e, t) {
4202
4202
  let i = !1;
4203
4203
  const s = e.elements.filter((n) => o.isIdentifier(n.name) ? t.includes(n.name.text) : (i = !0, !0));
4204
4204
  return i || s.length === 0 ? e : o.factory.updateObjectBindingPattern(e, s);
@@ -4226,18 +4226,18 @@ function ls(e, t) {
4226
4226
  const n = o.isJsxElement(t) ? t.openingElement : t, r = n.tagName;
4227
4227
  if (o.isJsxNamespacedName(r))
4228
4228
  throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
4229
- if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Be && r.text !== _e) {
4229
+ if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Be && r.text !== Ke) {
4230
4230
  const S = o.isIdentifier(r) && r.text === Ys ? Te(i, e) : {
4231
4231
  // No need to wrap the function call in a lit-html tag
4232
4232
  litTag: void 0,
4233
4233
  parts: [Wo(e, t, r, i)]
4234
4234
  };
4235
4235
  return {
4236
- key: Ko(n, e),
4236
+ key: _o(n, e),
4237
4237
  ...S
4238
4238
  };
4239
4239
  }
4240
- const c = r.text === Be ? ke : r.text === _e ? Ye : r.text, d = r.text === Be ? ae : r.text === _e ? Y : Zs.has(c) ? hi : at.has(c) ? se : ce, l = lt(c), p = l ? e.localComponents[c]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4240
+ const c = r.text === Be ? ke : r.text === Ke ? Ye : r.text, d = r.text === Be ? ae : r.text === Ke ? Y : Zs.has(c) ? hi : at.has(c) ? se : ce, l = lt(c), p = l ? e.localComponents[c]?.requiredProperties : void 0, m = p === void 0 ? void 0 : new Set(p);
4241
4241
  let f;
4242
4242
  const g = [];
4243
4243
  let h = !1;
@@ -4296,7 +4296,7 @@ Found ${x.getText(e.sourceFile)}`
4296
4296
  ];
4297
4297
  return { key: f, parts: P, litTag: d };
4298
4298
  }
4299
- function Ko(e, t) {
4299
+ function _o(e, t) {
4300
4300
  const i = e.attributes.properties[ds(e)];
4301
4301
  return i && o.isJsxAttribute(i) && !as(i.name, t) ? gt(i.initializer, t.sourceFile) : void 0;
4302
4302
  }
@@ -4405,7 +4405,7 @@ function zo(e, t) {
4405
4405
  const i = t.importClause, s = i === void 0, n = t.moduleSpecifier;
4406
4406
  if (!o.isStringLiteral(n))
4407
4407
  return t;
4408
- const r = Ho(e.sourceFile.fileName, n.text, ""), a = !i?.isTypeOnly;
4408
+ const r = Ho(e.sourceFile.fileName, n.text, ""), a = i?.phaseModifier !== o.SyntaxKind.TypeKeyword;
4409
4409
  if (a && e.existingImportedModules.add(r), gr.test(n.text) && // If id already includes ?, bypass our custom behavior
4410
4410
  !n.text.includes("?")) {
4411
4411
  if (s) {
@@ -4434,7 +4434,7 @@ function zo(e, t) {
4434
4434
  return t;
4435
4435
  if (i.name !== void 0) {
4436
4436
  const l = i.name.text, p = i.name.text.startsWith(l[0].toUpperCase()), m = u.isAbsolute(r);
4437
- a && !i.isTypeOnly && p && m && e.importedFunctionComponentsFromModules.add(r);
4437
+ a && p && m && e.importedFunctionComponentsFromModules.add(r);
4438
4438
  }
4439
4439
  const c = i.namedBindings;
4440
4440
  if (c === void 0 || !o.isNamedImports(c))
@@ -4459,7 +4459,7 @@ function zo(e, t) {
4459
4459
  if (p.length === 0)
4460
4460
  return;
4461
4461
  if (p.length !== c.elements.length) {
4462
- const f = i.isTypeOnly || !l, g = l ? p : p.map(
4462
+ const f = i.phaseModifier === o.SyntaxKind.TypeKeyword || !l, g = l ? p : p.map(
4463
4463
  (h) => o.factory.updateImportSpecifier(
4464
4464
  h,
4465
4465
  !1,
@@ -4472,7 +4472,7 @@ function zo(e, t) {
4472
4472
  t.modifiers,
4473
4473
  o.factory.updateImportClause(
4474
4474
  i,
4475
- f,
4475
+ f ? o.SyntaxKind.TypeKeyword : void 0,
4476
4476
  i.name,
4477
4477
  o.factory.updateNamedImports(c, g)
4478
4478
  ),
@@ -4491,7 +4491,7 @@ function Vo(e, t) {
4491
4491
  const i = t.importClause, s = i?.namedBindings, n = t.moduleSpecifier;
4492
4492
  if (!o.isStringLiteral(n) || !s || !o.isNamedImports(s) || !ms.has(n.text))
4493
4493
  return t;
4494
- const r = i.isTypeOnly;
4494
+ const r = i.phaseModifier === o.SyntaxKind.TypeKeyword;
4495
4495
  let a = !1;
4496
4496
  const c = s.elements.map((d) => {
4497
4497
  const l = (d.propertyName ?? d.name).text, p = fs(l, n.text);
@@ -4504,7 +4504,7 @@ function Vo(e, t) {
4504
4504
  t.modifiers,
4505
4505
  o.factory.updateImportClause(
4506
4506
  i,
4507
- !1,
4507
+ void 0,
4508
4508
  i.name,
4509
4509
  o.factory.updateNamedImports(s, c)
4510
4510
  ),
@@ -4520,7 +4520,7 @@ function Go(e) {
4520
4520
  ([i, s]) => o.factory.createImportDeclaration(
4521
4521
  void 0,
4522
4522
  o.factory.createImportClause(
4523
- !1,
4523
+ void 0,
4524
4524
  void 0,
4525
4525
  o.factory.createNamedImports(
4526
4526
  s.map((n) => (e.neededImports.delete(n), gs(n, e)))
@@ -4660,7 +4660,7 @@ const Gt = "customElement", ta = (e, t) => {
4660
4660
  return [o.factory.createImportDeclaration(
4661
4661
  void 0,
4662
4662
  o.factory.createImportClause(
4663
- !1,
4663
+ void 0,
4664
4664
  void 0,
4665
4665
  o.factory.createNamedImports([
4666
4666
  o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Gt))
@@ -4894,7 +4894,7 @@ const da = (e, t) => o.factory.updateSourceFile(
4894
4894
  e.isDeclarationFile,
4895
4895
  e.referencedFiles,
4896
4896
  e.typeReferenceDirectives,
4897
- e.hasNoDefaultLib,
4897
+ !1,
4898
4898
  e.libReferenceDirectives
4899
4899
  );
4900
4900
  function pa(e, t) {
@@ -5381,13 +5381,13 @@ const Ma = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5381
5381
  })) ?? [], Ba = (e) => e.filter((t) => t.deprecated === void 0).map((t) => ({
5382
5382
  name: t.tagName,
5383
5383
  description: ys(t),
5384
- attributes: _a(t),
5384
+ attributes: Ka(t),
5385
5385
  references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
5386
- })), _a = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5386
+ })), Ka = (e) => e.attributes?.filter((t) => t.deprecated === void 0).map((t) => ({
5387
5387
  name: t.name,
5388
5388
  description: t.description || void 0,
5389
- values: Ka(t)
5390
- })) ?? [], Ka = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Wa = (e) => ({
5389
+ values: _a(t)
5390
+ })) ?? [], _a = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Wa = (e) => ({
5391
5391
  $schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
5392
5392
  version: 1.1,
5393
5393
  tags: Ba(e)
@@ -5416,15 +5416,15 @@ function Ha(e) {
5416
5416
  const d = [];
5417
5417
  if (n !== void 0) {
5418
5418
  const l = JSON.stringify(Wa(e.apiJsonComponents), null, t);
5419
- d.push(K(n, l));
5419
+ d.push(_(n, l));
5420
5420
  }
5421
5421
  if (r !== void 0) {
5422
5422
  const l = JSON.stringify(Ua(e.apiJsonComponents), null, t);
5423
- d.push(K(r, l));
5423
+ d.push(_(r, l));
5424
5424
  }
5425
5425
  if (a !== void 0) {
5426
5426
  const l = Oa(e.apiJsonComponents, typeof i == "object" ? i : {});
5427
- d.push(K(a, JSON.stringify(l, null, t)));
5427
+ d.push(_(a, JSON.stringify(l, null, t)));
5428
5428
  }
5429
5429
  await Promise.all(d);
5430
5430
  }
@@ -5457,7 +5457,7 @@ async function Xa(e, t) {
5457
5457
  for (const c of a.declarations)
5458
5458
  Ya(c) && s.push(Qa(c));
5459
5459
  const n = [`/// <reference types="${i}" preserve="true" />`, Ga, ...s].join(""), r = u.resolve(t.proxiesFile);
5460
- await X(u.dirname(r), { recursive: !0 }), await K(r, n);
5460
+ await X(u.dirname(r), { recursive: !0 }), await _(r, n);
5461
5461
  }
5462
5462
  function Ya(e) {
5463
5463
  return e.customElement === !0 && e.abstract !== !0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/lumina-compiler",
3
- "version": "5.2.0-next.125",
3
+ "version": "5.2.0-next.126",
4
4
  "description": "Compiler for WebGIS web components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,9 +25,9 @@
25
25
  ],
26
26
  "license": "SEE LICENSE IN LICENSE.md",
27
27
  "dependencies": {
28
- "@arcgis/api-extractor": "5.2.0-next.125",
29
- "@arcgis/node-toolkit": "5.2.0-next.125",
30
- "@arcgis/toolkit": "~5.2.0-next.125",
28
+ "@arcgis/api-extractor": "5.2.0-next.126",
29
+ "@arcgis/node-toolkit": "5.2.0-next.126",
30
+ "@arcgis/toolkit": "~5.2.0-next.126",
31
31
  "esbuild": "~0.28.1",
32
32
  "js-beautify": "^1.15.4",
33
33
  "mime-types": "^3.0.1",
@@ -35,7 +35,7 @@
35
35
  "tslib": "^2.8.1"
36
36
  },
37
37
  "peerDependencies": {
38
- "@arcgis/lumina": "~5.2.0-next.125",
38
+ "@arcgis/lumina": "~5.2.0-next.126",
39
39
  "lit": "^3.3.0",
40
40
  "puppeteer": "^24.30.0",
41
41
  "typescript": "~6.0.3",