marko 6.0.81 → 6.0.83
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/dom.js +9 -3
- package/dist/debug/dom.mjs +9 -3
- package/dist/debug/html.js +13 -8
- package/dist/debug/html.mjs +13 -8
- package/dist/dom/signals.d.ts +1 -1
- package/dist/dom.js +8 -3
- package/dist/dom.mjs +8 -3
- package/dist/html.js +7 -2
- package/dist/html.mjs +7 -2
- package/dist/translator/index.js +7552 -7500
- package/dist/translator/util/body-to-text-literal.d.ts +2 -0
- package/dist/translator/util/known-tag.d.ts +3 -0
- package/dist/translator/util/optional.d.ts +1 -1
- package/dist/translator/util/references.d.ts +1 -2
- package/dist/translator/util/sections.d.ts +13 -3
- package/dist/translator/util/serialize-guard.d.ts +1 -1
- package/dist/translator/util/serialize-reasons.d.ts +1 -1
- package/dist/translator/util/set-tag-sections-downstream.d.ts +2 -1
- package/dist/translator/visitors/program/index.d.ts +6 -4
- package/package.json +1 -1
- package/tags-html.d.ts +1 -3
package/dist/debug/dom.js
CHANGED
@@ -198,7 +198,13 @@ function getEventHandlerName(name) {
|
|
198
198
|
return name[2] === "-" ? name.slice(3) : name.slice(2).toLowerCase();
|
199
199
|
}
|
200
200
|
function normalizeDynamicRenderer(value) {
|
201
|
-
|
201
|
+
if (value) {
|
202
|
+
if (typeof value === "string") return value;
|
203
|
+
const normalized = value.content || value.default || value;
|
204
|
+
if ("___id" in normalized) {
|
205
|
+
return normalized;
|
206
|
+
}
|
207
|
+
}
|
202
208
|
}
|
203
209
|
|
204
210
|
// src/dom/event.ts
|
@@ -928,14 +934,14 @@ function _let(valueAccessor, fn) {
|
|
928
934
|
const update = (scope, value) => {
|
929
935
|
if (scope[valueAccessor] !== value) {
|
930
936
|
scope[valueAccessor] = value;
|
931
|
-
fn(scope, value);
|
937
|
+
fn && fn(scope, value);
|
932
938
|
}
|
933
939
|
};
|
934
940
|
return (scope, value, valueChange) => {
|
935
941
|
if (rendering) {
|
936
942
|
if ((scope[valueChangeAccessor] = valueChange) && scope[valueAccessor] !== value || !(valueAccessor in scope)) {
|
937
943
|
scope[valueAccessor] = value;
|
938
|
-
fn(scope, value);
|
944
|
+
fn && fn(scope, value);
|
939
945
|
}
|
940
946
|
} else if (scope[valueChangeAccessor]) {
|
941
947
|
scope[valueChangeAccessor](value);
|
package/dist/debug/dom.mjs
CHANGED
@@ -98,7 +98,13 @@ function getEventHandlerName(name) {
|
|
98
98
|
return name[2] === "-" ? name.slice(3) : name.slice(2).toLowerCase();
|
99
99
|
}
|
100
100
|
function normalizeDynamicRenderer(value) {
|
101
|
-
|
101
|
+
if (value) {
|
102
|
+
if (typeof value === "string") return value;
|
103
|
+
const normalized = value.content || value.default || value;
|
104
|
+
if ("___id" in normalized) {
|
105
|
+
return normalized;
|
106
|
+
}
|
107
|
+
}
|
102
108
|
}
|
103
109
|
|
104
110
|
// src/dom/event.ts
|
@@ -828,14 +834,14 @@ function _let(valueAccessor, fn) {
|
|
828
834
|
const update = (scope, value) => {
|
829
835
|
if (scope[valueAccessor] !== value) {
|
830
836
|
scope[valueAccessor] = value;
|
831
|
-
fn(scope, value);
|
837
|
+
fn && fn(scope, value);
|
832
838
|
}
|
833
839
|
};
|
834
840
|
return (scope, value, valueChange) => {
|
835
841
|
if (rendering) {
|
836
842
|
if ((scope[valueChangeAccessor] = valueChange) && scope[valueAccessor] !== value || !(valueAccessor in scope)) {
|
837
843
|
scope[valueAccessor] = value;
|
838
|
-
fn(scope, value);
|
844
|
+
fn && fn(scope, value);
|
839
845
|
}
|
840
846
|
} else if (scope[valueChangeAccessor]) {
|
841
847
|
scope[valueChangeAccessor](value);
|
package/dist/debug/html.js
CHANGED
@@ -161,7 +161,13 @@ function isVoid(value) {
|
|
161
161
|
return value == null || value === false;
|
162
162
|
}
|
163
163
|
function normalizeDynamicRenderer(value) {
|
164
|
-
|
164
|
+
if (value) {
|
165
|
+
if (typeof value === "string") return value;
|
166
|
+
const normalized = value.content || value.default || value;
|
167
|
+
if ("___id" in normalized) {
|
168
|
+
return normalized;
|
169
|
+
}
|
170
|
+
}
|
165
171
|
}
|
166
172
|
|
167
173
|
// src/html/content.ts
|
@@ -243,8 +249,7 @@ function forStepBy(by, index) {
|
|
243
249
|
// src/html/inlined-runtimes.ts
|
244
250
|
var WALKER_RUNTIME_CODE = true ? (
|
245
251
|
/* js */
|
246
|
-
`((runtimeId) => (
|
247
|
-
(self[runtimeId] = (
|
252
|
+
`((runtimeId) => (self[runtimeId] || (self[runtimeId] = (
|
248
253
|
renderId,
|
249
254
|
prefix = runtimeId + renderId,
|
250
255
|
prefixLen = prefix.length,
|
@@ -278,13 +283,13 @@ var WALKER_RUNTIME_CODE = true ? (
|
|
278
283
|
}
|
279
284
|
}
|
280
285
|
},
|
281
|
-
})
|
282
|
-
|
283
|
-
))
|
284
|
-
) : `(e=>(self[e]=(l,d=e+l,f=d.length,o={},n=[],s=document,t=s.createTreeWalker(s,129))=>s=self[e][l]={i:d,d:s,l:o,v:n,x(){},w(e,l,x){for(;e=t.nextNode();)s.x(l=(l=e.data)&&!l.indexOf(d)&&(o[x=l.slice(f+1)]=e,l[f]),x,e),l>"#"&&n.push(e)}},self[e]))`;
|
286
|
+
})
|
287
|
+
)))`
|
288
|
+
) : `(e=>(self[e]||(self[e]=(o,l=e+o,d=l.length,n={},f=[],s=document,a=s.createTreeWalker(s,129))=>s=self[e][o]={i:l,d:s,l:n,v:f,x(){},w(e,o,i){for(;e=a.nextNode();)s.x(o=(o=e.data)&&!o.indexOf(l)&&(n[i=o.slice(d+1)]=e,o[d]),i,e),o>"#"&&f.push(e)}})))`;
|
285
289
|
var REORDER_RUNTIME_CODE = true ? (
|
286
290
|
/* js */
|
287
291
|
`((runtime) => {
|
292
|
+
if (runtime.j) return;
|
288
293
|
let onNextSibling,
|
289
294
|
placeholder,
|
290
295
|
nextSibling,
|
@@ -338,7 +343,7 @@ runtime.x = (op, id, node, start, placeholderCallback) => {
|
|
338
343
|
}
|
339
344
|
};
|
340
345
|
})`
|
341
|
-
) : `(e=>{let i,l,
|
346
|
+
) : `(e=>{if(e.j)return;let i,o,l,r={},t=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(c,d,n,a,g)=>{"#"==c?(r[d]=o).i++:n==l&&i(),"T"==n.tagName&&(d=n.getAttribute(e.i))&&((a=e.l["^"+d])&&(r[d]={i:1,c(i=e.l[d]||n){for(;(l=i.previousSibling||a).remove(),a!=l;);t(i,n)}}),l=n.nextSibling,o=r[d],i=()=>{a||t(e.l[d],n),--o.i||o.c()},(c=e.j[d])&&(g=o.c,o.c=()=>g()+c(e.r)))}})`;
|
342
347
|
|
343
348
|
// src/html/serializer.ts
|
344
349
|
var kTouchedIterator = Symbol();
|
package/dist/debug/html.mjs
CHANGED
@@ -72,7 +72,13 @@ function isVoid(value) {
|
|
72
72
|
return value == null || value === false;
|
73
73
|
}
|
74
74
|
function normalizeDynamicRenderer(value) {
|
75
|
-
|
75
|
+
if (value) {
|
76
|
+
if (typeof value === "string") return value;
|
77
|
+
const normalized = value.content || value.default || value;
|
78
|
+
if ("___id" in normalized) {
|
79
|
+
return normalized;
|
80
|
+
}
|
81
|
+
}
|
76
82
|
}
|
77
83
|
|
78
84
|
// src/html/content.ts
|
@@ -154,8 +160,7 @@ function forStepBy(by, index) {
|
|
154
160
|
// src/html/inlined-runtimes.ts
|
155
161
|
var WALKER_RUNTIME_CODE = true ? (
|
156
162
|
/* js */
|
157
|
-
`((runtimeId) => (
|
158
|
-
(self[runtimeId] = (
|
163
|
+
`((runtimeId) => (self[runtimeId] || (self[runtimeId] = (
|
159
164
|
renderId,
|
160
165
|
prefix = runtimeId + renderId,
|
161
166
|
prefixLen = prefix.length,
|
@@ -189,13 +194,13 @@ var WALKER_RUNTIME_CODE = true ? (
|
|
189
194
|
}
|
190
195
|
}
|
191
196
|
},
|
192
|
-
})
|
193
|
-
|
194
|
-
))
|
195
|
-
) : `(e=>(self[e]=(l,d=e+l,f=d.length,o={},n=[],s=document,t=s.createTreeWalker(s,129))=>s=self[e][l]={i:d,d:s,l:o,v:n,x(){},w(e,l,x){for(;e=t.nextNode();)s.x(l=(l=e.data)&&!l.indexOf(d)&&(o[x=l.slice(f+1)]=e,l[f]),x,e),l>"#"&&n.push(e)}},self[e]))`;
|
197
|
+
})
|
198
|
+
)))`
|
199
|
+
) : `(e=>(self[e]||(self[e]=(o,l=e+o,d=l.length,n={},f=[],s=document,a=s.createTreeWalker(s,129))=>s=self[e][o]={i:l,d:s,l:n,v:f,x(){},w(e,o,i){for(;e=a.nextNode();)s.x(o=(o=e.data)&&!o.indexOf(l)&&(n[i=o.slice(d+1)]=e,o[d]),i,e),o>"#"&&f.push(e)}})))`;
|
196
200
|
var REORDER_RUNTIME_CODE = true ? (
|
197
201
|
/* js */
|
198
202
|
`((runtime) => {
|
203
|
+
if (runtime.j) return;
|
199
204
|
let onNextSibling,
|
200
205
|
placeholder,
|
201
206
|
nextSibling,
|
@@ -249,7 +254,7 @@ runtime.x = (op, id, node, start, placeholderCallback) => {
|
|
249
254
|
}
|
250
255
|
};
|
251
256
|
})`
|
252
|
-
) : `(e=>{let i,l,
|
257
|
+
) : `(e=>{if(e.j)return;let i,o,l,r={},t=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(c,d,n,a,g)=>{"#"==c?(r[d]=o).i++:n==l&&i(),"T"==n.tagName&&(d=n.getAttribute(e.i))&&((a=e.l["^"+d])&&(r[d]={i:1,c(i=e.l[d]||n){for(;(l=i.previousSibling||a).remove(),a!=l;);t(i,n)}}),l=n.nextSibling,o=r[d],i=()=>{a||t(e.l[d],n),--o.i||o.c()},(c=e.j[d])&&(g=o.c,o.c=()=>g()+c(e.r)))}})`;
|
253
258
|
|
254
259
|
// src/html/serializer.ts
|
255
260
|
var kTouchedIterator = Symbol();
|
package/dist/dom/signals.d.ts
CHANGED
@@ -3,7 +3,7 @@ export type SignalFn<T> = (scope: Scope, value?: T) => void;
|
|
3
3
|
export type Signal<T> = SignalFn<T> & {
|
4
4
|
___subscribe?(scope: Scope): void;
|
5
5
|
};
|
6
|
-
export declare function _let<T>(valueAccessor: Accessor, fn
|
6
|
+
export declare function _let<T>(valueAccessor: Accessor, fn?: SignalFn<T>): (scope: Scope, value: T, valueChange?: (v: T) => void) => T;
|
7
7
|
export declare function _const<T>(valueAccessor: Accessor, fn?: SignalFn<T>): Signal<T>;
|
8
8
|
export declare function _or(id: number, fn: SignalFn<never>, defaultPending?: number, scopeIdAccessor?: Accessor): Signal<never>;
|
9
9
|
export declare function _for_closure<T>(valueAccessor: Accessor, ownerLoopNodeAccessor: Accessor, fn: SignalFn<T>): SignalFn<T>;
|
package/dist/dom.js
CHANGED
@@ -163,7 +163,12 @@ function getEventHandlerName(name) {
|
|
163
163
|
return name[2] === "-" ? name.slice(3) : name.slice(2).toLowerCase();
|
164
164
|
}
|
165
165
|
function normalizeDynamicRenderer(value) {
|
166
|
-
|
166
|
+
if (value) {
|
167
|
+
if (typeof value == "string") return value;
|
168
|
+
let normalized = value.content || value.default || value;
|
169
|
+
if ("___id" in normalized)
|
170
|
+
return normalized;
|
171
|
+
}
|
167
172
|
}
|
168
173
|
|
169
174
|
// src/dom/event.ts
|
@@ -605,9 +610,9 @@ function _let(valueAccessor, fn) {
|
|
605
610
|
if (0)
|
606
611
|
var id;
|
607
612
|
let valueChangeAccessor = "o" /* TagVariableChange */ + valueAccessor, update = (scope, value) => {
|
608
|
-
scope[valueAccessor] !== value && (scope[valueAccessor] = value, fn(scope, value));
|
613
|
+
scope[valueAccessor] !== value && (scope[valueAccessor] = value, fn && fn(scope, value));
|
609
614
|
};
|
610
|
-
return (scope, value, valueChange) => (rendering ? ((scope[valueChangeAccessor] = valueChange) && scope[valueAccessor] !== value || !(valueAccessor in scope)) && (scope[valueAccessor] = value, fn(scope, value)) : scope[valueChangeAccessor] ? scope[valueChangeAccessor](value) : (schedule(), queueRender(
|
615
|
+
return (scope, value, valueChange) => (rendering ? ((scope[valueChangeAccessor] = valueChange) && scope[valueAccessor] !== value || !(valueAccessor in scope)) && (scope[valueAccessor] = value, fn && fn(scope, value)) : scope[valueChangeAccessor] ? scope[valueChangeAccessor](value) : (schedule(), queueRender(
|
611
616
|
scope,
|
612
617
|
update,
|
613
618
|
valueAccessor,
|
package/dist/dom.mjs
CHANGED
@@ -66,7 +66,12 @@ function getEventHandlerName(name) {
|
|
66
66
|
return name[2] === "-" ? name.slice(3) : name.slice(2).toLowerCase();
|
67
67
|
}
|
68
68
|
function normalizeDynamicRenderer(value) {
|
69
|
-
|
69
|
+
if (value) {
|
70
|
+
if (typeof value == "string") return value;
|
71
|
+
let normalized = value.content || value.default || value;
|
72
|
+
if ("___id" in normalized)
|
73
|
+
return normalized;
|
74
|
+
}
|
70
75
|
}
|
71
76
|
|
72
77
|
// src/dom/event.ts
|
@@ -508,9 +513,9 @@ function _let(valueAccessor, fn) {
|
|
508
513
|
if (0)
|
509
514
|
var id;
|
510
515
|
let valueChangeAccessor = "o" /* TagVariableChange */ + valueAccessor, update = (scope, value) => {
|
511
|
-
scope[valueAccessor] !== value && (scope[valueAccessor] = value, fn(scope, value));
|
516
|
+
scope[valueAccessor] !== value && (scope[valueAccessor] = value, fn && fn(scope, value));
|
512
517
|
};
|
513
|
-
return (scope, value, valueChange) => (rendering ? ((scope[valueChangeAccessor] = valueChange) && scope[valueAccessor] !== value || !(valueAccessor in scope)) && (scope[valueAccessor] = value, fn(scope, value)) : scope[valueChangeAccessor] ? scope[valueChangeAccessor](value) : (schedule(), queueRender(
|
518
|
+
return (scope, value, valueChange) => (rendering ? ((scope[valueChangeAccessor] = valueChange) && scope[valueAccessor] !== value || !(valueAccessor in scope)) && (scope[valueAccessor] = value, fn && fn(scope, value)) : scope[valueChangeAccessor] ? scope[valueChangeAccessor](value) : (schedule(), queueRender(
|
514
519
|
scope,
|
515
520
|
update,
|
516
521
|
valueAccessor,
|
package/dist/html.js
CHANGED
@@ -132,7 +132,12 @@ function isVoid(value) {
|
|
132
132
|
return value == null || value === !1;
|
133
133
|
}
|
134
134
|
function normalizeDynamicRenderer(value) {
|
135
|
-
|
135
|
+
if (value) {
|
136
|
+
if (typeof value == "string") return value;
|
137
|
+
let normalized = value.content || value.default || value;
|
138
|
+
if ("___id" in normalized)
|
139
|
+
return normalized;
|
140
|
+
}
|
136
141
|
}
|
137
142
|
|
138
143
|
// src/html/content.ts
|
@@ -190,7 +195,7 @@ function forStepBy(by, index) {
|
|
190
195
|
}
|
191
196
|
|
192
197
|
// src/html/inlined-runtimes.ts
|
193
|
-
var WALKER_RUNTIME_CODE = '(e=>(self[e]=(l
|
198
|
+
var WALKER_RUNTIME_CODE = '(e=>(self[e]||(self[e]=(o,l=e+o,d=l.length,n={},f=[],s=document,a=s.createTreeWalker(s,129))=>s=self[e][o]={i:l,d:s,l:n,v:f,x(){},w(e,o,i){for(;e=a.nextNode();)s.x(o=(o=e.data)&&!o.indexOf(l)&&(n[i=o.slice(d+1)]=e,o[d]),i,e),o>"#"&&f.push(e)}})))', REORDER_RUNTIME_CODE = '(e=>{if(e.j)return;let i,o,l,r={},t=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(c,d,n,a,g)=>{"#"==c?(r[d]=o).i++:n==l&&i(),"T"==n.tagName&&(d=n.getAttribute(e.i))&&((a=e.l["^"+d])&&(r[d]={i:1,c(i=e.l[d]||n){for(;(l=i.previousSibling||a).remove(),a!=l;);t(i,n)}}),l=n.nextSibling,o=r[d],i=()=>{a||t(e.l[d],n),--o.i||o.c()},(c=e.j[d])&&(g=o.c,o.c=()=>g()+c(e.r)))}})';
|
194
199
|
|
195
200
|
// src/html/serializer.ts
|
196
201
|
var kTouchedIterator = Symbol(), { hasOwnProperty } = {}, Generator = (function* () {
|
package/dist/html.mjs
CHANGED
@@ -46,7 +46,12 @@ function isVoid(value) {
|
|
46
46
|
return value == null || value === !1;
|
47
47
|
}
|
48
48
|
function normalizeDynamicRenderer(value) {
|
49
|
-
|
49
|
+
if (value) {
|
50
|
+
if (typeof value == "string") return value;
|
51
|
+
let normalized = value.content || value.default || value;
|
52
|
+
if ("___id" in normalized)
|
53
|
+
return normalized;
|
54
|
+
}
|
50
55
|
}
|
51
56
|
|
52
57
|
// src/html/content.ts
|
@@ -104,7 +109,7 @@ function forStepBy(by, index) {
|
|
104
109
|
}
|
105
110
|
|
106
111
|
// src/html/inlined-runtimes.ts
|
107
|
-
var WALKER_RUNTIME_CODE = '(e=>(self[e]=(l
|
112
|
+
var WALKER_RUNTIME_CODE = '(e=>(self[e]||(self[e]=(o,l=e+o,d=l.length,n={},f=[],s=document,a=s.createTreeWalker(s,129))=>s=self[e][o]={i:l,d:s,l:n,v:f,x(){},w(e,o,i){for(;e=a.nextNode();)s.x(o=(o=e.data)&&!o.indexOf(l)&&(n[i=o.slice(d+1)]=e,o[d]),i,e),o>"#"&&f.push(e)}})))', REORDER_RUNTIME_CODE = '(e=>{if(e.j)return;let i,o,l,r={},t=(e,i)=>{e.replaceWith(...i.childNodes),i.remove()};e.d.head.append(e.d.querySelector("style["+e.i+"]")||""),e.j={},e.x=(c,d,n,a,g)=>{"#"==c?(r[d]=o).i++:n==l&&i(),"T"==n.tagName&&(d=n.getAttribute(e.i))&&((a=e.l["^"+d])&&(r[d]={i:1,c(i=e.l[d]||n){for(;(l=i.previousSibling||a).remove(),a!=l;);t(i,n)}}),l=n.nextSibling,o=r[d],i=()=>{a||t(e.l[d],n),--o.i||o.c()},(c=e.j[d])&&(g=o.c,o.c=()=>g()+c(e.r)))}})';
|
108
113
|
|
109
114
|
// src/html/serializer.ts
|
110
115
|
var kTouchedIterator = Symbol(), { hasOwnProperty } = {}, Generator = (function* () {
|