@arcgis/lumina-compiler 4.34.0-next.126 → 4.34.0-next.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +521 -522
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { getMemberName as X, apiMemberToSynthesizedComments as V, globalPackageI
|
|
|
6
6
|
import { isNotUndefined as D } from "@arcgis/toolkit/predicate";
|
|
7
7
|
import { camelToKebab as Tt, kebabToPascal as hs, uncapitalize as ut, getPreamble as vs, capitalize as bs } from "@arcgis/toolkit/string";
|
|
8
8
|
import { lazyMetaSubItemJoiner as Ss, lazyMetaItemJoiner as et, lazyMetaGroupJoiner as ws, propertyFlagAttribute as _t, propertyFlagReflect as Ts, propertyFlagBoolean as Es, propertyFlagNumber as Cs, propertyFlagState as $s, propertyFlagReadOnly as Ps, propertyFlagNoAccessor as xs } from "@arcgis/lumina/config";
|
|
9
|
-
import { readdir as ze, readFile as
|
|
9
|
+
import { readdir as ze, readFile as B, rm as ks, mkdir as Q, cp as Is, writeFile as N, copyFile as As } from "node:fs/promises";
|
|
10
10
|
import { mappedFind as ve } from "@arcgis/toolkit/array";
|
|
11
11
|
import { build as Ls } from "esbuild";
|
|
12
12
|
import { identity as Ji } from "@arcgis/toolkit/function";
|
|
@@ -15,7 +15,8 @@ import { glob as Ns } from "glob";
|
|
|
15
15
|
import Ds from "mime-types";
|
|
16
16
|
import { writeFileSync as Ki } from "node:fs";
|
|
17
17
|
import js from "chalk";
|
|
18
|
-
|
|
18
|
+
import { readFile as Rs } from "fs/promises";
|
|
19
|
+
function Ms(e) {
|
|
19
20
|
const t = e.options?.build?.dependencies ?? {}, i = ls({
|
|
20
21
|
bundleIn: t.bundleIn,
|
|
21
22
|
externalize: [
|
|
@@ -32,8 +33,8 @@ function Rs(e) {
|
|
|
32
33
|
e.isInStorybook && (i.resolveId = void 0);
|
|
33
34
|
}, i;
|
|
34
35
|
}
|
|
35
|
-
const Et = "customElement.js", Bi = "customElement.d.ts",
|
|
36
|
-
function
|
|
36
|
+
const Et = "customElement.js", Bi = "customElement.d.ts", Os = "playwright";
|
|
37
|
+
function Js(e, t, i) {
|
|
37
38
|
const s = i.split(m.sep).slice(2);
|
|
38
39
|
let r = t._componentPathMapping;
|
|
39
40
|
return s.forEach((a, c) => {
|
|
@@ -43,10 +44,10 @@ function Os(e, t, i) {
|
|
|
43
44
|
function be(e, t, i) {
|
|
44
45
|
if (!e.startsWith(t))
|
|
45
46
|
return e;
|
|
46
|
-
const n = e.slice(t.length), s =
|
|
47
|
+
const n = e.slice(t.length), s = Ks(n, i);
|
|
47
48
|
return `${t}${s}`;
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function Ks(e, t) {
|
|
50
51
|
const i = e.split(m.sep);
|
|
51
52
|
i.push(".");
|
|
52
53
|
let n = t._componentPathMapping, s = 0;
|
|
@@ -58,7 +59,7 @@ function Js(e, t) {
|
|
|
58
59
|
n = n[r], s += 1;
|
|
59
60
|
return e;
|
|
60
61
|
}
|
|
61
|
-
const
|
|
62
|
+
const Bs = ({ filePath: e, content: t }, i) => {
|
|
62
63
|
const n = e.startsWith(i.dir.distComponents) ? be(
|
|
63
64
|
Wi(i.dir.distComponents, e),
|
|
64
65
|
i.dir.distComponents,
|
|
@@ -68,7 +69,7 @@ const Ks = ({ filePath: e, content: t }, i) => {
|
|
|
68
69
|
i,
|
|
69
70
|
e === n ? s : m.dirname(n),
|
|
70
71
|
s
|
|
71
|
-
), c = r ?
|
|
72
|
+
), c = r ? Hs(a) : a;
|
|
72
73
|
return {
|
|
73
74
|
filePath: n,
|
|
74
75
|
content: c
|
|
@@ -78,12 +79,12 @@ function Wi(e, t, i = ".d.ts") {
|
|
|
78
79
|
if (!t.startsWith(e))
|
|
79
80
|
return t;
|
|
80
81
|
const s = (i === "" ? t : t.slice(0, -i.length)).split(m.sep);
|
|
81
|
-
return s.at(
|
|
82
|
+
return s.at(Ws) !== s.at(_s) ? t : m.join(
|
|
82
83
|
s.slice(0, -1).join(m.sep),
|
|
83
84
|
i === "" ? Et : Bi
|
|
84
85
|
);
|
|
85
86
|
}
|
|
86
|
-
const
|
|
87
|
+
const Ws = -1, _s = -2, Us = /["']\.\.?\/[^'"]+/gu, _i = (e, t, i, n) => e.replaceAll(Us, (s) => {
|
|
87
88
|
const r = s.slice(1);
|
|
88
89
|
if (!r.startsWith("./") && !r.startsWith("../"))
|
|
89
90
|
return s;
|
|
@@ -96,11 +97,11 @@ const Bs = -1, Ws = -2, _s = /["']\.\.?\/[^'"]+/gu, _i = (e, t, i, n) => e.repla
|
|
|
96
97
|
const i = m.relative(e, t);
|
|
97
98
|
return i.startsWith(".") ? i : `.${m.sep}${i}`;
|
|
98
99
|
};
|
|
99
|
-
function
|
|
100
|
+
function Hs(e) {
|
|
100
101
|
return `/// <reference path="../../index.d.ts" />
|
|
101
102
|
${e}`;
|
|
102
103
|
}
|
|
103
|
-
const Ut = "customElement",
|
|
104
|
+
const Ut = "customElement", zs = (e, t) => {
|
|
104
105
|
const { filePath: i, content: n } = e;
|
|
105
106
|
if (!i.startsWith(t.dir.distComponents))
|
|
106
107
|
return e;
|
|
@@ -114,7 +115,7 @@ const Ut = "customElement", Hs = (e, t) => {
|
|
|
114
115
|
content: r
|
|
115
116
|
};
|
|
116
117
|
}
|
|
117
|
-
},
|
|
118
|
+
}, qs = (e, t) => {
|
|
118
119
|
const i = [];
|
|
119
120
|
if (t.apiModule?.declarations.forEach((r) => {
|
|
120
121
|
"customElement" in r && i.push(
|
|
@@ -156,39 +157,39 @@ function Hi(e) {
|
|
|
156
157
|
}`, t) + 2;
|
|
157
158
|
return e.slice(t, i);
|
|
158
159
|
}
|
|
159
|
-
const
|
|
160
|
+
const Gs = (e) => (t, i) => (
|
|
160
161
|
/*
|
|
161
162
|
* `declarationTextTransformers` arrays can be mutated between plugin
|
|
162
163
|
* initialization and beforeWriteFile() call, so do not read the value
|
|
163
164
|
* of declarationTextTransformers outside of beforeWriteFile
|
|
164
165
|
*/
|
|
165
166
|
[
|
|
166
|
-
Gs,
|
|
167
|
-
Xs,
|
|
168
|
-
Qs,
|
|
169
167
|
Vs,
|
|
170
|
-
|
|
168
|
+
Qs,
|
|
171
169
|
Zs,
|
|
170
|
+
Xs,
|
|
171
|
+
Bs,
|
|
172
172
|
Ys,
|
|
173
|
-
Hs,
|
|
174
173
|
er,
|
|
174
|
+
zs,
|
|
175
|
+
tr,
|
|
175
176
|
...e.options.types?.declarationTextTransformers ?? [],
|
|
176
177
|
...e._declarationTextTransformers
|
|
177
178
|
].reduce(
|
|
178
179
|
(n, s) => n === !1 ? !1 : s(n, e),
|
|
179
180
|
{ filePath: t, content: i }
|
|
180
181
|
)
|
|
181
|
-
),
|
|
182
|
+
), Vs = (e, t) => t.isInStorybook ? !1 : e, Xs = (e, t) => (
|
|
182
183
|
// Short-circuit quickly if file doesn't look like the one we want to exclude
|
|
183
184
|
e.filePath.endsWith(Ht) && e.filePath === m.join(t.dir.dist, Ht) ? !1 : e
|
|
184
|
-
), Ht = "lumina.d.ts",
|
|
185
|
+
), Ht = "lumina.d.ts", Qs = (e, t) => {
|
|
185
186
|
const i = t.dir.dist, n = `${i}src/`;
|
|
186
187
|
return e.filePath.startsWith(n) ? { ...e, filePath: `${i}${e.filePath.slice(n.length)}` } : !1;
|
|
187
|
-
}, Ct = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."),
|
|
188
|
+
}, Ct = (e) => e.includes("__test") || e.includes(".e2e.") || e.includes(".spec.") || e.includes(".test."), Zs = (e) => Ct(e.filePath) || e.filePath.includes(".stories.") || e.filePath.includes(".story.") ? !1 : e, Ys = (e) => e.content.includes("__esri.") ? {
|
|
188
189
|
filePath: e.filePath,
|
|
189
190
|
content: `/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
190
191
|
${e.content}`
|
|
191
|
-
} : e,
|
|
192
|
+
} : e, er = (e, t) => {
|
|
192
193
|
t._htmlElementReferencesReplacer ??= {
|
|
193
194
|
regex: new RegExp(
|
|
194
195
|
`(${t.apiJsonComponents.map((n) => n.name).join("|")})\\[['"\`]el['"\`]\\]`,
|
|
@@ -203,8 +204,8 @@ ${e.content}`
|
|
|
203
204
|
filePath: e.filePath,
|
|
204
205
|
content: e.content.replace(i.regex, (n, s) => i.replacements[s])
|
|
205
206
|
};
|
|
206
|
-
},
|
|
207
|
-
const t = e.content.match(
|
|
207
|
+
}, tr = (e) => {
|
|
208
|
+
const t = e.content.match(ir)?.[1] ?? e.content.match(nr)?.[1];
|
|
208
209
|
if (t !== void 0)
|
|
209
210
|
throw Error(
|
|
210
211
|
S(
|
|
@@ -219,19 +220,19 @@ ${e.content}
|
|
|
219
220
|
)
|
|
220
221
|
);
|
|
221
222
|
return e;
|
|
222
|
-
},
|
|
223
|
-
function
|
|
223
|
+
}, ir = /^import (?:type \* as )?[^"'\n]+["'](\.[^\n]*?\.json)["'];$/mu, nr = /(?<![.\w\d-])import\(['"]([\w@\-/\\.]+)\.json['"]\)/u;
|
|
224
|
+
function sr(e, t) {
|
|
224
225
|
const i = X(t.name);
|
|
225
226
|
return e.members.find((n) => n.name === i);
|
|
226
227
|
}
|
|
227
|
-
function
|
|
228
|
+
function rr(e, t, i) {
|
|
228
229
|
const n = m.relative(t, e);
|
|
229
230
|
return i.modules.find((s) => s.path === n);
|
|
230
231
|
}
|
|
231
232
|
function zi(e, t, i, n) {
|
|
232
233
|
const s = {
|
|
233
234
|
compiler: e,
|
|
234
|
-
apiModule: e.isInPuppeteerTestBackEnd ? void 0 :
|
|
235
|
+
apiModule: e.isInPuppeteerTestBackEnd ? void 0 : rr(i.fileName, e.dir.root, e.privateApiJson),
|
|
235
236
|
transformation: t
|
|
236
237
|
}, r = i.statements;
|
|
237
238
|
let a = i.statements;
|
|
@@ -242,9 +243,9 @@ function zi(e, t, i, n) {
|
|
|
242
243
|
a = c(i, s);
|
|
243
244
|
}), Object.defineProperty(i, "statements", {
|
|
244
245
|
value: r
|
|
245
|
-
}),
|
|
246
|
+
}), or(i, a);
|
|
246
247
|
}
|
|
247
|
-
const
|
|
248
|
+
const or = (e, t) => o.factory.updateSourceFile(
|
|
248
249
|
e,
|
|
249
250
|
t,
|
|
250
251
|
/*
|
|
@@ -258,11 +259,11 @@ const rr = (e, t) => o.factory.updateSourceFile(
|
|
|
258
259
|
e.typeReferenceDirectives,
|
|
259
260
|
e.hasNoDefaultLib,
|
|
260
261
|
e.libReferenceDirectives
|
|
261
|
-
),
|
|
262
|
-
function
|
|
263
|
-
if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text ===
|
|
262
|
+
), ar = (e) => e.statements.map(pr), cr = "@arcgis/lumina", lr = "LitElement", dr = "PublicLitElement", qi = "TargetedEvent";
|
|
263
|
+
function pr(e) {
|
|
264
|
+
if (o.isImportDeclaration(e) && o.isStringLiteral(e.moduleSpecifier) && e.moduleSpecifier.text === cr && e.importClause?.namedBindings && o.isNamedImports(e.importClause.namedBindings)) {
|
|
264
265
|
const t = e.importClause.namedBindings.elements.findIndex(
|
|
265
|
-
(n) => (n.propertyName ?? n.name).text ===
|
|
266
|
+
(n) => (n.propertyName ?? n.name).text === lr
|
|
266
267
|
);
|
|
267
268
|
if (t === -1)
|
|
268
269
|
return e;
|
|
@@ -279,7 +280,7 @@ function dr(e) {
|
|
|
279
280
|
o.factory.updateImportSpecifier(
|
|
280
281
|
i,
|
|
281
282
|
i.isTypeOnly,
|
|
282
|
-
o.factory.createIdentifier(
|
|
283
|
+
o.factory.createIdentifier(dr),
|
|
283
284
|
i.name
|
|
284
285
|
),
|
|
285
286
|
...e.importClause.namedBindings.elements.slice(t + 1),
|
|
@@ -297,14 +298,14 @@ function dr(e) {
|
|
|
297
298
|
return e;
|
|
298
299
|
}
|
|
299
300
|
const Gi = "_setterTypes";
|
|
300
|
-
function
|
|
301
|
+
function ur(e, t, i) {
|
|
301
302
|
return o.factory.createPropertyDeclaration(
|
|
302
303
|
[o.factory.createModifier(o.SyntaxKind.ReadonlyKeyword)],
|
|
303
304
|
o.factory.createIdentifier(Gi),
|
|
304
305
|
void 0,
|
|
305
306
|
o.factory.createTypeLiteralNode(
|
|
306
307
|
e.map((n) => {
|
|
307
|
-
const [s, r] =
|
|
308
|
+
const [s, r] = mr(n.name, n.type, i._typeScriptPrinter, t);
|
|
308
309
|
return o.factory.createPropertySignature(
|
|
309
310
|
void 0,
|
|
310
311
|
s,
|
|
@@ -316,7 +317,7 @@ function pr(e, t, i) {
|
|
|
316
317
|
void 0
|
|
317
318
|
);
|
|
318
319
|
}
|
|
319
|
-
function
|
|
320
|
+
function mr(e, t, i, n) {
|
|
320
321
|
const s = i.printNode(o.EmitHint.Unspecified, e, n), r = i.printNode(o.EmitHint.Unspecified, t, n), a = `declare class A { ${s}: ${r} }`, l = o.createSourceFile(
|
|
321
322
|
"a.d.ts",
|
|
322
323
|
a,
|
|
@@ -326,8 +327,8 @@ function ur(e, t, i, n) {
|
|
|
326
327
|
).statements[0].members[0];
|
|
327
328
|
return [l.name, l.type];
|
|
328
329
|
}
|
|
329
|
-
const
|
|
330
|
-
function
|
|
330
|
+
const fr = (e, t) => t.apiModule === void 0 ? e.statements : e.statements.map((i) => gr(i, e, t));
|
|
331
|
+
function gr(e, t, i) {
|
|
331
332
|
if (o.isClassDeclaration(e)) {
|
|
332
333
|
const n = e, s = n.name?.text, r = i.apiModule.declarations.find(
|
|
333
334
|
(y) => y.name === s && "customElement" in y
|
|
@@ -337,13 +338,13 @@ function fr(e, t, i) {
|
|
|
337
338
|
const a = [], c = /* @__PURE__ */ new Set(), d = [], l = [];
|
|
338
339
|
mt = void 0;
|
|
339
340
|
for (let y = 0; y < n.members.length; y++) {
|
|
340
|
-
const g = n.members[y], v =
|
|
341
|
+
const g = n.members[y], v = hr(g, r, d, c, t);
|
|
341
342
|
v === void 0 ? a.push(g) : Array.isArray(v) ? l.push(...v) : (o.setEmitFlags(v, o.EmitFlags.NoComments), l.push(v));
|
|
342
343
|
}
|
|
343
344
|
c.size > 0 && a.forEach((y) => {
|
|
344
345
|
const g = X(y.name);
|
|
345
|
-
(g !== void 0 && c.has(g) ||
|
|
346
|
-
}), d.length > 0 && l.push(
|
|
346
|
+
(g !== void 0 && c.has(g) || yr(y)) && l.push(br(y));
|
|
347
|
+
}), d.length > 0 && l.push(ur(d, t, i.compiler));
|
|
347
348
|
const p = o.factory.updateClassDeclaration(
|
|
348
349
|
n,
|
|
349
350
|
n.modifiers,
|
|
@@ -373,13 +374,13 @@ function fr(e, t, i) {
|
|
|
373
374
|
} else
|
|
374
375
|
return e;
|
|
375
376
|
}
|
|
376
|
-
function
|
|
377
|
+
function yr(e) {
|
|
377
378
|
return o.isPropertyDeclaration(e) && e.type !== void 0 && o.isIntersectionTypeNode(e.type) && e.type.types.some(
|
|
378
379
|
(t) => o.isImportTypeNode(t) && t.qualifier !== void 0 && o.isIdentifier(t.qualifier) && t.qualifier.escapedText === "T9nMeta"
|
|
379
380
|
);
|
|
380
381
|
}
|
|
381
382
|
let mt;
|
|
382
|
-
function
|
|
383
|
+
function hr(e, t, i, n, s) {
|
|
383
384
|
const r = X(e.name);
|
|
384
385
|
if (r === void 0)
|
|
385
386
|
return;
|
|
@@ -397,7 +398,7 @@ function yr(e, t, i, n, s) {
|
|
|
397
398
|
Gt(e.modifiers),
|
|
398
399
|
e.name,
|
|
399
400
|
void 0,
|
|
400
|
-
|
|
401
|
+
Sr(e.type, s),
|
|
401
402
|
e.initializer
|
|
402
403
|
);
|
|
403
404
|
return o.setSyntheticLeadingComments(l, V(d)), l;
|
|
@@ -476,13 +477,13 @@ function yr(e, t, i, n, s) {
|
|
|
476
477
|
}
|
|
477
478
|
const zt = /^typeof this\.(?<accessor>[^.]+)\.(?<boundProperty>[^.]+)$/u;
|
|
478
479
|
function qt(e, t, i) {
|
|
479
|
-
const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(
|
|
480
|
+
const s = (t?.pos !== -1 ? t?.getText(i) : void 0)?.match(vr) ?? [];
|
|
480
481
|
for (const r of s)
|
|
481
482
|
e.add(r);
|
|
482
483
|
return t;
|
|
483
484
|
}
|
|
484
|
-
const
|
|
485
|
-
function
|
|
485
|
+
const vr = /(?<=this.)[\w$]+/gu;
|
|
486
|
+
function br(e) {
|
|
486
487
|
if (o.setEmitFlags(e, o.EmitFlags.NoComments), o.isPropertyDeclaration(e)) {
|
|
487
488
|
const t = Le(e.modifiers);
|
|
488
489
|
if (t !== e.modifiers)
|
|
@@ -537,7 +538,7 @@ function Le(e) {
|
|
|
537
538
|
)
|
|
538
539
|
];
|
|
539
540
|
}
|
|
540
|
-
function
|
|
541
|
+
function Sr(e, t) {
|
|
541
542
|
if (e === void 0)
|
|
542
543
|
return;
|
|
543
544
|
const i = o.isImportTypeNode(e) && e.qualifier && o.isIdentifier(e.qualifier) && e.qualifier.escapedText === "EventEmitter" ? e.typeArguments ?? [] : o.isTypeReferenceNode(e) && o.isIdentifier(e.typeName) && e.typeName.escapedText === "EventEmitter" ? e.typeArguments ?? [] : void 0;
|
|
@@ -550,10 +551,10 @@ function br(e, t) {
|
|
|
550
551
|
t.fileName
|
|
551
552
|
), e);
|
|
552
553
|
}
|
|
553
|
-
const
|
|
554
|
-
function
|
|
554
|
+
const wr = [ar, fr], Vt = "@arcgis/lumina:componentDtsTransformer";
|
|
555
|
+
function Tr(e) {
|
|
555
556
|
let t;
|
|
556
|
-
const i =
|
|
557
|
+
const i = Er(e);
|
|
557
558
|
return {
|
|
558
559
|
name: Vt,
|
|
559
560
|
supports(n) {
|
|
@@ -581,22 +582,22 @@ function wr(e) {
|
|
|
581
582
|
}
|
|
582
583
|
};
|
|
583
584
|
}
|
|
584
|
-
const
|
|
585
|
-
...
|
|
585
|
+
const Er = (e) => (t) => (i) => zi(e, t, i, [
|
|
586
|
+
...wr,
|
|
586
587
|
...e.options.types?.declarationAstTransformers ?? []
|
|
587
|
-
]),
|
|
588
|
-
get:
|
|
589
|
-
set:
|
|
588
|
+
]), Cr = (e) => new Proxy(e, {
|
|
589
|
+
get: $r,
|
|
590
|
+
set: Pr
|
|
590
591
|
});
|
|
591
|
-
function
|
|
592
|
+
function $r(e, t, i) {
|
|
592
593
|
if (t in e)
|
|
593
594
|
return Reflect.get(e, t, i);
|
|
594
595
|
throw new Error(`Requested unexpected property ${String(t)}`);
|
|
595
596
|
}
|
|
596
|
-
function
|
|
597
|
+
function Pr(e, t) {
|
|
597
598
|
throw new Error(`Unexpectedly tried to set the ${String(t)} property.`);
|
|
598
599
|
}
|
|
599
|
-
function
|
|
600
|
+
function xr(e) {
|
|
600
601
|
const t = e.options.types ?? {};
|
|
601
602
|
let i = !1;
|
|
602
603
|
const n = {
|
|
@@ -617,7 +618,7 @@ function Pr(e) {
|
|
|
617
618
|
}
|
|
618
619
|
return t?.afterDiagnostic?.(r);
|
|
619
620
|
},
|
|
620
|
-
beforeWriteFile:
|
|
621
|
+
beforeWriteFile: Gs(e),
|
|
621
622
|
resolvers: [
|
|
622
623
|
/**
|
|
623
624
|
* The vite-plugin-dts does not provide a way to get a reference to the
|
|
@@ -641,7 +642,7 @@ function Pr(e) {
|
|
|
641
642
|
}
|
|
642
643
|
},
|
|
643
644
|
...t?.resolvers ?? [],
|
|
644
|
-
|
|
645
|
+
Tr(e)
|
|
645
646
|
]
|
|
646
647
|
});
|
|
647
648
|
return {
|
|
@@ -662,7 +663,7 @@ function Pr(e) {
|
|
|
662
663
|
if (typeof c != "function")
|
|
663
664
|
throw new Error("Expected transform to be a function");
|
|
664
665
|
if (await a.call(this, r), await c.call(
|
|
665
|
-
|
|
666
|
+
Cr({}),
|
|
666
667
|
"",
|
|
667
668
|
/*
|
|
668
669
|
* Have to give it a file that will be matched by the tsconfig's
|
|
@@ -674,7 +675,7 @@ function Pr(e) {
|
|
|
674
675
|
}
|
|
675
676
|
};
|
|
676
677
|
}
|
|
677
|
-
const
|
|
678
|
+
const kr = "Fragment", tt = "DynamicHtmlTag", it = "DynamicSvgTag", Je = Symbol("dynamic html tag name"), ft = Symbol("dynamic svg tag name"), Vi = /* @__PURE__ */ new Set([
|
|
678
679
|
/**
|
|
679
680
|
* There is a "className" property. However, in JSX typings we use "class"
|
|
680
681
|
* instead to keep name shorter and to match Stencil's name. Thus, it should
|
|
@@ -1654,7 +1655,7 @@ const Xt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set(
|
|
|
1654
1655
|
"volumeChange",
|
|
1655
1656
|
"waiting",
|
|
1656
1657
|
"wheel"
|
|
1657
|
-
]),
|
|
1658
|
+
]), Ir = /* @__PURE__ */ new Set([
|
|
1658
1659
|
"area",
|
|
1659
1660
|
"base",
|
|
1660
1661
|
"br",
|
|
@@ -1730,7 +1731,7 @@ const Xt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set(
|
|
|
1730
1731
|
"tspan",
|
|
1731
1732
|
"use",
|
|
1732
1733
|
"view"
|
|
1733
|
-
]),
|
|
1734
|
+
]), Ar = /* @__PURE__ */ new Set(["title", "svg", "a", "script", "style"]), Pt = /* @__PURE__ */ new Set([
|
|
1734
1735
|
"annotation-xml",
|
|
1735
1736
|
"annotation",
|
|
1736
1737
|
"maction",
|
|
@@ -1762,7 +1763,7 @@ const Xt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set(
|
|
|
1762
1763
|
"munder",
|
|
1763
1764
|
"munderover",
|
|
1764
1765
|
"semantics"
|
|
1765
|
-
]),
|
|
1766
|
+
]), Lr = /* @__PURE__ */ new Set([
|
|
1766
1767
|
"annotation-xml",
|
|
1767
1768
|
"color-profile",
|
|
1768
1769
|
"font-face",
|
|
@@ -1772,7 +1773,7 @@ const Xt = /* @__PURE__ */ new Set(["itemScope"]), Zi = /* @__PURE__ */ new Set(
|
|
|
1772
1773
|
"font-face-name",
|
|
1773
1774
|
"missing-glyph"
|
|
1774
1775
|
]);
|
|
1775
|
-
function
|
|
1776
|
+
function Fr(e) {
|
|
1776
1777
|
if (e.length === 0)
|
|
1777
1778
|
return "";
|
|
1778
1779
|
const t = e[0];
|
|
@@ -1785,20 +1786,20 @@ function Lr(e) {
|
|
|
1785
1786
|
}
|
|
1786
1787
|
return e.trim().length === 0 ? t : e;
|
|
1787
1788
|
}
|
|
1788
|
-
const
|
|
1789
|
+
const Nr = (e) => e.replaceAll("\\", "\\\\").replace(Dr, "\\${").replaceAll("`", "\\`"), Dr = /\$\{/gu, jr = (e) => !Rr.test(e), Rr = /^[^\s"'=<>`]+$/u, Mr = /[&<>]/gu, Or = {
|
|
1789
1790
|
"&": "&",
|
|
1790
1791
|
"<": "<",
|
|
1791
1792
|
">": ">"
|
|
1792
|
-
}, Yi = (e) => e.replace(
|
|
1793
|
-
function
|
|
1793
|
+
}, Yi = (e) => e.replace(Mr, (t) => Or[t]), xt = (e) => typeof e == "string" && e.includes("-") && !Lr.has(e);
|
|
1794
|
+
function Jr(e) {
|
|
1794
1795
|
const t = [];
|
|
1795
|
-
for (const i of e.matchAll(
|
|
1796
|
-
const n = i.groups.name, s = i.groups.description.replaceAll(
|
|
1796
|
+
for (const i of e.matchAll(Kr)) {
|
|
1797
|
+
const n = i.groups.name, s = i.groups.description.replaceAll(Br, " ").trim();
|
|
1797
1798
|
t.push({ name: n, description: s.endsWith("*") ? s.slice(0, -1).trim() : s });
|
|
1798
1799
|
}
|
|
1799
1800
|
return t.length === 0 ? void 0 : t;
|
|
1800
1801
|
}
|
|
1801
|
-
const
|
|
1802
|
+
const Kr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Br = /\n\s+\*? ?/gu, Wr = ["keyed", "ref", "repeat", "live"], le = "staticHtml", Z = "staticSvg", de = "html", oe = "svg", en = Symbol("maybe HTML namespace or maybe SVG"), tn = "css", nn = "mathml", sn = [tn, de, nn, le, Z, oe], _r = new Set(sn), Ur = ["safeClassMap", "safeStyleMap", "deferLoad", "stabilizedRef"], Hr = "nothing", zr = [...Wr, ...sn, ...Ur, Hr], qr = (e) => o.isArrayLiteralExpression(e) && e.elements.every((t) => Se(t)), Se = (e) => o.isJsxElement(e) || o.isJsxSelfClosingElement(e) || o.isJsxFragment(e), ae = {
|
|
1802
1803
|
[de]: ["lit", "lit/html.js", "lit-html"],
|
|
1803
1804
|
/**
|
|
1804
1805
|
* Sadly, Lit called these "html" and "svg", rather than "staticHtml" and
|
|
@@ -1820,7 +1821,7 @@ const Jr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Kr = /\n\s+\
|
|
|
1820
1821
|
repeat: ["lit/directives/repeat.js", "lit-html/directives/repeat.js"],
|
|
1821
1822
|
ref: ["lit/directives/ref.js", "lit-html/directives/ref.js"],
|
|
1822
1823
|
nothing: ["lit", "@arcgis/lumina", "lit/html.js", "lit-html", "lit-element/lit-element.js"]
|
|
1823
|
-
}, rn = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, pe = "@arcgis/lumina:loadLitCss", Ke = "?litCss", Y = "?layeredLitCss", yt = "?globalFileLitCss",
|
|
1824
|
+
}, rn = /\.(?:css|s[ac]ss|less|styl(?:us)?|postcss|pcss|sss)(\\?|$)/u, pe = "@arcgis/lumina:loadLitCss", Ke = "?litCss", Y = "?layeredLitCss", yt = "?globalFileLitCss", Gr = (e) => ({
|
|
1824
1825
|
name: pe,
|
|
1825
1826
|
enforce: "pre",
|
|
1826
1827
|
configResolved(t) {
|
|
@@ -1860,7 +1861,7 @@ const Jr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Kr = /\n\s+\
|
|
|
1860
1861
|
if (l && (a = a.slice(0, -yt.length)), !c && !d && !l)
|
|
1861
1862
|
return await n.handler.call(this, r, a);
|
|
1862
1863
|
const p = `${a}?inline`, u = await n.handler.call(this, r, p), { code: f, ...y } = typeof u == "string" ? { code: u } : u ?? {};
|
|
1863
|
-
if (typeof f != "string" || !f.startsWith(on) || !f.endsWith(
|
|
1864
|
+
if (typeof f != "string" || !f.startsWith(on) || !f.endsWith(Vr))
|
|
1864
1865
|
return T.warn(
|
|
1865
1866
|
pe,
|
|
1866
1867
|
`Expected vite:css-post to return a JS module with a string literal. Received: ${JSON.stringify(
|
|
@@ -1870,7 +1871,7 @@ const Jr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Kr = /\n\s+\
|
|
|
1870
1871
|
if (l)
|
|
1871
1872
|
return e._globalCssString = an(f), { code: "", map: { mappings: "" } };
|
|
1872
1873
|
{
|
|
1873
|
-
const g = e.isFullApiExtraction ?
|
|
1874
|
+
const g = e.isFullApiExtraction ? Jr(r) : void 0;
|
|
1874
1875
|
if (g !== void 0) {
|
|
1875
1876
|
e._cssDocs ??= /* @__PURE__ */ new Map(), e._cssDocs.set(a, g);
|
|
1876
1877
|
const v = e._cssImports.get(a);
|
|
@@ -1890,7 +1891,7 @@ const Jr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Kr = /\n\s+\
|
|
|
1890
1891
|
}
|
|
1891
1892
|
return {
|
|
1892
1893
|
...y,
|
|
1893
|
-
code:
|
|
1894
|
+
code: Yr(f, e.hmrEnabled, e.shouldMinify, d),
|
|
1894
1895
|
/**
|
|
1895
1896
|
* Vite's original transform does not generate source maps for inlined
|
|
1896
1897
|
* css, thus we can't either
|
|
@@ -1901,8 +1902,8 @@ const Jr = /@prop\s+(?<name>--[\w-]+)\s*:(?<description>[^@/]+)/gu, Kr = /\n\s+\
|
|
|
1901
1902
|
}
|
|
1902
1903
|
};
|
|
1903
1904
|
}
|
|
1904
|
-
}), on = 'export default "',
|
|
1905
|
-
export const styles = css\``,
|
|
1905
|
+
}), on = 'export default "', Vr = '"', Xr = `import { css } from '${ae.css[0]}';
|
|
1906
|
+
export const styles = css\``, Qr = "`;\nexport default styles;", Zr = `
|
|
1906
1907
|
|
|
1907
1908
|
if(import.meta.hot) {
|
|
1908
1909
|
import.meta.hot.data.styles ??= styles;
|
|
@@ -1914,23 +1915,23 @@ if(import.meta.hot) {
|
|
|
1914
1915
|
import.meta.hot.data.styles.styleSheet.replaceSync(nextExports.styles.cssText);
|
|
1915
1916
|
});
|
|
1916
1917
|
}`, an = (e) => e.slice(on.length - 1);
|
|
1917
|
-
function
|
|
1918
|
-
const s = an(e), r = JSON.parse(s), a =
|
|
1918
|
+
function Yr(e, t, i, n) {
|
|
1919
|
+
const s = an(e), r = JSON.parse(s), a = Nr(r), c = n ? `@layer{${i ? "" : `
|
|
1919
1920
|
`}${a}${i ? "" : `
|
|
1920
1921
|
`}}` : a;
|
|
1921
|
-
return `${
|
|
1922
|
+
return `${Xr}${c}${Qr}${t ? Zr : ""}`;
|
|
1922
1923
|
}
|
|
1923
|
-
function
|
|
1924
|
-
return `import("${
|
|
1925
|
-
setCustomElementsManifest(${
|
|
1924
|
+
function eo(e) {
|
|
1925
|
+
return `import("${to}").then(({ setCustomElementsManifest }) => {
|
|
1926
|
+
setCustomElementsManifest(${io(e)});
|
|
1926
1927
|
});`;
|
|
1927
1928
|
}
|
|
1928
|
-
const
|
|
1929
|
-
function
|
|
1929
|
+
const to = "@storybook/web-components", io = (e) => `JSON.parse(\`${no(JSON.stringify(JSON.stringify(e)).slice(1, -1))}\`)`;
|
|
1930
|
+
function no(e) {
|
|
1930
1931
|
return e.replaceAll('\\"', '"').replaceAll("`", "\\`").replaceAll("${", "\\${");
|
|
1931
1932
|
}
|
|
1932
|
-
function
|
|
1933
|
-
|
|
1933
|
+
function so(e) {
|
|
1934
|
+
ro(e);
|
|
1934
1935
|
const t = e.options.css?.globalStylesPath;
|
|
1935
1936
|
if (t === void 0)
|
|
1936
1937
|
return "";
|
|
@@ -1943,7 +1944,7 @@ function no(e) {
|
|
|
1943
1944
|
`) : `import "${i}${yt}";`;
|
|
1944
1945
|
}
|
|
1945
1946
|
const cn = "hydrated";
|
|
1946
|
-
function
|
|
1947
|
+
function ro(e) {
|
|
1947
1948
|
e._globalHydratedCssString = [
|
|
1948
1949
|
":not([",
|
|
1949
1950
|
e.options.css?.hydratedAttribute ?? cn,
|
|
@@ -1960,42 +1961,42 @@ function ln(e, t) {
|
|
|
1960
1961
|
].join(`
|
|
1961
1962
|
`);
|
|
1962
1963
|
}
|
|
1963
|
-
const
|
|
1964
|
+
const oo = (e) => `@layer{${e.shouldMinify ? "" : `
|
|
1964
1965
|
`}${e._globalHydratedCssString}${e.shouldMinify ? "" : `
|
|
1965
1966
|
|
|
1966
1967
|
`}${e._globalCssString ? JSON.parse(e._globalCssString) : ""}${e.shouldMinify ? "" : `
|
|
1967
1968
|
`}}`;
|
|
1968
|
-
function
|
|
1969
|
+
function ao(e) {
|
|
1969
1970
|
const t = [], i = [];
|
|
1970
1971
|
for (const n of e.privateApiJson.modules) {
|
|
1971
1972
|
t.push(n.path);
|
|
1972
1973
|
for (const s of n.declarations)
|
|
1973
|
-
"customElement" in s && i.push(
|
|
1974
|
+
"customElement" in s && i.push(lo(s, e, n.path));
|
|
1974
1975
|
}
|
|
1975
1976
|
return [
|
|
1976
1977
|
'import { runtime } from "./runtime";',
|
|
1977
1978
|
'import { makeDefineCustomElements } from "@arcgis/lumina";',
|
|
1978
|
-
|
|
1979
|
-
e.hmrEnabled ?
|
|
1979
|
+
so(e),
|
|
1980
|
+
e.hmrEnabled ? uo : "",
|
|
1980
1981
|
"",
|
|
1981
|
-
e.isInStorybook ?
|
|
1982
|
+
e.isInStorybook ? eo(e.apiJson) : "",
|
|
1982
1983
|
"",
|
|
1983
1984
|
"export const defineCustomElements = makeDefineCustomElements(runtime, {",
|
|
1984
1985
|
i.join(`,
|
|
1985
1986
|
`),
|
|
1986
1987
|
"});",
|
|
1987
|
-
e.hmrEnabled ?
|
|
1988
|
+
e.hmrEnabled ? mo(t) : ""
|
|
1988
1989
|
].join(`
|
|
1989
1990
|
`);
|
|
1990
1991
|
}
|
|
1991
|
-
const
|
|
1992
|
-
export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`,
|
|
1992
|
+
const co = `import "./index";
|
|
1993
|
+
export declare const defineCustomElements: import("@arcgis/lumina").DefineCustomElements;`, lo = (e, t, i) => [
|
|
1993
1994
|
` "${e.tagName}": [`,
|
|
1994
1995
|
`()=>import("${m.join(t.dir.root, i)}"),`,
|
|
1995
|
-
|
|
1996
|
+
po(e),
|
|
1996
1997
|
"]"
|
|
1997
1998
|
].join("");
|
|
1998
|
-
function
|
|
1999
|
+
function po(e) {
|
|
1999
2000
|
const { properties: t, asyncMethods: i, syncMethods: n } = dn(e), s = t.map((p) => p.join(Ss)).join(et), r = i.join(et), a = n.join(et), c = [s, r, a], d = c.findLastIndex((p) => p.length > 0), l = c.slice(0, d + 1);
|
|
2000
2001
|
return l.length > 0 ? `"${l.join(ws)}"` : "";
|
|
2001
2002
|
}
|
|
@@ -2012,15 +2013,15 @@ function dn(e) {
|
|
|
2012
2013
|
), n = i.filter((r) => r.async === !0).map((r) => r.name), s = i.filter((r) => r.async !== !0).map((r) => r.name);
|
|
2013
2014
|
return { tagName: e.tagName, properties: t, asyncMethods: n, syncMethods: s };
|
|
2014
2015
|
}
|
|
2015
|
-
const
|
|
2016
|
-
`,
|
|
2016
|
+
const uo = `import { handleHmrUpdate, handleComponentMetaUpdate } from "@arcgis/lumina/hmrSupport";
|
|
2017
|
+
`, mo = (e) => `
|
|
2017
2018
|
if(import.meta.hot) {
|
|
2018
2019
|
import.meta.hot.on("component-meta-update", handleComponentMetaUpdate);
|
|
2019
2020
|
import.meta.hot.accept([
|
|
2020
2021
|
${e.map((t) => ` "/${t}",`).join(`
|
|
2021
2022
|
`)}
|
|
2022
2023
|
], handleHmrUpdate);
|
|
2023
|
-
}`,
|
|
2024
|
+
}`, fo = async (e) => Object.fromEntries(
|
|
2024
2025
|
(await e.componentFilesPromise).map((t) => [pn(t), t])
|
|
2025
2026
|
), pn = (e, t = m.resolve("src")) => m.relative(t, m.join(e, "..", Et.slice(0, -3))), kt = async (e, t, i = t) => await ze(i, { recursive: !0 }).catch((n) => {
|
|
2026
2027
|
if (String(n).includes("ENOENT"))
|
|
@@ -2040,15 +2041,15 @@ ${e.map((t) => ` "/${t}",`).join(`
|
|
|
2040
2041
|
function we(e, t) {
|
|
2041
2042
|
if (!e.startsWith(t) || !e.endsWith(".tsx"))
|
|
2042
2043
|
return !1;
|
|
2043
|
-
const [i, n] = e.slice(0, -4).split(m.sep).slice(
|
|
2044
|
+
const [i, n] = e.slice(0, -4).split(m.sep).slice(go);
|
|
2044
2045
|
return i === n;
|
|
2045
2046
|
}
|
|
2046
|
-
const
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2047
|
+
const go = -2, Qt = 5, Zt = 1, Yt = 1, ei = 3, ti = 4, qe = o;
|
|
2048
|
+
yo(qe.createSourceMapGenerator);
|
|
2049
|
+
ho(qe.createTextWriter);
|
|
2050
|
+
vo(qe.getNewLineCharacter);
|
|
2050
2051
|
const ye = qe;
|
|
2051
|
-
function
|
|
2052
|
+
function yo(e) {
|
|
2052
2053
|
if (typeof e != "function")
|
|
2053
2054
|
throw new Error(
|
|
2054
2055
|
"Failed to find ts.createSourceMapGenerator() function. Lumina needs to be updated to support the new TypeScript version"
|
|
@@ -2058,7 +2059,7 @@ function go(e) {
|
|
|
2058
2059
|
`ts.createSourceMapGenerator() signature changed. Expected ${Qt} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
2059
2060
|
);
|
|
2060
2061
|
}
|
|
2061
|
-
function
|
|
2062
|
+
function ho(e) {
|
|
2062
2063
|
if (typeof e != "function")
|
|
2063
2064
|
throw new Error(
|
|
2064
2065
|
"Failed to find ts.createTextWriter() function. Lumina needs to be updated to support the new TypeScript version"
|
|
@@ -2068,7 +2069,7 @@ function yo(e) {
|
|
|
2068
2069
|
`ts.createTextWriter() signature changed. Expected ${Zt} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
2069
2070
|
);
|
|
2070
2071
|
}
|
|
2071
|
-
function
|
|
2072
|
+
function vo(e) {
|
|
2072
2073
|
if (typeof e != "function")
|
|
2073
2074
|
throw new Error(
|
|
2074
2075
|
"Failed to find ts.getNewLineCharacter() function. Lumina needs to be updated to support the new TypeScript version"
|
|
@@ -2078,7 +2079,7 @@ function ho(e) {
|
|
|
2078
2079
|
`ts.getNewLineCharacter() signature changed. Expected ${Yt} argument. Lumina needs to be updated to support the new TypeScript version`
|
|
2079
2080
|
);
|
|
2080
2081
|
}
|
|
2081
|
-
function
|
|
2082
|
+
function bo(e) {
|
|
2082
2083
|
if (typeof e != "function")
|
|
2083
2084
|
throw new Error(
|
|
2084
2085
|
"Failed to find ts.Printer.writeFile() function. Lumina needs to be updated to support the new TypeScript version"
|
|
@@ -2088,7 +2089,7 @@ function vo(e) {
|
|
|
2088
2089
|
`ts.Printer.writeFile() signature changed. Expected ${ei} arguments. Lumina needs to be updated to support the new TypeScript version`
|
|
2089
2090
|
);
|
|
2090
2091
|
}
|
|
2091
|
-
function
|
|
2092
|
+
function So(e) {
|
|
2092
2093
|
if (typeof e != "function")
|
|
2093
2094
|
throw new Error(
|
|
2094
2095
|
"Failed to find ts.Printer.writeNode() function. Lumina needs to be updated to support the new TypeScript version"
|
|
@@ -2100,23 +2101,23 @@ function bo(e) {
|
|
|
2100
2101
|
}
|
|
2101
2102
|
function un(e) {
|
|
2102
2103
|
const t = ye.createPrinter(e);
|
|
2103
|
-
return
|
|
2104
|
+
return bo(t.writeFile), So(t.writeNode), t;
|
|
2104
2105
|
}
|
|
2105
2106
|
function ii(e) {
|
|
2106
2107
|
const t = o.isUnionTypeNode(e) ? e.types.map(ni) : [ni(e)], i = new Set(t), n = i.delete("true"), s = i.delete("false");
|
|
2107
2108
|
(n || s) && i.add("boolean");
|
|
2108
2109
|
let r = Array.from(i).sort();
|
|
2109
|
-
if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length >
|
|
2110
|
-
return r.map(
|
|
2110
|
+
if (r.length > 1 && (r = r.map((a) => a.includes("=>") ? `(${a})` : a)), !(r.length > wo))
|
|
2111
|
+
return r.map(Co);
|
|
2111
2112
|
}
|
|
2112
|
-
const
|
|
2113
|
+
const wo = 40, To = (e) => e?.some(
|
|
2113
2114
|
(t) => t.type === "number" || t.type === "boolean" || t.type === "string" || /**
|
|
2114
2115
|
* Treat "any" as possibly literal, but not "unknown". Matches Stencil
|
|
2115
2116
|
* behavior.
|
|
2116
2117
|
*/
|
|
2117
2118
|
t.type === "any"
|
|
2118
|
-
) ?? !1,
|
|
2119
|
-
function
|
|
2119
|
+
) ?? !1, Eo = (e) => e.length === 1 && e[0].type !== "string" && e[0].type !== "number" && e[0].type !== "boolean" && e[0].type !== "any" ? void 0 : e, mn = (e) => e.map(fn).join(" | "), fn = (e) => e.type === "string" && e.value !== void 0 ? `"${e.value}"` : e.value ?? e.type;
|
|
2120
|
+
function Co(e) {
|
|
2120
2121
|
return e === "boolean" ? { type: "boolean" } : Number.isNaN(Number.parseFloat(e)) ? e.startsWith('"') || e.startsWith("'") ? {
|
|
2121
2122
|
value: e.slice(1, -1),
|
|
2122
2123
|
type: "string"
|
|
@@ -2127,25 +2128,25 @@ function Eo(e) {
|
|
|
2127
2128
|
type: "number"
|
|
2128
2129
|
};
|
|
2129
2130
|
}
|
|
2130
|
-
const
|
|
2131
|
+
const $o = (e, t, i, n) => {
|
|
2131
2132
|
const s = e.typeScriptTypeChecker, r = o.isSetAccessor(t) ? t.parameters[0] : t, a = s.getTypeAtLocation(r), c = !i;
|
|
2132
2133
|
return Be(s, a, n, e.dir, c);
|
|
2133
2134
|
};
|
|
2134
|
-
function
|
|
2135
|
+
function Po(e, t) {
|
|
2135
2136
|
if (e.length === 0)
|
|
2136
2137
|
return;
|
|
2137
|
-
const i = t.matchAll(
|
|
2138
|
+
const i = t.matchAll(xo), n = [];
|
|
2138
2139
|
for (const s of i) {
|
|
2139
2140
|
const r = e.find((a) => a.name === s[0]);
|
|
2140
2141
|
r !== void 0 && n.push({ ...r, start: s.index, end: s.index + r.name.length });
|
|
2141
2142
|
}
|
|
2142
2143
|
return n.length === 0 ? void 0 : n;
|
|
2143
2144
|
}
|
|
2144
|
-
const
|
|
2145
|
+
const xo = /"[^"]+"|'[^"]+'|\w+/gu;
|
|
2145
2146
|
function Be(e, t, i, n, s = !1) {
|
|
2146
2147
|
let { typeNode: r, references: a } = ri(e, t, i, n), c = ii(r);
|
|
2147
2148
|
c === void 0 && ({ typeNode: r, references: a } = ri(e, t, i, n, !1), c = ii(r) ?? []);
|
|
2148
|
-
const d = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, l = mn(d), p =
|
|
2149
|
+
const d = s ? c.filter((f) => f.type !== "null" && f.type !== "undefined") : c, l = mn(d), p = Eo(d), u = Po(a, l);
|
|
2149
2150
|
return {
|
|
2150
2151
|
text: l,
|
|
2151
2152
|
references: u,
|
|
@@ -2153,21 +2154,21 @@ function Be(e, t, i, n, s = !1) {
|
|
|
2153
2154
|
};
|
|
2154
2155
|
}
|
|
2155
2156
|
function ni(e) {
|
|
2156
|
-
|
|
2157
|
+
ko.writeNode(o.EmitHint.Unspecified, e, void 0, nt);
|
|
2157
2158
|
const t = nt.getText();
|
|
2158
2159
|
return nt.clear(), t;
|
|
2159
2160
|
}
|
|
2160
|
-
const
|
|
2161
|
-
`), gn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals,
|
|
2162
|
-
function
|
|
2161
|
+
const ko = un({ removeComments: !0 }), nt = ye.createTextWriter(`
|
|
2162
|
+
`), gn = o.TypeFormatFlags.NoTruncation | o.TypeFormatFlags.WriteArrayAsGenericType | o.TypeFormatFlags.SuppressAnyReturnType | o.TypeFormatFlags.MultilineObjectLiterals, Io = gn & o.TypeFormatFlags.NodeBuilderFlagsMask, Ao = Io | o.NodeBuilderFlags.IgnoreErrors | o.NodeBuilderFlags.NoTruncation;
|
|
2163
|
+
function Lo(e, t, i, n = !0) {
|
|
2163
2164
|
const s = /* @__PURE__ */ new Map();
|
|
2164
2165
|
se(t, s, i, n);
|
|
2165
2166
|
const r = t.flags & o.TypeFlags.Union ? t.types.every(si) : si(t), a = e.typeToTypeNode(
|
|
2166
2167
|
t,
|
|
2167
2168
|
void 0,
|
|
2168
|
-
|
|
2169
|
+
Ao & (r ? ~o.TypeFormatFlags.MultilineObjectLiterals : -1)
|
|
2169
2170
|
);
|
|
2170
|
-
return s.forEach(
|
|
2171
|
+
return s.forEach(Fo), a === void 0 ? (T.warn("@arcgis/lumina", "Unexpected case: Failed to convert type to type node."), o.factory.createTypeReferenceNode(o.factory.createIdentifier("unknown"), void 0)) : a;
|
|
2171
2172
|
}
|
|
2172
2173
|
const si = (e) => e.flags & o.TypeFlags.Object ? e.getProperties().length === 1 : !!(e.flags & o.TypeFlags.PossiblyFalsy);
|
|
2173
2174
|
function ri(e, t, i, n, s = !0) {
|
|
@@ -2199,10 +2200,10 @@ function ri(e, t, i, n, s = !0) {
|
|
|
2199
2200
|
name: f,
|
|
2200
2201
|
package: void 0,
|
|
2201
2202
|
module: "index.js"
|
|
2202
|
-
} :
|
|
2203
|
+
} : No(u, f, i, n);
|
|
2203
2204
|
r.push(y), a.add(f);
|
|
2204
2205
|
}
|
|
2205
|
-
return { typeNode:
|
|
2206
|
+
return { typeNode: Lo(e, t, c, s), references: r };
|
|
2206
2207
|
}
|
|
2207
2208
|
function se(e, t, i, n = !0) {
|
|
2208
2209
|
if (typeof e != "object" || e === null || !("checker" in e))
|
|
@@ -2232,10 +2233,10 @@ function se(e, t, i, n = !0) {
|
|
|
2232
2233
|
c !== "resolvedBaseConstructorType" && c !== "resolvedBaseTypes" && c !== "typeParameters" && c !== "typeParameter" && (Array.isArray(d) ? d.forEach((l) => se(l, t, i, n)) : se(d, t, i, n));
|
|
2233
2234
|
});
|
|
2234
2235
|
}
|
|
2235
|
-
function
|
|
2236
|
+
function Fo(e, t) {
|
|
2236
2237
|
e.origin !== void 0 && (t.origin = e.origin), e.aliasSymbol !== void 0 && (t.aliasSymbol = e.aliasSymbol), e.aliasTypeArguments !== void 0 && (t.aliasTypeArguments = e.aliasTypeArguments);
|
|
2237
2238
|
}
|
|
2238
|
-
function
|
|
2239
|
+
function No(e, t, i, n) {
|
|
2239
2240
|
const s = e?.declarations?.map((c) => c.getSourceFile()) ?? [];
|
|
2240
2241
|
if (s.length === 0) {
|
|
2241
2242
|
if (t === "Array")
|
|
@@ -2256,7 +2257,7 @@ function Fo(e, t, i, n) {
|
|
|
2256
2257
|
package: Oi,
|
|
2257
2258
|
module: void 0
|
|
2258
2259
|
};
|
|
2259
|
-
const { packageName: r, moduleName: a } =
|
|
2260
|
+
const { packageName: r, moduleName: a } = Do(s[0].fileName, n);
|
|
2260
2261
|
return r ? {
|
|
2261
2262
|
name: t,
|
|
2262
2263
|
package: r,
|
|
@@ -2268,7 +2269,7 @@ function Fo(e, t, i, n) {
|
|
|
2268
2269
|
module: a
|
|
2269
2270
|
};
|
|
2270
2271
|
}
|
|
2271
|
-
function
|
|
2272
|
+
function Do(e, t) {
|
|
2272
2273
|
const i = e.split("/node_modules/");
|
|
2273
2274
|
if (i.length > 1) {
|
|
2274
2275
|
const a = i.at(-1);
|
|
@@ -2281,18 +2282,18 @@ function No(e, t) {
|
|
|
2281
2282
|
}
|
|
2282
2283
|
return {
|
|
2283
2284
|
packageName: void 0,
|
|
2284
|
-
moduleName: m.relative(t.root, jo(
|
|
2285
|
+
moduleName: m.relative(t.root, Ro(jo(e, t)))
|
|
2285
2286
|
};
|
|
2286
2287
|
}
|
|
2287
|
-
function
|
|
2288
|
+
function jo(e, t) {
|
|
2288
2289
|
return we(e, t.srcComponents) ? m.join(t.dist, pn(e, t.src)) : e.startsWith(t.src) ? m.join(t.dist, e.slice(t.src.length)) : e;
|
|
2289
2290
|
}
|
|
2290
|
-
const
|
|
2291
|
+
const Ro = (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`;
|
|
2291
2292
|
function yn(e) {
|
|
2292
2293
|
const t = e.split("/"), n = e[0].startsWith("@") ? 2 : 1, s = t.slice(0, n).join("/"), r = t.slice(n).join("/");
|
|
2293
2294
|
return { packageName: s, moduleName: r };
|
|
2294
2295
|
}
|
|
2295
|
-
const
|
|
2296
|
+
const Mo = (e) => e.includes("/node_modules/") || e.includes("/dist/");
|
|
2296
2297
|
function oi(e, t, i) {
|
|
2297
2298
|
const n = e.declarations;
|
|
2298
2299
|
if (n !== void 0)
|
|
@@ -2306,7 +2307,7 @@ function oi(e, t, i) {
|
|
|
2306
2307
|
for (const c of a) {
|
|
2307
2308
|
const d = ai(c, t, i);
|
|
2308
2309
|
if (d !== void 0)
|
|
2309
|
-
return
|
|
2310
|
+
return i === "core" && d.includes("#event-") ? d : Oo(d);
|
|
2310
2311
|
}
|
|
2311
2312
|
}
|
|
2312
2313
|
}
|
|
@@ -2330,15 +2331,15 @@ function ai(e, t, i) {
|
|
|
2330
2331
|
});
|
|
2331
2332
|
});
|
|
2332
2333
|
}
|
|
2333
|
-
const
|
|
2334
|
-
function
|
|
2334
|
+
const Oo = (e) => e.split("#")[0], Jo = "@arcgis/lumina:addMethodMetadata";
|
|
2335
|
+
function Ko(e, t, i, n, s) {
|
|
2335
2336
|
const r = i.getSignatureFromDeclaration(e);
|
|
2336
2337
|
if (r === void 0)
|
|
2337
2338
|
return;
|
|
2338
2339
|
for (const l of e.parameters) {
|
|
2339
2340
|
if (!o.isIdentifier(l.name)) {
|
|
2340
2341
|
T.warn(
|
|
2341
|
-
|
|
2342
|
+
Jo,
|
|
2342
2343
|
`Object binding patterns are not yet supported in the docs. Found ${l.name?.getText(n)} in ${e.name.getText(n)}`,
|
|
2343
2344
|
n.fileName
|
|
2344
2345
|
);
|
|
@@ -2359,8 +2360,8 @@ function Jo(e, t, i, n, s) {
|
|
|
2359
2360
|
type: c
|
|
2360
2361
|
}, t.signature = d.replace(" =>", ":");
|
|
2361
2362
|
}
|
|
2362
|
-
const
|
|
2363
|
-
function
|
|
2363
|
+
const Bo = (e) => e.modifiers?.some?.((t) => t.kind === o.SyntaxKind.AsyncKeyword) ?? !1;
|
|
2364
|
+
function Wo(e, t, i, n) {
|
|
2364
2365
|
const s = i.typeScriptTypeChecker, a = s.getTypeAtLocation(e).getProperty("emit");
|
|
2365
2366
|
if (a?.valueDeclaration === void 0)
|
|
2366
2367
|
return;
|
|
@@ -2385,11 +2386,11 @@ function Bo(e, t, i, n) {
|
|
|
2385
2386
|
composed: void 0,
|
|
2386
2387
|
privacy: void 0
|
|
2387
2388
|
};
|
|
2388
|
-
return ge(e.name, s, y),
|
|
2389
|
+
return ge(e.name, s, y), _o(e, y, n), y.privacy === void 0 ? y : void 0;
|
|
2389
2390
|
}
|
|
2390
2391
|
}
|
|
2391
2392
|
const Fe = "createEvent";
|
|
2392
|
-
function
|
|
2393
|
+
function _o(e, t, i) {
|
|
2393
2394
|
if (!e.initializer || !o.isCallExpression(e.initializer))
|
|
2394
2395
|
return;
|
|
2395
2396
|
const n = e.initializer;
|
|
@@ -2440,7 +2441,7 @@ class We extends us {
|
|
|
2440
2441
|
const i = super.extractModules(t);
|
|
2441
2442
|
for (const n of i)
|
|
2442
2443
|
for (const s of n.declarations)
|
|
2443
|
-
"customElement" in s && (this.context.isFullApiExtraction &&
|
|
2444
|
+
"customElement" in s && (this.context.isFullApiExtraction && zo(s, this.context, this.indexedComponents), this.inheritMembers(s, i), this.context.isFullApiExtraction && (s.members.sort(st), s.attributes?.sort(st), s.events?.sort(st)));
|
|
2444
2445
|
return i;
|
|
2445
2446
|
}
|
|
2446
2447
|
extractDeclarations(t) {
|
|
@@ -2513,7 +2514,7 @@ class We extends us {
|
|
|
2513
2514
|
}
|
|
2514
2515
|
if (this.apiComponent = s, s.members = this.extractComponentMembers(t), this.context.isFullApiExtraction) {
|
|
2515
2516
|
s.attributes = this.inferAttributes(s.members), this.indexedComponents.set(i, s);
|
|
2516
|
-
const a =
|
|
2517
|
+
const a = Js(n, this.context, this.apiModule.path);
|
|
2517
2518
|
if (s.importPath = `components/${a}`, this.localCssImports !== void 0) {
|
|
2518
2519
|
for (const f of this.localCssImports) {
|
|
2519
2520
|
const y = this.context._cssImports.get(f);
|
|
@@ -2623,13 +2624,13 @@ console.log("${s.tagName} is ready to go!");
|
|
|
2623
2624
|
inheritedFrom: void 0,
|
|
2624
2625
|
privacy: void 0
|
|
2625
2626
|
};
|
|
2626
|
-
return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, d), (r === void 0 && (d.type.values === void 0 || !
|
|
2627
|
+
return this.context.isFullApiExtraction && (this.extractComponentFieldDetails(t, d), (r === void 0 && (d.type.values === void 0 || !To(d.type.values)) || d.readonly && !d.reflects) && (d.attribute = void 0)), d;
|
|
2627
2628
|
}
|
|
2628
2629
|
/**
|
|
2629
2630
|
* Based on a `non-@property()` property, extract a public event if it is one.
|
|
2630
2631
|
*/
|
|
2631
2632
|
extractComponentEvent(t, i) {
|
|
2632
|
-
const n =
|
|
2633
|
+
const n = Wo(t, i, this.context, this.file);
|
|
2633
2634
|
return n !== void 0 && this.copyDoc(this.copyDocDefinitions?.events?.[i], n, this.apiComponent), n;
|
|
2634
2635
|
}
|
|
2635
2636
|
/**
|
|
@@ -2646,7 +2647,7 @@ console.log("${s.tagName} is ready to go!");
|
|
|
2646
2647
|
// in the documentation. The full type is still present in the .d.ts files.
|
|
2647
2648
|
i.name === "messageOverrides" ? {
|
|
2648
2649
|
text: "Record<string, unknown>"
|
|
2649
|
-
} :
|
|
2650
|
+
} : $o(this.context, l, f, this.file);
|
|
2650
2651
|
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);
|
|
2651
2652
|
if ("initializer" in t && t.initializer !== void 0 && (!i.default || !i.description) || y) {
|
|
2652
2653
|
const v = t.initializer, h = s.getSymbolAtLocation(v), b = h !== void 0 && ((h.flags ?? 0) & o.SymbolFlags.Alias) !== 0 ? s.getAliasedSymbol(h) : h, w = b?.getDeclarations() ?? [];
|
|
@@ -2703,12 +2704,12 @@ console.log("${s.tagName} is ready to go!");
|
|
|
2703
2704
|
inheritedFrom: void 0,
|
|
2704
2705
|
docsTags: void 0,
|
|
2705
2706
|
signature: "",
|
|
2706
|
-
async:
|
|
2707
|
+
async: Bo(t) ? !0 : void 0,
|
|
2707
2708
|
privacy: void 0
|
|
2708
2709
|
};
|
|
2709
2710
|
if (this.context.isFullApiExtraction) {
|
|
2710
2711
|
const s = this.context.typeScriptTypeChecker;
|
|
2711
|
-
|
|
2712
|
+
Ko(t, n, s, this.file, this.context.dir), this.copyDoc(this.copyDocDefinitions?.methods?.[i], n, this.apiComponent);
|
|
2712
2713
|
}
|
|
2713
2714
|
return n;
|
|
2714
2715
|
}
|
|
@@ -2803,16 +2804,16 @@ const ue = {
|
|
|
2803
2804
|
name: "LitElement",
|
|
2804
2805
|
package: "@arcgis/lumina"
|
|
2805
2806
|
}, st = (e, t) => e.name.localeCompare(t.name);
|
|
2806
|
-
async function
|
|
2807
|
+
async function Uo(e, t) {
|
|
2807
2808
|
t || (e.componentFilesPromise = kt(e, e.dir.srcComponents));
|
|
2808
|
-
const i = await e.componentFilesPromise, n = await
|
|
2809
|
+
const i = await e.componentFilesPromise, n = await ea(e, i);
|
|
2809
2810
|
await e.componentStoriesPromise, e._componentPathMapping = {}, e._localDefinedComponents = void 0;
|
|
2810
2811
|
const s = hn(n, e, !1);
|
|
2811
2812
|
e.privateApiJson = s;
|
|
2812
2813
|
const [r, a] = vn(s);
|
|
2813
2814
|
return e.apiJsonComponents = a, e.apiJson = r, s;
|
|
2814
2815
|
}
|
|
2815
|
-
function
|
|
2816
|
+
function Ho(e, t, i) {
|
|
2816
2817
|
const n = e.getSourceFile(t, i), s = hn([n], e, !0), r = s.modules[0];
|
|
2817
2818
|
{
|
|
2818
2819
|
const f = vn(s)[0].modules[0], y = e.apiJson.modules.findIndex((h) => h.path === f.path), g = e.apiJson.modules[y], v = Array.from(e.apiJson.modules);
|
|
@@ -2857,8 +2858,8 @@ function vn(e) {
|
|
|
2857
2858
|
}
|
|
2858
2859
|
return [t, i];
|
|
2859
2860
|
}
|
|
2860
|
-
function
|
|
2861
|
-
const n =
|
|
2861
|
+
function zo(e, t, i) {
|
|
2862
|
+
const n = qo(i, e);
|
|
2862
2863
|
O(e, n, t);
|
|
2863
2864
|
for (const s of e.members) {
|
|
2864
2865
|
if (s.kind === "field")
|
|
@@ -2895,12 +2896,12 @@ function Ho(e, t, i) {
|
|
|
2895
2896
|
}
|
|
2896
2897
|
function Ne(e, t, i) {
|
|
2897
2898
|
e !== void 0 && (e.references?.reduce(
|
|
2898
|
-
(n, s) =>
|
|
2899
|
+
(n, s) => Go(s, t, i, n),
|
|
2899
2900
|
0
|
|
2900
2901
|
), e.text = e.text.replaceAll(
|
|
2901
|
-
|
|
2902
|
+
Yo,
|
|
2902
2903
|
(n, s) => At(t.get(s)) ?? n
|
|
2903
|
-
), e.values?.forEach(
|
|
2904
|
+
), e.values?.forEach(Vo, t));
|
|
2904
2905
|
}
|
|
2905
2906
|
function O(e, t, i) {
|
|
2906
2907
|
if (e.description && (e.description = e.description.replaceAll(rt, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl)), e.docsTags)
|
|
@@ -2908,7 +2909,7 @@ function O(e, t, i) {
|
|
|
2908
2909
|
n.text && (n.text = n.text.replaceAll(rt, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
|
|
2909
2910
|
typeof e.deprecated == "string" && (e.deprecated = e.deprecated.replaceAll(rt, t).replaceAll(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl));
|
|
2910
2911
|
}
|
|
2911
|
-
const rt = /\{@link ([^}]+)\}/gu,
|
|
2912
|
+
const rt = /\{@link ([^}]+)\}/gu, qo = (e, t) => (i, n) => {
|
|
2912
2913
|
let s = n.indexOf(" ");
|
|
2913
2914
|
s === -1 && (s = n.length);
|
|
2914
2915
|
const r = n.slice(0, s), a = n.slice(s + 1);
|
|
@@ -2925,14 +2926,14 @@ const rt = /\{@link ([^}]+)\}/gu, zo = (e, t) => (i, n) => {
|
|
|
2925
2926
|
`Failed to find documentation URL for ${c} in ${t.name}. Make sure the following Lumina configuration option is set: documentation.getComponentDocsUrl`
|
|
2926
2927
|
);
|
|
2927
2928
|
if (d === void 0)
|
|
2928
|
-
return `[${a || l.
|
|
2929
|
+
return `[${a || l.tagName}](${p})`;
|
|
2929
2930
|
if ((l.members.find((g) => g.name === d) ?? l.events?.find((g) => g.name === d)) === void 0)
|
|
2930
2931
|
throw Error(
|
|
2931
2932
|
`Failed to find ${d} member in ${c}. Found it referenced by the following link in ${t.name}: ${i}. Make sure the link follows the pattern {@link ComponentClassName#propertyOrMethodOrEventName}.`
|
|
2932
2933
|
);
|
|
2933
2934
|
return `[${a || (l === t ? d : `${l.tagName}.${d}`)}](${p}#${d})`;
|
|
2934
2935
|
};
|
|
2935
|
-
function
|
|
2936
|
+
function Go(e, t, i, n) {
|
|
2936
2937
|
if (e.viewUrl !== void 0 && (e.viewUrl = e.viewUrl.replace(
|
|
2937
2938
|
i.alternativeDocumentationUrl,
|
|
2938
2939
|
i.normalizedDocumentationUrl
|
|
@@ -2946,31 +2947,31 @@ function qo(e, t, i, n) {
|
|
|
2946
2947
|
const r = e.name.length;
|
|
2947
2948
|
e.name = At(s);
|
|
2948
2949
|
const a = e.name.length - r - ci;
|
|
2949
|
-
e.viewUrl = s.demos?.at(0)?.url.replace(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl), e.start = e.start - ci, e.end = e.end + a, n += a -
|
|
2950
|
+
e.viewUrl = s.demos?.at(0)?.url.replace(i.alternativeDocumentationUrl, i.normalizedDocumentationUrl), e.start = e.start - ci, e.end = e.end + a, n += a - Zo;
|
|
2950
2951
|
}
|
|
2951
2952
|
}
|
|
2952
2953
|
return n;
|
|
2953
2954
|
}
|
|
2954
|
-
function
|
|
2955
|
+
function Vo(e) {
|
|
2955
2956
|
e.type.startsWith("ToElement<") && (e.type = At(this.get(e.type.slice(10, -1))) ?? e.type);
|
|
2956
2957
|
}
|
|
2957
|
-
const At = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0,
|
|
2958
|
-
async function
|
|
2958
|
+
const At = (e) => e ? `HTML${e.pascalCaseName}Element` : void 0, Xo = "ToElement<", ci = Xo.length, Qo = ">", Zo = Qo.length, Yo = /ToElement<(\w+)>/gu;
|
|
2959
|
+
async function ea(e, t) {
|
|
2959
2960
|
if (e.viteCommand === "serve" && (Object.hasOwn(e, "typeScriptHost") || (e.typeScriptHost = o.createCompilerHost(e.typeScriptConfig, !1))), e.typeScriptProgram !== void 0) {
|
|
2960
2961
|
const i = e.typeScriptProgram.getSourceFiles(), n = new Set(t);
|
|
2961
2962
|
return i.filter((s) => n.has(s.fileName));
|
|
2962
2963
|
} else
|
|
2963
2964
|
return await Promise.all(
|
|
2964
2965
|
t.map(async (i) => {
|
|
2965
|
-
const n = await
|
|
2966
|
+
const n = await B(i, "utf8");
|
|
2966
2967
|
return e.getSourceFile(i, n);
|
|
2967
2968
|
})
|
|
2968
2969
|
);
|
|
2969
2970
|
}
|
|
2970
2971
|
async function bn(e, t) {
|
|
2971
|
-
return Te ??=
|
|
2972
|
+
return Te ??= ia(e, t), await Te;
|
|
2972
2973
|
}
|
|
2973
|
-
function
|
|
2974
|
+
function ta() {
|
|
2974
2975
|
if (_e === void 0)
|
|
2975
2976
|
throw Error(
|
|
2976
2977
|
S(
|
|
@@ -2990,9 +2991,9 @@ function Sn() {
|
|
|
2990
2991
|
);
|
|
2991
2992
|
return ht;
|
|
2992
2993
|
}
|
|
2993
|
-
async function
|
|
2994
|
+
async function ia(e, t) {
|
|
2994
2995
|
const i = j(e), n = i.dependencies ?? {}, s = i.peerDependencies ?? {}, a = (await Promise.all(
|
|
2995
|
-
[...Object.keys(n), ...Object.keys(s)].filter((l) => !
|
|
2996
|
+
[...Object.keys(n), ...Object.keys(s)].filter((l) => !na.has(l)).flatMap(async (l) => await wn(l, e))
|
|
2996
2997
|
)).filter(D);
|
|
2997
2998
|
_e ??= a, ht = Object.fromEntries(a.flatMap((l) => Object.entries(l.components)));
|
|
2998
2999
|
const c = t?.serve?.extraDependencies?.map(
|
|
@@ -3000,7 +3001,7 @@ async function ta(e, t) {
|
|
|
3000
3001
|
), d = c === void 0 ? a : a.filter((l) => !c.includes(l.packageName));
|
|
3001
3002
|
return _e ??= d, d;
|
|
3002
3003
|
}
|
|
3003
|
-
const
|
|
3004
|
+
const na = /* @__PURE__ */ new Set([
|
|
3004
3005
|
"@arcgis/arcade-languageservice",
|
|
3005
3006
|
"@arcgis/components-build-utils",
|
|
3006
3007
|
"@arcgis/toolkit",
|
|
@@ -3038,11 +3039,11 @@ const ia = /* @__PURE__ */ new Set([
|
|
|
3038
3039
|
]);
|
|
3039
3040
|
let _e, ht, Te;
|
|
3040
3041
|
async function wn(e, t) {
|
|
3041
|
-
const i = await Di(e, t), n = await ji(i), s = "exports" in n, r =
|
|
3042
|
+
const i = await Di(e, t), n = await ji(i), s = "exports" in n, r = la.bind(void 0, s), a = "@stencil/core" in (n.dependencies ?? {}) || "@stencil/core" in (n.devDependencies ?? {}), c = m.join(i, "dist/esm/loader.js");
|
|
3042
3043
|
if (a ? await _(c) : !1) {
|
|
3043
|
-
const y = await
|
|
3044
|
+
const y = await B(c, "utf8"), g = sa(y, "bootstrapLazy("), v = y.indexOf(", options", g), h = y.slice(g, v), b = h.startsWith('JSON.parse("') ? h.slice(12, -2).replaceAll('\\"', '"') : h;
|
|
3044
3045
|
try {
|
|
3045
|
-
const w = JSON.parse(b), P =
|
|
3046
|
+
const w = JSON.parse(b), P = aa(w, { packageName: e, getImportPath: r });
|
|
3046
3047
|
return { packageName: e, type: "stencil", components: P, packageLocation: i, packageJson: n };
|
|
3047
3048
|
} catch (w) {
|
|
3048
3049
|
T.warn("@arcgis/lumina", `Failed to parse dist/esm/loader.js for ${e}.
|
|
@@ -3051,7 +3052,7 @@ Error: ${String(w)}`);
|
|
|
3051
3052
|
}
|
|
3052
3053
|
const l = li(n.customElements);
|
|
3053
3054
|
if (l != null) {
|
|
3054
|
-
const y = m.join(i, l), g = JSON.parse(await
|
|
3055
|
+
const y = m.join(i, l), g = JSON.parse(await B(y, "utf-8")), v = ra(g), h = Tn(g, {
|
|
3055
3056
|
packageName: e,
|
|
3056
3057
|
getImportPath: r
|
|
3057
3058
|
});
|
|
@@ -3059,7 +3060,7 @@ Error: ${String(w)}`);
|
|
|
3059
3060
|
}
|
|
3060
3061
|
const p = li(n["web-types"]);
|
|
3061
3062
|
if (p != null) {
|
|
3062
|
-
const y = m.join(i, p), g = JSON.parse(await
|
|
3063
|
+
const y = m.join(i, p), g = JSON.parse(await B(y, "utf-8")), v = oa(g, {
|
|
3063
3064
|
packageName: e,
|
|
3064
3065
|
getImportPath: r,
|
|
3065
3066
|
packageRoot: i
|
|
@@ -3068,7 +3069,7 @@ Error: ${String(w)}`);
|
|
|
3068
3069
|
}
|
|
3069
3070
|
const u = m.join(i, "dist/components");
|
|
3070
3071
|
if (await _(u)) {
|
|
3071
|
-
const y = await
|
|
3072
|
+
const y = await ca(u, {
|
|
3072
3073
|
packageName: e,
|
|
3073
3074
|
getImportPath: r
|
|
3074
3075
|
});
|
|
@@ -3076,7 +3077,7 @@ Error: ${String(w)}`);
|
|
|
3076
3077
|
}
|
|
3077
3078
|
}
|
|
3078
3079
|
const li = (e) => Array.isArray(e) ? e[0] : e;
|
|
3079
|
-
function
|
|
3080
|
+
function sa(e, t) {
|
|
3080
3081
|
const i = e.indexOf(t);
|
|
3081
3082
|
return i === -1 ? -1 : i + t.length;
|
|
3082
3083
|
}
|
|
@@ -3098,7 +3099,7 @@ function Tn(e, t) {
|
|
|
3098
3099
|
}
|
|
3099
3100
|
return i;
|
|
3100
3101
|
}
|
|
3101
|
-
const
|
|
3102
|
+
const ra = (e) => e.compiler?.name === It, oa = (e, t) => Object.fromEntries(
|
|
3102
3103
|
(e.contributions?.html?.elements ?? e.contributions?.html?.tags)?.map(
|
|
3103
3104
|
(i) => [
|
|
3104
3105
|
i.name,
|
|
@@ -3109,7 +3110,7 @@ const sa = (e) => e.compiler?.name === It, ra = (e, t) => Object.fromEntries(
|
|
|
3109
3110
|
}
|
|
3110
3111
|
]
|
|
3111
3112
|
) ?? []
|
|
3112
|
-
),
|
|
3113
|
+
), aa = (e, t) => Object.fromEntries(
|
|
3113
3114
|
e.flatMap(
|
|
3114
3115
|
([i, n]) => n.map(
|
|
3115
3116
|
([s, r, a]) => [
|
|
@@ -3127,7 +3128,7 @@ const sa = (e) => e.compiler?.name === It, ra = (e, t) => Object.fromEntries(
|
|
|
3127
3128
|
]
|
|
3128
3129
|
)
|
|
3129
3130
|
)
|
|
3130
|
-
),
|
|
3131
|
+
), ca = async (e, t) => Object.fromEntries(
|
|
3131
3132
|
(await ze(e)).filter((i) => i.endsWith(".d.ts")).map((i) => {
|
|
3132
3133
|
const n = i.slice(0, -5);
|
|
3133
3134
|
return [
|
|
@@ -3139,16 +3140,16 @@ const sa = (e) => e.compiler?.name === It, ra = (e, t) => Object.fromEntries(
|
|
|
3139
3140
|
}
|
|
3140
3141
|
];
|
|
3141
3142
|
})
|
|
3142
|
-
),
|
|
3143
|
+
), la = (e, t) => e ? `components/${t}` : `dist/components/${t}.js`, da = (e) => e.startsWith("/") ? e : `/${e}`, Lt = (e, t) => `${e}@fs${da(t)}`;
|
|
3143
3144
|
function Ge(e = j(), t = !1, i = e.name === "@esri/calcite-components") {
|
|
3144
3145
|
const n = e.version.includes("next"), s = e.name === "@esri/calcite-components";
|
|
3145
3146
|
if (s && n)
|
|
3146
3147
|
return `https://cdn.jsdelivr.net/npm/@esri/calcite-components@${e.version}/dist/calcite/`;
|
|
3147
|
-
const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a =
|
|
3148
|
+
const r = t || n ? "jsdev.arcgis.com" : "js.arcgis.com", a = pa(e.name), c = ua(e.version, i);
|
|
3148
3149
|
return a.length === 0 ? `https://${r}/${c}/` : s ? `https://${r}/${a}/${c}/` : `https://${r}/${c}/${a}/`;
|
|
3149
3150
|
}
|
|
3150
|
-
const
|
|
3151
|
-
function
|
|
3151
|
+
const pa = (e) => e.split("/").pop() ?? e;
|
|
3152
|
+
function ua(e, t) {
|
|
3152
3153
|
if (/\d+\.\d+\.\d+-(?:.*)$/u.test(e))
|
|
3153
3154
|
return "next";
|
|
3154
3155
|
const n = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/u, s = e.match(n);
|
|
@@ -3177,14 +3178,14 @@ function ne(e) {
|
|
|
3177
3178
|
return (
|
|
3178
3179
|
// Inlined string literal
|
|
3179
3180
|
typeof e == "string" || // Syntax kinds that are never undefined
|
|
3180
|
-
|
|
3181
|
+
ma.has(e.kind) || // Ternary with both branches never undefined
|
|
3181
3182
|
o.isConditionalExpression(e) && ne(e.whenTrue) && ne(e.whenFalse) || // Binary expression with operator that never results in undefined Or both sides are definitely not undefined
|
|
3182
|
-
o.isBinaryExpression(e) && (
|
|
3183
|
+
o.isBinaryExpression(e) && (fa.has(e.operatorToken.kind) || ne(e.left) && ne(e.right)) || // `as`, `satisfies`, `()` with definitely not undefined expression
|
|
3183
3184
|
(o.isParenthesizedExpression(e) || o.isSatisfiesExpression(e) || o.isAsExpression(e)) && ne(e.expression) || // JSX that got converted to html`<p>Something</p>`
|
|
3184
|
-
o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) &&
|
|
3185
|
+
o.isTaggedTemplateExpression(e) && o.isIdentifier(e.tag) && _r.has(e.tag.text)
|
|
3185
3186
|
);
|
|
3186
3187
|
}
|
|
3187
|
-
const
|
|
3188
|
+
const ma = /* @__PURE__ */ new Set([
|
|
3188
3189
|
o.SyntaxKind.NumericLiteral,
|
|
3189
3190
|
o.SyntaxKind.BigIntLiteral,
|
|
3190
3191
|
o.SyntaxKind.StringLiteral,
|
|
@@ -3203,7 +3204,7 @@ const ua = /* @__PURE__ */ new Set([
|
|
|
3203
3204
|
o.SyntaxKind.ClassExpression,
|
|
3204
3205
|
// Trust? Trust.
|
|
3205
3206
|
o.SyntaxKind.NonNullExpression
|
|
3206
|
-
]),
|
|
3207
|
+
]), fa = /* @__PURE__ */ new Set([
|
|
3207
3208
|
o.SyntaxKind.PlusEqualsToken,
|
|
3208
3209
|
o.SyntaxKind.MinusEqualsToken,
|
|
3209
3210
|
o.SyntaxKind.AsteriskAsteriskEqualsToken,
|
|
@@ -3238,9 +3239,9 @@ const ua = /* @__PURE__ */ new Set([
|
|
|
3238
3239
|
o.SyntaxKind.SlashToken,
|
|
3239
3240
|
o.SyntaxKind.PercentToken,
|
|
3240
3241
|
o.SyntaxKind.AsteriskAsteriskToken
|
|
3241
|
-
]),
|
|
3242
|
+
]), ga = {
|
|
3242
3243
|
property(e, t, i, n) {
|
|
3243
|
-
const s =
|
|
3244
|
+
const s = ya(n, i, e), r = s?.type === "stringifiedReflected", a = s?.type === "reflected" || r;
|
|
3244
3245
|
if (a) {
|
|
3245
3246
|
const f = at(t);
|
|
3246
3247
|
if (f === !0)
|
|
@@ -3257,7 +3258,7 @@ const ua = /* @__PURE__ */ new Set([
|
|
|
3257
3258
|
p,
|
|
3258
3259
|
e,
|
|
3259
3260
|
u ? "" : void 0
|
|
3260
|
-
), g = i === "value" && (n === "input" || n === "textarea" || n === Je) ?
|
|
3261
|
+
), g = i === "value" && (n === "input" || n === "textarea" || n === Je) ? va(f, e) : f;
|
|
3261
3262
|
if (g !== p)
|
|
3262
3263
|
return [u ? `.${i}` : s.name, l, g];
|
|
3263
3264
|
}
|
|
@@ -3330,7 +3331,7 @@ const ua = /* @__PURE__ */ new Set([
|
|
|
3330
3331
|
return [o.factory.createIdentifier(s)];
|
|
3331
3332
|
}
|
|
3332
3333
|
};
|
|
3333
|
-
function
|
|
3334
|
+
function ya(e, t, i) {
|
|
3334
3335
|
if (typeof e == "string") {
|
|
3335
3336
|
const r = (i.externalComponents[e] ?? i.localComponents[e])?.propToAttribute?.[t];
|
|
3336
3337
|
if (r !== void 0)
|
|
@@ -3405,7 +3406,7 @@ function pi(e, t) {
|
|
|
3405
3406
|
if (i.length === 0)
|
|
3406
3407
|
return [];
|
|
3407
3408
|
const n = Yi(i);
|
|
3408
|
-
if (
|
|
3409
|
+
if (jr(n)) {
|
|
3409
3410
|
const s = n.replaceAll('"', """);
|
|
3410
3411
|
if (s.length > n.length) {
|
|
3411
3412
|
const r = n.replaceAll("'", "'");
|
|
@@ -3424,7 +3425,7 @@ function ui(e, t, i) {
|
|
|
3424
3425
|
`${i} prop value must be an expression. Found ${String(t?.getText(e.sourceFile))}`
|
|
3425
3426
|
);
|
|
3426
3427
|
const n = t.expression;
|
|
3427
|
-
if (
|
|
3428
|
+
if (ha(n)) {
|
|
3428
3429
|
const r = i === "class" ? "safeClassMap" : "safeStyleMap";
|
|
3429
3430
|
e.neededImports.add(r);
|
|
3430
3431
|
const a = e.importRenames[r], c = o.factory.createCallExpression(o.factory.createIdentifier(a), void 0, [
|
|
@@ -3434,15 +3435,15 @@ function ui(e, t, i) {
|
|
|
3434
3435
|
} else
|
|
3435
3436
|
return [i, ...Re(e, t, !0)];
|
|
3436
3437
|
}
|
|
3437
|
-
const
|
|
3438
|
-
function
|
|
3438
|
+
const ha = (e) => o.isObjectLiteralExpression(e) || o.isPropertyAccessExpression(e) || o.isIdentifier(e) || o.isCallExpression(e) || o.isBinaryExpression(e) || o.isConditionalExpression(e);
|
|
3439
|
+
function va(e, t) {
|
|
3439
3440
|
t.neededImports.add("live");
|
|
3440
3441
|
const i = t.importRenames.live;
|
|
3441
3442
|
return o.factory.createCallExpression(o.factory.createIdentifier(i), void 0, [
|
|
3442
3443
|
typeof e == "string" ? o.factory.createStringLiteral(e) : e
|
|
3443
3444
|
]);
|
|
3444
3445
|
}
|
|
3445
|
-
function
|
|
3446
|
+
function ba(e) {
|
|
3446
3447
|
if (e && o.isJsxExpression(e) && e.expression && o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text in mi && e.expression.arguments.length <= 1)
|
|
3447
3448
|
return {
|
|
3448
3449
|
propType: mi[e.expression.expression.text],
|
|
@@ -3460,15 +3461,15 @@ const mi = {
|
|
|
3460
3461
|
bindBooleanAttribute: "booleanAttribute",
|
|
3461
3462
|
bindEvent: "event"
|
|
3462
3463
|
};
|
|
3463
|
-
function
|
|
3464
|
-
return
|
|
3464
|
+
function Sa(e, t, i) {
|
|
3465
|
+
return Ta.has(e) ? e : e.startsWith("on") && t !== void 0 && o.isJsxExpression(t) && t.expression !== void 0 ? "event" : Vi.has(e) || e.includes("-") ? "attribute" : !xt(i) && (Xi.has(e) || (i === ft ? !1 : i === Je ? (
|
|
3465
3466
|
// When tag name is dynamic, we can't help but check if the prop name matches an "always attribute" in any html element
|
|
3466
3467
|
Object.values(gt).some((r) => r.has(e))
|
|
3467
3468
|
) : gt[i]?.has(e) === !0)) ? Xt.has(e) ? "booleanAttribute" : "attribute" : i === "svg" || i === "math" || i === ft || i !== Je && ($t.has(i) || Pt.has(i)) ? e in U.common.reflected || e in U.common.stringifiedReflected || e in U.common.stringifiedNonReflected ? "property" : Xt.has(e) ? "booleanAttribute" : "attribute" : "property";
|
|
3468
3469
|
}
|
|
3469
|
-
const
|
|
3470
|
+
const wa = ["class", "style", "ref", "directives", "key", "deferLoad"], Ta = new Set(wa), Ea = (e) => typeof e != "string" || e.trim().length > 0;
|
|
3470
3471
|
function Ve({ key: e, parts: t, litTag: i }, n) {
|
|
3471
|
-
const s =
|
|
3472
|
+
const s = Ca(t);
|
|
3472
3473
|
if (s.length % 2 === 0)
|
|
3473
3474
|
throw new Error("Normalized template parts array length must be odd");
|
|
3474
3475
|
const [r, ...a] = s;
|
|
@@ -3489,11 +3490,11 @@ function Ve({ key: e, parts: t, litTag: i }, n) {
|
|
|
3489
3490
|
const d = n.importRenames[c], l = o.factory.createTaggedTemplateExpression(
|
|
3490
3491
|
o.factory.createIdentifier(d),
|
|
3491
3492
|
void 0,
|
|
3492
|
-
a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r),
|
|
3493
|
+
a.length === 0 ? o.factory.createNoSubstitutionTemplateLiteral(r) : o.factory.createTemplateExpression(o.factory.createTemplateHead(r), $a(a))
|
|
3493
3494
|
);
|
|
3494
3495
|
return ct(n, e, l);
|
|
3495
3496
|
}
|
|
3496
|
-
const
|
|
3497
|
+
const Ca = (e) => e.reduce(
|
|
3497
3498
|
(t, i, n) => {
|
|
3498
3499
|
const s = t.at(-1), r = typeof s == "string", a = typeof i == "string";
|
|
3499
3500
|
if (r && a)
|
|
@@ -3503,7 +3504,7 @@ const Ea = (e) => e.reduce(
|
|
|
3503
3504
|
},
|
|
3504
3505
|
[""]
|
|
3505
3506
|
);
|
|
3506
|
-
function
|
|
3507
|
+
function $a(e) {
|
|
3507
3508
|
if (!(e.length % 2 === 0))
|
|
3508
3509
|
throw new Error("templatePartsToSpans should be called with normalized parts array without the first item");
|
|
3509
3510
|
const i = e.length / 2;
|
|
@@ -3542,13 +3543,13 @@ function Cn(e, t) {
|
|
|
3542
3543
|
);
|
|
3543
3544
|
}
|
|
3544
3545
|
const Nt = (e) => e.trim().length === 0 ? [] : o.getLeadingCommentRanges(e, 0) ?? [];
|
|
3545
|
-
function
|
|
3546
|
+
function Pa(e) {
|
|
3546
3547
|
const t = Nt(e);
|
|
3547
3548
|
if (t.length === 0)
|
|
3548
3549
|
return [e || " "];
|
|
3549
3550
|
const i = t.reduceRight(
|
|
3550
3551
|
([s, ...r], a) => {
|
|
3551
|
-
const c =
|
|
3552
|
+
const c = xa(s), d = $n(c.slice(a.pos, a.end));
|
|
3552
3553
|
return [
|
|
3553
3554
|
c.slice(0, a.pos),
|
|
3554
3555
|
/**
|
|
@@ -3567,12 +3568,12 @@ function $a(e) {
|
|
|
3567
3568
|
return (typeof n != "string" || n.trim() !== "") && i.push(" "), i;
|
|
3568
3569
|
}
|
|
3569
3570
|
const $n = (e) => e.startsWith("//") ? e.slice(2) : e.slice(2, -2);
|
|
3570
|
-
function
|
|
3571
|
+
function xa(e) {
|
|
3571
3572
|
if (typeof e == "string")
|
|
3572
3573
|
return e;
|
|
3573
3574
|
throw new Error(`Expected string, got ${typeof e}: ${String(e)}`);
|
|
3574
3575
|
}
|
|
3575
|
-
function
|
|
3576
|
+
function ka(e, t) {
|
|
3576
3577
|
if (!(o.isPropertyAccessExpression(t.expression) && t.expression.name.text === "map"))
|
|
3577
3578
|
return t;
|
|
3578
3579
|
const n = t.arguments[0];
|
|
@@ -3606,7 +3607,7 @@ function xa(e, t) {
|
|
|
3606
3607
|
const f = p.attributes.properties[u];
|
|
3607
3608
|
if (f === void 0 || !o.isJsxAttribute(f))
|
|
3608
3609
|
return t;
|
|
3609
|
-
const y = Ft(f.initializer, e.sourceFile), g =
|
|
3610
|
+
const y = Ft(f.initializer, e.sourceFile), g = Ia(r, n, y, d, e);
|
|
3610
3611
|
if (g === void 0)
|
|
3611
3612
|
return t;
|
|
3612
3613
|
e.liftedKeys.add(f.name), e.neededImports.add("repeat");
|
|
@@ -3639,8 +3640,8 @@ function Pn(e) {
|
|
|
3639
3640
|
void 0
|
|
3640
3641
|
), t;
|
|
3641
3642
|
}
|
|
3642
|
-
function
|
|
3643
|
-
const r =
|
|
3643
|
+
function Ia(e, t, i, n, s) {
|
|
3644
|
+
const r = K(i);
|
|
3644
3645
|
if (r === void 0)
|
|
3645
3646
|
return;
|
|
3646
3647
|
let a = xn(e.name, r);
|
|
@@ -3655,7 +3656,7 @@ function ka(e, t, i, n, s) {
|
|
|
3655
3656
|
return;
|
|
3656
3657
|
}
|
|
3657
3658
|
if (!n) {
|
|
3658
|
-
const d =
|
|
3659
|
+
const d = La(r, a, t);
|
|
3659
3660
|
if (d === void 0)
|
|
3660
3661
|
return;
|
|
3661
3662
|
a = d;
|
|
@@ -3671,38 +3672,38 @@ function ka(e, t, i, n, s) {
|
|
|
3671
3672
|
e.initializer
|
|
3672
3673
|
);
|
|
3673
3674
|
}
|
|
3674
|
-
function
|
|
3675
|
+
function K(e) {
|
|
3675
3676
|
if (o.isIdentifier(e))
|
|
3676
3677
|
return [e.text];
|
|
3677
3678
|
if (o.isPropertyAccessExpression(e))
|
|
3678
|
-
return
|
|
3679
|
+
return K(e.expression);
|
|
3679
3680
|
if (o.isElementAccessExpression(e))
|
|
3680
|
-
return
|
|
3681
|
+
return K(e.argumentExpression);
|
|
3681
3682
|
if (o.isConditionalExpression(e)) {
|
|
3682
|
-
const t =
|
|
3683
|
+
const t = K(e.condition), i = K(e.whenTrue), n = K(e.whenFalse);
|
|
3683
3684
|
return t === void 0 || i === void 0 || n === void 0 ? void 0 : [...t, ...i, ...n];
|
|
3684
3685
|
} else if (o.isBinaryExpression(e)) {
|
|
3685
|
-
const t =
|
|
3686
|
+
const t = K(e.left), i = K(e.right);
|
|
3686
3687
|
return t === void 0 || i === void 0 ? void 0 : [...t, ...i];
|
|
3687
3688
|
} else if (o.isTemplateExpression(e)) {
|
|
3688
3689
|
const t = [];
|
|
3689
3690
|
for (const i of e.templateSpans) {
|
|
3690
|
-
const n =
|
|
3691
|
+
const n = K(i.expression);
|
|
3691
3692
|
if (n === void 0)
|
|
3692
3693
|
return;
|
|
3693
3694
|
t.push(...n);
|
|
3694
3695
|
}
|
|
3695
3696
|
return t;
|
|
3696
3697
|
} else {
|
|
3697
|
-
if (
|
|
3698
|
+
if (Aa.has(e.kind))
|
|
3698
3699
|
return [];
|
|
3699
3700
|
{
|
|
3700
3701
|
const t = Ee(e);
|
|
3701
|
-
return t !== e ?
|
|
3702
|
+
return t !== e ? K(t) : void 0;
|
|
3702
3703
|
}
|
|
3703
3704
|
}
|
|
3704
3705
|
}
|
|
3705
|
-
const
|
|
3706
|
+
const Aa = /* @__PURE__ */ new Set([
|
|
3706
3707
|
o.SyntaxKind.NumericLiteral,
|
|
3707
3708
|
o.SyntaxKind.BigIntLiteral,
|
|
3708
3709
|
o.SyntaxKind.StringLiteral,
|
|
@@ -3711,12 +3712,12 @@ const Ia = /* @__PURE__ */ new Set([
|
|
|
3711
3712
|
o.SyntaxKind.FalseKeyword,
|
|
3712
3713
|
o.SyntaxKind.NullKeyword,
|
|
3713
3714
|
o.SyntaxKind.TrueKeyword
|
|
3714
|
-
]), Ee = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Ee(e.expression) : e, xn = (e, t) => o.isObjectBindingPattern(e) ?
|
|
3715
|
-
function
|
|
3715
|
+
]), Ee = (e) => o.isAsExpression(e) || o.isNonNullExpression(e) || o.isSatisfiesExpression(e) || o.isParenthesizedExpression(e) ? Ee(e.expression) : e, xn = (e, t) => o.isObjectBindingPattern(e) ? Da(e, t) : e;
|
|
3716
|
+
function La(e, t, i) {
|
|
3716
3717
|
if (e.every(Ue, t))
|
|
3717
3718
|
return t;
|
|
3718
3719
|
if (o.isIdentifier(t)) {
|
|
3719
|
-
const n = o.isBlock(i.body) ? ve(i.body.statements, (r) =>
|
|
3720
|
+
const n = o.isBlock(i.body) ? ve(i.body.statements, (r) => Fa(r, t)) : void 0;
|
|
3720
3721
|
if (n === void 0)
|
|
3721
3722
|
return;
|
|
3722
3723
|
const s = xn(n, e);
|
|
@@ -3724,7 +3725,7 @@ function Aa(e, t, i) {
|
|
|
3724
3725
|
return s;
|
|
3725
3726
|
}
|
|
3726
3727
|
}
|
|
3727
|
-
function
|
|
3728
|
+
function Fa(e, t) {
|
|
3728
3729
|
if (!o.isVariableStatement(e) || !(e.declarationList.flags & o.NodeFlags.Const))
|
|
3729
3730
|
return;
|
|
3730
3731
|
const i = e.declarationList.declarations[0];
|
|
@@ -3732,19 +3733,19 @@ function La(e, t) {
|
|
|
3732
3733
|
}
|
|
3733
3734
|
function Ue(e) {
|
|
3734
3735
|
const t = this;
|
|
3735
|
-
return o.isIdentifier(t) ? t.text === e : t.elements.some(
|
|
3736
|
+
return o.isIdentifier(t) ? t.text === e : t.elements.some(Na, e);
|
|
3736
3737
|
}
|
|
3737
|
-
function
|
|
3738
|
+
function Na(e) {
|
|
3738
3739
|
const t = this;
|
|
3739
3740
|
return o.isOmittedExpression(e) ? !1 : Ue.call(e.name, t);
|
|
3740
3741
|
}
|
|
3741
|
-
function
|
|
3742
|
+
function Da(e, t) {
|
|
3742
3743
|
let i = !1;
|
|
3743
3744
|
const n = e.elements.filter((s) => o.isIdentifier(s.name) ? t.includes(s.name.text) : (i = !0, !0));
|
|
3744
3745
|
return i || n.length === 0 ? e : o.factory.updateObjectBindingPattern(e, n);
|
|
3745
3746
|
}
|
|
3746
|
-
const kn = (e, t) => t.liftedKeys.has(e),
|
|
3747
|
-
`),
|
|
3747
|
+
const kn = (e, t) => t.liftedKeys.has(e), ja = (e) => e.apiJsonComponents.map(({ name: t, importPath: i }) => `import type { ${t} } from "./${i}";`).join(`
|
|
3748
|
+
`), Ra = /^[a-zA-Z_$][a-zA-Z\d_$]*$/u, Xe = (e) => !Ra.test(e), $e = (e) => Xe(e) ? `"${e}"` : e;
|
|
3748
3749
|
function Qe(e, t) {
|
|
3749
3750
|
const i = [], n = [];
|
|
3750
3751
|
let s = !1;
|
|
@@ -3770,13 +3771,13 @@ const gi = (e) => e.map((t) => `'${t}'`).join(" | ");
|
|
|
3770
3771
|
function q(e, t, i) {
|
|
3771
3772
|
if (Se(i))
|
|
3772
3773
|
return In(e, i);
|
|
3773
|
-
const n = o.isCallExpression(i) ?
|
|
3774
|
+
const n = o.isCallExpression(i) ? ka(e, i) : i, s = o.visitEachChild(
|
|
3774
3775
|
n,
|
|
3775
3776
|
// Do not add "" if parent is binary expression to not turn {(a && <b />) || c} into {(a && <b />) || "" || c}
|
|
3776
3777
|
q.bind(null, e, t !== void 0 && o.isBinaryExpression(t) ? void 0 : i),
|
|
3777
3778
|
e.transformationContext
|
|
3778
3779
|
);
|
|
3779
|
-
return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Se(Ee(i.right)) ||
|
|
3780
|
+
return t !== void 0 && o.isBinaryExpression(i) && (o.isJsxExpression(t) || Se(Ee(i.right)) || qr(i.right)) ? Ja(s) : s;
|
|
3780
3781
|
}
|
|
3781
3782
|
function In(e, t) {
|
|
3782
3783
|
const i = An(e, t);
|
|
@@ -3790,19 +3791,19 @@ function An(e, t) {
|
|
|
3790
3791
|
if (o.isJsxNamespacedName(r))
|
|
3791
3792
|
throw Error(`JSX namespaced elements are not supported. Found ${r.getText(e.sourceFile)} `);
|
|
3792
3793
|
if (!o.isIdentifier(r) || !r.text.startsWith(r.text[0].toLowerCase()) && r.text !== tt && r.text !== it) {
|
|
3793
|
-
const C = o.isIdentifier(r) && r.text ===
|
|
3794
|
+
const C = o.isIdentifier(r) && r.text === kr ? Me(i, e) : {
|
|
3794
3795
|
// No need to wrap the function call in a lit-html tag
|
|
3795
3796
|
litTag: void 0,
|
|
3796
|
-
parts: [
|
|
3797
|
+
parts: [Oa(e, t, r, i)]
|
|
3797
3798
|
};
|
|
3798
3799
|
return {
|
|
3799
|
-
key:
|
|
3800
|
+
key: Ma(s, e),
|
|
3800
3801
|
...C
|
|
3801
3802
|
};
|
|
3802
3803
|
}
|
|
3803
|
-
const c = r.text === tt ? Je : r.text === it ? ft : r.text, d = r.text === tt ? le : r.text === it ? Z :
|
|
3804
|
+
const c = r.text === tt ? Je : r.text === it ? ft : r.text, d = r.text === tt ? le : r.text === it ? Z : Ar.has(c) ? en : $t.has(c) ? oe : de, l = xt(c);
|
|
3804
3805
|
let p;
|
|
3805
|
-
l && e.compiler.viteCommand === "build" && (p =
|
|
3806
|
+
l && e.compiler.viteCommand === "build" && (p = Ka(e, c));
|
|
3806
3807
|
let u;
|
|
3807
3808
|
const f = [];
|
|
3808
3809
|
let y = !1;
|
|
@@ -3815,16 +3816,16 @@ Found ${A.getText(e.sourceFile)}`
|
|
|
3815
3816
|
const { name: C, initializer: E } = A;
|
|
3816
3817
|
if (o.isJsxNamespacedName(C))
|
|
3817
3818
|
throw Error(`JSX namespaced attributes are not supported. Found ${C.getText(e.sourceFile)}`);
|
|
3818
|
-
const $ = C.text, L =
|
|
3819
|
+
const $ = C.text, L = ba(E), R = L?.propType ?? Sa($, E, c);
|
|
3819
3820
|
p?.delete($);
|
|
3820
|
-
const F =
|
|
3821
|
+
const F = ga[R](e, L?.initializer ?? E, $, c);
|
|
3821
3822
|
if (F.length === 0)
|
|
3822
3823
|
return [];
|
|
3823
|
-
const M = e.compiler.shouldMinifyJsx ? [" "] :
|
|
3824
|
-
return R === "key" ? (u = typeof F[0] == "object" && !kn(C, e) ? F[0] : void 0, M.some(
|
|
3824
|
+
const M = e.compiler.shouldMinifyJsx ? [" "] : Pa(En(C, e));
|
|
3825
|
+
return R === "key" ? (u = typeof F[0] == "object" && !kn(C, e) ? F[0] : void 0, M.some(Ea) ? M : []) : R === "directives" || R === "ref" || $ === "deferLoad" ? (y ||= R === "deferLoad", f.push(
|
|
3825
3826
|
...M,
|
|
3826
3827
|
...F.flatMap(
|
|
3827
|
-
(z,
|
|
3828
|
+
(z, J) => typeof z == "string" || J === 0 || typeof F[J - 1] == "string" ? z : [" ", z]
|
|
3828
3829
|
)
|
|
3829
3830
|
), []) : [...M, ...F];
|
|
3830
3831
|
});
|
|
@@ -3837,7 +3838,7 @@ Found ${A.getText(e.sourceFile)}`
|
|
|
3837
3838
|
`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`
|
|
3838
3839
|
);
|
|
3839
3840
|
l && (y ? e.customElementsToImportDeferred.add(c) : e.customElementsToImport.add(c));
|
|
3840
|
-
const v = typeof c == "string" &&
|
|
3841
|
+
const v = typeof c == "string" && Ir.has(c), h = Me(i, e);
|
|
3841
3842
|
if (v && h.parts.length > 0)
|
|
3842
3843
|
throw Error(
|
|
3843
3844
|
`Void HTML elements like <${c}> cannot have children. Found ${t.getText(e.sourceFile)}`
|
|
@@ -3861,12 +3862,12 @@ Found ${A.getText(e.sourceFile)}`
|
|
|
3861
3862
|
];
|
|
3862
3863
|
return { key: u, parts: P, litTag: d };
|
|
3863
3864
|
}
|
|
3864
|
-
function
|
|
3865
|
+
function Ma(e, t) {
|
|
3865
3866
|
const i = e.attributes.properties[Ln(e)];
|
|
3866
3867
|
return i && o.isJsxAttribute(i) && !kn(i.name, t) ? Ft(i.initializer, t.sourceFile) : void 0;
|
|
3867
3868
|
}
|
|
3868
3869
|
const Ln = (e) => e.attributes.properties.findIndex(({ name: t }) => t && o.isIdentifier(t) && t.text === "key");
|
|
3869
|
-
function
|
|
3870
|
+
function Oa(e, t, i, n) {
|
|
3870
3871
|
const r = (o.isJsxElement(t) ? t.openingElement : t).attributes.properties.map((d) => {
|
|
3871
3872
|
if (o.isJsxSpreadAttribute(d))
|
|
3872
3873
|
return Cn(En(d, e), o.factory.createSpreadAssignment(d.expression));
|
|
@@ -3891,7 +3892,7 @@ function Me(e, t) {
|
|
|
3891
3892
|
let i;
|
|
3892
3893
|
const n = e.flatMap((s) => {
|
|
3893
3894
|
if (o.isJsxText(s))
|
|
3894
|
-
return [t.compiler.shouldMinifyJsx ?
|
|
3895
|
+
return [t.compiler.shouldMinifyJsx ? Fr(s.text) : s.text];
|
|
3895
3896
|
if (o.isJsxExpression(s))
|
|
3896
3897
|
return Dt(t, s, s);
|
|
3897
3898
|
{
|
|
@@ -3910,7 +3911,7 @@ function Me(e, t) {
|
|
|
3910
3911
|
});
|
|
3911
3912
|
return { litTag: i, parts: n };
|
|
3912
3913
|
}
|
|
3913
|
-
function
|
|
3914
|
+
function Ja(e) {
|
|
3914
3915
|
return e.operatorToken.kind === o.SyntaxKind.AmpersandAmpersandToken ? o.factory.createBinaryExpression(
|
|
3915
3916
|
e,
|
|
3916
3917
|
o.factory.createToken(o.SyntaxKind.BarBarToken),
|
|
@@ -3961,7 +3962,7 @@ function Dt(e, t, i) {
|
|
|
3961
3962
|
] : [q(e, i, t.expression)]
|
|
3962
3963
|
);
|
|
3963
3964
|
}
|
|
3964
|
-
function
|
|
3965
|
+
function Ka(e, t) {
|
|
3965
3966
|
if (t in e.localComponents)
|
|
3966
3967
|
for (const n of e.compiler.privateApiJson.modules)
|
|
3967
3968
|
for (const s of n.declarations) {
|
|
@@ -3978,17 +3979,17 @@ const Fn = (e) => e.reduce((t, [i, n]) => (t[i] ??= [], t[i].push(n), t), {}), N
|
|
|
3978
3979
|
([e, t]) => t.map((i) => [i, e])
|
|
3979
3980
|
)
|
|
3980
3981
|
), Dn = new Set(Object.keys(Nn));
|
|
3981
|
-
function
|
|
3982
|
+
function Ba(e, t) {
|
|
3982
3983
|
const i = t.importClause, n = i === void 0, s = t.moduleSpecifier;
|
|
3983
3984
|
if (!o.isStringLiteral(s))
|
|
3984
3985
|
return t;
|
|
3985
|
-
const r =
|
|
3986
|
+
const r = Wa(e.sourceFile.fileName, s.text, ""), a = !i?.isTypeOnly;
|
|
3986
3987
|
if (a && e.existingImportedModules.add(r), rn.test(s.text) && // If id already includes ?, bypass our custom behavior
|
|
3987
3988
|
!s.text.includes("?")) {
|
|
3988
3989
|
if (n) {
|
|
3989
3990
|
if (e.compiler.viteCommand !== "build" || e.compiler.isInStorybook || e.compiler.isInTest)
|
|
3990
3991
|
return t;
|
|
3991
|
-
const l = e.sourceFile.fileName, p =
|
|
3992
|
+
const l = e.sourceFile.fileName, p = Mo(l), u = `import "${s.text}"`;
|
|
3992
3993
|
throw Error(
|
|
3993
3994
|
p ? `Unexpected case: during build, all node_modules runtime dependencies should be externalized (unless explicitly configured otherwise). ${l} is not externalized, and it contains a side-effect CSS import \`${u}\`. How should such CSS import be handled? Options:
|
|
3994
3995
|
1. (suggested) Externalize ${l}, which will make end-user's bundler treat this CSS import as global CSS.
|
|
@@ -4029,11 +4030,11 @@ function Ka(e, t) {
|
|
|
4029
4030
|
a && !l.isTypeOnly && f && y && e.importedFunctionComponentsFromModules.add(r);
|
|
4030
4031
|
}), t;
|
|
4031
4032
|
}
|
|
4032
|
-
const jn = (e, t) => e === de && ae.staticHtml.includes(t) ? le : e === oe && ae.staticSvg.includes(t) ? Z : e,
|
|
4033
|
-
function
|
|
4034
|
-
return o.isImportDeclaration(e) ?
|
|
4033
|
+
const jn = (e, t) => e === de && ae.staticHtml.includes(t) ? le : e === oe && ae.staticSvg.includes(t) ? Z : e, Wa = (e, t, i) => t.startsWith(".") ? m.resolve(e, "..", `${t}${i}`) : t;
|
|
4034
|
+
function _a(e) {
|
|
4035
|
+
return o.isImportDeclaration(e) ? Ua(this, e) : e;
|
|
4035
4036
|
}
|
|
4036
|
-
function
|
|
4037
|
+
function Ua(e, t) {
|
|
4037
4038
|
const i = t.importClause, n = i?.namedBindings, s = t.moduleSpecifier;
|
|
4038
4039
|
if (!o.isStringLiteral(s) || !n || !o.isNamedImports(n) || !Dn.has(s.text))
|
|
4039
4040
|
return t;
|
|
@@ -4058,7 +4059,7 @@ function _a(e, t) {
|
|
|
4058
4059
|
t.attributes
|
|
4059
4060
|
) : t;
|
|
4060
4061
|
}
|
|
4061
|
-
function
|
|
4062
|
+
function Ha(e) {
|
|
4062
4063
|
const t = Fn(
|
|
4063
4064
|
Array.from(e.neededImports, (i) => [ae[i][0], i])
|
|
4064
4065
|
);
|
|
@@ -4084,8 +4085,8 @@ function Rn(e, t) {
|
|
|
4084
4085
|
o.factory.createIdentifier(n)
|
|
4085
4086
|
);
|
|
4086
4087
|
}
|
|
4087
|
-
function
|
|
4088
|
-
const t =
|
|
4088
|
+
function za(e) {
|
|
4089
|
+
const t = ta().map(({ packageName: i }) => i);
|
|
4089
4090
|
return e.existingImportedModules.forEach((i) => {
|
|
4090
4091
|
if (m.isAbsolute(i))
|
|
4091
4092
|
return;
|
|
@@ -4098,7 +4099,7 @@ function Ha(e) {
|
|
|
4098
4099
|
}
|
|
4099
4100
|
}), [];
|
|
4100
4101
|
}
|
|
4101
|
-
function
|
|
4102
|
+
function qa(e) {
|
|
4102
4103
|
if (e.compiler.viteCommand === "serve")
|
|
4103
4104
|
return e.customElementsToImport.clear(), e.customElementsToImportDeferred.clear(), [];
|
|
4104
4105
|
const t = e.compiler._customElementDependencies;
|
|
@@ -4113,7 +4114,7 @@ function za(e) {
|
|
|
4113
4114
|
t[n] ??= { referencedBy: [], referencedTagNames: [], referencedDeferredTagNames: [] }, t[n].referencedBy.push(e.sourceFile.fileName);
|
|
4114
4115
|
}), [];
|
|
4115
4116
|
}
|
|
4116
|
-
function
|
|
4117
|
+
function Ga(e, t, i) {
|
|
4117
4118
|
const n = Sn()[t] ?? Mn(e)[t];
|
|
4118
4119
|
if (n === void 0) {
|
|
4119
4120
|
if (e.options?.build?.dependencies?.silenceUnknownJsxElementUsage?.(t, i, e) === !0)
|
|
@@ -4128,7 +4129,7 @@ function qa(e, t, i) {
|
|
|
4128
4129
|
}
|
|
4129
4130
|
return n;
|
|
4130
4131
|
}
|
|
4131
|
-
function
|
|
4132
|
+
function Va(e, t) {
|
|
4132
4133
|
return e.packageName === void 0 ? ce(t, e.moduleName) : m.join(e.packageName, e.moduleName);
|
|
4133
4134
|
}
|
|
4134
4135
|
function Mn(e) {
|
|
@@ -4139,7 +4140,7 @@ function Mn(e) {
|
|
|
4139
4140
|
}
|
|
4140
4141
|
}), e._localDefinedComponents;
|
|
4141
4142
|
}
|
|
4142
|
-
const
|
|
4143
|
+
const Xa = (e, t) => {
|
|
4143
4144
|
const i = e.pragmas;
|
|
4144
4145
|
if (i?.has("jsx") === !0 || i?.has("jsxImportSource") === !0)
|
|
4145
4146
|
return e.statements;
|
|
@@ -4149,7 +4150,7 @@ const Va = (e, t) => {
|
|
|
4149
4150
|
localComponents: t.compiler.isInPuppeteerTestBackEnd ? {} : Mn(t.compiler),
|
|
4150
4151
|
sourceFile: e,
|
|
4151
4152
|
transformationContext: t.transformation,
|
|
4152
|
-
importRenames:
|
|
4153
|
+
importRenames: Qa(e),
|
|
4153
4154
|
existingImportedModules: /* @__PURE__ */ new Set(),
|
|
4154
4155
|
importedFunctionComponentsFromModules: /* @__PURE__ */ new Set(),
|
|
4155
4156
|
existingLitImports: /* @__PURE__ */ new Set(),
|
|
@@ -4165,18 +4166,18 @@ const Va = (e, t) => {
|
|
|
4165
4166
|
let s = [];
|
|
4166
4167
|
if (e.statements.every((a) => {
|
|
4167
4168
|
if (o.isImportDeclaration(a)) {
|
|
4168
|
-
if (s.push(
|
|
4169
|
+
if (s.push(Ba(n, a)), n.hasNonLuminaJsxImport)
|
|
4169
4170
|
return !1;
|
|
4170
4171
|
} else
|
|
4171
4172
|
s.push(q(n, void 0, a));
|
|
4172
4173
|
return !0;
|
|
4173
4174
|
}), n.hasNonLuminaJsxImport)
|
|
4174
4175
|
return e.statements;
|
|
4175
|
-
if (n.neededImports.size > 0 && (s = s.map(
|
|
4176
|
+
if (n.neededImports.size > 0 && (s = s.map(_a, n), n.existingLitImports.size > 0))
|
|
4176
4177
|
throw new Error(
|
|
4177
4178
|
`Expected context.existingLitImports to be empty by now. Found: ${Array.from(n.existingLitImports).join(", ")}`
|
|
4178
4179
|
);
|
|
4179
|
-
const r = [
|
|
4180
|
+
const r = [Ha, za, qa].flatMap(
|
|
4180
4181
|
(a) => a(n)
|
|
4181
4182
|
);
|
|
4182
4183
|
if (n.neededImports.size > 0)
|
|
@@ -4185,18 +4186,18 @@ const Va = (e, t) => {
|
|
|
4185
4186
|
);
|
|
4186
4187
|
return [...r, ...s];
|
|
4187
4188
|
};
|
|
4188
|
-
function
|
|
4189
|
-
return
|
|
4190
|
-
|
|
4189
|
+
function Qa(e) {
|
|
4190
|
+
return Za(e), Object.fromEntries(
|
|
4191
|
+
zr.map((t) => [t, e.identifiers.has(t) ? `${t}$jsx` : t])
|
|
4191
4192
|
);
|
|
4192
4193
|
}
|
|
4193
|
-
function
|
|
4194
|
+
function Za(e) {
|
|
4194
4195
|
if (!("identifiers" in e))
|
|
4195
4196
|
throw new Error(
|
|
4196
4197
|
"Expected sourceFile to have an undocumented identifiers property that is a Map<string,string>. If this error is thrown, it may mean Lumina Compiler needs to be updated to support the version of TypeScript being used."
|
|
4197
4198
|
);
|
|
4198
4199
|
}
|
|
4199
|
-
function
|
|
4200
|
+
function Ya(e, t, i) {
|
|
4200
4201
|
return t.size === 0 ? e : [
|
|
4201
4202
|
o.factory.createPropertyDeclaration(
|
|
4202
4203
|
[
|
|
@@ -4210,7 +4211,7 @@ function Za(e, t, i) {
|
|
|
4210
4211
|
Array.from(t.entries()).map(
|
|
4211
4212
|
([n, s]) => o.factory.createPropertyAssignment(
|
|
4212
4213
|
Xe(n) ? o.factory.createStringLiteral(n) : n,
|
|
4213
|
-
|
|
4214
|
+
ec(s, i)
|
|
4214
4215
|
)
|
|
4215
4216
|
)
|
|
4216
4217
|
)
|
|
@@ -4218,7 +4219,7 @@ function Za(e, t, i) {
|
|
|
4218
4219
|
...e
|
|
4219
4220
|
];
|
|
4220
4221
|
}
|
|
4221
|
-
function
|
|
4222
|
+
function ec(e, t) {
|
|
4222
4223
|
let i = 0, n = !0;
|
|
4223
4224
|
const s = [], r = [];
|
|
4224
4225
|
for (const d of e.properties)
|
|
@@ -4260,7 +4261,7 @@ function Ya(e, t) {
|
|
|
4260
4261
|
...t ? [] : [o.factory.createObjectLiteralExpression(r)]
|
|
4261
4262
|
]);
|
|
4262
4263
|
}
|
|
4263
|
-
function
|
|
4264
|
+
function tc(e, t, i, n, s) {
|
|
4264
4265
|
let r = -1, a = -1, c = -1;
|
|
4265
4266
|
t.options?.properties.forEach((f, y) => {
|
|
4266
4267
|
if (o.isSpreadAssignment(f))
|
|
@@ -4272,23 +4273,23 @@ function ec(e, t, i, n, s) {
|
|
|
4272
4273
|
g === "type" ? r = y : g === "attribute" ? a = y : g === "readOnly" && (c = y);
|
|
4273
4274
|
}
|
|
4274
4275
|
});
|
|
4275
|
-
const d = s.attribute === void 0 && a === -1, l = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p =
|
|
4276
|
+
const d = s.attribute === void 0 && a === -1, l = s.readonly === !0 && s.docsOnlyReadonly !== !0 && c === -1, p = ic(e, t, i, s, r), u = [
|
|
4276
4277
|
...d ? [o.factory.createPropertyAssignment("attribute", o.factory.createFalse())] : [],
|
|
4277
4278
|
...l ? [o.factory.createPropertyAssignment("readOnly", o.factory.createTrue())] : [],
|
|
4278
4279
|
...p !== void 0 ? [p] : []
|
|
4279
4280
|
];
|
|
4280
4281
|
return u.length > 0 ? t.options === void 0 ? o.factory.createObjectLiteralExpression(u, !1) : o.factory.updateObjectLiteralExpression(t.options, [...t.options.properties, ...u]) : t.options;
|
|
4281
4282
|
}
|
|
4282
|
-
function
|
|
4283
|
+
function ic(e, t, i, n, s) {
|
|
4283
4284
|
if (n.attribute === void 0)
|
|
4284
4285
|
return;
|
|
4285
|
-
const r =
|
|
4286
|
+
const r = sc(e), a = i.compiler.viteCommand === "serve" || r !== "Other" ? r : nc(n.type.values);
|
|
4286
4287
|
return a === "Other" || n.readonly && (a !== "Boolean" || !n.reflects) || t.options?.properties[s] !== void 0 ? void 0 : o.factory.createPropertyAssignment(
|
|
4287
4288
|
o.factory.createIdentifier("type"),
|
|
4288
4289
|
o.factory.createIdentifier(a)
|
|
4289
4290
|
);
|
|
4290
4291
|
}
|
|
4291
|
-
function
|
|
4292
|
+
function nc(e) {
|
|
4292
4293
|
let t = !1, i = !1, n = !1;
|
|
4293
4294
|
if (e?.forEach((s) => {
|
|
4294
4295
|
t ||= s.type === "number", i ||= s.type === "boolean", n ||= s.type === "string" || s.type === "any" || s.type === "unknown";
|
|
@@ -4300,7 +4301,7 @@ function ic(e) {
|
|
|
4300
4301
|
}
|
|
4301
4302
|
return "Other";
|
|
4302
4303
|
}
|
|
4303
|
-
function
|
|
4304
|
+
function sc(e) {
|
|
4304
4305
|
const t = e.type ?? (o.isSetAccessor(e) ? e.parameters[0].type : void 0);
|
|
4305
4306
|
if (t === void 0) {
|
|
4306
4307
|
if ("initializer" in e && e.initializer !== void 0) {
|
|
@@ -4317,7 +4318,7 @@ function nc(e) {
|
|
|
4317
4318
|
}
|
|
4318
4319
|
return "Other";
|
|
4319
4320
|
}
|
|
4320
|
-
function
|
|
4321
|
+
function rc(e, t, i, n, s) {
|
|
4321
4322
|
if (t.modifiers === void 0)
|
|
4322
4323
|
return t;
|
|
4323
4324
|
let r = -1, a = -1;
|
|
@@ -4327,7 +4328,7 @@ function sc(e, t, i, n, s) {
|
|
|
4327
4328
|
l === "property" && (r = d), l === "state" && (a = d);
|
|
4328
4329
|
}
|
|
4329
4330
|
}), r !== -1) {
|
|
4330
|
-
const c =
|
|
4331
|
+
const c = oc(e, t, i, n), d = yi(t, r, n), l = tc(t, d, e, n, c);
|
|
4331
4332
|
let p = !1;
|
|
4332
4333
|
return s.set(c.name, l ?? o.factory.createObjectLiteralExpression()), p = !0, d.options = l, hi(t, d, r, p);
|
|
4333
4334
|
} else if (a !== -1) {
|
|
@@ -4338,7 +4339,7 @@ function sc(e, t, i, n, s) {
|
|
|
4338
4339
|
} else
|
|
4339
4340
|
return t;
|
|
4340
4341
|
}
|
|
4341
|
-
function
|
|
4342
|
+
function oc(e, t, i, n) {
|
|
4342
4343
|
const s = e.apiModule?.declarations.find(
|
|
4343
4344
|
(a) => a.name === i
|
|
4344
4345
|
) ?? (e.compiler.isInTest ? {
|
|
@@ -4346,7 +4347,7 @@ function rc(e, t, i, n) {
|
|
|
4346
4347
|
} : void 0);
|
|
4347
4348
|
if (s === void 0)
|
|
4348
4349
|
throw Error(`Failed to find API component for ${i} in ${n.fileName}`);
|
|
4349
|
-
const r =
|
|
4350
|
+
const r = sr(s, t) ?? (e.compiler.isInTest ? { kind: "field", attribute: "", readonly: !1, name: "", type: { text: "" } } : void 0);
|
|
4350
4351
|
if (r === void 0 || r.kind !== "field")
|
|
4351
4352
|
throw Error(
|
|
4352
4353
|
`Failed to find API property for ${t.getText(n)} in ${i} in ${n.fileName}`
|
|
@@ -4405,16 +4406,16 @@ function hi(e, t, i, n) {
|
|
|
4405
4406
|
e.initializer
|
|
4406
4407
|
);
|
|
4407
4408
|
}
|
|
4408
|
-
const
|
|
4409
|
+
const ac = (e, t) => {
|
|
4409
4410
|
if (t.apiModule === void 0 && !t.compiler.isInTest)
|
|
4410
4411
|
return e.statements;
|
|
4411
4412
|
let i;
|
|
4412
4413
|
function n() {
|
|
4413
4414
|
i = /* @__PURE__ */ new Map();
|
|
4414
4415
|
}
|
|
4415
|
-
const s = (c) =>
|
|
4416
|
+
const s = (c) => Ya(c, i, t.compiler.shouldMinify);
|
|
4416
4417
|
function r(c, d) {
|
|
4417
|
-
const l =
|
|
4418
|
+
const l = lc(t, c, d, e, i);
|
|
4418
4419
|
return t.compiler.viteCommand === "build" && o.setEmitFlags(l, o.EmitFlags.NoComments), l;
|
|
4419
4420
|
}
|
|
4420
4421
|
return e.statements.map(
|
|
@@ -4448,11 +4449,11 @@ function On(e, t, i, n, s = Ji) {
|
|
|
4448
4449
|
i.transformation
|
|
4449
4450
|
) : t;
|
|
4450
4451
|
}
|
|
4451
|
-
const
|
|
4452
|
-
function
|
|
4452
|
+
const cc = /* @__PURE__ */ new Set(["connectedCallback", "disconnectedCallback"]);
|
|
4453
|
+
function lc(e, t, i, n, s) {
|
|
4453
4454
|
if (o.isMethodDeclaration(t)) {
|
|
4454
4455
|
const r = t.modifiers?.filter(
|
|
4455
|
-
(a) => !o.isDecorator(a) || !
|
|
4456
|
+
(a) => !o.isDecorator(a) || !dc(a)
|
|
4456
4457
|
);
|
|
4457
4458
|
if (r?.length !== t.modifiers?.length)
|
|
4458
4459
|
return o.factory.updateMethodDeclaration(
|
|
@@ -4466,7 +4467,7 @@ function cc(e, t, i, n, s) {
|
|
|
4466
4467
|
t.type,
|
|
4467
4468
|
t.body
|
|
4468
4469
|
);
|
|
4469
|
-
if ("text" in t.name &&
|
|
4470
|
+
if ("text" in t.name && cc.has(t.name.text) && t.body) {
|
|
4470
4471
|
const a = t.name.text;
|
|
4471
4472
|
return t.body.statements.some(
|
|
4472
4473
|
(d) => o.isExpressionStatement(d) && o.isCallExpression(d.expression) && o.isPropertyAccessExpression(d.expression.expression) && d.expression.expression.expression.kind === o.SyntaxKind.SuperKeyword && d.expression.expression.name.text === a
|
|
@@ -4492,11 +4493,11 @@ function cc(e, t, i, n, s) {
|
|
|
4492
4493
|
);
|
|
4493
4494
|
}
|
|
4494
4495
|
}
|
|
4495
|
-
return o.isPropertyDeclaration(t) || o.isAccessor(t) ?
|
|
4496
|
+
return o.isPropertyDeclaration(t) || o.isAccessor(t) ? rc(e, t, i, n, s) : t;
|
|
4496
4497
|
}
|
|
4497
|
-
const
|
|
4498
|
+
const dc = (e) => o.isCallExpression(e.expression) && o.isIdentifier(e.expression.expression) && e.expression.expression.text === "method", vt = "@arcgis/core", lt = j(), Pe = vt in (lt.dependencies ?? {}) || vt in (lt.peerDependencies ?? {}) || // Does not depend on `@arcgis/core` to avoid cycle, but uses core in Lumina tests
|
|
4498
4499
|
lt.name === "@arcgis/lumina";
|
|
4499
|
-
async function
|
|
4500
|
+
async function pc(e, t, i) {
|
|
4500
4501
|
if (!Pe)
|
|
4501
4502
|
return [];
|
|
4502
4503
|
const n = await Di(vt);
|
|
@@ -4527,8 +4528,8 @@ const vi = (e) => ({
|
|
|
4527
4528
|
cssHref: `${e}esri/themes/light/main.css`,
|
|
4528
4529
|
// This is used be the theme switcher in `@arcgis/storybook-utils`
|
|
4529
4530
|
id: "arcgisCoreStylesheet"
|
|
4530
|
-
}), bi = "makeRuntime(",
|
|
4531
|
-
function
|
|
4531
|
+
}), bi = "makeRuntime(", uc = "@arcgis/core";
|
|
4532
|
+
function mc(e, t) {
|
|
4532
4533
|
const i = e.indexOf(bi);
|
|
4533
4534
|
if (i === -1)
|
|
4534
4535
|
throw new Error("Failed to find makeRuntime() function call in src/runtime.ts");
|
|
@@ -4546,7 +4547,7 @@ function uc(e, t) {
|
|
|
4546
4547
|
"}",
|
|
4547
4548
|
e.slice(n),
|
|
4548
4549
|
Pe ? `
|
|
4549
|
-
import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${
|
|
4550
|
+
import {createObservable,trackAccess,createTrackingTarget,runTracked} from "${uc}/applications/Components/reactiveUtils.js";
|
|
4550
4551
|
createObservable,
|
|
4551
4552
|
runtime.t = trackAccess;
|
|
4552
4553
|
runtime.o = createObservable;
|
|
@@ -4556,15 +4557,15 @@ runtime.r = runTracked;` : ""
|
|
|
4556
4557
|
map: null
|
|
4557
4558
|
};
|
|
4558
4559
|
}
|
|
4559
|
-
function
|
|
4560
|
+
function fc(e) {
|
|
4560
4561
|
return `import "../${e.options.build?.cdn?.namespace === void 0 ? `${xe}/${ee}.css` : `${e.options.build.cdn.namespace}/${e.options.build.cdn.namespace}.css`}";
|
|
4561
4562
|
`;
|
|
4562
4563
|
}
|
|
4563
|
-
const
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
], Si = "@arcgis/lumina:transformComponents",
|
|
4564
|
+
const gc = [
|
|
4565
|
+
Xa,
|
|
4566
|
+
qs,
|
|
4567
|
+
ac
|
|
4568
|
+
], Si = "@arcgis/lumina:transformComponents", yc = (e) => ({
|
|
4568
4569
|
name: Si,
|
|
4569
4570
|
transform: {
|
|
4570
4571
|
// Transform JSX to lit-html first so that vite:esbuild doesn't transform JSX to h().
|
|
@@ -4578,7 +4579,7 @@ const fc = [
|
|
|
4578
4579
|
i
|
|
4579
4580
|
);
|
|
4580
4581
|
else if (i === `${e.dir.src}runtime.ts`)
|
|
4581
|
-
return
|
|
4582
|
+
return mc(t, e);
|
|
4582
4583
|
return;
|
|
4583
4584
|
}
|
|
4584
4585
|
const n = e.getSourceFile(i, t);
|
|
@@ -4586,7 +4587,7 @@ const fc = [
|
|
|
4586
4587
|
const r = o.transform(n, [
|
|
4587
4588
|
(f) => () => zi(e, f, n, [
|
|
4588
4589
|
...e.options.types?.sourceFileTransformers ?? [],
|
|
4589
|
-
...
|
|
4590
|
+
...gc
|
|
4590
4591
|
])
|
|
4591
4592
|
]).transformed[0], a = e._compilerOptionsForPrinter, c = e._typeScriptPrinter, d = a.sourceMap ? ye.createSourceMapGenerator(
|
|
4592
4593
|
e.typeScriptHost,
|
|
@@ -4604,7 +4605,7 @@ const fc = [
|
|
|
4604
4605
|
}
|
|
4605
4606
|
}
|
|
4606
4607
|
});
|
|
4607
|
-
function
|
|
4608
|
+
function hc(e) {
|
|
4608
4609
|
const t = e.typeScriptConfig;
|
|
4609
4610
|
return {
|
|
4610
4611
|
...t,
|
|
@@ -4636,7 +4637,7 @@ function yc(e) {
|
|
|
4636
4637
|
skipLibCheck: !0
|
|
4637
4638
|
};
|
|
4638
4639
|
}
|
|
4639
|
-
function
|
|
4640
|
+
function vc(e) {
|
|
4640
4641
|
const t = e.options.types?.tsconfigPath, i = t && m.isAbsolute(t) ? t : ds(t ?? "tsconfig.json");
|
|
4641
4642
|
if (i === void 0)
|
|
4642
4643
|
throw Error(
|
|
@@ -4675,7 +4676,7 @@ function Jn(e) {
|
|
|
4675
4676
|
const i = o.ScriptTarget[t].toLowerCase();
|
|
4676
4677
|
return i === "latest" ? "esnext" : i;
|
|
4677
4678
|
}
|
|
4678
|
-
function
|
|
4679
|
+
function bc(e, t) {
|
|
4679
4680
|
if (e.isInStorybook && e.viteCommand === "serve") {
|
|
4680
4681
|
const i = (a, c, d, ...l) => {
|
|
4681
4682
|
const p = a.filter(
|
|
@@ -4697,9 +4698,9 @@ function vc(e, t) {
|
|
|
4697
4698
|
e.typeScriptProgram = a.getProgram(), e.typeScriptTypeChecker = e.typeScriptProgram.getTypeChecker(), e._typeScriptReload?.resolve(), e._typeScriptReload = new Fs();
|
|
4698
4699
|
}, e.typeScriptWatchProgram = o.createWatchProgram(n), e.typeScriptConfig = e.typeScriptProgram.getCompilerOptions();
|
|
4699
4700
|
}
|
|
4700
|
-
e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter =
|
|
4701
|
+
e.typeScriptConfig.sourceMap = t, e._compilerOptionsForPrinter = hc(e), e._typeScriptPrinter = un(e._compilerOptionsForPrinter);
|
|
4701
4702
|
}
|
|
4702
|
-
async function
|
|
4703
|
+
async function Sc(e, t, i) {
|
|
4703
4704
|
const n = m.resolve(e.dir.root, t);
|
|
4704
4705
|
await _(n) && await ks(n, { recursive: !0, force: !0 }), await Q(n, { recursive: !0 }), await Is(e.dir.distCdn, m.join(n, "build"), { recursive: !0 });
|
|
4705
4706
|
const s = [
|
|
@@ -4726,7 +4727,7 @@ async function bc(e, t, i) {
|
|
|
4726
4727
|
s.map(async (l, p) => {
|
|
4727
4728
|
const f = p === 0 ? l : m.join(r, l), y = m.join(e.dir.root, f), g = m.join(n, f);
|
|
4728
4729
|
await Q(m.dirname(g), { recursive: !0 });
|
|
4729
|
-
const v = await
|
|
4730
|
+
const v = await B(y, "utf-8"), h = ce(m.dirname(f), `build/${i}`), b = `${d}<script type="module" src="${h}"><\/script>
|
|
4730
4731
|
`, w = Math.min(
|
|
4731
4732
|
...[v.indexOf("<style>"), v.indexOf("<script"), v.indexOf("</head>")].filter(
|
|
4732
4733
|
(C) => C !== -1
|
|
@@ -4753,7 +4754,7 @@ const Kn = /* @__PURE__ */ new Set([
|
|
|
4753
4754
|
"extras",
|
|
4754
4755
|
"support"
|
|
4755
4756
|
]), H = "@arcgis/lumina:buildCdn", xe = "cdn", Bn = "index", ee = "main";
|
|
4756
|
-
function
|
|
4757
|
+
function wc(e) {
|
|
4757
4758
|
const { skip: t = !1, namespace: i, esbuildOptions: n = {} } = e.options.build?.cdn ?? {}, s = e.options.build?.webApp?.destination, r = i !== void 0;
|
|
4758
4759
|
if (r) {
|
|
4759
4760
|
if (i.toLowerCase() !== i)
|
|
@@ -4770,7 +4771,7 @@ function Sc(e) {
|
|
|
4770
4771
|
if (e.provideAssets([
|
|
4771
4772
|
{
|
|
4772
4773
|
type: "dynamic",
|
|
4773
|
-
source: () =>
|
|
4774
|
+
source: () => oo(e),
|
|
4774
4775
|
destination: `../${r ? a : ee}.css`
|
|
4775
4776
|
}
|
|
4776
4777
|
]), !t)
|
|
@@ -4779,8 +4780,8 @@ function Sc(e) {
|
|
|
4779
4780
|
async writeBundle() {
|
|
4780
4781
|
if (e.isInStorybook)
|
|
4781
4782
|
return;
|
|
4782
|
-
const c = Pe && j().name !== "@arcgis/embeddable-components", d = Date.now(), l = 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
|
|
4783
|
-
await
|
|
4783
|
+
const c = Pe && j().name !== "@arcgis/embeddable-components", d = Date.now(), l = 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 Tc(e, a, n, l, c);
|
|
4784
|
+
await Ec(
|
|
4784
4785
|
p,
|
|
4785
4786
|
e,
|
|
4786
4787
|
r ? `${a}.esm` : a,
|
|
@@ -4788,11 +4789,11 @@ function Sc(e) {
|
|
|
4788
4789
|
c
|
|
4789
4790
|
);
|
|
4790
4791
|
const u = Date.now();
|
|
4791
|
-
T.info(H, `CDN was built in ${u - d}ms`), s && await
|
|
4792
|
+
T.info(H, `CDN was built in ${u - d}ms`), s && await Sc(e, s, `${r ? `${a}.esm` : a}.js`);
|
|
4792
4793
|
}
|
|
4793
4794
|
};
|
|
4794
4795
|
}
|
|
4795
|
-
async function
|
|
4796
|
+
async function Tc(e, t, i, n, s) {
|
|
4796
4797
|
const r = e.environment;
|
|
4797
4798
|
if (i.minify && s)
|
|
4798
4799
|
throw Error(
|
|
@@ -4899,7 +4900,7 @@ ${ln(e._globalCssString, e)}`,
|
|
|
4899
4900
|
}
|
|
4900
4901
|
});
|
|
4901
4902
|
}
|
|
4902
|
-
async function
|
|
4903
|
+
async function Ec(e, t, i, n, s) {
|
|
4903
4904
|
const r = t.dir.distCdn, a = `${i}.js`, c = new Map(
|
|
4904
4905
|
e.outputFiles.map((d) => {
|
|
4905
4906
|
const l = {
|
|
@@ -4910,13 +4911,13 @@ async function Tc(e, t, i, n, s) {
|
|
|
4910
4911
|
}, p = d.path.slice(r.length);
|
|
4911
4912
|
if (p === "stdin.js") {
|
|
4912
4913
|
if (s) {
|
|
4913
|
-
const f = d.text.match(
|
|
4914
|
+
const f = d.text.match(Cc)?.[0];
|
|
4914
4915
|
if (f === void 0)
|
|
4915
4916
|
throw Error(
|
|
4916
4917
|
`Failed to find the runtime variable name in the CDN entrypoint file. This likely indicates a bug in Lumina. stdin.js contents:
|
|
4917
4918
|
${d.text}`
|
|
4918
4919
|
);
|
|
4919
|
-
l.code = `${l.code.trimEnd()}${
|
|
4920
|
+
l.code = `${l.code.trimEnd()}${$c(f, n)}`, l.isAsync = !1;
|
|
4920
4921
|
}
|
|
4921
4922
|
return [a, l];
|
|
4922
4923
|
}
|
|
@@ -4927,8 +4928,8 @@ ${d.text}`
|
|
|
4927
4928
|
d.isAsync === void 0 && (l.endsWith(".js") ? Wn(d, c) : d.isAsync = !1);
|
|
4928
4929
|
}), t.options.build?.cdn?.transformer?.(c, t), await Promise.all(Array.from(c.entries(), async ([d, { code: l }]) => await N(r + d, l)));
|
|
4929
4930
|
}
|
|
4930
|
-
const
|
|
4931
|
-
function
|
|
4931
|
+
const Cc = /(?<=;var [a-zA-Z$_]=[a-zA-Z$_]\()[a-zA-Z$_](?=,\{")/u;
|
|
4932
|
+
function $c(e, t) {
|
|
4932
4933
|
let i = [
|
|
4933
4934
|
"window.$arcgis",
|
|
4934
4935
|
"||",
|
|
@@ -4977,17 +4978,17 @@ function Wn(e, t) {
|
|
|
4977
4978
|
e.isProcessing = !0;
|
|
4978
4979
|
const i = [], n = [], s = [], r = /* @__PURE__ */ new Set(), a = [];
|
|
4979
4980
|
let c = 0;
|
|
4980
|
-
const d = e.code.matchAll(
|
|
4981
|
+
const d = e.code.matchAll(Pc);
|
|
4981
4982
|
for (const E of d) {
|
|
4982
4983
|
const [$, L, R, F, M] = E, z = M.startsWith(He);
|
|
4983
4984
|
if (c !== 0 && c !== E.index) {
|
|
4984
|
-
const
|
|
4985
|
-
s.push(
|
|
4985
|
+
const J = e.code.slice(c, E.index);
|
|
4986
|
+
s.push(J), a.push([c, J.length, 0, ""]);
|
|
4986
4987
|
}
|
|
4987
4988
|
if (c = E.index + $.length, z)
|
|
4988
4989
|
a.push([E.index, $.length, 0, ""]), n.push(`"${Un(M.slice(He.length))}"`), i.push(L?.replaceAll(" as ", ":") ?? R ?? F ?? "");
|
|
4989
4990
|
else {
|
|
4990
|
-
const
|
|
4991
|
+
const J = _n(M, t), G = J?.isAsync === !0;
|
|
4991
4992
|
if (L !== void 0) {
|
|
4992
4993
|
const Ae = [];
|
|
4993
4994
|
for (const Ye of L.slice(1, -1).split(",")) {
|
|
@@ -4995,7 +4996,7 @@ function Wn(e, t) {
|
|
|
4995
4996
|
G || r.add(Jt), Ae.push(`${Ot}:${Jt}`);
|
|
4996
4997
|
}
|
|
4997
4998
|
if (G) {
|
|
4998
|
-
const Ye =
|
|
4999
|
+
const Ye = J.oldSingleExportName === void 0 ? `{${Ae.join(",")}}` : Ae[0].split(":")[1];
|
|
4999
5000
|
a.push([E.index + 6, 0, L.length, Ye]);
|
|
5000
5001
|
}
|
|
5001
5002
|
} else if (R === void 0 && F === void 0)
|
|
@@ -5006,7 +5007,7 @@ function Wn(e, t) {
|
|
|
5006
5007
|
S(
|
|
5007
5008
|
H,
|
|
5008
5009
|
`Expected local import specifiers to use only named or side-effect import syntax. Found ${$} in a chunk:
|
|
5009
|
-
${
|
|
5010
|
+
${J.code}`
|
|
5010
5011
|
)
|
|
5011
5012
|
);
|
|
5012
5013
|
r.add(F ?? R);
|
|
@@ -5019,7 +5020,7 @@ ${K.code}`
|
|
|
5019
5020
|
e.code = Ti(e.code, t);
|
|
5020
5021
|
return;
|
|
5021
5022
|
}
|
|
5022
|
-
const p =
|
|
5023
|
+
const p = Ic(r);
|
|
5023
5024
|
let u = e.code.slice(0, c);
|
|
5024
5025
|
for (let E = a.length - 1; E >= 0; E--) {
|
|
5025
5026
|
const [$, L, R, F] = a[E];
|
|
@@ -5037,7 +5038,7 @@ ${K.code}`
|
|
|
5037
5038
|
e.code = C;
|
|
5038
5039
|
}
|
|
5039
5040
|
function wi(e) {
|
|
5040
|
-
const t =
|
|
5041
|
+
const t = xc.exec(e.code), i = t?.index ?? e.code.length;
|
|
5041
5042
|
let n = "";
|
|
5042
5043
|
if (t !== null) {
|
|
5043
5044
|
const s = t[1].split(",");
|
|
@@ -5053,7 +5054,7 @@ function wi(e) {
|
|
|
5053
5054
|
}
|
|
5054
5055
|
return [i, n];
|
|
5055
5056
|
}
|
|
5056
|
-
const
|
|
5057
|
+
const Pc = /import(?:(\{[^}]+\})from|\*as ([\w$]+) from| ([\w$]+) from)?"([^"]+)";/gu, xc = /export\{([^}]+)\};\n$/u, He = "@arcgis/core/";
|
|
5057
5058
|
function _n(e, t) {
|
|
5058
5059
|
if (!e.startsWith("./"))
|
|
5059
5060
|
return;
|
|
@@ -5065,7 +5066,7 @@ function _n(e, t) {
|
|
|
5065
5066
|
return n;
|
|
5066
5067
|
}
|
|
5067
5068
|
function Ti(e, t) {
|
|
5068
|
-
return e.replaceAll(
|
|
5069
|
+
return e.replaceAll(kc, (i, n) => {
|
|
5069
5070
|
if (n.startsWith(He))
|
|
5070
5071
|
return `$arcgis.t(m=>m[0],"${Un(n.slice(He.length))}")`;
|
|
5071
5072
|
if (n.startsWith("./")) {
|
|
@@ -5076,28 +5077,28 @@ function Ti(e, t) {
|
|
|
5076
5077
|
return i;
|
|
5077
5078
|
});
|
|
5078
5079
|
}
|
|
5079
|
-
const
|
|
5080
|
-
function
|
|
5080
|
+
const kc = /(?<![.\w\d])import\("([^"]+)"\)/gu, Un = (e) => e.endsWith(".js") ? e.slice(0, -3) : e;
|
|
5081
|
+
function Ic(e) {
|
|
5081
5082
|
const t = [bt];
|
|
5082
5083
|
return () => {
|
|
5083
5084
|
for (; ; ) {
|
|
5084
|
-
const i =
|
|
5085
|
-
if (
|
|
5085
|
+
const i = Fc(t);
|
|
5086
|
+
if (Nc(t), !e.has(i))
|
|
5086
5087
|
return e.add(i), i;
|
|
5087
5088
|
}
|
|
5088
5089
|
};
|
|
5089
5090
|
}
|
|
5090
|
-
const bt = 0, jt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hn = `${jt}0123456789`,
|
|
5091
|
-
function
|
|
5091
|
+
const bt = 0, jt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_", Hn = `${jt}0123456789`, Ac = jt.length, Lc = Hn.length;
|
|
5092
|
+
function Fc(e) {
|
|
5092
5093
|
let t = jt[e[0]];
|
|
5093
5094
|
for (let i = 1; i < e.length; i++)
|
|
5094
5095
|
t += Hn[e[i]];
|
|
5095
5096
|
return t;
|
|
5096
5097
|
}
|
|
5097
|
-
function
|
|
5098
|
+
function Nc(e) {
|
|
5098
5099
|
let t = e.length - 1;
|
|
5099
5100
|
for (; t >= 0; ) {
|
|
5100
|
-
const i = t === 0 ?
|
|
5101
|
+
const i = t === 0 ? Ac : Lc;
|
|
5101
5102
|
if (e[t] += 1, e[t] >= i)
|
|
5102
5103
|
e[t] = bt, t--;
|
|
5103
5104
|
else
|
|
@@ -5105,7 +5106,7 @@ function Fc(e) {
|
|
|
5105
5106
|
}
|
|
5106
5107
|
e.push(bt);
|
|
5107
5108
|
}
|
|
5108
|
-
async function
|
|
5109
|
+
async function Dc(e, t, i, n, s) {
|
|
5109
5110
|
const r = t.packageName, { hasCss: a, cdnName: c } = await zn(t.packageLocation) ?? {};
|
|
5110
5111
|
if (i === "cdn") {
|
|
5111
5112
|
const u = t.cdnUrl ?? Ge(t.packageJson, s);
|
|
@@ -5171,7 +5172,7 @@ async function Ei(e, t) {
|
|
|
5171
5172
|
cdnName: t
|
|
5172
5173
|
} : void 0;
|
|
5173
5174
|
}
|
|
5174
|
-
async function
|
|
5175
|
+
async function jc(e, t, i, n, s) {
|
|
5175
5176
|
const a = t.packageJson.exports?.[`./${ee}.css`] === void 0 ? await zn(t.packageLocation) : void 0, c = a?.cdnName ?? xe, d = a === void 0 ? `${Bn}.js` : `${a.cdnName}.esm.js`;
|
|
5176
5177
|
if (i === "cdn")
|
|
5177
5178
|
return {
|
|
@@ -5181,7 +5182,7 @@ async function Dc(e, t, i, n, s) {
|
|
|
5181
5182
|
src: `${t.cdnUrl ?? Ge(t.packageJson, s)}${d}`
|
|
5182
5183
|
}
|
|
5183
5184
|
};
|
|
5184
|
-
const l =
|
|
5185
|
+
const l = Rc(t.packageJson), p = `${t.packageName}/${m.normalize(l)}${Y}`, u = [
|
|
5185
5186
|
`import styles$${n} from "${p}";`,
|
|
5186
5187
|
`document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles$${n}.styleSheet];`
|
|
5187
5188
|
], f = `${t.packageName}/loader`;
|
|
@@ -5200,7 +5201,7 @@ async function Dc(e, t, i, n, s) {
|
|
|
5200
5201
|
]
|
|
5201
5202
|
};
|
|
5202
5203
|
}
|
|
5203
|
-
function
|
|
5204
|
+
function Rc(e) {
|
|
5204
5205
|
const { exports: t } = e;
|
|
5205
5206
|
if (t === void 0)
|
|
5206
5207
|
throw new Error(
|
|
@@ -5210,19 +5211,19 @@ function jc(e) {
|
|
|
5210
5211
|
return n ? n[0] : i.length > 0 ? i[0][0] : `./${ee}.css`;
|
|
5211
5212
|
}
|
|
5212
5213
|
async function Ce(e) {
|
|
5213
|
-
return e._loadersCache ??=
|
|
5214
|
+
return e._loadersCache ??= Mc(e), await e._loadersCache;
|
|
5214
5215
|
}
|
|
5215
|
-
async function
|
|
5216
|
+
async function Mc(e) {
|
|
5216
5217
|
const t = e.viteCommand === "build" ? "cdn" : "lazyNpm", i = e.environment === "development", n = e.viteConfig.base;
|
|
5217
5218
|
let s = 0;
|
|
5218
5219
|
const r = async (l) => (await Promise.all(
|
|
5219
5220
|
l.map(async (p) => {
|
|
5220
5221
|
const u = s++;
|
|
5221
|
-
return p.type === "stencil" ? await
|
|
5222
|
+
return p.type === "stencil" ? await Dc(n, p, t, u, i) : p.type === "@arcgis/lumina" ? await jc(n, p, t, u, i) : void 0;
|
|
5222
5223
|
})
|
|
5223
5224
|
)).filter(D).flat(), a = await Promise.all([
|
|
5224
5225
|
// This may contain an import map so must be first
|
|
5225
|
-
|
|
5226
|
+
pc(n, t, i),
|
|
5226
5227
|
Te.then(r),
|
|
5227
5228
|
qn(e).then(r)
|
|
5228
5229
|
]), c = m.join(e.dir.src, "loader.ts");
|
|
@@ -5263,7 +5264,7 @@ async function qn(e) {
|
|
|
5263
5264
|
).then((i) => i.filter(D)), await e._serveOnlyDependencies);
|
|
5264
5265
|
}
|
|
5265
5266
|
const Gn = "/@arcgis/lumina-compiler/testSetupFile", dt = [Gn];
|
|
5266
|
-
async function
|
|
5267
|
+
async function Oc(e) {
|
|
5267
5268
|
if (!e.viteConfig.test?.browser?.enabled)
|
|
5268
5269
|
return Ci(e);
|
|
5269
5270
|
const i = (await Ce(e)).map((n, s) => {
|
|
@@ -5291,12 +5292,12 @@ async function Mc(e) {
|
|
|
5291
5292
|
`);
|
|
5292
5293
|
return [Ci(e), i].join("");
|
|
5293
5294
|
}
|
|
5294
|
-
const Ci = (e) => [e.isInPuppeteerTestBackEnd ?
|
|
5295
|
+
const Ci = (e) => [e.isInPuppeteerTestBackEnd ? Jc : "", Kc].join(""), Jc = `import { setupPuppeteerTest } from "@arcgis/lumina-compiler/puppeteerTesting";
|
|
5295
5296
|
setupPuppeteerTest();
|
|
5296
|
-
`,
|
|
5297
|
+
`, Kc = `import { setupLuminaTest } from "@arcgis/lumina-compiler/testing";
|
|
5297
5298
|
setupLuminaTest();
|
|
5298
5299
|
`;
|
|
5299
|
-
function
|
|
5300
|
+
function Bc(e) {
|
|
5300
5301
|
let t = !0, i = !1, n, s, r, a, c;
|
|
5301
5302
|
const d = "@arcgis/lumina:generateVirtualFiles", l = {
|
|
5302
5303
|
name: d,
|
|
@@ -5309,17 +5310,17 @@ function Kc(e) {
|
|
|
5309
5310
|
const v = g.startsWith(Gn);
|
|
5310
5311
|
if (!(!g.endsWith(".tsx") && g !== a && !v)) {
|
|
5311
5312
|
if (s === void 0 && !e.isInPuppeteerTestBackEnd) {
|
|
5312
|
-
r === void 0 && clearTimeout(n), r ??=
|
|
5313
|
+
r === void 0 && clearTimeout(n), r ??= Uo(e, t).catch((b) => {
|
|
5313
5314
|
throw i = !0, b;
|
|
5314
5315
|
}), t = !1;
|
|
5315
5316
|
const h = await r;
|
|
5316
5317
|
s ??= h;
|
|
5317
5318
|
}
|
|
5318
|
-
return g === a ?
|
|
5319
|
+
return g === a ? ao(e) : v ? await Oc(e) : void 0;
|
|
5319
5320
|
}
|
|
5320
5321
|
},
|
|
5321
5322
|
async writeBundle() {
|
|
5322
|
-
e.isInStorybook || await N(m.join(e.dir.dist, "loader.d.ts"),
|
|
5323
|
+
e.isInStorybook || await N(m.join(e.dir.dist, "loader.d.ts"), co);
|
|
5323
5324
|
},
|
|
5324
5325
|
async handleHotUpdate({ file: g, modules: v, read: h }) {
|
|
5325
5326
|
const b = await p(g, h);
|
|
@@ -5333,7 +5334,7 @@ function Kc(e) {
|
|
|
5333
5334
|
if (e.isInPuppeteerTestBackEnd)
|
|
5334
5335
|
return;
|
|
5335
5336
|
e.isInTest && g.watcher.on("change", (h) => {
|
|
5336
|
-
p(h, async () => await
|
|
5337
|
+
p(h, async () => await B(h, "utf8")).catch(
|
|
5337
5338
|
(b) => T.warn(d, h, String(b))
|
|
5338
5339
|
);
|
|
5339
5340
|
}), g.watcher.on("add", v), g.watcher.on("unlink", v), g.watcher.on(
|
|
@@ -5384,7 +5385,7 @@ function Kc(e) {
|
|
|
5384
5385
|
if (!we(g, e.dir.srcComponents))
|
|
5385
5386
|
return;
|
|
5386
5387
|
h ??= await v();
|
|
5387
|
-
const w =
|
|
5388
|
+
const w = Ho(e, g, h);
|
|
5388
5389
|
if (w === void 0)
|
|
5389
5390
|
return !1;
|
|
5390
5391
|
for (const P of w) {
|
|
@@ -5412,10 +5413,10 @@ function he(e, t, i = Rt) {
|
|
|
5412
5413
|
throw Error(S(St, "serveAssets() is only available when Vite is running in serve mode"));
|
|
5413
5414
|
const n = e._serverConfigured, s = e.server.middlewares.stack.length;
|
|
5414
5415
|
if (t.forEach((r) => {
|
|
5415
|
-
const a = Xn(r), c = Zn(e.dir, Qn(a)), d =
|
|
5416
|
+
const a = Xn(r), c = Zn(e.dir, Qn(a)), d = _c(e.viteConfig.base, c, e.dir.distCdn);
|
|
5416
5417
|
e.server.middlewares.use(d, (l, p, u) => {
|
|
5417
|
-
const f =
|
|
5418
|
-
return (typeof y == "function" ? Promise.resolve(y()) :
|
|
5418
|
+
const f = Uc(l.url), y = a.type === "directory" ? m.resolve(a.source, f.slice(1)) : a.source, g = m.join(c, f), v = i.find((h) => h.match(g, e));
|
|
5419
|
+
return (typeof y == "function" ? Promise.resolve(y()) : B(y)).then((h) => {
|
|
5419
5420
|
const b = (typeof y == "function" ? void 0 : v?.transform(h.toString("utf8"), g, e)) ?? h;
|
|
5420
5421
|
p.setHeader("Cache-Control", "max-age=31536000, immutable"), p.setHeader("Content-Type", Ds.lookup(f) || "application/octet-stream"), p.write(b), p.end();
|
|
5421
5422
|
}).catch((h) => {
|
|
@@ -5467,7 +5468,7 @@ async function $i(e, t, i, n) {
|
|
|
5467
5468
|
if (s === void 0)
|
|
5468
5469
|
await As(e, t);
|
|
5469
5470
|
else {
|
|
5470
|
-
const r = await
|
|
5471
|
+
const r = await B(e, "utf8"), a = s.transform(r, t, n);
|
|
5471
5472
|
await N(t, a);
|
|
5472
5473
|
}
|
|
5473
5474
|
}
|
|
@@ -5487,33 +5488,33 @@ function Qn(e) {
|
|
|
5487
5488
|
return e.destination === "" ? m.basename(e.source) : e.destination.endsWith(m.sep) ? e.type === "directory" && e.destination === m.sep ? e.destination : m.join(e.destination, m.basename(e.source)) : e.destination;
|
|
5488
5489
|
}
|
|
5489
5490
|
function Zn({ dist: e, distCdnAssets: t }, i) {
|
|
5490
|
-
const n =
|
|
5491
|
+
const n = Wc(i), s = m.join(
|
|
5491
5492
|
t,
|
|
5492
5493
|
n ? m.relative(t, i) : i
|
|
5493
5494
|
), r = m.relative(e, s), a = Yn(r);
|
|
5494
5495
|
return m.join(e, a);
|
|
5495
5496
|
}
|
|
5496
|
-
function
|
|
5497
|
+
function Wc(e) {
|
|
5497
5498
|
if (e.startsWith(m.sep)) {
|
|
5498
5499
|
const t = Mi(), i = t.startsWith(m.sep) ? t.split(m.sep)[1] ?? "" : "";
|
|
5499
5500
|
return e.startsWith(`/${i}/`) || e.startsWith("/Users/");
|
|
5500
5501
|
} else
|
|
5501
5502
|
return !!(!Ri && m.isAbsolute(e));
|
|
5502
5503
|
}
|
|
5503
|
-
function
|
|
5504
|
+
function _c(e, t, i) {
|
|
5504
5505
|
const n = Yn(m.relative(i, t)), s = n.startsWith("/") ? n.slice(1) : n;
|
|
5505
5506
|
return `${e}${s}`;
|
|
5506
5507
|
}
|
|
5507
|
-
const Yn = (e) => e.replaceAll("../", ""),
|
|
5508
|
+
const Yn = (e) => e.replaceAll("../", ""), Uc = (e = "") => e.split("?")[0].split("#")[0];
|
|
5508
5509
|
async function es(e) {
|
|
5509
5510
|
const t = new Set(e.map(m.dirname));
|
|
5510
5511
|
await Promise.all(Array.from(t, async (i) => await Q(i, { recursive: !0 })));
|
|
5511
5512
|
}
|
|
5512
|
-
const
|
|
5513
|
+
const Hc = {
|
|
5513
5514
|
match: (e, t) => t.environment === "production" && e.endsWith(".json"),
|
|
5514
5515
|
transform: (e) => JSON.stringify(JSON.parse(e))
|
|
5515
|
-
}, Rt = [
|
|
5516
|
-
function
|
|
5516
|
+
}, Rt = [Hc];
|
|
5517
|
+
function zc(e) {
|
|
5517
5518
|
let t;
|
|
5518
5519
|
const i = () => [
|
|
5519
5520
|
...e.options.assets?.transformers ?? [],
|
|
@@ -5522,7 +5523,7 @@ function Hc(e) {
|
|
|
5522
5523
|
return {
|
|
5523
5524
|
name: "@arcgis/lumina:handleStaticAssets",
|
|
5524
5525
|
configResolved() {
|
|
5525
|
-
t =
|
|
5526
|
+
t = qc(e);
|
|
5526
5527
|
},
|
|
5527
5528
|
async configureServer(n) {
|
|
5528
5529
|
e.server = n, !e.isInPuppeteerTestBackEnd && (he(e, await t, i()), n.watcher.on("addDir", (s) => {
|
|
@@ -5537,7 +5538,7 @@ function Hc(e) {
|
|
|
5537
5538
|
}
|
|
5538
5539
|
};
|
|
5539
5540
|
}
|
|
5540
|
-
async function
|
|
5541
|
+
async function qc(e) {
|
|
5541
5542
|
const t = _("assets"), i = await e.componentFilesPromise, n = await Promise.all(
|
|
5542
5543
|
i.map(async (s) => {
|
|
5543
5544
|
const r = m.dirname(s), a = m.join(r, "assets");
|
|
@@ -5550,7 +5551,7 @@ const ts = (e, t) => ({
|
|
|
5550
5551
|
type: "directory",
|
|
5551
5552
|
source: e,
|
|
5552
5553
|
destination: m.basename(t)
|
|
5553
|
-
}), is = { type: "directory", source: "assets/", destination: "" }, pt = "@arcgis/lumina:printTotalBuildSize",
|
|
5554
|
+
}), is = { type: "directory", source: "assets/", destination: "" }, pt = "@arcgis/lumina:printTotalBuildSize", Gc = (e) => ({
|
|
5554
5555
|
name: pt,
|
|
5555
5556
|
apply: () => e.viteCommand === "build",
|
|
5556
5557
|
configResolved(t) {
|
|
@@ -5567,10 +5568,10 @@ const ts = (e, t) => ({
|
|
|
5567
5568
|
const u = console.log;
|
|
5568
5569
|
console.log = function(...y) {
|
|
5569
5570
|
if (u.apply(console, y), y.length === 1 && typeof y[0] == "string") {
|
|
5570
|
-
const [g, v] = y[0].match(
|
|
5571
|
+
const [g, v] = y[0].match(Xc) ?? [];
|
|
5571
5572
|
if (!g)
|
|
5572
5573
|
return;
|
|
5573
|
-
p || (p = y[0].slice(0, y[0].indexOf(g) + g.length).replaceAll(
|
|
5574
|
+
p || (p = y[0].slice(0, y[0].indexOf(g) + g.length).replaceAll(Qc, "").length);
|
|
5574
5575
|
const h = Number.parseFloat(g.replace(" kB", "").replaceAll(",", ""));
|
|
5575
5576
|
v ? (l += Number.parseFloat(v.replace(" kB", "").replaceAll(",", "")), d += h) : c += h;
|
|
5576
5577
|
}
|
|
@@ -5586,7 +5587,7 @@ const ts = (e, t) => ({
|
|
|
5586
5587
|
[
|
|
5587
5588
|
xi,
|
|
5588
5589
|
v,
|
|
5589
|
-
|
|
5590
|
+
Vc,
|
|
5590
5591
|
"*",
|
|
5591
5592
|
" ".repeat(p - `${v}*`.length - g.length),
|
|
5592
5593
|
g,
|
|
@@ -5597,10 +5598,10 @@ const ts = (e, t) => ({
|
|
|
5597
5598
|
}
|
|
5598
5599
|
};
|
|
5599
5600
|
}
|
|
5600
|
-
}), Pi = "\x1B[22m\x1B[1m\x1B[22m", xi = "\x1B[2m",
|
|
5601
|
+
}), Pi = "\x1B[22m\x1B[1m\x1B[22m", xi = "\x1B[2m", Vc = "\x1B[22m\x1B[36m", Xc = /\d+(?:,\d+)?\.\d{2} kB/gu, Qc = /\x1B\[\d+m/gu, Zc = new Intl.NumberFormat("en", {
|
|
5601
5602
|
maximumFractionDigits: 2,
|
|
5602
5603
|
minimumFractionDigits: 2
|
|
5603
|
-
}), ki = (e) => `${
|
|
5604
|
+
}), ki = (e) => `${Zc.format(e)} kB`, Ii = "@arcgis/lumina:configureVite", Yc = (e) => ({
|
|
5604
5605
|
name: Ii,
|
|
5605
5606
|
async config({
|
|
5606
5607
|
server: t,
|
|
@@ -5617,7 +5618,7 @@ const ts = (e, t) => ({
|
|
|
5617
5618
|
*/
|
|
5618
5619
|
loader: "src/loader.ts",
|
|
5619
5620
|
// Entrypoint for bundling used components only:
|
|
5620
|
-
...await
|
|
5621
|
+
...await fo(e)
|
|
5621
5622
|
}, { loader: g, ...v } = y, h = e.environment === "development" || e.isInTest ? {
|
|
5622
5623
|
"process.env.ESRI_INTERNAL": "true"
|
|
5623
5624
|
} : void 0, b = !import.meta.url.includes("node_modules"), w = {
|
|
@@ -5771,23 +5772,23 @@ const ts = (e, t) => ({
|
|
|
5771
5772
|
browser: {
|
|
5772
5773
|
enabled: e.isInPuppeteerTestFrontEnd ? !1 : p?.enabled ?? !0,
|
|
5773
5774
|
instances: p?.instances === void 0 ? [{ browser: "chromium" }] : void 0,
|
|
5774
|
-
provider: p?.provider ??
|
|
5775
|
+
provider: p?.provider ?? Os
|
|
5775
5776
|
}
|
|
5776
5777
|
}
|
|
5777
5778
|
};
|
|
5778
5779
|
}
|
|
5779
|
-
}),
|
|
5780
|
+
}), el = (e) => ({
|
|
5780
5781
|
name: "@arcgis/lumina:setAssetPath",
|
|
5781
5782
|
apply: () => e.viteCommand === "build",
|
|
5782
5783
|
config: (t) => ({
|
|
5783
5784
|
base: t.base ?? e.options.assets?.defaultPath ?? Ge()
|
|
5784
5785
|
})
|
|
5785
5786
|
});
|
|
5786
|
-
function
|
|
5787
|
+
function tl(e = j()) {
|
|
5787
5788
|
const t = e.version ?? "0.0.1";
|
|
5788
5789
|
return vs(t);
|
|
5789
5790
|
}
|
|
5790
|
-
const
|
|
5791
|
+
const il = (e) => `/*! ${e} */`, k = (e) => (t, i) => {
|
|
5791
5792
|
Object.defineProperty(t, i, {
|
|
5792
5793
|
get() {
|
|
5793
5794
|
throw Error(
|
|
@@ -5827,7 +5828,7 @@ const fe = {
|
|
|
5827
5828
|
stencilLikeDocsJson: "docs/docs.json"
|
|
5828
5829
|
};
|
|
5829
5830
|
async function ns(e, t, i, n, s = j()) {
|
|
5830
|
-
const r =
|
|
5831
|
+
const r = nl(e, i, n, s), a = m.join(t, "lumina.ts"), d = await _(a) ? await B(a, "utf8") : "";
|
|
5831
5832
|
if (d.trim().replaceAll(`\r
|
|
5832
5833
|
`, `
|
|
5833
5834
|
`) === r.trim())
|
|
@@ -5847,7 +5848,7 @@ ${d}`
|
|
|
5847
5848
|
);
|
|
5848
5849
|
return Ki(a, r), !0;
|
|
5849
5850
|
}
|
|
5850
|
-
function
|
|
5851
|
+
function nl(e, t, i, n = j()) {
|
|
5851
5852
|
"@arcgis/components-controllers" in (n.dependencies ?? {}) && T.warn(
|
|
5852
5853
|
"@arcgis/components-controllers",
|
|
5853
5854
|
"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."
|
|
@@ -5862,11 +5863,11 @@ declare module "@arcgis/lumina" {
|
|
|
5862
5863
|
interface ImportStencilElements extends ${r.map((u, f) => `JSX$${f}.IntrinsicElements`).join(", ")} {}
|
|
5863
5864
|
}`, d = n.devDependencies ?? {}, l = i === "preview" ? "matchers" : i === "webdriverio" ? "webdriverio" : "playwright";
|
|
5864
5865
|
return [
|
|
5865
|
-
|
|
5866
|
+
sl,
|
|
5866
5867
|
// Avoid cyclic references for tests in @arcgis/lumina
|
|
5867
5868
|
n.name === "@arcgis/lumina" ? "" : `
|
|
5868
5869
|
/// <reference types="@arcgis/lumina/typings" />`,
|
|
5869
|
-
t ?
|
|
5870
|
+
t ? rl : "",
|
|
5870
5871
|
d.vitest ? `
|
|
5871
5872
|
/// <reference types="vitest/config" />` : "",
|
|
5872
5873
|
d["@vitest/browser"] ? `
|
|
@@ -5880,7 +5881,7 @@ declare module "@arcgis/lumina" {
|
|
|
5880
5881
|
`
|
|
5881
5882
|
].join("");
|
|
5882
5883
|
}
|
|
5883
|
-
const
|
|
5884
|
+
const sl = `/**
|
|
5884
5885
|
* This file is autogenerated by \`@arcgis/lumina-compiler\` - do not edit it manually.
|
|
5885
5886
|
* Manual edits will be overwritten.
|
|
5886
5887
|
*
|
|
@@ -5888,7 +5889,7 @@ const nl = `/**
|
|
|
5888
5889
|
* as well as @arcgis/core typings if you use @arcgis/core.
|
|
5889
5890
|
*
|
|
5890
5891
|
* If you need to provide additional typings, create a separate file.
|
|
5891
|
-
*/`,
|
|
5892
|
+
*/`, rl = `
|
|
5892
5893
|
/// <reference types="@arcgis/core/interfaces" />`, Oe = "@arcgis/lumina:dependencySupport", ss = (e, t) => e.viteCommand === "serve" && /**
|
|
5893
5894
|
* Vitest started calling transformIndexHtml in browser mode versions ^2.1.4
|
|
5894
5895
|
* However, it is a bit buggy (see
|
|
@@ -5900,10 +5901,10 @@ const nl = `/**
|
|
|
5900
5901
|
* is doing:
|
|
5901
5902
|
* https://github.com/storybookjs/storybook/blob/a5c2cf1712f70b4e3ecf38d3c98e7db8e8d67849/code/builders/builder-vite/src/plugins/code-generator-plugin.ts#L110
|
|
5902
5903
|
*/
|
|
5903
|
-
e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0,
|
|
5904
|
+
e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand === "build" && !e.options.build?.cdn?.skip && e.options.build?.webApp?.destination !== void 0, ol = (e) => ({
|
|
5904
5905
|
name: Oe,
|
|
5905
5906
|
configResolved() {
|
|
5906
|
-
!e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise =
|
|
5907
|
+
!e.isInTest && !e.isInStorybook && (e._updateLuminaTsPromise = al(e).catch(
|
|
5907
5908
|
(t) => T.error(Oe, `Failed to update package's src/lumina.ts: ${String(t)}`)
|
|
5908
5909
|
));
|
|
5909
5910
|
},
|
|
@@ -5951,7 +5952,7 @@ e.isInStorybook && (t === void 0 || t.path === "/iframe.html") || e.viteCommand
|
|
|
5951
5952
|
await e._updateLuminaTsPromise;
|
|
5952
5953
|
}
|
|
5953
5954
|
});
|
|
5954
|
-
async function
|
|
5955
|
+
async function al(e) {
|
|
5955
5956
|
const i = (await Promise.all([Te, qn(e)])).flat();
|
|
5956
5957
|
if (!await ns(
|
|
5957
5958
|
i,
|
|
@@ -5962,22 +5963,22 @@ async function ol(e) {
|
|
|
5962
5963
|
return;
|
|
5963
5964
|
let s = !1;
|
|
5964
5965
|
function r() {
|
|
5965
|
-
s || T.warn(Oe,
|
|
5966
|
+
s || T.warn(Oe, cl), s = !0;
|
|
5966
5967
|
}
|
|
5967
5968
|
process.on("exit", () => {
|
|
5968
5969
|
r(), clearTimeout(c);
|
|
5969
5970
|
});
|
|
5970
5971
|
const c = setTimeout(r, 2e3);
|
|
5971
5972
|
}
|
|
5972
|
-
const
|
|
5973
|
+
const cl = js.greenBright(
|
|
5973
5974
|
`lumina.ts has been updated (potentially because your dependencies changed). Please commit the updated file.
|
|
5974
5975
|
If build failed with TypeScript errors, try running the build again to check whether new lumina.ts resolves the errors.`
|
|
5975
5976
|
);
|
|
5976
|
-
async function
|
|
5977
|
+
async function ll(e, t) {
|
|
5977
5978
|
const i = /* @__PURE__ */ new Map();
|
|
5978
5979
|
await Promise.all(
|
|
5979
5980
|
e.map(async (s) => {
|
|
5980
|
-
const r = await
|
|
5981
|
+
const r = await Rs(s, "utf-8"), a = r.match(dl)?.[1];
|
|
5981
5982
|
if (a === void 0) {
|
|
5982
5983
|
T.warn(
|
|
5983
5984
|
"@arcgis/lumina:parseStoryFiles",
|
|
@@ -5989,14 +5990,14 @@ async function cl(e, t) {
|
|
|
5989
5990
|
let c = i.get(a);
|
|
5990
5991
|
c === void 0 && (c = [], i.set(a, c));
|
|
5991
5992
|
const d = [];
|
|
5992
|
-
for (const l of r.matchAll(
|
|
5993
|
-
const p = l[1], u =
|
|
5993
|
+
for (const l of r.matchAll(pl)) {
|
|
5994
|
+
const p = l[1], u = gl(p), f = r.indexOf("{", l.index), y = r.indexOf("}", f), g = r.slice(0, l.index).trimEnd();
|
|
5994
5995
|
let v = "";
|
|
5995
5996
|
if (g.endsWith("*/")) {
|
|
5996
5997
|
const w = g.lastIndexOf("/**");
|
|
5997
|
-
v = g.slice(w + 3, -2).trim().replaceAll(
|
|
5998
|
+
v = g.slice(w + 3, -2).trim().replaceAll(ml, "");
|
|
5998
5999
|
}
|
|
5999
|
-
const h = r.slice(f, y).match(
|
|
6000
|
+
const h = r.slice(f, y).match(ul)?.[1] || u, b = fl(u);
|
|
6000
6001
|
d.push({
|
|
6001
6002
|
description: `${h}${v ? `
|
|
6002
6003
|
${v}` : ""}`,
|
|
@@ -6021,11 +6022,11 @@ ${v}` : ""}`,
|
|
|
6021
6022
|
}
|
|
6022
6023
|
return n;
|
|
6023
6024
|
}
|
|
6024
|
-
const
|
|
6025
|
-
var
|
|
6025
|
+
const dl = /component: ["']([^"']+)["']/u, pl = /export const (\w+)/gu, ul = /name: ["']([^"']+)["']/u, ml = /^\s*\*\s?/gmu, fl = (e) => e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/giu, "-").replace(/-+/gu, "-").replace(/^-+/u, "").replace(/-+$/u, ""), gl = (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(), ie = { node: "^22" };
|
|
6026
|
+
var yl = Object.defineProperty, I = (e, t, i, n) => {
|
|
6026
6027
|
for (var s = void 0, r = e.length - 1, a; r >= 0; r--)
|
|
6027
6028
|
(a = e[r]) && (s = a(t, i, s) || s);
|
|
6028
|
-
return s &&
|
|
6029
|
+
return s && yl(t, i, s), s;
|
|
6029
6030
|
};
|
|
6030
6031
|
const W = "@arcgis/lumina:context";
|
|
6031
6032
|
class x {
|
|
@@ -6066,9 +6067,9 @@ class x {
|
|
|
6066
6067
|
"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."
|
|
6067
6068
|
), this.isInStorybook = a.resolve.conditions.includes("storybook"), this.isFullApiExtraction = this.viteCommand === "build" || this.isInStorybook, this.hmrEnabled = this.viteCommand === "serve" && !this.isInTest && !!(a.server?.hmr ?? !0);
|
|
6068
6069
|
const h = this.options.documentation?.publicStoryUrlPrefix;
|
|
6069
|
-
this.isFullApiExtraction && typeof h == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await
|
|
6070
|
+
this.isFullApiExtraction && typeof h == "string" ? this.componentStoriesPromise = this.componentFilesPromise.then(async () => await ll(this.componentStoryFiles, h)).then((b) => {
|
|
6070
6071
|
this.componentStories = b;
|
|
6071
|
-
}) : (this.componentStoriesPromise = void 0, this.componentStories = void 0),
|
|
6072
|
+
}) : (this.componentStoriesPromise = void 0, this.componentStories = void 0), bc(this, a.build.sourcemap !== !1), ss(this) && Ce(this);
|
|
6072
6073
|
}
|
|
6073
6074
|
},
|
|
6074
6075
|
configureServer: {
|
|
@@ -6080,13 +6081,11 @@ class x {
|
|
|
6080
6081
|
/**
|
|
6081
6082
|
* Workaround for a Vite bug.
|
|
6082
6083
|
* See https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/5414
|
|
6084
|
+
* See https://github.com/vitejs/vite/issues/20053
|
|
6083
6085
|
*/
|
|
6084
6086
|
transformIndexHtml: (a) => {
|
|
6085
6087
|
if (this.isInStorybook && this.viteCommand === "build")
|
|
6086
|
-
return a.
|
|
6087
|
-
'<script type="module" crossorigin src="@arcgis/core/applications/Components/reactiveUtils.js"><\/script>',
|
|
6088
|
-
""
|
|
6089
|
-
);
|
|
6088
|
+
return a.replaceAll(/<script type="module" crossorigin src="@arcgis\/core\/[^"]+"><\/script>/gu, "");
|
|
6090
6089
|
}
|
|
6091
6090
|
}, this._localDefinedComponents = void 0, this._cssImports = /* @__PURE__ */ new Map(), this._cssDocs = void 0, this.isInCi = !!process.env.CI, this._declarationTextTransformers = [], this._serverConfigured = !1, this.assetsToProvide = [], this._globalCssString = void 0, this._loadersCache = void 0, this._serveOnlyDependencies = void 0, this._customElementDependencies = {}, this._htmlElementReferencesReplacer = void 0, this._silencedRules = void 0, this._updateLuminaTsPromise = void 0, this.normalizedDocumentationUrl = "developers.arcgis.com", this.alternativeDocumentationUrl = "next.gha.afd.arcgis.com", this.options = t, (!ie.node.startsWith("^") || ie.node.length !== 3) && T.error(
|
|
6092
6091
|
W,
|
|
@@ -6107,9 +6106,9 @@ class x {
|
|
|
6107
6106
|
webTypes: s.jetBrains === !1 ? void 0 : s.jetBrains?.webTypesFileName ? me(s.jetBrains.webTypesFileName) : fe.webTypes,
|
|
6108
6107
|
vsCodeHtml: s.vsCode === !1 ? void 0 : s.vsCode?.htmlFileName ? me(s.vsCode.htmlFileName) : fe.vsCodeHtml,
|
|
6109
6108
|
vsCodeCss: s.vsCode === !1 ? void 0 : s.vsCode?.cssFileName ? me(s.vsCode.cssFileName) : fe.vsCodeCss
|
|
6110
|
-
}, bn(void 0, t), this.componentFilesPromise = kt(this, m.resolve("src/components")),
|
|
6111
|
-
const r = t.build?.preamble ??
|
|
6112
|
-
this.banner =
|
|
6109
|
+
}, bn(void 0, t), this.componentFilesPromise = kt(this, m.resolve("src/components")), vc(this);
|
|
6110
|
+
const r = t.build?.preamble ?? tl();
|
|
6111
|
+
this.banner = il(r);
|
|
6113
6112
|
}
|
|
6114
6113
|
_inferBuildSetup({ command: t, mode: i }, n) {
|
|
6115
6114
|
this.isInTest = process.env.NODE_ENV === "test", i === "production" || i === "development" ? this.environment = i : i === "test" || i === "benchmark" ? (this.environment = "development", this.isInTest = !0) : (T.warn(It, `Vite is running in unknown mode "${i}". Assuming development`), this.environment = "development"), this.viteCommand = t;
|
|
@@ -6267,7 +6266,7 @@ I([
|
|
|
6267
6266
|
I([
|
|
6268
6267
|
k("configResolved()")
|
|
6269
6268
|
], x.prototype, "_typeScriptPrinter");
|
|
6270
|
-
const De = "@arcgis/lumina:addNonLazyImports",
|
|
6269
|
+
const De = "@arcgis/lumina:addNonLazyImports", hl = (e) => ({
|
|
6271
6270
|
name: De,
|
|
6272
6271
|
apply: () => e.viteCommand === "build",
|
|
6273
6272
|
generateBundle(t, i) {
|
|
@@ -6277,7 +6276,7 @@ const De = "@arcgis/lumina:addNonLazyImports", yl = (e) => ({
|
|
|
6277
6276
|
if (a !== s && (r.fileName = a), r.type === "chunk") {
|
|
6278
6277
|
const c = m.dirname(m.join(e.dir.dist, s)), d = a === s ? c : m.dirname(m.join(e.dir.dist, a));
|
|
6279
6278
|
let l = r.code;
|
|
6280
|
-
l = _i(l, e, d, c), !e.isInStorybook && a === "chunks/runtime.js" && (n = !0, l =
|
|
6279
|
+
l = _i(l, e, d, c), !e.isInStorybook && a === "chunks/runtime.js" && (n = !0, l = fc(e) + l), r.code = l;
|
|
6281
6280
|
}
|
|
6282
6281
|
}), !n && !e.isInStorybook)
|
|
6283
6282
|
throw Error(S(De, "Expected to find a chunks/runtime.js file in the Vite's build output."));
|
|
@@ -6314,10 +6313,10 @@ Possible causes:
|
|
|
6314
6313
|
return [];
|
|
6315
6314
|
const d = m.dirname(r), l = be(d, e.dir.srcComponents, e), p = m.relative(e.dir.src, l);
|
|
6316
6315
|
function u(E) {
|
|
6317
|
-
const $ =
|
|
6316
|
+
const $ = Ga(e, E, r);
|
|
6318
6317
|
if ($ === void 0)
|
|
6319
6318
|
return;
|
|
6320
|
-
const L =
|
|
6319
|
+
const L = Va($, p);
|
|
6321
6320
|
if (L !== `./${p}`)
|
|
6322
6321
|
return L.startsWith(".") ? `${L}/${Ai}` : L;
|
|
6323
6322
|
}
|
|
@@ -6340,12 +6339,12 @@ ${P}
|
|
|
6340
6339
|
deferredLoaders${w.join("")};` : P;
|
|
6341
6340
|
return [
|
|
6342
6341
|
N(m.join(e.dir.dist, p, Ai), C),
|
|
6343
|
-
N(m.join(e.dir.dist, p,
|
|
6342
|
+
N(m.join(e.dir.dist, p, vl), A)
|
|
6344
6343
|
];
|
|
6345
6344
|
});
|
|
6346
6345
|
await Promise.all(s);
|
|
6347
6346
|
}
|
|
6348
|
-
}), Ai = "index.js",
|
|
6347
|
+
}), Ai = "index.js", vl = "index.d.ts", rs = (e, t, i, n = /* @__PURE__ */ new Set()) => t.flatMap((s) => i.has(s) ? [s] : n.has(s) ? [] : (n.add(s), rs(e, e[s].referencedBy, i, n))), bl = (e) => ({
|
|
6349
6348
|
name: "@arcgis/lumina:handleDynamicAssets",
|
|
6350
6349
|
configureServer(t) {
|
|
6351
6350
|
e.server = t, !e.isInPuppeteerTestBackEnd && Li(e).forEach(({ assets: i, transformers: n }) => he(e, i, n));
|
|
@@ -6364,20 +6363,20 @@ function Li(e) {
|
|
|
6364
6363
|
"type" in n ? t.push(n) : "assets" in n && t.push(...n.assets);
|
|
6365
6364
|
}), t.length > 0 && i.push({ assets: t }), e.assetsToProvide = void 0, i;
|
|
6366
6365
|
}
|
|
6367
|
-
const wt = "@arcgis/lumina:updatePackageJson",
|
|
6366
|
+
const wt = "@arcgis/lumina:updatePackageJson", Sl = (e) => ({
|
|
6368
6367
|
name: wt,
|
|
6369
6368
|
apply: () => e.viteCommand === "serve" && e.environment === "development" && !e.isInTest && !e.isInCi,
|
|
6370
6369
|
configResolved() {
|
|
6371
|
-
|
|
6370
|
+
wl(e).catch(
|
|
6372
6371
|
(t) => T.error(wt, `Failed to update package's package.json:${String(t)}`)
|
|
6373
6372
|
);
|
|
6374
6373
|
}
|
|
6375
6374
|
});
|
|
6376
|
-
async function
|
|
6377
|
-
const t = m.join(e.dir.root, "package.json"), i = JSON.parse(await
|
|
6375
|
+
async function wl(e) {
|
|
6376
|
+
const t = m.join(e.dir.root, "package.json"), i = JSON.parse(await B(t, "utf-8")), n = Tl(i, e);
|
|
6378
6377
|
n && Ki(t, JSON.stringify(n, null, 2));
|
|
6379
6378
|
}
|
|
6380
|
-
function
|
|
6379
|
+
function Tl(e, t) {
|
|
6381
6380
|
const i = e?.devDependencies ?? {};
|
|
6382
6381
|
Object.keys(e?.peerDependencies ?? {}).forEach((l) => {
|
|
6383
6382
|
l in i || T.warn(
|
|
@@ -6416,20 +6415,20 @@ function wl(e, t) {
|
|
|
6416
6415
|
if (n)
|
|
6417
6416
|
return e;
|
|
6418
6417
|
}
|
|
6419
|
-
const
|
|
6418
|
+
const El = (e) => ({
|
|
6420
6419
|
timestamp: e.apiJson.timestamp,
|
|
6421
6420
|
compiler: e.apiJson.compiler,
|
|
6422
|
-
components:
|
|
6421
|
+
components: Cl(e),
|
|
6423
6422
|
typeLibrary: {}
|
|
6424
6423
|
});
|
|
6425
|
-
function
|
|
6424
|
+
function Cl(e) {
|
|
6426
6425
|
const t = [];
|
|
6427
6426
|
for (const i of e.apiJson.modules)
|
|
6428
6427
|
for (const n of i.declarations)
|
|
6429
|
-
"customElement" in n && t.push(
|
|
6428
|
+
"customElement" in n && t.push($l(n, i.path));
|
|
6430
6429
|
return t;
|
|
6431
6430
|
}
|
|
6432
|
-
function
|
|
6431
|
+
function $l(e, t) {
|
|
6433
6432
|
const i = e.superclass ? [{ name: "superclass", text: JSON.stringify(e.superclass) }] : [];
|
|
6434
6433
|
return {
|
|
6435
6434
|
filePath: t,
|
|
@@ -6444,9 +6443,9 @@ function Cl(e, t) {
|
|
|
6444
6443
|
dependencies: [],
|
|
6445
6444
|
dependencyGraph: {},
|
|
6446
6445
|
deprecation: typeof e.deprecated == "boolean" ? e.deprecated ? "" : void 0 : e.deprecated,
|
|
6447
|
-
props: e.members.map(
|
|
6448
|
-
methods: e.members.map(
|
|
6449
|
-
events: e.events?.map(
|
|
6446
|
+
props: e.members.map(Pl).filter(D),
|
|
6447
|
+
methods: e.members.map(xl).filter(D),
|
|
6448
|
+
events: e.events?.map(kl) ?? [],
|
|
6450
6449
|
styles: e.cssProperties?.map((n) => ({
|
|
6451
6450
|
name: n.name,
|
|
6452
6451
|
annotation: "prop",
|
|
@@ -6458,7 +6457,7 @@ function Cl(e, t) {
|
|
|
6458
6457
|
listeners: []
|
|
6459
6458
|
};
|
|
6460
6459
|
}
|
|
6461
|
-
function
|
|
6460
|
+
function Pl(e) {
|
|
6462
6461
|
if (e.kind !== "field")
|
|
6463
6462
|
return;
|
|
6464
6463
|
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;
|
|
@@ -6499,7 +6498,7 @@ const Mt = (e) => Object.fromEntries(
|
|
|
6499
6498
|
]
|
|
6500
6499
|
) ?? []
|
|
6501
6500
|
);
|
|
6502
|
-
function
|
|
6501
|
+
function xl(e) {
|
|
6503
6502
|
if (e.kind !== "method")
|
|
6504
6503
|
return;
|
|
6505
6504
|
const t = e, i = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [], n = t.parameters?.map(({ name: s, type: r, description: a }) => ({
|
|
@@ -6530,7 +6529,7 @@ function Pl(e) {
|
|
|
6530
6529
|
deprecation: typeof t.deprecated == "boolean" ? t.deprecated ? "" : void 0 : t.deprecated
|
|
6531
6530
|
};
|
|
6532
6531
|
}
|
|
6533
|
-
function
|
|
6532
|
+
function kl(e) {
|
|
6534
6533
|
const t = e.inheritedFrom ? [{ name: "inheritedFrom", text: JSON.stringify(e.inheritedFrom) }] : [];
|
|
6535
6534
|
return {
|
|
6536
6535
|
event: e.name,
|
|
@@ -6558,14 +6557,14 @@ const os = (e) => e.flatMap(
|
|
|
6558
6557
|
name: `::part(${i.name})`,
|
|
6559
6558
|
description: i.description || void 0
|
|
6560
6559
|
})) ?? []
|
|
6561
|
-
),
|
|
6560
|
+
), Il = (e) => e.attributes?.map((t) => ({
|
|
6562
6561
|
name: t.name ?? "",
|
|
6563
6562
|
description: Ze(t.description, t.deprecated) || void 0,
|
|
6564
6563
|
default: t.default,
|
|
6565
6564
|
value: {
|
|
6566
|
-
type:
|
|
6565
|
+
type: Al(t.type.values?.map(fn))
|
|
6567
6566
|
}
|
|
6568
|
-
})) ?? [],
|
|
6567
|
+
})) ?? [], Al = (e) => e?.length === 1 ? e[0] : e, Ze = (e = "", t = !1) => t === !1 ? e : `**Deprecated**${typeof t == "string" ? `: ${t}` : ""}. ${e}`, ke = {
|
|
6569
6568
|
slots: "Slots",
|
|
6570
6569
|
events: "Events",
|
|
6571
6570
|
cssProperties: "CSS Properties",
|
|
@@ -6573,7 +6572,7 @@ const os = (e) => e.flatMap(
|
|
|
6573
6572
|
methods: "Methods"
|
|
6574
6573
|
};
|
|
6575
6574
|
function cs(e) {
|
|
6576
|
-
const t =
|
|
6575
|
+
const t = Ll(e.slots), i = Fl(e.events), n = Nl(e.cssProperties), s = Dl(e.cssParts), r = jl(e.members), a = Ze(e.description, e.deprecated).trim();
|
|
6577
6576
|
return [...a ? [`${a}
|
|
6578
6577
|
--`] : [], i, r, t, n, s].filter(Boolean).join(`
|
|
6579
6578
|
|
|
@@ -6581,28 +6580,28 @@ function cs(e) {
|
|
|
6581
6580
|
}
|
|
6582
6581
|
const Ie = (e, t) => t === void 0 || t.length === 0 ? "" : `### ${e}
|
|
6583
6582
|
${t.join(`
|
|
6584
|
-
`)}`,
|
|
6583
|
+
`)}`, Ll = (e) => Ie(
|
|
6585
6584
|
ke.slots,
|
|
6586
6585
|
e?.map((t) => `- ${t.name ? `**${t.name}**` : "_default_"} - ${t.description}`)
|
|
6587
|
-
),
|
|
6586
|
+
), Fl = (e) => Ie(
|
|
6588
6587
|
ke.events,
|
|
6589
6588
|
e?.filter((t) => t.name !== null && t.name !== void 0).map((t) => `- **${t.name}**${t.description ? ` - ${t.description}` : ""}`)
|
|
6590
|
-
),
|
|
6589
|
+
), Nl = (e = []) => Ie(
|
|
6591
6590
|
ke.cssProperties,
|
|
6592
6591
|
e?.map(
|
|
6593
6592
|
(t) => `- **${t.name}** - ${t.description} ${t.default ? `_(default: ${t.default})_}` : ""}`
|
|
6594
6593
|
)
|
|
6595
|
-
),
|
|
6594
|
+
), Dl = (e) => Ie(
|
|
6596
6595
|
ke.cssParts,
|
|
6597
6596
|
e?.map((t) => `- **${t.name}** - ${t.description}`)
|
|
6598
|
-
),
|
|
6597
|
+
), jl = (e) => Ie(
|
|
6599
6598
|
ke.methods,
|
|
6600
6599
|
e.filter(gs).map(
|
|
6601
6600
|
(t) => [`- \`${t.name}${t.signature}\``, Ze(t.description, t.deprecated)].filter(Boolean).join(" - ")
|
|
6602
6601
|
)
|
|
6603
6602
|
);
|
|
6604
|
-
function
|
|
6605
|
-
const i =
|
|
6603
|
+
function Rl(e, t) {
|
|
6604
|
+
const i = Ml(e), n = os(e), s = as(e), r = j();
|
|
6606
6605
|
return {
|
|
6607
6606
|
$schema: "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
6608
6607
|
name: r.name,
|
|
@@ -6620,21 +6619,21 @@ function jl(e, t) {
|
|
|
6620
6619
|
}
|
|
6621
6620
|
};
|
|
6622
6621
|
}
|
|
6623
|
-
const
|
|
6622
|
+
const Ml = (e) => e.map((t) => ({
|
|
6624
6623
|
name: t.tagName,
|
|
6625
6624
|
description: cs(t),
|
|
6626
6625
|
"doc-url": t.demos?.[0]?.url,
|
|
6627
|
-
attributes:
|
|
6626
|
+
attributes: Il(t),
|
|
6628
6627
|
slots: t.slots?.map((i) => ({
|
|
6629
6628
|
name: i.name,
|
|
6630
6629
|
description: i.description
|
|
6631
6630
|
})),
|
|
6632
6631
|
events: Fi(t),
|
|
6633
6632
|
js: {
|
|
6634
|
-
properties:
|
|
6633
|
+
properties: Ol(t),
|
|
6635
6634
|
events: Fi(t)
|
|
6636
6635
|
}
|
|
6637
|
-
})),
|
|
6636
|
+
})), Ol = (e) => e.members.filter(ys).map((t) => ({
|
|
6638
6637
|
name: t.name,
|
|
6639
6638
|
description: t.description,
|
|
6640
6639
|
type: t.type?.text
|
|
@@ -6642,30 +6641,30 @@ const Rl = (e) => e.map((t) => ({
|
|
|
6642
6641
|
name: t.name,
|
|
6643
6642
|
type: t.type?.text,
|
|
6644
6643
|
description: t.description
|
|
6645
|
-
})) ?? [],
|
|
6644
|
+
})) ?? [], Jl = (e) => e.map((t) => ({
|
|
6646
6645
|
name: t.tagName,
|
|
6647
6646
|
description: cs(t),
|
|
6648
|
-
attributes:
|
|
6647
|
+
attributes: Kl(t),
|
|
6649
6648
|
references: t.demos?.map((i) => ({ name: i.description, url: i.url })) ?? []
|
|
6650
|
-
})),
|
|
6649
|
+
})), Kl = (e) => e.attributes?.map((t) => ({
|
|
6651
6650
|
name: t.name,
|
|
6652
6651
|
description: Ze(t.description, t.deprecated) || void 0,
|
|
6653
|
-
values:
|
|
6654
|
-
})) ?? [],
|
|
6652
|
+
values: Bl(t)
|
|
6653
|
+
})) ?? [], Bl = (e) => e.type.values?.map((t) => t.value ?? "").filter(Boolean).map((t) => ({ name: t })) ?? [], Wl = (e) => ({
|
|
6655
6654
|
$schema: "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
|
|
6656
6655
|
version: 1.1,
|
|
6657
|
-
tags:
|
|
6658
|
-
}),
|
|
6656
|
+
tags: Jl(e)
|
|
6657
|
+
}), _l = (e) => ({
|
|
6659
6658
|
$schema: "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
|
|
6660
6659
|
version: 1.1,
|
|
6661
6660
|
properties: os(e),
|
|
6662
6661
|
pseudoElements: as(e)
|
|
6663
|
-
}),
|
|
6664
|
-
function
|
|
6662
|
+
}), Ul = "@arcgis/lumina:generateDocs";
|
|
6663
|
+
function Hl(e) {
|
|
6665
6664
|
return e._documentationFileNames.stencilLikeDocsJson !== void 0 && e.provideAssets([
|
|
6666
6665
|
{
|
|
6667
6666
|
type: "dynamic",
|
|
6668
|
-
source: () => JSON.stringify(
|
|
6667
|
+
source: () => JSON.stringify(El(e), null, 2),
|
|
6669
6668
|
destination: m.join("../..", e._documentationFileNames.stencilLikeDocsJson)
|
|
6670
6669
|
}
|
|
6671
6670
|
]), e._documentationFileNames.apiJson !== void 0 && e.provideAssets([
|
|
@@ -6675,7 +6674,7 @@ function Ul(e) {
|
|
|
6675
6674
|
destination: m.join("../..", e._documentationFileNames.apiJson)
|
|
6676
6675
|
}
|
|
6677
6676
|
]), {
|
|
6678
|
-
name:
|
|
6677
|
+
name: Ul,
|
|
6679
6678
|
async writeBundle() {
|
|
6680
6679
|
if (e.isInStorybook)
|
|
6681
6680
|
return;
|
|
@@ -6685,24 +6684,24 @@ function Ul(e) {
|
|
|
6685
6684
|
await es(a);
|
|
6686
6685
|
const c = [];
|
|
6687
6686
|
if (n !== void 0) {
|
|
6688
|
-
const d = JSON.stringify(
|
|
6687
|
+
const d = JSON.stringify(Wl(e.apiJsonComponents), null, 2);
|
|
6689
6688
|
c.push(N(n, d));
|
|
6690
6689
|
}
|
|
6691
6690
|
if (s !== void 0) {
|
|
6692
|
-
const d = JSON.stringify(
|
|
6691
|
+
const d = JSON.stringify(_l(e.apiJsonComponents), null, 2);
|
|
6693
6692
|
c.push(N(s, d));
|
|
6694
6693
|
}
|
|
6695
6694
|
if (r !== void 0) {
|
|
6696
|
-
const d =
|
|
6695
|
+
const d = Rl(e.apiJsonComponents, typeof t == "object" ? t : {});
|
|
6697
6696
|
c.push(N(r, JSON.stringify(d, null, 2)));
|
|
6698
6697
|
}
|
|
6699
6698
|
await Promise.all(c);
|
|
6700
6699
|
}
|
|
6701
6700
|
};
|
|
6702
6701
|
}
|
|
6703
|
-
const
|
|
6702
|
+
const zl = (e) => `import type { h, EventHandler } from "@arcgis/lumina";
|
|
6704
6703
|
|
|
6705
|
-
${e.map(
|
|
6704
|
+
${e.map(ql).join(`
|
|
6706
6705
|
|
|
6707
6706
|
`)}
|
|
6708
6707
|
|
|
@@ -6714,7 +6713,7 @@ ${e.map(({ tagName: t, pascalCaseName: i }) => ` "${t}": Lumina${i};`).join
|
|
|
6714
6713
|
}
|
|
6715
6714
|
}
|
|
6716
6715
|
}`;
|
|
6717
|
-
function
|
|
6716
|
+
function ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
6718
6717
|
const [s, r] = Qe(e, i);
|
|
6719
6718
|
return [
|
|
6720
6719
|
`interface Lumina${t} extends ${s}h.JSX.HTMLAttributes<HTML${t}Element> {
|
|
@@ -6727,7 +6726,7 @@ function zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
|
6727
6726
|
r
|
|
6728
6727
|
].join("");
|
|
6729
6728
|
}
|
|
6730
|
-
function
|
|
6729
|
+
function Gl(e) {
|
|
6731
6730
|
const t = ` interface IntrinsicElements extends PreactJsx.IntrinsicElements {
|
|
6732
6731
|
${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join(`
|
|
6733
6732
|
`)}
|
|
@@ -6735,7 +6734,7 @@ ${e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": Preact${i};`).join
|
|
|
6735
6734
|
return `import { JSX as PreactJsx } from "preact";
|
|
6736
6735
|
import type { EventHandler } from "@arcgis/lumina";
|
|
6737
6736
|
|
|
6738
|
-
${e.map(
|
|
6737
|
+
${e.map(Vl).join(`
|
|
6739
6738
|
|
|
6740
6739
|
`)}
|
|
6741
6740
|
|
|
@@ -6748,7 +6747,7 @@ ${t}
|
|
|
6748
6747
|
}
|
|
6749
6748
|
}`;
|
|
6750
6749
|
}
|
|
6751
|
-
function
|
|
6750
|
+
function Vl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
6752
6751
|
const [s, r] = Qe(e, i);
|
|
6753
6752
|
return [
|
|
6754
6753
|
`interface Preact${t} extends ${s}PreactJsx.HTMLAttributes<HTML${t}Element> {
|
|
@@ -6761,13 +6760,13 @@ function Gl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
|
6761
6760
|
r
|
|
6762
6761
|
].join("");
|
|
6763
6762
|
}
|
|
6764
|
-
function
|
|
6763
|
+
function Xl(e) {
|
|
6765
6764
|
const t = e.map(({ pascalCaseName: i, tagName: n }) => ` "${n}": React${i};`).join(`
|
|
6766
6765
|
`);
|
|
6767
6766
|
return `import type { HTMLProps } from 'react';
|
|
6768
6767
|
import type { EventHandler } from "@arcgis/lumina";
|
|
6769
6768
|
|
|
6770
|
-
${e.map(
|
|
6769
|
+
${e.map(Ql).join(`
|
|
6771
6770
|
|
|
6772
6771
|
`)}
|
|
6773
6772
|
|
|
@@ -6793,7 +6792,7 @@ ${t}
|
|
|
6793
6792
|
}
|
|
6794
6793
|
}`;
|
|
6795
6794
|
}
|
|
6796
|
-
function
|
|
6795
|
+
function Ql({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
6797
6796
|
const [s, r] = Qe(e, i);
|
|
6798
6797
|
return [
|
|
6799
6798
|
`interface React${t} extends ${s}HTMLProps<HTML${t}Element> {
|
|
@@ -6806,10 +6805,10 @@ function Xl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
|
6806
6805
|
r
|
|
6807
6806
|
].join("");
|
|
6808
6807
|
}
|
|
6809
|
-
const
|
|
6808
|
+
const Zl = (e) => `import { JSXBase as StencilJsx } from "@stencil/core/internal";
|
|
6810
6809
|
import type { EventHandler } from "@arcgis/lumina";
|
|
6811
6810
|
|
|
6812
|
-
${e.map(
|
|
6811
|
+
${e.map(Yl).join(`
|
|
6813
6812
|
|
|
6814
6813
|
`)}
|
|
6815
6814
|
|
|
@@ -6827,7 +6826,7 @@ declare module "@stencil/core/internal/stencil-public-runtime" {
|
|
|
6827
6826
|
interface IntrinsicElements extends ExposedElements {}
|
|
6828
6827
|
}
|
|
6829
6828
|
}`;
|
|
6830
|
-
function
|
|
6829
|
+
function Yl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
6831
6830
|
const [s, r] = Qe(e, i);
|
|
6832
6831
|
return [
|
|
6833
6832
|
`interface Stencil${t} extends ${s}StencilJsx.HTMLAttributes<HTML${t}Element> {
|
|
@@ -6840,16 +6839,16 @@ function Zl({ name: e, pascalCaseName: t, members: i, events: n = [] }) {
|
|
|
6840
6839
|
r
|
|
6841
6840
|
].join("");
|
|
6842
6841
|
}
|
|
6843
|
-
const
|
|
6842
|
+
const ed = (e, t, i) => [i, t, td(e), id(e)].join(`
|
|
6844
6843
|
|
|
6845
|
-
`),
|
|
6844
|
+
`), td = (e) => e.filter((t) => (t.events?.length ?? 0) > 0).map(
|
|
6846
6845
|
({ pascalCaseName: t }) => `export interface ${t}CustomEvent<T> extends CustomEvent<T> {
|
|
6847
6846
|
detail: T;
|
|
6848
6847
|
target: HTML${t}Element;
|
|
6849
6848
|
currentTarget: HTML${t}Element;
|
|
6850
6849
|
}`
|
|
6851
6850
|
).join(`
|
|
6852
|
-
`),
|
|
6851
|
+
`), id = (e) => `export { ToEvents, TargetedEvent } from "@arcgis/lumina";
|
|
6853
6852
|
|
|
6854
6853
|
declare global {
|
|
6855
6854
|
interface HTMLElementTagNameMap {
|
|
@@ -6857,12 +6856,12 @@ ${e.map(({ pascalCaseName: t, tagName: i }) => ` "${i}": HTML${t}Element;`).j
|
|
|
6857
6856
|
`)}
|
|
6858
6857
|
}
|
|
6859
6858
|
|
|
6860
|
-
${e.map(
|
|
6859
|
+
${e.map(nd).join(`
|
|
6861
6860
|
`).split(`
|
|
6862
6861
|
`).map((t) => t.length > 0 ? ` ${t}` : t).join(`
|
|
6863
6862
|
`)}
|
|
6864
6863
|
}`;
|
|
6865
|
-
function
|
|
6864
|
+
function nd({ name: e, pascalCaseName: t, events: i = [] }) {
|
|
6866
6865
|
const n = i.length > 0, s = `${t}CustomEvent`, r = `HTML${t}Element`;
|
|
6867
6866
|
return [
|
|
6868
6867
|
n ? `interface ${r}EventMap {
|
|
@@ -6881,7 +6880,7 @@ ${n ? ` addEventListener<K extends keyof ${r}EventMap>(type: K, listener: (this
|
|
|
6881
6880
|
}`
|
|
6882
6881
|
].join("");
|
|
6883
6882
|
}
|
|
6884
|
-
function
|
|
6883
|
+
function sd(e) {
|
|
6885
6884
|
let t;
|
|
6886
6885
|
return {
|
|
6887
6886
|
name: "@arcgis/lumina:generateFrameworkTypes",
|
|
@@ -6889,11 +6888,11 @@ function nd(e) {
|
|
|
6889
6888
|
generateBundle() {
|
|
6890
6889
|
if (e.isInStorybook)
|
|
6891
6890
|
return;
|
|
6892
|
-
t =
|
|
6891
|
+
t = ja(e);
|
|
6893
6892
|
const i = m.join(e.dir.dist, "index.d.ts");
|
|
6894
6893
|
e._declarationTextTransformers.push((n) => {
|
|
6895
6894
|
const { filePath: s, content: r } = n;
|
|
6896
|
-
return s === i ? { filePath: s, content:
|
|
6895
|
+
return s === i ? { filePath: s, content: ed(e.apiJsonComponents, r, t) } : n;
|
|
6897
6896
|
});
|
|
6898
6897
|
},
|
|
6899
6898
|
async writeBundle() {
|
|
@@ -6903,10 +6902,10 @@ function nd(e) {
|
|
|
6903
6902
|
await Q(i);
|
|
6904
6903
|
const n = `/// <reference types="../index.d.ts" />
|
|
6905
6904
|
${t.replaceAll("./", "../")}`, s = Object.entries({
|
|
6906
|
-
react:
|
|
6907
|
-
preact:
|
|
6908
|
-
stencil:
|
|
6909
|
-
lumina:
|
|
6905
|
+
react: Xl(e.apiJsonComponents),
|
|
6906
|
+
preact: Gl(e.apiJsonComponents),
|
|
6907
|
+
stencil: Zl(e.apiJsonComponents),
|
|
6908
|
+
lumina: zl(e.apiJsonComponents)
|
|
6910
6909
|
}).map(
|
|
6911
6910
|
async ([r, a]) => await N(m.join(i, `${r}.d.ts`), `${n}
|
|
6912
6911
|
${a}`)
|
|
@@ -6915,36 +6914,36 @@ ${a}`)
|
|
|
6915
6914
|
}
|
|
6916
6915
|
};
|
|
6917
6916
|
}
|
|
6918
|
-
function
|
|
6917
|
+
function rd(e) {
|
|
6919
6918
|
return {
|
|
6920
6919
|
name: "@arcgis/lumina:buildWrappers",
|
|
6921
6920
|
apply: () => e.viteCommand === "build" && !!e.options.build?.wrappers?.length,
|
|
6922
6921
|
async writeBundle() {
|
|
6923
6922
|
e.isInStorybook || await Promise.all(
|
|
6924
6923
|
e.options.build?.wrappers?.map(async (t) => {
|
|
6925
|
-
t.type === "react18" && await
|
|
6924
|
+
t.type === "react18" && await cd(e, t);
|
|
6926
6925
|
}) ?? []
|
|
6927
6926
|
);
|
|
6928
6927
|
}
|
|
6929
6928
|
};
|
|
6930
6929
|
}
|
|
6931
|
-
const
|
|
6932
|
-
import React from "${
|
|
6930
|
+
const od = "react", Ni = "@lit/react", ad = `
|
|
6931
|
+
import React from "${od}";
|
|
6933
6932
|
import { createComponent } from "${Ni}";
|
|
6934
6933
|
import type { EventName } from "${Ni}";
|
|
6935
6934
|
import { makeReactWrapperFactory, getReactWrapperOptions } from "@arcgis/lumina";
|
|
6936
6935
|
|
|
6937
6936
|
const createWrapper = /*@__PURE__*/ makeReactWrapperFactory(React, createComponent) as typeof createComponent;
|
|
6938
6937
|
`;
|
|
6939
|
-
async function
|
|
6938
|
+
async function cd(e, t) {
|
|
6940
6939
|
const { name: i } = j(), n = [];
|
|
6941
6940
|
for (const a of e.apiJson.modules)
|
|
6942
6941
|
for (const c of a.declarations)
|
|
6943
|
-
"customElement" in c && n.push(
|
|
6944
|
-
const s = [`/// <reference types="${i}" preserve="true" />`,
|
|
6942
|
+
"customElement" in c && n.push(ld(c));
|
|
6943
|
+
const s = [`/// <reference types="${i}" preserve="true" />`, ad, ...n].join(""), r = m.resolve(t.proxiesFile);
|
|
6945
6944
|
await Q(m.dirname(r), { recursive: !0 }), await N(r, s);
|
|
6946
6945
|
}
|
|
6947
|
-
function
|
|
6946
|
+
function ld(e) {
|
|
6948
6947
|
const t = e.events?.map(
|
|
6949
6948
|
(i) => ` ${$e(`on${bs(i.name)}`)}: "${i.name}" as EventName<HTML${e.pascalCaseName}Element["${i.name}"]>,`
|
|
6950
6949
|
).join(`
|
|
@@ -6960,30 +6959,30 @@ ${t}
|
|
|
6960
6959
|
);
|
|
6961
6960
|
`;
|
|
6962
6961
|
}
|
|
6963
|
-
function
|
|
6962
|
+
function kd(e = {}) {
|
|
6964
6963
|
const t = new x(e), n = [
|
|
6965
6964
|
t._plugin,
|
|
6966
|
-
Zc(t),
|
|
6967
6965
|
Yc(t),
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
Ul(t),
|
|
6973
|
-
gc(t),
|
|
6974
|
-
qr(t),
|
|
6975
|
-
Hc(t),
|
|
6976
|
-
vl(t),
|
|
6977
|
-
yl(t),
|
|
6978
|
-
rl(t),
|
|
6979
|
-
Rs(t),
|
|
6980
|
-
Sc(t),
|
|
6966
|
+
el(t),
|
|
6967
|
+
Sl(t),
|
|
6968
|
+
xr(t),
|
|
6969
|
+
Bc(t),
|
|
6981
6970
|
sd(t),
|
|
6982
|
-
|
|
6971
|
+
Hl(t),
|
|
6972
|
+
yc(t),
|
|
6973
|
+
Gr(t),
|
|
6974
|
+
zc(t),
|
|
6975
|
+
bl(t),
|
|
6976
|
+
hl(t),
|
|
6977
|
+
ol(t),
|
|
6978
|
+
Ms(t),
|
|
6979
|
+
wc(t),
|
|
6980
|
+
rd(t),
|
|
6981
|
+
Gc(t)
|
|
6983
6982
|
].filter(D);
|
|
6984
6983
|
return n.context = t, n;
|
|
6985
6984
|
}
|
|
6986
|
-
const
|
|
6985
|
+
const Id = {
|
|
6987
6986
|
initializeComponentDependencies: bn,
|
|
6988
6987
|
updateLuminaTs: ns,
|
|
6989
6988
|
propertyToAttributeMappings: U,
|
|
@@ -6998,7 +6997,7 @@ const xd = {
|
|
|
6998
6997
|
};
|
|
6999
6998
|
export {
|
|
7000
6999
|
We as LuminaApiExtractor,
|
|
7001
|
-
|
|
7000
|
+
Id as exportsForCodemod,
|
|
7002
7001
|
Ge as inferCdnUrl,
|
|
7003
|
-
|
|
7002
|
+
kd as useLumina
|
|
7004
7003
|
};
|