marko 6.0.130 → 6.0.131
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 +1 -1
- package/dist/debug/html.mjs +1 -1
- package/dist/html.js +1 -1
- package/dist/html.mjs +1 -1
- package/dist/translator/index.js +8 -1
- package/package.json +1 -1
package/dist/debug/html.js
CHANGED
|
@@ -3320,7 +3320,7 @@ var compat = {
|
|
|
3320
3320
|
if (!compatRegistered) {
|
|
3321
3321
|
const registered = getRegistered(this);
|
|
3322
3322
|
if (registered) {
|
|
3323
|
-
const scopeId = getScopeId(registered.scope);
|
|
3323
|
+
const scopeId = registered.scope ? getScopeId(registered.scope) : void 0;
|
|
3324
3324
|
if (scopeId !== void 0) {
|
|
3325
3325
|
writeScopeToState(state, scopeId, {});
|
|
3326
3326
|
}
|
package/dist/debug/html.mjs
CHANGED
|
@@ -3227,7 +3227,7 @@ var compat = {
|
|
|
3227
3227
|
if (!compatRegistered) {
|
|
3228
3228
|
const registered = getRegistered(this);
|
|
3229
3229
|
if (registered) {
|
|
3230
|
-
const scopeId = getScopeId(registered.scope);
|
|
3230
|
+
const scopeId = registered.scope ? getScopeId(registered.scope) : void 0;
|
|
3231
3231
|
if (scopeId !== void 0) {
|
|
3232
3232
|
writeScopeToState(state, scopeId, {});
|
|
3233
3233
|
}
|
package/dist/html.js
CHANGED
|
@@ -2094,7 +2094,7 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
|
|
|
2094
2094
|
if (!compatRegistered) {
|
|
2095
2095
|
let registered = getRegistered(this);
|
|
2096
2096
|
if (registered) {
|
|
2097
|
-
let scopeId = getScopeId(registered.scope);
|
|
2097
|
+
let scopeId = registered.scope ? getScopeId(registered.scope) : void 0;
|
|
2098
2098
|
scopeId !== void 0 && writeScopeToState(state, scopeId, {}), COMPAT_REGISTRY.set(
|
|
2099
2099
|
this,
|
|
2100
2100
|
compatRegistered = [registered.id, scopeId]
|
package/dist/html.mjs
CHANGED
|
@@ -2004,7 +2004,7 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
|
|
|
2004
2004
|
if (!compatRegistered) {
|
|
2005
2005
|
let registered = getRegistered(this);
|
|
2006
2006
|
if (registered) {
|
|
2007
|
-
let scopeId = getScopeId(registered.scope);
|
|
2007
|
+
let scopeId = registered.scope ? getScopeId(registered.scope) : void 0;
|
|
2008
2008
|
scopeId !== void 0 && writeScopeToState(state, scopeId, {}), COMPAT_REGISTRY.set(
|
|
2009
2009
|
this,
|
|
2010
2010
|
compatRegistered = [registered.id, scopeId]
|
package/dist/translator/index.js
CHANGED
|
@@ -2061,7 +2061,7 @@ function canIgnoreRegister(markoRoot, exprRoot) {
|
|
|
2061
2061
|
markoRoot.isMarkoPlaceholder() || // bail within a server only statement
|
|
2062
2062
|
markoRoot.isMarkoScriptlet() && (!markoRoot.node.static || markoRoot.node.target === "server") || // bail within the tag name
|
|
2063
2063
|
markoRoot.isMarkoTag() && markoRoot.node.name == exprRoot.node || isMarkoAttribute(markoRoot) && (analyzeTagNameType(markoRoot.parentPath) === 0 /* NativeTag */ && // TODO: all native tag functions should avoid registration but right now change handlers require it.
|
|
2064
|
-
/^on[A-Z-]/.test(markoRoot.node.name) || isCoreTagName(markoRoot.parentPath, "script") || isCoreTagName(markoRoot.parentPath, "lifecycle") || isCoreTagName(markoRoot.parentPath, "for"))
|
|
2064
|
+
/^on[A-Z-]/.test(markoRoot.node.name) && !hasSpreadAttributeAfter(markoRoot) || isCoreTagName(markoRoot.parentPath, "script") || isCoreTagName(markoRoot.parentPath, "lifecycle") || isCoreTagName(markoRoot.parentPath, "for"))
|
|
2065
2065
|
);
|
|
2066
2066
|
}
|
|
2067
2067
|
function getStaticDeclRefs(fnExtra, path7, refs = /* @__PURE__ */ new Set()) {
|
|
@@ -2110,6 +2110,13 @@ function shouldAlwaysRegister(markoRoot) {
|
|
|
2110
2110
|
}
|
|
2111
2111
|
return false;
|
|
2112
2112
|
}
|
|
2113
|
+
function hasSpreadAttributeAfter(attr) {
|
|
2114
|
+
const attrs = attr.parent.attributes;
|
|
2115
|
+
for (let i = attr.key + 1; i < attrs.length; i++) {
|
|
2116
|
+
if (attrs[i].type === "MarkoSpreadAttribute") return true;
|
|
2117
|
+
}
|
|
2118
|
+
return false;
|
|
2119
|
+
}
|
|
2113
2120
|
function getTagFromMarkoRoot(markoRoot) {
|
|
2114
2121
|
let cur = markoRoot;
|
|
2115
2122
|
do {
|