@fluixi/template-parser 1.0.0-alpha.108 → 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 +13 -7
- package/dist/index.mjs +19 -855
- package/dist/parser.cjs +12 -6
- package/dist/parser.mjs +8 -853
- package/dist/reader.mjs +3 -98
- package/dist/tags.mjs +7 -96
- 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
|
{
|