marko 6.0.0-next.3.86 → 6.0.1
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 +38 -37
- package/dist/debug/html.mjs +38 -37
- package/dist/html.js +1 -1
- package/dist/html.mjs +1 -1
- package/dist/translator/index.js +9 -4
- package/package.json +1 -1
package/dist/debug/html.js
CHANGED
@@ -213,44 +213,45 @@ function forTo(to, from, step, cb) {
|
|
213
213
|
// src/html/inlined-runtimes.ts
|
214
214
|
var WALKER_RUNTIME_CODE = true ? (
|
215
215
|
/* js */
|
216
|
-
`((runtimeId) =>
|
217
|
-
(self[runtimeId] =
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
216
|
+
`((runtimeId) => (
|
217
|
+
(self[runtimeId] = (
|
218
|
+
renderId,
|
219
|
+
prefix = runtimeId + renderId,
|
220
|
+
prefixLen = prefix.length,
|
221
|
+
lookup = {},
|
222
|
+
visits = [],
|
223
|
+
doc = document,
|
224
|
+
walker = doc.createTreeWalker(
|
225
|
+
doc,
|
226
|
+
129 /* NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_ELEMENT */,
|
227
|
+
),
|
228
|
+
) =>
|
229
|
+
(self[runtimeId][renderId] = {
|
230
|
+
i: prefix,
|
231
|
+
d: doc,
|
232
|
+
l: lookup,
|
233
|
+
v: visits,
|
234
|
+
x() {},
|
235
|
+
w(node, op, id) {
|
236
|
+
while ((node = walker.nextNode())) {
|
237
|
+
this.x(
|
238
|
+
(op =
|
239
|
+
(op = node.data) &&
|
240
|
+
!op.indexOf(prefix) &&
|
241
|
+
((lookup[(id = op.slice(prefixLen + 1))] = node), op[prefixLen])),
|
242
|
+
id,
|
243
|
+
node,
|
244
|
+
);
|
244
245
|
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
) : `(e=>self[e]=
|
246
|
+
if (op > "#") {
|
247
|
+
visits.push(node);
|
248
|
+
}
|
249
|
+
}
|
250
|
+
},
|
251
|
+
})),
|
252
|
+
self[runtimeId]
|
253
|
+
))`
|
254
|
+
) : `(e=>(self[e]=(l,t=e+l,d=t.length,f={},s=[],x=document,a=x.createTreeWalker(x,129))=>self[e][l]={i:t,d:x,l:f,v:s,x(){},w(e,l,x){for(;e=a.nextNode();)this.x(l=(l=e.data)&&!l.indexOf(t)&&(f[x=l.slice(d+1)]=e,l[d]),x,e),l>"#"&&s.push(e)}},self[e]))`;
|
254
255
|
var REORDER_RUNTIME_CODE = true ? (
|
255
256
|
/* js */
|
256
257
|
`((runtime) => {
|
package/dist/debug/html.mjs
CHANGED
@@ -128,44 +128,45 @@ function forTo(to, from, step, cb) {
|
|
128
128
|
// src/html/inlined-runtimes.ts
|
129
129
|
var WALKER_RUNTIME_CODE = true ? (
|
130
130
|
/* js */
|
131
|
-
`((runtimeId) =>
|
132
|
-
(self[runtimeId] =
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
131
|
+
`((runtimeId) => (
|
132
|
+
(self[runtimeId] = (
|
133
|
+
renderId,
|
134
|
+
prefix = runtimeId + renderId,
|
135
|
+
prefixLen = prefix.length,
|
136
|
+
lookup = {},
|
137
|
+
visits = [],
|
138
|
+
doc = document,
|
139
|
+
walker = doc.createTreeWalker(
|
140
|
+
doc,
|
141
|
+
129 /* NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_ELEMENT */,
|
142
|
+
),
|
143
|
+
) =>
|
144
|
+
(self[runtimeId][renderId] = {
|
145
|
+
i: prefix,
|
146
|
+
d: doc,
|
147
|
+
l: lookup,
|
148
|
+
v: visits,
|
149
|
+
x() {},
|
150
|
+
w(node, op, id) {
|
151
|
+
while ((node = walker.nextNode())) {
|
152
|
+
this.x(
|
153
|
+
(op =
|
154
|
+
(op = node.data) &&
|
155
|
+
!op.indexOf(prefix) &&
|
156
|
+
((lookup[(id = op.slice(prefixLen + 1))] = node), op[prefixLen])),
|
157
|
+
id,
|
158
|
+
node,
|
159
|
+
);
|
159
160
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
) : `(e=>self[e]=
|
161
|
+
if (op > "#") {
|
162
|
+
visits.push(node);
|
163
|
+
}
|
164
|
+
}
|
165
|
+
},
|
166
|
+
})),
|
167
|
+
self[runtimeId]
|
168
|
+
))`
|
169
|
+
) : `(e=>(self[e]=(l,t=e+l,d=t.length,f={},s=[],x=document,a=x.createTreeWalker(x,129))=>self[e][l]={i:t,d:x,l:f,v:s,x(){},w(e,l,x){for(;e=a.nextNode();)this.x(l=(l=e.data)&&!l.indexOf(t)&&(f[x=l.slice(d+1)]=e,l[d]),x,e),l>"#"&&s.push(e)}},self[e]))`;
|
169
170
|
var REORDER_RUNTIME_CODE = true ? (
|
170
171
|
/* js */
|
171
172
|
`((runtime) => {
|
package/dist/html.js
CHANGED
@@ -179,7 +179,7 @@ function forTo(to, from, step, cb) {
|
|
179
179
|
}
|
180
180
|
|
181
181
|
// src/html/inlined-runtimes.ts
|
182
|
-
var WALKER_RUNTIME_CODE = '(e=>self[e]=
|
182
|
+
var WALKER_RUNTIME_CODE = '(e=>(self[e]=(l,t=e+l,d=t.length,f={},s=[],x=document,a=x.createTreeWalker(x,129))=>self[e][l]={i:t,d:x,l:f,v:s,x(){},w(e,l,x){for(;e=a.nextNode();)this.x(l=(l=e.data)&&!l.indexOf(t)&&(f[x=l.slice(d+1)]=e,l[d]),x,e),l>"#"&&s.push(e)}},self[e]))', REORDER_RUNTIME_CODE = '(e=>{let i,l,t,r={},c=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(d,o,n,a,g)=>{"#"==d?(r[o]=l).i++:n==t&&i(),"T"==n.tagName&&(o=n.getAttribute(e.i))&&((a=e.l["^"+o])&&(r[o]={i:1,c(i=e.l[o]||n){for(;(t=i.previousSibling||a).remove(),a!=t;);c(i,n)}}),t=n.nextSibling,l=r[o],i=()=>{a||c(e.l[o],n),--l.i||l.c()},(d=e.j[o])&&(g=l.c,l.c=()=>g()+d(e.r)))}})';
|
183
183
|
|
184
184
|
// src/html/serializer.ts
|
185
185
|
var kTouchedIterator = Symbol(), { hasOwnProperty } = {}, Generator = function* () {
|
package/dist/html.mjs
CHANGED
@@ -97,7 +97,7 @@ function forTo(to, from, step, cb) {
|
|
97
97
|
}
|
98
98
|
|
99
99
|
// src/html/inlined-runtimes.ts
|
100
|
-
var WALKER_RUNTIME_CODE = '(e=>self[e]=
|
100
|
+
var WALKER_RUNTIME_CODE = '(e=>(self[e]=(l,t=e+l,d=t.length,f={},s=[],x=document,a=x.createTreeWalker(x,129))=>self[e][l]={i:t,d:x,l:f,v:s,x(){},w(e,l,x){for(;e=a.nextNode();)this.x(l=(l=e.data)&&!l.indexOf(t)&&(f[x=l.slice(d+1)]=e,l[d]),x,e),l>"#"&&s.push(e)}},self[e]))', REORDER_RUNTIME_CODE = '(e=>{let i,l,t,r={},c=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(d,o,n,a,g)=>{"#"==d?(r[o]=l).i++:n==t&&i(),"T"==n.tagName&&(o=n.getAttribute(e.i))&&((a=e.l["^"+o])&&(r[o]={i:1,c(i=e.l[o]||n){for(;(t=i.previousSibling||a).remove(),a!=t;);c(i,n)}}),t=n.nextSibling,l=r[o],i=()=>{a||c(e.l[o],n),--l.i||l.c()},(d=e.j[o])&&(g=l.c,l.c=()=>g()+d(e.r)))}})';
|
101
101
|
|
102
102
|
// src/html/serializer.ts
|
103
103
|
var kTouchedIterator = Symbol(), { hasOwnProperty } = {}, Generator = function* () {
|
package/dist/translator/index.js
CHANGED
@@ -6958,20 +6958,22 @@ var define_default = {
|
|
6958
6958
|
}
|
6959
6959
|
const tagBody = tag.get("body");
|
6960
6960
|
const bodySection = startSection(tagBody);
|
6961
|
-
trackVarReferences(tag, 4 /* derived */);
|
6961
|
+
const varBinding = trackVarReferences(tag, 4 /* derived */);
|
6962
6962
|
if (bodySection) {
|
6963
|
-
const varBinding = tag.node.var?.extra?.binding;
|
6964
6963
|
if (varBinding) {
|
6965
6964
|
bodySection.downstreamBinding = varBinding.propertyAliases.get("content") || varBinding;
|
6966
6965
|
}
|
6967
6966
|
}
|
6968
6967
|
trackParamsReferences(tagBody, 3 /* param */);
|
6969
6968
|
analyzeAttributeTags(tag);
|
6970
|
-
mergeReferences(
|
6969
|
+
const tagExtra = mergeReferences(
|
6971
6970
|
getOrCreateSection(tag),
|
6972
6971
|
tag.node,
|
6973
6972
|
getAllTagReferenceNodes(tag.node)
|
6974
6973
|
);
|
6974
|
+
if (varBinding) {
|
6975
|
+
setBindingValueExpr(varBinding, tagExtra);
|
6976
|
+
}
|
6975
6977
|
},
|
6976
6978
|
translate: {
|
6977
6979
|
enter(tag) {
|
@@ -8087,7 +8089,10 @@ var id_default = {
|
|
8087
8089
|
if (!import_compiler40.types.isIdentifier(node.var)) {
|
8088
8090
|
throw tag.get("var").buildCodeFrameError("The `id` tag cannot be destructured");
|
8089
8091
|
}
|
8090
|
-
trackVarReferences(tag, 4 /* derived */);
|
8092
|
+
const binding = trackVarReferences(tag, 4 /* derived */);
|
8093
|
+
if (binding) {
|
8094
|
+
setBindingValueExpr(binding, false);
|
8095
|
+
}
|
8091
8096
|
},
|
8092
8097
|
translate: {
|
8093
8098
|
exit(tag) {
|