@marko/runtime-tags 6.0.122 → 6.0.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/debug/html.js +2 -2
- package/dist/debug/html.mjs +2 -2
- package/dist/html/compat.d.ts +1 -1
- package/dist/html.js +2 -2
- package/dist/html.mjs +2 -2
- package/dist/translator/index.js +23 -20
- package/package.json +1 -1
package/dist/debug/html.js
CHANGED
|
@@ -3291,8 +3291,8 @@ var compat = {
|
|
|
3291
3291
|
};
|
|
3292
3292
|
},
|
|
3293
3293
|
patchDynamicTag,
|
|
3294
|
-
writeSetScopeForComponent(branchId, m5c) {
|
|
3295
|
-
writeScope(branchId, { m5c });
|
|
3294
|
+
writeSetScopeForComponent(branchId, m5c, m5i) {
|
|
3295
|
+
writeScope(branchId, { m5c, m5i });
|
|
3296
3296
|
_script(branchId, SET_SCOPE_REGISTER_ID);
|
|
3297
3297
|
},
|
|
3298
3298
|
toJSON(state) {
|
package/dist/debug/html.mjs
CHANGED
|
@@ -3198,8 +3198,8 @@ var compat = {
|
|
|
3198
3198
|
};
|
|
3199
3199
|
},
|
|
3200
3200
|
patchDynamicTag,
|
|
3201
|
-
writeSetScopeForComponent(branchId, m5c) {
|
|
3202
|
-
writeScope(branchId, { m5c });
|
|
3201
|
+
writeSetScopeForComponent(branchId, m5c, m5i) {
|
|
3202
|
+
writeScope(branchId, { m5c, m5i });
|
|
3203
3203
|
_script(branchId, SET_SCOPE_REGISTER_ID);
|
|
3204
3204
|
},
|
|
3205
3205
|
toJSON(state) {
|
package/dist/html/compat.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const compat: {
|
|
|
12
12
|
isTagsAPI(fn: any): boolean;
|
|
13
13
|
onFlush(fn: (chunk: Chunk) => void): void;
|
|
14
14
|
patchDynamicTag: (patch: (tag: unknown, scopeId: number, accessor: import("../common/types").Accessor) => unknown) => void;
|
|
15
|
-
writeSetScopeForComponent(branchId: number, m5c: string): void;
|
|
15
|
+
writeSetScopeForComponent(branchId: number, m5c: string, m5i: unknown): void;
|
|
16
16
|
toJSON(state: State): (this: WeakKey) => [registryId: string, scopeId: unknown] | undefined;
|
|
17
17
|
flushScript($global: any): string;
|
|
18
18
|
render(renderer: ServerRenderer, willRerender: boolean, classAPIOut: any, component: any, input: any, completeChunks: Chunk[]): void;
|
package/dist/html.js
CHANGED
|
@@ -2076,8 +2076,8 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
|
|
|
2076
2076
|
};
|
|
2077
2077
|
},
|
|
2078
2078
|
patchDynamicTag,
|
|
2079
|
-
writeSetScopeForComponent(branchId, m5c) {
|
|
2080
|
-
writeScope(branchId, { m5c }), _script(branchId, SET_SCOPE_REGISTER_ID);
|
|
2079
|
+
writeSetScopeForComponent(branchId, m5c, m5i) {
|
|
2080
|
+
writeScope(branchId, { m5c, m5i }), _script(branchId, SET_SCOPE_REGISTER_ID);
|
|
2081
2081
|
},
|
|
2082
2082
|
toJSON(state) {
|
|
2083
2083
|
return function() {
|
package/dist/html.mjs
CHANGED
|
@@ -1986,8 +1986,8 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
|
|
|
1986
1986
|
};
|
|
1987
1987
|
},
|
|
1988
1988
|
patchDynamicTag,
|
|
1989
|
-
writeSetScopeForComponent(branchId, m5c) {
|
|
1990
|
-
writeScope(branchId, { m5c }), _script(branchId, SET_SCOPE_REGISTER_ID);
|
|
1989
|
+
writeSetScopeForComponent(branchId, m5c, m5i) {
|
|
1990
|
+
writeScope(branchId, { m5c, m5i }), _script(branchId, SET_SCOPE_REGISTER_ID);
|
|
1991
1991
|
},
|
|
1992
1992
|
toJSON(state) {
|
|
1993
1993
|
return function() {
|
package/dist/translator/index.js
CHANGED
|
@@ -2339,11 +2339,12 @@ var entry_builder_default = {
|
|
|
2339
2339
|
imports: [],
|
|
2340
2340
|
init: false
|
|
2341
2341
|
};
|
|
2342
|
+
const programExtra = file.path.node.extra;
|
|
2342
2343
|
const { analyzedTags } = file.metadata.marko;
|
|
2343
2344
|
state.imports.push(
|
|
2344
2345
|
(0, import_babel_utils12.resolveRelativePath)(entryFile, file.opts.filename)
|
|
2345
2346
|
);
|
|
2346
|
-
if (
|
|
2347
|
+
if (programExtra.isInteractive || programExtra.needsCompat) {
|
|
2347
2348
|
state.init = true;
|
|
2348
2349
|
}
|
|
2349
2350
|
for (const tag of analyzedTags || []) {
|
|
@@ -12485,25 +12486,6 @@ function scanTag(state, tag) {
|
|
|
12485
12486
|
tag.get("var")
|
|
12486
12487
|
);
|
|
12487
12488
|
}
|
|
12488
|
-
for (const attr of tag.get("attributes")) {
|
|
12489
|
-
if (attr.isMarkoAttribute()) {
|
|
12490
|
-
if (attr.node.arguments?.length) {
|
|
12491
|
-
addFeature(
|
|
12492
|
-
state,
|
|
12493
|
-
"class" /* Class */,
|
|
12494
|
-
"Attribute arguments",
|
|
12495
|
-
attr.get("arguments")[0]
|
|
12496
|
-
);
|
|
12497
|
-
break;
|
|
12498
|
-
} else if (attr.node.modifier) {
|
|
12499
|
-
addFeature(state, "class" /* Class */, "Attribute modifier", attr);
|
|
12500
|
-
break;
|
|
12501
|
-
} else if (attr.node.bound) {
|
|
12502
|
-
addFeature(state, "tags" /* Tags */, "Bound attribute", attr);
|
|
12503
|
-
break;
|
|
12504
|
-
}
|
|
12505
|
-
}
|
|
12506
|
-
}
|
|
12507
12489
|
const tagDef = (0, import_babel_utils52.getTagDef)(tag);
|
|
12508
12490
|
if (tagDef) {
|
|
12509
12491
|
if (tagDef.name === "style") {
|
|
@@ -12519,6 +12501,27 @@ function scanTag(state, tag) {
|
|
|
12519
12501
|
}
|
|
12520
12502
|
}
|
|
12521
12503
|
}
|
|
12504
|
+
if (!tagDef?.parseOptions?.rawOpenTag) {
|
|
12505
|
+
for (const attr of tag.get("attributes")) {
|
|
12506
|
+
if (attr.isMarkoAttribute()) {
|
|
12507
|
+
if (attr.node.arguments?.length) {
|
|
12508
|
+
addFeature(
|
|
12509
|
+
state,
|
|
12510
|
+
"class" /* Class */,
|
|
12511
|
+
"Attribute arguments",
|
|
12512
|
+
attr.get("arguments")[0]
|
|
12513
|
+
);
|
|
12514
|
+
break;
|
|
12515
|
+
} else if (attr.node.modifier) {
|
|
12516
|
+
addFeature(state, "class" /* Class */, "Attribute modifier", attr);
|
|
12517
|
+
break;
|
|
12518
|
+
} else if (attr.node.bound) {
|
|
12519
|
+
addFeature(state, "tags" /* Tags */, "Bound attribute", attr);
|
|
12520
|
+
break;
|
|
12521
|
+
}
|
|
12522
|
+
}
|
|
12523
|
+
}
|
|
12524
|
+
}
|
|
12522
12525
|
scanBody(state, tag.get("body").get("body"));
|
|
12523
12526
|
scanBody(state, tag.get("attributeTags"));
|
|
12524
12527
|
}
|