@arcgis/lumina-compiler 4.33.0-next.122 → 4.33.0-next.124
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/dependencies/loaders.d.ts +0 -4
- package/dist/dependencies/testSetupFiles.d.ts +0 -8
- package/dist/index.js +715 -728
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { nodeExternals as
|
|
2
|
-
import { stringToStartsWithGlob as
|
|
3
|
-
import
|
|
1
|
+
import { nodeExternals as hs } from "rollup-plugin-node-externals";
|
|
2
|
+
import { stringToStartsWithGlob as Bt, path as u, toSystemPathSeparators as te, retrievePackageJson as J, fetchPackageLocation as He, asyncRetrievePackageJson as ze, existsAsync as G, findPath as gs, toPosixPathSeparators as Fe, isPosix as Wi, getCwd as _i } from "@arcgis/components-build-utils";
|
|
3
|
+
import vs from "vite-plugin-dts";
|
|
4
4
|
import o from "typescript";
|
|
5
5
|
import { f as b, l as C } from "./logger-KpGU2b3R.js";
|
|
6
|
-
import { getMemberName as Z, apiMemberToSynthesizedComments as Q, globalPackageIdentifier as Hi, setApiDocFromJsDoc as fe, ApiExtractor as
|
|
7
|
-
import { isNotUndefined as D, mappedFind as ge, camelToKebab as bt, kebabToPascal as
|
|
8
|
-
import { readdir as qe, readFile as O, rm as
|
|
9
|
-
import { lazyMetaSubItemJoiner as
|
|
10
|
-
import { build as
|
|
11
|
-
import { glob as
|
|
12
|
-
import
|
|
6
|
+
import { getMemberName as Z, apiMemberToSynthesizedComments as Q, globalPackageIdentifier as Hi, setApiDocFromJsDoc as fe, ApiExtractor as Ss, hasIgnoredModifier as ws, symbolToDocs as Wt, setDefaultFromInitializer as _t, multipleJsDocTags as bs, findDecorator as Ht, isApiMethod as Ts, isApiProperty as Es } from "@arcgis/api-extractor";
|
|
7
|
+
import { isNotUndefined as D, mappedFind as ge, camelToKebab as bt, kebabToPascal as Cs, uncapitalize as ut, identity as zi, Deferred as $s, getPreamble as xs, capitalize as Ps } from "@arcgis/components-utils";
|
|
8
|
+
import { readdir as qe, readFile as O, rm as As, mkdir as _, cp as ks, writeFile as F, copyFile as Is } from "node:fs/promises";
|
|
9
|
+
import { lazyMetaSubItemJoiner as Ls, lazyMetaItemJoiner as tt, lazyMetaGroupJoiner as Fs, PropertyFlags as q } from "@arcgis/lumina/config";
|
|
10
|
+
import { build as Ns } from "esbuild";
|
|
11
|
+
import { glob as js } from "glob";
|
|
12
|
+
import Ds from "mime-types";
|
|
13
13
|
import { writeFileSync as qi } from "node:fs";
|
|
14
|
-
import
|
|
15
|
-
function
|
|
14
|
+
import Rs from "chalk";
|
|
15
|
+
function Ms(e) {
|
|
16
16
|
const { externalize: t = [], bundleIn: i = [], ...n } = e.options?.build?.dependencies ?? {}, r = {
|
|
17
|
-
...
|
|
17
|
+
...hs({
|
|
18
18
|
...n,
|
|
19
19
|
/*
|
|
20
20
|
* This property name is a bit confusing. "include" means "externalize these"
|
|
@@ -26,9 +26,9 @@ function Js(e) {
|
|
|
26
26
|
// Externalize all @lit/ and @lit-labs/ packages
|
|
27
27
|
/^@lit[-/]/u,
|
|
28
28
|
/^lit$/u,
|
|
29
|
-
...Array.isArray(t) ? t.map(
|
|
29
|
+
...Array.isArray(t) ? t.map(Bt) : []
|
|
30
30
|
],
|
|
31
|
-
exclude: Array.isArray(i) ? i.map(
|
|
31
|
+
exclude: Array.isArray(i) ? i.map(Bt) : []
|
|
32
32
|
}),
|
|
33
33
|
configResolved() {
|
|
34
34
|
e.isInStorybook && (r.resolveId = void 0);
|
|
@@ -36,8 +36,8 @@ function Js(e) {
|
|
|
36
36
|
};
|
|
37
37
|
return r;
|
|
38
38
|
}
|
|
39
|
-
const Tt = "customElement.js", Ui = "customElement.d.ts",
|
|
40
|
-
function
|
|
39
|
+
const Tt = "customElement.js", Ui = "customElement.d.ts", Os = "playwright";
|
|
40
|
+
function Js(e, t, i) {
|
|
41
41
|
const s = i.split(u.sep).slice(2);
|
|
42
42
|
let r = t._componentPathMapping;
|
|
43
43
|
return s.forEach((a, c) => {
|
|
@@ -47,10 +47,10 @@ function Ws(e, t, i) {
|
|
|
47
47
|
function ve(e, t, i) {
|
|
48
48
|
if (!e.startsWith(t))
|
|
49
49
|
return e;
|
|
50
|
-
const n = e.slice(t.length), s =
|
|
50
|
+
const n = e.slice(t.length), s = Ks(n, i);
|
|
51
51
|
return `${t}${s}`;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Ks(e, t) {
|
|
54
54
|
const i = e.split(u.sep);
|
|
55
55
|
i.push(".");
|
|
56
56
|
let n = t._componentPathMapping, s = 0;
|
|
@@ -62,7 +62,7 @@ function Bs(e, t) {
|
|
|
62
62
|
n = n[r], s += 1;
|
|
63
63
|
return e;
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const Bs = ({ filePath: e, content: t }, i) => {
|
|
66
66
|
const n = e.startsWith(i.dir.distComponents) ? ve(
|
|
67
67
|
Gi(i.dir.distComponents, e),
|
|
68
68
|
i.dir.distComponents,
|
|
@@ -72,7 +72,7 @@ const _s = ({ filePath: e, content: t }, i) => {
|
|
|
72
72
|
i,
|
|
73
73
|
e === n ? s : u.dirname(n),
|
|
74
74
|
s
|
|
75
|
-
), c = r ?
|
|
75
|
+
), c = r ? zs(a) : a;
|
|
76
76
|
return {
|
|
77
77
|
filePath: n,
|
|
78
78
|
content: c
|
|
@@ -82,12 +82,12 @@ function Gi(e, t, i = ".d.ts") {
|
|
|
82
82
|
if (!t.startsWith(e))
|
|
83
83
|
return t;
|
|
84
84
|
const s = (i === "" ? t : t.slice(0, -i.length)).split(u.sep);
|
|
85
|
-
return s.at(
|
|
85
|
+
return s.at(Ws) !== s.at(_s) ? t : u.join(
|
|
86
86
|
s.slice(0, -1).join(u.sep),
|
|
87
87
|
i === "" ? Tt : Ui
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
|
-
const
|
|
90
|
+
const Ws = -1, _s = -2, Hs = /["']\.\.?\/[^'"]+/gu, Vi = (e, t, i, n) => e.replaceAll(Hs, (s) => {
|
|
91
91
|
const r = s.slice(1);
|
|
92
92
|
if (!r.startsWith("./") && !r.startsWith("../"))
|
|
93
93
|
return s;
|
|
@@ -100,11 +100,11 @@ const Hs = -1, zs = -2, qs = /["']\.\.?\/[^'"]+/gu, Vi = (e, t, i, n) => e.repla
|
|
|
100
100
|
const i = u.relative(e, t);
|
|
101
101
|
return i.startsWith(".") ? i : `.${u.sep}${i}`;
|
|
102
102
|
};
|
|
103
|
-
function
|
|
103
|
+
function zs(e) {
|
|
104
104
|
return `/// <reference types="../../index.d.ts" />
|
|
105
105
|
${e}`;
|
|
106
106
|
}
|
|
107
|
-
const zt = "customElement",
|
|
107
|
+
const zt = "customElement", qs = (e, t) => {
|
|
108
108
|
const { filePath: i, content: n } = e;
|
|
109
109
|
if (!i.startsWith(t.dir.distComponents))
|
|
110
110
|
return e;
|
|
@@ -118,7 +118,7 @@ const zt = "customElement", Gs = (e, t) => {
|
|
|
118
118
|
content: r
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
},
|
|
121
|
+
}, Us = (e, t) => {
|
|
122
122
|
const i = [];
|
|
123
123
|
if (t.apiModule?.declarations.forEach((r) => {
|
|
124
124
|
"customElement" in r && i.push(
|
|
@@ -160,39 +160,39 @@ function Qi(e) {
|
|
|
160
160
|
}`, t) + 2;
|
|
161
161
|
return e.slice(t, i);
|
|
162
162
|
}
|
|
163
|
-
const
|
|
163
|
+
const Gs = (e) => (t, i) => (
|
|
164
164
|
/*
|
|
165
165
|
* `declarationTextTransformers` arrays can be mutated between plugin
|
|
166
166
|
* initialization and beforeWriteFile() call, so do not read the value
|
|
167
167
|
* of declarationTextTransformers outside of beforeWriteFile
|
|
168
168
|
*/
|
|
169
169
|
[
|
|
170
|
+
Vs,
|
|
170
171
|
Qs,
|
|
172
|
+
Zs,
|
|
173
|
+
Xs,
|
|
174
|
+
Bs,
|
|
171
175
|
Ys,
|
|
172
176
|
er,
|
|
173
|
-
|
|
174
|
-
_s,
|
|
177
|
+
qs,
|
|
175
178
|
tr,
|
|
176
|
-
ir,
|
|
177
|
-
Gs,
|
|
178
|
-
nr,
|
|
179
179
|
...e.options.types?.declarationTextTransformers ?? [],
|
|
180
180
|
...e._declarationTextTransformers
|
|
181
181
|
].reduce(
|
|
182
182
|
(n, s) => n === !1 ? !1 : s(n, e),
|
|
183
183
|
{ filePath: t, content: i }
|
|
184
184
|
)
|
|
185
|
-
),
|
|
185
|
+
), Vs = (e, t) => t.isInStorybook ? !1 : e, Xs = (e, t) => (
|
|
186
186
|
// Short-circuit quickly if file doesn't look like the one we want to exclude
|
|
187
187
|
e.filePath.endsWith(qt) && e.filePath === u.join(t.dir.dist, qt) ? !1 : e
|
|
188
|
-
), qt = "lumina.d.ts",
|
|
188
|
+
), qt = "lumina.d.ts", Qs = (e, t) => {
|
|
189
189
|
const i = t.dir.dist, n = `${i}src/`;
|
|
190
190
|
return e.filePath.startsWith(n) ? { ...e, filePath: `${i}${e.filePath.slice(n.length)}` } : !1;
|
|
191
|
-
}, Et = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."),
|
|
191
|
+
}, Et = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), Zs = (e) => Et(e.filePath) || e.filePath.includes(".stories.") || e.filePath.includes(".story.") ? !1 : e, Ys = (e) => e.content.includes("__esri.") ? {
|
|
192
192
|
filePath: e.filePath,
|
|
193
193
|
content: `/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
194
194
|
${e.content}`
|
|
195
|
-
} : e,
|
|
195
|
+
} : e, er = (e, t) => {
|
|
196
196
|
t._htmlElementReferencesReplacer ??= {
|
|
197
197
|
regex: new RegExp(
|
|
198
198
|
`(${t.apiJsonComponents.map((n) => n.name).join("|")})\\[['"\`]el['"\`]\\]`,
|
|
@@ -207,8 +207,8 @@ ${e.content}`
|
|
|
207
207
|
filePath: e.filePath,
|
|
208
208
|
content: e.content.replace(i.regex, (n, s) => i.replacements[s])
|
|
209
209
|
};
|
|
210
|
-
},
|
|
211
|
-
const t = e.content.match(
|
|
210
|
+
}, tr = (e) => {
|
|
211
|
+
const t = e.content.match(ir)?.[1] ?? e.content.match(nr)?.[1];
|
|
212
212
|
if (t !== void 0)
|
|
213
213
|
throw Error(
|
|
214
214
|
b(
|
|
@@ -223,19 +223,19 @@ ${e.content}
|
|
|
223
223
|
)
|
|
224
224
|
);
|
|
225
225
|
return e;
|
|
226
|
-
},
|
|
227
|
-
function
|
|
226
|
+
}, ir = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, nr = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
|
|
227
|
+
function sr(e, t) {
|
|
228
228
|
const i = Z(t.name);
|
|
229
229
|
return e.members.find((n) => n.name === i);
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function rr(e, t, i) {
|
|
232
232
|
const n = u.relative(t, e);
|
|
233
233
|
return i.modules.find((s) => s.path === n);
|
|
234
234
|
}
|
|
235
235
|
function Zi(e, t, i, n) {
|
|
236
236
|
const s = {
|
|
237
237
|
compiler: e,
|
|
238
|
-
apiModule: e.isInPuppeteerTestBackEnd ? void 0 :
|
|
238
|
+
apiModule: e.isInPuppeteerTestBackEnd ? void 0 : rr(i.fileName, e.dir.root, e.privateApiJson),
|
|
239
239
|
transformation: t
|
|
240
240
|
}, r = i.statements;
|
|
241
241
|
let a = i.statements;
|
|
@@ -246,9 +246,9 @@ function Zi(e, t, i, n) {
|
|
|
246
246
|
a = c(i, s);
|
|
247
247
|
}), Object.defineProperty(i, "statements", {
|
|
248
248
|
value: r
|
|
249
|
-
}),
|
|
249
|
+
}), or(i, a);
|
|
250
250
|
}
|
|
251
|
-
const
|
|
251
|
+
const or = (e, t) => o.factory.updateSourceFile(
|
|
252
252
|
e,
|
|
253
253
|
t,
|
|
254
254
|
/*
|
|
@@ -262,11 +262,11 @@ const cr = (e, t) => o.factory.updateSourceFile(
|
|
|
262
262
|
e.typeReferenceDirectives,
|
|
263
263
|
e.hasNoDefaultLib,
|
|
264
264
|
e.libReferenceDirectives
|
|
265
|
-
),
|
|
266
|
-
function
|
|
267
|
-
if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text ===
|
|
265
|
+
), ar = (e) => `${Ut}${" ".repeat(e.length - Ut.length - Gt.length)}${Gt}`, Ut = "/*", Gt = "*/", cr = (e) => e.statements.map(ur), lr = "@arcgis/lumina", dr = "LitElement", pr = "PublicLitElement", Yi = "TargetedEvent";
|
|
266
|
+
function ur(e) {
|
|
267
|
+
if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === lr && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
|
|
268
268
|
const t = e.importClause.namedBindings.elements.findIndex(
|
|
269
|
-
(n) => (n.propertyName ?? n.name).text ===
|
|
269
|
+
(n) => (n.propertyName ?? n.name).text === dr
|
|
270
270
|
);
|
|
271
271
|
if (t === -1)
|
|
272
272
|
return e;
|
|
@@ -283,7 +283,7 @@ function fr(e) {
|
|
|
283
283
|
o.factory.updateImportSpecifier(
|
|
284
284
|
i,
|
|
285
285
|
i.isTypeOnly,
|
|
286
|
-
o.factory.createIdentifier(
|
|
286
|
+
o.factory.createIdentifier(pr),
|
|
287
287
|
i.name
|
|
288
288
|
),
|
|
289
289
|
...e.importClause.namedBindings.elements.slice(t + 1),
|
|
@@ -301,14 +301,14 @@ function fr(e) {
|
|
|
301
301
|
return e;
|
|
302
302
|
}
|
|
303
303
|
const en = "_setterTypes";
|
|
304
|
-
function
|
|
304
|
+
function mr(e, t, i) {
|
|
305
305
|
return o.factory.createPropertyDeclaration(
|
|
306
306
|
[o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword)],
|
|
307
307
|
o.factory.createIdentifier(en),
|
|
308
308
|
void 0,
|
|
309
309
|
o.factory.createTypeLiteralNode(
|
|
310
310
|
e.map((n) => {
|
|
311
|
-
const [s, r] =
|
|
311
|
+
const [s, r] = fr(n.name, n.type, i._typeScriptPrinter, t);
|
|
312
312
|
return o.factory.createPropertySignature(
|
|
313
313
|
void 0,
|
|
314
314
|
s,
|
|
@@ -320,7 +320,7 @@ function yr(e, t, i) {
|
|
|
320
320
|
void 0
|
|
321
321
|
);
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function fr(e, t, i, n) {
|
|
324
324
|
const s = i.printNode(o.EmitHint.Unspecified, e, n), r = i.printNode(o.EmitHint.Unspecified, t, n), a = `declare class A { ${s}: ${r} }`, d = o.createSourceFile(
|
|
325
325
|
"a.d.ts",
|
|
326
326
|
a,
|
|
@@ -330,8 +330,8 @@ function hr(e, t, i, n) {
|
|
|
330
330
|
).statements[0].members[0];
|
|
331
331
|
return [d.name, d.type];
|
|
332
332
|
}
|
|
333
|
-
const
|
|
334
|
-
function
|
|
333
|
+
const yr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => hr(i, e, t));
|
|
334
|
+
function hr(e, t, i) {
|
|
335
335
|
if (o.isClassDeclaration(e)) {
|
|
336
336
|
const n = e, s = n.name?.text, r = i.apiModule.declarations.find(
|
|
337
337
|
(y) => y.name === s && "customElement" in y
|
|
@@ -341,13 +341,13 @@ function vr(e, t, i) {
|
|
|
341
341
|
const a = [], c = /* @__PURE__ */ new Set(), l = [], d = [];
|
|
342
342
|
mt = void 0;
|
|
343
343
|
for (let y = 0; y < n.members.length; y++) {
|
|
344
|
-
const h = n.members[y], g =
|
|
344
|
+
const h = n.members[y], g = gr(h, r, l, c, t);
|
|
345
345
|
g === void 0 ? a.push(h) : Array.isArray(g) ? d.push(...g) : (o.setEmitFlags(g, o.EmitFlags.NoComments), d.push(g));
|
|
346
346
|
}
|
|
347
347
|
c.size > 0 && a.forEach((y) => {
|
|
348
348
|
const h = Z(y.name);
|
|
349
|
-
h !== void 0 && c.has(h) && d.push(
|
|
350
|
-
}), l.length > 0 && d.push(
|
|
349
|
+
h !== void 0 && c.has(h) && d.push(Sr(y));
|
|
350
|
+
}), l.length > 0 && d.push(mr(l, t, i.compiler));
|
|
351
351
|
const p = o.factory.updateClassDeclaration(
|
|
352
352
|
n,
|
|
353
353
|
n.modifiers,
|
|
@@ -378,7 +378,7 @@ function vr(e, t, i) {
|
|
|
378
378
|
return e;
|
|
379
379
|
}
|
|
380
380
|
let mt;
|
|
381
|
-
function
|
|
381
|
+
function gr(e, t, i, n, s) {
|
|
382
382
|
const r = Z(e.name);
|
|
383
383
|
if (r === void 0)
|
|
384
384
|
return;
|
|
@@ -396,7 +396,7 @@ function Sr(e, t, i, n, s) {
|
|
|
396
396
|
Qt(e.modifiers),
|
|
397
397
|
e.name,
|
|
398
398
|
void 0,
|
|
399
|
-
|
|
399
|
+
wr(e.type, s),
|
|
400
400
|
e.initializer
|
|
401
401
|
);
|
|
402
402
|
return o.setSyntheticLeadingComments(d, Q(l)), d;
|
|
@@ -475,15 +475,15 @@ function Sr(e, t, i, n, s) {
|
|
|
475
475
|
}
|
|
476
476
|
const Vt = /^typeof this\.(?<accessor>[^.]+)\.(?<boundProperty>[^.]+)$/u;
|
|
477
477
|
function Xt(e, t, i) {
|
|
478
|
-
const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(
|
|
478
|
+
const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(vr) ?? [];
|
|
479
479
|
for (const r of s)
|
|
480
480
|
e.add(r);
|
|
481
481
|
return t;
|
|
482
482
|
}
|
|
483
|
-
const
|
|
484
|
-
function
|
|
483
|
+
const vr = /(?<=this.)[\w$]+/gu;
|
|
484
|
+
function Sr(e) {
|
|
485
485
|
if (o.setEmitFlags(e, o.EmitFlags.NoComments), o.isPropertyDeclaration(e)) {
|
|
486
|
-
const t =
|
|
486
|
+
const t = ke(e.modifiers);
|
|
487
487
|
if (t !== e.modifiers)
|
|
488
488
|
return o.factory.updatePropertyDeclaration(
|
|
489
489
|
e,
|
|
@@ -494,7 +494,7 @@ function br(e) {
|
|
|
494
494
|
e.initializer
|
|
495
495
|
);
|
|
496
496
|
} else if (o.isGetAccessor(e)) {
|
|
497
|
-
const t =
|
|
497
|
+
const t = ke(e.modifiers);
|
|
498
498
|
if (t !== e.modifiers)
|
|
499
499
|
return o.factory.updateGetAccessorDeclaration(
|
|
500
500
|
e,
|
|
@@ -505,11 +505,11 @@ function br(e) {
|
|
|
505
505
|
e.body
|
|
506
506
|
);
|
|
507
507
|
} else if (o.isSetAccessor(e)) {
|
|
508
|
-
const t =
|
|
508
|
+
const t = ke(e.modifiers);
|
|
509
509
|
if (t !== e.modifiers)
|
|
510
510
|
return o.factory.updateSetAccessorDeclaration(e, t, e.name, e.parameters, e.body);
|
|
511
511
|
} else if (o.isMethodDeclaration(e)) {
|
|
512
|
-
const t =
|
|
512
|
+
const t = ke(e.modifiers);
|
|
513
513
|
if (t !== e.modifiers)
|
|
514
514
|
return o.factory.updateMethodDeclaration(
|
|
515
515
|
e,
|
|
@@ -528,7 +528,7 @@ function br(e) {
|
|
|
528
528
|
function Qt(e) {
|
|
529
529
|
return e?.some((i) => i.kind === o.SyntaxKind.ReadonlyKeyword) ? e : [o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword), ...e ?? []];
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function ke(e) {
|
|
532
532
|
return e?.some((i) => i.kind === o.SyntaxKind.PrivateKeyword) ? e : [
|
|
533
533
|
o.factory.createModifier(o.SyntaxKind.PrivateKeyword),
|
|
534
534
|
...(e ?? []).filter(
|
|
@@ -536,7 +536,7 @@ function Ie(e) {
|
|
|
536
536
|
)
|
|
537
537
|
];
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function wr(e, t) {
|
|
540
540
|
if (e === void 0)
|
|
541
541
|
return;
|
|
542
542
|
const i = o.isImportTypeNode(e) && e.qualifier && o.isIdentifier(e.qualifier) && e.qualifier.escapedText === "EventEmitter" ? e.typeArguments ?? [] : o.isTypeReferenceNode(e) && o.isIdentifier(e.typeName) && e.typeName.escapedText === "EventEmitter" ? e.typeArguments ?? [] : void 0;
|
|
@@ -549,10 +549,10 @@ function Tr(e, t) {
|
|
|
549
549
|
t.fileName
|
|
550
550
|
), e);
|
|
551
551
|
}
|
|
552
|
-
const
|
|
553
|
-
function
|
|
552
|
+
const br = [cr, yr], Zt = "@arcgis/lumina:componentDtsTransformer";
|
|
553
|
+
function Tr(e) {
|
|
554
554
|
let t;
|
|
555
|
-
const i =
|
|
555
|
+
const i = Er(e);
|
|
556
556
|
return {
|
|
557
557
|
name: Zt,
|
|
558
558
|
supports(n) {
|
|
@@ -580,29 +580,29 @@ function Cr(e) {
|
|
|
580
580
|
}
|
|
581
581
|
};
|
|
582
582
|
}
|
|
583
|
-
const
|
|
584
|
-
...
|
|
583
|
+
const Er = (e) => (t) => (i) => Zi(e, t, i, [
|
|
584
|
+
...br,
|
|
585
585
|
...e.options.types?.declarationAstTransformers ?? []
|
|
586
|
-
]),
|
|
587
|
-
get:
|
|
588
|
-
set:
|
|
586
|
+
]), Cr = (e) => new Proxy(e, {
|
|
587
|
+
get: $r,
|
|
588
|
+
set: xr
|
|
589
589
|
});
|
|
590
|
-
function
|
|
590
|
+
function $r(e, t, i) {
|
|
591
591
|
if (t in e)
|
|
592
592
|
return Reflect.get(e, t, i);
|
|
593
593
|
throw new Error(`Requested unexpected property ${String(t)}`);
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function xr(e, t) {
|
|
596
596
|
throw new Error(`Unexpectedly tried to set the ${String(t)} property.`);
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function Pr(e) {
|
|
599
599
|
const t = e.options.types ?? {};
|
|
600
600
|
let i = !1;
|
|
601
601
|
const n = {
|
|
602
602
|
...t?.compilerOptions,
|
|
603
603
|
// See comment above excludeOutsideFiles in ./textTransformers.ts for details
|
|
604
604
|
rootDir: "."
|
|
605
|
-
}, s =
|
|
605
|
+
}, s = vs({
|
|
606
606
|
...t,
|
|
607
607
|
compilerOptions: n,
|
|
608
608
|
tsconfigPath: e.options.types?.tsconfigPath,
|
|
@@ -615,7 +615,7 @@ function Ir(e) {
|
|
|
615
615
|
}
|
|
616
616
|
return t?.afterDiagnostic?.(r);
|
|
617
617
|
},
|
|
618
|
-
beforeWriteFile:
|
|
618
|
+
beforeWriteFile: Gs(e),
|
|
619
619
|
resolvers: [
|
|
620
620
|
/**
|
|
621
621
|
* The vite-plugin-dts does not provide a way to get a reference to the
|
|
@@ -639,7 +639,7 @@ function Ir(e) {
|
|
|
639
639
|
}
|
|
640
640
|
},
|
|
641
641
|
...t?.resolvers ?? [],
|
|
642
|
-
|
|
642
|
+
Tr(e)
|
|
643
643
|
]
|
|
644
644
|
});
|
|
645
645
|
return {
|
|
@@ -660,7 +660,7 @@ function Ir(e) {
|
|
|
660
660
|
if (typeof c != "function")
|
|
661
661
|
throw new Error("Expected transform to be a function");
|
|
662
662
|
if (await a.call(this, r), await c.call(
|
|
663
|
-
|
|
663
|
+
Cr({}),
|
|
664
664
|
"",
|
|
665
665
|
/*
|
|
666
666
|
* Have to give it a file that will be matched by the tsconfig's
|
|
@@ -672,7 +672,7 @@ function Ir(e) {
|
|
|
672
672
|
}
|
|
673
673
|
};
|
|
674
674
|
}
|
|
675
|
-
const
|
|
675
|
+
const Ar = "Fragment", it = "DynamicHtmlTag", nt = "DynamicSvgTag", Me = Symbol("dynamic html tag name"), ft = Symbol("dynamic svg tag name"), tn = /* @__PURE__ */ new Set([
|
|
676
676
|
/**
|
|
677
677
|
* There is a "className" property. However, in JSX typings we use "class"
|
|
678
678
|
* instead to keep name shorter and to match Stencil's name. Thus, it should
|
|
@@ -720,7 +720,7 @@ const kr = "Fragment", it = "DynamicHtmlTag", nt = "DynamicSvgTag", Me = Symbol(
|
|
|
720
720
|
meta: /* @__PURE__ */ new Set(["charset"]),
|
|
721
721
|
math: /* @__PURE__ */ new Set(["dir", "displaystyle", "scriptlevel"]),
|
|
722
722
|
menu: /* @__PURE__ */ new Set(["label", "type"])
|
|
723
|
-
},
|
|
723
|
+
}, W = {
|
|
724
724
|
common: {
|
|
725
725
|
reflected: {
|
|
726
726
|
hidden: "hidden",
|
|
@@ -1533,8 +1533,8 @@ const kr = "Fragment", it = "DynamicHtmlTag", nt = "DynamicSvgTag", Me = Symbol(
|
|
|
1533
1533
|
}
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
1536
|
-
sn(
|
|
1537
|
-
Object.values(
|
|
1536
|
+
sn(W.common);
|
|
1537
|
+
Object.values(W.perElement).forEach(sn);
|
|
1538
1538
|
function sn(e) {
|
|
1539
1539
|
e?.reflected !== void 0 && (e.reflected = Object.assign(/* @__PURE__ */ Object.create(null), e.reflected)), e?.stringifiedReflected !== void 0 && (e.stringifiedReflected = Object.assign(
|
|
1540
1540
|
/* @__PURE__ */ Object.create(null),
|
|
@@ -1643,7 +1643,7 @@ const Yt = /* @__PURE__ */ new Set(["itemScope"]), rn = /* @__PURE__ */ new Set(
|
|
|
1643
1643
|
"volumeChange",
|
|
1644
1644
|
"waiting",
|
|
1645
1645
|
"wheel"
|
|
1646
|
-
]),
|
|
1646
|
+
]), kr = /* @__PURE__ */ new Set([
|
|
1647
1647
|
"area",
|
|
1648
1648
|
"base",
|
|
1649
1649
|
"br",
|
|
@@ -1719,7 +1719,7 @@ const Yt = /* @__PURE__ */ new Set(["itemScope"]), rn = /* @__PURE__ */ new Set(
|
|
|
1719
1719
|
"tspan",
|
|
1720
1720
|
"use",
|
|
1721
1721
|
"view"
|
|
1722
|
-
]),
|
|
1722
|
+
]), Ir = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), $t = /* @__PURE__ */ new Set([
|
|
1723
1723
|
"annotation-xml",
|
|
1724
1724
|
"annotation",
|
|
1725
1725
|
"maction",
|
|
@@ -1751,7 +1751,7 @@ const Yt = /* @__PURE__ */ new Set(["itemScope"]), rn = /* @__PURE__ */ new Set(
|
|
|
1751
1751
|
"munder",
|
|
1752
1752
|
"munderover",
|
|
1753
1753
|
"semantics"
|
|
1754
|
-
]),
|
|
1754
|
+
]), Lr = /* @__PURE__ */ new Set([
|
|
1755
1755
|
"annotation-xml",
|
|
1756
1756
|
"color-profile",
|
|
1757
1757
|
"font-face",
|
|
@@ -1760,7 +1760,7 @@ const Yt = /* @__PURE__ */ new Set(["itemScope"]), rn = /* @__PURE__ */ new Set(
|
|
|
1760
1760
|
"font-face-format",
|
|
1761
1761
|
"font-face-name",
|
|
1762
1762
|
"missing-glyph"
|
|
1763
|
-
]),
|
|
1763
|
+
]), Fr = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/gu, Nr = new Map(
|
|
1764
1764
|
Object.entries({
|
|
1765
1765
|
" ": "\\t",
|
|
1766
1766
|
"\v": "\\v",
|
|
@@ -1785,22 +1785,22 @@ const Yt = /* @__PURE__ */ new Set(["itemScope"]), rn = /* @__PURE__ */ new Set(
|
|
|
1785
1785
|
})
|
|
1786
1786
|
);
|
|
1787
1787
|
function on(e) {
|
|
1788
|
-
return `\\u${`0000${e.toString(
|
|
1788
|
+
return `\\u${`0000${e.toString(jr).toUpperCase()}`.slice(-4)}`;
|
|
1789
1789
|
}
|
|
1790
|
-
const
|
|
1791
|
-
function
|
|
1792
|
-
if (e.charCodeAt(0) ===
|
|
1790
|
+
const jr = 16;
|
|
1791
|
+
function Dr(e, t, i) {
|
|
1792
|
+
if (e.charCodeAt(0) === Jr) {
|
|
1793
1793
|
const n = i.charCodeAt(t + e.length);
|
|
1794
|
-
return n >=
|
|
1794
|
+
return n >= Kr && n <= Br ? "\\x00" : "\\0";
|
|
1795
1795
|
}
|
|
1796
|
-
return
|
|
1796
|
+
return Nr.get(e) || on(e.charCodeAt(0));
|
|
1797
1797
|
}
|
|
1798
|
-
const
|
|
1799
|
-
function
|
|
1800
|
-
return e =
|
|
1798
|
+
const Rr = (e) => e.replace(Fr, Dr), ei = /[^\u0000-\u007F]/g;
|
|
1799
|
+
function Mr(e) {
|
|
1800
|
+
return e = Rr(e), ei.test(e) ? e.replace(ei, (t) => on(t.charCodeAt(0))) : e;
|
|
1801
1801
|
}
|
|
1802
|
-
const
|
|
1803
|
-
function
|
|
1802
|
+
const Or = Mr, Jr = 0, Kr = 48, Br = 57, Wr = /\$\{/gu, _r = (e) => e.replace(Wr, "\\${");
|
|
1803
|
+
function Hr(e) {
|
|
1804
1804
|
if (e.length === 0)
|
|
1805
1805
|
return "";
|
|
1806
1806
|
const t = e[0];
|
|
@@ -1813,11 +1813,11 @@ function qr(e) {
|
|
|
1813
1813
|
}
|
|
1814
1814
|
return e.trim().length === 0 ? t : e;
|
|
1815
1815
|
}
|
|
1816
|
-
const Ue = (e) =>
|
|
1816
|
+
const Ue = (e) => _r(Or(e)), zr = (e) => !qr.test(e), qr = /^[^\s"'=<>`]+$/u, Ur = /[&<>]/gu, Gr = {
|
|
1817
1817
|
"&": "&",
|
|
1818
1818
|
"<": "<",
|
|
1819
1819
|
">": ">"
|
|
1820
|
-
}, an = (e) => e.replace(
|
|
1820
|
+
}, an = (e) => e.replace(Ur, (t) => Gr[t]), xt = (e) => typeof e == "string" && e.includes("-") && !Lr.has(e), Vr = async (e) => Object.fromEntries(
|
|
1821
1821
|
(await e.componentFilesPromise).map((t) => [cn(t), t])
|
|
1822
1822
|
), cn = (e, t = u.resolve("src")) => u.relative(t, u.join(e, "..", Tt.slice(0, -3))), Pt = async (e, t, i = t) => await qe(i, { recursive: !0 }).catch((n) => {
|
|
1823
1823
|
if (String(n).includes("ENOENT"))
|
|
@@ -1837,15 +1837,15 @@ const Ue = (e) => zr(Kr(e)), Ur = (e) => !Gr.test(e), Gr = /^[^\s"'=<>`]+$/u, Vr
|
|
|
1837
1837
|
function Se(e, t) {
|
|
1838
1838
|
if (!e.startsWith(t) || !e.endsWith(".tsx"))
|
|
1839
1839
|
return !1;
|
|
1840
|
-
const [i, n] = e.slice(0, -4).split(u.sep).slice(
|
|
1840
|
+
const [i, n] = e.slice(0, -4).split(u.sep).slice(Xr);
|
|
1841
1841
|
return i === n;
|
|
1842
1842
|
}
|
|
1843
|
-
const
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1843
|
+
const Xr = -2, ti = 5, ii = 1, ni = 1, si = 3, ri = 4, Ge = o;
|
|
1844
|
+
Qr(Ge.createSourceMapGenerator);
|
|
1845
|
+
Zr(Ge.createTextWriter);
|
|
1846
|
+
Yr(Ge.getNewLineCharacter);
|
|
1847
1847
|
const ye = Ge;
|
|
1848
|
-
function
|
|
1848
|
+
function Qr(e) {
|
|
1849
1849
|
if (typeof e != "function")
|
|
1850
1850
|
throw new Error(
|
|
1851
1851
|
"Failed to find ts.createSourceMapGenerator() function. Lumina needs to be updated to support the new TypeScript version"
|
|
@@ -1855,7 +1855,7 @@ function Yr(e) {
|
|
|
1855
1855
|
`ts.createSourceMapGenerator() signature changed. Expected ${ti} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1856
1856
|
);
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1858
|
+
function Zr(e) {
|
|
1859
1859
|
if (typeof e != "function")
|
|
1860
1860
|
throw new Error(
|
|
1861
1861
|
"Failed to find ts.createTextWriter() function. Lumina needs to be updated to support the new TypeScript version"
|
|
@@ -1865,7 +1865,7 @@ function eo(e) {
|
|
|
1865
1865
|
`ts.createTextWriter() signature changed. Expected ${ii} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1866
1866
|
);
|
|
1867
1867
|
}
|
|
1868
|
-
function
|
|
1868
|
+
function Yr(e) {
|
|
1869
1869
|
if (typeof e != "function")
|
|
1870
1870
|
throw new Error(
|
|
1871
1871
|
"Failed to find ts.getNewLineCharacter() function. Lumina needs to be updated to support the new TypeScript version"
|
|
@@ -1875,7 +1875,7 @@ function to(e) {
|
|
|
1875
1875
|
`ts.getNewLineCharacter() signature changed. Expected ${ni} argument. Lumina needs to be updated to support the new TypeScript version`
|
|
1876
1876
|
);
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1878
|
+
function eo(e) {
|
|
1879
1879
|
if (typeof e != "function")
|
|
1880
1880
|
throw new Error(
|
|
1881
1881
|
"Failed to find ts.Printer.writeFile() function. Lumina needs to be updated to support the new TypeScript version"
|
|
@@ -1885,7 +1885,7 @@ function io(e) {
|
|
|
1885
1885
|
`ts.Printer.writeFile() signature changed. Expected ${si} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
1886
1886
|
);
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function to(e) {
|
|
1889
1889
|
if (typeof e != "function")
|
|
1890
1890
|
throw new Error(
|
|
1891
1891
|
"Failed to find ts.Printer.writeNode() function. Lumina needs to be updated to support the new TypeScript version"
|
|
@@ -1897,23 +1897,23 @@ function no(e) {
|
|
|
1897
1897
|
}
|
|
1898
1898
|
function ln(e) {
|
|
1899
1899
|
const t = ye.createPrinter(e);
|
|
1900
|
-
return
|
|
1900
|
+
return eo(t.writeFile), to(t.writeNode), t;
|
|
1901
1901
|
}
|
|
1902
1902
|
function oi(e) {
|
|
1903
1903
|
const t = o.isUnionTypeNode(e) ? e.types.map(ai) : [ai(e)], i = new Set(t), n = i.delete("true"), s = i.delete("false");
|
|
1904
1904
|
(n || s) && i.add("boolean");
|
|
1905
1905
|
let r = Array.from(i).sort();
|
|
1906
|
-
if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length >
|
|
1907
|
-
return r.map(
|
|
1906
|
+
if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > io))
|
|
1907
|
+
return r.map(ro);
|
|
1908
1908
|
}
|
|
1909
|
-
const
|
|
1909
|
+
const io = 40, no = (e) => e?.some(
|
|
1910
1910
|
(t) => t.type === "number" || t.type === "boolean" || t.type === "string" || /**
|
|
1911
1911
|
* Treat "any" as possibly literal, but not "unknown". Matches Stencil
|
|
1912
1912
|
* behavior.
|
|
1913
1913
|
*/
|
|
1914
1914
|
t.type === "any"
|
|
1915
|
-
) ?? !1,
|
|
1916
|
-
function
|
|
1915
|
+
) ?? !1, so = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, dn = (e) => e.map(pn).join(" | "), pn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
|
|
1916
|
+
function ro(e) {
|
|
1917
1917
|
return e === "boolean" ? { type: "boolean" } : Number.isNaN(Number.parseFloat(e)) ? e.startsWith('"') || e.startsWith("'") ? {
|
|
1918
1918
|
value: e.slice(1, -1),
|
|
1919
1919
|
type: "string"
|
|
@@ -1924,25 +1924,25 @@ function ao(e) {
|
|
|
1924
1924
|
type: "number"
|
|
1925
1925
|
};
|
|
1926
1926
|
}
|
|
1927
|
-
const
|
|
1927
|
+
const oo = (e, t, i, n) => {
|
|
1928
1928
|
const s = e.typeScriptTypeChecker, r = o.isSetAccessor(t) ? t.parameters[0] : t, a = s.getTypeAtLocation(r), c = !i;
|
|
1929
1929
|
return Oe(s, a, n, e.dir, c);
|
|
1930
1930
|
};
|
|
1931
|
-
function
|
|
1931
|
+
function ao(e, t) {
|
|
1932
1932
|
if (e.length === 0)
|
|
1933
1933
|
return;
|
|
1934
|
-
const i = t.matchAll(
|
|
1934
|
+
const i = t.matchAll(co), n = [];
|
|
1935
1935
|
for (const s of i) {
|
|
1936
1936
|
const r = e.find((a) => a.name === s[0]);
|
|
1937
1937
|
r !== void 0 && n.push({ ...r, start: s.index, end: s.index + r.name.length });
|
|
1938
1938
|
}
|
|
1939
1939
|
return n.length === 0 ? void 0 : n;
|
|
1940
1940
|
}
|
|
1941
|
-
const
|
|
1941
|
+
const co = /"[^"]+"|'[^"]+'|\w+/gu;
|
|
1942
1942
|
function Oe(e, t, i, n, s = !1) {
|
|
1943
1943
|
let { typeNode: r, references: a } = li(e, t, i, n), c = oi(r);
|
|
1944
1944
|
c === void 0 && ({ typeNode: r, references: a } = li(e, t, i, n, !1), c = oi(r) ?? []);
|
|
1945
|
-
const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = dn(l), p =
|
|
1945
|
+
const l = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, d = dn(l), p = so(l), m = ao(a, d);
|
|
1946
1946
|
return {
|
|
1947
1947
|
text: d,
|
|
1948
1948
|
references: m,
|
|
@@ -1950,21 +1950,21 @@ function Oe(e, t, i, n, s = !1) {
|
|
|
1950
1950
|
};
|
|
1951
1951
|
}
|
|
1952
1952
|
function ai(e) {
|
|
1953
|
-
|
|
1953
|
+
lo.writeNode(o.EmitHint.Unspecified, e, void 0, st);
|
|
1954
1954
|
const t = st.getText();
|
|
1955
1955
|
return st.clear(), t;
|
|
1956
1956
|
}
|
|
1957
|
-
const
|
|
1958
|
-
`), un = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals,
|
|
1959
|
-
function
|
|
1957
|
+
const lo = ln({ removeComments: !0 }), st = ye.createTextWriter(`
|
|
1958
|
+
`), un = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, po = un & o.TypeFormatFlags.NodeBuilderFlagsMask, uo = po | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
|
|
1959
|
+
function mo(e, t, i, n = !0) {
|
|
1960
1960
|
const s = /* @__PURE__ */ new Map();
|
|
1961
1961
|
oe(t, s, i, n);
|
|
1962
1962
|
const r = t.flags & o.TypeFlags.Union ? t.types.every(ci) : ci(t), a = e.typeToTypeNode(
|
|
1963
1963
|
t,
|
|
1964
1964
|
void 0,
|
|
1965
|
-
|
|
1965
|
+
uo & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
|
|
1966
1966
|
);
|
|
1967
|
-
return s.forEach(
|
|
1967
|
+
return s.forEach(fo), a === void 0 ? (C.warn("@arcgis/lumina", "Unexpected case: Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
|
|
1968
1968
|
}
|
|
1969
1969
|
const ci = (e) => e.flags & o.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & o.TypeFlags.PossiblyFalsy);
|
|
1970
1970
|
function li(e, t, i, n, s = !0) {
|
|
@@ -1996,10 +1996,10 @@ function li(e, t, i, n, s = !0) {
|
|
|
1996
1996
|
name: f,
|
|
1997
1997
|
package: void 0,
|
|
1998
1998
|
module: "index.js"
|
|
1999
|
-
} :
|
|
1999
|
+
} : yo(m, f, i, n);
|
|
2000
2000
|
r.push(y), a.add(f);
|
|
2001
2001
|
}
|
|
2002
|
-
return { typeNode:
|
|
2002
|
+
return { typeNode: mo(e, t, c, s), references: r };
|
|
2003
2003
|
}
|
|
2004
2004
|
function oe(e, t, i, n = !0) {
|
|
2005
2005
|
if (typeof e != "object" || e === null || !("checker" in e))
|
|
@@ -2029,10 +2029,10 @@ function oe(e, t, i, n = !0) {
|
|
|
2029
2029
|
c !== "resolvedBaseConstructorType" && c !== "resolvedBaseTypes" && c !== "typeParameters" && c !== "typeParameter" && (Array.isArray(l) ? l.forEach((d) => oe(d, t, i, n)) : oe(l, t, i, n));
|
|
2030
2030
|
});
|
|
2031
2031
|
}
|
|
2032
|
-
function
|
|
2032
|
+
function fo(e, t) {
|
|
2033
2033
|
e.origin !== void 0 && (t.origin = e.origin), e.aliasSymbol !== void 0 && (t.aliasSymbol = e.aliasSymbol), e.aliasTypeArguments !== void 0 && (t.aliasTypeArguments = e.aliasTypeArguments);
|
|
2034
2034
|
}
|
|
2035
|
-
function
|
|
2035
|
+
function yo(e, t, i, n) {
|
|
2036
2036
|
const s = e?.declarations?.map((c) => c.getSourceFile()) ?? [];
|
|
2037
2037
|
if (s.length === 0) {
|
|
2038
2038
|
if (t === "Array")
|
|
@@ -2053,7 +2053,7 @@ function go(e, t, i, n) {
|
|
|
2053
2053
|
package: Hi,
|
|
2054
2054
|
module: void 0
|
|
2055
2055
|
};
|
|
2056
|
-
const { packageName: r, moduleName: a } =
|
|
2056
|
+
const { packageName: r, moduleName: a } = ho(s[0].fileName, n);
|
|
2057
2057
|
return r ? {
|
|
2058
2058
|
name: t,
|
|
2059
2059
|
package: r,
|
|
@@ -2065,7 +2065,7 @@ function go(e, t, i, n) {
|
|
|
2065
2065
|
module: a
|
|
2066
2066
|
};
|
|
2067
2067
|
}
|
|
2068
|
-
function
|
|
2068
|
+
function ho(e, t) {
|
|
2069
2069
|
const i = e.split("/node_modules/");
|
|
2070
2070
|
if (i.length > 1) {
|
|
2071
2071
|
const a = i.at(-1);
|
|
@@ -2078,18 +2078,18 @@ function vo(e, t) {
|
|
|
2078
2078
|
}
|
|
2079
2079
|
return {
|
|
2080
2080
|
packageName: void 0,
|
|
2081
|
-
moduleName: u.relative(t.root,
|
|
2081
|
+
moduleName: u.relative(t.root, vo(go(e, t)))
|
|
2082
2082
|
};
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function go(e, t) {
|
|
2085
2085
|
return Se(e, t.srcComponents) ? u.join(t.dist, cn(e, t.src)) : e.startsWith(t.src) ? u.join(t.dist, e.slice(t.src.length)) : e;
|
|
2086
2086
|
}
|
|
2087
|
-
const
|
|
2087
|
+
const vo = (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`;
|
|
2088
2088
|
function mn(e) {
|
|
2089
2089
|
const t = e.split("/"), n = e[0].startsWith("@") ? 2 : 1, s = t.slice(0, n).join("/"), r = t.slice(n).join("/");
|
|
2090
2090
|
return { packageName: s, moduleName: r };
|
|
2091
2091
|
}
|
|
2092
|
-
const
|
|
2092
|
+
const So = (e) => e.includes("/node_modules/") || e.includes("/dist/");
|
|
2093
2093
|
function di(e, t, i) {
|
|
2094
2094
|
const n = e.declarations;
|
|
2095
2095
|
if (n !== void 0)
|
|
@@ -2103,7 +2103,7 @@ function di(e, t, i) {
|
|
|
2103
2103
|
for (const c of a) {
|
|
2104
2104
|
const l = pi(c, t, i);
|
|
2105
2105
|
if (l !== void 0)
|
|
2106
|
-
return
|
|
2106
|
+
return wo(l);
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
@@ -2127,16 +2127,16 @@ function pi(e, t, i) {
|
|
|
2127
2127
|
});
|
|
2128
2128
|
});
|
|
2129
2129
|
}
|
|
2130
|
-
const
|
|
2131
|
-
function
|
|
2130
|
+
const wo = (e) => e.split("#")[0];
|
|
2131
|
+
function bo(e) {
|
|
2132
2132
|
const t = [];
|
|
2133
|
-
for (const i of e.matchAll(
|
|
2134
|
-
const n = i.groups.name, s = i.groups.description.replaceAll(
|
|
2133
|
+
for (const i of e.matchAll(To)) {
|
|
2134
|
+
const n = i.groups.name, s = i.groups.description.replaceAll(Eo, " ").trim();
|
|
2135
2135
|
t.push({ name: n, description: s.endsWith("*") ? s.slice(0, -1).trim() : s });
|
|
2136
2136
|
}
|
|
2137
2137
|
return t.length === 0 ? void 0 : t;
|
|
2138
2138
|
}
|
|
2139
|
-
const
|
|
2139
|
+
const To = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Eo = /\n\s+\*? ?/gu, Co = ["css", "less", "sass", "scss", "styl", "stylus", "pcss", "postcss", "sss"], Je = new RegExp(`\\.(${Co.join("|")})(\\?|$)`, "u"), $o = /^import ["'](?<specifier>[^"']+)["'];$/gmu, xo = () => "throwError", ne = "@arcgis/lumina:loadLitCss", Y = "?layered", Ne = "?global", Po = (e) => ({
|
|
2140
2140
|
name: ne,
|
|
2141
2141
|
enforce: "pre",
|
|
2142
2142
|
configResolved(t) {
|
|
@@ -2163,7 +2163,7 @@ const Co = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, $o = /\n\s+\
|
|
|
2163
2163
|
if (l)
|
|
2164
2164
|
return e._globalCssString = hn(m), { code: "", map: { mappings: "" } };
|
|
2165
2165
|
{
|
|
2166
|
-
const y = e.isFullApiExtraction ?
|
|
2166
|
+
const y = e.isFullApiExtraction ? bo(r) : void 0;
|
|
2167
2167
|
if (y !== void 0) {
|
|
2168
2168
|
e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, y);
|
|
2169
2169
|
const h = e._cssImports.get(a);
|
|
@@ -2183,7 +2183,7 @@ const Co = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, $o = /\n\s+\
|
|
|
2183
2183
|
}
|
|
2184
2184
|
return {
|
|
2185
2185
|
...f,
|
|
2186
|
-
code:
|
|
2186
|
+
code: Lo(m, e.hmrEnabled, e.shouldMinify, c),
|
|
2187
2187
|
/**
|
|
2188
2188
|
* Vite's original transform does not generate source maps for inlined
|
|
2189
2189
|
* css, thus we can't either
|
|
@@ -2197,14 +2197,14 @@ const Co = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, $o = /\n\s+\
|
|
|
2197
2197
|
if (!(i.endsWith(".js") || i.endsWith(".ts") || i.endsWith(".tsx") || e.isInStorybook && i.endsWith(".mdx")))
|
|
2198
2198
|
return;
|
|
2199
2199
|
let s = 0;
|
|
2200
|
-
const r =
|
|
2200
|
+
const r = So(i);
|
|
2201
2201
|
let a = !1;
|
|
2202
|
-
const c = t.replaceAll(
|
|
2202
|
+
const c = t.replaceAll($o, (l, d) => {
|
|
2203
2203
|
if (!Je.test(d) || d.includes("?"))
|
|
2204
2204
|
return l;
|
|
2205
2205
|
if (r) {
|
|
2206
|
-
if ((e.options.css?.sideEffectImportHandling ??
|
|
2207
|
-
return a = !0,
|
|
2206
|
+
if ((e.options.css?.sideEffectImportHandling ?? xo)(d, i) === "drop")
|
|
2207
|
+
return a = !0, ar(l);
|
|
2208
2208
|
throw Error(
|
|
2209
2209
|
b(
|
|
2210
2210
|
ne,
|
|
@@ -2212,7 +2212,7 @@ const Co = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, $o = /\n\s+\
|
|
|
2212
2212
|
i
|
|
2213
2213
|
)
|
|
2214
2214
|
);
|
|
2215
|
-
} else if (e.isInStorybook &&
|
|
2215
|
+
} else if (e.isInStorybook && No(i, e)) {
|
|
2216
2216
|
a = !0;
|
|
2217
2217
|
const p = `storybookCss$${s}`;
|
|
2218
2218
|
return s += 1, [
|
|
@@ -2243,7 +2243,7 @@ const Co = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, $o = /\n\s+\
|
|
|
2243
2243
|
map: null
|
|
2244
2244
|
} : void 0;
|
|
2245
2245
|
}
|
|
2246
|
-
}), fn = 'export default "', yn = '"',
|
|
2246
|
+
}), fn = 'export default "', yn = '"', Ao = "import { css } from '@lit/reactive-element/css-tag.js';\nexport const styles = css`", ko = "`;\nexport default styles;", Io = `
|
|
2247
2247
|
|
|
2248
2248
|
if(import.meta.hot) {
|
|
2249
2249
|
import.meta.hot.data.styles ??= styles;
|
|
@@ -2255,25 +2255,25 @@ if(import.meta.hot) {
|
|
|
2255
2255
|
import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
|
|
2256
2256
|
});
|
|
2257
2257
|
}`, hn = (e) => e.slice(fn.length, -yn.length);
|
|
2258
|
-
function
|
|
2259
|
-
const r = hn(e).replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("\\r", ""), a = Ue(
|
|
2258
|
+
function Lo(e, t, i, n) {
|
|
2259
|
+
const r = hn(e).replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("\\r", ""), a = Ue(Fo(r)), c = n ? `@layer{${i ? "" : `
|
|
2260
2260
|
`}${a}${i ? "" : `
|
|
2261
2261
|
`}}` : a;
|
|
2262
|
-
return `${
|
|
2262
|
+
return `${Ao}${c}${ko}${t ? Io : ""}`;
|
|
2263
2263
|
}
|
|
2264
|
-
const
|
|
2265
|
-
`),
|
|
2266
|
-
function
|
|
2267
|
-
return `import("${
|
|
2268
|
-
setCustomElementsManifest(${
|
|
2264
|
+
const Fo = (e) => e.replaceAll("\\n", `
|
|
2265
|
+
`), No = (e, t) => e.endsWith(".mdx") || e.includes(".stories.") || e.includes(".story.") || e.startsWith(`${t.dir.root}stories/`);
|
|
2266
|
+
function jo(e) {
|
|
2267
|
+
return `import("${Do}").then(({ setCustomElementsManifest }) => {
|
|
2268
|
+
setCustomElementsManifest(${Ro(e)});
|
|
2269
2269
|
});`;
|
|
2270
2270
|
}
|
|
2271
|
-
const
|
|
2272
|
-
function
|
|
2271
|
+
const Do = "@storybook/web-components", Ro = (e) => `JSON.parse(\`${Mo(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
|
|
2272
|
+
function Mo(e) {
|
|
2273
2273
|
return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
|
|
2274
2274
|
}
|
|
2275
|
-
function
|
|
2276
|
-
|
|
2275
|
+
function Oo(e) {
|
|
2276
|
+
Jo(e);
|
|
2277
2277
|
const t = e.options.css?.globalStylesPath;
|
|
2278
2278
|
if (t === void 0)
|
|
2279
2279
|
return "";
|
|
@@ -2286,7 +2286,7 @@ function Ko(e) {
|
|
|
2286
2286
|
`) : `import "${i}${Ne}";`;
|
|
2287
2287
|
}
|
|
2288
2288
|
const gn = "hydrated";
|
|
2289
|
-
function
|
|
2289
|
+
function Jo(e) {
|
|
2290
2290
|
e._globalHydratedCssString = [
|
|
2291
2291
|
":not([",
|
|
2292
2292
|
e.options.css?.hydratedAttribute ?? gn,
|
|
@@ -2303,15 +2303,15 @@ function vn(e, t) {
|
|
|
2303
2303
|
].join(`
|
|
2304
2304
|
`);
|
|
2305
2305
|
}
|
|
2306
|
-
const
|
|
2306
|
+
const Ko = (e) => `${e._globalHydratedCssString}${e.shouldMinify ? "" : `
|
|
2307
2307
|
|
|
2308
2308
|
`}${e._globalCssString ? JSON.parse(`"${e._globalCssString}"`) : ""}`;
|
|
2309
|
-
function
|
|
2309
|
+
function Bo(e) {
|
|
2310
2310
|
const t = [], i = [];
|
|
2311
2311
|
for (const s of e.privateApiJson.modules) {
|
|
2312
2312
|
t.push(s.path);
|
|
2313
2313
|
for (const r of s.declarations)
|
|
2314
|
-
"customElement" in r && i.push(
|
|
2314
|
+
"customElement" in r && i.push(_o(r, e, s.path));
|
|
2315
2315
|
}
|
|
2316
2316
|
return [
|
|
2317
2317
|
// Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
|
|
@@ -2319,29 +2319,29 @@ function _o(e) {
|
|
|
2319
2319
|
e.viteCommand === "build" && e.options.build?.ssr?.stencilCompatibility?.enabled === !0 ? 'import "@lit-labs/ssr-client/lit-element-hydrate-support.js";' : "",
|
|
2320
2320
|
'import { runtime } from "./runtime";',
|
|
2321
2321
|
'import { makeDefineCustomElements } from "@arcgis/lumina";',
|
|
2322
|
-
|
|
2323
|
-
e.hmrEnabled ?
|
|
2322
|
+
Oo(e),
|
|
2323
|
+
e.hmrEnabled ? zo : "",
|
|
2324
2324
|
"",
|
|
2325
|
-
e.isInStorybook ?
|
|
2325
|
+
e.isInStorybook ? jo(e.apiJson) : "",
|
|
2326
2326
|
"",
|
|
2327
2327
|
"export const defineCustomElements = makeDefineCustomElements(runtime, {",
|
|
2328
2328
|
i.join(`,
|
|
2329
2329
|
`),
|
|
2330
2330
|
"});",
|
|
2331
|
-
e.hmrEnabled ?
|
|
2331
|
+
e.hmrEnabled ? qo(t) : ""
|
|
2332
2332
|
].join(`
|
|
2333
2333
|
`);
|
|
2334
2334
|
}
|
|
2335
|
-
const
|
|
2336
|
-
export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`,
|
|
2335
|
+
const Wo = `import "./index";
|
|
2336
|
+
export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, _o = (e, t, i) => [
|
|
2337
2337
|
` "${e.tagName}": [`,
|
|
2338
2338
|
`()=>import("${u.join(t.dir.root, i)}"),`,
|
|
2339
|
-
|
|
2339
|
+
Ho(e),
|
|
2340
2340
|
"]"
|
|
2341
2341
|
].join("");
|
|
2342
|
-
function
|
|
2343
|
-
const { properties: t, asyncMethods: i, syncMethods: n } = Sn(e), s = t.map((p) => p.join(
|
|
2344
|
-
return d.length > 0 ? `"${d.join(
|
|
2342
|
+
function Ho(e) {
|
|
2343
|
+
const { properties: t, asyncMethods: i, syncMethods: n } = Sn(e), s = t.map((p) => p.join(Ls)).join(tt), r = i.join(tt), a = n.join(tt), c = [s, r, a], l = c.findLastIndex((p) => p.length > 0), d = c.slice(0, l + 1);
|
|
2344
|
+
return d.length > 0 ? `"${d.join(Fs)}"` : "";
|
|
2345
2345
|
}
|
|
2346
2346
|
function Sn(e) {
|
|
2347
2347
|
const t = e.members.filter((r) => r.kind === "field").map((r) => {
|
|
@@ -2356,23 +2356,23 @@ function Sn(e) {
|
|
|
2356
2356
|
), n = i.filter((r) => r.async === !0).map((r) => r.name), s = i.filter((r) => r.async !== !0).map((r) => r.name);
|
|
2357
2357
|
return { tagName: e.tagName, properties: t, asyncMethods: n, syncMethods: s };
|
|
2358
2358
|
}
|
|
2359
|
-
const
|
|
2360
|
-
`,
|
|
2359
|
+
const zo = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
|
|
2360
|
+
`, qo = (e) => `
|
|
2361
2361
|
if(import.meta.hot) {
|
|
2362
2362
|
import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
|
|
2363
2363
|
import.meta.hot.accept([
|
|
2364
2364
|
${e.map((t) => ` "/${t}",`).join(`
|
|
2365
2365
|
`)}
|
|
2366
2366
|
], handleHmrUpdate);
|
|
2367
|
-
}`,
|
|
2368
|
-
function
|
|
2367
|
+
}`, Uo = "@arcgis/lumina:addMethodMetadata";
|
|
2368
|
+
function Go(e, t, i, n, s) {
|
|
2369
2369
|
const r = i.getSignatureFromDeclaration(e);
|
|
2370
2370
|
if (r === void 0)
|
|
2371
2371
|
return;
|
|
2372
2372
|
for (const d of e.parameters) {
|
|
2373
2373
|
if (!o.isIdentifier(d.name)) {
|
|
2374
2374
|
C.warn(
|
|
2375
|
-
|
|
2375
|
+
Uo,
|
|
2376
2376
|
`Object binding patterns are not yet supported in the docs. Found ${d.name?.getText(n)} in ${e.name.getText(n)}`,
|
|
2377
2377
|
n.fileName
|
|
2378
2378
|
);
|
|
@@ -2393,8 +2393,8 @@ function Xo(e, t, i, n, s) {
|
|
|
2393
2393
|
type: c
|
|
2394
2394
|
}, t.signature = l.replace(" =>", ":");
|
|
2395
2395
|
}
|
|
2396
|
-
const
|
|
2397
|
-
function
|
|
2396
|
+
const Vo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
|
|
2397
|
+
function Xo(e, t, i, n) {
|
|
2398
2398
|
const s = i.typeScriptTypeChecker, a = s.getTypeAtLocation(e).getProperty("emit");
|
|
2399
2399
|
if (a?.valueDeclaration === void 0)
|
|
2400
2400
|
return;
|
|
@@ -2419,15 +2419,15 @@ function Zo(e, t, i, n) {
|
|
|
2419
2419
|
composed: void 0,
|
|
2420
2420
|
privacy: void 0
|
|
2421
2421
|
};
|
|
2422
|
-
return fe(e.name, s, y),
|
|
2422
|
+
return fe(e.name, s, y), Qo(e, y, n), y.privacy === void 0 ? y : void 0;
|
|
2423
2423
|
}
|
|
2424
2424
|
}
|
|
2425
|
-
const
|
|
2426
|
-
function
|
|
2425
|
+
const Ie = "createEvent";
|
|
2426
|
+
function Qo(e, t, i) {
|
|
2427
2427
|
if (!e.initializer || !o.isCallExpression(e.initializer))
|
|
2428
2428
|
return;
|
|
2429
2429
|
const n = e.initializer;
|
|
2430
|
-
if (!o.isIdentifier(n.expression) || n.expression.text !==
|
|
2430
|
+
if (!o.isIdentifier(n.expression) || n.expression.text !== Ie)
|
|
2431
2431
|
return;
|
|
2432
2432
|
const s = n.arguments[0];
|
|
2433
2433
|
if (s !== void 0) {
|
|
@@ -2435,14 +2435,14 @@ function Yo(e, t, i) {
|
|
|
2435
2435
|
throw Error(
|
|
2436
2436
|
b(
|
|
2437
2437
|
"@arcgis/lumina:extractEventMeta",
|
|
2438
|
-
`Expected object literal expression as first argument of ${
|
|
2438
|
+
`Expected object literal expression as first argument of ${Ie}(). Found ${t.name} = createEvent(${s.getText(i)})`
|
|
2439
2439
|
)
|
|
2440
2440
|
);
|
|
2441
2441
|
if (s.properties.some((r) => o.isSpreadAssignment(r)))
|
|
2442
2442
|
throw Error(
|
|
2443
2443
|
b(
|
|
2444
2444
|
"@arcgis/lumina:extractEventMeta",
|
|
2445
|
-
`Unexpected spread syntax in ${
|
|
2445
|
+
`Unexpected spread syntax in ${Ie}() argument. ${Ie}() arguments must be statically parsable at compile time`
|
|
2446
2446
|
)
|
|
2447
2447
|
);
|
|
2448
2448
|
for (const r of s.properties)
|
|
@@ -2462,7 +2462,7 @@ function ae(e, t) {
|
|
|
2462
2462
|
);
|
|
2463
2463
|
}
|
|
2464
2464
|
const At = "@arcgis/lumina-compiler";
|
|
2465
|
-
class Ke extends
|
|
2465
|
+
class Ke extends Ss {
|
|
2466
2466
|
constructor(t, i) {
|
|
2467
2467
|
super({ isFullApiExtraction: t.isFullApiExtraction, cwd: t.dir.root }), this.context = t, this.isPathOnly = i, this.localCssImports = void 0, this.localDeclaredComponents = void 0, this.indexedComponents = /* @__PURE__ */ new Map(), this.apiComponent = void 0, this.pairedSetter = void 0, this.copyDocDefinitions = void 0, this._resolvedInheritance = /* @__PURE__ */ new Map(), this.copyDocDefinitions = t.options.documentation?.copyDefinitions, t.environment === "production" ? (this.normalizedDocumentationUrl = ui, this.alternativeDocumentationUrl = mi) : (this.normalizedDocumentationUrl = mi, this.alternativeDocumentationUrl = ui);
|
|
2468
2468
|
}
|
|
@@ -2474,7 +2474,7 @@ class Ke extends bs {
|
|
|
2474
2474
|
const i = super.extractModules(t);
|
|
2475
2475
|
for (const n of i)
|
|
2476
2476
|
for (const s of n.declarations)
|
|
2477
|
-
"customElement" in s && (this.context.isFullApiExtraction &&
|
|
2477
|
+
"customElement" in s && (this.context.isFullApiExtraction && ea(
|
|
2478
2478
|
s,
|
|
2479
2479
|
this.context,
|
|
2480
2480
|
this.indexedComponents,
|
|
@@ -2527,7 +2527,7 @@ class Ke extends bs {
|
|
|
2527
2527
|
* prefix (Arcgis), where as tag name always does. This also matches
|
|
2528
2528
|
* Stencil's behavior.
|
|
2529
2529
|
*/
|
|
2530
|
-
pascalCaseName:
|
|
2530
|
+
pascalCaseName: Cs(n),
|
|
2531
2531
|
privacy: void 0,
|
|
2532
2532
|
importPath: "",
|
|
2533
2533
|
members: [],
|
|
@@ -2553,7 +2553,7 @@ class Ke extends bs {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
if (this.apiComponent = s, s.members = this.extractComponentMembers(t), this.context.isFullApiExtraction) {
|
|
2555
2555
|
s.attributes = this.inferAttributes(s.members), this.indexedComponents.set(i, s);
|
|
2556
|
-
const a =
|
|
2556
|
+
const a = Js(n, this.context, this.apiModule.path);
|
|
2557
2557
|
if (s.importPath = `components/${a}`, this.localCssImports !== void 0) {
|
|
2558
2558
|
for (const f of this.localCssImports) {
|
|
2559
2559
|
const y = this.context._cssImports.get(f);
|
|
@@ -2625,7 +2625,7 @@ ${c}.componentOnReady().then(() => {
|
|
|
2625
2625
|
return i;
|
|
2626
2626
|
}
|
|
2627
2627
|
extractComponentMember(t, i) {
|
|
2628
|
-
if (
|
|
2628
|
+
if (ws(t) || i === void 0) {
|
|
2629
2629
|
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");
|
|
2630
2630
|
return;
|
|
2631
2631
|
}
|
|
@@ -2662,49 +2662,49 @@ ${c}.componentOnReady().then(() => {
|
|
|
2662
2662
|
inheritedFrom: void 0,
|
|
2663
2663
|
privacy: void 0
|
|
2664
2664
|
};
|
|
2665
|
-
return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !
|
|
2665
|
+
return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, l), (r === void 0 && (l.type.values === void 0 || !no(l.type.values)) || l.readonly && !l.reflects) && (l.attribute = void 0)), l;
|
|
2666
2666
|
}
|
|
2667
2667
|
/**
|
|
2668
2668
|
* Based on a `non-@property()` property, extract a public event if it is one.
|
|
2669
2669
|
*/
|
|
2670
2670
|
extractComponentEvent(t, i) {
|
|
2671
|
-
const n =
|
|
2671
|
+
const n = Xo(t, i, this.context, this.file);
|
|
2672
2672
|
return n !== void 0 && this.copyDoc(this.copyDocDefinitions?.events?.[i], n, this.apiComponent), n;
|
|
2673
2673
|
}
|
|
2674
2674
|
/**
|
|
2675
2675
|
* When doing full API extraction, extract additional details for a field.
|
|
2676
2676
|
*/
|
|
2677
2677
|
extractComponentFieldDetails(t, i) {
|
|
2678
|
-
const n = i.readonly === !0, s = this.context.typeScriptTypeChecker, r = s.getSymbolAtLocation(t.name), a = r === void 0 ? void 0 :
|
|
2678
|
+
const n = i.readonly === !0, s = this.context.typeScriptTypeChecker, r = s.getSymbolAtLocation(t.name), a = r === void 0 ? void 0 : Wt(s, r), c = new Set(a?.docsTags.map((g) => g.name) ?? []);
|
|
2679
2679
|
fe(t.name, this.context.typeScriptTypeChecker, i, a);
|
|
2680
2680
|
let l = !n && i.readonly === !0;
|
|
2681
2681
|
const d = this.pairedSetter ?? t, p = i.default;
|
|
2682
2682
|
_t(t, i, this.file);
|
|
2683
2683
|
const m = p === void 0 && i.default === "true", f = i.docsTags?.some((g) => g.name === "required") ?? !1;
|
|
2684
|
-
i.type =
|
|
2684
|
+
i.type = oo(this.context, d, f, this.file);
|
|
2685
2685
|
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);
|
|
2686
2686
|
if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || y) {
|
|
2687
|
-
const g = t.initializer, v = s.getSymbolAtLocation(g), S = v !== void 0 && ((v.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? s.getAliasedSymbol(v) : v,
|
|
2687
|
+
const g = t.initializer, v = s.getSymbolAtLocation(g), S = v !== void 0 && ((v.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? s.getAliasedSymbol(v) : v, E = S?.getDeclarations() ?? [];
|
|
2688
2688
|
if (S !== void 0) {
|
|
2689
|
-
const x =
|
|
2689
|
+
const x = Wt(s, S);
|
|
2690
2690
|
if (x.docsTags.length > 0) {
|
|
2691
2691
|
x.docsTags = x.docsTags.filter(
|
|
2692
|
-
(
|
|
2692
|
+
(T) => !c.has(T.name) || bs.has(T.name)
|
|
2693
2693
|
);
|
|
2694
2694
|
const w = i.description;
|
|
2695
|
-
fe(t.name, s, i, x), x.docsTags.forEach((
|
|
2696
|
-
c.add(
|
|
2695
|
+
fe(t.name, s, i, x), x.docsTags.forEach((T) => {
|
|
2696
|
+
c.add(T.name);
|
|
2697
2697
|
}), i.description = w ?? i.description;
|
|
2698
2698
|
} else
|
|
2699
2699
|
i.description ||= x.description;
|
|
2700
2700
|
}
|
|
2701
|
-
let $,
|
|
2702
|
-
|
|
2703
|
-
if ($ ??= o.isGetAccessor(x) ? x : void 0,
|
|
2701
|
+
let $, I;
|
|
2702
|
+
E.forEach((x) => {
|
|
2703
|
+
if ($ ??= o.isGetAccessor(x) ? x : void 0, I ??= o.isSetAccessor(x) ? x : void 0, !("initializer" in x))
|
|
2704
2704
|
return;
|
|
2705
2705
|
const w = x;
|
|
2706
|
-
l ||= w.modifiers?.some((
|
|
2707
|
-
}), y && $ !== void 0 &&
|
|
2706
|
+
l ||= w.modifiers?.some((T) => T.kind === o.SyntaxKind.ReadonlyKeyword) ?? !1, _t(w, i, w.getSourceFile());
|
|
2707
|
+
}), y && $ !== void 0 && I !== void 0 && $.type?.getText() !== I.parameters[0]?.type?.getText() && (i.getterType = { text: `typeof ${g.getText(this.file)}` });
|
|
2708
2708
|
}
|
|
2709
2709
|
if (l && (i.readonly = !0, n || (i.docsOnlyReadonly = !0)), i.type.values && i.type.values.length > 0 && i.type.values?.every((g) => g.type === "boolean") && (i.default ? m && this.context.viteCommand === "build" && i.deprecated === void 0 && (Ke.loggedBooleanWarning || this.context.logLintWarning(
|
|
2710
2710
|
`Boolean properties should default to "false". Found default value "true" in ${this.apiComponent.name}.${i.name}. See https://qawebgis.esri.com/components/lumina/properties#boolean-properties`
|
|
@@ -2738,12 +2738,12 @@ ${c}.componentOnReady().then(() => {
|
|
|
2738
2738
|
inheritedFrom: void 0,
|
|
2739
2739
|
docsTags: void 0,
|
|
2740
2740
|
signature: "",
|
|
2741
|
-
async:
|
|
2741
|
+
async: Vo(t) ? !0 : void 0,
|
|
2742
2742
|
privacy: void 0
|
|
2743
2743
|
};
|
|
2744
2744
|
if (this.context.isFullApiExtraction) {
|
|
2745
2745
|
const s = this.context.typeScriptTypeChecker;
|
|
2746
|
-
|
|
2746
|
+
Go(t, n, s, this.file, this.context.dir), this.copyDoc(this.copyDocDefinitions?.methods?.[i], n, this.apiComponent);
|
|
2747
2747
|
}
|
|
2748
2748
|
return n;
|
|
2749
2749
|
}
|
|
@@ -2838,16 +2838,16 @@ const pe = {
|
|
|
2838
2838
|
name: "LitElement",
|
|
2839
2839
|
package: "@arcgis/lumina"
|
|
2840
2840
|
}, ui = "developers.arcgis.com", mi = "next.sites.afd.arcgis.com", rt = (e, t) => e.name.localeCompare(t.name);
|
|
2841
|
-
async function
|
|
2841
|
+
async function Zo(e, t) {
|
|
2842
2842
|
t || (e.componentFilesPromise = Pt(e, e.dir.srcComponents));
|
|
2843
|
-
const i = await e.componentFilesPromise, n = await
|
|
2843
|
+
const i = await e.componentFilesPromise, n = await ca(e, i);
|
|
2844
2844
|
await e.componentStoriesPromise, e._componentPathMapping = {}, e._localDefinedComponents = void 0;
|
|
2845
2845
|
const s = wn(n, e, !1);
|
|
2846
2846
|
e.privateApiJson = s;
|
|
2847
2847
|
const [r, a] = bn(s);
|
|
2848
2848
|
return e.apiJsonComponents = a, e.apiJson = r, s;
|
|
2849
2849
|
}
|
|
2850
|
-
function
|
|
2850
|
+
function Yo(e, t, i) {
|
|
2851
2851
|
const n = e.getSourceFile(t, i), s = wn([n], e, !0), r = s.modules[0];
|
|
2852
2852
|
{
|
|
2853
2853
|
const f = bn(s)[0].modules[0], y = e.apiJson.modules.findIndex((v) => v.path === f.path), h = e.apiJson.modules[y], g = Array.from(e.apiJson.modules);
|
|
@@ -2892,8 +2892,8 @@ function bn(e) {
|
|
|
2892
2892
|
}
|
|
2893
2893
|
return [t, i];
|
|
2894
2894
|
}
|
|
2895
|
-
function
|
|
2896
|
-
const r =
|
|
2895
|
+
function ea(e, t, i, n, s) {
|
|
2896
|
+
const r = ta(i, e);
|
|
2897
2897
|
M(e, r, n, s);
|
|
2898
2898
|
for (const a of e.members) {
|
|
2899
2899
|
if (a.kind === "field")
|
|
@@ -2930,12 +2930,12 @@ function ia(e, t, i, n, s) {
|
|
|
2930
2930
|
}
|
|
2931
2931
|
function Le(e, t, i) {
|
|
2932
2932
|
e !== void 0 && (e.references?.reduce(
|
|
2933
|
-
(n, s) =>
|
|
2933
|
+
(n, s) => ia(s, t, i, n),
|
|
2934
2934
|
0
|
|
2935
2935
|
), e.text = e.text.replaceAll(
|
|
2936
|
-
|
|
2937
|
-
(n, s) =>
|
|
2938
|
-
), e.values?.forEach(
|
|
2936
|
+
aa,
|
|
2937
|
+
(n, s) => kt(t.get(s)) ?? n
|
|
2938
|
+
), e.values?.forEach(na, t));
|
|
2939
2939
|
}
|
|
2940
2940
|
function M(e, t, i, n) {
|
|
2941
2941
|
if (e.description && (e.description = e.description.replaceAll(i, n).replaceAll(fi, t)), e.docsTags)
|
|
@@ -2943,7 +2943,7 @@ function M(e, t, i, n) {
|
|
|
2943
2943
|
s.text && (s.text = s.text.replaceAll(i, n).replaceAll(fi, t));
|
|
2944
2944
|
typeof e.deprecated == "string" && (e.deprecated = e.deprecated.replaceAll(i, n));
|
|
2945
2945
|
}
|
|
2946
|
-
const fi = /\{@link ([^}]+)\}/gu,
|
|
2946
|
+
const fi = /\{@link ([^}]+)\}/gu, ta = (e, t) => (i, n) => {
|
|
2947
2947
|
let s = n.indexOf(" ");
|
|
2948
2948
|
s === -1 && (s = n.length);
|
|
2949
2949
|
const r = n.slice(0, s), a = n.slice(s + 1);
|
|
@@ -2967,7 +2967,7 @@ const fi = /\{@link ([^}]+)\}/gu, na = (e, t) => (i, n) => {
|
|
|
2967
2967
|
);
|
|
2968
2968
|
return `[${a || (d === t ? l : `${d.tagName}.${l}`)}](${p}#${l})`;
|
|
2969
2969
|
};
|
|
2970
|
-
function
|
|
2970
|
+
function ia(e, t, i, n) {
|
|
2971
2971
|
if (n > 0 && (e.start !== void 0 && (e.start += n), e.end !== void 0 && (e.end += n)), e.package !== void 0)
|
|
2972
2972
|
return n;
|
|
2973
2973
|
if (e.module?.startsWith("dist/components/") === !0)
|
|
@@ -2976,18 +2976,18 @@ function sa(e, t, i, n) {
|
|
|
2976
2976
|
const s = t.get(e.name);
|
|
2977
2977
|
if (s !== void 0) {
|
|
2978
2978
|
const r = e.name.length;
|
|
2979
|
-
e.name =
|
|
2979
|
+
e.name = kt(s);
|
|
2980
2980
|
const a = e.name.length - r - yi;
|
|
2981
|
-
e.viewUrl = s.demos?.at(0)?.url, e.start = e.start - yi, e.end = e.end + a, n += a -
|
|
2981
|
+
e.viewUrl = s.demos?.at(0)?.url, e.start = e.start - yi, e.end = e.end + a, n += a - oa;
|
|
2982
2982
|
}
|
|
2983
2983
|
}
|
|
2984
2984
|
return n;
|
|
2985
2985
|
}
|
|
2986
|
-
function
|
|
2987
|
-
e.type.startsWith("ToElement<") && (e.type =
|
|
2986
|
+
function na(e) {
|
|
2987
|
+
e.type.startsWith("ToElement<") && (e.type = kt(this.get(e.type.slice(10, -1))) ?? e.type);
|
|
2988
2988
|
}
|
|
2989
|
-
const
|
|
2990
|
-
async function
|
|
2989
|
+
const kt = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, sa = "ToElement<", yi = sa.length, ra = ">", oa = ra.length, aa = /ToElement<(\w+)>/gu;
|
|
2990
|
+
async function ca(e, t) {
|
|
2991
2991
|
if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
|
|
2992
2992
|
const i = e.typeScriptProgram.getSourceFiles(), n = new Set(t);
|
|
2993
2993
|
return i.filter((s) => n.has(s.fileName));
|
|
@@ -3000,9 +3000,9 @@ async function da(e, t) {
|
|
|
3000
3000
|
);
|
|
3001
3001
|
}
|
|
3002
3002
|
async function Tn(e) {
|
|
3003
|
-
return we ??=
|
|
3003
|
+
return we ??= da(e), await we;
|
|
3004
3004
|
}
|
|
3005
|
-
function
|
|
3005
|
+
function la() {
|
|
3006
3006
|
if (ht === void 0)
|
|
3007
3007
|
throw Error(
|
|
3008
3008
|
b(
|
|
@@ -3022,13 +3022,13 @@ function En() {
|
|
|
3022
3022
|
);
|
|
3023
3023
|
return gt;
|
|
3024
3024
|
}
|
|
3025
|
-
async function
|
|
3025
|
+
async function da(e) {
|
|
3026
3026
|
const t = J(e), i = t.dependencies ?? {}, n = t.peerDependencies ?? {}, r = (await Promise.all(
|
|
3027
|
-
[...Object.keys(i), ...Object.keys(n)].filter((a) => !
|
|
3027
|
+
[...Object.keys(i), ...Object.keys(n)].filter((a) => !pa.has(a)).flatMap(async (a) => await Cn(a, e))
|
|
3028
3028
|
)).filter(D);
|
|
3029
3029
|
return ht ??= r, gt = Object.fromEntries(r.flatMap((a) => Object.entries(a.components))), r;
|
|
3030
3030
|
}
|
|
3031
|
-
const
|
|
3031
|
+
const pa = /* @__PURE__ */ new Set([
|
|
3032
3032
|
"@arcgis/arcade-languageservice",
|
|
3033
3033
|
"@arcgis/components-build-utils",
|
|
3034
3034
|
"@arcgis/components-utils",
|
|
@@ -3066,20 +3066,20 @@ const ma = /* @__PURE__ */ new Set([
|
|
|
3066
3066
|
]);
|
|
3067
3067
|
let ht, gt, we;
|
|
3068
3068
|
async function Cn(e, t) {
|
|
3069
|
-
const i = await He(e, t), n = await ze(i), s = "exports" in n, r =
|
|
3069
|
+
const i = await He(e, t), n = await ze(i), s = "exports" in n, r = ga.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = u.join(i, "dist/esm/loader.js");
|
|
3070
3070
|
if (a ? await G(c) : !1) {
|
|
3071
|
-
const y = await O(c, "utf8"), h =
|
|
3071
|
+
const y = await O(c, "utf8"), h = ua(y, "bootstrapLazy("), g = y.indexOf(", options", h), v = y.slice(h, g), S = v.startsWith('JSON.parse("') ? v.slice(12, -2).replaceAll('\\"', '"') : v;
|
|
3072
3072
|
try {
|
|
3073
|
-
const
|
|
3073
|
+
const E = JSON.parse(S), $ = ya(E, { packageName: e, getImportPath: r });
|
|
3074
3074
|
return { packageName: e, type: "stencil", components: $ };
|
|
3075
|
-
} catch (
|
|
3075
|
+
} catch (E) {
|
|
3076
3076
|
C.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
|
|
3077
|
-
Error: ${String(
|
|
3077
|
+
Error: ${String(E)}`);
|
|
3078
3078
|
}
|
|
3079
3079
|
}
|
|
3080
3080
|
const d = hi(n.customElements);
|
|
3081
3081
|
if (d != null) {
|
|
3082
|
-
const y = u.join(i, d), h = JSON.parse(await O(y, "utf-8")), g =
|
|
3082
|
+
const y = u.join(i, d), h = JSON.parse(await O(y, "utf-8")), g = ma(h), v = $n(h, {
|
|
3083
3083
|
packageName: e,
|
|
3084
3084
|
getImportPath: r
|
|
3085
3085
|
});
|
|
@@ -3087,7 +3087,7 @@ Error: ${String(T)}`);
|
|
|
3087
3087
|
}
|
|
3088
3088
|
const p = hi(n["web-types"]);
|
|
3089
3089
|
if (p != null) {
|
|
3090
|
-
const y = u.join(i, p), h = JSON.parse(await O(y, "utf-8")), g =
|
|
3090
|
+
const y = u.join(i, p), h = JSON.parse(await O(y, "utf-8")), g = fa(h, {
|
|
3091
3091
|
packageName: e,
|
|
3092
3092
|
getImportPath: r,
|
|
3093
3093
|
packageRoot: i
|
|
@@ -3096,7 +3096,7 @@ Error: ${String(T)}`);
|
|
|
3096
3096
|
}
|
|
3097
3097
|
const m = u.join(i, "dist/components");
|
|
3098
3098
|
if (await G(m)) {
|
|
3099
|
-
const y = await
|
|
3099
|
+
const y = await ha(m, {
|
|
3100
3100
|
packageName: e,
|
|
3101
3101
|
getImportPath: r
|
|
3102
3102
|
});
|
|
@@ -3104,7 +3104,7 @@ Error: ${String(T)}`);
|
|
|
3104
3104
|
}
|
|
3105
3105
|
}
|
|
3106
3106
|
const hi = (e) => Array.isArray(e) ? e[0] : e;
|
|
3107
|
-
function
|
|
3107
|
+
function ua(e, t) {
|
|
3108
3108
|
const i = e.indexOf(t);
|
|
3109
3109
|
return i === -1 ? -1 : i + t.length;
|
|
3110
3110
|
}
|
|
@@ -3126,7 +3126,7 @@ function $n(e, t) {
|
|
|
3126
3126
|
}
|
|
3127
3127
|
return i;
|
|
3128
3128
|
}
|
|
3129
|
-
const
|
|
3129
|
+
const ma = (e) => e.compiler?.name === At, fa = (e, t) => Object.fromEntries(
|
|
3130
3130
|
(e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
|
|
3131
3131
|
(i) => [
|
|
3132
3132
|
i.name,
|
|
@@ -3137,7 +3137,7 @@ const ya = (e) => e.compiler?.name === At, ha = (e, t) => Object.fromEntries(
|
|
|
3137
3137
|
}
|
|
3138
3138
|
]
|
|
3139
3139
|
) ?? []
|
|
3140
|
-
),
|
|
3140
|
+
), ya = (e, t) => Object.fromEntries(
|
|
3141
3141
|
e.flatMap(
|
|
3142
3142
|
([i, n]) => n.map(
|
|
3143
3143
|
([s, r, a]) => [
|
|
@@ -3155,7 +3155,7 @@ const ya = (e) => e.compiler?.name === At, ha = (e, t) => Object.fromEntries(
|
|
|
3155
3155
|
]
|
|
3156
3156
|
)
|
|
3157
3157
|
)
|
|
3158
|
-
),
|
|
3158
|
+
), ha = async (e, t) => Object.fromEntries(
|
|
3159
3159
|
(await qe(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
|
|
3160
3160
|
const n = i.slice(0, -5);
|
|
3161
3161
|
return [
|
|
@@ -3167,16 +3167,16 @@ const ya = (e) => e.compiler?.name === At, ha = (e, t) => Object.fromEntries(
|
|
|
3167
3167
|
}
|
|
3168
3168
|
];
|
|
3169
3169
|
})
|
|
3170
|
-
),
|
|
3170
|
+
), ga = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, va = (e) => e.startsWith("/") ? e : `/${e}`, It = (e, t) => `${e}@fs${va(t)}`;
|
|
3171
3171
|
function Ve(e = J(), t = !1, i = e.name === "@esri/calcite-components") {
|
|
3172
3172
|
const n = e.version.includes("next"), s = e.name === "@esri/calcite-components";
|
|
3173
3173
|
if (s && n)
|
|
3174
3174
|
return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
|
|
3175
|
-
const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a =
|
|
3175
|
+
const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = Sa(e.name), c = wa(e.version, i);
|
|
3176
3176
|
return a.length === 0 ? `https://${r}/${c}/` : s ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
|
|
3177
3177
|
}
|
|
3178
|
-
const
|
|
3179
|
-
function
|
|
3178
|
+
const Sa = (e) => e.split("/").pop() ?? e;
|
|
3179
|
+
function wa(e, t) {
|
|
3180
3180
|
if (/\d+\.\d+\.\d+-(?:.*)$/u.test(e))
|
|
3181
3181
|
return "next";
|
|
3182
3182
|
const n = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/u, s = e.match(n);
|
|
@@ -3186,7 +3186,7 @@ function Ta(e, t) {
|
|
|
3186
3186
|
}
|
|
3187
3187
|
return "next";
|
|
3188
3188
|
}
|
|
3189
|
-
const
|
|
3189
|
+
const ba = ["keyed", "ref", "repeat", "live"], le = "staticHtml", ee = "staticSvg", de = "html", ce = "svg", xn = Symbol("maybe HTML namespace or maybe SVG"), Pn = "css", An = "mathml", kn = [Pn, de, An, le, ee, ce], Ta = new Set(kn), Ea = ["safeClassMap", "safeStyleMap", "deferLoad"], Ca = "nothing", $a = [...ba, ...kn, ...Ea, Ca], Be = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e);
|
|
3190
3190
|
function gi(e, t, i) {
|
|
3191
3191
|
if (re(e))
|
|
3192
3192
|
return e;
|
|
@@ -3206,14 +3206,14 @@ function re(e) {
|
|
|
3206
3206
|
return (
|
|
3207
3207
|
// Inlined string literal
|
|
3208
3208
|
typeof e == "string" || // Syntax kinds that are never undefined
|
|
3209
|
-
|
|
3209
|
+
xa.has(e.kind) || // Ternary with both branches never undefined
|
|
3210
3210
|
o.isConditionalExpression(e) && re(e.whenTrue) && re(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
|
|
3211
|
-
o.isBinaryExpression(e) && (
|
|
3211
|
+
o.isBinaryExpression(e) && (Pa.has(e.operatorToken.kind) || re(e.left) && re(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
|
|
3212
3212
|
(o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && re(e.expression) || // JSX that got converted to html`<p>Something</p>`
|
|
3213
|
-
o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) &&
|
|
3213
|
+
o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && Ta.has(e.tag.text)
|
|
3214
3214
|
);
|
|
3215
3215
|
}
|
|
3216
|
-
const
|
|
3216
|
+
const xa = /* @__PURE__ */ new Set([
|
|
3217
3217
|
o.SyntaxKind.NumericLiteral,
|
|
3218
3218
|
o.SyntaxKind.BigIntLiteral,
|
|
3219
3219
|
o.SyntaxKind.StringLiteral,
|
|
@@ -3232,7 +3232,7 @@ const Aa = /* @__PURE__ */ new Set([
|
|
|
3232
3232
|
o.SyntaxKind.ClassExpression,
|
|
3233
3233
|
// Trust? Trust.
|
|
3234
3234
|
o.SyntaxKind.NonNullExpression
|
|
3235
|
-
]),
|
|
3235
|
+
]), Pa = /* @__PURE__ */ new Set([
|
|
3236
3236
|
o.SyntaxKind.PlusEqualsToken,
|
|
3237
3237
|
o.SyntaxKind.MinusEqualsToken,
|
|
3238
3238
|
o.SyntaxKind.AsteriskAsteriskEqualsToken,
|
|
@@ -3267,9 +3267,9 @@ const Aa = /* @__PURE__ */ new Set([
|
|
|
3267
3267
|
o.SyntaxKind.SlashToken,
|
|
3268
3268
|
o.SyntaxKind.PercentToken,
|
|
3269
3269
|
o.SyntaxKind.AsteriskAsteriskToken
|
|
3270
|
-
]),
|
|
3270
|
+
]), Aa = {
|
|
3271
3271
|
property(e, t, i, n) {
|
|
3272
|
-
const s =
|
|
3272
|
+
const s = ka(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
|
|
3273
3273
|
if (a) {
|
|
3274
3274
|
const f = at(t);
|
|
3275
3275
|
if (f === !0)
|
|
@@ -3286,7 +3286,7 @@ const Aa = /* @__PURE__ */ new Set([
|
|
|
3286
3286
|
p,
|
|
3287
3287
|
e,
|
|
3288
3288
|
m ? "" : void 0
|
|
3289
|
-
), h = i === "value" && (n === "input" || n === "textarea" || n === Me) ?
|
|
3289
|
+
), h = i === "value" && (n === "input" || n === "textarea" || n === Me) ? La(f, e) : f;
|
|
3290
3290
|
if (h !== p)
|
|
3291
3291
|
return [m ? `.${i}` : s.name, d, h];
|
|
3292
3292
|
}
|
|
@@ -3356,21 +3356,21 @@ const Aa = /* @__PURE__ */ new Set([
|
|
|
3356
3356
|
return [o.factory.createIdentifier(s)];
|
|
3357
3357
|
}
|
|
3358
3358
|
};
|
|
3359
|
-
function
|
|
3359
|
+
function ka(e, t, i) {
|
|
3360
3360
|
if (typeof e == "string") {
|
|
3361
3361
|
const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
|
|
3362
3362
|
if (r !== void 0)
|
|
3363
3363
|
return { name: r, type: "reflected" };
|
|
3364
3364
|
}
|
|
3365
|
-
const n = ot(
|
|
3365
|
+
const n = ot(W.common, t);
|
|
3366
3366
|
if (n !== void 0)
|
|
3367
3367
|
return n;
|
|
3368
3368
|
if (typeof e == "string") {
|
|
3369
|
-
const s = ot(
|
|
3369
|
+
const s = ot(W.perElement[e], t);
|
|
3370
3370
|
if (s !== void 0)
|
|
3371
3371
|
return s;
|
|
3372
3372
|
} else {
|
|
3373
|
-
const s = Object.values(
|
|
3373
|
+
const s = Object.values(W.perElement).map(
|
|
3374
3374
|
(a) => ot(a, t)
|
|
3375
3375
|
), r = ge(s, (a) => a?.type === "stringifiedNonReflected" ? a : void 0) ?? ge(s, (a) => a?.type === "stringifiedReflected" ? a : void 0);
|
|
3376
3376
|
if (r !== void 0)
|
|
@@ -3406,7 +3406,7 @@ function at(e) {
|
|
|
3406
3406
|
}
|
|
3407
3407
|
}
|
|
3408
3408
|
function je(e, t, i = !1) {
|
|
3409
|
-
if (
|
|
3409
|
+
if (Be(t))
|
|
3410
3410
|
throw new Error(
|
|
3411
3411
|
`Invalid JSX syntax detected or there is a bug in Lumina. Found ${t.getText(e.sourceFile)}. Expected JSX attribute value to be wrapped in { }`
|
|
3412
3412
|
);
|
|
@@ -3431,7 +3431,7 @@ function vi(e, t) {
|
|
|
3431
3431
|
if (i.length === 0)
|
|
3432
3432
|
return [];
|
|
3433
3433
|
const n = an(i);
|
|
3434
|
-
if (
|
|
3434
|
+
if (zr(n)) {
|
|
3435
3435
|
const s = n.replaceAll('"', """);
|
|
3436
3436
|
if (s.length > n.length) {
|
|
3437
3437
|
const r = n.replaceAll("'", "'");
|
|
@@ -3450,7 +3450,7 @@ function Si(e, t, i) {
|
|
|
3450
3450
|
`${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
|
|
3451
3451
|
);
|
|
3452
3452
|
const n = t.expression;
|
|
3453
|
-
if (
|
|
3453
|
+
if (Ia(n)) {
|
|
3454
3454
|
const r = i === "class" ? "safeClassMap" : "safeStyleMap";
|
|
3455
3455
|
e.neededImports.add(r);
|
|
3456
3456
|
const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
|
|
@@ -3460,15 +3460,15 @@ function Si(e, t, i) {
|
|
|
3460
3460
|
} else
|
|
3461
3461
|
return [i, ...je(e, t, !0)];
|
|
3462
3462
|
}
|
|
3463
|
-
const
|
|
3464
|
-
function
|
|
3463
|
+
const Ia = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
|
|
3464
|
+
function La(e, t) {
|
|
3465
3465
|
t.neededImports.add("live");
|
|
3466
3466
|
const i = t.importRenames.live;
|
|
3467
3467
|
return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
|
|
3468
3468
|
typeof e == "string" ? o.factory.createStringLiteral(e) : e
|
|
3469
3469
|
]);
|
|
3470
3470
|
}
|
|
3471
|
-
function
|
|
3471
|
+
function Fa(e) {
|
|
3472
3472
|
if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in wi && e.expression.arguments.length <= 1)
|
|
3473
3473
|
return {
|
|
3474
3474
|
propType: wi[e.expression.expression.text],
|
|
@@ -3486,15 +3486,15 @@ const wi = {
|
|
|
3486
3486
|
bindBooleanAttribute: "booleanAttribute",
|
|
3487
3487
|
bindEvent: "event"
|
|
3488
3488
|
};
|
|
3489
|
-
function
|
|
3490
|
-
return
|
|
3489
|
+
function Na(e, t, i) {
|
|
3490
|
+
return Da.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : (tn.has(e) || e.includes("-")) && (e !== "itemId" || i !== "arcgis-map" && i !== "arcgis-scene") ? "attribute" : !xt(i) && (nn.has(e) || (i === ft ? !1 : i === Me ? (
|
|
3491
3491
|
// When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
|
|
3492
3492
|
Object.values(yt).some((r) => r.has(e))
|
|
3493
|
-
) : yt[i]?.has(e) === !0)) ? Yt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === ft || i !== Me && (Ct.has(i) || $t.has(i)) ? e in
|
|
3493
|
+
) : yt[i]?.has(e) === !0)) ? Yt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === ft || i !== Me && (Ct.has(i) || $t.has(i)) ? e in W.common.reflected || e in W.common.stringifiedReflected || e in W.common.stringifiedNonReflected ? "property" : Yt.has(e) ? "booleanAttribute" : "attribute" : "property";
|
|
3494
3494
|
}
|
|
3495
|
-
const
|
|
3495
|
+
const ja = ["class", "style", "ref", "directives", "key", "deferLoad"], Da = new Set(ja), Ra = (e) => typeof e != "string" || e.trim().length > 0;
|
|
3496
3496
|
function Xe({ key: e, parts: t, litTag: i }, n) {
|
|
3497
|
-
const s =
|
|
3497
|
+
const s = Ma(t);
|
|
3498
3498
|
if (s.length % 2 === 0)
|
|
3499
3499
|
throw new Error("Normalized template parts array length must be odd");
|
|
3500
3500
|
const [r, ...a] = s;
|
|
@@ -3517,12 +3517,12 @@ function Xe({ key: e, parts: t, litTag: i }, n) {
|
|
|
3517
3517
|
void 0,
|
|
3518
3518
|
a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(d, d) : o.factory.createTemplateExpression(
|
|
3519
3519
|
o.factory.createTemplateHead(d, d),
|
|
3520
|
-
|
|
3520
|
+
Oa(a)
|
|
3521
3521
|
)
|
|
3522
3522
|
);
|
|
3523
3523
|
return ct(n, e, p);
|
|
3524
3524
|
}
|
|
3525
|
-
const
|
|
3525
|
+
const Ma = (e) => e.reduce(
|
|
3526
3526
|
(t, i, n) => {
|
|
3527
3527
|
const s = t.at(-1), r = typeof s == "string", a = typeof i == "string";
|
|
3528
3528
|
if (r && a)
|
|
@@ -3532,7 +3532,7 @@ const Ja = (e) => e.reduce(
|
|
|
3532
3532
|
},
|
|
3533
3533
|
[""]
|
|
3534
3534
|
);
|
|
3535
|
-
function
|
|
3535
|
+
function Oa(e) {
|
|
3536
3536
|
if (!(e.length % 2 === 0))
|
|
3537
3537
|
throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
|
|
3538
3538
|
const i = e.length / 2;
|
|
@@ -3564,7 +3564,7 @@ function ct(e, t, i) {
|
|
|
3564
3564
|
const n = e.importRenames.keyed;
|
|
3565
3565
|
return o.factory.createCallExpression(o.factory.createIdentifier(n), void 0, [t, i]);
|
|
3566
3566
|
}
|
|
3567
|
-
const
|
|
3567
|
+
const In = (e, t) => e.getFullText(t.sourceFile).slice(0, e.getLeadingTriviaWidth(t.sourceFile));
|
|
3568
3568
|
function Ln(e, t) {
|
|
3569
3569
|
const i = Ft(e);
|
|
3570
3570
|
return i.length === 0 ? t : o.setSyntheticLeadingComments(
|
|
@@ -3578,13 +3578,13 @@ function Ln(e, t) {
|
|
|
3578
3578
|
);
|
|
3579
3579
|
}
|
|
3580
3580
|
const Ft = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
|
|
3581
|
-
function
|
|
3581
|
+
function Ja(e) {
|
|
3582
3582
|
const t = Ft(e);
|
|
3583
3583
|
if (t.length === 0)
|
|
3584
3584
|
return [e || " "];
|
|
3585
3585
|
const i = t.reduceRight(
|
|
3586
3586
|
([s, ...r], a) => {
|
|
3587
|
-
const c =
|
|
3587
|
+
const c = Ka(s), l = Ue(Fn(c.slice(a.pos, a.end)));
|
|
3588
3588
|
return [
|
|
3589
3589
|
c.slice(0, a.pos),
|
|
3590
3590
|
/**
|
|
@@ -3603,12 +3603,12 @@ function Wa(e) {
|
|
|
3603
3603
|
return (typeof n != "string" || n.trim() !== "") && i.push(" "), i;
|
|
3604
3604
|
}
|
|
3605
3605
|
const Fn = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
|
|
3606
|
-
function
|
|
3606
|
+
function Ka(e) {
|
|
3607
3607
|
if (typeof e == "string")
|
|
3608
3608
|
return e;
|
|
3609
3609
|
throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
|
|
3610
3610
|
}
|
|
3611
|
-
function
|
|
3611
|
+
function Ba(e, t) {
|
|
3612
3612
|
if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
|
|
3613
3613
|
return t;
|
|
3614
3614
|
const n = t.arguments[0];
|
|
@@ -3628,13 +3628,13 @@ function _a(e, t) {
|
|
|
3628
3628
|
const v = c.statements.at(-1);
|
|
3629
3629
|
if (!(v && o.isReturnStatement(v) && v.expression))
|
|
3630
3630
|
return t;
|
|
3631
|
-
const
|
|
3632
|
-
if (!bi(
|
|
3631
|
+
const E = be(v.expression);
|
|
3632
|
+
if (!bi(E))
|
|
3633
3633
|
return t;
|
|
3634
3634
|
const $ = c.statements.slice(0, -1);
|
|
3635
3635
|
if ($.some(Nn))
|
|
3636
3636
|
return t;
|
|
3637
|
-
l = $.length === 0, d =
|
|
3637
|
+
l = $.length === 0, d = E;
|
|
3638
3638
|
}
|
|
3639
3639
|
const p = o.isJsxElement(d) ? d.openingElement : d, m = On(p);
|
|
3640
3640
|
if (m === -1)
|
|
@@ -3642,7 +3642,7 @@ function _a(e, t) {
|
|
|
3642
3642
|
const f = p.attributes.properties[m];
|
|
3643
3643
|
if (f === void 0 || !o.isJsxAttribute(f))
|
|
3644
3644
|
return t;
|
|
3645
|
-
const y = Lt(f.initializer, e.sourceFile), h =
|
|
3645
|
+
const y = Lt(f.initializer, e.sourceFile), h = Wa(r, n, y, l, e);
|
|
3646
3646
|
if (h === void 0)
|
|
3647
3647
|
return t;
|
|
3648
3648
|
e.liftedKeys.add(f.name), e.neededImports.add("repeat");
|
|
@@ -3675,14 +3675,14 @@ function Nn(e) {
|
|
|
3675
3675
|
void 0
|
|
3676
3676
|
), t;
|
|
3677
3677
|
}
|
|
3678
|
-
function
|
|
3679
|
-
const r =
|
|
3678
|
+
function Wa(e, t, i, n, s) {
|
|
3679
|
+
const r = B(i);
|
|
3680
3680
|
if (r === void 0)
|
|
3681
3681
|
return;
|
|
3682
3682
|
let a = jn(e.name, r);
|
|
3683
3683
|
const c = t.parameters.at(1);
|
|
3684
3684
|
if (c !== void 0 && o.isIdentifier(c.name) && // A more basic check is also provided in lumina/no-unnecessary-key rule
|
|
3685
|
-
r.every(
|
|
3685
|
+
r.every(We, c.name)) {
|
|
3686
3686
|
C.warn(
|
|
3687
3687
|
"@arcgis/lumina:jsxToLitHtml",
|
|
3688
3688
|
"It looks like you are trying to use .map() index as a key={} prop value. Doing so is potentially pointless and may cause performance degradation. In Lit it is safe to omit the key={} prop. If you really mean to use index as the key, then use the keyed() Lit directive directly, rather than the JSX key={} prop.",
|
|
@@ -3691,7 +3691,7 @@ function Ha(e, t, i, n, s) {
|
|
|
3691
3691
|
return;
|
|
3692
3692
|
}
|
|
3693
3693
|
if (!n) {
|
|
3694
|
-
const l =
|
|
3694
|
+
const l = Ha(r, a, t);
|
|
3695
3695
|
if (l === void 0)
|
|
3696
3696
|
return;
|
|
3697
3697
|
a = l;
|
|
@@ -3707,29 +3707,29 @@ function Ha(e, t, i, n, s) {
|
|
|
3707
3707
|
e.initializer
|
|
3708
3708
|
);
|
|
3709
3709
|
}
|
|
3710
|
-
function
|
|
3710
|
+
function B(e) {
|
|
3711
3711
|
if (o.isIdentifier(e))
|
|
3712
3712
|
return [e.text];
|
|
3713
3713
|
if (o.isPropertyAccessExpression(e))
|
|
3714
|
-
return
|
|
3714
|
+
return B(e.expression);
|
|
3715
3715
|
if (o.isElementAccessExpression(e))
|
|
3716
|
-
return
|
|
3716
|
+
return B(e.argumentExpression);
|
|
3717
3717
|
if (o.isConditionalExpression(e)) {
|
|
3718
|
-
const t =
|
|
3718
|
+
const t = B(e.condition), i = B(e.whenTrue), n = B(e.whenFalse);
|
|
3719
3719
|
return t === void 0 || i === void 0 || n === void 0 ? void 0 : [...t, ...i, ...n];
|
|
3720
3720
|
} else if (o.isBinaryExpression(e)) {
|
|
3721
|
-
const t =
|
|
3721
|
+
const t = B(e.left), i = B(e.right);
|
|
3722
3722
|
return t === void 0 || i === void 0 ? void 0 : [...t, ...i];
|
|
3723
3723
|
} else {
|
|
3724
|
-
if (
|
|
3724
|
+
if (_a.has(e.kind))
|
|
3725
3725
|
return [];
|
|
3726
3726
|
{
|
|
3727
3727
|
const t = be(e);
|
|
3728
|
-
return t !== e ?
|
|
3728
|
+
return t !== e ? B(t) : void 0;
|
|
3729
3729
|
}
|
|
3730
3730
|
}
|
|
3731
3731
|
}
|
|
3732
|
-
const
|
|
3732
|
+
const _a = /* @__PURE__ */ new Set([
|
|
3733
3733
|
o.SyntaxKind.NumericLiteral,
|
|
3734
3734
|
o.SyntaxKind.BigIntLiteral,
|
|
3735
3735
|
o.SyntaxKind.StringLiteral,
|
|
@@ -3738,40 +3738,40 @@ const za = /* @__PURE__ */ new Set([
|
|
|
3738
3738
|
o.SyntaxKind.FalseKeyword,
|
|
3739
3739
|
o.SyntaxKind.NullKeyword,
|
|
3740
3740
|
o.SyntaxKind.TrueKeyword
|
|
3741
|
-
]), be = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? be(e.expression) : e, jn = (e, t) => o.isObjectBindingPattern(e) ?
|
|
3742
|
-
function
|
|
3743
|
-
if (e.every(
|
|
3741
|
+
]), be = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? be(e.expression) : e, jn = (e, t) => o.isObjectBindingPattern(e) ? Ua(e, t) : e;
|
|
3742
|
+
function Ha(e, t, i) {
|
|
3743
|
+
if (e.every(We, t))
|
|
3744
3744
|
return t;
|
|
3745
3745
|
if (o.isIdentifier(t)) {
|
|
3746
|
-
const n = o.isBlock(i.body) ? ge(i.body.statements, (r) =>
|
|
3746
|
+
const n = o.isBlock(i.body) ? ge(i.body.statements, (r) => za(r, t)) : void 0;
|
|
3747
3747
|
if (n === void 0)
|
|
3748
3748
|
return;
|
|
3749
3749
|
const s = jn(n, e);
|
|
3750
|
-
if (e.every(
|
|
3750
|
+
if (e.every(We, s))
|
|
3751
3751
|
return s;
|
|
3752
3752
|
}
|
|
3753
3753
|
}
|
|
3754
|
-
function
|
|
3754
|
+
function za(e, t) {
|
|
3755
3755
|
if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
|
|
3756
3756
|
return;
|
|
3757
3757
|
const i = e.declarationList.declarations[0];
|
|
3758
3758
|
return i?.initializer && o.isIdentifier(i.initializer) && i.initializer.text === t.text ? i.name : void 0;
|
|
3759
3759
|
}
|
|
3760
|
-
function
|
|
3760
|
+
function We(e) {
|
|
3761
3761
|
const t = this;
|
|
3762
|
-
return o.isIdentifier(t) ? t.text === e : t.elements.some(
|
|
3762
|
+
return o.isIdentifier(t) ? t.text === e : t.elements.some(qa, e);
|
|
3763
3763
|
}
|
|
3764
|
-
function
|
|
3764
|
+
function qa(e) {
|
|
3765
3765
|
const t = this;
|
|
3766
|
-
return o.isOmittedExpression(e) ? !1 :
|
|
3766
|
+
return o.isOmittedExpression(e) ? !1 : We.call(e.name, t);
|
|
3767
3767
|
}
|
|
3768
|
-
function
|
|
3768
|
+
function Ua(e, t) {
|
|
3769
3769
|
let i = !1;
|
|
3770
3770
|
const n = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (i = !0, !0));
|
|
3771
3771
|
return i || n.length === 0 ? e : o.factory.updateObjectBindingPattern(e, n);
|
|
3772
3772
|
}
|
|
3773
|
-
const Dn = (e, t) => t.liftedKeys.has(e),
|
|
3774
|
-
`),
|
|
3773
|
+
const Dn = (e, t) => t.liftedKeys.has(e), Ga = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
|
|
3774
|
+
`), Va = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Qe = (e) => !Va.test(e), $e = (e) => Qe(e) ? `"${e}"` : e;
|
|
3775
3775
|
function Ze(e, t) {
|
|
3776
3776
|
const i = [], n = [];
|
|
3777
3777
|
let s = !1;
|
|
@@ -3795,15 +3795,15 @@ type ${e}SetterTypes = ${e}["${en}"]` : "", d = c.filter(Boolean).join(", ");
|
|
|
3795
3795
|
}
|
|
3796
3796
|
const Ti = (e) => e.map((t) => `'${t}'`).join(" | ");
|
|
3797
3797
|
function V(e, t, i) {
|
|
3798
|
-
if (
|
|
3798
|
+
if (Be(i))
|
|
3799
3799
|
return Rn(e, i);
|
|
3800
|
-
const n = o.isCallExpression(i) ?
|
|
3800
|
+
const n = o.isCallExpression(i) ? Ba(e, i) : i, s = o.visitEachChild(
|
|
3801
3801
|
n,
|
|
3802
3802
|
// Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
|
|
3803
3803
|
V.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
|
|
3804
3804
|
e.transformationContext
|
|
3805
3805
|
);
|
|
3806
|
-
return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) ||
|
|
3806
|
+
return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Be(be(i.right))) ? Za(s) : s;
|
|
3807
3807
|
}
|
|
3808
3808
|
function Rn(e, t) {
|
|
3809
3809
|
const i = Mn(e, t);
|
|
@@ -3817,38 +3817,38 @@ function Mn(e, t) {
|
|
|
3817
3817
|
if (o.isJsxNamespacedName(r))
|
|
3818
3818
|
throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
|
|
3819
3819
|
if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== it && r.text !== nt) {
|
|
3820
|
-
const x = o.isIdentifier(r) && r.text ===
|
|
3820
|
+
const x = o.isIdentifier(r) && r.text === Ar ? De(i, e) : {
|
|
3821
3821
|
// No need to wrap the function call in a lit-html tag
|
|
3822
3822
|
litTag: void 0,
|
|
3823
|
-
parts: [
|
|
3823
|
+
parts: [Qa(e, t, r, i)]
|
|
3824
3824
|
};
|
|
3825
3825
|
return {
|
|
3826
|
-
key:
|
|
3826
|
+
key: Xa(s, e),
|
|
3827
3827
|
...x
|
|
3828
3828
|
};
|
|
3829
3829
|
}
|
|
3830
|
-
const c = r.text === it ? Me : r.text === nt ? ft : r.text, l = r.text === it ? le : r.text === nt ? ee :
|
|
3830
|
+
const c = r.text === it ? Me : r.text === nt ? ft : r.text, l = r.text === it ? le : r.text === nt ? ee : Ir.has(c) ? xn : Ct.has(c) ? ce : de, d = xt(c);
|
|
3831
3831
|
let p;
|
|
3832
|
-
d && e.compiler.viteCommand === "build" && (p =
|
|
3832
|
+
d && e.compiler.viteCommand === "build" && (p = Ya(e, c));
|
|
3833
3833
|
let m;
|
|
3834
3834
|
const f = [];
|
|
3835
3835
|
let y = !1;
|
|
3836
|
-
const h = s.attributes.properties.flatMap((
|
|
3837
|
-
if (o.isJsxSpreadAttribute(
|
|
3836
|
+
const h = s.attributes.properties.flatMap((I) => {
|
|
3837
|
+
if (o.isJsxSpreadAttribute(I))
|
|
3838
3838
|
throw Error(
|
|
3839
3839
|
`JSX spread attribute syntax is not supported. See alternatives: https://qawebgis.esri.com/components/lumina/jsx#spread-attributes
|
|
3840
|
-
Found ${
|
|
3840
|
+
Found ${I.getText(e.sourceFile)}`
|
|
3841
3841
|
);
|
|
3842
|
-
const { name: x, initializer: w } =
|
|
3842
|
+
const { name: x, initializer: w } = I;
|
|
3843
3843
|
if (o.isJsxNamespacedName(x))
|
|
3844
3844
|
throw Error(`JSX namespaced attributes are not supported. Found ${x.getText(e.sourceFile)}`);
|
|
3845
|
-
const
|
|
3846
|
-
p?.delete(
|
|
3847
|
-
const j =
|
|
3845
|
+
const T = x.text, L = Fa(w), N = L?.propType ?? Na(T, w, c);
|
|
3846
|
+
p?.delete(T);
|
|
3847
|
+
const j = Aa[N](e, L?.initializer ?? w, T, c);
|
|
3848
3848
|
if (j.length === 0)
|
|
3849
3849
|
return [];
|
|
3850
|
-
const R = e.compiler.shouldMinifyJsx ? [" "] :
|
|
3851
|
-
return N === "key" ? (m = typeof j[0] == "object" && !Dn(x, e) ? j[0] : void 0, R.some(
|
|
3850
|
+
const R = e.compiler.shouldMinifyJsx ? [" "] : Ja(In(x, e));
|
|
3851
|
+
return N === "key" ? (m = typeof j[0] == "object" && !Dn(x, e) ? j[0] : void 0, R.some(Ra) ? R : []) : N === "directives" || N === "ref" || T === "deferLoad" ? (y ||= N === "deferLoad", f.push(
|
|
3852
3852
|
...R,
|
|
3853
3853
|
...j.flatMap(
|
|
3854
3854
|
(z, K) => typeof z == "string" || K === 0 || typeof j[K - 1] == "string" ? z : [" ", z]
|
|
@@ -3864,18 +3864,18 @@ Found ${k.getText(e.sourceFile)}`
|
|
|
3864
3864
|
`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`
|
|
3865
3865
|
);
|
|
3866
3866
|
d && (y ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
|
|
3867
|
-
const g = typeof c == "string" &&
|
|
3867
|
+
const g = typeof c == "string" && kr.has(c), v = De(i, e);
|
|
3868
3868
|
if (g && v.parts.length > 0)
|
|
3869
3869
|
throw Error(
|
|
3870
3870
|
`Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
|
|
3871
3871
|
);
|
|
3872
|
-
const S = (l === ce || l === ee) && v.parts.length === 0,
|
|
3872
|
+
const S = (l === ce || l === ee) && v.parts.length === 0, E = [
|
|
3873
3873
|
"<",
|
|
3874
3874
|
typeof c == "string" ? c : r,
|
|
3875
3875
|
...h,
|
|
3876
3876
|
S ? `${h.length === 0 ? "" : " "}/>` : ">"
|
|
3877
|
-
], $ = g || S ?
|
|
3878
|
-
...
|
|
3877
|
+
], $ = g || S ? E : [
|
|
3878
|
+
...E,
|
|
3879
3879
|
/**
|
|
3880
3880
|
* If parent was an HTML element (e.g. `<svg>`), but children are SVG
|
|
3881
3881
|
* fragments (e.g. `<circle />`, then wrap the children in their own
|
|
@@ -3888,21 +3888,21 @@ Found ${k.getText(e.sourceFile)}`
|
|
|
3888
3888
|
];
|
|
3889
3889
|
return { key: m, parts: $, litTag: l };
|
|
3890
3890
|
}
|
|
3891
|
-
function
|
|
3891
|
+
function Xa(e, t) {
|
|
3892
3892
|
const i = e.attributes.properties[On(e)];
|
|
3893
3893
|
return i && o.isJsxAttribute(i) && !Dn(i.name, t) ? Lt(i.initializer, t.sourceFile) : void 0;
|
|
3894
3894
|
}
|
|
3895
3895
|
const On = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
|
|
3896
|
-
function
|
|
3896
|
+
function Qa(e, t, i, n) {
|
|
3897
3897
|
const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((l) => {
|
|
3898
3898
|
if (o.isJsxSpreadAttribute(l))
|
|
3899
|
-
return Ln(
|
|
3899
|
+
return Ln(In(l, e), o.factory.createSpreadAssignment(l.expression));
|
|
3900
3900
|
const { name: d, initializer: p } = l;
|
|
3901
3901
|
if (o.isJsxNamespacedName(d))
|
|
3902
3902
|
throw Error(`JSX namespaced attributes are not supported. Found ${d.getText(e.sourceFile)}`);
|
|
3903
3903
|
if (d.text === "key")
|
|
3904
3904
|
return;
|
|
3905
|
-
const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p :
|
|
3905
|
+
const m = p === void 0 ? o.factory.createTrue() : o.isStringLiteral(p) ? p : Be(p) ? Rn(e, p) : V(e, void 0, p.expression ?? o.factory.createIdentifier("undefined")), f = Qe(d.text) ? o.factory.createStringLiteral(d.text) : d;
|
|
3906
3906
|
return o.factory.createPropertyAssignment(f, m);
|
|
3907
3907
|
}), { parts: a, litTag: c } = De(n, e);
|
|
3908
3908
|
return a.length > 0 && r.push(
|
|
@@ -3918,7 +3918,7 @@ function De(e, t) {
|
|
|
3918
3918
|
let i;
|
|
3919
3919
|
const n = e.flatMap((s) => {
|
|
3920
3920
|
if (o.isJsxText(s))
|
|
3921
|
-
return [t.compiler.shouldMinifyJsx ?
|
|
3921
|
+
return [t.compiler.shouldMinifyJsx ? Hr(s.text) : s.text];
|
|
3922
3922
|
if (o.isJsxExpression(s))
|
|
3923
3923
|
return Nt(t, s, s);
|
|
3924
3924
|
{
|
|
@@ -3937,7 +3937,7 @@ function De(e, t) {
|
|
|
3937
3937
|
});
|
|
3938
3938
|
return { litTag: i, parts: n };
|
|
3939
3939
|
}
|
|
3940
|
-
function
|
|
3940
|
+
function Za(e) {
|
|
3941
3941
|
return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
|
|
3942
3942
|
e,
|
|
3943
3943
|
o.factory.createToken(o.SyntaxKind.BarBarToken),
|
|
@@ -3988,7 +3988,7 @@ function Nt(e, t, i) {
|
|
|
3988
3988
|
] : [V(e, i, t.expression)]
|
|
3989
3989
|
);
|
|
3990
3990
|
}
|
|
3991
|
-
function
|
|
3991
|
+
function Ya(e, t) {
|
|
3992
3992
|
if (t in e.localComponents)
|
|
3993
3993
|
for (const n of e.compiler.privateApiJson.modules)
|
|
3994
3994
|
for (const s of n.declarations) {
|
|
@@ -4024,11 +4024,11 @@ const Jn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), T
|
|
|
4024
4024
|
}, Kn = Jn(
|
|
4025
4025
|
Object.entries(Te).flatMap(([e, t]) => t.map((i) => [i, e]))
|
|
4026
4026
|
), jt = new Set(Object.keys(Kn));
|
|
4027
|
-
function
|
|
4027
|
+
function ec(e, t) {
|
|
4028
4028
|
const i = t.importClause, n = t.moduleSpecifier;
|
|
4029
4029
|
if (!o.isStringLiteral(n))
|
|
4030
4030
|
return t;
|
|
4031
|
-
const s =
|
|
4031
|
+
const s = tc(e.sourceFile.fileName, n.text, ""), r = !i?.isTypeOnly;
|
|
4032
4032
|
if (r && e.existingImportedModules.add(s), i === void 0)
|
|
4033
4033
|
return t;
|
|
4034
4034
|
if (e.isInLightDomComponent && n.text.startsWith(".") && Je.test(n.text) && // If id already includes ?, bypass our custom behavior
|
|
@@ -4052,7 +4052,7 @@ function ic(e, t) {
|
|
|
4052
4052
|
const d = (l.propertyName ?? l.name).text, p = Te[d];
|
|
4053
4053
|
if (c) {
|
|
4054
4054
|
if (p?.some((y) => y === n.text)) {
|
|
4055
|
-
const y =
|
|
4055
|
+
const y = Bn(d, s);
|
|
4056
4056
|
e.existingLitImports.add(y), e.importRenames[y] = l.name?.text ?? y;
|
|
4057
4057
|
}
|
|
4058
4058
|
} else (l.name.text === "h" || l.name.text === "createElement") && (e.hasNonLuminaJsxImport = !0);
|
|
@@ -4060,22 +4060,22 @@ function ic(e, t) {
|
|
|
4060
4060
|
r && !l.isTypeOnly && m && f && e.importedFunctionComponentsFromModules.add(s);
|
|
4061
4061
|
}), t;
|
|
4062
4062
|
}
|
|
4063
|
-
const
|
|
4064
|
-
function
|
|
4065
|
-
return o.isImportDeclaration(e) ?
|
|
4063
|
+
const Bn = (e, t) => e === de && Te.staticHtml.includes(t) ? le : e === ce && Te.staticSvg.includes(t) ? ee : e, tc = (e, t, i) => t.startsWith(".") ? u.resolve(e, "..", `${t}${i}`) : t;
|
|
4064
|
+
function ic(e) {
|
|
4065
|
+
return o.isImportDeclaration(e) ? nc(this, e) : e;
|
|
4066
4066
|
}
|
|
4067
|
-
function
|
|
4067
|
+
function nc(e, t) {
|
|
4068
4068
|
const i = t.importClause, n = i?.namedBindings, s = t.moduleSpecifier;
|
|
4069
4069
|
if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !jt.has(s.text))
|
|
4070
4070
|
return t;
|
|
4071
4071
|
const r = i.isTypeOnly;
|
|
4072
4072
|
let a = !1;
|
|
4073
4073
|
const c = n.elements.map((l) => {
|
|
4074
|
-
const d = (l.propertyName ?? l.name).text, p =
|
|
4074
|
+
const d = (l.propertyName ?? l.name).text, p = Bn(d, s.text);
|
|
4075
4075
|
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;
|
|
4076
4076
|
});
|
|
4077
4077
|
return Kn[s.text]?.forEach((l) => {
|
|
4078
|
-
!e.neededImports.has(l) || e.existingLitImports.has(l) || (e.neededImports.delete(l), a = !0, c.push(
|
|
4078
|
+
!e.neededImports.has(l) || e.existingLitImports.has(l) || (e.neededImports.delete(l), a = !0, c.push(Wn(l, e)));
|
|
4079
4079
|
}), a ? o.factory.updateImportDeclaration(
|
|
4080
4080
|
t,
|
|
4081
4081
|
t.modifiers,
|
|
@@ -4089,7 +4089,7 @@ function rc(e, t) {
|
|
|
4089
4089
|
t.attributes
|
|
4090
4090
|
) : t;
|
|
4091
4091
|
}
|
|
4092
|
-
function
|
|
4092
|
+
function sc(e) {
|
|
4093
4093
|
const t = Jn(Array.from(e.neededImports, (i) => [Te[i][0], i]));
|
|
4094
4094
|
return Object.entries(t).map(
|
|
4095
4095
|
([i, n]) => o.factory.createImportDeclaration(
|
|
@@ -4098,14 +4098,14 @@ function oc(e) {
|
|
|
4098
4098
|
!1,
|
|
4099
4099
|
void 0,
|
|
4100
4100
|
o.factory.createNamedImports(
|
|
4101
|
-
n.map((s) => (e.neededImports.delete(s),
|
|
4101
|
+
n.map((s) => (e.neededImports.delete(s), Wn(s, e)))
|
|
4102
4102
|
)
|
|
4103
4103
|
),
|
|
4104
4104
|
o.factory.createStringLiteral(i)
|
|
4105
4105
|
)
|
|
4106
4106
|
);
|
|
4107
4107
|
}
|
|
4108
|
-
function
|
|
4108
|
+
function Wn(e, t) {
|
|
4109
4109
|
const i = e === le ? de : e === ee ? ce : e, n = t.importRenames[e];
|
|
4110
4110
|
return n === i ? o.factory.createImportSpecifier(!1, void 0, o.factory.createIdentifier(i)) : o.factory.createImportSpecifier(
|
|
4111
4111
|
!1,
|
|
@@ -4113,8 +4113,8 @@ function Bn(e, t) {
|
|
|
4113
4113
|
o.factory.createIdentifier(n)
|
|
4114
4114
|
);
|
|
4115
4115
|
}
|
|
4116
|
-
function
|
|
4117
|
-
const t =
|
|
4116
|
+
function rc(e) {
|
|
4117
|
+
const t = la().map(({ packageName: i }) => i);
|
|
4118
4118
|
return e.existingImportedModules.forEach((i) => {
|
|
4119
4119
|
if (u.isAbsolute(i))
|
|
4120
4120
|
return;
|
|
@@ -4127,7 +4127,7 @@ function ac(e) {
|
|
|
4127
4127
|
}
|
|
4128
4128
|
}), [];
|
|
4129
4129
|
}
|
|
4130
|
-
function
|
|
4130
|
+
function oc(e) {
|
|
4131
4131
|
if (e.compiler.viteCommand === "serve")
|
|
4132
4132
|
return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
|
|
4133
4133
|
const t = e.compiler._customElementDependencies;
|
|
@@ -4142,7 +4142,7 @@ function cc(e) {
|
|
|
4142
4142
|
t[n] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[n].referencedBy.push(e.sourceFile.fileName);
|
|
4143
4143
|
}), [];
|
|
4144
4144
|
}
|
|
4145
|
-
function
|
|
4145
|
+
function ac(e, t, i) {
|
|
4146
4146
|
const n = En()[t] ?? _n(e)[t];
|
|
4147
4147
|
if (n === void 0) {
|
|
4148
4148
|
const s = te(i);
|
|
@@ -4155,7 +4155,7 @@ function lc(e, t, i) {
|
|
|
4155
4155
|
}
|
|
4156
4156
|
return n;
|
|
4157
4157
|
}
|
|
4158
|
-
function
|
|
4158
|
+
function cc(e, t) {
|
|
4159
4159
|
return e.packageName === void 0 ? ie(t, e.moduleName) : u.join(e.packageName, e.moduleName);
|
|
4160
4160
|
}
|
|
4161
4161
|
function _n(e) {
|
|
@@ -4166,7 +4166,7 @@ function _n(e) {
|
|
|
4166
4166
|
}
|
|
4167
4167
|
}), e._localDefinedComponents;
|
|
4168
4168
|
}
|
|
4169
|
-
const
|
|
4169
|
+
const lc = (e, t) => {
|
|
4170
4170
|
const i = e.pragmas;
|
|
4171
4171
|
if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
|
|
4172
4172
|
return e.statements;
|
|
@@ -4176,7 +4176,7 @@ const pc = (e, t) => {
|
|
|
4176
4176
|
localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : _n(t.compiler),
|
|
4177
4177
|
sourceFile: e,
|
|
4178
4178
|
transformationContext: t.transformation,
|
|
4179
|
-
importRenames:
|
|
4179
|
+
importRenames: dc(e),
|
|
4180
4180
|
existingImportedModules: /* @__PURE__ */ new Set(),
|
|
4181
4181
|
importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
|
|
4182
4182
|
existingLitImports: /* @__PURE__ */ new Set(),
|
|
@@ -4192,18 +4192,18 @@ const pc = (e, t) => {
|
|
|
4192
4192
|
let s = [];
|
|
4193
4193
|
if (e.statements.every((a) => {
|
|
4194
4194
|
if (o.isImportDeclaration(a)) {
|
|
4195
|
-
if (s.push(
|
|
4195
|
+
if (s.push(ec(n, a)), n.hasNonLuminaJsxImport)
|
|
4196
4196
|
return !1;
|
|
4197
4197
|
} else
|
|
4198
4198
|
s.push(V(n, void 0, a));
|
|
4199
4199
|
return !0;
|
|
4200
4200
|
}), n.hasNonLuminaJsxImport)
|
|
4201
4201
|
return e.statements;
|
|
4202
|
-
if (n.neededImports.size > 0 && (s = s.map(
|
|
4202
|
+
if (n.neededImports.size > 0 && (s = s.map(ic, n), n.existingLitImports.size > 0))
|
|
4203
4203
|
throw new Error(
|
|
4204
4204
|
`Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
|
|
4205
4205
|
);
|
|
4206
|
-
const r = [
|
|
4206
|
+
const r = [sc, rc, oc].flatMap(
|
|
4207
4207
|
(a) => a(n)
|
|
4208
4208
|
);
|
|
4209
4209
|
if (n.neededImports.size > 0)
|
|
@@ -4212,18 +4212,18 @@ const pc = (e, t) => {
|
|
|
4212
4212
|
);
|
|
4213
4213
|
return [...r, ...s];
|
|
4214
4214
|
};
|
|
4215
|
-
function
|
|
4216
|
-
return
|
|
4217
|
-
|
|
4215
|
+
function dc(e) {
|
|
4216
|
+
return pc(e), Object.fromEntries(
|
|
4217
|
+
$a.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
|
|
4218
4218
|
);
|
|
4219
4219
|
}
|
|
4220
|
-
function
|
|
4220
|
+
function pc(e) {
|
|
4221
4221
|
if (!("identifiers" in e))
|
|
4222
4222
|
throw new Error(
|
|
4223
4223
|
"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."
|
|
4224
4224
|
);
|
|
4225
4225
|
}
|
|
4226
|
-
function
|
|
4226
|
+
function uc(e, t, i) {
|
|
4227
4227
|
return t.size === 0 ? e : [
|
|
4228
4228
|
o.factory.createPropertyDeclaration(
|
|
4229
4229
|
[
|
|
@@ -4237,7 +4237,7 @@ function fc(e, t, i) {
|
|
|
4237
4237
|
Array.from(t.entries()).map(
|
|
4238
4238
|
([n, s]) => o.factory.createPropertyAssignment(
|
|
4239
4239
|
Qe(n) ? o.factory.createStringLiteral(n) : n,
|
|
4240
|
-
|
|
4240
|
+
mc(s, i)
|
|
4241
4241
|
)
|
|
4242
4242
|
)
|
|
4243
4243
|
)
|
|
@@ -4245,7 +4245,7 @@ function fc(e, t, i) {
|
|
|
4245
4245
|
...e
|
|
4246
4246
|
];
|
|
4247
4247
|
}
|
|
4248
|
-
function
|
|
4248
|
+
function mc(e, t) {
|
|
4249
4249
|
let i = 0, n = !0;
|
|
4250
4250
|
const s = [], r = [];
|
|
4251
4251
|
for (const l of e.properties)
|
|
@@ -4287,7 +4287,7 @@ function yc(e, t) {
|
|
|
4287
4287
|
...t ? [] : [o.factory.createObjectLiteralExpression(r)]
|
|
4288
4288
|
]);
|
|
4289
4289
|
}
|
|
4290
|
-
function
|
|
4290
|
+
function fc(e, t, i, n, s) {
|
|
4291
4291
|
let r = -1, a = -1, c = -1;
|
|
4292
4292
|
t.options?.properties.forEach((f, y) => {
|
|
4293
4293
|
if (o.isSpreadAssignment(f))
|
|
@@ -4299,23 +4299,23 @@ function hc(e, t, i, n, s) {
|
|
|
4299
4299
|
h === "type" ? r = y : h === "attribute" ? a = y : h === "readOnly" && (c = y);
|
|
4300
4300
|
}
|
|
4301
4301
|
});
|
|
4302
|
-
const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p =
|
|
4302
|
+
const l = s.attribute === void 0 && a === -1, d = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = yc(e, t, i, s, r), m = [
|
|
4303
4303
|
...l ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
|
|
4304
4304
|
...d ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
|
|
4305
4305
|
...p !== void 0 ? [p] : []
|
|
4306
4306
|
];
|
|
4307
4307
|
return m.length > 0 ? t.options === void 0 ? o.factory.createObjectLiteralExpression(m, !1) : o.factory.updateObjectLiteralExpression(t.options, [...t.options.properties, ...m]) : t.options;
|
|
4308
4308
|
}
|
|
4309
|
-
function
|
|
4309
|
+
function yc(e, t, i, n, s) {
|
|
4310
4310
|
if (n.attribute === void 0)
|
|
4311
4311
|
return;
|
|
4312
|
-
const r =
|
|
4312
|
+
const r = gc(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : hc(n.type.values);
|
|
4313
4313
|
return a === "Other" || n.readonly && (a !== "Boolean" || !n.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
|
|
4314
4314
|
o.factory.createIdentifier("type"),
|
|
4315
4315
|
o.factory.createIdentifier(a)
|
|
4316
4316
|
);
|
|
4317
4317
|
}
|
|
4318
|
-
function
|
|
4318
|
+
function hc(e) {
|
|
4319
4319
|
let t = !1, i = !1, n = !1;
|
|
4320
4320
|
if (e?.forEach((s) => {
|
|
4321
4321
|
t ||= s.type === "number", i ||= s.type === "boolean", n ||= s.type === "string" || s.type === "any" || s.type === "unknown";
|
|
@@ -4327,7 +4327,7 @@ function vc(e) {
|
|
|
4327
4327
|
}
|
|
4328
4328
|
return "Other";
|
|
4329
4329
|
}
|
|
4330
|
-
function
|
|
4330
|
+
function gc(e) {
|
|
4331
4331
|
const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
|
|
4332
4332
|
if (t === void 0) {
|
|
4333
4333
|
if ("initializer" in e && e.initializer !== void 0) {
|
|
@@ -4344,7 +4344,7 @@ function Sc(e) {
|
|
|
4344
4344
|
}
|
|
4345
4345
|
return "Other";
|
|
4346
4346
|
}
|
|
4347
|
-
function
|
|
4347
|
+
function vc(e, t, i, n, s) {
|
|
4348
4348
|
if (t.modifiers === void 0)
|
|
4349
4349
|
return t;
|
|
4350
4350
|
let r = -1, a = -1;
|
|
@@ -4354,7 +4354,7 @@ function wc(e, t, i, n, s) {
|
|
|
4354
4354
|
d === "property" && (r = l), d === "state" && (a = l);
|
|
4355
4355
|
}
|
|
4356
4356
|
}), r !== -1) {
|
|
4357
|
-
const c =
|
|
4357
|
+
const c = Sc(e, t, i, n), l = Ei(t, r, n), d = fc(t, l, e, n, c);
|
|
4358
4358
|
let p = !1;
|
|
4359
4359
|
return s.set(c.name, d ?? o.factory.createObjectLiteralExpression()), p = !0, l.options = d, Ci(t, l, r, p);
|
|
4360
4360
|
} else if (a !== -1) {
|
|
@@ -4365,7 +4365,7 @@ function wc(e, t, i, n, s) {
|
|
|
4365
4365
|
} else
|
|
4366
4366
|
return t;
|
|
4367
4367
|
}
|
|
4368
|
-
function
|
|
4368
|
+
function Sc(e, t, i, n) {
|
|
4369
4369
|
const s = e.apiModule?.declarations.find(
|
|
4370
4370
|
(a) => a.name === i
|
|
4371
4371
|
) ?? (e.compiler.isInTest ? {
|
|
@@ -4373,7 +4373,7 @@ function bc(e, t, i, n) {
|
|
|
4373
4373
|
} : void 0);
|
|
4374
4374
|
if (s === void 0)
|
|
4375
4375
|
throw Error(`Failed to find API component for ${i} in ${n.fileName}`);
|
|
4376
|
-
const r =
|
|
4376
|
+
const r = sr(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
|
|
4377
4377
|
if (r === void 0 || r.kind !== "field")
|
|
4378
4378
|
throw Error(
|
|
4379
4379
|
`Failed to find API property for ${t.getText(n)} in ${i} in ${n.fileName}`
|
|
@@ -4432,16 +4432,16 @@ function Ci(e, t, i, n) {
|
|
|
4432
4432
|
e.initializer
|
|
4433
4433
|
);
|
|
4434
4434
|
}
|
|
4435
|
-
const
|
|
4435
|
+
const wc = (e, t) => {
|
|
4436
4436
|
if (t.apiModule === void 0 && !t.compiler.isInTest)
|
|
4437
4437
|
return e.statements;
|
|
4438
4438
|
let i;
|
|
4439
4439
|
function n() {
|
|
4440
4440
|
i = /* @__PURE__ */ new Map();
|
|
4441
4441
|
}
|
|
4442
|
-
const s = (c) =>
|
|
4442
|
+
const s = (c) => uc(c, i, t.compiler.shouldMinify);
|
|
4443
4443
|
function r(c, l) {
|
|
4444
|
-
const d =
|
|
4444
|
+
const d = Tc(t, c, l, e, i);
|
|
4445
4445
|
return t.compiler.viteCommand === "build" && o.setEmitFlags(d, o.EmitFlags.NoComments), d;
|
|
4446
4446
|
}
|
|
4447
4447
|
return e.statements.map(
|
|
@@ -4475,11 +4475,11 @@ function Hn(e, t, i, n, s = zi) {
|
|
|
4475
4475
|
i.transformation
|
|
4476
4476
|
) : t;
|
|
4477
4477
|
}
|
|
4478
|
-
const
|
|
4479
|
-
function
|
|
4478
|
+
const bc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
|
|
4479
|
+
function Tc(e, t, i, n, s) {
|
|
4480
4480
|
if (o.isMethodDeclaration(t)) {
|
|
4481
4481
|
const r = t.modifiers?.filter(
|
|
4482
|
-
(a) => !o.isDecorator(a) ||
|
|
4482
|
+
(a) => !o.isDecorator(a) || !Ec(a)
|
|
4483
4483
|
);
|
|
4484
4484
|
if (r?.length !== t.modifiers?.length)
|
|
4485
4485
|
return o.factory.updateMethodDeclaration(
|
|
@@ -4493,7 +4493,7 @@ function Cc(e, t, i, n, s) {
|
|
|
4493
4493
|
t.type,
|
|
4494
4494
|
t.body
|
|
4495
4495
|
);
|
|
4496
|
-
if ("text" in t.name &&
|
|
4496
|
+
if ("text" in t.name && bc.has(t.name.text) && t.body) {
|
|
4497
4497
|
const a = t.name.text;
|
|
4498
4498
|
return t.body.statements.some(
|
|
4499
4499
|
(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
|
|
@@ -4519,10 +4519,10 @@ function Cc(e, t, i, n, s) {
|
|
|
4519
4519
|
);
|
|
4520
4520
|
}
|
|
4521
4521
|
}
|
|
4522
|
-
return o.isPropertyDeclaration(t) || o.isAccessor(t) ?
|
|
4522
|
+
return o.isPropertyDeclaration(t) || o.isAccessor(t) ? vc(e, t, i, n, s) : t;
|
|
4523
4523
|
}
|
|
4524
|
-
const
|
|
4525
|
-
function
|
|
4524
|
+
const Ec = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", $i = "makeRuntime(";
|
|
4525
|
+
function Cc(e, t) {
|
|
4526
4526
|
const i = e.indexOf($i);
|
|
4527
4527
|
if (i === -1)
|
|
4528
4528
|
throw new Error("Failed to find makeRuntime() function call in src/runtime.ts");
|
|
@@ -4543,11 +4543,11 @@ function xc(e, t) {
|
|
|
4543
4543
|
map: null
|
|
4544
4544
|
};
|
|
4545
4545
|
}
|
|
4546
|
-
const
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
], xi = "@arcgis/lumina:transformComponents",
|
|
4546
|
+
const $c = [
|
|
4547
|
+
lc,
|
|
4548
|
+
Us,
|
|
4549
|
+
wc
|
|
4550
|
+
], xi = "@arcgis/lumina:transformComponents", xc = (e) => ({
|
|
4551
4551
|
name: xi,
|
|
4552
4552
|
transform: {
|
|
4553
4553
|
// Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
|
|
@@ -4561,7 +4561,7 @@ const Pc = [
|
|
|
4561
4561
|
i
|
|
4562
4562
|
);
|
|
4563
4563
|
else if (i === `${e.dir.src}runtime.ts`)
|
|
4564
|
-
return
|
|
4564
|
+
return Cc(t, e);
|
|
4565
4565
|
return;
|
|
4566
4566
|
}
|
|
4567
4567
|
const n = e.getSourceFile(i, t);
|
|
@@ -4569,7 +4569,7 @@ const Pc = [
|
|
|
4569
4569
|
const r = o.transform(n, [
|
|
4570
4570
|
(f) => () => Zi(e, f, n, [
|
|
4571
4571
|
...e.options.types?.sourceFileTransformers ?? [],
|
|
4572
|
-
|
|
4572
|
+
...$c
|
|
4573
4573
|
])
|
|
4574
4574
|
]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, l = a.sourceMap ? ye.createSourceMapGenerator(
|
|
4575
4575
|
e.typeScriptHost,
|
|
@@ -4587,7 +4587,7 @@ const Pc = [
|
|
|
4587
4587
|
}
|
|
4588
4588
|
}
|
|
4589
4589
|
});
|
|
4590
|
-
function
|
|
4590
|
+
function Pc(e) {
|
|
4591
4591
|
const t = e.typeScriptConfig;
|
|
4592
4592
|
return {
|
|
4593
4593
|
...t,
|
|
@@ -4619,8 +4619,8 @@ function Ic(e) {
|
|
|
4619
4619
|
skipLibCheck: !0
|
|
4620
4620
|
};
|
|
4621
4621
|
}
|
|
4622
|
-
function
|
|
4623
|
-
const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t :
|
|
4622
|
+
function Ac(e) {
|
|
4623
|
+
const t = e.options.types?.tsconfigPath, i = t && u.isAbsolute(t) ? t : gs(t ?? "tsconfig.json");
|
|
4624
4624
|
if (i === void 0)
|
|
4625
4625
|
throw Error(
|
|
4626
4626
|
b(
|
|
@@ -4658,7 +4658,7 @@ function zn(e) {
|
|
|
4658
4658
|
const i = o.ScriptTarget[t].toLowerCase();
|
|
4659
4659
|
return i === "latest" ? "esnext" : i;
|
|
4660
4660
|
}
|
|
4661
|
-
function
|
|
4661
|
+
function kc(e, t) {
|
|
4662
4662
|
if (e.isInStorybook && e.viteCommand === "serve") {
|
|
4663
4663
|
const i = (a, c, l, ...d) => {
|
|
4664
4664
|
const p = a.filter(
|
|
@@ -4677,13 +4677,13 @@ function Lc(e, t) {
|
|
|
4677
4677
|
l[0] === "timerToUpdateProgram" ? s : c,
|
|
4678
4678
|
...l
|
|
4679
4679
|
), n.afterProgramCreate = (a) => {
|
|
4680
|
-
e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new
|
|
4680
|
+
e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new $s();
|
|
4681
4681
|
}, e.typeScriptWatchProgram = o.createWatchProgram(n), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
|
|
4682
4682
|
}
|
|
4683
|
-
e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter =
|
|
4683
|
+
e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = Pc(e), e._typeScriptPrinter = ln(e._compilerOptionsForPrinter);
|
|
4684
4684
|
}
|
|
4685
4685
|
const vt = "@arcgis/core", Pi = J(), U = vt in (Pi.dependencies ?? {}) || vt in (Pi.peerDependencies ?? {});
|
|
4686
|
-
async function
|
|
4686
|
+
async function Ic(e, t) {
|
|
4687
4687
|
if (!U)
|
|
4688
4688
|
return [];
|
|
4689
4689
|
const i = await He(vt);
|
|
@@ -4707,7 +4707,7 @@ async function Fc(e, t) {
|
|
|
4707
4707
|
Ai(s)
|
|
4708
4708
|
];
|
|
4709
4709
|
} else
|
|
4710
|
-
return [Ai(
|
|
4710
|
+
return [Ai(It(e, `${i}/assets/`))];
|
|
4711
4711
|
}
|
|
4712
4712
|
const Ai = (e) => ({
|
|
4713
4713
|
// Not using join() because it would turn https:// into https:/
|
|
@@ -4715,12 +4715,12 @@ const Ai = (e) => ({
|
|
|
4715
4715
|
// This is used be the theme switcher in `@arcgis/storybook-utils`
|
|
4716
4716
|
id: "arcgisCoreStylesheet"
|
|
4717
4717
|
});
|
|
4718
|
-
async function
|
|
4718
|
+
async function Lc(e, t, i) {
|
|
4719
4719
|
const n = u.resolve(e.dir.root, t);
|
|
4720
|
-
await G(n) && await
|
|
4720
|
+
await G(n) && await As(n, { recursive: !0, force: !0 }), await _(n, { recursive: !0 }), await ks(e.dir.distCdn, u.join(n, "build"), { recursive: !0 });
|
|
4721
4721
|
const s = [
|
|
4722
4722
|
"index.html",
|
|
4723
|
-
...await
|
|
4723
|
+
...await js("**/*.html", {
|
|
4724
4724
|
cwd: e.dir.src,
|
|
4725
4725
|
nodir: !0,
|
|
4726
4726
|
posix: !0
|
|
@@ -4744,10 +4744,10 @@ async function Nc(e, t, i) {
|
|
|
4744
4744
|
await _(u.dirname(h), { recursive: !0 });
|
|
4745
4745
|
const g = await O(y, "utf-8"), v = ie(u.dirname(f), `build/${i}`), S = `${l}<script type="module" src="${v}"><\/script>
|
|
4746
4746
|
`;
|
|
4747
|
-
let
|
|
4748
|
-
if (
|
|
4747
|
+
let E = g.indexOf("<style>");
|
|
4748
|
+
if (E === -1 && (E = g.indexOf("</head>")), E === -1)
|
|
4749
4749
|
throw Error(b("@arcgis/lumina:buildWebApp", `Failed to find <head> or <style> tag in ${y}`));
|
|
4750
|
-
const $ = g.slice(0,
|
|
4750
|
+
const $ = g.slice(0, E) + S + g.slice(E);
|
|
4751
4751
|
await F(h, $, "utf-8");
|
|
4752
4752
|
})
|
|
4753
4753
|
);
|
|
@@ -4766,7 +4766,7 @@ const qn = /* @__PURE__ */ new Set([
|
|
|
4766
4766
|
"extras",
|
|
4767
4767
|
"support"
|
|
4768
4768
|
]), H = "@arcgis/lumina:buildCdn", Dt = "cdn", Un = "index", Ee = "main";
|
|
4769
|
-
function
|
|
4769
|
+
function Fc(e) {
|
|
4770
4770
|
const { skip: t = !1, namespace: i, esbuildOptions: n = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination, r = e.options.build?.cdn?.namespace !== void 0;
|
|
4771
4771
|
if (r) {
|
|
4772
4772
|
if (i.toLowerCase() !== i)
|
|
@@ -4783,7 +4783,7 @@ function jc(e) {
|
|
|
4783
4783
|
if (e.provideAssets([
|
|
4784
4784
|
{
|
|
4785
4785
|
type: "dynamic",
|
|
4786
|
-
source: () =>
|
|
4786
|
+
source: () => Ko(e),
|
|
4787
4787
|
destination: r ? `../${a}.css` : `../../${Ee}.css`
|
|
4788
4788
|
}
|
|
4789
4789
|
]), !t)
|
|
@@ -4792,19 +4792,19 @@ function jc(e) {
|
|
|
4792
4792
|
async writeBundle() {
|
|
4793
4793
|
if (e.isInStorybook)
|
|
4794
4794
|
return;
|
|
4795
|
-
const c = Date.now(), l = _(e.dir.distCdn, { recursive: !0 }), d = Array.isArray(n.entryPoints) ? n.entryPoints.map((f) => typeof f == "string" ? { in: f, out: "" } : f) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([f, y]) => ({ in: y, out: f })) : [], p = await
|
|
4796
|
-
await l, await
|
|
4795
|
+
const c = Date.now(), l = _(e.dir.distCdn, { recursive: !0 }), d = Array.isArray(n.entryPoints) ? n.entryPoints.map((f) => typeof f == "string" ? { in: f, out: "" } : f) : typeof n.entryPoints == "object" ? Object.entries(n.entryPoints).map(([f, y]) => ({ in: y, out: f })) : [], p = await Nc(e, a, n, d);
|
|
4796
|
+
await l, await jc(
|
|
4797
4797
|
p,
|
|
4798
4798
|
e.dir.distCdn,
|
|
4799
4799
|
r ? `${a}.esm` : a,
|
|
4800
4800
|
d
|
|
4801
4801
|
);
|
|
4802
4802
|
const m = Date.now();
|
|
4803
|
-
C.info(H, `CDN was built in ${m - c}ms`), s && await
|
|
4803
|
+
C.info(H, `CDN was built in ${m - c}ms`), s && await Lc(e, s, `${r ? `${a}.esm` : a}.js`);
|
|
4804
4804
|
}
|
|
4805
4805
|
};
|
|
4806
4806
|
}
|
|
4807
|
-
async function
|
|
4807
|
+
async function Nc(e, t, i, n) {
|
|
4808
4808
|
const s = e.environment;
|
|
4809
4809
|
if (i.minify && U)
|
|
4810
4810
|
throw Error(
|
|
@@ -4820,7 +4820,7 @@ async function Dc(e, t, i, n) {
|
|
|
4820
4820
|
"Source maps in the CDN build are not yet supported - open a feature request with Lumina maintainers if it is needed"
|
|
4821
4821
|
)
|
|
4822
4822
|
);
|
|
4823
|
-
return await
|
|
4823
|
+
return await Ns({
|
|
4824
4824
|
bundle: !0,
|
|
4825
4825
|
minify: U ? !0 : s === "production",
|
|
4826
4826
|
treeShaking: !0,
|
|
@@ -4884,7 +4884,7 @@ defineCustomElements({resourcesUrl: import.meta.url});`,
|
|
|
4884
4884
|
}
|
|
4885
4885
|
});
|
|
4886
4886
|
}
|
|
4887
|
-
async function
|
|
4887
|
+
async function jc(e, t, i, n) {
|
|
4888
4888
|
const s = `${i}.js`, r = new Map(
|
|
4889
4889
|
e.outputFiles.map((a) => {
|
|
4890
4890
|
const c = {
|
|
@@ -4892,17 +4892,17 @@ async function Rc(e, t, i, n) {
|
|
|
4892
4892
|
isAsync: void 0,
|
|
4893
4893
|
oldSingleExportName: void 0
|
|
4894
4894
|
}, l = a.path.slice(t.length);
|
|
4895
|
-
return l === "stdin.js" ? (U && (c.code = `${c.code.trimEnd()}${
|
|
4895
|
+
return l === "stdin.js" ? (U && (c.code = `${c.code.trimEnd()}${Dc}${Mc(n)}${Rc}`, c.isAsync = !1), [s, c]) : [l, c];
|
|
4896
4896
|
})
|
|
4897
4897
|
);
|
|
4898
4898
|
U && r.forEach((a, c) => {
|
|
4899
4899
|
a.isAsync === void 0 && (c.endsWith(".js") ? Gn(a, r) : a.isAsync = !1);
|
|
4900
4900
|
}), await Promise.all(Array.from(r.entries(), async ([a, { code: c }]) => await F(t + a, c)));
|
|
4901
4901
|
}
|
|
4902
|
-
const
|
|
4903
|
-
function
|
|
4902
|
+
const Dc = 'window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a', ki = ")=>{", Rc = '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)';
|
|
4903
|
+
function Mc(e) {
|
|
4904
4904
|
if (e.length === 0)
|
|
4905
|
-
return
|
|
4905
|
+
return ki;
|
|
4906
4906
|
const t = [];
|
|
4907
4907
|
for (const s of e) {
|
|
4908
4908
|
if (s.in.includes("*")) {
|
|
@@ -4913,20 +4913,20 @@ function Jc(e) {
|
|
|
4913
4913
|
throw Error(b(H, `CDN entrypoint path must not start with '.' or '/'. Found: ${s.out}`));
|
|
4914
4914
|
t.push(s.out);
|
|
4915
4915
|
}
|
|
4916
|
-
return `,i=(a.importMap??={}).imports??={},p="${J().name}/",j=".js"${
|
|
4916
|
+
return `,i=(a.importMap??={}).imports??={},p="${J().name}/",j=".js"${ki}"${t.join(",")}".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));`;
|
|
4917
4917
|
}
|
|
4918
4918
|
function Gn(e, t) {
|
|
4919
4919
|
const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
|
|
4920
4920
|
let c = 0;
|
|
4921
|
-
const l = e.code.matchAll(
|
|
4921
|
+
const l = e.code.matchAll(Oc);
|
|
4922
4922
|
for (const w of l) {
|
|
4923
|
-
const [
|
|
4923
|
+
const [T, L, N, j, R] = w, z = R.startsWith(_e);
|
|
4924
4924
|
if (c !== 0 && c !== w.index) {
|
|
4925
4925
|
const K = e.code.slice(c, w.index);
|
|
4926
4926
|
s.push(K), a.push([c, K.length, 0, ""]);
|
|
4927
4927
|
}
|
|
4928
|
-
if (c = w.index +
|
|
4929
|
-
a.push([w.index,
|
|
4928
|
+
if (c = w.index + T.length, z)
|
|
4929
|
+
a.push([w.index, T.length, 0, ""]), n.push(`"${Xn(R.slice(_e.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? N ?? j ?? "");
|
|
4930
4930
|
else {
|
|
4931
4931
|
const K = Vn(R, t), X = K?.isAsync === !0;
|
|
4932
4932
|
if (L !== void 0) {
|
|
@@ -4946,7 +4946,7 @@ function Gn(e, t) {
|
|
|
4946
4946
|
throw Error(
|
|
4947
4947
|
b(
|
|
4948
4948
|
H,
|
|
4949
|
-
`Expected local import specifiers to use only named or side-effect import syntax. Found ${
|
|
4949
|
+
`Expected local import specifiers to use only named or side-effect import syntax. Found ${T}`
|
|
4950
4950
|
)
|
|
4951
4951
|
);
|
|
4952
4952
|
r.add(j ?? N);
|
|
@@ -4954,41 +4954,41 @@ function Gn(e, t) {
|
|
|
4954
4954
|
}
|
|
4955
4955
|
}
|
|
4956
4956
|
if (e.isAsync = a.length > 0, !e.isAsync) {
|
|
4957
|
-
e.code =
|
|
4957
|
+
e.code = Ii(e.code, t);
|
|
4958
4958
|
return;
|
|
4959
4959
|
}
|
|
4960
|
-
const d =
|
|
4960
|
+
const d = Bc(r);
|
|
4961
4961
|
let p = e.code.slice(0, c);
|
|
4962
4962
|
for (let w = a.length - 1; w >= 0; w--) {
|
|
4963
|
-
const [
|
|
4963
|
+
const [T, L, N, j] = a[w];
|
|
4964
4964
|
let R = L, z = "";
|
|
4965
4965
|
if (L === 0) {
|
|
4966
4966
|
const X = d();
|
|
4967
4967
|
n.push(X), z = ` ${X} from`, j !== "" ? (R = N + 4, i.push(j)) : i.push("");
|
|
4968
4968
|
}
|
|
4969
|
-
p = p.slice(0,
|
|
4969
|
+
p = p.slice(0, T) + z + p.slice(T + R);
|
|
4970
4970
|
}
|
|
4971
|
-
const m =
|
|
4971
|
+
const m = Jc.exec(e.code), f = m?.index ?? e.code.length;
|
|
4972
4972
|
let y = "";
|
|
4973
4973
|
if (m !== null) {
|
|
4974
4974
|
const w = m[1].split(",");
|
|
4975
4975
|
if (w.length > 1)
|
|
4976
|
-
y = `return{${w.map((
|
|
4977
|
-
const [L, N = L] =
|
|
4976
|
+
y = `return{${w.map((T) => {
|
|
4977
|
+
const [L, N = L] = T.split(" as ");
|
|
4978
4978
|
return `${N}:${L}`;
|
|
4979
4979
|
}).join(",")}}`;
|
|
4980
4980
|
else {
|
|
4981
|
-
const [
|
|
4982
|
-
e.oldSingleExportName = L, y = `return ${
|
|
4981
|
+
const [T, L = T] = w[0].split(" as ");
|
|
4982
|
+
e.oldSingleExportName = L, y = `return ${T}`;
|
|
4983
4983
|
}
|
|
4984
4984
|
}
|
|
4985
|
-
const h = i.findLastIndex((w) => w.length > 0), g = i.slice(0, h + 1).join(","), S = `export default $arcgis.t(${i.length === 0 ? "_" : `([${g}])`}=>{`,
|
|
4986
|
-
let
|
|
4987
|
-
|
|
4988
|
-
const x = `${p}${S}${
|
|
4985
|
+
const h = i.findLastIndex((w) => w.length > 0), g = i.slice(0, h + 1).join(","), S = `export default $arcgis.t(${i.length === 0 ? "_" : `([${g}])`}=>{`, E = n.join(","), $ = `${y}},${E})`;
|
|
4986
|
+
let I = e.code.slice(c, f);
|
|
4987
|
+
I = `${s.join("")}${I}`, I = Ii(I, t);
|
|
4988
|
+
const x = `${p}${S}${I}${$}`;
|
|
4989
4989
|
e.code = x;
|
|
4990
4990
|
}
|
|
4991
|
-
const
|
|
4991
|
+
const Oc = /import(?:(\{[^}]+\})from|\*as (\w+) from| ([\w$]+) from)?"([^"]+)";/gu, Jc = /export\{([^}]+)\};\n$/u, _e = "@arcgis/core/";
|
|
4992
4992
|
function Vn(e, t) {
|
|
4993
4993
|
if (!e.startsWith("./"))
|
|
4994
4994
|
return;
|
|
@@ -4999,8 +4999,8 @@ function Vn(e, t) {
|
|
|
4999
4999
|
throw Error(b(H, `Failed to infer whether the ${e} module has top-level await`));
|
|
5000
5000
|
return n;
|
|
5001
5001
|
}
|
|
5002
|
-
function
|
|
5003
|
-
return e.replaceAll(
|
|
5002
|
+
function Ii(e, t) {
|
|
5003
|
+
return e.replaceAll(Kc, (i, n) => {
|
|
5004
5004
|
if (n.startsWith(_e))
|
|
5005
5005
|
return `$arcgis.t(m=>m[0],"${Xn(n.slice(_e.length))}")`;
|
|
5006
5006
|
if (n.startsWith("./")) {
|
|
@@ -5011,28 +5011,28 @@ function ki(e, t) {
|
|
|
5011
5011
|
return i;
|
|
5012
5012
|
});
|
|
5013
5013
|
}
|
|
5014
|
-
const
|
|
5015
|
-
function
|
|
5014
|
+
const Kc = /(?<![.\w\d])import\("([^"]+)"\)/gu, Xn = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
|
|
5015
|
+
function Bc(e) {
|
|
5016
5016
|
const t = [Qn];
|
|
5017
5017
|
return () => {
|
|
5018
5018
|
for (; ; ) {
|
|
5019
|
-
const i =
|
|
5020
|
-
if (
|
|
5019
|
+
const i = Hc(t);
|
|
5020
|
+
if (zc(t), !e.has(i))
|
|
5021
5021
|
return e.add(i), i;
|
|
5022
5022
|
}
|
|
5023
5023
|
};
|
|
5024
5024
|
}
|
|
5025
|
-
const Qn = 0, Rt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Zn = `${Rt}0123456789`,
|
|
5026
|
-
function
|
|
5025
|
+
const Qn = 0, Rt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Zn = `${Rt}0123456789`, Wc = Rt.length, _c = Zn.length;
|
|
5026
|
+
function Hc(e) {
|
|
5027
5027
|
let t = Rt[e[0]];
|
|
5028
5028
|
for (let i = 1; i < e.length; i++)
|
|
5029
5029
|
t += Zn[e[i]];
|
|
5030
5030
|
return t;
|
|
5031
5031
|
}
|
|
5032
|
-
function
|
|
5032
|
+
function zc(e) {
|
|
5033
5033
|
let t = e.length - 1;
|
|
5034
5034
|
for (; t >= 0; ) {
|
|
5035
|
-
const i = t === 0 ?
|
|
5035
|
+
const i = t === 0 ? Wc : _c;
|
|
5036
5036
|
if (e[t] += 1, e[t] >= i)
|
|
5037
5037
|
e[t] = 0, t--;
|
|
5038
5038
|
else
|
|
@@ -5040,7 +5040,7 @@ function Uc(e) {
|
|
|
5040
5040
|
}
|
|
5041
5041
|
e = new Array(e.length + 1).fill(Qn);
|
|
5042
5042
|
}
|
|
5043
|
-
async function
|
|
5043
|
+
async function qc(e, t, i, n) {
|
|
5044
5044
|
const s = t.packageName, r = await He(s), { hasCss: a, cdnName: c } = await Yn(u.join(r, "dist")) ?? {};
|
|
5045
5045
|
if (i === "cdn") {
|
|
5046
5046
|
const m = await ze(r), f = t.cdnUrl ?? Ve(m, !0);
|
|
@@ -5078,7 +5078,7 @@ async function Gc(e, t, i, n) {
|
|
|
5078
5078
|
...d,
|
|
5079
5079
|
`import { defineCustomElements as defineCustomElements$${n} } from "${p}";`,
|
|
5080
5080
|
`defineCustomElements$${n}(globalThis.window, {`,
|
|
5081
|
-
` resourcesUrl: "${
|
|
5081
|
+
` resourcesUrl: "${It(e, r)}/dist/${c}/",`,
|
|
5082
5082
|
"});"
|
|
5083
5083
|
]
|
|
5084
5084
|
}
|
|
@@ -5099,7 +5099,7 @@ async function Li(e, t) {
|
|
|
5099
5099
|
cdnName: t
|
|
5100
5100
|
} : void 0;
|
|
5101
5101
|
}
|
|
5102
|
-
async function
|
|
5102
|
+
async function Uc(e, t, i, n) {
|
|
5103
5103
|
const s = t.packageName, r = await He(s), a = await ze(r), c = await Yn(u.join(r, "dist"));
|
|
5104
5104
|
if (i === "cdn") {
|
|
5105
5105
|
const y = a.exports?.[`./${Ee}.css`] === void 0, h = y ? c.cdnName : Un;
|
|
@@ -5111,7 +5111,7 @@ async function Vc(e, t, i, n) {
|
|
|
5111
5111
|
}
|
|
5112
5112
|
};
|
|
5113
5113
|
}
|
|
5114
|
-
const l = c?.cdnName ?? Dt, d =
|
|
5114
|
+
const l = c?.cdnName ?? Dt, d = Gc(a), p = `${s}/${u.normalize(d)}${Y}`, m = [
|
|
5115
5115
|
`import styles$${n} from "${p}";`,
|
|
5116
5116
|
`document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
|
|
5117
5117
|
], f = `${s}/loader`;
|
|
@@ -5125,12 +5125,12 @@ async function Vc(e, t, i, n) {
|
|
|
5125
5125
|
...m,
|
|
5126
5126
|
`import { defineCustomElements as defineCustomElements$${n} } from "${f}";`,
|
|
5127
5127
|
`defineCustomElements$${n}({`,
|
|
5128
|
-
` resourcesUrl: "${
|
|
5128
|
+
` resourcesUrl: "${It(e, r)}/dist/${l}/",`,
|
|
5129
5129
|
"});"
|
|
5130
5130
|
]
|
|
5131
5131
|
};
|
|
5132
5132
|
}
|
|
5133
|
-
function
|
|
5133
|
+
function Gc(e) {
|
|
5134
5134
|
const { exports: t } = e;
|
|
5135
5135
|
if (t === void 0)
|
|
5136
5136
|
throw new Error(
|
|
@@ -5140,21 +5140,20 @@ function Xc(e) {
|
|
|
5140
5140
|
return n ? n[0] : i.length > 0 ? i[0][0] : `./${Ee}.css`;
|
|
5141
5141
|
}
|
|
5142
5142
|
async function Ce(e) {
|
|
5143
|
-
return e._loadersCache ??=
|
|
5143
|
+
return e._loadersCache ??= Vc(e), await e._loadersCache;
|
|
5144
5144
|
}
|
|
5145
|
-
async function
|
|
5145
|
+
async function Vc(e) {
|
|
5146
5146
|
const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", i = e.viteConfig.base, n = async (c) => (await Promise.all(
|
|
5147
5147
|
c.map(
|
|
5148
|
-
async (l, d) => l.type === "stencil" ? await
|
|
5148
|
+
async (l, d) => l.type === "stencil" ? await qc(i, l, t, d) : l.type === "@arcgis/lumina" ? await Uc(i, l, t, d) : void 0
|
|
5149
5149
|
)
|
|
5150
5150
|
)).filter(D).flat(), s = await Promise.all([
|
|
5151
5151
|
// This may contain an import map so must be first
|
|
5152
|
-
|
|
5152
|
+
Ic(i, t),
|
|
5153
5153
|
we.then(n),
|
|
5154
|
-
|
|
5154
|
+
es(e).then(n)
|
|
5155
5155
|
]), r = u.join(e.dir.src, "loader.ts");
|
|
5156
5156
|
return [
|
|
5157
|
-
...e.viteCommand === "serve" ? [es] : [],
|
|
5158
5157
|
...s.flat(),
|
|
5159
5158
|
{
|
|
5160
5159
|
optimizableImports: [
|
|
@@ -5171,18 +5170,7 @@ async function Qc(e) {
|
|
|
5171
5170
|
}
|
|
5172
5171
|
];
|
|
5173
5172
|
}
|
|
5174
|
-
|
|
5175
|
-
optimizableImports: [],
|
|
5176
|
-
// Disable this warning to reduce noise in the console
|
|
5177
|
-
// See https://github.com/lit/lit/issues/4877
|
|
5178
|
-
javascriptCode: [
|
|
5179
|
-
"globalThis.litIssuedWarnings ??= new Set();",
|
|
5180
|
-
"globalThis.litIssuedWarnings.add(",
|
|
5181
|
-
'"Lit is in dev mode. Not recommended for production! See https://lit.dev/msg/dev-mode for more information.",',
|
|
5182
|
-
");"
|
|
5183
|
-
]
|
|
5184
|
-
};
|
|
5185
|
-
async function ts(e) {
|
|
5173
|
+
async function es(e) {
|
|
5186
5174
|
const t = e.options?.serve?.extraDependencies ?? [];
|
|
5187
5175
|
return t.length === 0 ? [] : (e._serveOnlyDependencies ??= Promise.all(
|
|
5188
5176
|
t.map(async (i) => {
|
|
@@ -5201,9 +5189,8 @@ async function ts(e) {
|
|
|
5201
5189
|
})
|
|
5202
5190
|
).then((i) => i.filter(D)), await e._serveOnlyDependencies);
|
|
5203
5191
|
}
|
|
5204
|
-
const
|
|
5205
|
-
|
|
5206
|
-
async function Yc(e) {
|
|
5192
|
+
const ts = "/@arcgis/lumina-compiler/testSetupFile", lt = [ts];
|
|
5193
|
+
async function Xc(e) {
|
|
5207
5194
|
if (!e.viteConfig.test?.browser?.enabled)
|
|
5208
5195
|
return Fi(e);
|
|
5209
5196
|
const i = (await Ce(e)).map((n, s) => {
|
|
@@ -5231,12 +5218,12 @@ async function Yc(e) {
|
|
|
5231
5218
|
`);
|
|
5232
5219
|
return [Fi(e), i].join("");
|
|
5233
5220
|
}
|
|
5234
|
-
const Fi = (e) => [e.isInPuppeteerTestBackEnd ?
|
|
5221
|
+
const Fi = (e) => [e.isInPuppeteerTestBackEnd ? Qc : "", Zc].join(""), Qc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
|
|
5235
5222
|
setupPuppeteerTest();
|
|
5236
|
-
`,
|
|
5223
|
+
`, Zc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
|
|
5237
5224
|
setupLuminaTest();
|
|
5238
5225
|
`;
|
|
5239
|
-
function
|
|
5226
|
+
function Yc(e) {
|
|
5240
5227
|
let t = !0, i = !1, n, s, r, a, c;
|
|
5241
5228
|
const l = "@arcgis/lumina:generateVirtualFiles", d = {
|
|
5242
5229
|
name: l,
|
|
@@ -5246,20 +5233,20 @@ function il(e) {
|
|
|
5246
5233
|
},
|
|
5247
5234
|
resolveId: (h) => h === a || h === c ? a : void 0,
|
|
5248
5235
|
async load(h) {
|
|
5249
|
-
const g = h.startsWith(
|
|
5250
|
-
if (!(!h.endsWith(".tsx") && h !== a && !g
|
|
5236
|
+
const g = h.startsWith(ts);
|
|
5237
|
+
if (!(!h.endsWith(".tsx") && h !== a && !g)) {
|
|
5251
5238
|
if (s === void 0 && !e.isInPuppeteerTestBackEnd) {
|
|
5252
|
-
r === void 0 && clearTimeout(n), r ??=
|
|
5253
|
-
throw i = !0,
|
|
5239
|
+
r === void 0 && clearTimeout(n), r ??= Zo(e, t).catch((S) => {
|
|
5240
|
+
throw i = !0, S;
|
|
5254
5241
|
}), t = !1;
|
|
5255
|
-
const
|
|
5256
|
-
s ??=
|
|
5242
|
+
const v = await r;
|
|
5243
|
+
s ??= v;
|
|
5257
5244
|
}
|
|
5258
|
-
return h === a ?
|
|
5245
|
+
return h === a ? Bo(e) : g ? await Xc(e) : void 0;
|
|
5259
5246
|
}
|
|
5260
5247
|
},
|
|
5261
5248
|
async writeBundle() {
|
|
5262
|
-
e.isInStorybook || await F(u.join(e.dir.dist, "loader.d.ts"),
|
|
5249
|
+
e.isInStorybook || await F(u.join(e.dir.dist, "loader.d.ts"), Wo);
|
|
5263
5250
|
},
|
|
5264
5251
|
async handleHotUpdate({ file: h, modules: g, read: v }) {
|
|
5265
5252
|
const S = await p(h, v);
|
|
@@ -5282,7 +5269,7 @@ function il(e) {
|
|
|
5282
5269
|
(S) => S.length > 0 ? m() : void 0
|
|
5283
5270
|
) : void 0
|
|
5284
5271
|
), h.watcher.on("unlinkDir", (v) => {
|
|
5285
|
-
e.componentFiles.some((
|
|
5272
|
+
e.componentFiles.some((E) => E.startsWith(v)) && m();
|
|
5286
5273
|
});
|
|
5287
5274
|
function g(v) {
|
|
5288
5275
|
Se(v, e.dir.srcComponents) && m();
|
|
@@ -5307,29 +5294,29 @@ function il(e) {
|
|
|
5307
5294
|
if ($ === void 0)
|
|
5308
5295
|
return;
|
|
5309
5296
|
if (!($.text === v)) {
|
|
5310
|
-
let
|
|
5297
|
+
let T;
|
|
5311
5298
|
await Promise.race([
|
|
5312
5299
|
e._typeScriptReload.promise,
|
|
5313
5300
|
new Promise((L) => {
|
|
5314
|
-
|
|
5301
|
+
T = setTimeout(() => {
|
|
5315
5302
|
C.info(
|
|
5316
5303
|
l,
|
|
5317
5304
|
"Timed out waiting for TypeScript to finish type-checking. This may be a bug"
|
|
5318
5305
|
), L(void 0);
|
|
5319
5306
|
}, 1e4);
|
|
5320
5307
|
})
|
|
5321
|
-
]), clearTimeout(
|
|
5308
|
+
]), clearTimeout(T);
|
|
5322
5309
|
}
|
|
5323
5310
|
}
|
|
5324
5311
|
if (!Se(h, e.dir.srcComponents))
|
|
5325
5312
|
return;
|
|
5326
5313
|
v ??= await g();
|
|
5327
|
-
const
|
|
5328
|
-
if (
|
|
5314
|
+
const E = Yo(e, h, v);
|
|
5315
|
+
if (E === void 0)
|
|
5329
5316
|
return !1;
|
|
5330
|
-
for (const $ of
|
|
5331
|
-
const
|
|
5332
|
-
e.server.ws.send({ type: "custom", event: "component-meta-update", data:
|
|
5317
|
+
for (const $ of E) {
|
|
5318
|
+
const I = Sn($);
|
|
5319
|
+
e.server.ws.send({ type: "custom", event: "component-meta-update", data: I });
|
|
5333
5320
|
}
|
|
5334
5321
|
return f(), !0;
|
|
5335
5322
|
}
|
|
@@ -5352,12 +5339,12 @@ function he(e, t, i = Mt) {
|
|
|
5352
5339
|
throw Error(b(St, "serveAssets() is only available when Vite is running in serve mode"));
|
|
5353
5340
|
const n = e._serverConfigured, s = e.server.middlewares.stack.length;
|
|
5354
5341
|
if (t.forEach((r) => {
|
|
5355
|
-
const a =
|
|
5342
|
+
const a = ns(r), c = rs(e.dir, ss(a)), l = tl(e.viteConfig.base, c, e.dir.distCdn);
|
|
5356
5343
|
e.server.middlewares.use(l, (d, p, m) => {
|
|
5357
|
-
const f =
|
|
5344
|
+
const f = il(d.url), y = a.type === "directory" ? u.resolve(a.source, f.slice(1)) : a.source, h = u.join(c, f), g = i.find((v) => v.match(h, e));
|
|
5358
5345
|
return (typeof y == "function" ? Promise.resolve(y()) : O(y)).then((v) => {
|
|
5359
5346
|
const S = (typeof y == "function" ? void 0 : g?.transform(v.toString("utf8"), h, e)) ?? v;
|
|
5360
|
-
p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type",
|
|
5347
|
+
p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ds.lookup(f) || "application/octet-stream"), p.write(S), p.end();
|
|
5361
5348
|
}).catch((v) => {
|
|
5362
5349
|
(a.type !== "directory" || process.env.DEBUG) && C.warn(
|
|
5363
5350
|
St,
|
|
@@ -5370,16 +5357,16 @@ function he(e, t, i = Mt) {
|
|
|
5370
5357
|
e.server.middlewares.stack.splice(0, 0, ...r);
|
|
5371
5358
|
}
|
|
5372
5359
|
}
|
|
5373
|
-
async function
|
|
5360
|
+
async function is(e, t, i = Mt) {
|
|
5374
5361
|
await Promise.all(
|
|
5375
5362
|
t.map(async (n) => {
|
|
5376
|
-
const s =
|
|
5363
|
+
const s = ns(n), r = rs(e.dir, ss(s));
|
|
5377
5364
|
if (s.type === "directory") {
|
|
5378
5365
|
const a = u.resolve(s.source), l = (await qe(a, { recursive: !0, withFileTypes: !0 })).filter((d) => d.isFile()).map((d) => {
|
|
5379
5366
|
const p = u.resolve(d.parentPath, d.name), m = u.relative(a, p), f = u.join(r, m);
|
|
5380
5367
|
return [p, f];
|
|
5381
5368
|
});
|
|
5382
|
-
await
|
|
5369
|
+
await as(l.map(([d, p]) => p)), await Promise.all(
|
|
5383
5370
|
l.map(
|
|
5384
5371
|
async ([d, p]) => await Ni(d, p, i, e)
|
|
5385
5372
|
)
|
|
@@ -5394,7 +5381,7 @@ async function ss(e, t, i = Mt) {
|
|
|
5394
5381
|
})
|
|
5395
5382
|
);
|
|
5396
5383
|
}
|
|
5397
|
-
const
|
|
5384
|
+
const ns = Wi ? (e) => e : (e) => e.type === "dynamic" ? {
|
|
5398
5385
|
...e,
|
|
5399
5386
|
destination: Fe(e.destination)
|
|
5400
5387
|
} : {
|
|
@@ -5405,13 +5392,13 @@ const rs = Bi ? (e) => e : (e) => e.type === "dynamic" ? {
|
|
|
5405
5392
|
async function Ni(e, t, i, n) {
|
|
5406
5393
|
const s = i.find((r) => r.match(t, n));
|
|
5407
5394
|
if (s === void 0)
|
|
5408
|
-
await
|
|
5395
|
+
await Is(e, t);
|
|
5409
5396
|
else {
|
|
5410
5397
|
const r = await O(e, "utf8"), a = s.transform(r, t, n);
|
|
5411
5398
|
await F(t, a);
|
|
5412
5399
|
}
|
|
5413
5400
|
}
|
|
5414
|
-
function
|
|
5401
|
+
function ss(e) {
|
|
5415
5402
|
if (e.type === "dynamic")
|
|
5416
5403
|
return e.destination;
|
|
5417
5404
|
if (e.source.endsWith(u.sep)) {
|
|
@@ -5426,34 +5413,34 @@ function os(e) {
|
|
|
5426
5413
|
}
|
|
5427
5414
|
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;
|
|
5428
5415
|
}
|
|
5429
|
-
function
|
|
5430
|
-
const n =
|
|
5416
|
+
function rs({ dist: e, distCdnAssets: t }, i) {
|
|
5417
|
+
const n = el(i), s = u.join(
|
|
5431
5418
|
t,
|
|
5432
5419
|
n ? u.relative(t, i) : i
|
|
5433
|
-
), r = u.relative(e, s), a =
|
|
5420
|
+
), r = u.relative(e, s), a = os(r);
|
|
5434
5421
|
return u.join(e, a);
|
|
5435
5422
|
}
|
|
5436
|
-
function
|
|
5423
|
+
function el(e) {
|
|
5437
5424
|
if (e.startsWith(u.sep)) {
|
|
5438
5425
|
const t = _i(), i = t.startsWith(u.sep) ? t.split(u.sep)[1] ?? "" : "";
|
|
5439
5426
|
return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
|
|
5440
5427
|
} else
|
|
5441
|
-
return !!(!
|
|
5428
|
+
return !!(!Wi && u.isAbsolute(e));
|
|
5442
5429
|
}
|
|
5443
|
-
function
|
|
5444
|
-
const n =
|
|
5430
|
+
function tl(e, t, i) {
|
|
5431
|
+
const n = os(u.relative(i, t)), s = n.startsWith("/") ? n.slice(1) : n;
|
|
5445
5432
|
return `${e}${s}`;
|
|
5446
5433
|
}
|
|
5447
|
-
const
|
|
5448
|
-
async function
|
|
5434
|
+
const os = (e) => e.replaceAll("../", ""), il = (e = "") => e.split("?")[0].split("#")[0];
|
|
5435
|
+
async function as(e) {
|
|
5449
5436
|
const t = new Set(e.map(u.dirname));
|
|
5450
5437
|
await Promise.all(Array.from(t, async (i) => await _(i, { recursive: !0 })));
|
|
5451
5438
|
}
|
|
5452
|
-
const
|
|
5439
|
+
const nl = {
|
|
5453
5440
|
match: (e, t) => t.environment === "production" && e.endsWith(".json"),
|
|
5454
5441
|
transform: (e) => JSON.stringify(JSON.parse(e))
|
|
5455
|
-
}, Mt = [
|
|
5456
|
-
function
|
|
5442
|
+
}, Mt = [nl];
|
|
5443
|
+
function sl(e) {
|
|
5457
5444
|
let t;
|
|
5458
5445
|
const i = () => [
|
|
5459
5446
|
...e.options.assets?.transformers ?? [],
|
|
@@ -5462,36 +5449,36 @@ function al(e) {
|
|
|
5462
5449
|
return {
|
|
5463
5450
|
name: "@arcgis/lumina:handleStaticAssets",
|
|
5464
5451
|
configResolved() {
|
|
5465
|
-
t =
|
|
5452
|
+
t = rl(e);
|
|
5466
5453
|
},
|
|
5467
5454
|
async configureServer(n) {
|
|
5468
5455
|
e.server = n, !e.isInPuppeteerTestBackEnd && (he(e, await t, i()), n.watcher.on("addDir", (s) => {
|
|
5469
5456
|
if (s.endsWith("assets")) {
|
|
5470
5457
|
const r = u.dirname(s);
|
|
5471
|
-
u.join(r, "/") === e.dir.root ? he(e, [
|
|
5458
|
+
u.join(r, "/") === e.dir.root ? he(e, [ls], i()) : s.startsWith(e.dir.srcComponents) && he(e, [cs(s, r)], i());
|
|
5472
5459
|
}
|
|
5473
5460
|
}));
|
|
5474
5461
|
},
|
|
5475
5462
|
async writeBundle() {
|
|
5476
|
-
await
|
|
5463
|
+
await is(e, await t, i());
|
|
5477
5464
|
}
|
|
5478
5465
|
};
|
|
5479
5466
|
}
|
|
5480
|
-
async function
|
|
5467
|
+
async function rl(e) {
|
|
5481
5468
|
const t = G("assets"), i = await e.componentFilesPromise, n = await Promise.all(
|
|
5482
5469
|
i.map(async (s) => {
|
|
5483
5470
|
const r = u.dirname(s), a = u.join(r, "assets");
|
|
5484
|
-
return await G(a) ?
|
|
5471
|
+
return await G(a) ? cs(a, r) : void 0;
|
|
5485
5472
|
})
|
|
5486
5473
|
);
|
|
5487
|
-
return await t && n.push(
|
|
5474
|
+
return await t && n.push(ls), n.filter(D);
|
|
5488
5475
|
}
|
|
5489
|
-
const
|
|
5476
|
+
const cs = (e, t) => ({
|
|
5490
5477
|
type: "directory",
|
|
5491
5478
|
source: e,
|
|
5492
5479
|
destination: u.basename(t)
|
|
5493
|
-
}),
|
|
5494
|
-
function
|
|
5480
|
+
}), ls = { type: "directory", source: "assets/", destination: "" };
|
|
5481
|
+
function ol(e) {
|
|
5495
5482
|
const { stencilCompatibility: t } = e.options.build?.ssr ?? {};
|
|
5496
5483
|
if (t?.enabled === !0)
|
|
5497
5484
|
return {
|
|
@@ -5543,7 +5530,7 @@ export * from "@arcgis/lumina/stencilSsrCompatibility";`;
|
|
|
5543
5530
|
}
|
|
5544
5531
|
};
|
|
5545
5532
|
}
|
|
5546
|
-
const dt = "@arcgis/lumina:printTotalBuildSize",
|
|
5533
|
+
const dt = "@arcgis/lumina:printTotalBuildSize", al = (e) => ({
|
|
5547
5534
|
name: dt,
|
|
5548
5535
|
apply: () => e.viteCommand === "build",
|
|
5549
5536
|
configResolved(t) {
|
|
@@ -5560,10 +5547,10 @@ const dt = "@arcgis/lumina:printTotalBuildSize", dl = (e) => ({
|
|
|
5560
5547
|
const m = console.log;
|
|
5561
5548
|
console.log = function(...y) {
|
|
5562
5549
|
if (m.apply(console, y), y.length === 1 && typeof y[0] == "string") {
|
|
5563
|
-
const [h, g] = y[0].match(
|
|
5550
|
+
const [h, g] = y[0].match(ll) ?? [];
|
|
5564
5551
|
if (!h)
|
|
5565
5552
|
return;
|
|
5566
|
-
p || (p = y[0].slice(0, y[0].indexOf(h) + h.length).replaceAll(
|
|
5553
|
+
p || (p = y[0].slice(0, y[0].indexOf(h) + h.length).replaceAll(dl, "").length);
|
|
5567
5554
|
const v = Number.parseFloat(h.replace(" kB", "").replaceAll(",", ""));
|
|
5568
5555
|
g ? (d += Number.parseFloat(g.replace(" kB", "").replaceAll(",", "")), l += v) : c += v;
|
|
5569
5556
|
}
|
|
@@ -5579,7 +5566,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", dl = (e) => ({
|
|
|
5579
5566
|
[
|
|
5580
5567
|
Di,
|
|
5581
5568
|
g,
|
|
5582
|
-
|
|
5569
|
+
cl,
|
|
5583
5570
|
"*",
|
|
5584
5571
|
" ".repeat(p - `${g}*`.length - h.length),
|
|
5585
5572
|
h,
|
|
@@ -5590,10 +5577,10 @@ const dt = "@arcgis/lumina:printTotalBuildSize", dl = (e) => ({
|
|
|
5590
5577
|
}
|
|
5591
5578
|
};
|
|
5592
5579
|
}
|
|
5593
|
-
}), ji = "\x1B[22m\x1B[1m\x1B[22m", Di = "\x1B[2m",
|
|
5580
|
+
}), ji = "\x1B[22m\x1B[1m\x1B[22m", Di = "\x1B[2m", cl = "\x1B[22m\x1B[36m", ll = /\d+(?:,\d+)?\.\d{2} kB/gu, dl = /\x1B\[\d+m/gu, pl = new Intl.NumberFormat("en", {
|
|
5594
5581
|
maximumFractionDigits: 2,
|
|
5595
5582
|
minimumFractionDigits: 2
|
|
5596
|
-
}), Ri = (e) => `${
|
|
5583
|
+
}), Ri = (e) => `${pl.format(e)} kB`, Mi = "@arcgis/lumina:configureVite", ul = (e) => ({
|
|
5597
5584
|
name: Mi,
|
|
5598
5585
|
async config({
|
|
5599
5586
|
server: t,
|
|
@@ -5610,10 +5597,10 @@ const dt = "@arcgis/lumina:printTotalBuildSize", dl = (e) => ({
|
|
|
5610
5597
|
*/
|
|
5611
5598
|
loader: "src/loader.ts",
|
|
5612
5599
|
// Entrypoint for bundling used components only:
|
|
5613
|
-
...await
|
|
5600
|
+
...await Vr(e)
|
|
5614
5601
|
}, { loader: h, ...g } = y, v = e.environment === "development" || e.isInTest ? {
|
|
5615
5602
|
"process.env.ESRI_INTERNAL": "true"
|
|
5616
|
-
} : void 0, S = !import.meta.url.includes("node_modules"),
|
|
5603
|
+
} : void 0, S = !import.meta.url.includes("node_modules"), E = {
|
|
5617
5604
|
/**
|
|
5618
5605
|
* Dependency pre-bundling by default scouts all index.html files to find
|
|
5619
5606
|
* what dependencies are used. Since Lumina adds imports to index.html
|
|
@@ -5677,7 +5664,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", dl = (e) => ({
|
|
|
5677
5664
|
*/
|
|
5678
5665
|
forceRerunTriggers: f === void 0 ? ["**/*.{ts,tsx}"] : void 0
|
|
5679
5666
|
},
|
|
5680
|
-
optimizeDeps:
|
|
5667
|
+
optimizeDeps: E,
|
|
5681
5668
|
define: v
|
|
5682
5669
|
};
|
|
5683
5670
|
}
|
|
@@ -5707,7 +5694,7 @@ const dt = "@arcgis/lumina:printTotalBuildSize", dl = (e) => ({
|
|
|
5707
5694
|
}
|
|
5708
5695
|
}
|
|
5709
5696
|
},
|
|
5710
|
-
optimizeDeps:
|
|
5697
|
+
optimizeDeps: E,
|
|
5711
5698
|
define: v,
|
|
5712
5699
|
test: {
|
|
5713
5700
|
/*
|
|
@@ -5718,23 +5705,23 @@ const dt = "@arcgis/lumina:printTotalBuildSize", dl = (e) => ({
|
|
|
5718
5705
|
browser: {
|
|
5719
5706
|
enabled: e.isInPuppeteerTestFrontEnd ? !1 : p?.enabled ?? !0,
|
|
5720
5707
|
instances: p?.instances === void 0 ? [{ browser: "chromium" }] : void 0,
|
|
5721
|
-
provider: p?.provider ??
|
|
5708
|
+
provider: p?.provider ?? Os
|
|
5722
5709
|
}
|
|
5723
5710
|
}
|
|
5724
5711
|
};
|
|
5725
5712
|
}
|
|
5726
|
-
}),
|
|
5713
|
+
}), ml = (e) => ({
|
|
5727
5714
|
name: "@arcgis/lumina:setAssetPath",
|
|
5728
5715
|
apply: () => e.viteCommand === "build",
|
|
5729
5716
|
config: (t) => ({
|
|
5730
5717
|
base: t.base ?? e.options.assets?.defaultPath ?? Ve()
|
|
5731
5718
|
})
|
|
5732
5719
|
});
|
|
5733
|
-
function
|
|
5720
|
+
function fl(e = J()) {
|
|
5734
5721
|
const t = e.version ?? "0.0.1";
|
|
5735
|
-
return
|
|
5722
|
+
return xs(t);
|
|
5736
5723
|
}
|
|
5737
|
-
const
|
|
5724
|
+
const yl = (e) => `/*! ${e} */`, A = (e) => (t, i) => {
|
|
5738
5725
|
Object.defineProperty(t, i, {
|
|
5739
5726
|
get() {
|
|
5740
5727
|
throw Error(
|
|
@@ -5773,8 +5760,8 @@ const me = {
|
|
|
5773
5760
|
apiJson: "docs/api.json",
|
|
5774
5761
|
stencilLikeDocsJson: "docs/docs.json"
|
|
5775
5762
|
};
|
|
5776
|
-
async function
|
|
5777
|
-
const r =
|
|
5763
|
+
async function ds(e, t, i, n, s = J()) {
|
|
5764
|
+
const r = hl(e, i, n, s), a = u.join(t, "lumina.ts");
|
|
5778
5765
|
if ((await G(a) ? await O(a, "utf8") : "") === r)
|
|
5779
5766
|
return !1;
|
|
5780
5767
|
if (process.env.CI)
|
|
@@ -5786,7 +5773,7 @@ async function us(e, t, i, n, s = J()) {
|
|
|
5786
5773
|
);
|
|
5787
5774
|
return qi(a, r), !0;
|
|
5788
5775
|
}
|
|
5789
|
-
function
|
|
5776
|
+
function hl(e, t, i, n = J()) {
|
|
5790
5777
|
"@arcgis/components-controllers" in (n.dependencies ?? {}) && C.warn(
|
|
5791
5778
|
"@arcgis/components-controllers",
|
|
5792
5779
|
"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."
|
|
@@ -5801,11 +5788,11 @@ declare module "@arcgis/lumina" {
|
|
|
5801
5788
|
interface ImportStencilElements extends ${r.map((m, f) => `JSX$${f}.IntrinsicElements`).join(", ")} {}
|
|
5802
5789
|
}`, l = n.devDependencies ?? {}, d = i === "preview" ? "matchers" : i === "webdriverio" ? "webdriverio" : "playwright";
|
|
5803
5790
|
return [
|
|
5804
|
-
|
|
5791
|
+
gl,
|
|
5805
5792
|
// Avoid cyclic references for tests in @arcgis/lumina
|
|
5806
5793
|
n.name === "@arcgis/lumina" ? "" : `
|
|
5807
5794
|
/// <reference types="@arcgis/lumina/typings" />`,
|
|
5808
|
-
t ?
|
|
5795
|
+
t ? vl : "",
|
|
5809
5796
|
l.vitest ? `
|
|
5810
5797
|
/// <reference types="vitest/config" />` : "",
|
|
5811
5798
|
l["@vitest/browser"] ? `
|
|
@@ -5819,7 +5806,7 @@ declare module "@arcgis/lumina" {
|
|
|
5819
5806
|
`
|
|
5820
5807
|
].join("");
|
|
5821
5808
|
}
|
|
5822
|
-
const
|
|
5809
|
+
const gl = `/**
|
|
5823
5810
|
* This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
|
|
5824
5811
|
* Manual edits will be overwritten.
|
|
5825
5812
|
*
|
|
@@ -5827,8 +5814,8 @@ const wl = `/**
|
|
|
5827
5814
|
* as well as @arcgis/core typings if you use @arcgis/core.
|
|
5828
5815
|
*
|
|
5829
5816
|
* If you need to provide additional typings, create a separate file.
|
|
5830
|
-
*/`,
|
|
5831
|
-
/// <reference types="@arcgis/core/interfaces" />`, Re = "@arcgis/lumina:dependencySupport",
|
|
5817
|
+
*/`, vl = `
|
|
5818
|
+
/// <reference types="@arcgis/core/interfaces" />`, Re = "@arcgis/lumina:dependencySupport", ps = (e, t) => e.viteCommand === "serve" && /**
|
|
5832
5819
|
* Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
|
|
5833
5820
|
* However, it is a bit buggy (see
|
|
5834
5821
|
* https://github.com/vitejs/vite/issues/19213). Instead, we are using test
|
|
@@ -5839,10 +5826,10 @@ const wl = `/**
|
|
|
5839
5826
|
* is doing:
|
|
5840
5827
|
* https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
|
|
5841
5828
|
*/
|
|
5842
|
-
e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0,
|
|
5829
|
+
e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, Sl = (e) => ({
|
|
5843
5830
|
name: Re,
|
|
5844
5831
|
configResolved() {
|
|
5845
|
-
!e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise =
|
|
5832
|
+
!e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = wl(e).catch(
|
|
5846
5833
|
(t) => C.error(Re, `Failed to update package's src/lumina.ts:${String(t)}`)
|
|
5847
5834
|
));
|
|
5848
5835
|
},
|
|
@@ -5850,7 +5837,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
|
|
|
5850
5837
|
// Add imports to index.html before Vite starts resolving imports
|
|
5851
5838
|
order: "pre",
|
|
5852
5839
|
async handler(t, i) {
|
|
5853
|
-
return
|
|
5840
|
+
return ps(e, i) ? (await Ce(e)).map(
|
|
5854
5841
|
(s) => "javascriptCode" in s ? {
|
|
5855
5842
|
tag: "script",
|
|
5856
5843
|
attrs: {
|
|
@@ -5890,9 +5877,9 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
|
|
|
5890
5877
|
await e._updateLuminaTsPromise;
|
|
5891
5878
|
}
|
|
5892
5879
|
});
|
|
5893
|
-
async function
|
|
5894
|
-
const i = (await Promise.all([we,
|
|
5895
|
-
if (!await
|
|
5880
|
+
async function wl(e) {
|
|
5881
|
+
const i = (await Promise.all([we, es(e)])).flat();
|
|
5882
|
+
if (!await ds(
|
|
5896
5883
|
i,
|
|
5897
5884
|
e.dir.src,
|
|
5898
5885
|
U,
|
|
@@ -5901,22 +5888,22 @@ async function El(e) {
|
|
|
5901
5888
|
return;
|
|
5902
5889
|
let s = !1;
|
|
5903
5890
|
function r() {
|
|
5904
|
-
s || C.warn(Re,
|
|
5891
|
+
s || C.warn(Re, bl), s = !0;
|
|
5905
5892
|
}
|
|
5906
5893
|
process.on("exit", () => {
|
|
5907
5894
|
r(), clearTimeout(c);
|
|
5908
5895
|
});
|
|
5909
5896
|
const c = setTimeout(r, 2e3);
|
|
5910
5897
|
}
|
|
5911
|
-
const
|
|
5898
|
+
const bl = Rs.greenBright(
|
|
5912
5899
|
`lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
|
|
5913
5900
|
If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
|
|
5914
5901
|
);
|
|
5915
|
-
async function
|
|
5902
|
+
async function Tl(e, t) {
|
|
5916
5903
|
const i = /* @__PURE__ */ new Map();
|
|
5917
5904
|
await Promise.all(
|
|
5918
5905
|
e.map(async (s) => {
|
|
5919
|
-
const r = await O(s, "utf-8"), a = r.match(
|
|
5906
|
+
const r = await O(s, "utf-8"), a = r.match(El)?.[1];
|
|
5920
5907
|
if (a === void 0) {
|
|
5921
5908
|
C.warn(
|
|
5922
5909
|
"@arcgis/lumina:parseStoryFiles",
|
|
@@ -5928,14 +5915,14 @@ async function $l(e, t) {
|
|
|
5928
5915
|
let c = i.get(a);
|
|
5929
5916
|
c === void 0 && (c = [], i.set(a, c));
|
|
5930
5917
|
const l = [];
|
|
5931
|
-
for (const d of r.matchAll(
|
|
5932
|
-
const p = d[1], m =
|
|
5918
|
+
for (const d of r.matchAll(Cl)) {
|
|
5919
|
+
const p = d[1], m = Al(p), f = r.indexOf("{", d.index), y = r.indexOf("}", f), h = r.slice(0, d.index).trimEnd();
|
|
5933
5920
|
let g = "";
|
|
5934
5921
|
if (h.endsWith("*/")) {
|
|
5935
|
-
const
|
|
5936
|
-
g = h.slice(
|
|
5922
|
+
const E = h.lastIndexOf("/**");
|
|
5923
|
+
g = h.slice(E + 3, -2).trim().replaceAll(xl, "");
|
|
5937
5924
|
}
|
|
5938
|
-
const v = r.slice(f, y).match(
|
|
5925
|
+
const v = r.slice(f, y).match($l)?.[1] || m, S = Pl(m);
|
|
5939
5926
|
l.push({
|
|
5940
5927
|
description: `${v}${g ? `
|
|
5941
5928
|
${g}` : ""}`,
|
|
@@ -5960,11 +5947,11 @@ ${g}` : ""}`,
|
|
|
5960
5947
|
}
|
|
5961
5948
|
return n;
|
|
5962
5949
|
}
|
|
5963
|
-
const
|
|
5964
|
-
var
|
|
5950
|
+
const El = /component: ["']([^"']+)["']/u, Cl = /export const (\w+)/gu, $l = /name: ["']([^"']+)["']/u, xl = /^\s*\*\s?/gmu, Pl = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), Al = (e) => e.replace(/_/gu, " ").replace(/-/gu, " ").replace(/\./gu, " ").replace(/([^\n])([A-Z])([a-z])/gu, (t, i, n, s) => `${i} ${n}${s}`).replace(/([a-z])([A-Z])/gu, (t, i, n) => `${i} ${n}`).replace(/([a-z])([0-9])/giu, (t, i, n) => `${i} ${n}`).replace(/([0-9])([a-z])/giu, (t, i, n) => `${i} ${n}`).replace(/(\s|^)(\w)/gu, (t, i, n) => `${i}${n.toUpperCase()}`).replace(/ +/gu, " ").trim();
|
|
5951
|
+
var kl = Object.defineProperty, k = (e, t, i, n) => {
|
|
5965
5952
|
for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
|
|
5966
5953
|
(a = e[r]) && (s = a(t, i, s) || s);
|
|
5967
|
-
return s &&
|
|
5954
|
+
return s && kl(t, i, s), s;
|
|
5968
5955
|
};
|
|
5969
5956
|
const se = "@arcgis/lumina:context";
|
|
5970
5957
|
class P {
|
|
@@ -6005,9 +5992,9 @@ class P {
|
|
|
6005
5992
|
"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."
|
|
6006
5993
|
), 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);
|
|
6007
5994
|
const h = this.options.documentation?.publicStoryUrlPrefix;
|
|
6008
|
-
this.isFullApiExtraction && typeof h == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await
|
|
5995
|
+
this.isFullApiExtraction && typeof h == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await Tl(this.componentStoryFiles, h)).then((g) => {
|
|
6009
5996
|
this.componentStories = g;
|
|
6010
|
-
}) : (this.componentStoriesPromise = void 0, this.componentStories = void 0),
|
|
5997
|
+
}) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), kc(this, s.build.sourcemap !== !1), ps(this) && Ce(this);
|
|
6011
5998
|
}
|
|
6012
5999
|
},
|
|
6013
6000
|
configureServer: {
|
|
@@ -6024,9 +6011,9 @@ class P {
|
|
|
6024
6011
|
webTypes: i.jetBrains === !1 ? void 0 : i.jetBrains?.webTypesFileName ? ue(i.jetBrains.webTypesFileName) : me.webTypes,
|
|
6025
6012
|
vsCodeHtml: i.vsCode === !1 ? void 0 : i.vsCode?.htmlFileName ? ue(i.vsCode.htmlFileName) : me.vsCodeHtml,
|
|
6026
6013
|
vsCodeCss: i.vsCode === !1 ? void 0 : i.vsCode?.cssFileName ? ue(i.vsCode.cssFileName) : me.vsCodeCss
|
|
6027
|
-
}, Tn(), this.componentFilesPromise = Pt(this, u.resolve("src/components")),
|
|
6028
|
-
const n = t.build?.preamble ??
|
|
6029
|
-
this.banner =
|
|
6014
|
+
}, Tn(), this.componentFilesPromise = Pt(this, u.resolve("src/components")), Ac(this);
|
|
6015
|
+
const n = t.build?.preamble ?? fl();
|
|
6016
|
+
this.banner = yl(n);
|
|
6030
6017
|
}
|
|
6031
6018
|
_inferBuildSetup({ command: t, mode: i }, n) {
|
|
6032
6019
|
this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (C.warn(At, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
|
|
@@ -6106,82 +6093,82 @@ class P {
|
|
|
6106
6093
|
this._silencedRules?.[t]?.includes(i.slice(this.dir.root.length)) !== !0 ? C.error("@arcgis/lumina:linting", n, i) : C.warn("@arcgis/lumina:linting", n, i);
|
|
6107
6094
|
}
|
|
6108
6095
|
}
|
|
6109
|
-
|
|
6096
|
+
k([
|
|
6110
6097
|
A("buildStart() in build mode or load() serve mode")
|
|
6111
6098
|
], P.prototype, "typeScriptHost");
|
|
6112
|
-
|
|
6099
|
+
k([
|
|
6113
6100
|
A("configResolved()")
|
|
6114
6101
|
], P.prototype, "shouldMinify");
|
|
6115
|
-
|
|
6102
|
+
k([
|
|
6116
6103
|
A("configResolved()")
|
|
6117
6104
|
], P.prototype, "shouldMinifyJsx");
|
|
6118
|
-
|
|
6105
|
+
k([
|
|
6119
6106
|
A("configResolved()")
|
|
6120
6107
|
], P.prototype, "dir");
|
|
6121
|
-
|
|
6108
|
+
k([
|
|
6122
6109
|
A("load()")
|
|
6123
6110
|
], P.prototype, "apiJson");
|
|
6124
|
-
|
|
6111
|
+
k([
|
|
6125
6112
|
A("load()")
|
|
6126
6113
|
], P.prototype, "apiJsonComponents");
|
|
6127
|
-
|
|
6114
|
+
k([
|
|
6128
6115
|
A("load()")
|
|
6129
6116
|
], P.prototype, "privateApiJson");
|
|
6130
|
-
|
|
6117
|
+
k([
|
|
6131
6118
|
A("load() when in build mode")
|
|
6132
6119
|
], P.prototype, "_componentPathMapping");
|
|
6133
|
-
|
|
6120
|
+
k([
|
|
6134
6121
|
A("apply()")
|
|
6135
6122
|
], P.prototype, "environment");
|
|
6136
|
-
|
|
6123
|
+
k([
|
|
6137
6124
|
A("apply()")
|
|
6138
6125
|
], P.prototype, "isInTest");
|
|
6139
|
-
|
|
6126
|
+
k([
|
|
6140
6127
|
A("apply()")
|
|
6141
6128
|
], P.prototype, "isInPuppeteerTestBackEnd");
|
|
6142
|
-
|
|
6129
|
+
k([
|
|
6143
6130
|
A("apply()")
|
|
6144
6131
|
], P.prototype, "isInPuppeteerTestFrontEnd");
|
|
6145
|
-
|
|
6132
|
+
k([
|
|
6146
6133
|
A("configResolved()")
|
|
6147
6134
|
], P.prototype, "isInStorybook");
|
|
6148
|
-
|
|
6135
|
+
k([
|
|
6149
6136
|
A("configResolved()")
|
|
6150
6137
|
], P.prototype, "hmrEnabled");
|
|
6151
|
-
|
|
6138
|
+
k([
|
|
6152
6139
|
A("apply()")
|
|
6153
6140
|
], P.prototype, "viteCommand");
|
|
6154
|
-
|
|
6141
|
+
k([
|
|
6155
6142
|
A("configResolved()")
|
|
6156
6143
|
], P.prototype, "isFullApiExtraction");
|
|
6157
|
-
|
|
6144
|
+
k([
|
|
6158
6145
|
A("configResolved()")
|
|
6159
6146
|
], P.prototype, "viteConfig");
|
|
6160
|
-
|
|
6147
|
+
k([
|
|
6161
6148
|
A("configResolved()")
|
|
6162
6149
|
], P.prototype, "server");
|
|
6163
|
-
|
|
6150
|
+
k([
|
|
6164
6151
|
A("load()")
|
|
6165
6152
|
], P.prototype, "componentFiles");
|
|
6166
|
-
|
|
6153
|
+
k([
|
|
6167
6154
|
A("load()")
|
|
6168
6155
|
], P.prototype, "componentStoryFiles");
|
|
6169
|
-
|
|
6156
|
+
k([
|
|
6170
6157
|
A("configResolved()")
|
|
6171
6158
|
], P.prototype, "componentStoriesPromise");
|
|
6172
|
-
|
|
6159
|
+
k([
|
|
6173
6160
|
A("load()")
|
|
6174
6161
|
], P.prototype, "componentStories");
|
|
6175
|
-
|
|
6162
|
+
k([
|
|
6176
6163
|
A("transform()")
|
|
6177
6164
|
], P.prototype, "_globalHydratedCssString");
|
|
6178
|
-
|
|
6165
|
+
k([
|
|
6179
6166
|
A("configResolved()")
|
|
6180
6167
|
], P.prototype, "_compilerOptionsForPrinter");
|
|
6181
|
-
|
|
6168
|
+
k([
|
|
6182
6169
|
A("configResolved()")
|
|
6183
6170
|
], P.prototype, "_typeScriptPrinter");
|
|
6184
|
-
const pt = "@arcgis/lumina:addNonLazyImports",
|
|
6171
|
+
const pt = "@arcgis/lumina:addNonLazyImports", Il = (e) => ({
|
|
6185
6172
|
name: pt,
|
|
6186
6173
|
apply: () => e.viteCommand === "build",
|
|
6187
6174
|
generateBundle(t, i) {
|
|
@@ -6202,7 +6189,7 @@ const pt = "@arcgis/lumina:addNonLazyImports", Nl = (e) => ({
|
|
|
6202
6189
|
i.forEach(([r, { referencedTagNames: a, referencedDeferredTagNames: c, referencedBy: l }]) => {
|
|
6203
6190
|
if (n.has(r) || a.length === 0 && c.length === 0)
|
|
6204
6191
|
return;
|
|
6205
|
-
const d =
|
|
6192
|
+
const d = us(t, l, n);
|
|
6206
6193
|
if (d.forEach((p) => {
|
|
6207
6194
|
t[p].referencedTagNames.splice(0, 0, ...a), t[p].referencedDeferredTagNames.splice(0, 0, ...c);
|
|
6208
6195
|
}), (a.length > 0 || c.length > 0) && d.length === 0) {
|
|
@@ -6220,14 +6207,14 @@ const pt = "@arcgis/lumina:addNonLazyImports", Nl = (e) => ({
|
|
|
6220
6207
|
return [];
|
|
6221
6208
|
const l = u.dirname(r), d = ve(l, e.dir.srcComponents, e), p = u.relative(e.dir.src, d);
|
|
6222
6209
|
function m(w) {
|
|
6223
|
-
const
|
|
6224
|
-
if (
|
|
6225
|
-
return
|
|
6210
|
+
const T = cc(ac(e, w, r), p);
|
|
6211
|
+
if (T !== `./${p}`)
|
|
6212
|
+
return T.startsWith(".") ? `${T}/${Oi}` : T;
|
|
6226
6213
|
}
|
|
6227
6214
|
const f = new Set(a), y = new Set(c), h = Array.from(f, m).filter(D), g = (w) => `import "${w}";
|
|
6228
|
-
`, v = h.map(g).join(""), S = /* @__PURE__ */ new Set(),
|
|
6229
|
-
const
|
|
6230
|
-
if (
|
|
6215
|
+
`, v = h.map(g).join(""), S = /* @__PURE__ */ new Set(), E = Array.from(y, (w) => {
|
|
6216
|
+
const T = m(w);
|
|
6217
|
+
if (T !== void 0) {
|
|
6231
6218
|
if (f.has(w)) {
|
|
6232
6219
|
C.warn(
|
|
6233
6220
|
pt,
|
|
@@ -6235,20 +6222,20 @@ const pt = "@arcgis/lumina:addNonLazyImports", Nl = (e) => ({
|
|
|
6235
6222
|
);
|
|
6236
6223
|
return;
|
|
6237
6224
|
}
|
|
6238
|
-
return S.add(g(
|
|
6225
|
+
return S.add(g(T)), `.set("${w}", () => import("${T}"))
|
|
6239
6226
|
`;
|
|
6240
6227
|
}
|
|
6241
|
-
}).filter(D), $ = `${v}export * from "./${Tt}";`,
|
|
6228
|
+
}).filter(D), $ = `${v}export * from "./${Tt}";`, I = Array.from(S).join("") + $, x = E.length > 0 ? `import { deferredLoaders } from "@arcgis/lumina";
|
|
6242
6229
|
${$}
|
|
6243
|
-
deferredLoaders${
|
|
6230
|
+
deferredLoaders${E.join("")};` : $;
|
|
6244
6231
|
return [
|
|
6245
6232
|
F(u.join(e.dir.dist, p, Oi), x),
|
|
6246
|
-
F(u.join(e.dir.dist, p,
|
|
6233
|
+
F(u.join(e.dir.dist, p, Ll), I)
|
|
6247
6234
|
];
|
|
6248
6235
|
});
|
|
6249
6236
|
await Promise.all(s);
|
|
6250
6237
|
}
|
|
6251
|
-
}), Oi = "index.js",
|
|
6238
|
+
}), Oi = "index.js", Ll = "index.d.ts", us = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), us(e, e[s].referencedBy, i, n))), Fl = (e) => ({
|
|
6252
6239
|
name: "@arcgis/lumina:handleDynamicAssets",
|
|
6253
6240
|
configureServer(t) {
|
|
6254
6241
|
e.server = t, !e.isInPuppeteerTestBackEnd && Ji(e).forEach(({ assets: i, transformers: n }) => he(e, i, n));
|
|
@@ -6256,7 +6243,7 @@ deferredLoaders${T.join("")};` : $;
|
|
|
6256
6243
|
async writeBundle() {
|
|
6257
6244
|
await Promise.all(
|
|
6258
6245
|
Ji(e).map(
|
|
6259
|
-
async ({ assets: t, transformers: i }) => await
|
|
6246
|
+
async ({ assets: t, transformers: i }) => await is(e, t, i)
|
|
6260
6247
|
)
|
|
6261
6248
|
);
|
|
6262
6249
|
}
|
|
@@ -6267,20 +6254,20 @@ function Ji(e) {
|
|
|
6267
6254
|
"type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
|
|
6268
6255
|
}), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
|
|
6269
6256
|
}
|
|
6270
|
-
const wt = "@arcgis/lumina:updatePackageJson",
|
|
6257
|
+
const wt = "@arcgis/lumina:updatePackageJson", Nl = (e) => ({
|
|
6271
6258
|
name: wt,
|
|
6272
6259
|
apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
|
|
6273
6260
|
configResolved() {
|
|
6274
|
-
|
|
6261
|
+
jl(e).catch(
|
|
6275
6262
|
(t) => C.error(wt, `Failed to update package's package.json:${String(t)}`)
|
|
6276
6263
|
);
|
|
6277
6264
|
}
|
|
6278
6265
|
});
|
|
6279
|
-
async function
|
|
6280
|
-
const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await O(t, "utf-8")), n =
|
|
6266
|
+
async function jl(e) {
|
|
6267
|
+
const t = u.join(e.dir.root, "package.json"), i = JSON.parse(await O(t, "utf-8")), n = Dl(i, e);
|
|
6281
6268
|
n && qi(t, JSON.stringify(n, null, 2));
|
|
6282
6269
|
}
|
|
6283
|
-
function
|
|
6270
|
+
function Dl(e, t) {
|
|
6284
6271
|
const i = e?.devDependencies ?? {};
|
|
6285
6272
|
Object.keys(e?.peerDependencies ?? {}).forEach((d) => {
|
|
6286
6273
|
d in i || C.warn(
|
|
@@ -6316,20 +6303,20 @@ function Ol(e, t) {
|
|
|
6316
6303
|
if (n)
|
|
6317
6304
|
return e;
|
|
6318
6305
|
}
|
|
6319
|
-
const
|
|
6306
|
+
const Rl = (e) => ({
|
|
6320
6307
|
timestamp: e.apiJson.timestamp,
|
|
6321
6308
|
compiler: e.apiJson.compiler,
|
|
6322
|
-
components:
|
|
6309
|
+
components: Ml(e),
|
|
6323
6310
|
typeLibrary: {}
|
|
6324
6311
|
});
|
|
6325
|
-
function
|
|
6312
|
+
function Ml(e) {
|
|
6326
6313
|
const t = [];
|
|
6327
6314
|
for (const i of e.apiJson.modules)
|
|
6328
6315
|
for (const n of i.declarations)
|
|
6329
|
-
"customElement" in n && t.push(
|
|
6316
|
+
"customElement" in n && t.push(Ol(n, i.path));
|
|
6330
6317
|
return t;
|
|
6331
6318
|
}
|
|
6332
|
-
function
|
|
6319
|
+
function Ol(e, t) {
|
|
6333
6320
|
const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
|
|
6334
6321
|
return {
|
|
6335
6322
|
filePath: t,
|
|
@@ -6344,9 +6331,9 @@ function Wl(e, t) {
|
|
|
6344
6331
|
dependencies: [],
|
|
6345
6332
|
dependencyGraph: {},
|
|
6346
6333
|
deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
|
|
6347
|
-
props: e.members.map(
|
|
6348
|
-
methods: e.members.map(
|
|
6349
|
-
events: e.events?.map(
|
|
6334
|
+
props: e.members.map(Jl).filter(D),
|
|
6335
|
+
methods: e.members.map(Kl).filter(D),
|
|
6336
|
+
events: e.events?.map(Bl) ?? [],
|
|
6350
6337
|
styles: e.cssProperties?.map((n) => ({
|
|
6351
6338
|
name: n.name,
|
|
6352
6339
|
annotation: "prop",
|
|
@@ -6358,7 +6345,7 @@ function Wl(e, t) {
|
|
|
6358
6345
|
listeners: []
|
|
6359
6346
|
};
|
|
6360
6347
|
}
|
|
6361
|
-
function
|
|
6348
|
+
function Jl(e) {
|
|
6362
6349
|
if (e.kind !== "field")
|
|
6363
6350
|
return;
|
|
6364
6351
|
const t = e, i = t.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(t.inheritedFrom) }] : [], n = t.readonly ? [{ name: "readonly", text: "" }] : [], s = t.docsTags?.some((r) => r.name === "required") ?? !1;
|
|
@@ -6399,7 +6386,7 @@ const Ot = (e) => Object.fromEntries(
|
|
|
6399
6386
|
]
|
|
6400
6387
|
) ?? []
|
|
6401
6388
|
);
|
|
6402
|
-
function
|
|
6389
|
+
function Kl(e) {
|
|
6403
6390
|
if (e.kind !== "method")
|
|
6404
6391
|
return;
|
|
6405
6392
|
const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], n = t.parameters?.map(({ name: s, type: r, description: a }) => ({
|
|
@@ -6430,7 +6417,7 @@ function _l(e) {
|
|
|
6430
6417
|
deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
|
|
6431
6418
|
};
|
|
6432
6419
|
}
|
|
6433
|
-
function
|
|
6420
|
+
function Bl(e) {
|
|
6434
6421
|
const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
|
|
6435
6422
|
return {
|
|
6436
6423
|
event: e.name,
|
|
@@ -6448,32 +6435,32 @@ function Hl(e) {
|
|
|
6448
6435
|
deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated
|
|
6449
6436
|
};
|
|
6450
6437
|
}
|
|
6451
|
-
const
|
|
6438
|
+
const ms = (e) => e.flatMap(
|
|
6452
6439
|
(t) => t.cssProperties?.map((i) => ({
|
|
6453
6440
|
name: i.name,
|
|
6454
6441
|
description: i.description || void 0
|
|
6455
6442
|
})) ?? []
|
|
6456
|
-
),
|
|
6443
|
+
), fs = (e) => e.flatMap(
|
|
6457
6444
|
(t) => t.cssParts?.map((i) => ({
|
|
6458
6445
|
name: `::part(${i.name})`,
|
|
6459
6446
|
description: i.description || void 0
|
|
6460
6447
|
})) ?? []
|
|
6461
|
-
),
|
|
6448
|
+
), Wl = (e) => e.attributes?.map((t) => ({
|
|
6462
6449
|
name: t.name ?? "",
|
|
6463
6450
|
description: Ye(t.description, t.deprecated) || void 0,
|
|
6464
6451
|
default: t.default,
|
|
6465
6452
|
value: {
|
|
6466
|
-
type:
|
|
6453
|
+
type: _l(t.type.values?.map(pn))
|
|
6467
6454
|
}
|
|
6468
|
-
})) ?? [],
|
|
6455
|
+
})) ?? [], _l = (e) => e?.length === 1 ? e[0] : e, Ye = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, xe = {
|
|
6469
6456
|
slots: "Slots",
|
|
6470
6457
|
events: "Events",
|
|
6471
6458
|
cssProperties: "CSS Properties",
|
|
6472
6459
|
cssParts: "CSS Parts",
|
|
6473
6460
|
methods: "Methods"
|
|
6474
6461
|
};
|
|
6475
|
-
function
|
|
6476
|
-
const t =
|
|
6462
|
+
function ys(e) {
|
|
6463
|
+
const t = Hl(e.slots), i = zl(e.events), n = ql(e.cssProperties), s = Ul(e.cssParts), r = Gl(e.members), a = Ye(e.description, e.deprecated).trim();
|
|
6477
6464
|
return [...a ? [`${a}
|
|
6478
6465
|
--`] : [], i, r, t, n, s].filter(Boolean).join(`
|
|
6479
6466
|
|
|
@@ -6481,28 +6468,28 @@ function gs(e) {
|
|
|
6481
6468
|
}
|
|
6482
6469
|
const Pe = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
|
|
6483
6470
|
${t.join(`
|
|
6484
|
-
`)}`,
|
|
6471
|
+
`)}`, Hl = (e) => Pe(
|
|
6485
6472
|
xe.slots,
|
|
6486
6473
|
e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
|
|
6487
|
-
),
|
|
6474
|
+
), zl = (e) => Pe(
|
|
6488
6475
|
xe.events,
|
|
6489
6476
|
e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
|
|
6490
|
-
),
|
|
6477
|
+
), ql = (e = []) => Pe(
|
|
6491
6478
|
xe.cssProperties,
|
|
6492
6479
|
e?.map(
|
|
6493
6480
|
(t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
|
|
6494
6481
|
)
|
|
6495
|
-
),
|
|
6482
|
+
), Ul = (e) => Pe(
|
|
6496
6483
|
xe.cssParts,
|
|
6497
6484
|
e?.map((t) => `- **${t.name}** - ${t.description}`)
|
|
6498
|
-
),
|
|
6485
|
+
), Gl = (e) => Pe(
|
|
6499
6486
|
xe.methods,
|
|
6500
|
-
e.filter(
|
|
6487
|
+
e.filter(Ts).map(
|
|
6501
6488
|
(t) => [`- \`${t.name}${t.signature}\``, Ye(t.description, t.deprecated)].filter(Boolean).join(" - ")
|
|
6502
6489
|
)
|
|
6503
6490
|
);
|
|
6504
|
-
function
|
|
6505
|
-
const i =
|
|
6491
|
+
function Vl(e, t) {
|
|
6492
|
+
const i = Xl(e), n = ms(e), s = fs(e), r = J();
|
|
6506
6493
|
return {
|
|
6507
6494
|
$schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
6508
6495
|
name: r.name,
|
|
@@ -6520,21 +6507,21 @@ function Zl(e, t) {
|
|
|
6520
6507
|
}
|
|
6521
6508
|
};
|
|
6522
6509
|
}
|
|
6523
|
-
const
|
|
6510
|
+
const Xl = (e) => e.map((t) => ({
|
|
6524
6511
|
name: t.tagName,
|
|
6525
|
-
description:
|
|
6512
|
+
description: ys(t),
|
|
6526
6513
|
"doc-url": t.demos?.[0]?.url,
|
|
6527
|
-
attributes:
|
|
6514
|
+
attributes: Wl(t),
|
|
6528
6515
|
slots: t.slots?.map((i) => ({
|
|
6529
6516
|
name: i.name,
|
|
6530
6517
|
description: i.description
|
|
6531
6518
|
})),
|
|
6532
6519
|
events: Ki(t),
|
|
6533
6520
|
js: {
|
|
6534
|
-
properties:
|
|
6521
|
+
properties: Ql(t),
|
|
6535
6522
|
events: Ki(t)
|
|
6536
6523
|
}
|
|
6537
|
-
})),
|
|
6524
|
+
})), Ql = (e) => e.members.filter(Es).map((t) => ({
|
|
6538
6525
|
name: t.name,
|
|
6539
6526
|
description: t.description,
|
|
6540
6527
|
type: t.type?.text
|
|
@@ -6542,30 +6529,30 @@ const Yl = (e) => e.map((t) => ({
|
|
|
6542
6529
|
name: t.name,
|
|
6543
6530
|
type: t.type?.text,
|
|
6544
6531
|
description: t.description
|
|
6545
|
-
})) ?? [],
|
|
6532
|
+
})) ?? [], Zl = (e) => e.map((t) => ({
|
|
6546
6533
|
name: t.tagName,
|
|
6547
|
-
description:
|
|
6548
|
-
attributes:
|
|
6534
|
+
description: ys(t),
|
|
6535
|
+
attributes: Yl(t),
|
|
6549
6536
|
references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
|
|
6550
|
-
})),
|
|
6537
|
+
})), Yl = (e) => e.attributes?.map((t) => ({
|
|
6551
6538
|
name: t.name,
|
|
6552
6539
|
description: Ye(t.description, t.deprecated) || void 0,
|
|
6553
|
-
values:
|
|
6554
|
-
})) ?? [],
|
|
6540
|
+
values: ed(t)
|
|
6541
|
+
})) ?? [], ed = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], td = (e) => ({
|
|
6555
6542
|
$schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
|
|
6556
6543
|
version: 1.1,
|
|
6557
|
-
tags:
|
|
6558
|
-
}),
|
|
6544
|
+
tags: Zl(e)
|
|
6545
|
+
}), id = (e) => ({
|
|
6559
6546
|
$schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
|
|
6560
6547
|
version: 1.1,
|
|
6561
|
-
properties:
|
|
6562
|
-
pseudoElements:
|
|
6563
|
-
}),
|
|
6564
|
-
function
|
|
6548
|
+
properties: ms(e),
|
|
6549
|
+
pseudoElements: fs(e)
|
|
6550
|
+
}), nd = "@arcgis/lumina:generateDocs";
|
|
6551
|
+
function sd(e) {
|
|
6565
6552
|
return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
|
|
6566
6553
|
{
|
|
6567
6554
|
type: "dynamic",
|
|
6568
|
-
source: () => JSON.stringify(
|
|
6555
|
+
source: () => JSON.stringify(Rl(e), null, 2),
|
|
6569
6556
|
destination: u.join("../..", e._documentationFileNames.stencilLikeDocsJson)
|
|
6570
6557
|
}
|
|
6571
6558
|
]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
|
|
@@ -6575,34 +6562,34 @@ function ad(e) {
|
|
|
6575
6562
|
destination: u.join("../..", e._documentationFileNames.apiJson)
|
|
6576
6563
|
}
|
|
6577
6564
|
]), {
|
|
6578
|
-
name:
|
|
6565
|
+
name: nd,
|
|
6579
6566
|
async writeBundle() {
|
|
6580
6567
|
if (e.isInStorybook)
|
|
6581
6568
|
return;
|
|
6582
6569
|
const { jetBrains: t } = e.options.documentation ?? {}, i = e._documentationFileNames, n = i.vsCodeHtml === void 0 ? void 0 : u.join(e.dir.dist, i.vsCodeHtml), s = i.vsCodeCss === void 0 ? void 0 : u.join(e.dir.dist, i.vsCodeCss), r = i.webTypes === void 0 ? void 0 : u.join(e.dir.dist, i.webTypes), a = [n, s, r].filter(D);
|
|
6583
6570
|
if (a.length === 0)
|
|
6584
6571
|
return;
|
|
6585
|
-
await
|
|
6572
|
+
await as(a);
|
|
6586
6573
|
const c = [];
|
|
6587
6574
|
if (n !== void 0) {
|
|
6588
|
-
const l = JSON.stringify(
|
|
6575
|
+
const l = JSON.stringify(td(e.apiJsonComponents), null, 2);
|
|
6589
6576
|
c.push(F(n, l));
|
|
6590
6577
|
}
|
|
6591
6578
|
if (s !== void 0) {
|
|
6592
|
-
const l = JSON.stringify(
|
|
6579
|
+
const l = JSON.stringify(id(e.apiJsonComponents), null, 2);
|
|
6593
6580
|
c.push(F(s, l));
|
|
6594
6581
|
}
|
|
6595
6582
|
if (r !== void 0) {
|
|
6596
|
-
const l =
|
|
6583
|
+
const l = Vl(e.apiJsonComponents, typeof t == "object" ? t : {});
|
|
6597
6584
|
c.push(F(r, JSON.stringify(l, null, 2)));
|
|
6598
6585
|
}
|
|
6599
6586
|
await Promise.all(c);
|
|
6600
6587
|
}
|
|
6601
6588
|
};
|
|
6602
6589
|
}
|
|
6603
|
-
const
|
|
6590
|
+
const rd = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
|
|
6604
6591
|
|
|
6605
|
-
${e.map(
|
|
6592
|
+
${e.map(od).join(`
|
|
6606
6593
|
|
|
6607
6594
|
`)}
|
|
6608
6595
|
|
|
@@ -6614,7 +6601,7 @@ ${e.map(({ tagName: t, pascalCaseName: i }) => ` "${t}": Lumina${i};`).join
|
|
|
6614
6601
|
}
|
|
6615
6602
|
}
|
|
6616
6603
|
}`;
|
|
6617
|
-
function
|
|
6604
|
+
function od({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
6618
6605
|
const [s, r] = Ze(e, i);
|
|
6619
6606
|
return [
|
|
6620
6607
|
`interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
|
|
@@ -6627,7 +6614,7 @@ function ld({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
|
6627
6614
|
r
|
|
6628
6615
|
].join("");
|
|
6629
6616
|
}
|
|
6630
|
-
function
|
|
6617
|
+
function ad(e) {
|
|
6631
6618
|
const t = ` interface IntrinsicElements extends PreactJsx.IntrinsicElements {
|
|
6632
6619
|
${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join(`
|
|
6633
6620
|
`)}
|
|
@@ -6635,7 +6622,7 @@ ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join
|
|
|
6635
6622
|
return `import { JSX as PreactJsx } from "preact";
|
|
6636
6623
|
import type { EventHandler } from "@arcgis/lumina";
|
|
6637
6624
|
|
|
6638
|
-
${e.map(
|
|
6625
|
+
${e.map(cd).join(`
|
|
6639
6626
|
|
|
6640
6627
|
`)}
|
|
6641
6628
|
|
|
@@ -6648,7 +6635,7 @@ ${t}
|
|
|
6648
6635
|
}
|
|
6649
6636
|
}`;
|
|
6650
6637
|
}
|
|
6651
|
-
function
|
|
6638
|
+
function cd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
6652
6639
|
const [s, r] = Ze(e, i);
|
|
6653
6640
|
return [
|
|
6654
6641
|
`interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
|
|
@@ -6661,13 +6648,13 @@ function pd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
|
6661
6648
|
r
|
|
6662
6649
|
].join("");
|
|
6663
6650
|
}
|
|
6664
|
-
function
|
|
6651
|
+
function ld(e) {
|
|
6665
6652
|
const t = e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": React${i};`).join(`
|
|
6666
6653
|
`);
|
|
6667
6654
|
return `import type { HTMLProps } from 'react';
|
|
6668
6655
|
import type { EventHandler } from "@arcgis/lumina";
|
|
6669
6656
|
|
|
6670
|
-
${e.map(
|
|
6657
|
+
${e.map(dd).join(`
|
|
6671
6658
|
|
|
6672
6659
|
`)}
|
|
6673
6660
|
|
|
@@ -6693,7 +6680,7 @@ ${t}
|
|
|
6693
6680
|
}
|
|
6694
6681
|
}`;
|
|
6695
6682
|
}
|
|
6696
|
-
function
|
|
6683
|
+
function dd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
6697
6684
|
const [s, r] = Ze(e, i);
|
|
6698
6685
|
return [
|
|
6699
6686
|
`interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
|
|
@@ -6706,10 +6693,10 @@ function md({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
|
6706
6693
|
r
|
|
6707
6694
|
].join("");
|
|
6708
6695
|
}
|
|
6709
|
-
const
|
|
6696
|
+
const pd = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
|
|
6710
6697
|
import type { EventHandler } from "@arcgis/lumina";
|
|
6711
6698
|
|
|
6712
|
-
${e.map(
|
|
6699
|
+
${e.map(ud).join(`
|
|
6713
6700
|
|
|
6714
6701
|
`)}
|
|
6715
6702
|
|
|
@@ -6727,7 +6714,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
|
|
|
6727
6714
|
interface IntrinsicElements extends ExposedElements {}
|
|
6728
6715
|
}
|
|
6729
6716
|
}`;
|
|
6730
|
-
function
|
|
6717
|
+
function ud({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
6731
6718
|
const [s, r] = Ze(e, i);
|
|
6732
6719
|
return [
|
|
6733
6720
|
`interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
|
|
@@ -6740,16 +6727,16 @@ function yd({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
|
6740
6727
|
r
|
|
6741
6728
|
].join("");
|
|
6742
6729
|
}
|
|
6743
|
-
const
|
|
6730
|
+
const md = (e, t, i) => [i, t, fd(e), yd(e)].join(`
|
|
6744
6731
|
|
|
6745
|
-
`),
|
|
6732
|
+
`), fd = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
|
|
6746
6733
|
({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
|
|
6747
6734
|
detail: T;
|
|
6748
6735
|
target: HTML${t}Element;
|
|
6749
6736
|
currentTarget: HTML${t}Element;
|
|
6750
6737
|
}`
|
|
6751
6738
|
).join(`
|
|
6752
|
-
`),
|
|
6739
|
+
`), yd = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
|
|
6753
6740
|
|
|
6754
6741
|
declare global {
|
|
6755
6742
|
interface HTMLElementTagNameMap {
|
|
@@ -6757,12 +6744,12 @@ ${e.map(({ pascalCaseName: t, tagName: i }) => ` "${i}": HTML${t}Element;`).j
|
|
|
6757
6744
|
`)}
|
|
6758
6745
|
}
|
|
6759
6746
|
|
|
6760
|
-
${e.map(
|
|
6747
|
+
${e.map(hd).join(`
|
|
6761
6748
|
`).split(`
|
|
6762
6749
|
`).map((t) => t.length > 0 ? ` ${t}` : t).join(`
|
|
6763
6750
|
`)}
|
|
6764
6751
|
}`;
|
|
6765
|
-
function
|
|
6752
|
+
function hd({ name: e, pascalCaseName: t, events: i = [] }) {
|
|
6766
6753
|
const n = i.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
|
|
6767
6754
|
return [
|
|
6768
6755
|
n ? `interface ${r}EventMap {
|
|
@@ -6781,7 +6768,7 @@ ${n ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
|
|
|
6781
6768
|
}`
|
|
6782
6769
|
].join("");
|
|
6783
6770
|
}
|
|
6784
|
-
function
|
|
6771
|
+
function gd(e) {
|
|
6785
6772
|
let t;
|
|
6786
6773
|
return {
|
|
6787
6774
|
name: "@arcgis/lumina:generateFrameworkTypes",
|
|
@@ -6789,11 +6776,11 @@ function wd(e) {
|
|
|
6789
6776
|
generateBundle() {
|
|
6790
6777
|
if (e.isInStorybook)
|
|
6791
6778
|
return;
|
|
6792
|
-
t =
|
|
6779
|
+
t = Ga(e);
|
|
6793
6780
|
const i = u.join(e.dir.dist, "index.d.ts");
|
|
6794
6781
|
e._declarationTextTransformers.push((n) => {
|
|
6795
6782
|
const { filePath: s, content: r } = n;
|
|
6796
|
-
return s === i ? { filePath: s, content:
|
|
6783
|
+
return s === i ? { filePath: s, content: md(e.apiJsonComponents, r, t) } : n;
|
|
6797
6784
|
});
|
|
6798
6785
|
},
|
|
6799
6786
|
async writeBundle() {
|
|
@@ -6803,10 +6790,10 @@ function wd(e) {
|
|
|
6803
6790
|
await _(i);
|
|
6804
6791
|
const n = `/// <reference types="../index.d.ts" />
|
|
6805
6792
|
${t.replaceAll("./", "../")}`, s = Object.entries({
|
|
6806
|
-
react:
|
|
6807
|
-
preact:
|
|
6808
|
-
stencil:
|
|
6809
|
-
lumina:
|
|
6793
|
+
react: ld(e.apiJsonComponents),
|
|
6794
|
+
preact: ad(e.apiJsonComponents),
|
|
6795
|
+
stencil: pd(e.apiJsonComponents),
|
|
6796
|
+
lumina: rd(e.apiJsonComponents)
|
|
6810
6797
|
}).map(
|
|
6811
6798
|
async ([r, a]) => await F(u.join(i, `${r}.d.ts`), `${n}
|
|
6812
6799
|
${a}`)
|
|
@@ -6815,38 +6802,38 @@ ${a}`)
|
|
|
6815
6802
|
}
|
|
6816
6803
|
};
|
|
6817
6804
|
}
|
|
6818
|
-
function
|
|
6805
|
+
function vd(e) {
|
|
6819
6806
|
return {
|
|
6820
6807
|
name: "@arcgis/lumina:buildWrappers",
|
|
6821
6808
|
apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
|
|
6822
6809
|
async writeBundle() {
|
|
6823
6810
|
e.isInStorybook || await Promise.all(
|
|
6824
6811
|
e.options.build?.wrappers?.map(async (t) => {
|
|
6825
|
-
t.type === "react18" && await
|
|
6812
|
+
t.type === "react18" && await bd(e, t);
|
|
6826
6813
|
}) ?? []
|
|
6827
6814
|
);
|
|
6828
6815
|
}
|
|
6829
6816
|
};
|
|
6830
6817
|
}
|
|
6831
|
-
const
|
|
6832
|
-
import React from "${
|
|
6833
|
-
import { createComponent } from "${
|
|
6834
|
-
import type { EventName } from "${
|
|
6818
|
+
const Sd = "react", Bi = "@lit/react", wd = `
|
|
6819
|
+
import React from "${Sd}";
|
|
6820
|
+
import { createComponent } from "${Bi}";
|
|
6821
|
+
import type { EventName } from "${Bi}";
|
|
6835
6822
|
import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
|
|
6836
6823
|
|
|
6837
6824
|
const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
|
|
6838
6825
|
`;
|
|
6839
|
-
async function
|
|
6826
|
+
async function bd(e, t) {
|
|
6840
6827
|
const { name: i } = J(), n = [];
|
|
6841
6828
|
for (const a of e.apiJson.modules)
|
|
6842
6829
|
for (const c of a.declarations)
|
|
6843
|
-
"customElement" in c && n.push(
|
|
6844
|
-
const s = [`/// <reference types="${i}" preserve="true" />`,
|
|
6830
|
+
"customElement" in c && n.push(Td(c));
|
|
6831
|
+
const s = [`/// <reference types="${i}" preserve="true" />`, wd, ...n].join(""), r = u.resolve(t.proxiesFile);
|
|
6845
6832
|
await _(u.dirname(r), { recursive: !0 }), await F(r, s);
|
|
6846
6833
|
}
|
|
6847
|
-
function
|
|
6834
|
+
function Td(e) {
|
|
6848
6835
|
const t = e.events?.map(
|
|
6849
|
-
(i) => ` ${$e(`on${
|
|
6836
|
+
(i) => ` ${$e(`on${Ps(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
|
|
6850
6837
|
).join(`
|
|
6851
6838
|
`);
|
|
6852
6839
|
return `
|
|
@@ -6860,36 +6847,36 @@ ${t}
|
|
|
6860
6847
|
);
|
|
6861
6848
|
`;
|
|
6862
6849
|
}
|
|
6863
|
-
function
|
|
6850
|
+
function Md(e = {}) {
|
|
6864
6851
|
const t = new P(e), i = [
|
|
6865
6852
|
t._plugin,
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
Rl(t),
|
|
6869
|
-
Ir(t),
|
|
6870
|
-
il(t),
|
|
6871
|
-
wd(t),
|
|
6872
|
-
ad(t),
|
|
6873
|
-
Ac(t),
|
|
6874
|
-
Io(t),
|
|
6875
|
-
al(t),
|
|
6876
|
-
Dl(t),
|
|
6853
|
+
ul(t),
|
|
6854
|
+
ml(t),
|
|
6877
6855
|
Nl(t),
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6856
|
+
Pr(t),
|
|
6857
|
+
Yc(t),
|
|
6858
|
+
gd(t),
|
|
6859
|
+
sd(t),
|
|
6860
|
+
xc(t),
|
|
6861
|
+
Po(t),
|
|
6862
|
+
sl(t),
|
|
6863
|
+
Fl(t),
|
|
6864
|
+
Il(t),
|
|
6865
|
+
Sl(t),
|
|
6866
|
+
Ms(t),
|
|
6867
|
+
Fc(t),
|
|
6881
6868
|
// Deprecated feature will be dropped in https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/2765
|
|
6882
6869
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6870
|
+
ol(t),
|
|
6871
|
+
vd(t),
|
|
6872
|
+
al(t)
|
|
6886
6873
|
].filter(D);
|
|
6887
6874
|
return i.context = t, i;
|
|
6888
6875
|
}
|
|
6889
|
-
const
|
|
6876
|
+
const Od = {
|
|
6890
6877
|
initializeComponentDependencies: Tn,
|
|
6891
|
-
updateLuminaTs:
|
|
6892
|
-
propertyToAttributeMappings:
|
|
6878
|
+
updateLuminaTs: ds,
|
|
6879
|
+
propertyToAttributeMappings: W,
|
|
6893
6880
|
findDeclaredComponents: Xi,
|
|
6894
6881
|
nativeEvents: rn,
|
|
6895
6882
|
svgElements: Ct,
|
|
@@ -6901,7 +6888,7 @@ const Wd = {
|
|
|
6901
6888
|
};
|
|
6902
6889
|
export {
|
|
6903
6890
|
Ke as LuminaApiExtractor,
|
|
6904
|
-
|
|
6891
|
+
Od as exportsForCodemod,
|
|
6905
6892
|
Ve as inferCdnUrl,
|
|
6906
|
-
|
|
6893
|
+
Md as useLumina
|
|
6907
6894
|
};
|