marko 6.3.36 → 6.3.38
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/catch.feat.js +1 -1
- package/dist/debug/dom/catch.feat.mjs +1 -1
- package/dist/debug/dom/controllable-input.feat.js +1 -1
- package/dist/debug/dom/controllable-input.feat.mjs +1 -1
- package/dist/debug/dom/controllable-open.feat.js +1 -1
- package/dist/debug/dom/controllable-open.feat.mjs +1 -1
- package/dist/debug/dom/controllable-select.feat.js +1 -1
- package/dist/debug/dom/controllable-select.feat.mjs +1 -1
- package/dist/debug/dom/controllable-textarea.feat.js +1 -1
- package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/debug/dom/controllable.feat.js +1 -1
- package/dist/debug/dom/controllable.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/debug/{dom-BbFAdZEB.js → dom-BkYlHM4b.js} +24 -9
- package/dist/debug/{dom-ClMc0GK9.mjs → dom-woc_wRhN.mjs} +19 -10
- package/dist/debug/dom.js +7 -7
- package/dist/debug/dom.mjs +7 -7
- package/dist/debug/html.js +6 -3
- package/dist/debug/html.mjs +6 -3
- package/dist/dom/abort-signal.d.ts +2 -0
- package/dist/dom/catch.feat.js +3 -3
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/controllable-input.feat.js +1 -1
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +1 -1
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +1 -1
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +1 -1
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.feat.js +1 -1
- package/dist/dom/controllable.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/load.d.ts +3 -3
- package/dist/dom/resume.d.ts +1 -0
- package/dist/{dom-59H9kVUF.js → dom-B15s3PHD.js} +60 -56
- package/dist/{dom-BKDjlXIl.mjs → dom-CPUybM_C.mjs} +13 -14
- package/dist/dom.js +44 -47
- package/dist/dom.mjs +28 -31
- package/dist/html/inlined-runtimes.d.ts +1 -1
- package/dist/html/inlined-runtimes.debug.d.ts +1 -1
- package/dist/html.js +1 -1
- package/dist/html.mjs +1 -1
- package/dist/translator/index.js +28 -13
- package/package.json +3 -3
package/dist/dom.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
let require_control_flow = require("./dom-
|
|
1
|
+
let require_control_flow = require("./dom-B15s3PHD.js"), empty = [], rest = Symbol(), classIdToBranch = /* @__PURE__ */ new Map(), classEventResolver, scopesByRender = /* @__PURE__ */ new WeakMap(), getRenderScopes = ($global) => {
|
|
2
2
|
require_control_flow.yt($global.runtimeId);
|
|
3
3
|
let render = self[$global.runtimeId]?.[$global.renderId], scopes = render && scopesByRender.get(render);
|
|
4
4
|
return render && !scopes && scopesByRender.set(render, scopes = {}), scopes;
|
|
5
5
|
}, compat = {
|
|
6
6
|
patchDynamicTag: require_control_flow.h,
|
|
7
|
-
queueEffect: require_control_flow.
|
|
7
|
+
queueEffect: require_control_flow.tn,
|
|
8
8
|
init(warp10Noop) {
|
|
9
9
|
require_control_flow.gt("$C_s", (scope) => {
|
|
10
10
|
if (getRenderScopes(scope.$)[scope.L] = scope, scope.m5c && classIdToBranch.set(scope.m5c, scope), classEventResolver) for (let key in scope) {
|
|
@@ -35,10 +35,10 @@ let require_control_flow = require("./dom-59H9kVUF.js"), empty = [], rest = Symb
|
|
|
35
35
|
branch.S = startNode, branch.K = endNode;
|
|
36
36
|
},
|
|
37
37
|
runComponentEffects() {
|
|
38
|
-
this.effects && require_control_flow.
|
|
38
|
+
this.effects && require_control_flow.rn(this.effects);
|
|
39
39
|
},
|
|
40
40
|
runComponentDestroy() {
|
|
41
|
-
this.scope && require_control_flow.
|
|
41
|
+
this.scope && require_control_flow.Ut(this.scope);
|
|
42
42
|
},
|
|
43
43
|
resolveRegistered(value, $global) {
|
|
44
44
|
return Array.isArray(value) && typeof value[0] == "string" ? require_control_flow.vt(value[0], getRenderScopes($global)?.[value[1]]) : value;
|
|
@@ -57,14 +57,40 @@ let require_control_flow = require("./dom-59H9kVUF.js"), empty = [], rest = Symb
|
|
|
57
57
|
let input = args[0], normalizedInput = args[0] = {};
|
|
58
58
|
for (let key in input) normalizedInput[key === "renderBody" ? "content" : key] = input[key];
|
|
59
59
|
}
|
|
60
|
-
if (component.effects = require_control_flow
|
|
60
|
+
if (component.effects = require_control_flow.$t(() => {
|
|
61
61
|
branch ||= (created = 1, component.scope = require_control_flow.ft(out.global, renderer, renderer.e, document.body)), renderer.d?.(branch, renderer._ ? args[0] : args);
|
|
62
62
|
}), created) return require_control_flow.ct(branch.S, branch.K);
|
|
63
63
|
}
|
|
64
64
|
}, _template = (id, template, walks, setup, inputSignal) => {
|
|
65
65
|
let renderer = require_control_flow.lt(id, template, walks, setup, inputSignal)();
|
|
66
66
|
return renderer.mount = mount, renderer._ = renderer, require_control_flow.gt(id, renderer);
|
|
67
|
-
}
|
|
67
|
+
}, _load_template = /*@__PURE__*/ require_control_flow.St((id, load) => {
|
|
68
|
+
let pending, lazyTemplate = _template(id, 0, 0, (branch) => {
|
|
69
|
+
let awaitCounter = require_control_flow.p(branch);
|
|
70
|
+
branch.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((renderer) => {
|
|
71
|
+
Object.assign(lazyTemplate, renderer), require_control_flow.en(branch, (branch) => insertLoaded(renderer, branch, branch.S, awaitCounter));
|
|
72
|
+
}, loadFailed(branch, awaitCounter));
|
|
73
|
+
}, _load_signal(() => (pending ||= load()).then((r) => ({ _: r.d }))));
|
|
74
|
+
return lazyTemplate;
|
|
75
|
+
}), _load_setup = /*@__PURE__*/ require_control_flow.St((nodeAccessor, childScopeAccessor, load) => {
|
|
76
|
+
nodeAccessor = require_control_flow.dn(nodeAccessor), childScopeAccessor = require_control_flow.dn(childScopeAccessor);
|
|
77
|
+
let pending, renderer;
|
|
78
|
+
return (owner) => {
|
|
79
|
+
let child = owner[childScopeAccessor];
|
|
80
|
+
if (renderer) insertLoaded(renderer, child, owner[nodeAccessor]);
|
|
81
|
+
else {
|
|
82
|
+
let awaitCounter = require_control_flow.p(owner);
|
|
83
|
+
child.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((mod) => {
|
|
84
|
+
renderer = require_control_flow.lt("", ...mod._)(), require_control_flow.en(child, (child) => insertLoaded(renderer, child, owner[nodeAccessor], awaitCounter));
|
|
85
|
+
}, loadFailed(child, awaitCounter));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}), _load_signal = /*@__PURE__*/ require_control_flow.St((load) => {
|
|
89
|
+
let pending, signal;
|
|
90
|
+
return (scope, value) => {
|
|
91
|
+
pending ||= load(), scope.X || !("X" in scope) && scope.H === require_control_flow.in ? (scope.X ||= /* @__PURE__ */ new Map()).set(pending, { a: value }) : signal ? signal(scope, value) : pending.then((mod) => require_control_flow.en(scope, signal = mod._, value), () => 0);
|
|
92
|
+
};
|
|
93
|
+
});
|
|
68
94
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
69
95
|
//#region src/common/attr-tag.ts
|
|
70
96
|
function attrTag(attrs) {
|
|
@@ -102,75 +128,46 @@ function mount(input = {}, reference, position) {
|
|
|
102
128
|
parentNode = reference.parentNode, nextSibling = reference.nextSibling;
|
|
103
129
|
break;
|
|
104
130
|
}
|
|
105
|
-
let curValue, args = this.d, effects = require_control_flow
|
|
131
|
+
let curValue, args = this.d, effects = require_control_flow.$t(() => {
|
|
106
132
|
branch = require_control_flow.pt($global, this, void 0, parentNode), branch.T = (newValue) => {
|
|
107
133
|
curValue = newValue;
|
|
108
134
|
}, this.c?.(branch), args?.(branch, input);
|
|
109
135
|
});
|
|
110
|
-
return require_control_flow.st(parentNode, nextSibling, branch.S, branch.K), require_control_flow.
|
|
136
|
+
return require_control_flow.st(parentNode, nextSibling, branch.S, branch.K), require_control_flow.rn(effects), {
|
|
111
137
|
get value() {
|
|
112
138
|
return curValue;
|
|
113
139
|
},
|
|
114
140
|
set value(newValue) {
|
|
115
|
-
require_control_flow.
|
|
141
|
+
require_control_flow.Vt(branch, newValue);
|
|
116
142
|
},
|
|
117
143
|
update(newInput = {}) {
|
|
118
|
-
args && (newInput.$global && ({$global, ...newInput} = newInput), require_control_flow.
|
|
144
|
+
args && (newInput.$global && ({$global, ...newInput} = newInput), require_control_flow.rn(require_control_flow.$t(() => {
|
|
119
145
|
args(branch, newInput);
|
|
120
146
|
})));
|
|
121
147
|
},
|
|
122
148
|
destroy() {
|
|
123
|
-
require_control_flow.
|
|
149
|
+
require_control_flow.Gt(branch);
|
|
124
150
|
}
|
|
125
151
|
};
|
|
126
152
|
}
|
|
127
153
|
//#endregion
|
|
128
154
|
//#region src/dom/load.ts
|
|
129
|
-
function _load_template(id, load) {
|
|
130
|
-
let pending, lazyTemplate = _template(id, 0, 0, (branch) => {
|
|
131
|
-
let awaitCounter = require_control_flow.p(branch);
|
|
132
|
-
branch.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((renderer) => {
|
|
133
|
-
Object.assign(lazyTemplate, renderer), require_control_flow.$t(branch, (branch) => insertLoaded(renderer, branch, branch.S, awaitCounter));
|
|
134
|
-
}, loadFailed(branch, awaitCounter));
|
|
135
|
-
}, _load_signal(() => (pending ||= load()).then((r) => ({ _: r.d }))));
|
|
136
|
-
return lazyTemplate;
|
|
137
|
-
}
|
|
138
|
-
function _load_setup(nodeAccessor, childScopeAccessor, load) {
|
|
139
|
-
nodeAccessor = require_control_flow.un(nodeAccessor), childScopeAccessor = require_control_flow.un(childScopeAccessor);
|
|
140
|
-
let pending, renderer;
|
|
141
|
-
return (owner) => {
|
|
142
|
-
let child = owner[childScopeAccessor];
|
|
143
|
-
if (renderer) insertLoaded(renderer, child, owner[nodeAccessor]);
|
|
144
|
-
else {
|
|
145
|
-
let awaitCounter = require_control_flow.p(owner);
|
|
146
|
-
child.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((mod) => {
|
|
147
|
-
renderer = require_control_flow.lt("", ...mod._)(), require_control_flow.$t(child, (child) => insertLoaded(renderer, child, owner[nodeAccessor], awaitCounter));
|
|
148
|
-
}, loadFailed(child, awaitCounter));
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
155
|
function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
153
156
|
let parent = marker.parentNode, values = branch.X, insert = () => {
|
|
154
|
-
require_control_flow.
|
|
157
|
+
require_control_flow.Wt(branch, parent, marker), marker.remove(), awaitCounter?.c();
|
|
155
158
|
}, remaining;
|
|
156
|
-
if (require_control_flow.
|
|
159
|
+
if (require_control_flow.Kt(branch), renderer.b(branch, parent.namespaceURI), branch.X = 0, remaining = values?.size) {
|
|
157
160
|
let fail = loadFailed(branch, awaitCounter);
|
|
158
161
|
for (let [promise, entry] of values) promise.then((signal) => {
|
|
159
|
-
entry.b = signal, --remaining || require_control_flow
|
|
160
|
-
require_control_flow.
|
|
162
|
+
entry.b = signal, --remaining || require_control_flow.en(branch, (branch) => {
|
|
163
|
+
require_control_flow.Kt(branch), renderer.c?.(branch), values.forEach((e) => e.b._(branch, e.a)), insert();
|
|
161
164
|
});
|
|
162
165
|
}, (error) => remaining > 0 && (remaining = 0, fail(error)));
|
|
163
166
|
} else require_control_flow.mt(renderer, branch), insert();
|
|
164
167
|
}
|
|
165
168
|
function loadFailed(scope, awaitCounter) {
|
|
166
169
|
return (error) => {
|
|
167
|
-
awaitCounter && (awaitCounter.m ? awaitCounter.i = 0 : awaitCounter.c()), require_control_flow
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
function _load_signal(load) {
|
|
171
|
-
let pending, signal;
|
|
172
|
-
return (scope, value) => {
|
|
173
|
-
pending ||= load(), scope.X || !("X" in scope) && scope.H === require_control_flow.rn ? (scope.X ||= /* @__PURE__ */ new Map()).set(pending, { a: value }) : signal ? signal(scope, value) : pending.then((mod) => require_control_flow.$t(scope, signal = mod._, value), () => 0);
|
|
170
|
+
awaitCounter && (awaitCounter.m ? awaitCounter.i = 0 : awaitCounter.c()), require_control_flow.en(scope, require_control_flow.g, error);
|
|
174
171
|
};
|
|
175
172
|
}
|
|
176
173
|
function _load_visible_trigger(selector, options) {
|
|
@@ -196,9 +193,9 @@ function _load_race_trigger(...triggers) {
|
|
|
196
193
|
function getSelectorOrResolve(selector, resolve) {
|
|
197
194
|
return document.querySelector(selector) || resolve();
|
|
198
195
|
}
|
|
199
|
-
exports.$signal = require_control_flow.
|
|
196
|
+
exports.$signal = require_control_flow.Jt, exports.$signalReset = require_control_flow.Yt, exports._assert_hoist = require_control_flow.ln, exports._assert_init = require_control_flow.Ht, exports._attr = require_control_flow.B, exports._attr_class = require_control_flow.V, exports._attr_class_item = require_control_flow.H, exports._attr_class_items = require_control_flow.U, exports._attr_content = require_control_flow.W, exports._attr_details_open = require_control_flow._, exports._attr_dialog_open = require_control_flow._, exports._attr_details_open_default = require_control_flow.v, exports._attr_dialog_open_default = require_control_flow.v, exports._attr_details_open_script = require_control_flow.y, exports._attr_dialog_open_script = require_control_flow.y, exports._attr_input_checked = require_control_flow.b, exports._attr_input_checkedValue = require_control_flow.x, exports._attr_input_checkedValue_default = require_control_flow.S, exports._attr_input_checkedValue_script = require_control_flow.C, exports._attr_input_checked_default = require_control_flow.w, exports._attr_input_checked_script = require_control_flow.T, exports._attr_input_value = require_control_flow.E, exports._attr_textarea_value = require_control_flow.E, exports._attr_input_value_attribute_default = require_control_flow.D, exports._attr_input_value_default = require_control_flow.O, exports._attr_textarea_value_default = require_control_flow.O, exports._attr_input_value_dynamic_default = require_control_flow.k, exports._attr_input_value_script = require_control_flow.A, exports._attr_textarea_value_script = require_control_flow.A, exports._attr_nonce = require_control_flow.G, exports._attr_select_value = require_control_flow.j, exports._attr_select_value_default = require_control_flow.M, exports._attr_select_value_script = require_control_flow.N, exports._attr_style = require_control_flow.K, exports._attr_style_item = require_control_flow.q, exports._attr_style_items = require_control_flow.J, exports._attrs = require_control_flow.Y, exports._attrs_content = require_control_flow.X, exports._attrs_partial = require_control_flow.Z, exports._attrs_partial_content = require_control_flow.Q, exports._attrs_script = require_control_flow.$, exports._await_content = require_control_flow.t, exports._await_promise = require_control_flow.n, exports._call = require_control_flow.un, exports._child_setup = require_control_flow.Ct, exports._closure = require_control_flow.wt, exports._closure_get = require_control_flow.Tt, exports._const = require_control_flow.Et, exports._content = require_control_flow.lt, exports._content_closures = require_control_flow.ut, exports._content_resume = require_control_flow.dt, exports._controllable_input = require_control_flow.P, exports._controllable_open = require_control_flow.F, exports._controllable_select = require_control_flow.I, exports._controllable_textarea = require_control_flow.L, Object.defineProperty(exports, "_dynamic_tag", {
|
|
200
197
|
enumerable: !0,
|
|
201
198
|
get: function() {
|
|
202
199
|
return require_control_flow.r;
|
|
203
200
|
}
|
|
204
|
-
}), exports._dynamic_tag_content = require_control_flow.i, exports._el = require_control_flow.ht, exports._el_read = require_control_flow.
|
|
201
|
+
}), exports._dynamic_tag_content = require_control_flow.i, exports._el = require_control_flow.ht, exports._el_read = require_control_flow.Dt, exports._for_closure = require_control_flow.Ot, exports._for_in = require_control_flow.a, exports._for_of = require_control_flow.o, exports._for_selector = require_control_flow.kt, exports._for_to = require_control_flow.s, exports._for_until = require_control_flow.c, exports._hoist = require_control_flow.At, exports._hoist_resume = require_control_flow.jt, exports._html = require_control_flow.et, exports._id = require_control_flow.Mt, exports._if = require_control_flow.l, exports._if_closure = require_control_flow.Nt, exports._let = require_control_flow.Pt, exports._let_change = require_control_flow.Ft, exports._lifecycle = require_control_flow.tt, exports._load_event_trigger = _load_event_trigger, exports._load_idle_trigger = _load_idle_trigger, exports._load_media_trigger = _load_media_trigger, exports._load_race_trigger = _load_race_trigger, exports._load_setup = _load_setup, exports._load_signal = _load_signal, exports._load_template = _load_template, exports._load_visible_trigger = _load_visible_trigger, exports._on = require_control_flow.qt, exports._or = require_control_flow.It, exports._resume = require_control_flow.gt, exports._resume_dynamic_tag = require_control_flow.u, exports._return = require_control_flow.Lt, exports._return_change = require_control_flow.Rt, exports._script = require_control_flow.zt, exports._show = require_control_flow.d, exports._style_rule_item = require_control_flow.nt, exports._style_shell = require_control_flow.rt, exports._template = _template, exports._text = require_control_flow.it, exports._text_content = require_control_flow.at, exports._to_text = require_control_flow.ot, exports._try = require_control_flow.f, exports._var = require_control_flow.Bt, exports._var_change = require_control_flow.Vt, exports._var_resume = require_control_flow._t, exports.attrTag = attrTag, exports.attrTags = attrTags, exports.compat = compat, exports.forIn = require_control_flow.an, exports.forOf = require_control_flow.on, exports.forTo = require_control_flow.sn, exports.forUntil = require_control_flow.cn, exports.init = require_control_flow.yt, exports.initEmbedded = require_control_flow.bt, exports.ready = require_control_flow.xt, exports.run = require_control_flow.nn;
|
package/dist/dom.mjs
CHANGED
|
@@ -64,8 +64,34 @@ let empty = [], rest = Symbol(), classIdToBranch = /* @__PURE__ */ new Map(), cl
|
|
|
64
64
|
}, _template = (id, template, walks, setup, inputSignal) => {
|
|
65
65
|
let renderer = _content(id, template, walks, setup, inputSignal)();
|
|
66
66
|
return renderer.mount = mount, renderer._ = renderer, _resume(id, renderer);
|
|
67
|
-
}
|
|
68
|
-
|
|
67
|
+
}, _load_template = /*@__PURE__*/ withLazy((id, load) => {
|
|
68
|
+
let pending, lazyTemplate = _template(id, 0, 0, (branch) => {
|
|
69
|
+
let awaitCounter = addAwaitCounter(branch);
|
|
70
|
+
branch.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((renderer) => {
|
|
71
|
+
Object.assign(lazyTemplate, renderer), queueAsyncRender(branch, (branch) => insertLoaded(renderer, branch, branch.S, awaitCounter));
|
|
72
|
+
}, loadFailed(branch, awaitCounter));
|
|
73
|
+
}, _load_signal(() => (pending ||= load()).then((r) => ({ _: r.d }))));
|
|
74
|
+
return lazyTemplate;
|
|
75
|
+
}), _load_setup = /*@__PURE__*/ withLazy((nodeAccessor, childScopeAccessor, load) => {
|
|
76
|
+
nodeAccessor = decodeAccessor(nodeAccessor), childScopeAccessor = decodeAccessor(childScopeAccessor);
|
|
77
|
+
let pending, renderer;
|
|
78
|
+
return (owner) => {
|
|
79
|
+
let child = owner[childScopeAccessor];
|
|
80
|
+
if (renderer) insertLoaded(renderer, child, owner[nodeAccessor]);
|
|
81
|
+
else {
|
|
82
|
+
let awaitCounter = addAwaitCounter(owner);
|
|
83
|
+
child.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((mod) => {
|
|
84
|
+
renderer = _content("", ...mod._)(), queueAsyncRender(child, (child) => insertLoaded(renderer, child, owner[nodeAccessor], awaitCounter));
|
|
85
|
+
}, loadFailed(child, awaitCounter));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}), _load_signal = /*@__PURE__*/ withLazy((load) => {
|
|
89
|
+
let pending, signal;
|
|
90
|
+
return (scope, value) => {
|
|
91
|
+
pending ||= load(), scope.X || !("X" in scope) && scope.H === runId ? (scope.X ||= /* @__PURE__ */ new Map()).set(pending, { a: value }) : signal ? signal(scope, value) : pending.then((mod) => queueAsyncRender(scope, signal = mod._, value), () => 0);
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
import { $ as _attrs_script, $t as prepareEffects, A as _attr_input_value_script, At as _hoist, B as _attr, Bt as _var, C as _attr_input_checkedValue_script, Ct as _child_setup, D as _attr_input_value_attribute_default, Dt as _el_read, E as _attr_input_value, Et as _const, F as _controllable_open, Ft as _let_change, G as _attr_nonce, Gt as removeAndDestroyBranch, H as _attr_class_item, Ht as _assert_init, I as _controllable_select, It as _or, J as _attr_style_items, Jt as $signal, K as _attr_style, Kt as syncGen, L as _controllable_textarea, Lt as _return, M as _attr_select_value_default, Mt as _id, N as _attr_select_value_script, Nt as _if_closure, O as _attr_input_value_default, Ot as _for_closure, P as _controllable_input, Pt as _let, Q as _attrs_partial_content, Rt as _return_change, S as _attr_input_checkedValue_default, St as withLazy, T as _attr_input_checked_script, Tt as _closure_get, U as _attr_class_items, Ut as destroyBranch, V as _attr_class, Vt as _var_change, W as _attr_content, Wt as insertBranchBefore, X as _attrs_content, Y as _attrs, Yt as $signalReset, Z as _attrs_partial, _ as _attr_details_or_dialog_open, _t as _var_resume, a as _for_in, an as forIn, at as _text_content, b as _attr_input_checked, bt as initEmbedded, c as _for_until, cn as forUntil, ct as toInsertNode, d as _show, dn as decodeAccessor, dt as _content_resume, en as queueAsyncRender, et as _html, f as _try, ft as createAndSetupBranch, g as renderCatch, gt as _resume, h as patchDynamicTag, ht as _el, i as _dynamic_tag_content, in as runId, it as _text, j as _attr_select_value, jt as _hoist_resume, k as _attr_input_value_dynamic_default, kt as _for_selector, l as _if, ln as _assert_hoist, lt as _content, mt as setupBranch, n as _await_promise, nn as run, nt as _style_rule_item, o as _for_of, on as forOf, ot as _to_text, p as addAwaitCounter, pt as createBranch, q as _attr_style_item, qt as _on, r as _dynamic_tag, rn as runEffects, rt as _style_shell, s as _for_to, sn as forTo, st as insertChildNodes, t as _await_content, tn as queueEffect, tt as _lifecycle, u as _resume_dynamic_tag, un as _call, ut as _content_closures, v as _attr_details_or_dialog_open_default, vt as getRegisteredWithScope, w as _attr_input_checked_default, wt as _closure, x as _attr_input_checkedValue, xt as ready, y as _attr_details_or_dialog_open_script, yt as init, zt as _script } from "./dom-CPUybM_C.mjs";
|
|
69
95
|
//#region src/common/attr-tag.ts
|
|
70
96
|
function attrTag(attrs) {
|
|
71
97
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
@@ -126,29 +152,6 @@ function mount(input = {}, reference, position) {
|
|
|
126
152
|
}
|
|
127
153
|
//#endregion
|
|
128
154
|
//#region src/dom/load.ts
|
|
129
|
-
function _load_template(id, load) {
|
|
130
|
-
let pending, lazyTemplate = _template(id, 0, 0, (branch) => {
|
|
131
|
-
let awaitCounter = addAwaitCounter(branch);
|
|
132
|
-
branch.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((renderer) => {
|
|
133
|
-
Object.assign(lazyTemplate, renderer), queueAsyncRender(branch, (branch) => insertLoaded(renderer, branch, branch.S, awaitCounter));
|
|
134
|
-
}, loadFailed(branch, awaitCounter));
|
|
135
|
-
}, _load_signal(() => (pending ||= load()).then((r) => ({ _: r.d }))));
|
|
136
|
-
return lazyTemplate;
|
|
137
|
-
}
|
|
138
|
-
function _load_setup(nodeAccessor, childScopeAccessor, load) {
|
|
139
|
-
nodeAccessor = decodeAccessor(nodeAccessor), childScopeAccessor = decodeAccessor(childScopeAccessor);
|
|
140
|
-
let pending, renderer;
|
|
141
|
-
return (owner) => {
|
|
142
|
-
let child = owner[childScopeAccessor];
|
|
143
|
-
if (renderer) insertLoaded(renderer, child, owner[nodeAccessor]);
|
|
144
|
-
else {
|
|
145
|
-
let awaitCounter = addAwaitCounter(owner);
|
|
146
|
-
child.X ||= /* @__PURE__ */ new Map(), (pending ||= load()).then((mod) => {
|
|
147
|
-
renderer = _content("", ...mod._)(), queueAsyncRender(child, (child) => insertLoaded(renderer, child, owner[nodeAccessor], awaitCounter));
|
|
148
|
-
}, loadFailed(child, awaitCounter));
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
155
|
function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
153
156
|
let parent = marker.parentNode, values = branch.X, insert = () => {
|
|
154
157
|
insertBranchBefore(branch, parent, marker), marker.remove(), awaitCounter?.c();
|
|
@@ -167,12 +170,6 @@ function loadFailed(scope, awaitCounter) {
|
|
|
167
170
|
awaitCounter && (awaitCounter.m ? awaitCounter.i = 0 : awaitCounter.c()), queueAsyncRender(scope, renderCatch, error);
|
|
168
171
|
};
|
|
169
172
|
}
|
|
170
|
-
function _load_signal(load) {
|
|
171
|
-
let pending, signal;
|
|
172
|
-
return (scope, value) => {
|
|
173
|
-
pending ||= load(), scope.X || !("X" in scope) && scope.H === runId ? (scope.X ||= /* @__PURE__ */ new Map()).set(pending, { a: value }) : signal ? signal(scope, value) : pending.then((mod) => queueAsyncRender(scope, signal = mod._, value), () => 0);
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
173
|
function _load_visible_trigger(selector, options) {
|
|
177
174
|
let pending, el;
|
|
178
175
|
return (load) => () => (pending ||= new Promise((resolve) => (el = getSelectorOrResolve(selector, resolve)) && new IntersectionObserver((entries, io) => entries.some((entry) => entry.isIntersecting) && resolve(io.disconnect()), options).observe(el))).then(load);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const WALKER_RUNTIME_CODE = "(e=>(self[e]||=(l,f=e+l,s=f.length,a={},d=[],t=document,n=t.createTreeWalker(t,129))=>t=self[e][l]={i:f,d:t,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(a[r=l.slice(s+1)]=e,l[s]),r,e),l>\"#\"&&d.push(e)}},self[e]))";
|
|
2
|
-
export declare const REORDER_RUNTIME_CODE = "(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),\"#\"==n?(t[a]=l).i++:\"!\"==n?e.l[a]&&t[a]&&(r=d.nextSibling,i=()=>t[a].c()):\"T\"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:e.l[a]?1:2,c(i=e.l[\"^\"+a]){if(--o.i)return 1;for(;(r=e.l[a].previousSibling||i)
|
|
2
|
+
export declare const REORDER_RUNTIME_CODE = "(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),\"#\"==n?(t[a]=l).i++:\"!\"==n?e.l[a]&&t[a]&&(r=d.nextSibling,i=()=>t[a].c()):\"T\"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:e.l[a]?1:2,c(i=e.l[\"^\"+a],f=d.cloneNode()){if(--o.i)return 1;for(;f.prepend(r=e.l[a].previousSibling||i),i!=r;);c(a,d)}}),(n=e.j[a])&&(g=l.c,l.c=()=>g()||n(e.r)))}})";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const WALKER_RUNTIME_CODE = "((runtimeId) => (self[runtimeId] ||= (\n renderId,\n prefix = runtimeId + renderId,\n prefixLen = prefix.length,\n lookup = {},\n visits = [],\n doc = document,\n walker = doc.createTreeWalker(\n doc,\n 129 /* NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_ELEMENT */,\n ),\n) =>\n doc = (self[runtimeId][renderId] = {\n i: prefix,\n d: doc,\n l: lookup,\n v: visits,\n x() {},\n w(node, op, id) {\n while ((node = walker.nextNode())) {\n doc.x(\n (op =\n (op = node.data) &&\n !op.indexOf(prefix) &&\n ((lookup[(id = op.slice(prefixLen + 1))] = node), op[prefixLen])),\n id,\n node,\n );\n\n if (op > \"#\") {\n visits.push(node);\n }\n }\n },\n })\n, self[runtimeId]))";
|
|
2
|
-
export declare const REORDER_RUNTIME_CODE = "((runtime) => {\n if (runtime.j) return;\n let onNextSibling,\n placeholder,\n nextSibling,\n placeholders = runtime.p = {},\n replace = (id, container) => runtime.l[id].replaceWith(...container.childNodes);\n runtime.j = {};\n runtime.x = (op, id, node, placeholderRoot, placeholderCb) => {\n if (node == nextSibling) {\n onNextSibling();\n }\n\n if (op == \"#\") {\n (placeholders[id] = placeholder).i++;\n } else if (op == \"!\") {\n if (runtime.l[id] && placeholders[id]) {\n nextSibling = node.nextSibling;\n onNextSibling = () => placeholders[id].c();\n }\n } else if (node.tagName == \"T\" && (id = node.getAttribute(runtime.i))) {\n nextSibling = node.nextSibling;\n onNextSibling = () => {\n node.remove();\n placeholderRoot || replace(id, node);\n placeholder.c();\n };\n placeholder =\n placeholders[id] ||\n (placeholderRoot = placeholders[id] =\n {\n i: runtime.l[id] ? 1 : 2,\n c(start = runtime.l[\"^\" + id]) {\n if (--placeholderRoot.i) return 1;\n for (\n ;\n (nextSibling
|
|
2
|
+
export declare const REORDER_RUNTIME_CODE = "((runtime) => {\n if (runtime.j) return;\n let onNextSibling,\n placeholder,\n nextSibling,\n placeholders = runtime.p = {},\n replace = (id, container) => runtime.l[id].replaceWith(...container.childNodes);\n runtime.j = {};\n runtime.x = (op, id, node, placeholderRoot, placeholderCb) => {\n if (node == nextSibling) {\n onNextSibling();\n }\n\n if (op == \"#\") {\n (placeholders[id] = placeholder).i++;\n } else if (op == \"!\") {\n if (runtime.l[id] && placeholders[id]) {\n nextSibling = node.nextSibling;\n onNextSibling = () => placeholders[id].c();\n }\n } else if (node.tagName == \"T\" && (id = node.getAttribute(runtime.i))) {\n nextSibling = node.nextSibling;\n onNextSibling = () => {\n node.remove();\n placeholderRoot || replace(id, node);\n placeholder.c();\n };\n placeholder =\n placeholders[id] ||\n (placeholderRoot = placeholders[id] =\n {\n i: runtime.l[id] ? 1 : 2,\n // Resume may still walk markers inside the dropped placeholder, so\n // park it in any detached parent (a bare <t> clone is the cheapest).\n c(start = runtime.l[\"^\" + id], removed = node.cloneNode()) {\n if (--placeholderRoot.i) return 1;\n for (\n ;\n removed.prepend(\n (nextSibling = runtime.l[id].previousSibling || start),\n ),\n start != nextSibling;\n\n );\n replace(id, node);\n },\n });\n // repurpose \"op\" for callbacks ...carefully\n if ((op = runtime.j[id])) {\n placeholderCb = placeholder.c;\n placeholder.c = () => placeholderCb() || op(runtime.r);\n }\n }\n };\n})";
|
package/dist/html.js
CHANGED
|
@@ -1732,7 +1732,7 @@ var State = class {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
reorderedChunk.async = !1;
|
|
1734
1734
|
}
|
|
1735
|
-
needsWalk = !0, state.hasReorderRuntime || (state.hasReorderRuntime = !0, scripts = concatScripts(scripts, "(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),\"#\"==n?(t[a]=l).i++:\"!\"==n?e.l[a]&&t[a]&&(r=d.nextSibling,i=()=>t[a].c()):\"T\"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:e.l[a]?1:2,c(i=e.l[\"^\"+a]){if(--o.i)return 1;for(;(r=e.l[a].previousSibling||i)
|
|
1735
|
+
needsWalk = !0, state.hasReorderRuntime || (state.hasReorderRuntime = !0, scripts = concatScripts(scripts, "(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),\"#\"==n?(t[a]=l).i++:\"!\"==n?e.l[a]&&t[a]&&(r=d.nextSibling,i=()=>t[a].c()):\"T\"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:e.l[a]?1:2,c(i=e.l[\"^\"+a],f=d.cloneNode()){if(--o.i)return 1;for(;f.prepend(r=e.l[a].previousSibling||i),i!=r;);c(a,d)}}),(n=e.j[a])&&(g=l.c,l.c=()=>g()||n(e.r)))}})(" + runtimePrefix + ")"));
|
|
1736
1736
|
let { reorderId } = reorderedChunk, readyReservations = [], reorderHTML = "", reorderEffects = "", reorderScripts = "", cur = reorderedChunk;
|
|
1737
1737
|
for (reorderedChunk.reorderId = null;;) {
|
|
1738
1738
|
cur.flushPlaceholder(), cur.deferOwnReady();
|
package/dist/html.mjs
CHANGED
|
@@ -1731,7 +1731,7 @@ var State = class {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
reorderedChunk.async = !1;
|
|
1733
1733
|
}
|
|
1734
|
-
needsWalk = !0, state.hasReorderRuntime || (state.hasReorderRuntime = !0, scripts = concatScripts(scripts, "(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),\"#\"==n?(t[a]=l).i++:\"!\"==n?e.l[a]&&t[a]&&(r=d.nextSibling,i=()=>t[a].c()):\"T\"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:e.l[a]?1:2,c(i=e.l[\"^\"+a]){if(--o.i)return 1;for(;(r=e.l[a].previousSibling||i)
|
|
1734
|
+
needsWalk = !0, state.hasReorderRuntime || (state.hasReorderRuntime = !0, scripts = concatScripts(scripts, "(e=>{if(e.j)return;let i,l,r,t=e.p={},c=(i,l)=>e.l[i].replaceWith(...l.childNodes);e.j={},e.x=(n,a,d,o,g)=>{d==r&&i(),\"#\"==n?(t[a]=l).i++:\"!\"==n?e.l[a]&&t[a]&&(r=d.nextSibling,i=()=>t[a].c()):\"T\"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=()=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:e.l[a]?1:2,c(i=e.l[\"^\"+a],f=d.cloneNode()){if(--o.i)return 1;for(;f.prepend(r=e.l[a].previousSibling||i),i!=r;);c(a,d)}}),(n=e.j[a])&&(g=l.c,l.c=()=>g()||n(e.r)))}})(" + runtimePrefix + ")"));
|
|
1735
1735
|
let { reorderId } = reorderedChunk, readyReservations = [], reorderHTML = "", reorderEffects = "", reorderScripts = "", cur = reorderedChunk;
|
|
1736
1736
|
for (reorderedChunk.reorderId = null;;) {
|
|
1737
1737
|
cur.flushPlaceholder(), cur.deferOwnReady();
|
package/dist/translator/index.js
CHANGED
|
@@ -3660,7 +3660,7 @@ function writeHTMLResumeStatements(path) {
|
|
|
3660
3660
|
}
|
|
3661
3661
|
body.push(_marko_compiler.types.expressionStatement(getExprIfSerialized(section, sectionSerializeReason, writeScopeBuilder ? writeScopeBuilder(callRuntime("_scope", ...writeScopeArgs)) : callRuntime("_scope", ...writeScopeArgs))));
|
|
3662
3662
|
}
|
|
3663
|
-
if (!section.isBranch && (section.hasAbortSignal || !!section.referencedClosures || !!find(section.bindings, (binding) => binding.type === 1))) body.push(_marko_compiler.types.expressionStatement(callRuntime("_resume_branch", scopeIdIdentifier)));
|
|
3663
|
+
if (!section.isBranch && (section.hasAbortSignal || !!section.referencedClosures || sectionSerializeReason && !!find(section.bindings, (binding) => binding.type === 1))) body.push(_marko_compiler.types.expressionStatement(callRuntime("_resume_branch", scopeIdIdentifier)));
|
|
3664
3664
|
const additionalStatements = getHTMLSectionStatements(section);
|
|
3665
3665
|
if (body.length || additionalStatements.length) body.unshift(_marko_compiler.types.variableDeclaration("const", [_marko_compiler.types.variableDeclarator(scopeIdIdentifier, callRuntime("_scope_id"))]), ...additionalStatements);
|
|
3666
3666
|
if (debug) forEach(section.bindings, (binding) => {
|
|
@@ -4127,7 +4127,12 @@ var dom_default = { translate: {
|
|
|
4127
4127
|
program.node.body.unshift(_marko_compiler.types.exportNamedDeclaration(_marko_compiler.types.variableDeclaration("const", [_marko_compiler.types.variableDeclarator(templateIdentifier, writes || _marko_compiler.types.stringLiteral(""))])), _marko_compiler.types.exportNamedDeclaration(_marko_compiler.types.variableDeclaration("const", [_marko_compiler.types.variableDeclarator(walksIdentifier, walks || _marko_compiler.types.stringLiteral(""))])));
|
|
4128
4128
|
if (extraDecls) program.node.body.unshift(_marko_compiler.types.variableDeclaration("const", extraDecls));
|
|
4129
4129
|
writeModuleRegistrations(program);
|
|
4130
|
-
program.node.body.push(_marko_compiler.types.exportDefaultDeclaration(callRuntime("_template", _marko_compiler.types.stringLiteral(program.hub.file.metadata.marko.id),
|
|
4130
|
+
program.node.body.push(_marko_compiler.types.exportDefaultDeclaration(callRuntime("_template", _marko_compiler.types.stringLiteral(program.hub.file.metadata.marko.id), ...replaceNullishAndEmptyFunctionsWith0([
|
|
4131
|
+
templateIdentifier,
|
|
4132
|
+
walksIdentifier,
|
|
4133
|
+
domExports.setupEmpty ? void 0 : setupIdentifier,
|
|
4134
|
+
programInputSignal?.identifier
|
|
4135
|
+
]))));
|
|
4131
4136
|
}
|
|
4132
4137
|
} };
|
|
4133
4138
|
//#endregion
|
|
@@ -7439,6 +7444,7 @@ function finalizeReferences() {
|
|
|
7439
7444
|
}
|
|
7440
7445
|
}
|
|
7441
7446
|
}
|
|
7447
|
+
const bindingNamesBySection = /* @__PURE__ */ new Map();
|
|
7442
7448
|
for (const binding of bindings) {
|
|
7443
7449
|
if (binding.type !== 0) {
|
|
7444
7450
|
if (pruneBinding(binding)) bindings.delete(binding);
|
|
@@ -7469,7 +7475,12 @@ function finalizeReferences() {
|
|
|
7469
7475
|
setReadsOwner(assignedSection, section);
|
|
7470
7476
|
addOwnerSerializeReason(assignedSection, section, true);
|
|
7471
7477
|
});
|
|
7472
|
-
|
|
7478
|
+
let bindingNames = bindingNamesBySection.get(section);
|
|
7479
|
+
if (!bindingNames) {
|
|
7480
|
+
bindingNamesBySection.set(section, bindingNames = /* @__PURE__ */ new Set());
|
|
7481
|
+
forEach(section.bindings, ({ name }) => bindingNames.add(name));
|
|
7482
|
+
}
|
|
7483
|
+
if (bindingNames.has(binding.name)) binding.name = generateUid(name);
|
|
7473
7484
|
}
|
|
7474
7485
|
if (binding.hoists) {
|
|
7475
7486
|
let highestHoistSection;
|
|
@@ -7485,7 +7496,9 @@ function finalizeReferences() {
|
|
|
7485
7496
|
currentSection = currentSection.parent;
|
|
7486
7497
|
}
|
|
7487
7498
|
}
|
|
7488
|
-
|
|
7499
|
+
const canonicalBinding = getCanonicalBinding(binding);
|
|
7500
|
+
section.bindings = bindingUtil.add(section.bindings, canonicalBinding);
|
|
7501
|
+
bindingNamesBySection.get(section)?.add(canonicalBinding.name);
|
|
7489
7502
|
for (const exprExtra of binding.reads) {
|
|
7490
7503
|
const { isEffect, section } = exprExtra;
|
|
7491
7504
|
if (section.depth > binding.section.depth) {
|
|
@@ -7590,30 +7603,32 @@ function finalizeReferences() {
|
|
|
7590
7603
|
forEachSection((section) => {
|
|
7591
7604
|
const { id, bindings } = section;
|
|
7592
7605
|
const isOwnedBinding = ({ section }) => section.id === id;
|
|
7606
|
+
const ownedBindings = filter(bindings, isOwnedBinding);
|
|
7593
7607
|
const intersections = (intersectionsBySection.get(section) || []).filter((intersection) => {
|
|
7594
7608
|
const collapseSource = getCollapsibleIntersectionSource(intersection, section);
|
|
7595
7609
|
if (collapseSource) collapsedIntersectionSource.set(intersection, collapseSource);
|
|
7596
7610
|
return !collapseSource;
|
|
7597
7611
|
});
|
|
7612
|
+
let anchors;
|
|
7598
7613
|
if (intersections.length) {
|
|
7599
|
-
const anchors = /* @__PURE__ */ new Map();
|
|
7614
|
+
const sectionAnchors = anchors = /* @__PURE__ */ new Map();
|
|
7600
7615
|
for (const intersection of intersections) for (let i = intersection.length; i--;) if (isOwnedBinding(intersection[i])) {
|
|
7601
|
-
|
|
7616
|
+
sectionAnchors.set(intersection, intersection[i]);
|
|
7602
7617
|
break;
|
|
7603
7618
|
}
|
|
7604
7619
|
intersections.sort((a, b) => {
|
|
7605
|
-
const aAnchor =
|
|
7606
|
-
const bAnchor =
|
|
7620
|
+
const aAnchor = sectionAnchors.get(a);
|
|
7621
|
+
const bAnchor = sectionAnchors.get(b);
|
|
7607
7622
|
return aAnchor ? bAnchor ? bindingUtil.compare(aAnchor, bAnchor) : -1 : bAnchor ? 1 : 0;
|
|
7608
7623
|
});
|
|
7609
7624
|
}
|
|
7610
7625
|
let intersectionIndex = 0;
|
|
7611
7626
|
let nextId = 0;
|
|
7612
7627
|
let intersection;
|
|
7613
|
-
forEach(
|
|
7628
|
+
forEach(ownedBindings, (binding) => {
|
|
7614
7629
|
binding.id = nextId++;
|
|
7615
7630
|
nextId += binding.reserveSize;
|
|
7616
|
-
while (intersectionIndex < intersections.length && (intersection = intersections[intersectionIndex])
|
|
7631
|
+
while (intersectionIndex < intersections.length && anchors.get(intersection = intersections[intersectionIndex]) === binding) {
|
|
7617
7632
|
intersectionIndex++;
|
|
7618
7633
|
intersectionMeta.set(intersection, {
|
|
7619
7634
|
id: nextId++,
|
|
@@ -7629,7 +7644,7 @@ function finalizeReferences() {
|
|
|
7629
7644
|
scopeOffset: getMaxOwnSourceOffset(intersection, section)
|
|
7630
7645
|
});
|
|
7631
7646
|
}
|
|
7632
|
-
forEach(
|
|
7647
|
+
forEach(ownedBindings, (binding) => {
|
|
7633
7648
|
if (binding.closureSections) closureAccessorIds.set(binding, nextId++);
|
|
7634
7649
|
});
|
|
7635
7650
|
});
|
|
@@ -8033,7 +8048,7 @@ function pruneBinding(binding) {
|
|
|
8033
8048
|
while (upstream && !upstream.reads.has(read)) upstream = upstream.upstreamAlias;
|
|
8034
8049
|
if (upstream) binding.reads.delete(read);
|
|
8035
8050
|
}
|
|
8036
|
-
let shouldPrune = !binding.reads.size;
|
|
8051
|
+
let shouldPrune = !binding.reads.size && !binding.reserveSize;
|
|
8037
8052
|
for (const alias of binding.aliases) if (pruneBinding(alias)) binding.aliases.delete(alias);
|
|
8038
8053
|
else if (alias.type !== 6) shouldPrune = false;
|
|
8039
8054
|
for (const [key, alias] of binding.propertyAliases) if (pruneBinding(alias)) binding.propertyAliases.delete(key);
|
|
@@ -10352,9 +10367,9 @@ var dynamic_tag_default = {
|
|
|
10352
10367
|
analyze: { enter(tag) {
|
|
10353
10368
|
(0, _marko_compiler_babel_utils.assertAttributesOrArgs)(tag);
|
|
10354
10369
|
const { node } = tag;
|
|
10355
|
-
addSetupStatement(getOrCreateSection(tag));
|
|
10356
10370
|
const definedBodySection = node.extra?.defineBodySection;
|
|
10357
10371
|
if (definedBodySection) {
|
|
10372
|
+
addSetupStatement(getOrCreateSection(tag));
|
|
10358
10373
|
knownTagAnalyze(tag, definedBodySection, definedBodySection.params && getBindingPropTree(definedBodySection.params));
|
|
10359
10374
|
child(tag, getStaticTagName(tag.node), {
|
|
10360
10375
|
kind: SectionRef,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marko",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.38",
|
|
4
4
|
"description": "Optimized runtime for Marko templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"magic-string": "^0.30.21"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"marko": "
|
|
58
|
-
"
|
|
57
|
+
"@marko/runtime-tags": "npm:marko@6.3.38",
|
|
58
|
+
"marko": "5.39.34"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=22"
|