@arcgis/lumina-compiler 4.33.0-next.108 → 4.33.0-next.109
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 +780 -764
- package/dist/publicTypes.d.ts +6 -3
- package/dist/testing/index.js +2 -1
- package/dist/testing/mount.d.ts +7 -0
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { nodeExternals as
|
|
2
|
-
import { stringToStartsWithGlob as
|
|
3
|
-
import
|
|
1
|
+
import { nodeExternals as ss } from "rollup-plugin-node-externals";
|
|
2
|
+
import { stringToStartsWithGlob as Nt, path as u, toSystemPathSeparators as A, retrievePackageJson as R, getCwd as Ae, fetchPackageLocation as Me, asyncRetrievePackageJson as Oe, existsAsync as H, findPath as rs, toPosixPathSeparators as $e, isPosix as kn } from "@arcgis/components-build-utils";
|
|
3
|
+
import os from "vite-plugin-dts";
|
|
4
4
|
import o from "typescript";
|
|
5
|
-
import { getMemberName as G, globalPackageIdentifier as Ln, ApiExtractor as
|
|
6
|
-
import { isNotUndefined as j, mappedFind as ee, camelToKebab as ut, kebabToPascal as
|
|
7
|
-
import { readdir as Je, readFile as O, rm as
|
|
8
|
-
import { lazyMetaSubItemJoiner as
|
|
9
|
-
import { build as
|
|
10
|
-
import { glob as
|
|
11
|
-
import
|
|
5
|
+
import { getMemberName as G, globalPackageIdentifier as Ln, ApiExtractor as as, hasIgnoredModifier as cs, setDefaultFromInitializer as jt, isApiMethod as ls, isApiProperty as ds } from "@arcgis/api-extractor";
|
|
6
|
+
import { isNotUndefined as j, mappedFind as ee, camelToKebab as ut, kebabToPascal as ps, uncapitalize as rt, identity as Fn, Deferred as us, getPreamble as ms, capitalize as fs } from "@arcgis/components-utils";
|
|
7
|
+
import { readdir as Je, readFile as O, rm as ys, mkdir as U, cp as hs, writeFile as L, copyFile as gs } from "node:fs/promises";
|
|
8
|
+
import { lazyMetaSubItemJoiner as vs, lazyMetaItemJoiner as Ge, lazyMetaGroupJoiner as ws, PropertyFlags as W } from "@arcgis/lumina/config";
|
|
9
|
+
import { build as Ss } from "esbuild";
|
|
10
|
+
import { glob as bs } from "glob";
|
|
11
|
+
import Ts from "mime-types";
|
|
12
12
|
import { writeFileSync as Nn } from "node:fs";
|
|
13
13
|
import jn from "chalk";
|
|
14
|
-
function
|
|
14
|
+
function Es(e) {
|
|
15
15
|
const { externalize: t = [], bundleIn: n = [], ...i } = e.options?.build?.dependencies ?? {}, r = {
|
|
16
|
-
...
|
|
16
|
+
...ss({
|
|
17
17
|
...i,
|
|
18
18
|
/*
|
|
19
19
|
* This property name is a bit confusing. "include" means "externalize these"
|
|
@@ -25,9 +25,9 @@ function Ts(e) {
|
|
|
25
25
|
// Externalize all @lit/ and @lit-labs/ packages
|
|
26
26
|
/^@lit[-/]/u,
|
|
27
27
|
/^lit$/u,
|
|
28
|
-
...Array.isArray(t) ? t.map(
|
|
28
|
+
...Array.isArray(t) ? t.map(Nt) : []
|
|
29
29
|
],
|
|
30
|
-
exclude: Array.isArray(n) ? n.map(
|
|
30
|
+
exclude: Array.isArray(n) ? n.map(Nt) : []
|
|
31
31
|
}),
|
|
32
32
|
configResolved() {
|
|
33
33
|
e.isInStorybook && (r.resolveId = void 0);
|
|
@@ -35,8 +35,8 @@ function Ts(e) {
|
|
|
35
35
|
};
|
|
36
36
|
return r;
|
|
37
37
|
}
|
|
38
|
-
const mt = "customElement.js", Dn = "customElement.d.ts",
|
|
39
|
-
function
|
|
38
|
+
const mt = "customElement.js", Dn = "customElement.d.ts", Cs = "playwright";
|
|
39
|
+
function $s(e, t, n) {
|
|
40
40
|
const s = n.split(u.sep).slice(2);
|
|
41
41
|
let r = t._componentPathMapping;
|
|
42
42
|
return s.forEach((a, c) => {
|
|
@@ -46,10 +46,10 @@ function Cs(e, t, n) {
|
|
|
46
46
|
function pe(e, t, n) {
|
|
47
47
|
if (!e.startsWith(t))
|
|
48
48
|
return e;
|
|
49
|
-
const i = e.slice(t.length), s =
|
|
49
|
+
const i = e.slice(t.length), s = Ps(i, n);
|
|
50
50
|
return `${t}${s}`;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function Ps(e, t) {
|
|
53
53
|
const n = e.split(u.sep);
|
|
54
54
|
n.push(".");
|
|
55
55
|
let i = t._componentPathMapping, s = 0;
|
|
@@ -62,12 +62,12 @@ function $s(e, t) {
|
|
|
62
62
|
return e;
|
|
63
63
|
}
|
|
64
64
|
const xs = ({ filePath: e, content: t }, n) => {
|
|
65
|
-
const i = e.startsWith(n.dir.distComponents) ? pe(Rn(e), n.dir.distComponents, n) : e, s = u.dirname(e), r = i.endsWith(Dn), a =
|
|
65
|
+
const i = e.startsWith(n.dir.distComponents) ? pe(Rn(e), n.dir.distComponents, n) : e, s = u.dirname(e), r = i.endsWith(Dn), a = Mn(
|
|
66
66
|
t,
|
|
67
67
|
n,
|
|
68
68
|
e === i ? s : u.dirname(i),
|
|
69
69
|
s
|
|
70
|
-
), c = r ?
|
|
70
|
+
), c = r ? Ls(a) : a;
|
|
71
71
|
return {
|
|
72
72
|
filePath: i,
|
|
73
73
|
content: c
|
|
@@ -75,12 +75,12 @@ const xs = ({ filePath: e, content: t }, n) => {
|
|
|
75
75
|
};
|
|
76
76
|
function Rn(e, t = ".d.ts") {
|
|
77
77
|
const i = (t === "" ? e : e.slice(0, -t.length)).split(u.sep);
|
|
78
|
-
return i.at(
|
|
78
|
+
return i.at(Is) !== i.at(As) ? e : u.join(
|
|
79
79
|
i.slice(0, -1).join(u.sep),
|
|
80
80
|
t === "" ? mt : Dn
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const Is = -1, As = -2, ks = /["']\.\.?\/[^'"]+/gu, Mn = (e, t, n, i) => e.replaceAll(ks, (s) => {
|
|
84
84
|
const r = s.slice(1);
|
|
85
85
|
if (!r.startsWith("./") && !r.startsWith("../"))
|
|
86
86
|
return s;
|
|
@@ -93,11 +93,11 @@ const Ps = -1, Is = -2, As = /["']\.\.?\/[^'"]+/gu, On = (e, t, n, i) => e.repla
|
|
|
93
93
|
const n = u.relative(e, t);
|
|
94
94
|
return n.startsWith(".") ? n : `.${u.sep}${n}`;
|
|
95
95
|
};
|
|
96
|
-
function
|
|
96
|
+
function Ls(e) {
|
|
97
97
|
return `/// <reference types="../../index.d.ts" />
|
|
98
98
|
${e}`;
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const Dt = "customElement", Fs = (e, t) => {
|
|
101
101
|
const { filePath: n, content: i } = e;
|
|
102
102
|
if (!n.startsWith(t.dir.distComponents))
|
|
103
103
|
return e;
|
|
@@ -111,12 +111,12 @@ const Rt = "customElement", Ls = (e, t) => {
|
|
|
111
111
|
content: r
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
},
|
|
114
|
+
}, Ns = (e, t) => {
|
|
115
115
|
const n = [];
|
|
116
116
|
if (t.apiModule?.declarations.forEach((r) => {
|
|
117
117
|
"customElement" in r && n.push(
|
|
118
118
|
o.factory.createExpressionStatement(
|
|
119
|
-
o.factory.createCallExpression(o.factory.createIdentifier(
|
|
119
|
+
o.factory.createCallExpression(o.factory.createIdentifier(Dt), void 0, [
|
|
120
120
|
o.factory.createStringLiteral(r.tagName),
|
|
121
121
|
o.factory.createIdentifier(r.name)
|
|
122
122
|
])
|
|
@@ -134,13 +134,13 @@ const Rt = "customElement", Ls = (e, t) => {
|
|
|
134
134
|
!1,
|
|
135
135
|
void 0,
|
|
136
136
|
o.factory.createNamedImports([
|
|
137
|
-
o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(
|
|
137
|
+
o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(Dt))
|
|
138
138
|
])
|
|
139
139
|
),
|
|
140
140
|
o.factory.createStringLiteral(i)
|
|
141
141
|
), ...e.statements, ...n];
|
|
142
142
|
};
|
|
143
|
-
function
|
|
143
|
+
function On(e) {
|
|
144
144
|
const t = Jn(e);
|
|
145
145
|
return t === void 0 ? void 0 : t.split(`
|
|
146
146
|
`).filter((i) => i.includes(":")).map((i) => i.replace(";", "").replaceAll('"', "").replaceAll("'", "").split(":")).map(([i, s]) => [i.trim(), s.trim()]).filter(([i]) => !i.startsWith("/") && !i.startsWith("*"));
|
|
@@ -153,39 +153,39 @@ function Jn(e) {
|
|
|
153
153
|
}`, t) + 2;
|
|
154
154
|
return e.slice(t, n);
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const js = (e) => (t, n) => (
|
|
157
157
|
/*
|
|
158
158
|
* `declarationTextTransformers` arrays can be mutated between plugin
|
|
159
159
|
* initialization and beforeWriteFile() call, so do not read the value
|
|
160
160
|
* of declarationTextTransformers outside of beforeWriteFile
|
|
161
161
|
*/
|
|
162
162
|
[
|
|
163
|
-
js,
|
|
164
|
-
Rs,
|
|
165
|
-
Os,
|
|
166
163
|
Ds,
|
|
167
|
-
xs,
|
|
168
164
|
Ms,
|
|
165
|
+
Os,
|
|
166
|
+
Rs,
|
|
167
|
+
xs,
|
|
169
168
|
Js,
|
|
170
|
-
Ls,
|
|
171
169
|
Ks,
|
|
170
|
+
Fs,
|
|
171
|
+
Bs,
|
|
172
172
|
...e.options.types?.declarationTextTransformers ?? [],
|
|
173
173
|
...e._declarationTextTransformers
|
|
174
174
|
].reduce(
|
|
175
175
|
(i, s) => i === !1 ? !1 : s(i, e),
|
|
176
176
|
{ filePath: t, content: n }
|
|
177
177
|
)
|
|
178
|
-
),
|
|
178
|
+
), Ds = (e, t) => t.isInStorybook ? !1 : e, Rs = (e, t) => (
|
|
179
179
|
// Short-circuit quickly if file doesn't look like the one we want to exclude
|
|
180
|
-
e.filePath.endsWith(
|
|
181
|
-
),
|
|
180
|
+
e.filePath.endsWith(Rt) && e.filePath === u.join(t.dir.dist, Rt) ? !1 : e
|
|
181
|
+
), Rt = "lumina.d.ts", Ms = (e, t) => {
|
|
182
182
|
const n = t.dir.dist, i = `${n}src/`;
|
|
183
183
|
return e.filePath.startsWith(i) ? { ...e, filePath: `${n}${e.filePath.slice(i.length)}` } : !1;
|
|
184
|
-
}, ft = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), Os = (e) => ft(e.filePath) ? !1 : e,
|
|
184
|
+
}, ft = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), Os = (e) => ft(e.filePath) ? !1 : e, Js = (e) => e.content.includes("__esri.") ? {
|
|
185
185
|
filePath: e.filePath,
|
|
186
186
|
content: `/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
187
187
|
${e.content}`
|
|
188
|
-
} : e,
|
|
188
|
+
} : e, Ks = (e, t) => {
|
|
189
189
|
t._htmlElementReferencesReplacer ??= {
|
|
190
190
|
regex: new RegExp(
|
|
191
191
|
`(${t.apiJsonComponents.map((i) => i.name).join("|")})\\[['"\`]el['"\`]\\]`,
|
|
@@ -200,8 +200,8 @@ ${e.content}`
|
|
|
200
200
|
filePath: e.filePath,
|
|
201
201
|
content: e.content.replace(n.regex, (i, s) => n.replacements[s])
|
|
202
202
|
};
|
|
203
|
-
},
|
|
204
|
-
const t = e.content.match(
|
|
203
|
+
}, Bs = (e) => {
|
|
204
|
+
const t = e.content.match(Ws)?.[1] ?? e.content.match(_s)?.[1];
|
|
205
205
|
if (t !== void 0) {
|
|
206
206
|
const n = A(u.relative(process.cwd(), e.filePath));
|
|
207
207
|
throw Error(
|
|
@@ -214,19 +214,19 @@ ${e.content}
|
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
216
|
return e;
|
|
217
|
-
},
|
|
218
|
-
function
|
|
217
|
+
}, Ws = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, _s = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
|
|
218
|
+
function Hs(e, t) {
|
|
219
219
|
const n = G(t.name);
|
|
220
220
|
return e.members.find((i) => i.name === n);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function Us(e, t, n) {
|
|
223
223
|
const i = u.relative(t, e);
|
|
224
224
|
return n.modules.find((s) => s.path === i);
|
|
225
225
|
}
|
|
226
226
|
function Kn(e, t, n, i) {
|
|
227
227
|
const s = {
|
|
228
228
|
compiler: e,
|
|
229
|
-
apiModule: e.isInPuppeteerTestBackEnd ? void 0 :
|
|
229
|
+
apiModule: e.isInPuppeteerTestBackEnd ? void 0 : Us(n.fileName, e.dir.root, e.privateApiJson),
|
|
230
230
|
transformation: t
|
|
231
231
|
}, r = n.statements;
|
|
232
232
|
let a = n.statements;
|
|
@@ -237,9 +237,9 @@ function Kn(e, t, n, i) {
|
|
|
237
237
|
a = c(n, s);
|
|
238
238
|
}), Object.defineProperty(n, "statements", {
|
|
239
239
|
value: r
|
|
240
|
-
}),
|
|
240
|
+
}), zs(n, a);
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const zs = (e, t) => o.factory.updateSourceFile(
|
|
243
243
|
e,
|
|
244
244
|
t,
|
|
245
245
|
/*
|
|
@@ -253,11 +253,11 @@ const Us = (e, t) => o.factory.updateSourceFile(
|
|
|
253
253
|
e.typeReferenceDirectives,
|
|
254
254
|
e.hasNoDefaultLib,
|
|
255
255
|
e.libReferenceDirectives
|
|
256
|
-
),
|
|
257
|
-
function
|
|
258
|
-
if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text ===
|
|
256
|
+
), qs = (e) => `${Mt}${" ".repeat(e.length - Mt.length - Ot.length)}${Ot}`, Mt = "/*", Ot = "*/", Gs = (e) => e.statements.map(Ys), Vs = "@arcgis/lumina", Xs = "LitElement", Qs = "PublicLitElement", Bn = "TargetedEvent";
|
|
257
|
+
function Ys(e) {
|
|
258
|
+
if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === Vs && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
|
|
259
259
|
const t = e.importClause.namedBindings.elements.findIndex(
|
|
260
|
-
(i) => (i.propertyName ?? i.name).text ===
|
|
260
|
+
(i) => (i.propertyName ?? i.name).text === Xs
|
|
261
261
|
);
|
|
262
262
|
if (t === -1)
|
|
263
263
|
return e;
|
|
@@ -274,7 +274,7 @@ function Qs(e) {
|
|
|
274
274
|
o.factory.updateImportSpecifier(
|
|
275
275
|
n,
|
|
276
276
|
n.isTypeOnly,
|
|
277
|
-
o.factory.createIdentifier(
|
|
277
|
+
o.factory.createIdentifier(Qs),
|
|
278
278
|
n.name
|
|
279
279
|
),
|
|
280
280
|
...e.importClause.namedBindings.elements.slice(t + 1),
|
|
@@ -292,14 +292,14 @@ function Qs(e) {
|
|
|
292
292
|
return e;
|
|
293
293
|
}
|
|
294
294
|
const Wn = "_setterTypes";
|
|
295
|
-
function
|
|
295
|
+
function Zs(e, t, n) {
|
|
296
296
|
return o.factory.createPropertyDeclaration(
|
|
297
297
|
[o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword)],
|
|
298
298
|
o.factory.createIdentifier(Wn),
|
|
299
299
|
void 0,
|
|
300
300
|
o.factory.createTypeLiteralNode(
|
|
301
301
|
e.map((i) => {
|
|
302
|
-
const [s, r] =
|
|
302
|
+
const [s, r] = er(i.name, i.type, n._typeScriptPrinter, t);
|
|
303
303
|
return o.factory.createPropertySignature(
|
|
304
304
|
void 0,
|
|
305
305
|
s,
|
|
@@ -311,7 +311,7 @@ function Ys(e, t, n) {
|
|
|
311
311
|
void 0
|
|
312
312
|
);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function er(e, t, n, i) {
|
|
315
315
|
const s = n.printNode(o.EmitHint.Unspecified, e, i), r = n.printNode(o.EmitHint.Unspecified, t, i), a = `declare class A { ${s}: ${r} }`, d = o.createSourceFile(
|
|
316
316
|
"a.d.ts",
|
|
317
317
|
a,
|
|
@@ -321,7 +321,7 @@ function Zs(e, t, n, i) {
|
|
|
321
321
|
).statements[0].members[0];
|
|
322
322
|
return [d.name, d.type];
|
|
323
323
|
}
|
|
324
|
-
const
|
|
324
|
+
const tr = "Fragment", Ve = "DynamicHtmlTag", Xe = "DynamicSvgTag", ke = Symbol("dynamic html tag name"), ot = Symbol("dynamic svg tag name"), _n = /* @__PURE__ */ new Set([
|
|
325
325
|
/**
|
|
326
326
|
* There is a "className" property. However, in JSX typings we use "class"
|
|
327
327
|
* instead to keep name shorter and to match Stencil's name. Thus, it should
|
|
@@ -1193,7 +1193,7 @@ function Un(e) {
|
|
|
1193
1193
|
e.stringifiedNonReflected
|
|
1194
1194
|
));
|
|
1195
1195
|
}
|
|
1196
|
-
const
|
|
1196
|
+
const Jt = /* @__PURE__ */ new Set(["itemScope"]), zn = /* @__PURE__ */ new Set([
|
|
1197
1197
|
"abort",
|
|
1198
1198
|
"animationCancel",
|
|
1199
1199
|
"animationEnd",
|
|
@@ -1290,7 +1290,7 @@ const Kt = /* @__PURE__ */ new Set(["itemScope"]), zn = /* @__PURE__ */ new Set(
|
|
|
1290
1290
|
"volumeChange",
|
|
1291
1291
|
"waiting",
|
|
1292
1292
|
"wheel"
|
|
1293
|
-
]),
|
|
1293
|
+
]), nr = /* @__PURE__ */ new Set([
|
|
1294
1294
|
"area",
|
|
1295
1295
|
"base",
|
|
1296
1296
|
"br",
|
|
@@ -1366,7 +1366,7 @@ const Kt = /* @__PURE__ */ new Set(["itemScope"]), zn = /* @__PURE__ */ new Set(
|
|
|
1366
1366
|
"tspan",
|
|
1367
1367
|
"use",
|
|
1368
1368
|
"view"
|
|
1369
|
-
]),
|
|
1369
|
+
]), ir = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), ht = /* @__PURE__ */ new Set([
|
|
1370
1370
|
"annotation-xml",
|
|
1371
1371
|
"annotation",
|
|
1372
1372
|
"maction",
|
|
@@ -1398,7 +1398,7 @@ const Kt = /* @__PURE__ */ new Set(["itemScope"]), zn = /* @__PURE__ */ new Set(
|
|
|
1398
1398
|
"munder",
|
|
1399
1399
|
"munderover",
|
|
1400
1400
|
"semantics"
|
|
1401
|
-
]),
|
|
1401
|
+
]), sr = /* @__PURE__ */ new Set([
|
|
1402
1402
|
"annotation-xml",
|
|
1403
1403
|
"color-profile",
|
|
1404
1404
|
"font-face",
|
|
@@ -1407,7 +1407,7 @@ const Kt = /* @__PURE__ */ new Set(["itemScope"]), zn = /* @__PURE__ */ new Set(
|
|
|
1407
1407
|
"font-face-format",
|
|
1408
1408
|
"font-face-name",
|
|
1409
1409
|
"missing-glyph"
|
|
1410
|
-
]),
|
|
1410
|
+
]), rr = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/gu, or = new Map(
|
|
1411
1411
|
Object.entries({
|
|
1412
1412
|
" ": "\\t",
|
|
1413
1413
|
"\v": "\\v",
|
|
@@ -1432,22 +1432,22 @@ const Kt = /* @__PURE__ */ new Set(["itemScope"]), zn = /* @__PURE__ */ new Set(
|
|
|
1432
1432
|
})
|
|
1433
1433
|
);
|
|
1434
1434
|
function qn(e) {
|
|
1435
|
-
return `\\u${`0000${e.toString(
|
|
1435
|
+
return `\\u${`0000${e.toString(ar).toUpperCase()}`.slice(-4)}`;
|
|
1436
1436
|
}
|
|
1437
|
-
const
|
|
1438
|
-
function
|
|
1439
|
-
if (e.charCodeAt(0) ===
|
|
1437
|
+
const ar = 16;
|
|
1438
|
+
function cr(e, t, n) {
|
|
1439
|
+
if (e.charCodeAt(0) === ur) {
|
|
1440
1440
|
const i = n.charCodeAt(t + e.length);
|
|
1441
|
-
return i >=
|
|
1441
|
+
return i >= mr && i <= fr ? "\\x00" : "\\0";
|
|
1442
1442
|
}
|
|
1443
|
-
return
|
|
1443
|
+
return or.get(e) || qn(e.charCodeAt(0));
|
|
1444
1444
|
}
|
|
1445
|
-
const
|
|
1446
|
-
function
|
|
1447
|
-
return e =
|
|
1445
|
+
const lr = (e) => e.replace(rr, cr), Kt = /[^\u0000-\u007F]/g;
|
|
1446
|
+
function dr(e) {
|
|
1447
|
+
return e = lr(e), Kt.test(e) ? e.replace(Kt, (t) => qn(t.charCodeAt(0))) : e;
|
|
1448
1448
|
}
|
|
1449
|
-
const
|
|
1450
|
-
function
|
|
1449
|
+
const pr = dr, ur = 0, mr = 48, fr = 57, yr = /\$\{/gu, hr = (e) => e.replace(yr, "\\${");
|
|
1450
|
+
function gr(e) {
|
|
1451
1451
|
if (e.length === 0)
|
|
1452
1452
|
return "";
|
|
1453
1453
|
const t = e[0];
|
|
@@ -1460,11 +1460,11 @@ function hr(e) {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
return e.trim().length === 0 ? t : e;
|
|
1462
1462
|
}
|
|
1463
|
-
const Ke = (e) =>
|
|
1463
|
+
const Ke = (e) => hr(pr(e)), vr = (e) => !wr.test(e), wr = /^[^\s"'=<>`]+$/u, Sr = /[&<>]/gu, br = {
|
|
1464
1464
|
"&": "&",
|
|
1465
1465
|
"<": "<",
|
|
1466
1466
|
">": ">"
|
|
1467
|
-
}, Gn = (e) => e.replace(
|
|
1467
|
+
}, Gn = (e) => e.replace(Sr, (t) => br[t]), gt = (e) => typeof e == "string" && e.includes("-") && !sr.has(e), vt = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
|
|
1468
1468
|
function wt(e, t) {
|
|
1469
1469
|
const n = St(e);
|
|
1470
1470
|
return n.length === 0 ? t : o.setSyntheticLeadingComments(
|
|
@@ -1478,7 +1478,7 @@ function wt(e, t) {
|
|
|
1478
1478
|
);
|
|
1479
1479
|
}
|
|
1480
1480
|
const St = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
|
|
1481
|
-
function
|
|
1481
|
+
function Tr(e) {
|
|
1482
1482
|
const t = St(e);
|
|
1483
1483
|
if (t.length === 0)
|
|
1484
1484
|
return [e || " "];
|
|
@@ -1510,8 +1510,8 @@ function Qe(e) {
|
|
|
1510
1510
|
return e;
|
|
1511
1511
|
throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
|
|
1512
1512
|
}
|
|
1513
|
-
const
|
|
1514
|
-
function
|
|
1513
|
+
const Er = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((n) => Cr(n, e, t));
|
|
1514
|
+
function Cr(e, t, n) {
|
|
1515
1515
|
if (o.isClassDeclaration(e)) {
|
|
1516
1516
|
const i = e, s = i.name?.text, r = n.apiModule.declarations.find(
|
|
1517
1517
|
(p) => p.name === s && "customElement" in p
|
|
@@ -1520,13 +1520,13 @@ function Er(e, t, n) {
|
|
|
1520
1520
|
return e;
|
|
1521
1521
|
const a = [], c = /* @__PURE__ */ new Set(), l = [], d = [];
|
|
1522
1522
|
for (let p = 0; p < i.members.length; p++) {
|
|
1523
|
-
const m = i.members[p], f =
|
|
1523
|
+
const m = i.members[p], f = $r(m, r, l, c, t);
|
|
1524
1524
|
f === void 0 ? a.push(m) : Array.isArray(f) ? d.push(...f) : d.push(f);
|
|
1525
1525
|
}
|
|
1526
1526
|
return c.size > 0 && a.forEach((p) => {
|
|
1527
1527
|
const m = G(p.name);
|
|
1528
1528
|
m !== void 0 && c.has(m) && d.push(xr(p));
|
|
1529
|
-
}), l.length > 0 && d.push(
|
|
1529
|
+
}), l.length > 0 && d.push(Zs(l, t, n.compiler)), o.factory.updateClassDeclaration(
|
|
1530
1530
|
i,
|
|
1531
1531
|
i.modifiers,
|
|
1532
1532
|
i.name,
|
|
@@ -1541,7 +1541,7 @@ function Er(e, t, n) {
|
|
|
1541
1541
|
} else
|
|
1542
1542
|
return e;
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function $r(e, t, n, i, s) {
|
|
1545
1545
|
const r = G(e.name);
|
|
1546
1546
|
if (r === void 0)
|
|
1547
1547
|
return;
|
|
@@ -1551,26 +1551,26 @@ function Cr(e, t, n, i, s) {
|
|
|
1551
1551
|
if (a === void 0)
|
|
1552
1552
|
return t.events?.find((l) => l.name === r) === void 0 ? void 0 : o.factory.updatePropertyDeclaration(
|
|
1553
1553
|
e,
|
|
1554
|
-
|
|
1554
|
+
_t(e.modifiers),
|
|
1555
1555
|
e.name,
|
|
1556
1556
|
void 0,
|
|
1557
|
-
|
|
1557
|
+
Ir(e.type, s),
|
|
1558
1558
|
e.initializer
|
|
1559
1559
|
);
|
|
1560
1560
|
if (a.readonly === !0)
|
|
1561
1561
|
return o.factory.updatePropertyDeclaration(
|
|
1562
1562
|
e,
|
|
1563
|
-
|
|
1563
|
+
_t(e.modifiers),
|
|
1564
1564
|
e.name,
|
|
1565
1565
|
void 0,
|
|
1566
|
-
|
|
1566
|
+
Wt(i, e.type, s),
|
|
1567
1567
|
e.initializer
|
|
1568
1568
|
);
|
|
1569
1569
|
if (a.getterType !== void 0) {
|
|
1570
|
-
const c =
|
|
1570
|
+
const c = Bt.exec(a.getterType.text)?.groups;
|
|
1571
1571
|
if (c === void 0)
|
|
1572
1572
|
return console.error(
|
|
1573
|
-
`Expected bound accessor getter type to match ${
|
|
1573
|
+
`Expected bound accessor getter type to match ${Bt}, but got ${a.getterType.text} in ${s.fileName}`
|
|
1574
1574
|
), e;
|
|
1575
1575
|
i.add(c.accessor);
|
|
1576
1576
|
const l = vt(e, { sourceFile: s }), d = e.modifiers?.filter(
|
|
@@ -1608,7 +1608,7 @@ function Cr(e, t, n, i, s) {
|
|
|
1608
1608
|
)
|
|
1609
1609
|
];
|
|
1610
1610
|
} else
|
|
1611
|
-
return
|
|
1611
|
+
return Wt(i, e.type, s), e;
|
|
1612
1612
|
} else if (o.isGetAccessor(e) || o.isSetAccessor(e)) {
|
|
1613
1613
|
if (a === void 0)
|
|
1614
1614
|
return;
|
|
@@ -1627,14 +1627,14 @@ function Cr(e, t, n, i, s) {
|
|
|
1627
1627
|
return a === void 0 ? void 0 : e;
|
|
1628
1628
|
}
|
|
1629
1629
|
}
|
|
1630
|
-
const
|
|
1631
|
-
function
|
|
1632
|
-
const s = (t?.pos !== -1 ? t?.getText(n) : void 0)?.match(
|
|
1630
|
+
const Bt = /^typeof this\.(?<accessor>[^.]+)\.(?<boundProperty>[^.]+)$/u;
|
|
1631
|
+
function Wt(e, t, n) {
|
|
1632
|
+
const s = (t?.pos !== -1 ? t?.getText(n) : void 0)?.match(Pr) ?? [];
|
|
1633
1633
|
for (const r of s)
|
|
1634
1634
|
e.add(r);
|
|
1635
1635
|
return t;
|
|
1636
1636
|
}
|
|
1637
|
-
const
|
|
1637
|
+
const Pr = /(?<=this.)[\w$]+/gu;
|
|
1638
1638
|
function xr(e) {
|
|
1639
1639
|
if (o.isPropertyDeclaration(e)) {
|
|
1640
1640
|
const t = be(e.modifiers);
|
|
@@ -1679,7 +1679,7 @@ function xr(e) {
|
|
|
1679
1679
|
}
|
|
1680
1680
|
return e;
|
|
1681
1681
|
}
|
|
1682
|
-
function
|
|
1682
|
+
function _t(e) {
|
|
1683
1683
|
return e?.some((n) => n.kind === o.SyntaxKind.ReadonlyKeyword) ? e : [o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword), ...e ?? []];
|
|
1684
1684
|
}
|
|
1685
1685
|
function be(e) {
|
|
@@ -1690,7 +1690,7 @@ function be(e) {
|
|
|
1690
1690
|
)
|
|
1691
1691
|
];
|
|
1692
1692
|
}
|
|
1693
|
-
function
|
|
1693
|
+
function Ir(e, t) {
|
|
1694
1694
|
if (e === void 0)
|
|
1695
1695
|
return;
|
|
1696
1696
|
const n = 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;
|
|
@@ -1701,10 +1701,10 @@ function Pr(e, t) {
|
|
|
1701
1701
|
`Unhandled event type node: ${e.getFullText(t)} (in ${A(t.fileName)}). Double check you are using events correctly or report this issue to Lumina maintainers`
|
|
1702
1702
|
), e);
|
|
1703
1703
|
}
|
|
1704
|
-
const
|
|
1705
|
-
function
|
|
1704
|
+
const Ar = [Gs, Er];
|
|
1705
|
+
function kr(e) {
|
|
1706
1706
|
let t;
|
|
1707
|
-
const n =
|
|
1707
|
+
const n = Lr(e);
|
|
1708
1708
|
return {
|
|
1709
1709
|
name: "@arcgis/lumina:componentDtsTransformer",
|
|
1710
1710
|
supports(i) {
|
|
@@ -1732,29 +1732,29 @@ function Ar(e) {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
};
|
|
1734
1734
|
}
|
|
1735
|
-
const
|
|
1736
|
-
...
|
|
1735
|
+
const Lr = (e) => (t) => (n) => Kn(e, t, n, [
|
|
1736
|
+
...Ar,
|
|
1737
1737
|
...e.options.types?.declarationAstTransformers ?? []
|
|
1738
|
-
]),
|
|
1739
|
-
get:
|
|
1740
|
-
set:
|
|
1738
|
+
]), Fr = (e) => new Proxy(e, {
|
|
1739
|
+
get: Nr,
|
|
1740
|
+
set: jr
|
|
1741
1741
|
});
|
|
1742
|
-
function
|
|
1742
|
+
function Nr(e, t, n) {
|
|
1743
1743
|
if (t in e)
|
|
1744
1744
|
return Reflect.get(e, t, n);
|
|
1745
1745
|
throw new Error(`Requested unexpected property ${String(t)}`);
|
|
1746
1746
|
}
|
|
1747
|
-
function
|
|
1747
|
+
function jr(e, t) {
|
|
1748
1748
|
throw new Error(`Unexpectedly tried to set the ${String(t)} property.`);
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function Dr(e) {
|
|
1751
1751
|
const t = e.options.types ?? {};
|
|
1752
1752
|
let n = !1;
|
|
1753
1753
|
const i = {
|
|
1754
1754
|
...t?.compilerOptions,
|
|
1755
1755
|
// See comment above excludeOutsideFiles in ./textTransformers.ts for details
|
|
1756
1756
|
rootDir: "."
|
|
1757
|
-
}, s =
|
|
1757
|
+
}, s = os({
|
|
1758
1758
|
...t,
|
|
1759
1759
|
compilerOptions: i,
|
|
1760
1760
|
tsconfigPath: e.options.types?.tsconfigPath,
|
|
@@ -1765,7 +1765,7 @@ function jr(e) {
|
|
|
1765
1765
|
throw new Error("TypeScript errors reported. See error messages above");
|
|
1766
1766
|
return t?.afterDiagnostic?.(r);
|
|
1767
1767
|
},
|
|
1768
|
-
beforeWriteFile:
|
|
1768
|
+
beforeWriteFile: js(e),
|
|
1769
1769
|
resolvers: [
|
|
1770
1770
|
/**
|
|
1771
1771
|
* The vite-plugin-dts does not provide a way to get a reference to the
|
|
@@ -1789,7 +1789,7 @@ function jr(e) {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
},
|
|
1791
1791
|
...t?.resolvers ?? [],
|
|
1792
|
-
|
|
1792
|
+
kr(e)
|
|
1793
1793
|
]
|
|
1794
1794
|
});
|
|
1795
1795
|
return {
|
|
@@ -1810,7 +1810,7 @@ function jr(e) {
|
|
|
1810
1810
|
if (typeof c != "function")
|
|
1811
1811
|
throw new Error("Expected transform to be a function");
|
|
1812
1812
|
if (await a.call(this, r), await c.call(
|
|
1813
|
-
|
|
1813
|
+
Fr({}),
|
|
1814
1814
|
"",
|
|
1815
1815
|
/*
|
|
1816
1816
|
* Have to give it a file that will be matched by the tsconfig's
|
|
@@ -1822,7 +1822,7 @@ function jr(e) {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
};
|
|
1824
1824
|
}
|
|
1825
|
-
const
|
|
1825
|
+
const Rr = async (e) => Object.fromEntries(
|
|
1826
1826
|
(await e.componentFilesPromise).map((t) => [Xn(t), t])
|
|
1827
1827
|
), Xn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", mt.slice(0, -3))), bt = async (e, t, n = t) => await Je(n, { recursive: !0 }).catch((i) => {
|
|
1828
1828
|
if (String(i).includes("ENOENT"))
|
|
@@ -1840,83 +1840,83 @@ const Dr = async (e) => Object.fromEntries(
|
|
|
1840
1840
|
function ue(e, t) {
|
|
1841
1841
|
if (!e.startsWith(t) || !e.endsWith(".tsx"))
|
|
1842
1842
|
return !1;
|
|
1843
|
-
const [n, i] = e.slice(0, -4).split(u.sep).slice(
|
|
1843
|
+
const [n, i] = e.slice(0, -4).split(u.sep).slice(Mr);
|
|
1844
1844
|
return n === i;
|
|
1845
1845
|
}
|
|
1846
|
-
const
|
|
1846
|
+
const Mr = -2, Ht = 5, Ut = 1, zt = 1, qt = 3, Gt = 4, Be = o;
|
|
1847
1847
|
Or(Be.createSourceMapGenerator);
|
|
1848
|
-
|
|
1849
|
-
|
|
1848
|
+
Jr(Be.createTextWriter);
|
|
1849
|
+
Kr(Be.getNewLineCharacter);
|
|
1850
1850
|
const ce = Be;
|
|
1851
1851
|
function Or(e) {
|
|
1852
1852
|
if (typeof e != "function")
|
|
1853
1853
|
throw new Error(
|
|
1854
1854
|
"Failed to find ts.createSourceMapGenerator() function. Lumina needs to be updated to support the new TypeScript version"
|
|
1855
1855
|
);
|
|
1856
|
-
if (e.length !==
|
|
1856
|
+
if (e.length !== Ht)
|
|
1857
1857
|
throw new Error(
|
|
1858
|
-
`ts.createSourceMapGenerator() signature changed. Expected ${
|
|
1858
|
+
`ts.createSourceMapGenerator() signature changed. Expected ${Ht} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1859
1859
|
);
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1861
|
+
function Jr(e) {
|
|
1862
1862
|
if (typeof e != "function")
|
|
1863
1863
|
throw new Error(
|
|
1864
1864
|
"Failed to find ts.createTextWriter() function. Lumina needs to be updated to support the new TypeScript version"
|
|
1865
1865
|
);
|
|
1866
|
-
if (e.length !==
|
|
1866
|
+
if (e.length !== Ut)
|
|
1867
1867
|
throw new Error(
|
|
1868
|
-
`ts.createTextWriter() signature changed. Expected ${
|
|
1868
|
+
`ts.createTextWriter() signature changed. Expected ${Ut} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1869
1869
|
);
|
|
1870
1870
|
}
|
|
1871
|
-
function
|
|
1871
|
+
function Kr(e) {
|
|
1872
1872
|
if (typeof e != "function")
|
|
1873
1873
|
throw new Error(
|
|
1874
1874
|
"Failed to find ts.getNewLineCharacter() function. Lumina needs to be updated to support the new TypeScript version"
|
|
1875
1875
|
);
|
|
1876
|
-
if (e.length !==
|
|
1876
|
+
if (e.length !== zt)
|
|
1877
1877
|
throw new Error(
|
|
1878
|
-
`ts.getNewLineCharacter() signature changed. Expected ${
|
|
1878
|
+
`ts.getNewLineCharacter() signature changed. Expected ${zt} argument. Lumina needs to be updated to support the new TypeScript version`
|
|
1879
1879
|
);
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1881
|
+
function Br(e) {
|
|
1882
1882
|
if (typeof e != "function")
|
|
1883
1883
|
throw new Error(
|
|
1884
1884
|
"Failed to find ts.Printer.writeFile() function. Lumina needs to be updated to support the new TypeScript version"
|
|
1885
1885
|
);
|
|
1886
|
-
if (e.length !==
|
|
1886
|
+
if (e.length !== qt)
|
|
1887
1887
|
throw new Error(
|
|
1888
|
-
`ts.Printer.writeFile() signature changed. Expected ${
|
|
1888
|
+
`ts.Printer.writeFile() signature changed. Expected ${qt} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1889
1889
|
);
|
|
1890
1890
|
}
|
|
1891
|
-
function
|
|
1891
|
+
function Wr(e) {
|
|
1892
1892
|
if (typeof e != "function")
|
|
1893
1893
|
throw new Error(
|
|
1894
1894
|
"Failed to find ts.Printer.writeNode() function. Lumina needs to be updated to support the new TypeScript version"
|
|
1895
1895
|
);
|
|
1896
|
-
if (e.length !==
|
|
1896
|
+
if (e.length !== Gt)
|
|
1897
1897
|
throw new Error(
|
|
1898
|
-
`ts.Printer.writeNode() signature changed. Expected ${
|
|
1898
|
+
`ts.Printer.writeNode() signature changed. Expected ${Gt} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1899
1899
|
);
|
|
1900
1900
|
}
|
|
1901
1901
|
function Qn(e) {
|
|
1902
1902
|
const t = ce.createPrinter(e);
|
|
1903
|
-
return
|
|
1903
|
+
return Br(t.writeFile), Wr(t.writeNode), t;
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1906
|
-
const t = o.isUnionTypeNode(e) ? e.types.map(
|
|
1905
|
+
function Vt(e) {
|
|
1906
|
+
const t = o.isUnionTypeNode(e) ? e.types.map(Xt) : [Xt(e)], n = new Set(t), i = n.delete("true"), s = n.delete("false");
|
|
1907
1907
|
(i || s) && n.add("boolean");
|
|
1908
1908
|
let r = Array.from(n).sort();
|
|
1909
|
-
if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length >
|
|
1910
|
-
return r.map(
|
|
1909
|
+
if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > _r))
|
|
1910
|
+
return r.map(zr);
|
|
1911
1911
|
}
|
|
1912
|
-
const
|
|
1912
|
+
const _r = 40, Hr = (e) => e?.some(
|
|
1913
1913
|
(t) => t.type === "number" || t.type === "boolean" || t.type === "string" || /**
|
|
1914
1914
|
* Treat "any" as possibly literal, but not "unknown". Matches Stencil
|
|
1915
1915
|
* behavior.
|
|
1916
1916
|
*/
|
|
1917
1917
|
t.type === "any"
|
|
1918
|
-
) ?? !1,
|
|
1919
|
-
function
|
|
1918
|
+
) ?? !1, Ur = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, Yn = (e) => e.map(Zn).join(" | "), Zn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
|
|
1919
|
+
function zr(e) {
|
|
1920
1920
|
return e === "boolean" ? { type: "boolean" } : Number.isNaN(Number.parseFloat(e)) ? e.startsWith('"') || e.startsWith("'") ? {
|
|
1921
1921
|
value: e.slice(1, -1),
|
|
1922
1922
|
type: "string"
|
|
@@ -1927,50 +1927,50 @@ function Ur(e) {
|
|
|
1927
1927
|
type: "number"
|
|
1928
1928
|
};
|
|
1929
1929
|
}
|
|
1930
|
-
const
|
|
1930
|
+
const qr = (e, t, n, i) => {
|
|
1931
1931
|
const s = e.typeScriptTypeChecker, r = o.isSetAccessor(t) ? t.parameters[0] : t, a = s.getTypeAtLocation(r), c = !n;
|
|
1932
1932
|
return Le(s, a, i, e.dir, c);
|
|
1933
1933
|
};
|
|
1934
|
-
function
|
|
1934
|
+
function Gr(e, t) {
|
|
1935
1935
|
if (e.length === 0)
|
|
1936
1936
|
return;
|
|
1937
|
-
const n = t.matchAll(
|
|
1937
|
+
const n = t.matchAll(Vr), i = [];
|
|
1938
1938
|
for (const s of n) {
|
|
1939
1939
|
const r = e.find((a) => a.name === s[0]);
|
|
1940
1940
|
r !== void 0 && i.push({ ...r, start: s.index, end: s.index + r.name.length });
|
|
1941
1941
|
}
|
|
1942
1942
|
return i.length === 0 ? void 0 : i;
|
|
1943
1943
|
}
|
|
1944
|
-
const
|
|
1944
|
+
const Vr = /"[^"]+"|'[^"]+'|\w+/gu;
|
|
1945
1945
|
function Le(e, t, n, i, s = !1) {
|
|
1946
|
-
let { typeNode: r, references: a } =
|
|
1947
|
-
c === void 0 && ({ typeNode: r, references: a } =
|
|
1948
|
-
const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = Yn(l), p =
|
|
1946
|
+
let { typeNode: r, references: a } = Yt(e, t, n, i), c = Vt(r);
|
|
1947
|
+
c === void 0 && ({ typeNode: r, references: a } = Yt(e, t, n, i, !1), c = Vt(r) ?? []);
|
|
1948
|
+
const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = Yn(l), p = Ur(l), m = Gr(a, d);
|
|
1949
1949
|
return {
|
|
1950
1950
|
text: d,
|
|
1951
1951
|
references: m,
|
|
1952
1952
|
values: p
|
|
1953
1953
|
};
|
|
1954
1954
|
}
|
|
1955
|
-
function
|
|
1956
|
-
|
|
1955
|
+
function Xt(e) {
|
|
1956
|
+
Xr.writeNode(o.EmitHint.Unspecified, e, void 0, Ye);
|
|
1957
1957
|
const t = Ye.getText();
|
|
1958
1958
|
return Ye.clear(), t;
|
|
1959
1959
|
}
|
|
1960
|
-
const
|
|
1961
|
-
`), ei = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals,
|
|
1962
|
-
function
|
|
1960
|
+
const Xr = Qn({ removeComments: !0 }), Ye = ce.createTextWriter(`
|
|
1961
|
+
`), ei = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, Qr = ei & o.TypeFormatFlags.NodeBuilderFlagsMask, Yr = Qr | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
|
|
1962
|
+
function Zr(e, t, n, i = !0) {
|
|
1963
1963
|
const s = /* @__PURE__ */ new Map();
|
|
1964
1964
|
Y(t, s, n, i);
|
|
1965
|
-
const r = t.flags & o.TypeFlags.Union ? t.types.every(
|
|
1965
|
+
const r = t.flags & o.TypeFlags.Union ? t.types.every(Qt) : Qt(t), a = e.typeToTypeNode(
|
|
1966
1966
|
t,
|
|
1967
1967
|
void 0,
|
|
1968
|
-
|
|
1968
|
+
Yr & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
|
|
1969
1969
|
);
|
|
1970
|
-
return s.forEach(
|
|
1970
|
+
return s.forEach(eo), a === void 0 ? (console.error("Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
|
|
1971
1971
|
}
|
|
1972
|
-
const
|
|
1973
|
-
function
|
|
1972
|
+
const Qt = (e) => e.flags & o.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & o.TypeFlags.PossiblyFalsy);
|
|
1973
|
+
function Yt(e, t, n, i, s = !0) {
|
|
1974
1974
|
const r = [], a = /* @__PURE__ */ new Set();
|
|
1975
1975
|
function c(d, p) {
|
|
1976
1976
|
const m = d.aliasSymbol ?? d.symbol;
|
|
@@ -1999,10 +1999,10 @@ function Zt(e, t, n, i, s = !0) {
|
|
|
1999
1999
|
name: f,
|
|
2000
2000
|
package: void 0,
|
|
2001
2001
|
module: "index.js"
|
|
2002
|
-
} :
|
|
2002
|
+
} : to(m, f, n, i);
|
|
2003
2003
|
r.push(y), a.add(f);
|
|
2004
2004
|
}
|
|
2005
|
-
return { typeNode:
|
|
2005
|
+
return { typeNode: Zr(e, t, c, s), references: r };
|
|
2006
2006
|
}
|
|
2007
2007
|
function Y(e, t, n, i = !0) {
|
|
2008
2008
|
if (typeof e != "object" || e === null || !("checker" in e))
|
|
@@ -2032,10 +2032,10 @@ function Y(e, t, n, i = !0) {
|
|
|
2032
2032
|
c !== "resolvedBaseConstructorType" && c !== "resolvedBaseTypes" && c !== "typeParameters" && c !== "typeParameter" && (Array.isArray(l) ? l.forEach((d) => Y(d, t, n, i)) : Y(l, t, n, i));
|
|
2033
2033
|
});
|
|
2034
2034
|
}
|
|
2035
|
-
function
|
|
2035
|
+
function eo(e, t) {
|
|
2036
2036
|
e.origin !== void 0 && (t.origin = e.origin), e.aliasSymbol !== void 0 && (t.aliasSymbol = e.aliasSymbol), e.aliasTypeArguments !== void 0 && (t.aliasTypeArguments = e.aliasTypeArguments);
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2038
|
+
function to(e, t, n, i) {
|
|
2039
2039
|
const s = e?.declarations?.map((c) => c.getSourceFile()) ?? [];
|
|
2040
2040
|
if (s.length === 0) {
|
|
2041
2041
|
if (t === "Array")
|
|
@@ -2054,19 +2054,19 @@ function eo(e, t, n, i) {
|
|
|
2054
2054
|
package: Ln,
|
|
2055
2055
|
module: void 0
|
|
2056
2056
|
};
|
|
2057
|
-
const { packageName: r, moduleName: a } =
|
|
2057
|
+
const { packageName: r, moduleName: a } = no(s[0].fileName, i);
|
|
2058
2058
|
return r ? {
|
|
2059
2059
|
name: t,
|
|
2060
2060
|
package: r,
|
|
2061
2061
|
module: a.length > 0 ? a : void 0,
|
|
2062
|
-
viewUrl: r === "@arcgis/core" && a === "interfaces.d.ts" ?
|
|
2062
|
+
viewUrl: r === "@arcgis/core" && a === "interfaces.d.ts" ? Zt(e, s[0], "core") : r === "typescript" ? Zt(e, s[0], "typescript") : void 0
|
|
2063
2063
|
} : {
|
|
2064
2064
|
name: t,
|
|
2065
2065
|
package: void 0,
|
|
2066
2066
|
module: a
|
|
2067
2067
|
};
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2069
|
+
function no(e, t) {
|
|
2070
2070
|
const n = e.split("/node_modules/");
|
|
2071
2071
|
if (n.length > 1) {
|
|
2072
2072
|
const a = n.at(-1);
|
|
@@ -2074,41 +2074,41 @@ function to(e, t) {
|
|
|
2074
2074
|
}
|
|
2075
2075
|
const s = e.split("/dist/");
|
|
2076
2076
|
if (s.length > 1) {
|
|
2077
|
-
const a = s.slice(0, -1).join("/"), l =
|
|
2077
|
+
const a = s.slice(0, -1).join("/"), l = R(a).name, d = s.at(-1);
|
|
2078
2078
|
return { packageName: l, moduleName: d };
|
|
2079
2079
|
}
|
|
2080
2080
|
return {
|
|
2081
2081
|
packageName: void 0,
|
|
2082
|
-
moduleName: u.relative(t.root, io(
|
|
2082
|
+
moduleName: u.relative(t.root, so(io(e, t)))
|
|
2083
2083
|
};
|
|
2084
2084
|
}
|
|
2085
|
-
function
|
|
2085
|
+
function io(e, t) {
|
|
2086
2086
|
return ue(e, t.srcComponents) ? u.join(t.dist, Xn(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
|
|
2087
2087
|
}
|
|
2088
|
-
const
|
|
2088
|
+
const so = (e) => e.endsWith(".js") || e.endsWith(".d.ts") ? e : `${e.endsWith(".ts") ? e.slice(0, -3) : e.endsWith(".tsx") ? e.slice(0, -4) : e}.d.ts`;
|
|
2089
2089
|
function ti(e) {
|
|
2090
2090
|
const t = e.split("/"), i = e[0].startsWith("@") ? 2 : 1, s = t.slice(0, i).join("/"), r = t.slice(i).join("/");
|
|
2091
2091
|
return { packageName: s, moduleName: r };
|
|
2092
2092
|
}
|
|
2093
|
-
const
|
|
2094
|
-
function
|
|
2093
|
+
const ro = (e) => e.includes("/node_modules/") || e.includes("/dist/");
|
|
2094
|
+
function Zt(e, t, n) {
|
|
2095
2095
|
const i = e.declarations;
|
|
2096
2096
|
if (i !== void 0)
|
|
2097
2097
|
for (const s of i) {
|
|
2098
|
-
const r =
|
|
2098
|
+
const r = en(s, t, n);
|
|
2099
2099
|
if (r !== void 0)
|
|
2100
2100
|
return r;
|
|
2101
2101
|
if (!("members" in s))
|
|
2102
2102
|
continue;
|
|
2103
2103
|
const a = s.members;
|
|
2104
2104
|
for (const c of a) {
|
|
2105
|
-
const l =
|
|
2105
|
+
const l = en(c, t, n);
|
|
2106
2106
|
if (l !== void 0)
|
|
2107
|
-
return
|
|
2107
|
+
return oo(l);
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2111
|
+
function en(e, t, n) {
|
|
2112
2112
|
const i = e.jsDoc?.[0];
|
|
2113
2113
|
if (i !== void 0)
|
|
2114
2114
|
return ee([i, ...i.tags ?? []], ({ comment: s }) => {
|
|
@@ -2128,17 +2128,17 @@ function tn(e, t, n) {
|
|
|
2128
2128
|
});
|
|
2129
2129
|
});
|
|
2130
2130
|
}
|
|
2131
|
-
const
|
|
2132
|
-
function
|
|
2131
|
+
const oo = (e) => e.split("#")[0];
|
|
2132
|
+
function ao(e) {
|
|
2133
2133
|
const t = [];
|
|
2134
|
-
for (const n of e.matchAll(
|
|
2135
|
-
const i = n.groups.name, s = n.groups.description.replaceAll(
|
|
2134
|
+
for (const n of e.matchAll(co)) {
|
|
2135
|
+
const i = n.groups.name, s = n.groups.description.replaceAll(lo, " ").trim();
|
|
2136
2136
|
t.push({ name: i, description: s.endsWith("*") ? s.slice(0, -1).trim() : s });
|
|
2137
2137
|
}
|
|
2138
2138
|
return t.length === 0 ? void 0 : t;
|
|
2139
2139
|
}
|
|
2140
|
-
const
|
|
2141
|
-
name:
|
|
2140
|
+
const co = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, lo = /\n\s+\*? ?/gu, po = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Fe = new RegExp(`\\.(${po.join("|")})(\\?|$)`, "u"), uo = /^import ["'](?<specifier>[^"']+)["'];$/gmu, mo = () => "throwError", tn = "@arcgis/lumina:loadLitCss", V = "?layered", Pe = "?global", fo = (e) => ({
|
|
2141
|
+
name: tn,
|
|
2142
2142
|
enforce: "pre",
|
|
2143
2143
|
configResolved(t) {
|
|
2144
2144
|
const n = t.plugins.find(({ name: s }) => s === "vite:css-post");
|
|
@@ -2150,18 +2150,18 @@ const ao = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, co = /\n\s+\
|
|
|
2150
2150
|
n.transform = async function(r, a) {
|
|
2151
2151
|
const c = a.endsWith(V);
|
|
2152
2152
|
c && (a = a.slice(0, -V.length));
|
|
2153
|
-
const l = a.endsWith(
|
|
2154
|
-
if (l && (a = a.slice(0, -
|
|
2153
|
+
const l = a.endsWith(Pe);
|
|
2154
|
+
if (l && (a = a.slice(0, -Pe.length)), !Fe.test(a) || a.includes("?"))
|
|
2155
2155
|
return await i.call(this, r, a);
|
|
2156
2156
|
const d = `${a}?inline`, p = await i.call(this, r, d), { code: m, ...f } = typeof p == "string" ? { code: p } : p ?? {};
|
|
2157
2157
|
if (typeof m != "string" || !m.startsWith(ni) || !m.endsWith(ii))
|
|
2158
2158
|
return console.warn(
|
|
2159
|
-
`${
|
|
2159
|
+
`${tn} Expected vite:css-post to return a JS module with a string literal for ${A(a)}.`
|
|
2160
2160
|
), console.log(p), p;
|
|
2161
2161
|
if (l)
|
|
2162
2162
|
return e._globalCssString = si(m), { code: "", map: { mappings: "" } };
|
|
2163
2163
|
{
|
|
2164
|
-
const y = e.isFullApiExtraction ?
|
|
2164
|
+
const y = e.isFullApiExtraction ? ao(r) : void 0;
|
|
2165
2165
|
if (y !== void 0) {
|
|
2166
2166
|
e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, y);
|
|
2167
2167
|
const h = e._cssImports.get(a);
|
|
@@ -2181,7 +2181,7 @@ const ao = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, co = /\n\s+\
|
|
|
2181
2181
|
}
|
|
2182
2182
|
return {
|
|
2183
2183
|
...f,
|
|
2184
|
-
code:
|
|
2184
|
+
code: vo(m, e.hmrEnabled, e.shouldMinify, c),
|
|
2185
2185
|
/**
|
|
2186
2186
|
* Vite's original transform does not generate source maps for inlined
|
|
2187
2187
|
* css, thus we can't either
|
|
@@ -2195,21 +2195,21 @@ const ao = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, co = /\n\s+\
|
|
|
2195
2195
|
if (!(n.endsWith(".js") || n.endsWith(".ts") || n.endsWith(".tsx") || e.isInStorybook && n.endsWith(".mdx")))
|
|
2196
2196
|
return;
|
|
2197
2197
|
let s = 0;
|
|
2198
|
-
const r =
|
|
2198
|
+
const r = ro(n);
|
|
2199
2199
|
let a = !1;
|
|
2200
|
-
const c = t.replaceAll(
|
|
2200
|
+
const c = t.replaceAll(uo, (l, d) => {
|
|
2201
2201
|
if (!Fe.test(d) || d.includes("?"))
|
|
2202
2202
|
return l;
|
|
2203
2203
|
if (r) {
|
|
2204
|
-
if ((e.options.css?.sideEffectImportHandling ??
|
|
2205
|
-
return a = !0,
|
|
2204
|
+
if ((e.options.css?.sideEffectImportHandling ?? mo)(d, n) === "drop")
|
|
2205
|
+
return a = !0, qs(l);
|
|
2206
2206
|
{
|
|
2207
2207
|
const f = A(u.relative(Ae(), n));
|
|
2208
2208
|
throw new Error(
|
|
2209
2209
|
`Found a side-effect CSS import \`${l}\` in "${f}". 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`
|
|
2210
2210
|
);
|
|
2211
2211
|
}
|
|
2212
|
-
} else if (e.isInStorybook &&
|
|
2212
|
+
} else if (e.isInStorybook && So(n, e)) {
|
|
2213
2213
|
a = !0;
|
|
2214
2214
|
const p = `storybookCss$${s}`;
|
|
2215
2215
|
return s += 1, [
|
|
@@ -2224,7 +2224,7 @@ const ao = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, co = /\n\s+\
|
|
|
2224
2224
|
".styleSheet];"
|
|
2225
2225
|
].join("");
|
|
2226
2226
|
} else {
|
|
2227
|
-
if (d.endsWith(
|
|
2227
|
+
if (d.endsWith(Pe))
|
|
2228
2228
|
return l;
|
|
2229
2229
|
{
|
|
2230
2230
|
const p = A(u.relative(Ae(), n));
|
|
@@ -2239,7 +2239,7 @@ const ao = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, co = /\n\s+\
|
|
|
2239
2239
|
map: null
|
|
2240
2240
|
} : void 0;
|
|
2241
2241
|
}
|
|
2242
|
-
}), ni = 'export default "', ii = '"',
|
|
2242
|
+
}), ni = 'export default "', ii = '"', yo = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", ho = "`;\nexport default styles;", go = `
|
|
2243
2243
|
|
|
2244
2244
|
if(import.meta.hot) {
|
|
2245
2245
|
import.meta.hot.data.styles ??= styles;
|
|
@@ -2251,25 +2251,25 @@ if(import.meta.hot) {
|
|
|
2251
2251
|
import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
|
|
2252
2252
|
});
|
|
2253
2253
|
}`, si = (e) => e.slice(ni.length, -ii.length);
|
|
2254
|
-
function
|
|
2255
|
-
const r = si(e).replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("\\r", ""), a = Ke(
|
|
2254
|
+
function vo(e, t, n, i) {
|
|
2255
|
+
const r = si(e).replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("\\r", ""), a = Ke(wo(r)), c = i ? `@layer{${n ? "" : `
|
|
2256
2256
|
`}${a}${n ? "" : `
|
|
2257
2257
|
`}}` : a;
|
|
2258
|
-
return `${
|
|
2258
|
+
return `${yo}${c}${ho}${t ? go : ""}`;
|
|
2259
2259
|
}
|
|
2260
|
-
const
|
|
2261
|
-
`),
|
|
2262
|
-
function
|
|
2263
|
-
return `import("${
|
|
2264
|
-
setCustomElementsManifest(${
|
|
2260
|
+
const wo = (e) => e.replaceAll("\\n", `
|
|
2261
|
+
`), So = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
|
|
2262
|
+
function bo(e) {
|
|
2263
|
+
return `import("${To}").then(({ setCustomElementsManifest }) => {
|
|
2264
|
+
setCustomElementsManifest(${Eo(e)});
|
|
2265
2265
|
});`;
|
|
2266
2266
|
}
|
|
2267
|
-
const
|
|
2268
|
-
function
|
|
2267
|
+
const To = "@storybook/web-components", Eo = (e) => `JSON.parse(\`${Co(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
|
|
2268
|
+
function Co(e) {
|
|
2269
2269
|
return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
|
|
2270
2270
|
}
|
|
2271
|
-
function
|
|
2272
|
-
|
|
2271
|
+
function $o(e) {
|
|
2272
|
+
Po(e);
|
|
2273
2273
|
const t = e.options.css?.globalStylesPath;
|
|
2274
2274
|
if (t === void 0)
|
|
2275
2275
|
return "";
|
|
@@ -2279,10 +2279,10 @@ function Co(e) {
|
|
|
2279
2279
|
"document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalStyles.styleSheet!];",
|
|
2280
2280
|
oi("", e)
|
|
2281
2281
|
].join(`
|
|
2282
|
-
`) : `import "${n}${
|
|
2282
|
+
`) : `import "${n}${Pe}";`;
|
|
2283
2283
|
}
|
|
2284
2284
|
const ri = "hydrated";
|
|
2285
|
-
function
|
|
2285
|
+
function Po(e) {
|
|
2286
2286
|
e._globalHydratedCssString = [
|
|
2287
2287
|
":not([",
|
|
2288
2288
|
e.options.css?.hydratedAttribute ?? ri,
|
|
@@ -2293,7 +2293,7 @@ function $o(e) {
|
|
|
2293
2293
|
}
|
|
2294
2294
|
function oi(e, t) {
|
|
2295
2295
|
return [
|
|
2296
|
-
"const globalCss = new CSSStyleSheet
|
|
2296
|
+
"const globalCss = new CSSStyleSheet;",
|
|
2297
2297
|
`globalCss.replaceSync("@layer{${`${t._globalHydratedCssString}${t.shouldMinify ? "" : "\\n\\n"}${e || ""}`}}");`,
|
|
2298
2298
|
"document.adoptedStyleSheets = [...document.adoptedStyleSheets, globalCss];"
|
|
2299
2299
|
].join(`
|
|
@@ -2302,12 +2302,12 @@ function oi(e, t) {
|
|
|
2302
2302
|
const xo = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
|
|
2303
2303
|
|
|
2304
2304
|
`}${e._globalCssString ? JSON.parse(`"${e._globalCssString}"`) : ""}`;
|
|
2305
|
-
function
|
|
2305
|
+
function Io(e) {
|
|
2306
2306
|
const t = [], n = [];
|
|
2307
2307
|
for (const s of e.privateApiJson.modules) {
|
|
2308
2308
|
t.push(s.path);
|
|
2309
2309
|
for (const r of s.declarations)
|
|
2310
|
-
"customElement" in r && n.push(
|
|
2310
|
+
"customElement" in r && n.push(ko(r, e, s.path));
|
|
2311
2311
|
}
|
|
2312
2312
|
return [
|
|
2313
2313
|
// Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
|
|
@@ -2315,29 +2315,29 @@ function Po(e) {
|
|
|
2315
2315
|
e.viteCommand === "build" && e.options.build?.ssr?.stencilCompatibility?.enabled === !0 ? 'import "@lit-labs/ssr-client/lit-element-hydrate-support.js";' : "",
|
|
2316
2316
|
'import { runtime } from "./runtime";',
|
|
2317
2317
|
'import { makeDefineCustomElements } from "@arcgis/lumina";',
|
|
2318
|
-
|
|
2319
|
-
e.hmrEnabled ?
|
|
2318
|
+
$o(e),
|
|
2319
|
+
e.hmrEnabled ? Fo : "",
|
|
2320
2320
|
"",
|
|
2321
|
-
e.isInStorybook ?
|
|
2321
|
+
e.isInStorybook ? bo(e.apiJson) : "",
|
|
2322
2322
|
"",
|
|
2323
2323
|
"export const defineCustomElements = makeDefineCustomElements(runtime, {",
|
|
2324
2324
|
n.join(`,
|
|
2325
2325
|
`),
|
|
2326
2326
|
"});",
|
|
2327
|
-
e.hmrEnabled ?
|
|
2327
|
+
e.hmrEnabled ? No(t) : ""
|
|
2328
2328
|
].join(`
|
|
2329
2329
|
`);
|
|
2330
2330
|
}
|
|
2331
|
-
const
|
|
2332
|
-
export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`,
|
|
2331
|
+
const Ao = `import "./index";
|
|
2332
|
+
export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, ko = (e, t, n) => [
|
|
2333
2333
|
` "${e.tagName}": [`,
|
|
2334
2334
|
`()=>import("${u.join(t.dir.root, n)}"),`,
|
|
2335
|
-
|
|
2335
|
+
Lo(e),
|
|
2336
2336
|
"]"
|
|
2337
2337
|
].join("");
|
|
2338
|
-
function
|
|
2339
|
-
const { properties: t, asyncMethods: n, syncMethods: i } = ai(e), s = t.map((p) => p.join(
|
|
2340
|
-
return d.length > 0 ? `"${d.join(
|
|
2338
|
+
function Lo(e) {
|
|
2339
|
+
const { properties: t, asyncMethods: n, syncMethods: i } = ai(e), s = t.map((p) => p.join(vs)).join(Ge), r = n.join(Ge), a = i.join(Ge), c = [s, r, a], l = c.findLastIndex((p) => p.length > 0), d = c.slice(0, l + 1);
|
|
2340
|
+
return d.length > 0 ? `"${d.join(ws)}"` : "";
|
|
2341
2341
|
}
|
|
2342
2342
|
function ai(e) {
|
|
2343
2343
|
const t = e.members.filter((r) => r.kind === "field").map((r) => {
|
|
@@ -2352,8 +2352,8 @@ function ai(e) {
|
|
|
2352
2352
|
), i = n.filter((r) => r.async === !0).map((r) => r.name), s = n.filter((r) => r.async !== !0).map((r) => r.name);
|
|
2353
2353
|
return { tagName: e.tagName, properties: t, asyncMethods: i, syncMethods: s };
|
|
2354
2354
|
}
|
|
2355
|
-
const
|
|
2356
|
-
`,
|
|
2355
|
+
const Fo = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
|
|
2356
|
+
`, No = (e) => `
|
|
2357
2357
|
if(import.meta.hot) {
|
|
2358
2358
|
import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
|
|
2359
2359
|
import.meta.hot.accept([
|
|
@@ -2362,11 +2362,11 @@ ${e.map((t) => ` "/${t}",`).join(`
|
|
|
2362
2362
|
], handleHmrUpdate);
|
|
2363
2363
|
}`;
|
|
2364
2364
|
function ct(e, t) {
|
|
2365
|
-
const n =
|
|
2365
|
+
const n = Ro(t.getJsDocTags());
|
|
2366
2366
|
let i = o.displayPartsToString(t.getDocumentationComment(e));
|
|
2367
2367
|
i = i.replaceAll(ci, li);
|
|
2368
2368
|
{
|
|
2369
|
-
const s = n.at(-1), r = s?.text?.indexOf(
|
|
2369
|
+
const s = n.at(-1), r = s?.text?.indexOf(jo);
|
|
2370
2370
|
r !== void 0 && r !== -1 && (i += s.text.slice(r), s.text = s.text?.slice(0, r));
|
|
2371
2371
|
}
|
|
2372
2372
|
return {
|
|
@@ -2374,19 +2374,19 @@ function ct(e, t) {
|
|
|
2374
2374
|
description: i || void 0
|
|
2375
2375
|
};
|
|
2376
2376
|
}
|
|
2377
|
-
const
|
|
2377
|
+
const jo = `
|
|
2378
2378
|
|
|
2379
|
-
[Read more...]`,
|
|
2379
|
+
[Read more...]`, Do = "internal", ci = /\{@link(?:code|plain)? ([^}]+)\}/gu;
|
|
2380
2380
|
function li(e, t) {
|
|
2381
2381
|
let n = t.indexOf(" ");
|
|
2382
2382
|
n === -1 && (n = t.length);
|
|
2383
2383
|
const i = t.slice(0, n);
|
|
2384
2384
|
return `[${t.slice(n + 1) || i}](${i})`;
|
|
2385
2385
|
}
|
|
2386
|
-
const
|
|
2386
|
+
const Ro = (e) => e.map((t) => ({
|
|
2387
2387
|
name: t.name,
|
|
2388
2388
|
text: t.text?.map((n) => n.text).join("").replaceAll(ci, li)
|
|
2389
|
-
})),
|
|
2389
|
+
})), nn = ({ modifiers: e = [] }, t) => ee(
|
|
2390
2390
|
e,
|
|
2391
2391
|
(n) => o.isDecorator(n) && o.isCallExpression(n.expression) && o.isIdentifier(n.expression.expression) && n.expression.expression.text === t ? n.expression : void 0
|
|
2392
2392
|
);
|
|
@@ -2395,7 +2395,7 @@ function le(e, t, n, i) {
|
|
|
2395
2395
|
if (i ??= s === void 0 ? void 0 : ct(t, s), i !== void 0) {
|
|
2396
2396
|
for (const r of i.docsTags) {
|
|
2397
2397
|
const { name: a, text: c } = r;
|
|
2398
|
-
a === "deprecated" ? n.deprecated = c || !0 : a === "summary" ? n.summary = c : a === "default" ? n.default = c : a === "readonly" ? n.readonly = !0 : a === "notPublic" ? (console.warn("The @notPublic JSDoc tag is deprecated. Use @internal or @private instead."), n.docsTags ??= [], n.docsTags.push({ name:
|
|
2398
|
+
a === "deprecated" ? n.deprecated = c || !0 : a === "summary" ? n.summary = c : a === "default" ? n.default = c : a === "readonly" ? n.readonly = !0 : a === "notPublic" ? (console.warn("The @notPublic JSDoc tag is deprecated. Use @internal or @private instead."), n.docsTags ??= [], n.docsTags.push({ name: Do, text: c })) : a === "private" ? n.privacy = "private" : a === "csspart" ? n.cssParts.push(Ze(c)) : a === "cssstate" ? n.cssStates.push(Ze(c)) : a === "slot" ? n.slots.push(Ze(c)) : (n.docsTags ??= [], n.docsTags.push(r));
|
|
2399
2399
|
}
|
|
2400
2400
|
n.description = i.description;
|
|
2401
2401
|
}
|
|
@@ -2418,7 +2418,7 @@ function Ze(e) {
|
|
|
2418
2418
|
description: s
|
|
2419
2419
|
};
|
|
2420
2420
|
}
|
|
2421
|
-
const
|
|
2421
|
+
const Mo = "@arcgis/lumina:addMethodMetadata";
|
|
2422
2422
|
function Oo(e, t, n, i, s) {
|
|
2423
2423
|
const r = n.getSignatureFromDeclaration(e);
|
|
2424
2424
|
if (r === void 0)
|
|
@@ -2426,7 +2426,7 @@ function Oo(e, t, n, i, s) {
|
|
|
2426
2426
|
for (const d of e.parameters) {
|
|
2427
2427
|
if (!o.isIdentifier(d.name)) {
|
|
2428
2428
|
console.warn(
|
|
2429
|
-
`${
|
|
2429
|
+
`${Mo}: Object binding patterns are not yet supported in the docs. Found ${d.name?.getText(i)} in ${e.name.getText(i)} in ${A(i.fileName)}`
|
|
2430
2430
|
);
|
|
2431
2431
|
return;
|
|
2432
2432
|
}
|
|
@@ -2445,8 +2445,8 @@ function Oo(e, t, n, i, s) {
|
|
|
2445
2445
|
type: c
|
|
2446
2446
|
}, t.signature = l.replace(" =>", ":");
|
|
2447
2447
|
}
|
|
2448
|
-
const
|
|
2449
|
-
function
|
|
2448
|
+
const Jo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
|
|
2449
|
+
function Ko(e, t, n, i) {
|
|
2450
2450
|
const s = n.typeScriptTypeChecker, a = s.getTypeAtLocation(e).getProperty("emit");
|
|
2451
2451
|
if (a?.valueDeclaration === void 0)
|
|
2452
2452
|
return;
|
|
@@ -2471,11 +2471,11 @@ function Jo(e, t, n, i) {
|
|
|
2471
2471
|
composed: void 0,
|
|
2472
2472
|
privacy: void 0
|
|
2473
2473
|
};
|
|
2474
|
-
return le(e.name, s, y),
|
|
2474
|
+
return le(e.name, s, y), Bo(e, y, i), y.privacy === void 0 ? y : void 0;
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
2477
2477
|
const Te = "createEvent";
|
|
2478
|
-
function
|
|
2478
|
+
function Bo(e, t, n) {
|
|
2479
2479
|
if (!e.initializer || !o.isCallExpression(e.initializer))
|
|
2480
2480
|
return;
|
|
2481
2481
|
const i = e.initializer;
|
|
@@ -2503,7 +2503,7 @@ function Z(e, t) {
|
|
|
2503
2503
|
throw new Error(`Expected boolean literal. Instead found ${e?.getText(t)}`);
|
|
2504
2504
|
}
|
|
2505
2505
|
const Tt = "@arcgis/lumina-compiler";
|
|
2506
|
-
class
|
|
2506
|
+
class Wo extends as {
|
|
2507
2507
|
constructor(t, n) {
|
|
2508
2508
|
super({ isFullApiExtraction: t.isFullApiExtraction, cwd: t.dir.root }), this.context = t, this.isPathOnly = n, this.localCssImports = void 0, this.localDeclaredComponents = void 0, this.indexedComponents = /* @__PURE__ */ new Map(), this.apiComponent = void 0, this.pairedSetter = void 0, this._resolvedInheritance = /* @__PURE__ */ new Map();
|
|
2509
2509
|
}
|
|
@@ -2515,12 +2515,12 @@ class Bo extends os {
|
|
|
2515
2515
|
const n = super.extractModules(t);
|
|
2516
2516
|
for (const i of n)
|
|
2517
2517
|
for (const s of i.declarations)
|
|
2518
|
-
"customElement" in s && (this.context.isFullApiExtraction &&
|
|
2518
|
+
"customElement" in s && (this.context.isFullApiExtraction && Uo(s, this.context, this.indexedComponents), this.inheritMembers(s, n), this.context.isFullApiExtraction && (s.members.sort(et), s.attributes?.sort(et), s.events?.sort(et)));
|
|
2519
2519
|
return n;
|
|
2520
2520
|
}
|
|
2521
2521
|
extractDeclarations(t) {
|
|
2522
2522
|
return this.localDeclaredComponents = new Map(
|
|
2523
|
-
|
|
2523
|
+
On(t.text)?.map(([n, i]) => [i, n]) ?? []
|
|
2524
2524
|
), this.localDeclaredComponents.size === 0 ? [] : super.extractDeclarations(t);
|
|
2525
2525
|
}
|
|
2526
2526
|
extractDeclaration(t) {
|
|
@@ -2562,7 +2562,7 @@ class Bo extends os {
|
|
|
2562
2562
|
* prefix (Arcgis), where as tag name always does. This also matches
|
|
2563
2563
|
* Stencil's behavior.
|
|
2564
2564
|
*/
|
|
2565
|
-
pascalCaseName:
|
|
2565
|
+
pascalCaseName: ps(i),
|
|
2566
2566
|
privacy: void 0,
|
|
2567
2567
|
importPath: "",
|
|
2568
2568
|
members: [],
|
|
@@ -2585,7 +2585,7 @@ class Bo extends os {
|
|
|
2585
2585
|
}
|
|
2586
2586
|
if (this.apiComponent = s, s.members = this.extractComponentMembers(t), this.context.isFullApiExtraction) {
|
|
2587
2587
|
s.attributes = this.inferAttributes(s.members), this.indexedComponents.set(n, s);
|
|
2588
|
-
const a =
|
|
2588
|
+
const a = $s(i, this.context, this.apiModule.path);
|
|
2589
2589
|
if (s.importPath = `components/${a}`, this.localCssImports !== void 0) {
|
|
2590
2590
|
for (const m of this.localCssImports) {
|
|
2591
2591
|
const f = this.context._cssImports.get(m);
|
|
@@ -2655,7 +2655,7 @@ ${c}.componentOnReady().then(() => {
|
|
|
2655
2655
|
return n;
|
|
2656
2656
|
}
|
|
2657
2657
|
extractComponentMember(t, n) {
|
|
2658
|
-
if (
|
|
2658
|
+
if (cs(t) || n === void 0) {
|
|
2659
2659
|
o.isPropertyDeclaration(t) && o.isIdentifier(t.name) && t.name.text === "shadowRootOptions" && t.initializer !== void 0 && o.isIdentifier(t.initializer) && t.initializer.text === "noShadowRoot" && (this.apiComponent.encapsulation = "none");
|
|
2660
2660
|
return;
|
|
2661
2661
|
}
|
|
@@ -2692,13 +2692,13 @@ ${c}.componentOnReady().then(() => {
|
|
|
2692
2692
|
inheritedFrom: void 0,
|
|
2693
2693
|
privacy: void 0
|
|
2694
2694
|
};
|
|
2695
|
-
return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !
|
|
2695
|
+
return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !Hr(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
|
|
2696
2696
|
}
|
|
2697
2697
|
/**
|
|
2698
2698
|
* Based on a `non-@property()` property, extract a public event if it is one.
|
|
2699
2699
|
*/
|
|
2700
2700
|
extractComponentEvent(t, n) {
|
|
2701
|
-
return
|
|
2701
|
+
return Ko(t, n, this.context, this.file);
|
|
2702
2702
|
}
|
|
2703
2703
|
/**
|
|
2704
2704
|
* When doing full API extraction, extract additional details for a field.
|
|
@@ -2708,9 +2708,9 @@ ${c}.componentOnReady().then(() => {
|
|
|
2708
2708
|
le(t.name, this.context.typeScriptTypeChecker, n, a);
|
|
2709
2709
|
let l = !i && n.readonly === !0;
|
|
2710
2710
|
const d = this.pairedSetter ?? t, p = n.default;
|
|
2711
|
-
|
|
2711
|
+
jt(t, n, this.file);
|
|
2712
2712
|
const m = p === void 0 && n.default === "true", f = n.docsTags?.some((v) => v.name === "required") ?? !1;
|
|
2713
|
-
n.type =
|
|
2713
|
+
n.type = qr(this.context, d, f, this.file);
|
|
2714
2714
|
const y = o.isPropertyDeclaration(t) && t.type !== void 0 && t.initializer !== void 0 && o.isPropertyAccessExpression(t.initializer) && o.isPropertyAccessExpression(t.initializer.expression) && t.initializer.expression.expression.kind === o.SyntaxKind.ThisKeyword && o.isIdentifier(t.initializer.expression.name) && o.isIdentifier(t.initializer.name);
|
|
2715
2715
|
if ("initializer" in t && t.initializer !== void 0 && (!n.default || !n.description) || y) {
|
|
2716
2716
|
const v = t.initializer, g = s.getSymbolAtLocation(v), w = g !== void 0 && (g.flags ?? 0) & o.SymbolFlags.Alias ? s.getAliasedSymbol(g) : g, T = w?.getDeclarations() ?? [];
|
|
@@ -2730,7 +2730,7 @@ ${c}.componentOnReady().then(() => {
|
|
|
2730
2730
|
if (C ??= o.isGetAccessor(E) ? E : void 0, $ ??= o.isSetAccessor(E) ? E : void 0, !("initializer" in E))
|
|
2731
2731
|
return;
|
|
2732
2732
|
const S = E;
|
|
2733
|
-
l ||= S.modifiers?.some((b) => b.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1,
|
|
2733
|
+
l ||= S.modifiers?.some((b) => b.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, jt(S, n, S.getSourceFile());
|
|
2734
2734
|
}), y && C !== void 0 && $ !== void 0 && C.type?.getText() !== $.parameters[0]?.type?.getText() && (n.getterType = { text: `typeof ${v.getText(this.file)}` });
|
|
2735
2735
|
}
|
|
2736
2736
|
if (l && (n.readonly = !0, i || (n.docsOnlyReadonly = !0)), n.type.values && n.type.values.length > 0 && n.type.values?.every((v) => v.type === "boolean") && (n.default ? m && this.context.viteCommand === "build" && n.deprecated === void 0 && this.context.logLintError(
|
|
@@ -2746,11 +2746,11 @@ ${c}.componentOnReady().then(() => {
|
|
|
2746
2746
|
* Find the properties given to the `@property()` decorator.
|
|
2747
2747
|
*/
|
|
2748
2748
|
findPropertyOptions(t) {
|
|
2749
|
-
const n =
|
|
2749
|
+
const n = nn(t, "property");
|
|
2750
2750
|
return n === void 0 ? void 0 : n.arguments?.find(o.isObjectLiteralExpression)?.properties ?? [];
|
|
2751
2751
|
}
|
|
2752
2752
|
extractComponentMethod(t, n) {
|
|
2753
|
-
if (
|
|
2753
|
+
if (nn(t, "method") === void 0)
|
|
2754
2754
|
return;
|
|
2755
2755
|
const i = {
|
|
2756
2756
|
kind: "method",
|
|
@@ -2763,7 +2763,7 @@ ${c}.componentOnReady().then(() => {
|
|
|
2763
2763
|
inheritedFrom: void 0,
|
|
2764
2764
|
docsTags: void 0,
|
|
2765
2765
|
signature: "",
|
|
2766
|
-
async:
|
|
2766
|
+
async: Jo(t) ? !0 : void 0,
|
|
2767
2767
|
privacy: void 0
|
|
2768
2768
|
};
|
|
2769
2769
|
if (this.context.isFullApiExtraction) {
|
|
@@ -2863,16 +2863,16 @@ const re = {
|
|
|
2863
2863
|
name: "LitElement",
|
|
2864
2864
|
package: "@arcgis/lumina"
|
|
2865
2865
|
}, et = (e, t) => e.name.localeCompare(t.name);
|
|
2866
|
-
async function
|
|
2866
|
+
async function _o(e, t) {
|
|
2867
2867
|
t || (e.componentFilesPromise = bt(e, e.dir.srcComponents));
|
|
2868
|
-
const n = await e.componentFilesPromise, i = await
|
|
2868
|
+
const n = await e.componentFilesPromise, i = await Yo(e, n);
|
|
2869
2869
|
e._componentPathMapping = {}, e._localDefinedComponents = void 0;
|
|
2870
2870
|
const s = di(i, e, !1);
|
|
2871
2871
|
e.privateApiJson = s;
|
|
2872
2872
|
const [r, a] = pi(s);
|
|
2873
2873
|
return e.apiJsonComponents = a, e.apiJson = r, s;
|
|
2874
2874
|
}
|
|
2875
|
-
function
|
|
2875
|
+
function Ho(e, t, n) {
|
|
2876
2876
|
const i = e.getSourceFile(t, n), s = di([i], e, !0), r = s.modules[0];
|
|
2877
2877
|
{
|
|
2878
2878
|
const f = pi(s)[0].modules[0], y = e.apiJson.modules.findIndex((g) => g.path === f.path), h = e.apiJson.modules[y], v = Array.from(e.apiJson.modules);
|
|
@@ -2898,7 +2898,7 @@ function _o(e, t, n) {
|
|
|
2898
2898
|
return d ||= m.length !== p.length, d ? void 0 : m;
|
|
2899
2899
|
}
|
|
2900
2900
|
function di(e, t, n) {
|
|
2901
|
-
const i = t.options.apiJson?.Extractor ??
|
|
2901
|
+
const i = t.options.apiJson?.Extractor ?? Wo, r = new i(t, n).extract(e);
|
|
2902
2902
|
return t.options.apiJson?.afterCreate?.(r, n), r;
|
|
2903
2903
|
}
|
|
2904
2904
|
function pi(e) {
|
|
@@ -2917,7 +2917,7 @@ function pi(e) {
|
|
|
2917
2917
|
}
|
|
2918
2918
|
return [t, n];
|
|
2919
2919
|
}
|
|
2920
|
-
function
|
|
2920
|
+
function Uo(e, t, n) {
|
|
2921
2921
|
e.members.forEach((i) => {
|
|
2922
2922
|
if (i.kind === "field")
|
|
2923
2923
|
Ee(i.type, n, t);
|
|
@@ -2930,14 +2930,14 @@ function Ho(e, t, n) {
|
|
|
2930
2930
|
}
|
|
2931
2931
|
function Ee(e, t, n) {
|
|
2932
2932
|
e !== void 0 && (e.references?.reduce(
|
|
2933
|
-
(i, s) =>
|
|
2933
|
+
(i, s) => zo(s, t, n, i),
|
|
2934
2934
|
0
|
|
2935
2935
|
), e.text = e.text.replaceAll(
|
|
2936
|
-
|
|
2936
|
+
Qo,
|
|
2937
2937
|
(i, s) => Et(t.get(s)) ?? i
|
|
2938
|
-
), e.values?.forEach(
|
|
2938
|
+
), e.values?.forEach(qo, t));
|
|
2939
2939
|
}
|
|
2940
|
-
function
|
|
2940
|
+
function zo(e, t, n, i) {
|
|
2941
2941
|
if (i > 0 && (e.start !== void 0 && (e.start += i), e.end !== void 0 && (e.end += i)), e.package !== void 0)
|
|
2942
2942
|
return i;
|
|
2943
2943
|
if (e.module?.startsWith("dist/components/") === !0)
|
|
@@ -2947,17 +2947,17 @@ function Uo(e, t, n, i) {
|
|
|
2947
2947
|
if (s !== void 0) {
|
|
2948
2948
|
const r = e.name.length;
|
|
2949
2949
|
e.name = Et(s);
|
|
2950
|
-
const a = e.name.length - r -
|
|
2951
|
-
e.viewUrl = s.demos?.at(0)?.url, e.start = e.start -
|
|
2950
|
+
const a = e.name.length - r - sn;
|
|
2951
|
+
e.viewUrl = s.demos?.at(0)?.url, e.start = e.start - sn, e.end = e.end + a, i += a - Xo;
|
|
2952
2952
|
}
|
|
2953
2953
|
}
|
|
2954
2954
|
return i;
|
|
2955
2955
|
}
|
|
2956
|
-
function
|
|
2956
|
+
function qo(e) {
|
|
2957
2957
|
e.type.startsWith("ToElement<") && (e.type = Et(this.get(e.type.slice(10, -1))) ?? e.type);
|
|
2958
2958
|
}
|
|
2959
|
-
const Et = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0,
|
|
2960
|
-
async function
|
|
2959
|
+
const Et = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, Go = "ToElement<", sn = Go.length, Vo = ">", Xo = Vo.length, Qo = /ToElement<(\w+)>/gu;
|
|
2960
|
+
async function Yo(e, t) {
|
|
2961
2961
|
if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
|
|
2962
2962
|
const n = e.typeScriptProgram.getSourceFiles(), i = new Set(t);
|
|
2963
2963
|
return n.filter((s) => i.has(s.fileName));
|
|
@@ -2970,9 +2970,9 @@ async function Qo(e, t) {
|
|
|
2970
2970
|
);
|
|
2971
2971
|
}
|
|
2972
2972
|
async function ui(e) {
|
|
2973
|
-
return me ??=
|
|
2973
|
+
return me ??= ea(e), await me;
|
|
2974
2974
|
}
|
|
2975
|
-
function
|
|
2975
|
+
function Zo() {
|
|
2976
2976
|
if (lt === void 0)
|
|
2977
2977
|
throw new Error(
|
|
2978
2978
|
"Component dependencies have not yet been initialized. Await componentDependenciesPromise promise first."
|
|
@@ -2986,13 +2986,13 @@ function mi() {
|
|
|
2986
2986
|
);
|
|
2987
2987
|
return dt;
|
|
2988
2988
|
}
|
|
2989
|
-
async function
|
|
2990
|
-
const t =
|
|
2991
|
-
[...Object.keys(n), ...Object.keys(i)].filter((a) => !
|
|
2989
|
+
async function ea(e) {
|
|
2990
|
+
const t = R(e), n = t.dependencies ?? {}, i = t.peerDependencies ?? {}, r = (await Promise.all(
|
|
2991
|
+
[...Object.keys(n), ...Object.keys(i)].filter((a) => !ta.has(a)).flatMap(async (a) => await fi(a, e))
|
|
2992
2992
|
)).filter(j);
|
|
2993
2993
|
return lt ??= r, dt = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
|
|
2994
2994
|
}
|
|
2995
|
-
const
|
|
2995
|
+
const ta = /* @__PURE__ */ new Set([
|
|
2996
2996
|
"@arcgis/arcade-languageservice",
|
|
2997
2997
|
"@arcgis/components-build-utils",
|
|
2998
2998
|
"@arcgis/components-utils",
|
|
@@ -3030,28 +3030,28 @@ const ea = /* @__PURE__ */ new Set([
|
|
|
3030
3030
|
]);
|
|
3031
3031
|
let lt, dt, me;
|
|
3032
3032
|
async function fi(e, t) {
|
|
3033
|
-
const n = await
|
|
3033
|
+
const n = await Me(e, t), i = await Oe(n), s = "exports" in i, r = aa.bind(void 0, s), a = "@stencil/core" in (i.dependencies ?? {}) || "@stencil/core" in (i.devDependencies ?? {}), c = u.join(n, "dist/esm/loader.js");
|
|
3034
3034
|
if (a ? await H(c) : !1) {
|
|
3035
|
-
const y = await O(c, "utf8"), h =
|
|
3035
|
+
const y = await O(c, "utf8"), h = na(y, "bootstrapLazy("), v = y.indexOf(", options", h), g = y.slice(h, v), w = g.startsWith('JSON.parse("') ? g.slice(12, -2).replaceAll('\\"', '"') : g;
|
|
3036
3036
|
try {
|
|
3037
|
-
const T = JSON.parse(w), C =
|
|
3037
|
+
const T = JSON.parse(w), C = ra(T, { packageName: e, getImportPath: r });
|
|
3038
3038
|
return { packageName: e, type: "stencil", components: C };
|
|
3039
3039
|
} catch (T) {
|
|
3040
3040
|
console.warn(`@arcgis/lumina: Failed to parse dist/esm/loader.js for ${e}.
|
|
3041
3041
|
Error: ${String(T)}`);
|
|
3042
3042
|
}
|
|
3043
3043
|
}
|
|
3044
|
-
const d =
|
|
3044
|
+
const d = rn(i.customElements);
|
|
3045
3045
|
if (d != null) {
|
|
3046
|
-
const y = u.join(n, d), h = JSON.parse(await O(y, "utf-8")), v =
|
|
3046
|
+
const y = u.join(n, d), h = JSON.parse(await O(y, "utf-8")), v = ia(h), g = yi(h, {
|
|
3047
3047
|
packageName: e,
|
|
3048
3048
|
getImportPath: r
|
|
3049
3049
|
});
|
|
3050
3050
|
return { type: v ? "@arcgis/lumina" : "unknown", packageName: e, components: g };
|
|
3051
3051
|
}
|
|
3052
|
-
const p =
|
|
3052
|
+
const p = rn(i["web-types"]);
|
|
3053
3053
|
if (p != null) {
|
|
3054
|
-
const y = u.join(n, p), h = JSON.parse(await O(y, "utf-8")), v =
|
|
3054
|
+
const y = u.join(n, p), h = JSON.parse(await O(y, "utf-8")), v = sa(h, {
|
|
3055
3055
|
packageName: e,
|
|
3056
3056
|
getImportPath: r,
|
|
3057
3057
|
packageRoot: n
|
|
@@ -3060,15 +3060,15 @@ Error: ${String(T)}`);
|
|
|
3060
3060
|
}
|
|
3061
3061
|
const m = u.join(n, "dist/components");
|
|
3062
3062
|
if (await H(m)) {
|
|
3063
|
-
const y = await
|
|
3063
|
+
const y = await oa(m, {
|
|
3064
3064
|
packageName: e,
|
|
3065
3065
|
getImportPath: r
|
|
3066
3066
|
});
|
|
3067
3067
|
return { type: "unknown", packageName: e, components: y };
|
|
3068
3068
|
}
|
|
3069
3069
|
}
|
|
3070
|
-
const
|
|
3071
|
-
function
|
|
3070
|
+
const rn = (e) => Array.isArray(e) ? e[0] : e;
|
|
3071
|
+
function na(e, t) {
|
|
3072
3072
|
const n = e.indexOf(t);
|
|
3073
3073
|
return n === -1 ? -1 : n + t.length;
|
|
3074
3074
|
}
|
|
@@ -3090,7 +3090,7 @@ function yi(e, t) {
|
|
|
3090
3090
|
}
|
|
3091
3091
|
return n;
|
|
3092
3092
|
}
|
|
3093
|
-
const
|
|
3093
|
+
const ia = (e) => e.compiler?.name === Tt, sa = (e, t) => Object.fromEntries(
|
|
3094
3094
|
(e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
|
|
3095
3095
|
(n) => [
|
|
3096
3096
|
n.name,
|
|
@@ -3101,7 +3101,7 @@ const na = (e) => e.compiler?.name === Tt, ia = (e, t) => Object.fromEntries(
|
|
|
3101
3101
|
}
|
|
3102
3102
|
]
|
|
3103
3103
|
) ?? []
|
|
3104
|
-
),
|
|
3104
|
+
), ra = (e, t) => Object.fromEntries(
|
|
3105
3105
|
e.flatMap(
|
|
3106
3106
|
([n, i]) => i.map(
|
|
3107
3107
|
([s, r, a]) => [
|
|
@@ -3119,7 +3119,7 @@ const na = (e) => e.compiler?.name === Tt, ia = (e, t) => Object.fromEntries(
|
|
|
3119
3119
|
]
|
|
3120
3120
|
)
|
|
3121
3121
|
)
|
|
3122
|
-
),
|
|
3122
|
+
), oa = async (e, t) => Object.fromEntries(
|
|
3123
3123
|
(await Je(e)).filter((n) => n.endsWith(".d.ts")).map((n) => {
|
|
3124
3124
|
const i = n.slice(0, -5);
|
|
3125
3125
|
return [
|
|
@@ -3131,12 +3131,12 @@ const na = (e) => e.compiler?.name === Tt, ia = (e, t) => Object.fromEntries(
|
|
|
3131
3131
|
}
|
|
3132
3132
|
];
|
|
3133
3133
|
})
|
|
3134
|
-
),
|
|
3135
|
-
function We(e =
|
|
3134
|
+
), aa = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, ca = (e) => e.startsWith("/") ? e : `/${e}`, Ct = (e, t) => `${e}@fs${ca(t)}`;
|
|
3135
|
+
function We(e = R(), t = !1, n = e.name === "@esri/calcite-components") {
|
|
3136
3136
|
const i = e.version.includes("next");
|
|
3137
3137
|
if (e.name === "@esri/calcite-components" && i)
|
|
3138
3138
|
return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
|
|
3139
|
-
const s = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r =
|
|
3139
|
+
const s = t || i ? "jsdev.arcgis.com" : "js.arcgis.com", r = la(e.name), a = da(e.version, n);
|
|
3140
3140
|
return [
|
|
3141
3141
|
"https://",
|
|
3142
3142
|
s,
|
|
@@ -3147,8 +3147,8 @@ function We(e = M(), t = !1, n = e.name === "@esri/calcite-components") {
|
|
|
3147
3147
|
"/"
|
|
3148
3148
|
].join("");
|
|
3149
3149
|
}
|
|
3150
|
-
const
|
|
3151
|
-
function
|
|
3150
|
+
const la = (e) => e.split("/").pop() ?? e;
|
|
3151
|
+
function da(e, t) {
|
|
3152
3152
|
if (/\d+\.\d+\.\d+-(?:.*)$/u.test(e))
|
|
3153
3153
|
return "next";
|
|
3154
3154
|
const i = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/u, s = e.match(i);
|
|
@@ -3158,8 +3158,8 @@ function la(e, t) {
|
|
|
3158
3158
|
}
|
|
3159
3159
|
return "next";
|
|
3160
3160
|
}
|
|
3161
|
-
async function
|
|
3162
|
-
const s = t.packageName, r = await
|
|
3161
|
+
async function pa(e, t, n, i) {
|
|
3162
|
+
const s = t.packageName, r = await Me(s), a = await Oe(r), c = ua(a);
|
|
3163
3163
|
if (c === void 0)
|
|
3164
3164
|
throw new Error(`Failed to infer the CDN namespace name for the ${s}`);
|
|
3165
3165
|
const [l, d] = c, p = d.slice(0, -4);
|
|
@@ -3186,7 +3186,7 @@ async function da(e, t, n, i) {
|
|
|
3186
3186
|
]
|
|
3187
3187
|
};
|
|
3188
3188
|
}
|
|
3189
|
-
function
|
|
3189
|
+
function ua(e) {
|
|
3190
3190
|
const n = Object.values(e.exports ?? {}).find(
|
|
3191
3191
|
(c) => typeof c == "string" && c.endsWith(".css") && c.split("/").length === 4
|
|
3192
3192
|
);
|
|
@@ -3195,8 +3195,8 @@ function pa(e) {
|
|
|
3195
3195
|
const [i, s, r, a] = n.split("/");
|
|
3196
3196
|
return [r, a];
|
|
3197
3197
|
}
|
|
3198
|
-
const
|
|
3199
|
-
function
|
|
3198
|
+
const ma = ["keyed", "ref", "repeat", "live"], ie = "staticHtml", X = "staticSvg", se = "html", te = "svg", hi = Symbol("maybe HTML namespace or maybe SVG"), gi = "css", vi = "mathml", wi = [gi, se, vi, ie, X, te], fa = new Set(wi), ya = ["safeClassMap", "safeStyleMap", "deferLoad"], ha = "nothing", ga = [...ma, ...wi, ...ya, ha], Ne = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
|
|
3199
|
+
function on(e, t, n) {
|
|
3200
3200
|
if (Q(e))
|
|
3201
3201
|
return e;
|
|
3202
3202
|
{
|
|
@@ -3215,14 +3215,14 @@ function Q(e) {
|
|
|
3215
3215
|
return (
|
|
3216
3216
|
// Inlined string literal
|
|
3217
3217
|
typeof e == "string" || // Syntax kinds that are never undefined
|
|
3218
|
-
|
|
3218
|
+
va.has(e.kind) || // Ternary with both branches never undefined
|
|
3219
3219
|
o.isConditionalExpression(e) && Q(e.whenTrue) && Q(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
|
|
3220
|
-
o.isBinaryExpression(e) && (
|
|
3220
|
+
o.isBinaryExpression(e) && (wa.has(e.operatorToken.kind) || Q(e.left) && Q(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
|
|
3221
3221
|
(o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && Q(e.expression) || // JSX that got converted to html`<p>Something</p>`
|
|
3222
|
-
o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) &&
|
|
3222
|
+
o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && fa.has(e.tag.text)
|
|
3223
3223
|
);
|
|
3224
3224
|
}
|
|
3225
|
-
const
|
|
3225
|
+
const va = /* @__PURE__ */ new Set([
|
|
3226
3226
|
o.SyntaxKind.NumericLiteral,
|
|
3227
3227
|
o.SyntaxKind.BigIntLiteral,
|
|
3228
3228
|
o.SyntaxKind.StringLiteral,
|
|
@@ -3241,7 +3241,7 @@ const ga = /* @__PURE__ */ new Set([
|
|
|
3241
3241
|
o.SyntaxKind.ClassExpression,
|
|
3242
3242
|
// Trust? Trust.
|
|
3243
3243
|
o.SyntaxKind.NonNullExpression
|
|
3244
|
-
]),
|
|
3244
|
+
]), wa = /* @__PURE__ */ new Set([
|
|
3245
3245
|
o.SyntaxKind.PlusEqualsToken,
|
|
3246
3246
|
o.SyntaxKind.MinusEqualsToken,
|
|
3247
3247
|
o.SyntaxKind.AsteriskAsteriskEqualsToken,
|
|
@@ -3276,9 +3276,9 @@ const ga = /* @__PURE__ */ new Set([
|
|
|
3276
3276
|
o.SyntaxKind.SlashToken,
|
|
3277
3277
|
o.SyntaxKind.PercentToken,
|
|
3278
3278
|
o.SyntaxKind.AsteriskAsteriskToken
|
|
3279
|
-
]),
|
|
3279
|
+
]), Sa = {
|
|
3280
3280
|
property(e, t, n, i) {
|
|
3281
|
-
const s =
|
|
3281
|
+
const s = ba(i, n, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
|
|
3282
3282
|
if (a) {
|
|
3283
3283
|
const f = nt(t);
|
|
3284
3284
|
if (f === !0)
|
|
@@ -3286,16 +3286,16 @@ const ga = /* @__PURE__ */ new Set([
|
|
|
3286
3286
|
if (f === !1)
|
|
3287
3287
|
return [];
|
|
3288
3288
|
}
|
|
3289
|
-
const c = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] :
|
|
3289
|
+
const c = t === void 0 ? ["=", o.factory.createToken(o.SyntaxKind.TrueKeyword)] : xe(e, t, a), l = c[0] !== "=";
|
|
3290
3290
|
if (a && l)
|
|
3291
3291
|
return [s.name, ...c];
|
|
3292
3292
|
const [d, p] = c, m = s?.type === "stringifiedNonReflected";
|
|
3293
3293
|
if (r || m) {
|
|
3294
|
-
const f =
|
|
3294
|
+
const f = on(
|
|
3295
3295
|
p,
|
|
3296
3296
|
e,
|
|
3297
3297
|
m ? "" : void 0
|
|
3298
|
-
), h = n === "value" && (i === "input" || i === "textarea" || i === ke) ?
|
|
3298
|
+
), h = n === "value" && (i === "input" || i === "textarea" || i === ke) ? Ea(f, e) : f;
|
|
3299
3299
|
if (h !== p)
|
|
3300
3300
|
return [m ? `.${n}` : s.name, d, h];
|
|
3301
3301
|
}
|
|
@@ -3307,12 +3307,12 @@ const ga = /* @__PURE__ */ new Set([
|
|
|
3307
3307
|
return [n];
|
|
3308
3308
|
if (i === !1)
|
|
3309
3309
|
return [];
|
|
3310
|
-
const s =
|
|
3310
|
+
const s = xe(e, t, !0), a = s[0] !== "=" ? s : [s[0], on(s[1], e)];
|
|
3311
3311
|
return [n, ...a];
|
|
3312
3312
|
},
|
|
3313
3313
|
booleanAttribute(e, t, n) {
|
|
3314
3314
|
const i = t === void 0 || nt(t);
|
|
3315
|
-
return i === !0 ? [n] : i === !1 ? [] : [`?${n}`, ...
|
|
3315
|
+
return i === !0 ? [n] : i === !1 ? [] : [`?${n}`, ...xe(e, t, !1)];
|
|
3316
3316
|
},
|
|
3317
3317
|
event(e, t, n) {
|
|
3318
3318
|
if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
|
|
@@ -3320,7 +3320,7 @@ const ga = /* @__PURE__ */ new Set([
|
|
|
3320
3320
|
`Event prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
|
|
3321
3321
|
);
|
|
3322
3322
|
const i = n.slice(2), s = rt(i);
|
|
3323
|
-
return [`@${zn.has(s) ? i.toLowerCase() : rt(i)}=`, ...
|
|
3323
|
+
return [`@${zn.has(s) ? i.toLowerCase() : rt(i)}=`, ...Pt(e, t, void 0)];
|
|
3324
3324
|
},
|
|
3325
3325
|
directives(e, t) {
|
|
3326
3326
|
if (t === void 0 || !o.isJsxExpression(t))
|
|
@@ -3352,8 +3352,8 @@ const ga = /* @__PURE__ */ new Set([
|
|
|
3352
3352
|
])
|
|
3353
3353
|
];
|
|
3354
3354
|
},
|
|
3355
|
-
class:
|
|
3356
|
-
style:
|
|
3355
|
+
class: cn,
|
|
3356
|
+
style: cn,
|
|
3357
3357
|
key: (e, t) => [$t(t, e.sourceFile)],
|
|
3358
3358
|
deferLoad(e, t, n, i) {
|
|
3359
3359
|
if (typeof i != "string")
|
|
@@ -3365,7 +3365,7 @@ const ga = /* @__PURE__ */ new Set([
|
|
|
3365
3365
|
return [o.factory.createIdentifier(s)];
|
|
3366
3366
|
}
|
|
3367
3367
|
};
|
|
3368
|
-
function
|
|
3368
|
+
function ba(e, t, n) {
|
|
3369
3369
|
if (typeof e == "string") {
|
|
3370
3370
|
const r = (n.externalComponents[e] ?? n.localComponents[e])?.propToAttribute?.[t];
|
|
3371
3371
|
if (r !== void 0)
|
|
@@ -3414,16 +3414,16 @@ function nt(e) {
|
|
|
3414
3414
|
return !1;
|
|
3415
3415
|
}
|
|
3416
3416
|
}
|
|
3417
|
-
function
|
|
3417
|
+
function xe(e, t, n = !1) {
|
|
3418
3418
|
if (Ne(t))
|
|
3419
3419
|
throw new Error(
|
|
3420
3420
|
`Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
|
|
3421
3421
|
);
|
|
3422
3422
|
if (o.isStringLiteral(t))
|
|
3423
|
-
return
|
|
3423
|
+
return an(t, n);
|
|
3424
3424
|
if (o.isJsxExpression(t) && t.expression) {
|
|
3425
3425
|
if (o.isStringLiteral(t.expression))
|
|
3426
|
-
return
|
|
3426
|
+
return an(t.expression, n);
|
|
3427
3427
|
if (n) {
|
|
3428
3428
|
if (o.isNumericLiteral(t.expression))
|
|
3429
3429
|
return [`=${t.expression.text}`];
|
|
@@ -3431,16 +3431,16 @@ function Pe(e, t, n = !1) {
|
|
|
3431
3431
|
return [`=${t.expression.getText(e.sourceFile)}`];
|
|
3432
3432
|
}
|
|
3433
3433
|
}
|
|
3434
|
-
return ["=", ...
|
|
3434
|
+
return ["=", ...Pt(e, t, void 0)];
|
|
3435
3435
|
}
|
|
3436
|
-
function
|
|
3436
|
+
function an(e, t) {
|
|
3437
3437
|
if (!t)
|
|
3438
3438
|
return ["=", e];
|
|
3439
3439
|
const n = e.text;
|
|
3440
3440
|
if (n.length === 0)
|
|
3441
3441
|
return [];
|
|
3442
3442
|
const i = Gn(n);
|
|
3443
|
-
if (
|
|
3443
|
+
if (vr(i)) {
|
|
3444
3444
|
const s = i.replaceAll('"', """);
|
|
3445
3445
|
if (s.length > i.length) {
|
|
3446
3446
|
const r = i.replaceAll("'", "'");
|
|
@@ -3451,7 +3451,7 @@ function cn(e, t) {
|
|
|
3451
3451
|
} else
|
|
3452
3452
|
return [`=${i}`];
|
|
3453
3453
|
}
|
|
3454
|
-
function
|
|
3454
|
+
function cn(e, t, n) {
|
|
3455
3455
|
if (t !== void 0 && o.isStringLiteral(t))
|
|
3456
3456
|
return [`${n}="${t.text}"`];
|
|
3457
3457
|
if (t === void 0 || !o.isJsxExpression(t) || t.expression === void 0)
|
|
@@ -3459,7 +3459,7 @@ function ln(e, t, n) {
|
|
|
3459
3459
|
`${n} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
|
|
3460
3460
|
);
|
|
3461
3461
|
const i = t.expression;
|
|
3462
|
-
if (
|
|
3462
|
+
if (Ta(i)) {
|
|
3463
3463
|
const r = n === "class" ? "safeClassMap" : "safeStyleMap";
|
|
3464
3464
|
e.neededImports.add(r);
|
|
3465
3465
|
const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
|
|
@@ -3467,20 +3467,20 @@ function ln(e, t, n) {
|
|
|
3467
3467
|
]);
|
|
3468
3468
|
return [`${n}=`, c];
|
|
3469
3469
|
} else
|
|
3470
|
-
return [n, ...
|
|
3470
|
+
return [n, ...xe(e, t, !0)];
|
|
3471
3471
|
}
|
|
3472
|
-
const
|
|
3473
|
-
function
|
|
3472
|
+
const Ta = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
|
|
3473
|
+
function Ea(e, t) {
|
|
3474
3474
|
t.neededImports.add("live");
|
|
3475
3475
|
const n = t.importRenames.live;
|
|
3476
3476
|
return o.factory.createCallExpression(o.factory.createIdentifier(n), void 0, [
|
|
3477
3477
|
typeof e == "string" ? o.factory.createStringLiteral(e) : e
|
|
3478
3478
|
]);
|
|
3479
3479
|
}
|
|
3480
|
-
function
|
|
3481
|
-
if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in
|
|
3480
|
+
function Ca(e) {
|
|
3481
|
+
if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in ln && e.expression.arguments.length <= 1)
|
|
3482
3482
|
return {
|
|
3483
|
-
propType:
|
|
3483
|
+
propType: ln[e.expression.expression.text],
|
|
3484
3484
|
// To simplify checking logic in convertProps, wrap expression in JSX expression
|
|
3485
3485
|
initializer: o.factory.createJsxExpression(
|
|
3486
3486
|
void 0,
|
|
@@ -3489,21 +3489,21 @@ function Ea(e) {
|
|
|
3489
3489
|
)
|
|
3490
3490
|
};
|
|
3491
3491
|
}
|
|
3492
|
-
const
|
|
3492
|
+
const ln = {
|
|
3493
3493
|
bindProperty: "property",
|
|
3494
3494
|
bindAttribute: "attribute",
|
|
3495
3495
|
bindBooleanAttribute: "booleanAttribute",
|
|
3496
3496
|
bindEvent: "event"
|
|
3497
3497
|
};
|
|
3498
|
-
function
|
|
3498
|
+
function $a(e, t, n) {
|
|
3499
3499
|
return xa.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (_n.has(e) || e.includes("-")) && (e !== "itemId" || n !== "arcgis-map" && n !== "arcgis-scene") ? "attribute" : !gt(n) && (Hn.has(e) || (n === ot ? !1 : n === ke ? (
|
|
3500
3500
|
// When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
|
|
3501
3501
|
Object.values(at).some((r) => r.has(e))
|
|
3502
|
-
) : at[n]?.has(e) === !0)) ?
|
|
3502
|
+
) : at[n]?.has(e) === !0)) ? Jt.has(e) ? "booleanAttribute" : "attribute" : n === "svg" || n === "math" || n === ot || n !== ke && (yt.has(n) || ht.has(n)) ? e in B.common.reflected || e in B.common.stringifiedReflected || e in B.common.stringifiedNonReflected ? "property" : Jt.has(e) ? "booleanAttribute" : "attribute" : "property";
|
|
3503
3503
|
}
|
|
3504
|
-
const
|
|
3504
|
+
const Pa = ["class", "style", "ref", "directives", "key", "deferLoad"], xa = new Set(Pa), Ia = (e) => typeof e != "string" || e.trim().length > 0;
|
|
3505
3505
|
function _e({ key: e, parts: t, litTag: n }, i) {
|
|
3506
|
-
const s =
|
|
3506
|
+
const s = Aa(t);
|
|
3507
3507
|
if (s.length % 2 === 0)
|
|
3508
3508
|
throw new Error("Normalized template parts array length must be odd");
|
|
3509
3509
|
const [r, ...a] = s;
|
|
@@ -3526,12 +3526,12 @@ function _e({ key: e, parts: t, litTag: n }, i) {
|
|
|
3526
3526
|
void 0,
|
|
3527
3527
|
a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(d, d) : o.factory.createTemplateExpression(
|
|
3528
3528
|
o.factory.createTemplateHead(d, d),
|
|
3529
|
-
|
|
3529
|
+
ka(a)
|
|
3530
3530
|
)
|
|
3531
3531
|
);
|
|
3532
3532
|
return it(i, e, p);
|
|
3533
3533
|
}
|
|
3534
|
-
const
|
|
3534
|
+
const Aa = (e) => e.reduce(
|
|
3535
3535
|
(t, n, i) => {
|
|
3536
3536
|
const s = t.at(-1), r = typeof s == "string", a = typeof n == "string";
|
|
3537
3537
|
if (r && a)
|
|
@@ -3541,7 +3541,7 @@ const Ia = (e) => e.reduce(
|
|
|
3541
3541
|
},
|
|
3542
3542
|
[""]
|
|
3543
3543
|
);
|
|
3544
|
-
function
|
|
3544
|
+
function ka(e) {
|
|
3545
3545
|
if (!(e.length % 2 === 0))
|
|
3546
3546
|
throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
|
|
3547
3547
|
const n = e.length / 2;
|
|
@@ -3573,7 +3573,7 @@ function it(e, t, n) {
|
|
|
3573
3573
|
const i = e.importRenames.keyed;
|
|
3574
3574
|
return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [t, n]);
|
|
3575
3575
|
}
|
|
3576
|
-
function
|
|
3576
|
+
function La(e, t) {
|
|
3577
3577
|
if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
|
|
3578
3578
|
return t;
|
|
3579
3579
|
const i = t.arguments[0];
|
|
@@ -3585,7 +3585,7 @@ function ka(e, t) {
|
|
|
3585
3585
|
return t;
|
|
3586
3586
|
const c = fe(i.body);
|
|
3587
3587
|
let l = !0, d;
|
|
3588
|
-
if (
|
|
3588
|
+
if (dn(c))
|
|
3589
3589
|
d = c;
|
|
3590
3590
|
else {
|
|
3591
3591
|
if (!o.isBlock(c))
|
|
@@ -3594,7 +3594,7 @@ function ka(e, t) {
|
|
|
3594
3594
|
if (!(g && o.isReturnStatement(g) && g.expression))
|
|
3595
3595
|
return t;
|
|
3596
3596
|
const T = fe(g.expression);
|
|
3597
|
-
if (!
|
|
3597
|
+
if (!dn(T))
|
|
3598
3598
|
return t;
|
|
3599
3599
|
const C = c.statements.slice(0, -1);
|
|
3600
3600
|
if (C.some(Si))
|
|
@@ -3607,7 +3607,7 @@ function ka(e, t) {
|
|
|
3607
3607
|
const f = p.attributes.properties[m];
|
|
3608
3608
|
if (f === void 0 || !o.isJsxAttribute(f))
|
|
3609
3609
|
return t;
|
|
3610
|
-
const y = $t(f.initializer, e.sourceFile), h =
|
|
3610
|
+
const y = $t(f.initializer, e.sourceFile), h = Fa(r, i, y, l, e);
|
|
3611
3611
|
if (h === void 0)
|
|
3612
3612
|
return t;
|
|
3613
3613
|
e.liftedKeys.add(f.name), e.neededImports.add("repeat");
|
|
@@ -3629,7 +3629,7 @@ function ka(e, t) {
|
|
|
3629
3629
|
)
|
|
3630
3630
|
]);
|
|
3631
3631
|
}
|
|
3632
|
-
const
|
|
3632
|
+
const dn = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e);
|
|
3633
3633
|
function Si(e) {
|
|
3634
3634
|
if (o.isReturnStatement(e))
|
|
3635
3635
|
return !0;
|
|
@@ -3640,7 +3640,7 @@ function Si(e) {
|
|
|
3640
3640
|
void 0
|
|
3641
3641
|
), t;
|
|
3642
3642
|
}
|
|
3643
|
-
function
|
|
3643
|
+
function Fa(e, t, n, i, s) {
|
|
3644
3644
|
const r = K(n);
|
|
3645
3645
|
if (r === void 0)
|
|
3646
3646
|
return;
|
|
@@ -3654,7 +3654,7 @@ function La(e, t, n, i, s) {
|
|
|
3654
3654
|
return;
|
|
3655
3655
|
}
|
|
3656
3656
|
if (!i) {
|
|
3657
|
-
const l =
|
|
3657
|
+
const l = ja(r, a, t);
|
|
3658
3658
|
if (l === void 0)
|
|
3659
3659
|
return;
|
|
3660
3660
|
a = l;
|
|
@@ -3684,7 +3684,7 @@ function K(e) {
|
|
|
3684
3684
|
const t = K(e.left), n = K(e.right);
|
|
3685
3685
|
return t === void 0 || n === void 0 ? void 0 : [...t, ...n];
|
|
3686
3686
|
} else {
|
|
3687
|
-
if (
|
|
3687
|
+
if (Na.has(e.kind))
|
|
3688
3688
|
return [];
|
|
3689
3689
|
{
|
|
3690
3690
|
const t = fe(e);
|
|
@@ -3692,7 +3692,7 @@ function K(e) {
|
|
|
3692
3692
|
}
|
|
3693
3693
|
}
|
|
3694
3694
|
}
|
|
3695
|
-
const
|
|
3695
|
+
const Na = /* @__PURE__ */ new Set([
|
|
3696
3696
|
o.SyntaxKind.NumericLiteral,
|
|
3697
3697
|
o.SyntaxKind.BigIntLiteral,
|
|
3698
3698
|
o.SyntaxKind.StringLiteral,
|
|
@@ -3701,12 +3701,12 @@ const Fa = /* @__PURE__ */ new Set([
|
|
|
3701
3701
|
o.SyntaxKind.FalseKeyword,
|
|
3702
3702
|
o.SyntaxKind.NullKeyword,
|
|
3703
3703
|
o.SyntaxKind.TrueKeyword
|
|
3704
|
-
]), fe = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? fe(e.expression) : e, bi = (e, t) => o.isObjectBindingPattern(e) ?
|
|
3705
|
-
function
|
|
3704
|
+
]), fe = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? fe(e.expression) : e, bi = (e, t) => o.isObjectBindingPattern(e) ? Ma(e, t) : e;
|
|
3705
|
+
function ja(e, t, n) {
|
|
3706
3706
|
if (e.every(je, t))
|
|
3707
3707
|
return t;
|
|
3708
3708
|
if (o.isIdentifier(t)) {
|
|
3709
|
-
const i = o.isBlock(n.body) ? ee(n.body.statements, (r) =>
|
|
3709
|
+
const i = o.isBlock(n.body) ? ee(n.body.statements, (r) => Da(r, t)) : void 0;
|
|
3710
3710
|
if (i === void 0)
|
|
3711
3711
|
return;
|
|
3712
3712
|
const s = bi(i, e);
|
|
@@ -3714,7 +3714,7 @@ function Na(e, t, n) {
|
|
|
3714
3714
|
return s;
|
|
3715
3715
|
}
|
|
3716
3716
|
}
|
|
3717
|
-
function
|
|
3717
|
+
function Da(e, t) {
|
|
3718
3718
|
if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
|
|
3719
3719
|
return;
|
|
3720
3720
|
const n = e.declarationList.declarations[0];
|
|
@@ -3722,19 +3722,19 @@ function ja(e, t) {
|
|
|
3722
3722
|
}
|
|
3723
3723
|
function je(e) {
|
|
3724
3724
|
const t = this;
|
|
3725
|
-
return o.isIdentifier(t) ? t.text === e : t.elements.some(
|
|
3725
|
+
return o.isIdentifier(t) ? t.text === e : t.elements.some(Ra, e);
|
|
3726
3726
|
}
|
|
3727
|
-
function
|
|
3727
|
+
function Ra(e) {
|
|
3728
3728
|
const t = this;
|
|
3729
3729
|
return o.isOmittedExpression(e) ? !1 : je.call(e.name, t);
|
|
3730
3730
|
}
|
|
3731
|
-
function
|
|
3731
|
+
function Ma(e, t) {
|
|
3732
3732
|
let n = !1;
|
|
3733
3733
|
const i = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (n = !0, !0));
|
|
3734
3734
|
return n || i.length === 0 ? e : o.factory.updateObjectBindingPattern(e, i);
|
|
3735
3735
|
}
|
|
3736
3736
|
const Ti = (e, t) => t.liftedKeys.has(e), Oa = (e) => e.apiJsonComponents.map(({ name: t, importPath: n }) => `import type { ${t} } from "./${n}";`).join(`
|
|
3737
|
-
`),
|
|
3737
|
+
`), Ja = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, He = (e) => !Ja.test(e), ge = (e) => He(e) ? `"${e}"` : e;
|
|
3738
3738
|
function Ue(e, t) {
|
|
3739
3739
|
const n = [], i = [];
|
|
3740
3740
|
let s = !1;
|
|
@@ -3748,7 +3748,7 @@ function Ue(e, t) {
|
|
|
3748
3748
|
}
|
|
3749
3749
|
m.docsTags?.some((y) => y.name === "required") ? n.push(p.name) : i.push(p.name);
|
|
3750
3750
|
});
|
|
3751
|
-
const r =
|
|
3751
|
+
const r = pn(n), a = pn(i), c = [
|
|
3752
3752
|
r ? `Required<Pick<${e}, ${r}>>` : "",
|
|
3753
3753
|
a ? `Partial<Pick<${e}, ${a}>>` : "",
|
|
3754
3754
|
s ? `${e}SetterTypes` : ""
|
|
@@ -3756,17 +3756,17 @@ function Ue(e, t) {
|
|
|
3756
3756
|
type ${e}SetterTypes = ${e}["${Wn}"]` : "", d = c.filter(Boolean).join(", ");
|
|
3757
3757
|
return [d.length === 0 ? "" : `${d}, `, l];
|
|
3758
3758
|
}
|
|
3759
|
-
const
|
|
3759
|
+
const pn = (e) => e.map((t) => `'${t}'`).join(" | ");
|
|
3760
3760
|
function z(e, t, n) {
|
|
3761
3761
|
if (Ne(n))
|
|
3762
3762
|
return Ei(e, n);
|
|
3763
|
-
const i = o.isCallExpression(n) ?
|
|
3763
|
+
const i = o.isCallExpression(n) ? La(e, n) : n, s = o.visitEachChild(
|
|
3764
3764
|
i,
|
|
3765
3765
|
// Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
|
|
3766
3766
|
z.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : n),
|
|
3767
3767
|
e.transformationContext
|
|
3768
3768
|
);
|
|
3769
|
-
return t !== void 0 && o.isBinaryExpression(n) && (o.isJsxExpression(t) || Ne(fe(n.right))) ?
|
|
3769
|
+
return t !== void 0 && o.isBinaryExpression(n) && (o.isJsxExpression(t) || Ne(fe(n.right))) ? Wa(s) : s;
|
|
3770
3770
|
}
|
|
3771
3771
|
function Ei(e, t) {
|
|
3772
3772
|
const n = Ci(e, t);
|
|
@@ -3784,19 +3784,19 @@ function Ci(e, t) {
|
|
|
3784
3784
|
);
|
|
3785
3785
|
}
|
|
3786
3786
|
if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== Ve && r.text !== Xe) {
|
|
3787
|
-
const E = o.isIdentifier(r) && r.text ===
|
|
3787
|
+
const E = o.isIdentifier(r) && r.text === tr ? Ie(n, e) : {
|
|
3788
3788
|
// No need to wrap the function call in a lit-html tag
|
|
3789
3789
|
litTag: void 0,
|
|
3790
|
-
parts: [
|
|
3790
|
+
parts: [Ba(e, t, r, n)]
|
|
3791
3791
|
};
|
|
3792
3792
|
return {
|
|
3793
|
-
key:
|
|
3793
|
+
key: Ka(s, e),
|
|
3794
3794
|
...E
|
|
3795
3795
|
};
|
|
3796
3796
|
}
|
|
3797
|
-
const c = r.text === Ve ? ke : r.text === Xe ? ot : r.text, l = r.text === Ve ? ie : r.text === Xe ? X :
|
|
3797
|
+
const c = r.text === Ve ? ke : r.text === Xe ? ot : r.text, l = r.text === Ve ? ie : r.text === Xe ? X : ir.has(c) ? hi : yt.has(c) ? te : se, d = gt(c);
|
|
3798
3798
|
let p;
|
|
3799
|
-
d && e.compiler.viteCommand === "build" && (p =
|
|
3799
|
+
d && e.compiler.viteCommand === "build" && (p = _a(e, c));
|
|
3800
3800
|
let m;
|
|
3801
3801
|
const f = [];
|
|
3802
3802
|
let y = !1;
|
|
@@ -3808,21 +3808,21 @@ Found ${$.getText(e.sourceFile)}`
|
|
|
3808
3808
|
);
|
|
3809
3809
|
const { name: E, initializer: S } = $;
|
|
3810
3810
|
if (o.isJsxNamespacedName(E)) {
|
|
3811
|
-
const
|
|
3811
|
+
const M = A(e.sourceFile.fileName);
|
|
3812
3812
|
throw new Error(
|
|
3813
|
-
`JSX namespaced attributes are not supported. Found ${E.getText(e.sourceFile)} in "${
|
|
3813
|
+
`JSX namespaced attributes are not supported. Found ${E.getText(e.sourceFile)} in "${M}"`
|
|
3814
3814
|
);
|
|
3815
3815
|
}
|
|
3816
|
-
const b = E.text, k =
|
|
3816
|
+
const b = E.text, k = Ca(S), F = k?.propType ?? $a(b, S, c);
|
|
3817
3817
|
p?.delete(b);
|
|
3818
|
-
const N =
|
|
3818
|
+
const N = Sa[F](e, k?.initializer ?? S, b, c);
|
|
3819
3819
|
if (N.length === 0)
|
|
3820
3820
|
return [];
|
|
3821
|
-
const D = e.compiler.shouldMinifyJsx ? [" "] :
|
|
3822
|
-
return F === "key" ? (m = typeof N[0] == "object" && !Ti(E, e) ? N[0] : void 0, D.some(
|
|
3821
|
+
const D = e.compiler.shouldMinifyJsx ? [" "] : Tr(vt(E, e));
|
|
3822
|
+
return F === "key" ? (m = typeof N[0] == "object" && !Ti(E, e) ? N[0] : void 0, D.some(Ia) ? D : []) : F === "directives" || F === "ref" || b === "deferLoad" ? (y ||= F === "deferLoad", f.push(
|
|
3823
3823
|
...D,
|
|
3824
3824
|
...N.flatMap(
|
|
3825
|
-
(
|
|
3825
|
+
(M, J) => typeof M == "string" || J === 0 || typeof N[J - 1] == "string" ? M : [" ", M]
|
|
3826
3826
|
)
|
|
3827
3827
|
), []) : [...D, ...N];
|
|
3828
3828
|
});
|
|
@@ -3835,7 +3835,7 @@ Found ${$.getText(e.sourceFile)}`
|
|
|
3835
3835
|
`JSX syntax for MathML elements is not yet supported. If you need it, please request it. Otherwise, use the \`math\` function from Lit directly. Tried to use the "${c}" element`
|
|
3836
3836
|
);
|
|
3837
3837
|
d && (y ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
|
|
3838
|
-
const v = typeof c == "string" &&
|
|
3838
|
+
const v = typeof c == "string" && nr.has(c), g = Ie(n, e);
|
|
3839
3839
|
if (v && g.parts.length > 0) {
|
|
3840
3840
|
const $ = A(e.sourceFile.fileName);
|
|
3841
3841
|
throw new Error(
|
|
@@ -3861,12 +3861,12 @@ Found ${$.getText(e.sourceFile)}`
|
|
|
3861
3861
|
];
|
|
3862
3862
|
return { key: m, parts: C, litTag: l };
|
|
3863
3863
|
}
|
|
3864
|
-
function
|
|
3864
|
+
function Ka(e, t) {
|
|
3865
3865
|
const n = e.attributes.properties[$i(e)];
|
|
3866
3866
|
return n && o.isJsxAttribute(n) && !Ti(n.name, t) ? $t(n.initializer, t.sourceFile) : void 0;
|
|
3867
3867
|
}
|
|
3868
3868
|
const $i = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
|
|
3869
|
-
function
|
|
3869
|
+
function Ba(e, t, n, i) {
|
|
3870
3870
|
const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((l) => {
|
|
3871
3871
|
if (o.isJsxSpreadAttribute(l))
|
|
3872
3872
|
return wt(vt(l, e), o.factory.createSpreadAssignment(l.expression));
|
|
@@ -3895,9 +3895,9 @@ function Ie(e, t) {
|
|
|
3895
3895
|
let n;
|
|
3896
3896
|
const i = e.flatMap((s) => {
|
|
3897
3897
|
if (o.isJsxText(s))
|
|
3898
|
-
return [t.compiler.shouldMinifyJsx ?
|
|
3898
|
+
return [t.compiler.shouldMinifyJsx ? gr(s.text) : s.text];
|
|
3899
3899
|
if (o.isJsxExpression(s))
|
|
3900
|
-
return
|
|
3900
|
+
return Pt(t, s, s);
|
|
3901
3901
|
{
|
|
3902
3902
|
const r = Ci(t, s);
|
|
3903
3903
|
if (r.key === void 0 && r.litTag !== ie && r.litTag !== X) {
|
|
@@ -3914,14 +3914,14 @@ function Ie(e, t) {
|
|
|
3914
3914
|
});
|
|
3915
3915
|
return { litTag: n, parts: i };
|
|
3916
3916
|
}
|
|
3917
|
-
function
|
|
3917
|
+
function Wa(e) {
|
|
3918
3918
|
return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
|
|
3919
3919
|
e,
|
|
3920
3920
|
o.factory.createToken(o.SyntaxKind.BarBarToken),
|
|
3921
3921
|
o.factory.createStringLiteral("")
|
|
3922
3922
|
) : e;
|
|
3923
3923
|
}
|
|
3924
|
-
function
|
|
3924
|
+
function Pt(e, t, n) {
|
|
3925
3925
|
if (t.expression === void 0) {
|
|
3926
3926
|
if (e.compiler.shouldMinifyJsx)
|
|
3927
3927
|
return [];
|
|
@@ -3965,7 +3965,7 @@ function xt(e, t, n) {
|
|
|
3965
3965
|
] : [z(e, n, t.expression)]
|
|
3966
3966
|
);
|
|
3967
3967
|
}
|
|
3968
|
-
function
|
|
3968
|
+
function _a(e, t) {
|
|
3969
3969
|
if (t in e.localComponents)
|
|
3970
3970
|
for (const i of e.compiler.privateApiJson.modules)
|
|
3971
3971
|
for (const s of i.declarations) {
|
|
@@ -3977,7 +3977,7 @@ function Wa(e, t) {
|
|
|
3977
3977
|
return r;
|
|
3978
3978
|
}
|
|
3979
3979
|
}
|
|
3980
|
-
const
|
|
3980
|
+
const Pi = (e) => e.reduce((t, [n, i]) => (t[n] ??= [], t[n].push(i), t), {}), ye = {
|
|
3981
3981
|
[se]: ["lit-html", "lit/html.js", "lit"],
|
|
3982
3982
|
/**
|
|
3983
3983
|
* Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
|
|
@@ -3998,14 +3998,14 @@ const xi = (e) => e.reduce((t, [n, i]) => (t[n] ??= [], t[n].push(i), t), {}), y
|
|
|
3998
3998
|
repeat: ["lit-html/directives/repeat.js", "lit/directives/repeat.js"],
|
|
3999
3999
|
ref: ["lit-html/directives/ref.js", "lit/directives/ref.js"],
|
|
4000
4000
|
nothing: ["lit-html", "lit/html.js", "lit-element/lit-element.js", "lit", "@arcgis/lumina"]
|
|
4001
|
-
},
|
|
4001
|
+
}, xi = Pi(
|
|
4002
4002
|
Object.entries(ye).flatMap(([e, t]) => t.map((n) => [n, e]))
|
|
4003
|
-
),
|
|
4004
|
-
function
|
|
4003
|
+
), xt = new Set(Object.keys(xi));
|
|
4004
|
+
function Ha(e, t) {
|
|
4005
4005
|
const n = t.importClause, i = t.moduleSpecifier;
|
|
4006
4006
|
if (!o.isStringLiteral(i))
|
|
4007
4007
|
return t;
|
|
4008
|
-
const s =
|
|
4008
|
+
const s = Ua(e.sourceFile.fileName, i.text, ""), r = !n?.isTypeOnly;
|
|
4009
4009
|
if (r && e.existingImportedModules.add(s), n === void 0)
|
|
4010
4010
|
return t;
|
|
4011
4011
|
if (e.isInLightDomComponent && i.text.startsWith(".") && Fe.test(i.text) && // If id already includes ?, bypass our custom behavior
|
|
@@ -4024,7 +4024,7 @@ function _a(e, t) {
|
|
|
4024
4024
|
const a = n.namedBindings;
|
|
4025
4025
|
if (a === void 0 || !o.isNamedImports(a))
|
|
4026
4026
|
return t;
|
|
4027
|
-
const c =
|
|
4027
|
+
const c = xt.has(i.text);
|
|
4028
4028
|
return a.elements.forEach((l) => {
|
|
4029
4029
|
const d = (l.propertyName ?? l.name).text, p = ye[d];
|
|
4030
4030
|
if (c) {
|
|
@@ -4037,13 +4037,13 @@ function _a(e, t) {
|
|
|
4037
4037
|
r && !l.isTypeOnly && m && f && e.importedFunctionComponentsFromModules.add(s);
|
|
4038
4038
|
}), t;
|
|
4039
4039
|
}
|
|
4040
|
-
const Ii = (e, t) => e === se && ye.staticHtml.includes(t) ? ie : e === te && ye.staticSvg.includes(t) ? X : e,
|
|
4041
|
-
function
|
|
4042
|
-
return o.isImportDeclaration(e) ?
|
|
4040
|
+
const Ii = (e, t) => e === se && ye.staticHtml.includes(t) ? ie : e === te && ye.staticSvg.includes(t) ? X : e, Ua = (e, t, n) => t.startsWith(".") ? u.resolve(e, "..", `${t}${n}`) : t;
|
|
4041
|
+
function za(e) {
|
|
4042
|
+
return o.isImportDeclaration(e) ? qa(this, e) : e;
|
|
4043
4043
|
}
|
|
4044
|
-
function
|
|
4044
|
+
function qa(e, t) {
|
|
4045
4045
|
const n = t.importClause, i = n?.namedBindings, s = t.moduleSpecifier;
|
|
4046
|
-
if (!o.isStringLiteral(s) || !i || !o.isNamedImports(i) || !
|
|
4046
|
+
if (!o.isStringLiteral(s) || !i || !o.isNamedImports(i) || !xt.has(s.text))
|
|
4047
4047
|
return t;
|
|
4048
4048
|
const r = n.isTypeOnly;
|
|
4049
4049
|
let a = !1;
|
|
@@ -4051,7 +4051,7 @@ function za(e, t) {
|
|
|
4051
4051
|
const d = (l.propertyName ?? l.name).text, p = Ii(d, s.text);
|
|
4052
4052
|
return e.existingLitImports.delete(p), e.neededImports.has(p) ? (e.neededImports.delete(p), a = !0, o.factory.updateImportSpecifier(l, !1, l.propertyName, l.name)) : r ? o.factory.updateImportSpecifier(l, !0, l.propertyName, l.name) : l;
|
|
4053
4053
|
});
|
|
4054
|
-
return
|
|
4054
|
+
return xi[s.text]?.forEach((l) => {
|
|
4055
4055
|
!e.neededImports.has(l) || e.existingLitImports.has(l) || (e.neededImports.delete(l), a = !0, c.push(Ai(l, e)));
|
|
4056
4056
|
}), a ? o.factory.updateImportDeclaration(
|
|
4057
4057
|
t,
|
|
@@ -4066,8 +4066,8 @@ function za(e, t) {
|
|
|
4066
4066
|
t.attributes
|
|
4067
4067
|
) : t;
|
|
4068
4068
|
}
|
|
4069
|
-
function
|
|
4070
|
-
const t =
|
|
4069
|
+
function Ga(e) {
|
|
4070
|
+
const t = Pi(Array.from(e.neededImports, (n) => [ye[n][0], n]));
|
|
4071
4071
|
return Object.entries(t).map(
|
|
4072
4072
|
([n, i]) => o.factory.createImportDeclaration(
|
|
4073
4073
|
void 0,
|
|
@@ -4090,8 +4090,8 @@ function Ai(e, t) {
|
|
|
4090
4090
|
o.factory.createIdentifier(i)
|
|
4091
4091
|
);
|
|
4092
4092
|
}
|
|
4093
|
-
function
|
|
4094
|
-
const t =
|
|
4093
|
+
function Va(e) {
|
|
4094
|
+
const t = Zo().map(({ packageName: n }) => n);
|
|
4095
4095
|
return e.existingImportedModules.forEach((n) => {
|
|
4096
4096
|
if (u.isAbsolute(n))
|
|
4097
4097
|
return;
|
|
@@ -4104,7 +4104,7 @@ function Ga(e) {
|
|
|
4104
4104
|
}
|
|
4105
4105
|
}), [];
|
|
4106
4106
|
}
|
|
4107
|
-
function
|
|
4107
|
+
function Xa(e) {
|
|
4108
4108
|
if (e.compiler.viteCommand === "serve")
|
|
4109
4109
|
return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
|
|
4110
4110
|
const t = e.compiler._customElementDependencies;
|
|
@@ -4119,7 +4119,7 @@ function Va(e) {
|
|
|
4119
4119
|
t[i] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[i].referencedBy.push(e.sourceFile.fileName);
|
|
4120
4120
|
}), [];
|
|
4121
4121
|
}
|
|
4122
|
-
function
|
|
4122
|
+
function Qa(e, t, n) {
|
|
4123
4123
|
const i = mi()[t] ?? ki(e)[t];
|
|
4124
4124
|
if (i === void 0) {
|
|
4125
4125
|
const s = A(n);
|
|
@@ -4129,7 +4129,7 @@ function Xa(e, t, n) {
|
|
|
4129
4129
|
}
|
|
4130
4130
|
return i;
|
|
4131
4131
|
}
|
|
4132
|
-
function
|
|
4132
|
+
function Ya(e, t) {
|
|
4133
4133
|
return e.packageName === void 0 ? ne(t, e.moduleName) : u.join(e.packageName, e.moduleName);
|
|
4134
4134
|
}
|
|
4135
4135
|
function ki(e) {
|
|
@@ -4140,7 +4140,7 @@ function ki(e) {
|
|
|
4140
4140
|
}
|
|
4141
4141
|
}), e._localDefinedComponents;
|
|
4142
4142
|
}
|
|
4143
|
-
const
|
|
4143
|
+
const Za = (e, t) => {
|
|
4144
4144
|
const n = e.pragmas;
|
|
4145
4145
|
if (n?.has("jsx") === !0 || n?.has("jsxImportSource") === !0)
|
|
4146
4146
|
return e.statements;
|
|
@@ -4150,7 +4150,7 @@ const Ya = (e, t) => {
|
|
|
4150
4150
|
localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : ki(t.compiler),
|
|
4151
4151
|
sourceFile: e,
|
|
4152
4152
|
transformationContext: t.transformation,
|
|
4153
|
-
importRenames:
|
|
4153
|
+
importRenames: ec(e),
|
|
4154
4154
|
existingImportedModules: /* @__PURE__ */ new Set(),
|
|
4155
4155
|
importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
|
|
4156
4156
|
existingLitImports: /* @__PURE__ */ new Set(),
|
|
@@ -4166,18 +4166,18 @@ const Ya = (e, t) => {
|
|
|
4166
4166
|
let s = [];
|
|
4167
4167
|
if (e.statements.every((a) => {
|
|
4168
4168
|
if (o.isImportDeclaration(a)) {
|
|
4169
|
-
if (s.push(
|
|
4169
|
+
if (s.push(Ha(i, a)), i.hasNonLuminaJsxImport)
|
|
4170
4170
|
return !1;
|
|
4171
4171
|
} else
|
|
4172
4172
|
s.push(z(i, void 0, a));
|
|
4173
4173
|
return !0;
|
|
4174
4174
|
}), i.hasNonLuminaJsxImport)
|
|
4175
4175
|
return e.statements;
|
|
4176
|
-
if (i.neededImports.size > 0 && (s = s.map(
|
|
4176
|
+
if (i.neededImports.size > 0 && (s = s.map(za, i), i.existingLitImports.size > 0))
|
|
4177
4177
|
throw new Error(
|
|
4178
4178
|
`Expected context.existingLitImports to be empty by now. Found: ${Array.from(i.existingLitImports).join(", ")}`
|
|
4179
4179
|
);
|
|
4180
|
-
const r = [
|
|
4180
|
+
const r = [Ga, Va, Xa].flatMap(
|
|
4181
4181
|
(a) => a(i)
|
|
4182
4182
|
);
|
|
4183
4183
|
if (i.neededImports.size > 0)
|
|
@@ -4186,18 +4186,18 @@ const Ya = (e, t) => {
|
|
|
4186
4186
|
);
|
|
4187
4187
|
return [...r, ...s];
|
|
4188
4188
|
};
|
|
4189
|
-
function
|
|
4190
|
-
return
|
|
4191
|
-
|
|
4189
|
+
function ec(e) {
|
|
4190
|
+
return tc(e), Object.fromEntries(
|
|
4191
|
+
ga.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
|
|
4192
4192
|
);
|
|
4193
4193
|
}
|
|
4194
|
-
function
|
|
4194
|
+
function tc(e) {
|
|
4195
4195
|
if (!("identifiers" in e))
|
|
4196
4196
|
throw new Error(
|
|
4197
4197
|
"Expected sourceFile to have an undocumented identifiers property that is a Map<string,string>. If this error is thrown, it may mean Lumina Compiler needs to be updated to support the version of TypeScript being used."
|
|
4198
4198
|
);
|
|
4199
4199
|
}
|
|
4200
|
-
function
|
|
4200
|
+
function nc(e, t, n) {
|
|
4201
4201
|
return t.size === 0 ? e : [
|
|
4202
4202
|
o.factory.createPropertyDeclaration(
|
|
4203
4203
|
[
|
|
@@ -4211,7 +4211,7 @@ function tc(e, t, n) {
|
|
|
4211
4211
|
Array.from(t.entries()).map(
|
|
4212
4212
|
([i, s]) => o.factory.createPropertyAssignment(
|
|
4213
4213
|
He(i) ? o.factory.createStringLiteral(i) : i,
|
|
4214
|
-
|
|
4214
|
+
ic(s, n)
|
|
4215
4215
|
)
|
|
4216
4216
|
)
|
|
4217
4217
|
)
|
|
@@ -4219,7 +4219,7 @@ function tc(e, t, n) {
|
|
|
4219
4219
|
...e
|
|
4220
4220
|
];
|
|
4221
4221
|
}
|
|
4222
|
-
function
|
|
4222
|
+
function ic(e, t) {
|
|
4223
4223
|
let n = 0, i = !0;
|
|
4224
4224
|
const s = e.properties.filter((c) => {
|
|
4225
4225
|
if (!o.isPropertyAssignment(c) || !o.isIdentifier(c.name))
|
|
@@ -4250,7 +4250,7 @@ function nc(e, t) {
|
|
|
4250
4250
|
o.factory.createObjectLiteralExpression(r)
|
|
4251
4251
|
]);
|
|
4252
4252
|
}
|
|
4253
|
-
function
|
|
4253
|
+
function sc(e, t, n, i, s) {
|
|
4254
4254
|
let r = -1, a = -1, c = -1;
|
|
4255
4255
|
t.options?.properties.forEach((f, y) => {
|
|
4256
4256
|
if (o.isSpreadAssignment(f))
|
|
@@ -4262,23 +4262,23 @@ function ic(e, t, n, i, s) {
|
|
|
4262
4262
|
h === "type" ? r = y : h === "attribute" ? a = y : h === "readOnly" && (c = y);
|
|
4263
4263
|
}
|
|
4264
4264
|
});
|
|
4265
|
-
const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p =
|
|
4265
|
+
const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = rc(e, t, n, s, r), m = [
|
|
4266
4266
|
...l ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
|
|
4267
4267
|
...d ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
|
|
4268
4268
|
...p !== void 0 ? [p] : []
|
|
4269
4269
|
];
|
|
4270
4270
|
return m.length > 0 ? t.options === void 0 ? o.factory.createObjectLiteralExpression(m, !1) : o.factory.updateObjectLiteralExpression(t.options, [...t.options.properties, ...m]) : t.options;
|
|
4271
4271
|
}
|
|
4272
|
-
function
|
|
4272
|
+
function rc(e, t, n, i, s) {
|
|
4273
4273
|
if (i.attribute === void 0)
|
|
4274
4274
|
return;
|
|
4275
|
-
const r =
|
|
4275
|
+
const r = ac(e), a = n.compiler.viteCommand === "serve" || r !== "Other" ? r : oc(i.type.values);
|
|
4276
4276
|
return a === "Other" || i.readonly && (a !== "Boolean" || !i.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
|
|
4277
4277
|
o.factory.createIdentifier("type"),
|
|
4278
4278
|
o.factory.createIdentifier(a)
|
|
4279
4279
|
);
|
|
4280
4280
|
}
|
|
4281
|
-
function
|
|
4281
|
+
function oc(e) {
|
|
4282
4282
|
let t = !1, n = !1, i = !1;
|
|
4283
4283
|
if (e?.forEach((s) => {
|
|
4284
4284
|
t ||= s.type === "number", n ||= s.type === "boolean", i ||= s.type === "string" || s.type === "any" || s.type === "unknown";
|
|
@@ -4290,7 +4290,7 @@ function rc(e) {
|
|
|
4290
4290
|
}
|
|
4291
4291
|
return "Other";
|
|
4292
4292
|
}
|
|
4293
|
-
function
|
|
4293
|
+
function ac(e) {
|
|
4294
4294
|
const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
|
|
4295
4295
|
if (t === void 0) {
|
|
4296
4296
|
if ("initializer" in e && e.initializer !== void 0) {
|
|
@@ -4307,7 +4307,7 @@ function oc(e) {
|
|
|
4307
4307
|
}
|
|
4308
4308
|
return "Other";
|
|
4309
4309
|
}
|
|
4310
|
-
function
|
|
4310
|
+
function cc(e, t, n, i, s) {
|
|
4311
4311
|
if (t.modifiers === void 0)
|
|
4312
4312
|
return t;
|
|
4313
4313
|
let r = -1, a = -1;
|
|
@@ -4317,18 +4317,18 @@ function ac(e, t, n, i, s) {
|
|
|
4317
4317
|
d === "property" && (r = l), d === "state" && (a = l);
|
|
4318
4318
|
}
|
|
4319
4319
|
}), r !== -1) {
|
|
4320
|
-
const c =
|
|
4320
|
+
const c = lc(e, t, n, i), l = un(t, r, i), d = sc(t, l, e, i, c);
|
|
4321
4321
|
let p = !1;
|
|
4322
|
-
return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d,
|
|
4322
|
+
return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, mn(t, l, r, p);
|
|
4323
4323
|
} else if (a !== -1) {
|
|
4324
|
-
const c =
|
|
4324
|
+
const c = un(t, a, i), 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 = G(t.name);
|
|
4325
4325
|
if (p === void 0)
|
|
4326
4326
|
throw new Error("Failed to statically determine the state property name");
|
|
4327
|
-
return s.set(p, d),
|
|
4327
|
+
return s.set(p, d), mn(t, c, a, !0);
|
|
4328
4328
|
} else
|
|
4329
4329
|
return t;
|
|
4330
4330
|
}
|
|
4331
|
-
function
|
|
4331
|
+
function lc(e, t, n, i) {
|
|
4332
4332
|
const s = e.apiModule?.declarations.find(
|
|
4333
4333
|
(a) => a.name === n
|
|
4334
4334
|
) ?? (e.compiler.isInTest ? {
|
|
@@ -4336,7 +4336,7 @@ function cc(e, t, n, i) {
|
|
|
4336
4336
|
} : void 0);
|
|
4337
4337
|
if (s === void 0)
|
|
4338
4338
|
throw Error(`Failed to find API component for ${n} in ${i.fileName}`);
|
|
4339
|
-
const r =
|
|
4339
|
+
const r = Hs(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
|
|
4340
4340
|
if (r === void 0 || r.kind !== "field")
|
|
4341
4341
|
throw Error(
|
|
4342
4342
|
`Failed to find API property for ${t.getText(i)} in ${n} in ${i.fileName}`
|
|
@@ -4351,7 +4351,7 @@ function cc(e, t, n, i) {
|
|
|
4351
4351
|
}
|
|
4352
4352
|
return r;
|
|
4353
4353
|
}
|
|
4354
|
-
function
|
|
4354
|
+
function un(e, t, n) {
|
|
4355
4355
|
const i = e.modifiers[t], s = i.expression, r = s.arguments.at(0);
|
|
4356
4356
|
if (r && !o.isObjectLiteralExpression(r))
|
|
4357
4357
|
throw new Error(
|
|
@@ -4359,7 +4359,7 @@ function mn(e, t, n) {
|
|
|
4359
4359
|
);
|
|
4360
4360
|
return { decorator: i, callExpression: s, options: r };
|
|
4361
4361
|
}
|
|
4362
|
-
function
|
|
4362
|
+
function mn(e, t, n, i) {
|
|
4363
4363
|
const s = i ? void 0 : o.factory.updateDecorator(
|
|
4364
4364
|
t.decorator,
|
|
4365
4365
|
o.factory.updateCallExpression(
|
|
@@ -4395,14 +4395,14 @@ function fn(e, t, n, i) {
|
|
|
4395
4395
|
e.initializer
|
|
4396
4396
|
);
|
|
4397
4397
|
}
|
|
4398
|
-
const
|
|
4398
|
+
const dc = (e, t) => {
|
|
4399
4399
|
if (t.apiModule === void 0 && !t.compiler.isInTest)
|
|
4400
4400
|
return e.statements;
|
|
4401
4401
|
let n;
|
|
4402
4402
|
function i() {
|
|
4403
4403
|
n = /* @__PURE__ */ new Map();
|
|
4404
4404
|
}
|
|
4405
|
-
const s = (c) =>
|
|
4405
|
+
const s = (c) => nc(c, n, t.compiler.shouldMinify), r = (c, l) => uc(t, c, l, e, n);
|
|
4406
4406
|
return e.statements.map(
|
|
4407
4407
|
(c) => Li(r, c, t, i, s)
|
|
4408
4408
|
);
|
|
@@ -4434,11 +4434,11 @@ function Li(e, t, n, i, s = Fn) {
|
|
|
4434
4434
|
n.transformation
|
|
4435
4435
|
) : t;
|
|
4436
4436
|
}
|
|
4437
|
-
const
|
|
4438
|
-
function
|
|
4437
|
+
const pc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
|
|
4438
|
+
function uc(e, t, n, i, s) {
|
|
4439
4439
|
if (o.isMethodDeclaration(t)) {
|
|
4440
4440
|
const r = t.modifiers?.filter(
|
|
4441
|
-
(a) => !o.isDecorator(a) || !
|
|
4441
|
+
(a) => !o.isDecorator(a) || !mc(a)
|
|
4442
4442
|
);
|
|
4443
4443
|
if (r?.length !== t.modifiers?.length)
|
|
4444
4444
|
return o.factory.updateMethodDeclaration(
|
|
@@ -4452,7 +4452,7 @@ function pc(e, t, n, i, s) {
|
|
|
4452
4452
|
t.type,
|
|
4453
4453
|
t.body
|
|
4454
4454
|
);
|
|
4455
|
-
if ("text" in t.name &&
|
|
4455
|
+
if ("text" in t.name && pc.has(t.name.text) && t.body) {
|
|
4456
4456
|
const a = t.name.text;
|
|
4457
4457
|
return t.body.statements.some(
|
|
4458
4458
|
(l) => o.isExpressionStatement(l) && o.isCallExpression(l.expression) && o.isPropertyAccessExpression(l.expression.expression) && l.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && l.expression.expression.name.text === a
|
|
@@ -4478,14 +4478,14 @@ function pc(e, t, n, i, s) {
|
|
|
4478
4478
|
);
|
|
4479
4479
|
}
|
|
4480
4480
|
}
|
|
4481
|
-
return o.isPropertyDeclaration(t) || o.isAccessor(t) ?
|
|
4481
|
+
return o.isPropertyDeclaration(t) || o.isAccessor(t) ? cc(e, t, n, i, s) : t;
|
|
4482
4482
|
}
|
|
4483
|
-
const
|
|
4484
|
-
function
|
|
4485
|
-
const n = e.indexOf(
|
|
4483
|
+
const mc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", fn = "makeRuntime(";
|
|
4484
|
+
function fc(e, t) {
|
|
4485
|
+
const n = e.indexOf(fn);
|
|
4486
4486
|
if (n === -1)
|
|
4487
4487
|
throw new Error("Failed to find makeRuntime() function call in src/runtime.ts");
|
|
4488
|
-
const i = n +
|
|
4488
|
+
const i = n + fn.length, s = t.options.css?.commonStylesPath;
|
|
4489
4489
|
return {
|
|
4490
4490
|
code: [
|
|
4491
4491
|
s === void 0 ? "" : `import commonStyles from "${ne(t.dir.src, s)}";`,
|
|
@@ -4502,11 +4502,11 @@ function mc(e, t) {
|
|
|
4502
4502
|
map: null
|
|
4503
4503
|
};
|
|
4504
4504
|
}
|
|
4505
|
-
const
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
],
|
|
4505
|
+
const yc = [
|
|
4506
|
+
Za,
|
|
4507
|
+
Ns,
|
|
4508
|
+
dc
|
|
4509
|
+
], hc = (e) => ({
|
|
4510
4510
|
name: "@arcgis/lumina:transformComponents",
|
|
4511
4511
|
transform: {
|
|
4512
4512
|
// Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
|
|
@@ -4518,7 +4518,7 @@ const fc = [
|
|
|
4518
4518
|
"It looks like you may be trying to define a component inside a test file. This is supported, but you must use the .tsx file extension for you test"
|
|
4519
4519
|
);
|
|
4520
4520
|
else if (n === `${e.dir.src}runtime.ts`)
|
|
4521
|
-
return
|
|
4521
|
+
return fc(t, e);
|
|
4522
4522
|
return;
|
|
4523
4523
|
}
|
|
4524
4524
|
const i = e.getSourceFile(n, t);
|
|
@@ -4526,7 +4526,7 @@ const fc = [
|
|
|
4526
4526
|
const r = o.transform(i, [
|
|
4527
4527
|
(f) => () => Kn(e, f, i, [
|
|
4528
4528
|
...e.options.types?.sourceFileTransformers ?? [],
|
|
4529
|
-
...
|
|
4529
|
+
...yc
|
|
4530
4530
|
])
|
|
4531
4531
|
]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, l = a.sourceMap ? ce.createSourceMapGenerator(
|
|
4532
4532
|
e.typeScriptHost,
|
|
@@ -4544,7 +4544,7 @@ const fc = [
|
|
|
4544
4544
|
}
|
|
4545
4545
|
}
|
|
4546
4546
|
});
|
|
4547
|
-
function
|
|
4547
|
+
function gc(e) {
|
|
4548
4548
|
const t = e.typeScriptConfig;
|
|
4549
4549
|
return {
|
|
4550
4550
|
...t,
|
|
@@ -4576,8 +4576,8 @@ function hc(e) {
|
|
|
4576
4576
|
skipLibCheck: !0
|
|
4577
4577
|
};
|
|
4578
4578
|
}
|
|
4579
|
-
function
|
|
4580
|
-
const t = e.options.types?.tsconfigPath, n = t && u.isAbsolute(t) ? t :
|
|
4579
|
+
function vc(e) {
|
|
4580
|
+
const t = e.options.types?.tsconfigPath, n = t && u.isAbsolute(t) ? t : rs(t ?? "tsconfig.json");
|
|
4581
4581
|
if (n === void 0)
|
|
4582
4582
|
throw new Error(
|
|
4583
4583
|
`Unable to find ${A(String(t))} in ${process.cwd()}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`
|
|
@@ -4608,7 +4608,7 @@ function Fi(e) {
|
|
|
4608
4608
|
const n = o.ScriptTarget[t].toLowerCase();
|
|
4609
4609
|
return n === "latest" ? "esnext" : n;
|
|
4610
4610
|
}
|
|
4611
|
-
function
|
|
4611
|
+
function wc(e, t) {
|
|
4612
4612
|
if (e.isInStorybook && e.viteCommand === "serve") {
|
|
4613
4613
|
const n = (a, c, l, ...d) => {
|
|
4614
4614
|
const p = a.filter(
|
|
@@ -4627,18 +4627,18 @@ function vc(e, t) {
|
|
|
4627
4627
|
l[0] === "timerToUpdateProgram" ? s : c,
|
|
4628
4628
|
...l
|
|
4629
4629
|
), i.afterProgramCreate = (a) => {
|
|
4630
|
-
e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new
|
|
4630
|
+
e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new us();
|
|
4631
4631
|
}, e.typeScriptWatchProgram = o.createWatchProgram(i), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
|
|
4632
4632
|
}
|
|
4633
|
-
e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter =
|
|
4633
|
+
e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = gc(e), e._typeScriptPrinter = Qn(e._compilerOptionsForPrinter);
|
|
4634
4634
|
}
|
|
4635
|
-
const pt = "@arcgis/core",
|
|
4636
|
-
async function
|
|
4635
|
+
const pt = "@arcgis/core", yn = R(), _ = pt in (yn.dependencies ?? {}) || pt in (yn.peerDependencies ?? {});
|
|
4636
|
+
async function Sc(e, t) {
|
|
4637
4637
|
if (!_)
|
|
4638
4638
|
return [];
|
|
4639
|
-
const n = await
|
|
4639
|
+
const n = await Me(pt);
|
|
4640
4640
|
if (t === "cdn") {
|
|
4641
|
-
const i = await
|
|
4641
|
+
const i = await Oe(n), s = We({ name: "", version: i.version }, !0);
|
|
4642
4642
|
return [
|
|
4643
4643
|
// Use the ESM CDN
|
|
4644
4644
|
// <script src="https://jsdev.arcgis.com/VERSION/"><\/script>
|
|
@@ -4654,23 +4654,23 @@ async function wc(e, t) {
|
|
|
4654
4654
|
})
|
|
4655
4655
|
},
|
|
4656
4656
|
// <link rel="stylesheet" id="arcgisCoreStylesheet" href="https://jsdev.arcgis.com/VERSION/esri/themes/light/main.css" />
|
|
4657
|
-
|
|
4657
|
+
hn(s)
|
|
4658
4658
|
];
|
|
4659
4659
|
} else
|
|
4660
|
-
return [
|
|
4660
|
+
return [hn(Ct(e, `${n}/assets/`))];
|
|
4661
4661
|
}
|
|
4662
|
-
const
|
|
4662
|
+
const hn = (e) => ({
|
|
4663
4663
|
// Not using join() because it would turn https:// into https:/
|
|
4664
4664
|
cssHref: `${e}esri/themes/light/main.css`,
|
|
4665
4665
|
// This is used be the theme switcher in `@arcgis/storybook-utils`
|
|
4666
4666
|
id: "arcgisCoreStylesheet"
|
|
4667
4667
|
});
|
|
4668
|
-
async function
|
|
4668
|
+
async function bc(e, t, n) {
|
|
4669
4669
|
const i = u.resolve(e.dir.root, t);
|
|
4670
|
-
await H(i) && await
|
|
4670
|
+
await H(i) && await ys(i, { recursive: !0, force: !0 }), await U(i, { recursive: !0 }), await hs(e.dir.distCdn, u.join(i, "build"), { recursive: !0 });
|
|
4671
4671
|
const s = [
|
|
4672
4672
|
"index.html",
|
|
4673
|
-
...await
|
|
4673
|
+
...await bs("**/*.html", {
|
|
4674
4674
|
cwd: e.dir.src,
|
|
4675
4675
|
nodir: !0,
|
|
4676
4676
|
posix: !0
|
|
@@ -4716,7 +4716,7 @@ const Ni = /* @__PURE__ */ new Set([
|
|
|
4716
4716
|
"extras",
|
|
4717
4717
|
"support"
|
|
4718
4718
|
]), De = "cdn";
|
|
4719
|
-
function
|
|
4719
|
+
function Tc(e) {
|
|
4720
4720
|
const { skip: t = !1, namespace: n = De, esbuildOptions: i = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination;
|
|
4721
4721
|
if (n.toLowerCase() !== n)
|
|
4722
4722
|
throw new Error(`Expected CDN namespace to be all lowercase. Received: ${n}`);
|
|
@@ -4733,15 +4733,15 @@ function bc(e) {
|
|
|
4733
4733
|
async writeBundle() {
|
|
4734
4734
|
if (e.isInStorybook)
|
|
4735
4735
|
return;
|
|
4736
|
-
const a = Date.now(), c = await
|
|
4737
|
-
await
|
|
4738
|
-
const
|
|
4739
|
-
console.log(`CDN was built in ${
|
|
4736
|
+
const a = Date.now(), c = Array.isArray(i.entryPoints) ? i.entryPoints.map((p) => typeof p == "string" ? { in: p, out: "" } : p) : typeof i.entryPoints == "object" ? Object.entries(i.entryPoints).map(([p, m]) => ({ in: m, out: p })) : [], l = await Ec(e, r, i, c);
|
|
4737
|
+
await Cc(l, e.dir.distCdn, r, c);
|
|
4738
|
+
const d = Date.now();
|
|
4739
|
+
console.log(`CDN was built in ${d - a}ms`), s && await bc(e, s, `${Ji(r)}.js`);
|
|
4740
4740
|
}
|
|
4741
4741
|
};
|
|
4742
4742
|
}
|
|
4743
|
-
async function
|
|
4744
|
-
const
|
|
4743
|
+
async function Ec(e, t, n, i) {
|
|
4744
|
+
const s = e.environment;
|
|
4745
4745
|
if (n.minify && _)
|
|
4746
4746
|
throw Error(
|
|
4747
4747
|
"Unminified CDN build is not yet supported - open a feature request with Lumina maintainers if it is needed"
|
|
@@ -4750,16 +4750,17 @@ async function Tc(e, t, n) {
|
|
|
4750
4750
|
throw Error(
|
|
4751
4751
|
"Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
|
|
4752
4752
|
);
|
|
4753
|
-
return await
|
|
4753
|
+
return await Ss({
|
|
4754
4754
|
bundle: !0,
|
|
4755
|
-
minify: _ ? !0 :
|
|
4755
|
+
minify: _ ? !0 : s === "production",
|
|
4756
4756
|
treeShaking: !0,
|
|
4757
|
-
sourcemap: _ ? !1 :
|
|
4757
|
+
sourcemap: _ ? !1 : s === "development" ? "inline" : e.options.build?.enableSourceMapsInProduction ? "linked" : !1,
|
|
4758
4758
|
format: "esm",
|
|
4759
4759
|
splitting: !0,
|
|
4760
4760
|
write: !1,
|
|
4761
|
+
absWorkingDir: e.dir.dist,
|
|
4761
4762
|
outdir: e.dir.distCdn,
|
|
4762
|
-
legalComments: "
|
|
4763
|
+
legalComments: "none",
|
|
4763
4764
|
logLevel: "warning",
|
|
4764
4765
|
/**
|
|
4765
4766
|
* Generally, all imported dependencies need to be bundled in CDN build.
|
|
@@ -4774,7 +4775,6 @@ async function Tc(e, t, n) {
|
|
|
4774
4775
|
external: ["@arcgis/core"],
|
|
4775
4776
|
chunkNames: "[hash]",
|
|
4776
4777
|
resolveExtensions: [".js", ".json"],
|
|
4777
|
-
entryNames: At(t),
|
|
4778
4778
|
banner: { js: e.banner },
|
|
4779
4779
|
target: Fi(e.typeScriptConfig),
|
|
4780
4780
|
...n,
|
|
@@ -4784,11 +4784,11 @@ async function Tc(e, t, n) {
|
|
|
4784
4784
|
...e.options.build?.ssr?.stencilCompatibility?.enabled === !0 ? [
|
|
4785
4785
|
{
|
|
4786
4786
|
name: "@arcgis/lumina:drop-lit-ssr-import",
|
|
4787
|
-
setup(
|
|
4788
|
-
|
|
4789
|
-
path:
|
|
4787
|
+
setup(r) {
|
|
4788
|
+
r.onResolve({ filter: /^@lit-labs\/ssr-client\//u }, (a) => ({
|
|
4789
|
+
path: a.path,
|
|
4790
4790
|
namespace: "@arcgis/lumina:drop-lit-ssr-import"
|
|
4791
|
-
})),
|
|
4791
|
+
})), r.onLoad({ filter: /^/u, namespace: "@arcgis/lumina:drop-lit-ssr-import" }, () => ({
|
|
4792
4792
|
contents: '""',
|
|
4793
4793
|
loader: "json"
|
|
4794
4794
|
}));
|
|
@@ -4797,6 +4797,7 @@ async function Tc(e, t, n) {
|
|
|
4797
4797
|
] : [],
|
|
4798
4798
|
...n?.plugins ?? []
|
|
4799
4799
|
],
|
|
4800
|
+
entryPoints: i,
|
|
4800
4801
|
stdin: {
|
|
4801
4802
|
contents: `import { defineCustomElements } from "./loader";
|
|
4802
4803
|
${oi(e._globalCssString, e)}
|
|
@@ -4806,48 +4807,63 @@ ${oi(e._globalCssString, e)}
|
|
|
4806
4807
|
* The script's file name will be stripped inside defineCustomElements.
|
|
4807
4808
|
**/
|
|
4808
4809
|
defineCustomElements({resourcesUrl: import.meta.url});`,
|
|
4809
|
-
sourcefile: `${t}
|
|
4810
|
-
resolveDir:
|
|
4810
|
+
sourcefile: `${t}.esm.js`,
|
|
4811
|
+
resolveDir: e.dir.dist,
|
|
4811
4812
|
loader: "js",
|
|
4812
4813
|
...n.stdin
|
|
4813
4814
|
}
|
|
4814
4815
|
});
|
|
4815
4816
|
}
|
|
4816
|
-
async function
|
|
4817
|
-
const
|
|
4818
|
-
e.outputFiles.map((
|
|
4819
|
-
const
|
|
4820
|
-
code:
|
|
4817
|
+
async function Cc(e, t, n, i) {
|
|
4818
|
+
const s = `${Ji(n)}.js`, r = new Map(
|
|
4819
|
+
e.outputFiles.map((a) => {
|
|
4820
|
+
const c = {
|
|
4821
|
+
code: a.text,
|
|
4821
4822
|
isAsync: void 0,
|
|
4822
4823
|
oldSingleExportName: void 0
|
|
4823
|
-
},
|
|
4824
|
-
return
|
|
4824
|
+
}, l = a.path.slice(t.length);
|
|
4825
|
+
return l === "stdin.js" ? (_ && (c.code = `${c.code.trimEnd()}${$c}${xc(i)}${Pc}`, c.isAsync = !1), [s, c]) : [l, c];
|
|
4825
4826
|
})
|
|
4826
4827
|
);
|
|
4827
|
-
_ &&
|
|
4828
|
-
|
|
4829
|
-
}), await Promise.all(Array.from(
|
|
4828
|
+
_ && r.forEach((a, c) => {
|
|
4829
|
+
a.isAsync === void 0 && (c.endsWith(".js") ? ji(a, r) : a.isAsync = !1);
|
|
4830
|
+
}), await Promise.all(Array.from(r.entries(), async ([a, { code: c }]) => await L(t + a, c)));
|
|
4831
|
+
}
|
|
4832
|
+
const $c = 'window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a', gn = ")=>{", Pc = 'a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c)})($arcgis)';
|
|
4833
|
+
function xc(e) {
|
|
4834
|
+
if (e.length === 0)
|
|
4835
|
+
return gn;
|
|
4836
|
+
const t = [];
|
|
4837
|
+
for (const s of e) {
|
|
4838
|
+
if (s.in.includes("*")) {
|
|
4839
|
+
console.warn(`$arcgis.import does not support wildcard imports, so ${s.in} will be ignored.`);
|
|
4840
|
+
continue;
|
|
4841
|
+
}
|
|
4842
|
+
if (s.out.startsWith(".") || s.out.startsWith("/"))
|
|
4843
|
+
throw Error(`CDN entrypoint path must not start with '.' or '/'. Found: ${s.out}`);
|
|
4844
|
+
t.push(s.out);
|
|
4845
|
+
}
|
|
4846
|
+
return `,i=(a.importMap??={}).imports??={},p="${R().name}/",j=".js"${gn}"${t.join(",")}".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));`;
|
|
4830
4847
|
}
|
|
4831
|
-
const Cc = '{window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{},});var a=$arcgis;a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c)}';
|
|
4832
4848
|
function ji(e, t) {
|
|
4833
4849
|
const n = [], i = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
|
|
4834
4850
|
let c = 0;
|
|
4835
|
-
const l = e.code.matchAll(
|
|
4851
|
+
const l = e.code.matchAll(Ic);
|
|
4836
4852
|
for (const S of l) {
|
|
4837
|
-
const [b, k, F, N, D] = S,
|
|
4853
|
+
const [b, k, F, N, D] = S, M = D.startsWith(Re);
|
|
4838
4854
|
if (c !== 0 && c !== S.index) {
|
|
4839
4855
|
const J = e.code.slice(c, S.index);
|
|
4840
4856
|
s.push(J), a.push([c, J.length, 0, ""]);
|
|
4841
4857
|
}
|
|
4842
|
-
if (c = S.index + b.length,
|
|
4858
|
+
if (c = S.index + b.length, M)
|
|
4843
4859
|
a.push([S.index, b.length, 0, ""]), i.push(`"${Ri(D.slice(Re.length))}"`), n.push(k?.replaceAll(" as ", ":") ?? F ?? N ?? "");
|
|
4844
4860
|
else {
|
|
4845
4861
|
const J = Di(D, t), q = J?.isAsync === !0;
|
|
4846
4862
|
if (k !== void 0) {
|
|
4847
4863
|
const Se = [];
|
|
4848
4864
|
for (const qe of k.slice(1, -1).split(",")) {
|
|
4849
|
-
const [
|
|
4850
|
-
q || r.add(
|
|
4865
|
+
const [Lt, Ft = Lt] = qe.split(" as ");
|
|
4866
|
+
q || r.add(Ft), Se.push(`${Lt}:${Ft}`);
|
|
4851
4867
|
}
|
|
4852
4868
|
if (q) {
|
|
4853
4869
|
const qe = J.oldSingleExportName === void 0 ? `{${Se.join(",")}}` : Se[0].split(":")[1];
|
|
@@ -4866,18 +4882,18 @@ function ji(e, t) {
|
|
|
4866
4882
|
}
|
|
4867
4883
|
if (e.isAsync = a.length > 0, !e.isAsync)
|
|
4868
4884
|
return;
|
|
4869
|
-
const d =
|
|
4885
|
+
const d = Fc(r);
|
|
4870
4886
|
let p = e.code.slice(0, c);
|
|
4871
4887
|
for (let S = a.length - 1; S >= 0; S--) {
|
|
4872
4888
|
const [b, k, F, N] = a[S];
|
|
4873
|
-
let D = k,
|
|
4889
|
+
let D = k, M = "";
|
|
4874
4890
|
if (k === 0) {
|
|
4875
4891
|
const q = d();
|
|
4876
|
-
i.push(q),
|
|
4892
|
+
i.push(q), M = ` ${q} from`, N !== "" ? (D = F + 4, n.push(N)) : n.push("");
|
|
4877
4893
|
}
|
|
4878
|
-
p = p.slice(0, b) +
|
|
4894
|
+
p = p.slice(0, b) + M + p.slice(b + D);
|
|
4879
4895
|
}
|
|
4880
|
-
const m =
|
|
4896
|
+
const m = Ac.exec(e.code), f = m?.index ?? e.code.length;
|
|
4881
4897
|
let y = "";
|
|
4882
4898
|
if (m !== null) {
|
|
4883
4899
|
const S = m[1].split(",");
|
|
@@ -4893,11 +4909,11 @@ function ji(e, t) {
|
|
|
4893
4909
|
}
|
|
4894
4910
|
const h = n.findLastIndex((S) => S.length > 0), v = n.slice(0, h + 1).join(","), w = `export default $arcgis.t(${n.length === 0 ? "_" : `([${v}])`}=>{`, T = i.join(","), C = `${y}},${T})`;
|
|
4895
4911
|
let $ = e.code.slice(c, f);
|
|
4896
|
-
$ = `${s.join("")}${$}`, $ =
|
|
4912
|
+
$ = `${s.join("")}${$}`, $ = kc($, t);
|
|
4897
4913
|
const E = `${p}${w}${$}${C}`;
|
|
4898
4914
|
e.code = E;
|
|
4899
4915
|
}
|
|
4900
|
-
const
|
|
4916
|
+
const Ic = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, Ac = /export\{([^}]+)\};\n$/u, Re = "@arcgis/core/";
|
|
4901
4917
|
function Di(e, t) {
|
|
4902
4918
|
if (!e.startsWith("./"))
|
|
4903
4919
|
return;
|
|
@@ -4908,8 +4924,8 @@ function Di(e, t) {
|
|
|
4908
4924
|
throw Error(`Failed to infer whether the ${e} module has top-level await`);
|
|
4909
4925
|
return i;
|
|
4910
4926
|
}
|
|
4911
|
-
function
|
|
4912
|
-
return e.replaceAll(
|
|
4927
|
+
function kc(e, t) {
|
|
4928
|
+
return e.replaceAll(Lc, (n, i) => {
|
|
4913
4929
|
if (i.startsWith(Re))
|
|
4914
4930
|
return `$arcgis.t(m=>m[0],"${Ri(i.slice(Re.length))}")`;
|
|
4915
4931
|
if (i.startsWith("./")) {
|
|
@@ -4920,42 +4936,42 @@ function Pc(e, t) {
|
|
|
4920
4936
|
return n;
|
|
4921
4937
|
});
|
|
4922
4938
|
}
|
|
4923
|
-
const
|
|
4924
|
-
function
|
|
4925
|
-
const t = [
|
|
4939
|
+
const Lc = /(?<![.\w\d])import\("([^"]+)"\)/gu, Ri = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
|
|
4940
|
+
function Fc(e) {
|
|
4941
|
+
const t = [Mi];
|
|
4926
4942
|
return () => {
|
|
4927
4943
|
for (; ; ) {
|
|
4928
|
-
const n =
|
|
4929
|
-
if (
|
|
4944
|
+
const n = Dc(t);
|
|
4945
|
+
if (Rc(t), !e.has(n))
|
|
4930
4946
|
return e.add(n), n;
|
|
4931
4947
|
}
|
|
4932
4948
|
};
|
|
4933
4949
|
}
|
|
4934
|
-
const
|
|
4935
|
-
function
|
|
4950
|
+
const Mi = 0, It = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Oi = `${It}0123456789`, Nc = It.length, jc = Oi.length;
|
|
4951
|
+
function Dc(e) {
|
|
4936
4952
|
let t = It[e[0]];
|
|
4937
4953
|
for (let n = 1; n < e.length; n++)
|
|
4938
|
-
t +=
|
|
4954
|
+
t += Oi[e[n]];
|
|
4939
4955
|
return t;
|
|
4940
4956
|
}
|
|
4941
|
-
function
|
|
4957
|
+
function Rc(e) {
|
|
4942
4958
|
let t = e.length - 1;
|
|
4943
4959
|
for (; t >= 0; ) {
|
|
4944
|
-
const n = t === 0 ?
|
|
4960
|
+
const n = t === 0 ? Nc : jc;
|
|
4945
4961
|
if (e[t] += 1, e[t] >= n)
|
|
4946
4962
|
e[t] = 0, t--;
|
|
4947
4963
|
else
|
|
4948
4964
|
return;
|
|
4949
4965
|
}
|
|
4950
|
-
e = new Array(e.length + 1).fill(
|
|
4966
|
+
e = new Array(e.length + 1).fill(Mi);
|
|
4951
4967
|
}
|
|
4952
|
-
function
|
|
4968
|
+
function Ji(e) {
|
|
4953
4969
|
return `${e}.esm`;
|
|
4954
4970
|
}
|
|
4955
|
-
async function
|
|
4956
|
-
const s = t.packageName, r = await
|
|
4971
|
+
async function Mc(e, t, n, i) {
|
|
4972
|
+
const s = t.packageName, r = await Me(s), { hasCss: a, cdnName: c } = await Oc(u.join(r, "dist")) ?? {};
|
|
4957
4973
|
if (n === "cdn") {
|
|
4958
|
-
const m = await
|
|
4974
|
+
const m = await Oe(r), f = t.cdnUrl ?? We(m, !0);
|
|
4959
4975
|
return [
|
|
4960
4976
|
...a ? [
|
|
4961
4977
|
{
|
|
@@ -4996,7 +5012,7 @@ async function jc(e, t, n, i) {
|
|
|
4996
5012
|
}
|
|
4997
5013
|
];
|
|
4998
5014
|
}
|
|
4999
|
-
async function
|
|
5015
|
+
async function Oc(e) {
|
|
5000
5016
|
const n = (await Je(e)).filter(
|
|
5001
5017
|
(s) => !Ni.has(s) && !s.includes(".")
|
|
5002
5018
|
), i = n.find((s) => s.startsWith("arcgis-"));
|
|
@@ -5012,21 +5028,21 @@ async function vn(e, t) {
|
|
|
5012
5028
|
} : void 0;
|
|
5013
5029
|
}
|
|
5014
5030
|
async function he(e) {
|
|
5015
|
-
return e._loadersCache ??=
|
|
5031
|
+
return e._loadersCache ??= Jc(e), await e._loadersCache;
|
|
5016
5032
|
}
|
|
5017
|
-
async function
|
|
5033
|
+
async function Jc(e) {
|
|
5018
5034
|
const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", n = e.viteConfig.base, i = async (c) => (await Promise.all(
|
|
5019
5035
|
c.map(
|
|
5020
|
-
async (l, d) => l.type === "stencil" ? await
|
|
5036
|
+
async (l, d) => l.type === "stencil" ? await Mc(n, l, t, d) : l.type === "@arcgis/lumina" ? await pa(n, l, t, d) : void 0
|
|
5021
5037
|
)
|
|
5022
5038
|
)).filter(j).flat(), s = await Promise.all([
|
|
5023
5039
|
// This may contain an import map so must be first
|
|
5024
|
-
|
|
5040
|
+
Sc(n, t),
|
|
5025
5041
|
me.then(i),
|
|
5026
|
-
|
|
5042
|
+
Bi(e).then(i)
|
|
5027
5043
|
]), r = u.join(e.dir.src, "loader.ts");
|
|
5028
5044
|
return [
|
|
5029
|
-
...e.viteCommand === "serve" ? [
|
|
5045
|
+
...e.viteCommand === "serve" ? [Ki] : [],
|
|
5030
5046
|
...s.flat(),
|
|
5031
5047
|
{
|
|
5032
5048
|
optimizableImports: [
|
|
@@ -5043,7 +5059,7 @@ async function Rc(e) {
|
|
|
5043
5059
|
}
|
|
5044
5060
|
];
|
|
5045
5061
|
}
|
|
5046
|
-
const
|
|
5062
|
+
const Ki = {
|
|
5047
5063
|
optimizableImports: [],
|
|
5048
5064
|
// Disable this warning to reduce noise in the console
|
|
5049
5065
|
// See https://github.com/lit/lit/issues/4877
|
|
@@ -5054,7 +5070,7 @@ const Ji = {
|
|
|
5054
5070
|
");"
|
|
5055
5071
|
]
|
|
5056
5072
|
};
|
|
5057
|
-
async function
|
|
5073
|
+
async function Bi(e) {
|
|
5058
5074
|
const t = e.options?.serve?.extraDependencies ?? [];
|
|
5059
5075
|
return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
|
|
5060
5076
|
t.map(async (n) => {
|
|
@@ -5070,9 +5086,9 @@ async function Ki(e) {
|
|
|
5070
5086
|
})
|
|
5071
5087
|
).then((n) => n.filter(j)), await e._serveOnlyDependencies);
|
|
5072
5088
|
}
|
|
5073
|
-
const
|
|
5089
|
+
const Wi = "/@arcgis/lumina-compiler/testLitSetupFile", _i = "/@arcgis/lumina-compiler/testSetupFile", st = [Wi, _i], Kc = Ki.javascriptCode.join(`
|
|
5074
5090
|
`);
|
|
5075
|
-
async function
|
|
5091
|
+
async function Bc(e) {
|
|
5076
5092
|
if (!e.viteConfig.test?.browser?.enabled)
|
|
5077
5093
|
return wn(e);
|
|
5078
5094
|
const n = (await he(e)).map((i, s) => {
|
|
@@ -5095,12 +5111,12 @@ async function Mc(e) {
|
|
|
5095
5111
|
`);
|
|
5096
5112
|
return [wn(e), n].join("");
|
|
5097
5113
|
}
|
|
5098
|
-
const wn = (e) => [e.isInPuppeteerTestBackEnd ?
|
|
5114
|
+
const wn = (e) => [e.isInPuppeteerTestBackEnd ? Wc : "", _c].join(""), Wc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
|
|
5099
5115
|
setupPuppeteerTest();
|
|
5100
|
-
`,
|
|
5116
|
+
`, _c = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
|
|
5101
5117
|
setupLuminaTest();
|
|
5102
5118
|
`;
|
|
5103
|
-
function
|
|
5119
|
+
function Hc(e) {
|
|
5104
5120
|
let t = !0, n = !1, i, s, r, a, c;
|
|
5105
5121
|
const l = "@arcgis/lumina:generateVirtualFiles", d = {
|
|
5106
5122
|
name: l,
|
|
@@ -5110,20 +5126,20 @@ function Bc(e) {
|
|
|
5110
5126
|
},
|
|
5111
5127
|
resolveId: (h) => h === a || h === c ? a : void 0,
|
|
5112
5128
|
async load(h) {
|
|
5113
|
-
const v = h.startsWith(
|
|
5129
|
+
const v = h.startsWith(Wi), g = h.startsWith(_i);
|
|
5114
5130
|
if (!(!h.endsWith(".tsx") && h !== a && !v && !g)) {
|
|
5115
5131
|
if (s === void 0 && !e.isInPuppeteerTestBackEnd) {
|
|
5116
|
-
r === void 0 && clearTimeout(i), r ??=
|
|
5132
|
+
r === void 0 && clearTimeout(i), r ??= _o(e, t).catch((T) => {
|
|
5117
5133
|
throw n = !0, T;
|
|
5118
5134
|
}), t = !1;
|
|
5119
5135
|
const w = await r;
|
|
5120
5136
|
s ??= w;
|
|
5121
5137
|
}
|
|
5122
|
-
return h === a ?
|
|
5138
|
+
return h === a ? Io(e) : v ? Kc : g ? await Bc(e) : void 0;
|
|
5123
5139
|
}
|
|
5124
5140
|
},
|
|
5125
5141
|
async writeBundle() {
|
|
5126
|
-
e.isInStorybook || await L(u.join(e.dir.dist, "loader.d.ts"),
|
|
5142
|
+
e.isInStorybook || await L(u.join(e.dir.dist, "loader.d.ts"), Ao);
|
|
5127
5143
|
},
|
|
5128
5144
|
async handleHotUpdate({ file: h, modules: v, read: g }) {
|
|
5129
5145
|
const w = await p(h, g);
|
|
@@ -5183,7 +5199,7 @@ function Bc(e) {
|
|
|
5183
5199
|
if (!ue(h, e.dir.srcComponents))
|
|
5184
5200
|
return;
|
|
5185
5201
|
g ??= await v();
|
|
5186
|
-
const T =
|
|
5202
|
+
const T = Ho(e, h, g);
|
|
5187
5203
|
if (T === void 0)
|
|
5188
5204
|
return !1;
|
|
5189
5205
|
for (const C of T) {
|
|
@@ -5205,21 +5221,21 @@ function Bc(e) {
|
|
|
5205
5221
|
});
|
|
5206
5222
|
return d;
|
|
5207
5223
|
}
|
|
5208
|
-
const
|
|
5209
|
-
function de(e, t, n =
|
|
5224
|
+
const Uc = "@arcgis/lumina:provideAssets";
|
|
5225
|
+
function de(e, t, n = At) {
|
|
5210
5226
|
if (e.viteCommand !== "serve")
|
|
5211
5227
|
throw new Error("serveAssets() is only available when Vite is running in serve mode");
|
|
5212
5228
|
const i = e._serverConfigured, s = e.server.middlewares.stack.length;
|
|
5213
5229
|
if (t.forEach((r) => {
|
|
5214
|
-
const a =
|
|
5230
|
+
const a = Ui(r), c = qi(e.dir, zi(a)), l = qc(e.viteConfig.base, c, e.dir.distCdn);
|
|
5215
5231
|
e.server.middlewares.use(l, (d, p, m) => {
|
|
5216
|
-
const f =
|
|
5232
|
+
const f = Gc(d.url), y = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, h = u.join(c, f), v = n.find((g) => g.match(h, e));
|
|
5217
5233
|
return (typeof y == "function" ? Promise.resolve(y()) : O(y)).then((g) => {
|
|
5218
5234
|
const w = (typeof y == "function" ? void 0 : v?.transform(g.toString("utf8"), h, e)) ?? g;
|
|
5219
|
-
p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type",
|
|
5235
|
+
p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ts.lookup(f) || "application/octet-stream"), p.write(w), p.end();
|
|
5220
5236
|
}).catch((g) => {
|
|
5221
5237
|
(a.type !== "directory" || process.env.DEBUG) && console.error(
|
|
5222
|
-
|
|
5238
|
+
Uc,
|
|
5223
5239
|
`Error occurred when trying to serve a file in response to request for "${d.originalUrl ?? f}":`,
|
|
5224
5240
|
g
|
|
5225
5241
|
), m();
|
|
@@ -5230,16 +5246,16 @@ function de(e, t, n = kt) {
|
|
|
5230
5246
|
e.server.middlewares.stack.splice(0, 0, ...r);
|
|
5231
5247
|
}
|
|
5232
5248
|
}
|
|
5233
|
-
async function
|
|
5249
|
+
async function Hi(e, t, n = At) {
|
|
5234
5250
|
await Promise.all(
|
|
5235
5251
|
t.map(async (i) => {
|
|
5236
|
-
const s =
|
|
5252
|
+
const s = Ui(i), r = qi(e.dir, zi(s));
|
|
5237
5253
|
if (s.type === "directory") {
|
|
5238
5254
|
const a = u.resolve(s.source), l = (await Je(a, { recursive: !0, withFileTypes: !0 })).filter((d) => d.isFile()).map((d) => {
|
|
5239
5255
|
const p = u.resolve(d.parentPath, d.name), m = u.relative(a, p), f = u.join(r, m);
|
|
5240
5256
|
return [p, f];
|
|
5241
5257
|
});
|
|
5242
|
-
await
|
|
5258
|
+
await Vi(l.map(([d, p]) => p)), await Promise.all(
|
|
5243
5259
|
l.map(
|
|
5244
5260
|
async ([d, p]) => await Sn(d, p, n, e)
|
|
5245
5261
|
)
|
|
@@ -5254,7 +5270,7 @@ async function _i(e, t, n = kt) {
|
|
|
5254
5270
|
})
|
|
5255
5271
|
);
|
|
5256
5272
|
}
|
|
5257
|
-
const
|
|
5273
|
+
const Ui = kn ? (e) => e : (e) => e.type === "dynamic" ? {
|
|
5258
5274
|
...e,
|
|
5259
5275
|
destination: $e(e.destination)
|
|
5260
5276
|
} : {
|
|
@@ -5265,13 +5281,13 @@ const Hi = kn ? (e) => e : (e) => e.type === "dynamic" ? {
|
|
|
5265
5281
|
async function Sn(e, t, n, i) {
|
|
5266
5282
|
const s = n.find((r) => r.match(t, i));
|
|
5267
5283
|
if (s === void 0)
|
|
5268
|
-
await
|
|
5284
|
+
await gs(e, t);
|
|
5269
5285
|
else {
|
|
5270
5286
|
const r = await O(e, "utf8"), a = s.transform(r, t, i);
|
|
5271
5287
|
await L(t, a);
|
|
5272
5288
|
}
|
|
5273
5289
|
}
|
|
5274
|
-
function
|
|
5290
|
+
function zi(e) {
|
|
5275
5291
|
if (e.type === "dynamic")
|
|
5276
5292
|
return e.destination;
|
|
5277
5293
|
if (e.source.endsWith(u.sep)) {
|
|
@@ -5283,72 +5299,72 @@ function Ui(e) {
|
|
|
5283
5299
|
}
|
|
5284
5300
|
return e.destination === "" ? u.basename(e.source) : e.destination.endsWith(u.sep) ? e.type === "directory" && e.destination === u.sep ? e.destination : u.join(e.destination, u.basename(e.source)) : e.destination;
|
|
5285
5301
|
}
|
|
5286
|
-
function
|
|
5287
|
-
const i =
|
|
5302
|
+
function qi({ dist: e, distCdnAssets: t }, n) {
|
|
5303
|
+
const i = zc(n), s = u.join(
|
|
5288
5304
|
t,
|
|
5289
5305
|
i ? u.relative(t, n) : n
|
|
5290
|
-
), r = u.relative(e, s), a =
|
|
5306
|
+
), r = u.relative(e, s), a = Gi(r);
|
|
5291
5307
|
return u.join(e, a);
|
|
5292
5308
|
}
|
|
5293
|
-
function
|
|
5309
|
+
function zc(e) {
|
|
5294
5310
|
if (e.startsWith(u.sep)) {
|
|
5295
5311
|
const t = Ae(), n = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
|
|
5296
5312
|
return e.startsWith(`/${n}/`) || e.startsWith("/Users/");
|
|
5297
5313
|
} else
|
|
5298
5314
|
return !!(!kn && u.isAbsolute(e));
|
|
5299
5315
|
}
|
|
5300
|
-
function
|
|
5301
|
-
const i =
|
|
5316
|
+
function qc(e, t, n) {
|
|
5317
|
+
const i = Gi(u.relative(n, t)), s = i.startsWith("/") ? i.slice(1) : i;
|
|
5302
5318
|
return `${e}${s}`;
|
|
5303
5319
|
}
|
|
5304
|
-
const
|
|
5305
|
-
async function
|
|
5320
|
+
const Gi = (e) => e.replaceAll("../", ""), Gc = (e = "") => e.split("?")[0].split("#")[0];
|
|
5321
|
+
async function Vi(e) {
|
|
5306
5322
|
const t = new Set(e.map(u.dirname));
|
|
5307
5323
|
await Promise.all(Array.from(t, async (n) => await U(n, { recursive: !0 })));
|
|
5308
5324
|
}
|
|
5309
|
-
const
|
|
5325
|
+
const Vc = {
|
|
5310
5326
|
match: (e, t) => t.environment === "production" && e.endsWith(".json"),
|
|
5311
5327
|
transform: (e) => JSON.stringify(JSON.parse(e))
|
|
5312
|
-
},
|
|
5313
|
-
function
|
|
5328
|
+
}, At = [Vc];
|
|
5329
|
+
function Xc(e) {
|
|
5314
5330
|
let t;
|
|
5315
5331
|
const n = () => [
|
|
5316
5332
|
...e.options.assets?.transformers ?? [],
|
|
5317
|
-
...
|
|
5333
|
+
...At
|
|
5318
5334
|
];
|
|
5319
5335
|
return {
|
|
5320
5336
|
name: "@arcgis/lumina:handleStaticAssets",
|
|
5321
5337
|
configResolved() {
|
|
5322
|
-
t =
|
|
5338
|
+
t = Qc(e);
|
|
5323
5339
|
},
|
|
5324
5340
|
async configureServer(i) {
|
|
5325
5341
|
e.server = i, !e.isInPuppeteerTestBackEnd && (de(e, await t, n()), i.watcher.on("addDir", (s) => {
|
|
5326
5342
|
if (s.endsWith("assets")) {
|
|
5327
5343
|
const r = u.dirname(s);
|
|
5328
|
-
u.join(r, "/") === e.dir.root ? de(e, [
|
|
5344
|
+
u.join(r, "/") === e.dir.root ? de(e, [Qi], n()) : s.startsWith(e.dir.srcComponents) && de(e, [Xi(s, r)], n());
|
|
5329
5345
|
}
|
|
5330
5346
|
}));
|
|
5331
5347
|
},
|
|
5332
5348
|
async writeBundle() {
|
|
5333
|
-
await
|
|
5349
|
+
await Hi(e, await t, n());
|
|
5334
5350
|
}
|
|
5335
5351
|
};
|
|
5336
5352
|
}
|
|
5337
|
-
async function
|
|
5353
|
+
async function Qc(e) {
|
|
5338
5354
|
const t = H("assets"), n = await e.componentFilesPromise, i = await Promise.all(
|
|
5339
5355
|
n.map(async (s) => {
|
|
5340
5356
|
const r = u.dirname(s), a = u.join(r, "assets");
|
|
5341
|
-
return await H(a) ?
|
|
5357
|
+
return await H(a) ? Xi(a, r) : void 0;
|
|
5342
5358
|
})
|
|
5343
5359
|
);
|
|
5344
|
-
return await t && i.push(
|
|
5360
|
+
return await t && i.push(Qi), i.filter(j);
|
|
5345
5361
|
}
|
|
5346
|
-
const
|
|
5362
|
+
const Xi = (e, t) => ({
|
|
5347
5363
|
type: "directory",
|
|
5348
5364
|
source: e,
|
|
5349
5365
|
destination: u.basename(t)
|
|
5350
|
-
}),
|
|
5351
|
-
function
|
|
5366
|
+
}), Qi = { type: "directory", source: "assets/", destination: "" };
|
|
5367
|
+
function Yc(e) {
|
|
5352
5368
|
const { stencilCompatibility: t } = e.options.build?.ssr ?? {};
|
|
5353
5369
|
if (t?.enabled === !0)
|
|
5354
5370
|
return {
|
|
@@ -5356,7 +5372,7 @@ function Vc(e) {
|
|
|
5356
5372
|
async writeBundle() {
|
|
5357
5373
|
if (e.isInStorybook)
|
|
5358
5374
|
return;
|
|
5359
|
-
const n =
|
|
5375
|
+
const n = R()?.name ?? e.options.build?.cdn?.namespace ?? u.basename(e.dir.root), i = `${n}/hydrate`, s = u.resolve(e.dir.root, t.path ?? "hydrate"), r = "index.d.ts", a = "index.js", c = "index.mjs", l = u.join(s, "index.d.ts"), d = u.join(s, "index.js"), p = u.join(s, "index.mjs"), m = ne(s, e.dir.dist), y = `${Array.from(
|
|
5360
5376
|
new Set(e.apiJsonComponents.map((h) => `import "${m}/${h.importPath}";`))
|
|
5361
5377
|
).join(`
|
|
5362
5378
|
`)}
|
|
@@ -5400,7 +5416,7 @@ export * from "@arcgis/lumina/stencilSsrCompatibility";`;
|
|
|
5400
5416
|
}
|
|
5401
5417
|
};
|
|
5402
5418
|
}
|
|
5403
|
-
const
|
|
5419
|
+
const Zc = (e) => ({
|
|
5404
5420
|
name: "@arcgis/lumina:printTotalBuildSize",
|
|
5405
5421
|
apply: () => e.viteCommand === "build",
|
|
5406
5422
|
configResolved(t) {
|
|
@@ -5417,10 +5433,10 @@ const Xc = (e) => ({
|
|
|
5417
5433
|
const m = console.log;
|
|
5418
5434
|
console.log = function(...y) {
|
|
5419
5435
|
if (m.apply(console, y), y.length === 1 && typeof y[0] == "string") {
|
|
5420
|
-
const [h, v] = y[0].match(
|
|
5436
|
+
const [h, v] = y[0].match(tl) ?? [];
|
|
5421
5437
|
if (!h)
|
|
5422
5438
|
return;
|
|
5423
|
-
p || (p = y[0].slice(0, y[0].indexOf(h) + h.length).replaceAll(
|
|
5439
|
+
p || (p = y[0].slice(0, y[0].indexOf(h) + h.length).replaceAll(nl, "").length);
|
|
5424
5440
|
const g = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
|
|
5425
5441
|
v ? (d += Number.parseFloat(v.replace(" kB", "").replaceAll(",", "")), l += g) : c += g;
|
|
5426
5442
|
}
|
|
@@ -5436,7 +5452,7 @@ const Xc = (e) => ({
|
|
|
5436
5452
|
[
|
|
5437
5453
|
Tn,
|
|
5438
5454
|
v,
|
|
5439
|
-
|
|
5455
|
+
el,
|
|
5440
5456
|
"*",
|
|
5441
5457
|
" ".repeat(p - `${v}*`.length - h.length),
|
|
5442
5458
|
h,
|
|
@@ -5447,10 +5463,10 @@ const Xc = (e) => ({
|
|
|
5447
5463
|
}
|
|
5448
5464
|
};
|
|
5449
5465
|
}
|
|
5450
|
-
}), bn = "\x1B[22m\x1B[1m\x1B[22m", Tn = "\x1B[2m",
|
|
5466
|
+
}), bn = "\x1B[22m\x1B[1m\x1B[22m", Tn = "\x1B[2m", el = "\x1B[22m\x1B[36m", tl = /\d+(?:,\d+)?\.\d{2} kB/gu, nl = /\x1B\[\d+m/gu, il = new Intl.NumberFormat("en", {
|
|
5451
5467
|
maximumFractionDigits: 2,
|
|
5452
5468
|
minimumFractionDigits: 2
|
|
5453
|
-
}), En = (e) => `${
|
|
5469
|
+
}), En = (e) => `${il.format(e)} kB`, sl = (e) => ({
|
|
5454
5470
|
name: "@arcgis/lumina:configureVite",
|
|
5455
5471
|
async config({
|
|
5456
5472
|
server: t,
|
|
@@ -5468,7 +5484,7 @@ const Xc = (e) => ({
|
|
|
5468
5484
|
*/
|
|
5469
5485
|
loader: "src/loader.ts",
|
|
5470
5486
|
// Entrypoint for bundling used components only:
|
|
5471
|
-
...await
|
|
5487
|
+
...await Rr(e)
|
|
5472
5488
|
}, { loader: v, ...g } = h, w = e.environment === "development" || e.isInTest ? {
|
|
5473
5489
|
"process.env.ESRI_INTERNAL": "true"
|
|
5474
5490
|
} : void 0, T = !import.meta.url.includes("node_modules"), C = {
|
|
@@ -5501,7 +5517,7 @@ const Xc = (e) => ({
|
|
|
5501
5517
|
* will be consider external and discovered by Vite based on "entries"
|
|
5502
5518
|
* above, so we don't need to include it here.
|
|
5503
5519
|
*/
|
|
5504
|
-
include: Array.from(
|
|
5520
|
+
include: Array.from(xt).filter((E) => !E.startsWith("@arcgis")),
|
|
5505
5521
|
/**
|
|
5506
5522
|
* Workaround for https://github.com/vitejs/vite/issues/18947. Affects all
|
|
5507
5523
|
* runtime dependencies that are defined inside the monorepo, but are also
|
|
@@ -5592,24 +5608,24 @@ const Xc = (e) => ({
|
|
|
5592
5608
|
browser: {
|
|
5593
5609
|
enabled: e.isInPuppeteerTestFrontEnd ? !1 : m?.enabled ?? !0,
|
|
5594
5610
|
name: m?.name ?? "chromium",
|
|
5595
|
-
provider: m?.provider ??
|
|
5611
|
+
provider: m?.provider ?? Cs
|
|
5596
5612
|
}
|
|
5597
5613
|
},
|
|
5598
5614
|
css: $
|
|
5599
5615
|
};
|
|
5600
5616
|
}
|
|
5601
|
-
}),
|
|
5617
|
+
}), rl = (e) => ({
|
|
5602
5618
|
name: "@arcgis/lumina:setAssetPath",
|
|
5603
5619
|
apply: () => e.viteCommand === "build",
|
|
5604
5620
|
config: (t) => ({
|
|
5605
5621
|
base: t.base ?? e.options.assets?.defaultPath ?? We()
|
|
5606
5622
|
})
|
|
5607
5623
|
});
|
|
5608
|
-
function
|
|
5624
|
+
function ol(e = R()) {
|
|
5609
5625
|
const t = e.version ?? "0.0.1";
|
|
5610
|
-
return
|
|
5626
|
+
return ms(t);
|
|
5611
5627
|
}
|
|
5612
|
-
const
|
|
5628
|
+
const al = (e) => `/*! ${e} */`, x = (e) => (t, n) => {
|
|
5613
5629
|
Object.defineProperty(t, n, {
|
|
5614
5630
|
get() {
|
|
5615
5631
|
throw new Error(
|
|
@@ -5642,8 +5658,8 @@ const ae = {
|
|
|
5642
5658
|
apiJson: "docs/api.json",
|
|
5643
5659
|
stencilLikeDocsJson: "docs/docs.json"
|
|
5644
5660
|
};
|
|
5645
|
-
async function
|
|
5646
|
-
const r =
|
|
5661
|
+
async function Yi(e, t, n, i, s = R()) {
|
|
5662
|
+
const r = cl(e, n, i, s), a = u.join(t, "lumina.ts");
|
|
5647
5663
|
if ((await H(a) ? await O(a, "utf8") : "") === r)
|
|
5648
5664
|
return !1;
|
|
5649
5665
|
if (process.env.CI)
|
|
@@ -5652,7 +5668,7 @@ async function Qi(e, t, n, i, s = M()) {
|
|
|
5652
5668
|
);
|
|
5653
5669
|
return Nn(a, r), !0;
|
|
5654
5670
|
}
|
|
5655
|
-
function
|
|
5671
|
+
function cl(e, t, n, i = R()) {
|
|
5656
5672
|
"@arcgis/components-controllers" in (i.dependencies ?? {}) && console.error(
|
|
5657
5673
|
jn.yellow(
|
|
5658
5674
|
"Deprecation warning: the @arcgis/components-controllers package was merged into @arcgis/lumina. Please remove it from your package.json and rewrite code to import from @arcgis/lumina/controllers and @arcgis/lumina/controllers/accessor instead."
|
|
@@ -5668,11 +5684,11 @@ declare module "@arcgis/lumina" {
|
|
|
5668
5684
|
interface ImportStencilElements extends ${r.map((m, f) => `JSX$${f}.IntrinsicElements`).join(", ")} {}
|
|
5669
5685
|
}`, l = i.devDependencies ?? {}, d = n === "preview" ? "matchers" : n === "webdriverio" ? "webdriverio" : "playwright";
|
|
5670
5686
|
return [
|
|
5671
|
-
|
|
5687
|
+
ll,
|
|
5672
5688
|
// Avoid cyclic references for tests in @arcgis/lumina
|
|
5673
5689
|
i.name === "@arcgis/lumina" ? "" : `
|
|
5674
5690
|
/// <reference types="@arcgis/lumina/typings" />`,
|
|
5675
|
-
t ?
|
|
5691
|
+
t ? dl : "",
|
|
5676
5692
|
l.vitest ? `
|
|
5677
5693
|
/// <reference types="vitest/config" />` : "",
|
|
5678
5694
|
l["@vitest/browser"] ? `
|
|
@@ -5686,7 +5702,7 @@ declare module "@arcgis/lumina" {
|
|
|
5686
5702
|
`
|
|
5687
5703
|
].join("");
|
|
5688
5704
|
}
|
|
5689
|
-
const
|
|
5705
|
+
const ll = `/**
|
|
5690
5706
|
* This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
|
|
5691
5707
|
* Manual edits will be overwritten.
|
|
5692
5708
|
*
|
|
@@ -5694,8 +5710,8 @@ const ol = `/**
|
|
|
5694
5710
|
* as well as @arcgis/core typings if you use @arcgis/core.
|
|
5695
5711
|
*
|
|
5696
5712
|
* If you need to provide additional typings, create a separate file.
|
|
5697
|
-
*/`,
|
|
5698
|
-
/// <reference types="@arcgis/core/interfaces" />`, Cn = "@arcgis/lumina:dependencySupport",
|
|
5713
|
+
*/`, dl = `
|
|
5714
|
+
/// <reference types="@arcgis/core/interfaces" />`, Cn = "@arcgis/lumina:dependencySupport", Zi = (e, t) => e.viteCommand === "serve" && /**
|
|
5699
5715
|
* Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
|
|
5700
5716
|
* However, it is a bit buggy (see
|
|
5701
5717
|
* https://github.com/vitejs/vite/issues/19213). Instead, we are using test
|
|
@@ -5706,10 +5722,10 @@ const ol = `/**
|
|
|
5706
5722
|
* is doing:
|
|
5707
5723
|
* https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
|
|
5708
5724
|
*/
|
|
5709
|
-
e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0,
|
|
5725
|
+
e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, pl = (e) => ({
|
|
5710
5726
|
name: Cn,
|
|
5711
5727
|
configResolved() {
|
|
5712
|
-
!e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise =
|
|
5728
|
+
!e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = ul(e).catch(
|
|
5713
5729
|
(t) => console.error(`${Cn}: Failed to update package's src/lumina.ts`, t)
|
|
5714
5730
|
));
|
|
5715
5731
|
},
|
|
@@ -5717,7 +5733,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
|
|
|
5717
5733
|
// Add imports to index.html before Vite starts resolving imports
|
|
5718
5734
|
order: "pre",
|
|
5719
5735
|
async handler(t, n) {
|
|
5720
|
-
return
|
|
5736
|
+
return Zi(e, n) ? (await he(e)).map(
|
|
5721
5737
|
(s) => "javascriptCode" in s ? {
|
|
5722
5738
|
tag: "script",
|
|
5723
5739
|
attrs: {
|
|
@@ -5757,9 +5773,9 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
|
|
|
5757
5773
|
await e._updateLuminaTsPromise;
|
|
5758
5774
|
}
|
|
5759
5775
|
});
|
|
5760
|
-
async function
|
|
5761
|
-
const n = (await Promise.all([me,
|
|
5762
|
-
if (!await
|
|
5776
|
+
async function ul(e) {
|
|
5777
|
+
const n = (await Promise.all([me, Bi(e)])).flat();
|
|
5778
|
+
if (!await Yi(
|
|
5763
5779
|
n,
|
|
5764
5780
|
e.dir.src,
|
|
5765
5781
|
_,
|
|
@@ -5768,24 +5784,24 @@ async function ll(e) {
|
|
|
5768
5784
|
return;
|
|
5769
5785
|
let s = !1;
|
|
5770
5786
|
function r() {
|
|
5771
|
-
s || console.warn(
|
|
5787
|
+
s || console.warn(ml), s = !0;
|
|
5772
5788
|
}
|
|
5773
5789
|
process.on("exit", () => {
|
|
5774
5790
|
r(), clearTimeout(c);
|
|
5775
5791
|
});
|
|
5776
5792
|
const c = setTimeout(r, 2e3);
|
|
5777
5793
|
}
|
|
5778
|
-
const
|
|
5794
|
+
const ml = jn.greenBright(
|
|
5779
5795
|
`lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
|
|
5780
5796
|
If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
|
|
5781
5797
|
);
|
|
5782
|
-
var
|
|
5798
|
+
var fl = Object.defineProperty, I = (e, t, n, i) => {
|
|
5783
5799
|
for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
|
|
5784
5800
|
(a = e[r]) && (s = a(t, n, s) || s);
|
|
5785
|
-
return s &&
|
|
5801
|
+
return s && fl(t, n, s), s;
|
|
5786
5802
|
};
|
|
5787
5803
|
const Ce = "@arcgis/lumina:compilerContextPlugin";
|
|
5788
|
-
class
|
|
5804
|
+
class P {
|
|
5789
5805
|
constructor(t) {
|
|
5790
5806
|
this.typeScriptProgram = void 0, this.typeScriptTypeChecker = void 0, this.typeScriptWatchProgram = void 0, this._typeScriptSourceFiles = /* @__PURE__ */ new Map(), this._typeScriptReload = void 0, this._plugin = {
|
|
5791
5807
|
name: Ce,
|
|
@@ -5816,7 +5832,7 @@ class x {
|
|
|
5816
5832
|
`${Ce}: Vite output directory is set to the root directory. This can produce unexpected behavior. Please set the output directory to a subdirectory of the root directory (i.e dist/)`
|
|
5817
5833
|
) : p.startsWith("..") && console.warn(
|
|
5818
5834
|
`${Ce}: Vite output directory is outside the root directory. This is not officially supported by Lumina and may lead to unexpected behavior. Contact Lumina maintainers if you need this to be supported.`
|
|
5819
|
-
), this.isInStorybook = s.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(s.server?.hmr ?? !0),
|
|
5835
|
+
), this.isInStorybook = s.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(s.server?.hmr ?? !0), wc(this, s.build.sourcemap !== !1), Zi(this) && he(this).catch(console.error);
|
|
5820
5836
|
}
|
|
5821
5837
|
},
|
|
5822
5838
|
configureServer: {
|
|
@@ -5833,9 +5849,9 @@ class x {
|
|
|
5833
5849
|
webTypes: n.jetBrains === !1 ? void 0 : n.jetBrains?.webTypesFileName ? oe(n.jetBrains.webTypesFileName) : ae.webTypes,
|
|
5834
5850
|
vsCodeHtml: n.vsCode === !1 ? void 0 : n.vsCode?.htmlFileName ? oe(n.vsCode.htmlFileName) : ae.vsCodeHtml,
|
|
5835
5851
|
vsCodeCss: n.vsCode === !1 ? void 0 : n.vsCode?.cssFileName ? oe(n.vsCode.cssFileName) : ae.vsCodeCss
|
|
5836
|
-
}, ui().catch(console.error), this.componentFilesPromise = bt(this, u.resolve("src/components")),
|
|
5837
|
-
const i = t.build?.preamble ??
|
|
5838
|
-
this.banner =
|
|
5852
|
+
}, ui().catch(console.error), this.componentFilesPromise = bt(this, u.resolve("src/components")), vc(this);
|
|
5853
|
+
const i = t.build?.preamble ?? ol();
|
|
5854
|
+
this.banner = al(i);
|
|
5839
5855
|
}
|
|
5840
5856
|
_inferBuildSetup({ command: t, mode: n }, i) {
|
|
5841
5857
|
this.isInTest = process.env.NODE_ENV === "test", n === "production" || n === "development" ? this.environment = n : n === "test" || n === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (console.warn(`${Tt}: Vite is running in unknown mode "${n}". Assuming development`), this.environment = "development"), this.viteCommand = t;
|
|
@@ -5911,72 +5927,72 @@ class x {
|
|
|
5911
5927
|
}
|
|
5912
5928
|
}
|
|
5913
5929
|
I([
|
|
5914
|
-
|
|
5915
|
-
],
|
|
5930
|
+
x("buildStart() in build mode or load() serve mode")
|
|
5931
|
+
], P.prototype, "typeScriptHost");
|
|
5916
5932
|
I([
|
|
5917
|
-
|
|
5918
|
-
],
|
|
5933
|
+
x("configResolved()")
|
|
5934
|
+
], P.prototype, "shouldMinify");
|
|
5919
5935
|
I([
|
|
5920
|
-
|
|
5921
|
-
],
|
|
5936
|
+
x("configResolved()")
|
|
5937
|
+
], P.prototype, "shouldMinifyJsx");
|
|
5922
5938
|
I([
|
|
5923
|
-
|
|
5924
|
-
],
|
|
5939
|
+
x("configResolved()")
|
|
5940
|
+
], P.prototype, "dir");
|
|
5925
5941
|
I([
|
|
5926
|
-
|
|
5927
|
-
],
|
|
5942
|
+
x("load()")
|
|
5943
|
+
], P.prototype, "apiJson");
|
|
5928
5944
|
I([
|
|
5929
|
-
|
|
5930
|
-
],
|
|
5945
|
+
x("load()")
|
|
5946
|
+
], P.prototype, "apiJsonComponents");
|
|
5931
5947
|
I([
|
|
5932
|
-
|
|
5933
|
-
],
|
|
5948
|
+
x("load()")
|
|
5949
|
+
], P.prototype, "privateApiJson");
|
|
5934
5950
|
I([
|
|
5935
|
-
|
|
5936
|
-
],
|
|
5951
|
+
x("load() when in build mode")
|
|
5952
|
+
], P.prototype, "_componentPathMapping");
|
|
5937
5953
|
I([
|
|
5938
|
-
|
|
5939
|
-
],
|
|
5954
|
+
x("apply()")
|
|
5955
|
+
], P.prototype, "environment");
|
|
5940
5956
|
I([
|
|
5941
|
-
|
|
5942
|
-
],
|
|
5957
|
+
x("apply()")
|
|
5958
|
+
], P.prototype, "isInTest");
|
|
5943
5959
|
I([
|
|
5944
|
-
|
|
5945
|
-
],
|
|
5960
|
+
x("apply()")
|
|
5961
|
+
], P.prototype, "isInPuppeteerTestBackEnd");
|
|
5946
5962
|
I([
|
|
5947
|
-
|
|
5948
|
-
],
|
|
5963
|
+
x("apply()")
|
|
5964
|
+
], P.prototype, "isInPuppeteerTestFrontEnd");
|
|
5949
5965
|
I([
|
|
5950
|
-
|
|
5951
|
-
],
|
|
5966
|
+
x("configResolved()")
|
|
5967
|
+
], P.prototype, "isInStorybook");
|
|
5952
5968
|
I([
|
|
5953
|
-
|
|
5954
|
-
],
|
|
5969
|
+
x("configResolved()")
|
|
5970
|
+
], P.prototype, "hmrEnabled");
|
|
5955
5971
|
I([
|
|
5956
|
-
|
|
5957
|
-
],
|
|
5972
|
+
x("apply()")
|
|
5973
|
+
], P.prototype, "viteCommand");
|
|
5958
5974
|
I([
|
|
5959
|
-
|
|
5960
|
-
],
|
|
5975
|
+
x("configResolved()")
|
|
5976
|
+
], P.prototype, "isFullApiExtraction");
|
|
5961
5977
|
I([
|
|
5962
|
-
|
|
5963
|
-
],
|
|
5978
|
+
x("configResolved()")
|
|
5979
|
+
], P.prototype, "viteConfig");
|
|
5964
5980
|
I([
|
|
5965
|
-
|
|
5966
|
-
],
|
|
5981
|
+
x("configResolved()")
|
|
5982
|
+
], P.prototype, "server");
|
|
5967
5983
|
I([
|
|
5968
|
-
|
|
5969
|
-
],
|
|
5984
|
+
x("transform()")
|
|
5985
|
+
], P.prototype, "_globalHydratedCssString");
|
|
5970
5986
|
I([
|
|
5971
|
-
|
|
5972
|
-
],
|
|
5987
|
+
x("config()")
|
|
5988
|
+
], P.prototype, "componentFiles");
|
|
5973
5989
|
I([
|
|
5974
|
-
|
|
5975
|
-
],
|
|
5990
|
+
x("configResolved()")
|
|
5991
|
+
], P.prototype, "_compilerOptionsForPrinter");
|
|
5976
5992
|
I([
|
|
5977
|
-
|
|
5978
|
-
],
|
|
5979
|
-
const
|
|
5993
|
+
x("configResolved()")
|
|
5994
|
+
], P.prototype, "_typeScriptPrinter");
|
|
5995
|
+
const yl = (e) => ({
|
|
5980
5996
|
name: "@arcgis/lumina:addNonLazyImports",
|
|
5981
5997
|
apply: () => e.viteCommand === "build",
|
|
5982
5998
|
generateBundle(t, n) {
|
|
@@ -5984,7 +6000,7 @@ const ul = (e) => ({
|
|
|
5984
6000
|
const r = pe(i, "components/", e);
|
|
5985
6001
|
if (r !== i && (s.fileName = r), s.type === "chunk") {
|
|
5986
6002
|
const a = u.dirname(u.join(e.dir.dist, i)), c = r === i ? a : u.dirname(u.join(e.dir.dist, r));
|
|
5987
|
-
s.code =
|
|
6003
|
+
s.code = Mn(s.code, e, c, a);
|
|
5988
6004
|
}
|
|
5989
6005
|
});
|
|
5990
6006
|
},
|
|
@@ -5997,7 +6013,7 @@ const ul = (e) => ({
|
|
|
5997
6013
|
n.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: l }]) => {
|
|
5998
6014
|
if (i.has(r) || a.length === 0 && c.length === 0)
|
|
5999
6015
|
return;
|
|
6000
|
-
const d =
|
|
6016
|
+
const d = es(t, l, i);
|
|
6001
6017
|
if (d.forEach((p) => {
|
|
6002
6018
|
t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
|
|
6003
6019
|
}), (a.length > 0 || c.length > 0) && d.length === 0) {
|
|
@@ -6012,7 +6028,7 @@ const ul = (e) => ({
|
|
|
6012
6028
|
return [];
|
|
6013
6029
|
const l = u.dirname(r), d = pe(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
|
|
6014
6030
|
function m(S) {
|
|
6015
|
-
const b = Qa(
|
|
6031
|
+
const b = Ya(Qa(e, S, r), p);
|
|
6016
6032
|
if (b !== `./${p}`)
|
|
6017
6033
|
return b.startsWith(".") ? `${b}/${$n}` : b;
|
|
6018
6034
|
}
|
|
@@ -6034,44 +6050,44 @@ ${C}
|
|
|
6034
6050
|
deferredLoaders${T.join("")};` : C;
|
|
6035
6051
|
return [
|
|
6036
6052
|
L(u.join(e.dir.dist, p, $n), E),
|
|
6037
|
-
L(u.join(e.dir.dist, p,
|
|
6053
|
+
L(u.join(e.dir.dist, p, hl), $)
|
|
6038
6054
|
];
|
|
6039
6055
|
});
|
|
6040
6056
|
await Promise.all(s);
|
|
6041
6057
|
}
|
|
6042
|
-
}), $n = "index.js",
|
|
6058
|
+
}), $n = "index.js", hl = "index.d.ts", es = (e, t, n, i = /* @__PURE__ */ new Set()) => t.flatMap((s) => n.has(s) ? [s] : i.has(s) ? [] : (i.add(s), es(e, e[s].referencedBy, n, i))), gl = (e) => ({
|
|
6043
6059
|
name: "@arcgis/lumina:handleDynamicAssets",
|
|
6044
6060
|
configureServer(t) {
|
|
6045
|
-
e.server = t, !e.isInPuppeteerTestBackEnd &&
|
|
6061
|
+
e.server = t, !e.isInPuppeteerTestBackEnd && Pn(e).forEach(({ assets: n, transformers: i }) => de(e, n, i));
|
|
6046
6062
|
},
|
|
6047
6063
|
async writeBundle() {
|
|
6048
6064
|
await Promise.all(
|
|
6049
|
-
|
|
6050
|
-
async ({ assets: t, transformers: n }) => await
|
|
6065
|
+
Pn(e).map(
|
|
6066
|
+
async ({ assets: t, transformers: n }) => await Hi(e, t, n)
|
|
6051
6067
|
)
|
|
6052
6068
|
);
|
|
6053
6069
|
}
|
|
6054
6070
|
});
|
|
6055
|
-
function
|
|
6071
|
+
function Pn(e) {
|
|
6056
6072
|
const t = [], n = e.assetsToProvide?.filter((i) => i.apply === void 0 || i.apply === e.viteCommand) ?? [];
|
|
6057
6073
|
return e.options.assets?.extra?.forEach((i) => {
|
|
6058
6074
|
"type" in i ? t.push(i) : "assets" in i && t.push(...i.assets);
|
|
6059
6075
|
}), t.length > 0 && n.push({ assets: t }), e.assetsToProvide = void 0, n;
|
|
6060
6076
|
}
|
|
6061
|
-
const
|
|
6062
|
-
name:
|
|
6077
|
+
const xn = "@arcgis/lumina:updatePackageJson", vl = (e) => ({
|
|
6078
|
+
name: xn,
|
|
6063
6079
|
apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
|
|
6064
6080
|
configResolved() {
|
|
6065
|
-
|
|
6066
|
-
(t) => console.error(`${
|
|
6081
|
+
wl(e).catch(
|
|
6082
|
+
(t) => console.error(`${xn}: Failed to update package's package.json`, t)
|
|
6067
6083
|
);
|
|
6068
6084
|
}
|
|
6069
6085
|
});
|
|
6070
|
-
async function
|
|
6071
|
-
const t = u.join(e.dir.root, "package.json"), n = JSON.parse(await O(t, "utf-8")), i =
|
|
6086
|
+
async function wl(e) {
|
|
6087
|
+
const t = u.join(e.dir.root, "package.json"), n = JSON.parse(await O(t, "utf-8")), i = Sl(n, e);
|
|
6072
6088
|
i && Nn(t, JSON.stringify(i, null, 2));
|
|
6073
6089
|
}
|
|
6074
|
-
function
|
|
6090
|
+
function Sl(e, t) {
|
|
6075
6091
|
const n = e?.devDependencies ?? {};
|
|
6076
6092
|
Object.keys(e?.peerDependencies ?? {}).forEach((a) => {
|
|
6077
6093
|
a in n || console.error(
|
|
@@ -6099,20 +6115,20 @@ function gl(e, t) {
|
|
|
6099
6115
|
if (i)
|
|
6100
6116
|
return e;
|
|
6101
6117
|
}
|
|
6102
|
-
const
|
|
6118
|
+
const bl = (e) => ({
|
|
6103
6119
|
timestamp: e.apiJson.timestamp,
|
|
6104
6120
|
compiler: e.apiJson.compiler,
|
|
6105
|
-
components:
|
|
6121
|
+
components: Tl(e),
|
|
6106
6122
|
typeLibrary: {}
|
|
6107
6123
|
});
|
|
6108
|
-
function
|
|
6124
|
+
function Tl(e) {
|
|
6109
6125
|
const t = [];
|
|
6110
6126
|
for (const n of e.apiJson.modules)
|
|
6111
6127
|
for (const i of n.declarations)
|
|
6112
|
-
"customElement" in i && t.push(
|
|
6128
|
+
"customElement" in i && t.push(El(i, n.path));
|
|
6113
6129
|
return t;
|
|
6114
6130
|
}
|
|
6115
|
-
function
|
|
6131
|
+
function El(e, t) {
|
|
6116
6132
|
const n = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
|
|
6117
6133
|
return {
|
|
6118
6134
|
filePath: t,
|
|
@@ -6127,9 +6143,9 @@ function Sl(e, t) {
|
|
|
6127
6143
|
dependencies: [],
|
|
6128
6144
|
dependencyGraph: {},
|
|
6129
6145
|
deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
|
|
6130
|
-
props: e.members.map(
|
|
6131
|
-
methods: e.members.map(
|
|
6132
|
-
events: e.events?.map(
|
|
6146
|
+
props: e.members.map(Cl).filter(j),
|
|
6147
|
+
methods: e.members.map($l).filter(j),
|
|
6148
|
+
events: e.events?.map(Pl) ?? [],
|
|
6133
6149
|
styles: e.cssProperties?.map((i) => ({
|
|
6134
6150
|
name: i.name,
|
|
6135
6151
|
annotation: "prop",
|
|
@@ -6141,7 +6157,7 @@ function Sl(e, t) {
|
|
|
6141
6157
|
listeners: []
|
|
6142
6158
|
};
|
|
6143
6159
|
}
|
|
6144
|
-
function
|
|
6160
|
+
function Cl(e) {
|
|
6145
6161
|
if (e.kind !== "field")
|
|
6146
6162
|
return;
|
|
6147
6163
|
const t = e, n = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], i = t.readonly ? [{ name: "readonly", text: "" }] : [], s = t.docsTags?.some((r) => r.name === "required") ?? !1;
|
|
@@ -6151,7 +6167,7 @@ function bl(e) {
|
|
|
6151
6167
|
complexType: t.type === void 0 ? void 0 : {
|
|
6152
6168
|
original: t.type.text,
|
|
6153
6169
|
resolved: t.type.text,
|
|
6154
|
-
references:
|
|
6170
|
+
references: kt(t.type.references)
|
|
6155
6171
|
},
|
|
6156
6172
|
mutable: !0,
|
|
6157
6173
|
attr: "attribute" in t && typeof t.attribute == "string" ? t.attribute : void 0,
|
|
@@ -6170,7 +6186,7 @@ function bl(e) {
|
|
|
6170
6186
|
required: s
|
|
6171
6187
|
};
|
|
6172
6188
|
}
|
|
6173
|
-
const
|
|
6189
|
+
const kt = (e) => Object.fromEntries(
|
|
6174
6190
|
e?.map(
|
|
6175
6191
|
(t) => [
|
|
6176
6192
|
t.name,
|
|
@@ -6182,7 +6198,7 @@ const Lt = (e) => Object.fromEntries(
|
|
|
6182
6198
|
]
|
|
6183
6199
|
) ?? []
|
|
6184
6200
|
);
|
|
6185
|
-
function
|
|
6201
|
+
function $l(e) {
|
|
6186
6202
|
if (e.kind !== "method")
|
|
6187
6203
|
return;
|
|
6188
6204
|
const t = e, n = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], i = t.parameters?.map(({ name: s, type: r, description: a }) => ({
|
|
@@ -6201,7 +6217,7 @@ function Tl(e) {
|
|
|
6201
6217
|
signature: t.signature ?? "()=>unknown",
|
|
6202
6218
|
parameters: i,
|
|
6203
6219
|
return: t.return?.type?.text ?? "void",
|
|
6204
|
-
references:
|
|
6220
|
+
references: kt([
|
|
6205
6221
|
...t.return?.type?.references ?? [],
|
|
6206
6222
|
...t.parameters?.flatMap((s) => s.type.references ?? []) ?? []
|
|
6207
6223
|
])
|
|
@@ -6213,7 +6229,7 @@ function Tl(e) {
|
|
|
6213
6229
|
deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
|
|
6214
6230
|
};
|
|
6215
6231
|
}
|
|
6216
|
-
function
|
|
6232
|
+
function Pl(e) {
|
|
6217
6233
|
const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
|
|
6218
6234
|
return {
|
|
6219
6235
|
event: e.name,
|
|
@@ -6222,7 +6238,7 @@ function El(e) {
|
|
|
6222
6238
|
complexType: {
|
|
6223
6239
|
original: e.type.text,
|
|
6224
6240
|
resolved: e.type.text,
|
|
6225
|
-
references:
|
|
6241
|
+
references: kt(e.type.references)
|
|
6226
6242
|
},
|
|
6227
6243
|
cancelable: e.cancelable ?? !0,
|
|
6228
6244
|
composed: e.composed ?? !0,
|
|
@@ -6231,32 +6247,32 @@ function El(e) {
|
|
|
6231
6247
|
deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated
|
|
6232
6248
|
};
|
|
6233
6249
|
}
|
|
6234
|
-
const
|
|
6250
|
+
const ts = (e) => e.flatMap(
|
|
6235
6251
|
(t) => t.cssProperties?.map((n) => ({
|
|
6236
6252
|
name: n.name,
|
|
6237
6253
|
description: n.description || void 0
|
|
6238
6254
|
})) ?? []
|
|
6239
|
-
),
|
|
6255
|
+
), ns = (e) => e.flatMap(
|
|
6240
6256
|
(t) => t.cssParts?.map((n) => ({
|
|
6241
6257
|
name: `::part(${n.name})`,
|
|
6242
6258
|
description: n.description || void 0
|
|
6243
6259
|
})) ?? []
|
|
6244
|
-
),
|
|
6260
|
+
), xl = (e) => e.attributes?.map((t) => ({
|
|
6245
6261
|
name: t.name ?? "",
|
|
6246
6262
|
description: ze(t.description, t.deprecated) || void 0,
|
|
6247
6263
|
default: t.default,
|
|
6248
6264
|
value: {
|
|
6249
|
-
type:
|
|
6265
|
+
type: Il(t.type.values?.map(Zn))
|
|
6250
6266
|
}
|
|
6251
|
-
})) ?? [],
|
|
6267
|
+
})) ?? [], Il = (e) => e?.length === 1 ? e[0] : e, ze = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, ve = {
|
|
6252
6268
|
slots: "Slots",
|
|
6253
6269
|
events: "Events",
|
|
6254
6270
|
cssProperties: "CSS Properties",
|
|
6255
6271
|
cssParts: "CSS Parts",
|
|
6256
6272
|
methods: "Methods"
|
|
6257
6273
|
};
|
|
6258
|
-
function
|
|
6259
|
-
const t =
|
|
6274
|
+
function is(e) {
|
|
6275
|
+
const t = Al(e.slots), n = kl(e.events), i = Ll(e.cssProperties), s = Fl(e.cssParts), r = Nl(e.members), a = ze(e.description, e.deprecated).trim();
|
|
6260
6276
|
return [...a ? [`${a}
|
|
6261
6277
|
--`] : [], n, r, t, i, s].filter(Boolean).join(`
|
|
6262
6278
|
|
|
@@ -6264,28 +6280,28 @@ function ns(e) {
|
|
|
6264
6280
|
}
|
|
6265
6281
|
const we = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
|
|
6266
6282
|
${t.join(`
|
|
6267
|
-
`)}`,
|
|
6283
|
+
`)}`, Al = (e) => we(
|
|
6268
6284
|
ve.slots,
|
|
6269
6285
|
e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
|
|
6270
|
-
),
|
|
6286
|
+
), kl = (e) => we(
|
|
6271
6287
|
ve.events,
|
|
6272
6288
|
e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
|
|
6273
|
-
),
|
|
6289
|
+
), Ll = (e = []) => we(
|
|
6274
6290
|
ve.cssProperties,
|
|
6275
6291
|
e?.map(
|
|
6276
6292
|
(t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
|
|
6277
6293
|
)
|
|
6278
|
-
),
|
|
6294
|
+
), Fl = (e) => we(
|
|
6279
6295
|
ve.cssParts,
|
|
6280
6296
|
e?.map((t) => `- **${t.name}** - ${t.description}`)
|
|
6281
|
-
),
|
|
6297
|
+
), Nl = (e) => we(
|
|
6282
6298
|
ve.methods,
|
|
6283
|
-
e.filter(
|
|
6299
|
+
e.filter(ls).map(
|
|
6284
6300
|
(t) => [`- \`${t.name}${t.signature}\``, ze(t.description, t.deprecated)].filter(Boolean).join(" - ")
|
|
6285
6301
|
)
|
|
6286
6302
|
);
|
|
6287
|
-
function
|
|
6288
|
-
const n =
|
|
6303
|
+
function jl(e, t) {
|
|
6304
|
+
const n = Dl(e), i = ts(e), s = ns(e), r = R();
|
|
6289
6305
|
return {
|
|
6290
6306
|
$schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
6291
6307
|
name: r.name,
|
|
@@ -6303,21 +6319,21 @@ function Ll(e, t) {
|
|
|
6303
6319
|
}
|
|
6304
6320
|
};
|
|
6305
6321
|
}
|
|
6306
|
-
const
|
|
6322
|
+
const Dl = (e) => e.map((t) => ({
|
|
6307
6323
|
name: t.tagName,
|
|
6308
|
-
description:
|
|
6324
|
+
description: is(t),
|
|
6309
6325
|
"doc-url": t.demos?.[0]?.url,
|
|
6310
|
-
attributes:
|
|
6326
|
+
attributes: xl(t),
|
|
6311
6327
|
slots: t.slots?.map((n) => ({
|
|
6312
6328
|
name: n.name,
|
|
6313
6329
|
description: n.description
|
|
6314
6330
|
})),
|
|
6315
6331
|
events: In(t),
|
|
6316
6332
|
js: {
|
|
6317
|
-
properties:
|
|
6333
|
+
properties: Rl(t),
|
|
6318
6334
|
events: In(t)
|
|
6319
6335
|
}
|
|
6320
|
-
})),
|
|
6336
|
+
})), Rl = (e) => e.members.filter(ds).map((t) => ({
|
|
6321
6337
|
name: t.name,
|
|
6322
6338
|
description: t.description,
|
|
6323
6339
|
type: t.type?.text
|
|
@@ -6325,30 +6341,30 @@ const Fl = (e) => e.map((t) => ({
|
|
|
6325
6341
|
name: t.name,
|
|
6326
6342
|
type: t.type?.text,
|
|
6327
6343
|
description: t.description
|
|
6328
|
-
})) ?? [],
|
|
6344
|
+
})) ?? [], Ml = (e) => e.map((t) => ({
|
|
6329
6345
|
name: t.tagName,
|
|
6330
|
-
description:
|
|
6331
|
-
attributes:
|
|
6346
|
+
description: is(t),
|
|
6347
|
+
attributes: Ol(t),
|
|
6332
6348
|
references: t.demos?.map((n) => ({ name: n.description, url: n.url })) ?? []
|
|
6333
|
-
})),
|
|
6349
|
+
})), Ol = (e) => e.attributes?.map((t) => ({
|
|
6334
6350
|
name: t.name,
|
|
6335
6351
|
description: ze(t.description, t.deprecated) || void 0,
|
|
6336
|
-
values:
|
|
6337
|
-
})) ?? [],
|
|
6352
|
+
values: Jl(t)
|
|
6353
|
+
})) ?? [], Jl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Kl = (e) => ({
|
|
6338
6354
|
$schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
|
|
6339
6355
|
version: 1.1,
|
|
6340
|
-
tags:
|
|
6341
|
-
}),
|
|
6356
|
+
tags: Ml(e)
|
|
6357
|
+
}), Bl = (e) => ({
|
|
6342
6358
|
$schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
|
|
6343
6359
|
version: 1.1,
|
|
6344
|
-
properties:
|
|
6345
|
-
pseudoElements:
|
|
6346
|
-
}),
|
|
6347
|
-
function
|
|
6360
|
+
properties: ts(e),
|
|
6361
|
+
pseudoElements: ns(e)
|
|
6362
|
+
}), Wl = "@arcgis/lumina:generateDocs";
|
|
6363
|
+
function _l(e) {
|
|
6348
6364
|
return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
|
|
6349
6365
|
{
|
|
6350
6366
|
type: "dynamic",
|
|
6351
|
-
source: () => JSON.stringify(
|
|
6367
|
+
source: () => JSON.stringify(bl(e), null, 2),
|
|
6352
6368
|
destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
|
|
6353
6369
|
}
|
|
6354
6370
|
]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
|
|
@@ -6358,34 +6374,34 @@ function Kl(e) {
|
|
|
6358
6374
|
destination: u.join("../..", e._documentationFileNames.apiJson)
|
|
6359
6375
|
}
|
|
6360
6376
|
]), {
|
|
6361
|
-
name:
|
|
6377
|
+
name: Wl,
|
|
6362
6378
|
async writeBundle() {
|
|
6363
6379
|
if (e.isInStorybook)
|
|
6364
6380
|
return;
|
|
6365
6381
|
const { jetBrains: t } = e.options.documentation ?? {}, n = e._documentationFileNames, i = n.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, n.vsCodeHtml), s = n.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, n.vsCodeCss), r = n.webTypes === void 0 ? void 0 : u.join(e.dir.dist, n.webTypes), a = [i, s, r].filter(j);
|
|
6366
6382
|
if (a.length === 0)
|
|
6367
6383
|
return;
|
|
6368
|
-
await
|
|
6384
|
+
await Vi(a);
|
|
6369
6385
|
const c = [];
|
|
6370
6386
|
if (i !== void 0) {
|
|
6371
|
-
const l = JSON.stringify(
|
|
6387
|
+
const l = JSON.stringify(Kl(e.apiJsonComponents), null, 2);
|
|
6372
6388
|
c.push(L(i, l));
|
|
6373
6389
|
}
|
|
6374
6390
|
if (s !== void 0) {
|
|
6375
|
-
const l = JSON.stringify(
|
|
6391
|
+
const l = JSON.stringify(Bl(e.apiJsonComponents), null, 2);
|
|
6376
6392
|
c.push(L(s, l));
|
|
6377
6393
|
}
|
|
6378
6394
|
if (r !== void 0) {
|
|
6379
|
-
const l =
|
|
6395
|
+
const l = jl(e.apiJsonComponents, typeof t == "object" ? t : {});
|
|
6380
6396
|
c.push(L(r, JSON.stringify(l, null, 2)));
|
|
6381
6397
|
}
|
|
6382
6398
|
await Promise.all(c);
|
|
6383
6399
|
}
|
|
6384
6400
|
};
|
|
6385
6401
|
}
|
|
6386
|
-
const
|
|
6402
|
+
const Hl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
|
|
6387
6403
|
|
|
6388
|
-
${e.map(
|
|
6404
|
+
${e.map(Ul).join(`
|
|
6389
6405
|
|
|
6390
6406
|
`)}
|
|
6391
6407
|
|
|
@@ -6397,7 +6413,7 @@ ${e.map(({ tagName: t, pascalCaseName: n }) => ` "${t}": Lumina${n};`).join
|
|
|
6397
6413
|
}
|
|
6398
6414
|
}
|
|
6399
6415
|
}`;
|
|
6400
|
-
function
|
|
6416
|
+
function Ul({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
|
|
6401
6417
|
const [s, r] = Ue(e, n);
|
|
6402
6418
|
return [
|
|
6403
6419
|
`interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
|
|
@@ -6410,7 +6426,7 @@ function Wl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
|
|
|
6410
6426
|
r
|
|
6411
6427
|
].join("");
|
|
6412
6428
|
}
|
|
6413
|
-
function
|
|
6429
|
+
function zl(e) {
|
|
6414
6430
|
const t = ` interface IntrinsicElements extends PreactJsx.IntrinsicElements {
|
|
6415
6431
|
${e.map(({ pascalCaseName: n, tagName: i }) => ` "${i}": Preact${n};`).join(`
|
|
6416
6432
|
`)}
|
|
@@ -6418,7 +6434,7 @@ ${e.map(({ pascalCaseName: n, tagName: i }) => ` "${i}": Preact${n};`).join
|
|
|
6418
6434
|
return `import { JSX as PreactJsx } from "preact";
|
|
6419
6435
|
import type { EventHandler } from "@arcgis/lumina";
|
|
6420
6436
|
|
|
6421
|
-
${e.map(
|
|
6437
|
+
${e.map(ql).join(`
|
|
6422
6438
|
|
|
6423
6439
|
`)}
|
|
6424
6440
|
|
|
@@ -6431,7 +6447,7 @@ ${t}
|
|
|
6431
6447
|
}
|
|
6432
6448
|
}`;
|
|
6433
6449
|
}
|
|
6434
|
-
function
|
|
6450
|
+
function ql({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
|
|
6435
6451
|
const [s, r] = Ue(e, n);
|
|
6436
6452
|
return [
|
|
6437
6453
|
`interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
|
|
@@ -6444,13 +6460,13 @@ function Hl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
|
|
|
6444
6460
|
r
|
|
6445
6461
|
].join("");
|
|
6446
6462
|
}
|
|
6447
|
-
function
|
|
6463
|
+
function Gl(e) {
|
|
6448
6464
|
const t = e.map(({ pascalCaseName: n, tagName: i }) => ` "${i}": React${n};`).join(`
|
|
6449
6465
|
`);
|
|
6450
6466
|
return `import type { HTMLProps } from 'react';
|
|
6451
6467
|
import type { EventHandler } from "@arcgis/lumina";
|
|
6452
6468
|
|
|
6453
|
-
${e.map(
|
|
6469
|
+
${e.map(Vl).join(`
|
|
6454
6470
|
|
|
6455
6471
|
`)}
|
|
6456
6472
|
|
|
@@ -6476,7 +6492,7 @@ ${t}
|
|
|
6476
6492
|
}
|
|
6477
6493
|
}`;
|
|
6478
6494
|
}
|
|
6479
|
-
function
|
|
6495
|
+
function Vl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
|
|
6480
6496
|
const [s, r] = Ue(e, n);
|
|
6481
6497
|
return [
|
|
6482
6498
|
`interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
|
|
@@ -6489,10 +6505,10 @@ function zl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
|
|
|
6489
6505
|
r
|
|
6490
6506
|
].join("");
|
|
6491
6507
|
}
|
|
6492
|
-
const
|
|
6508
|
+
const Xl = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
|
|
6493
6509
|
import type { EventHandler } from "@arcgis/lumina";
|
|
6494
6510
|
|
|
6495
|
-
${e.map(
|
|
6511
|
+
${e.map(Ql).join(`
|
|
6496
6512
|
|
|
6497
6513
|
`)}
|
|
6498
6514
|
|
|
@@ -6510,7 +6526,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
|
|
|
6510
6526
|
interface IntrinsicElements extends ExposedElements {}
|
|
6511
6527
|
}
|
|
6512
6528
|
}`;
|
|
6513
|
-
function
|
|
6529
|
+
function Ql({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
|
|
6514
6530
|
const [s, r] = Ue(e, n);
|
|
6515
6531
|
return [
|
|
6516
6532
|
`interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
|
|
@@ -6523,16 +6539,16 @@ function Gl({ name: e, pascalCaseName: t, members: n, events: i = [] }) {
|
|
|
6523
6539
|
r
|
|
6524
6540
|
].join("");
|
|
6525
6541
|
}
|
|
6526
|
-
const
|
|
6542
|
+
const Yl = (e, t, n) => [n, t, Zl(e), ed(e)].join(`
|
|
6527
6543
|
|
|
6528
|
-
`),
|
|
6544
|
+
`), Zl = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
|
|
6529
6545
|
({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
|
|
6530
6546
|
detail: T;
|
|
6531
6547
|
target: HTML${t}Element;
|
|
6532
6548
|
currentTarget: HTML${t}Element;
|
|
6533
6549
|
}`
|
|
6534
6550
|
).join(`
|
|
6535
|
-
`),
|
|
6551
|
+
`), ed = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
|
|
6536
6552
|
|
|
6537
6553
|
declare global {
|
|
6538
6554
|
interface HTMLElementTagNameMap {
|
|
@@ -6540,12 +6556,12 @@ ${e.map(({ pascalCaseName: t, tagName: n }) => ` "${n}": HTML${t}Element;`).j
|
|
|
6540
6556
|
`)}
|
|
6541
6557
|
}
|
|
6542
6558
|
|
|
6543
|
-
${e.map(
|
|
6559
|
+
${e.map(td).join(`
|
|
6544
6560
|
`).split(`
|
|
6545
6561
|
`).map((t) => t.length > 0 ? ` ${t}` : t).join(`
|
|
6546
6562
|
`)}
|
|
6547
6563
|
}`;
|
|
6548
|
-
function
|
|
6564
|
+
function td({ name: e, pascalCaseName: t, events: n = [] }) {
|
|
6549
6565
|
const i = n.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
|
|
6550
6566
|
return [
|
|
6551
6567
|
i ? `interface ${r}EventMap {
|
|
@@ -6564,7 +6580,7 @@ ${i ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
|
|
|
6564
6580
|
}`
|
|
6565
6581
|
].join("");
|
|
6566
6582
|
}
|
|
6567
|
-
function
|
|
6583
|
+
function nd(e) {
|
|
6568
6584
|
let t;
|
|
6569
6585
|
return {
|
|
6570
6586
|
name: "@arcgis/lumina:generateFrameworkTypes",
|
|
@@ -6576,7 +6592,7 @@ function Zl(e) {
|
|
|
6576
6592
|
const n = u.join(e.dir.dist, "index.d.ts");
|
|
6577
6593
|
e._declarationTextTransformers.push((i) => {
|
|
6578
6594
|
const { filePath: s, content: r } = i;
|
|
6579
|
-
return s === n ? { filePath: s, content:
|
|
6595
|
+
return s === n ? { filePath: s, content: Yl(e.apiJsonComponents, r, t) } : i;
|
|
6580
6596
|
});
|
|
6581
6597
|
},
|
|
6582
6598
|
async writeBundle() {
|
|
@@ -6586,10 +6602,10 @@ function Zl(e) {
|
|
|
6586
6602
|
await U(n);
|
|
6587
6603
|
const i = `/// <reference types="../index.d.ts" />
|
|
6588
6604
|
${t.replaceAll("./", "../")}`, s = Object.entries({
|
|
6589
|
-
react:
|
|
6590
|
-
preact:
|
|
6591
|
-
stencil:
|
|
6592
|
-
lumina:
|
|
6605
|
+
react: Gl(e.apiJsonComponents),
|
|
6606
|
+
preact: zl(e.apiJsonComponents),
|
|
6607
|
+
stencil: Xl(e.apiJsonComponents),
|
|
6608
|
+
lumina: Hl(e.apiJsonComponents)
|
|
6593
6609
|
}).map(
|
|
6594
6610
|
async ([r, a]) => await L(u.join(n, `${r}.d.ts`), `${i}
|
|
6595
6611
|
${a}`)
|
|
@@ -6598,38 +6614,38 @@ ${a}`)
|
|
|
6598
6614
|
}
|
|
6599
6615
|
};
|
|
6600
6616
|
}
|
|
6601
|
-
function
|
|
6617
|
+
function id(e) {
|
|
6602
6618
|
return {
|
|
6603
6619
|
name: "@arcgis/lumina:buildWrappers",
|
|
6604
6620
|
apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
|
|
6605
6621
|
async writeBundle() {
|
|
6606
6622
|
e.isInStorybook || await Promise.all(
|
|
6607
6623
|
e.options.build?.wrappers?.map(async (t) => {
|
|
6608
|
-
t.type === "react18" && await
|
|
6624
|
+
t.type === "react18" && await od(e, t);
|
|
6609
6625
|
}) ?? []
|
|
6610
6626
|
);
|
|
6611
6627
|
}
|
|
6612
6628
|
};
|
|
6613
6629
|
}
|
|
6614
|
-
const
|
|
6615
|
-
import React from "${
|
|
6630
|
+
const sd = "react", An = "@lit/react", rd = `
|
|
6631
|
+
import React from "${sd}";
|
|
6616
6632
|
import { createComponent } from "${An}";
|
|
6617
6633
|
import type { EventName } from "${An}";
|
|
6618
6634
|
import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
|
|
6619
6635
|
|
|
6620
6636
|
const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
|
|
6621
6637
|
`;
|
|
6622
|
-
async function
|
|
6623
|
-
const { name: n } =
|
|
6638
|
+
async function od(e, t) {
|
|
6639
|
+
const { name: n } = R(), i = [];
|
|
6624
6640
|
for (const a of e.apiJson.modules)
|
|
6625
6641
|
for (const c of a.declarations)
|
|
6626
|
-
"customElement" in c && i.push(
|
|
6627
|
-
const s = [`/// <reference types="${n}" preserve="true" />`,
|
|
6642
|
+
"customElement" in c && i.push(ad(c));
|
|
6643
|
+
const s = [`/// <reference types="${n}" preserve="true" />`, rd, ...i].join(""), r = u.resolve(t.proxiesFile);
|
|
6628
6644
|
await U(u.dirname(r), { recursive: !0 }), await L(r, s);
|
|
6629
6645
|
}
|
|
6630
|
-
function
|
|
6646
|
+
function ad(e) {
|
|
6631
6647
|
const t = e.events?.map(
|
|
6632
|
-
(n) => ` ${ge(`on${
|
|
6648
|
+
(n) => ` ${ge(`on${fs(n.name)}`)}: "${n.name}" as EventName<HTML${e.pascalCaseName}Element["${n.name}"]>,`
|
|
6633
6649
|
).join(`
|
|
6634
6650
|
`);
|
|
6635
6651
|
return `
|
|
@@ -6643,37 +6659,37 @@ ${t}
|
|
|
6643
6659
|
);
|
|
6644
6660
|
`;
|
|
6645
6661
|
}
|
|
6646
|
-
function
|
|
6647
|
-
const t = new
|
|
6662
|
+
function bd(e = {}) {
|
|
6663
|
+
const t = new P(e), n = [
|
|
6648
6664
|
t._plugin,
|
|
6649
|
-
|
|
6650
|
-
|
|
6665
|
+
sl(t),
|
|
6666
|
+
rl(t),
|
|
6667
|
+
vl(t),
|
|
6668
|
+
Dr(t),
|
|
6669
|
+
Hc(t),
|
|
6670
|
+
nd(t),
|
|
6671
|
+
_l(t),
|
|
6672
|
+
hc(t),
|
|
6673
|
+
fo(t),
|
|
6674
|
+
Xc(t),
|
|
6675
|
+
gl(t),
|
|
6651
6676
|
yl(t),
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
Kl(t),
|
|
6656
|
-
yc(t),
|
|
6657
|
-
mo(t),
|
|
6658
|
-
qc(t),
|
|
6659
|
-
fl(t),
|
|
6660
|
-
ul(t),
|
|
6661
|
-
cl(t),
|
|
6662
|
-
Ts(t),
|
|
6663
|
-
bc(t),
|
|
6677
|
+
pl(t),
|
|
6678
|
+
Es(t),
|
|
6679
|
+
Tc(t),
|
|
6664
6680
|
// Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
|
|
6665
6681
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6682
|
+
Yc(t),
|
|
6683
|
+
id(t),
|
|
6684
|
+
Zc(t)
|
|
6669
6685
|
].filter(j);
|
|
6670
6686
|
return n.context = t, n;
|
|
6671
6687
|
}
|
|
6672
|
-
const
|
|
6688
|
+
const Td = {
|
|
6673
6689
|
initializeComponentDependencies: ui,
|
|
6674
|
-
updateLuminaTs:
|
|
6690
|
+
updateLuminaTs: Yi,
|
|
6675
6691
|
propertyToAttributeMappings: B,
|
|
6676
|
-
findDeclaredComponents:
|
|
6692
|
+
findDeclaredComponents: On,
|
|
6677
6693
|
nativeEvents: zn,
|
|
6678
6694
|
svgElements: yt,
|
|
6679
6695
|
mathMlElements: ht,
|
|
@@ -6683,8 +6699,8 @@ const wd = {
|
|
|
6683
6699
|
isPropertyEscapeNeeded: He
|
|
6684
6700
|
};
|
|
6685
6701
|
export {
|
|
6686
|
-
|
|
6687
|
-
|
|
6702
|
+
Wo as LuminaApiExtractor,
|
|
6703
|
+
Td as exportsForCodemod,
|
|
6688
6704
|
We as inferCdnUrl,
|
|
6689
|
-
|
|
6705
|
+
bd as useLumina
|
|
6690
6706
|
};
|