@fluixi/template-parser 1.0.0-alpha.107 → 1.0.0-alpha.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a11y.mjs +3 -76
- package/dist/ast.d.cts +2 -0
- package/dist/ast.d.ts +2 -0
- package/dist/ast.d.ts.map +1 -1
- package/dist/ast.mjs +4 -21
- package/dist/chunk-6YLLM7OB.mjs +104 -0
- package/dist/chunk-DK3MEEE6.mjs +80 -0
- package/dist/chunk-IP5F3OXX.mjs +192 -0
- package/dist/chunk-R4NGOY2K.mjs +26 -0
- package/dist/chunk-UGZDQT22.mjs +102 -0
- package/dist/chunk-XGQQ2LEG.mjs +415 -0
- package/dist/directives.cjs +12 -6
- package/dist/directives.d.ts.map +1 -1
- package/dist/directives.js +14 -6
- package/dist/directives.mjs +5 -180
- package/dist/index.cjs +66 -12
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.mjs +20 -808
- package/dist/parser.cjs +64 -11
- package/dist/parser.mjs +8 -806
- package/dist/reader.mjs +3 -98
- package/dist/tags.cjs +52 -5
- package/dist/tags.d.cts +5 -4
- package/dist/tags.d.ts +5 -4
- package/dist/tags.d.ts.map +1 -1
- package/dist/tags.js +15 -5
- package/dist/tags.mjs +7 -49
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/parser.cjs
CHANGED
|
@@ -236,12 +236,18 @@ var CORE_DIRECTIVES = [
|
|
|
236
236
|
{
|
|
237
237
|
id: "load",
|
|
238
238
|
match: (n) => n.startsWith("load:"),
|
|
239
|
-
build: (raw) =>
|
|
240
|
-
kind
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
239
|
+
build: (raw) => {
|
|
240
|
+
if (raw.value && raw.value.kind !== "static") {
|
|
241
|
+
raw.report("invalid-binding", `'${raw.name}' needs a literal value, not an expression: the strategy is compile-time.`);
|
|
242
|
+
}
|
|
243
|
+
return {
|
|
244
|
+
kind: "LoadDirective",
|
|
245
|
+
strategy: raw.name.slice("load:".length),
|
|
246
|
+
modifier: raw.value && raw.value.kind === "static" ? raw.value.value : null,
|
|
247
|
+
...raw.value && raw.value.kind !== "static" ? { dynamic: true } : {},
|
|
248
|
+
loc: raw.loc
|
|
249
|
+
};
|
|
250
|
+
}
|
|
245
251
|
},
|
|
246
252
|
// Custom directive: `use=${d}` or `use:tooltip[=${opts}]`.
|
|
247
253
|
{
|
|
@@ -329,17 +335,64 @@ function resolveAttribute(raw, directives = CORE_DIRECTIVES, ctx = { component:
|
|
|
329
335
|
// src/tags.ts
|
|
330
336
|
var SVG_TAGS = /* @__PURE__ */ new Set([
|
|
331
337
|
"svg",
|
|
338
|
+
"g",
|
|
339
|
+
"defs",
|
|
340
|
+
"symbol",
|
|
341
|
+
"use",
|
|
342
|
+
"switch",
|
|
343
|
+
"view",
|
|
344
|
+
"desc",
|
|
345
|
+
"metadata",
|
|
332
346
|
"path",
|
|
333
347
|
"circle",
|
|
334
|
-
"
|
|
348
|
+
"ellipse",
|
|
335
349
|
"line",
|
|
336
350
|
"polygon",
|
|
337
351
|
"polyline",
|
|
338
|
-
"
|
|
339
|
-
"
|
|
340
|
-
"
|
|
352
|
+
"rect",
|
|
353
|
+
"image",
|
|
354
|
+
"text",
|
|
355
|
+
"tspan",
|
|
356
|
+
"textPath",
|
|
357
|
+
"linearGradient",
|
|
358
|
+
"radialGradient",
|
|
359
|
+
"stop",
|
|
360
|
+
"pattern",
|
|
361
|
+
"mask",
|
|
341
362
|
"clipPath",
|
|
342
|
-
"
|
|
363
|
+
"marker",
|
|
364
|
+
"foreignObject",
|
|
365
|
+
"animate",
|
|
366
|
+
"animateMotion",
|
|
367
|
+
"animateTransform",
|
|
368
|
+
"mpath",
|
|
369
|
+
"set",
|
|
370
|
+
"filter",
|
|
371
|
+
"feBlend",
|
|
372
|
+
"feColorMatrix",
|
|
373
|
+
"feComponentTransfer",
|
|
374
|
+
"feComposite",
|
|
375
|
+
"feConvolveMatrix",
|
|
376
|
+
"feDiffuseLighting",
|
|
377
|
+
"feDisplacementMap",
|
|
378
|
+
"feDistantLight",
|
|
379
|
+
"feDropShadow",
|
|
380
|
+
"feFlood",
|
|
381
|
+
"feFuncA",
|
|
382
|
+
"feFuncB",
|
|
383
|
+
"feFuncG",
|
|
384
|
+
"feFuncR",
|
|
385
|
+
"feGaussianBlur",
|
|
386
|
+
"feImage",
|
|
387
|
+
"feMerge",
|
|
388
|
+
"feMergeNode",
|
|
389
|
+
"feMorphology",
|
|
390
|
+
"feOffset",
|
|
391
|
+
"fePointLight",
|
|
392
|
+
"feSpecularLighting",
|
|
393
|
+
"feSpotLight",
|
|
394
|
+
"feTile",
|
|
395
|
+
"feTurbulence"
|
|
343
396
|
]);
|
|
344
397
|
var RAW_TEXT_ELEMENTS = /* @__PURE__ */ new Set(["script", "style", "textarea", "title"]);
|
|
345
398
|
var VOID_ELEMENTS = /* @__PURE__ */ new Set([
|