marko 6.3.46 → 6.3.48
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/cheatsheet.md +19 -16
- package/dist/common/accessor.d.ts +0 -3
- package/dist/common/accessor.debug.d.ts +0 -3
- package/dist/common/constants/resume-symbol.d.ts +5 -2
- package/dist/common/helpers.d.ts +2 -0
- 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/placeholder.feat.js +1 -1
- package/dist/debug/dom/placeholder.feat.mjs +1 -1
- package/dist/debug/{dom-WyMgkHne.js → dom-CA_HiiES.js} +23 -8
- package/dist/debug/{dom-CIt3_Sdm.mjs → dom-DBMLPLeE.mjs} +18 -9
- package/dist/debug/dom.js +20 -24
- package/dist/debug/dom.mjs +20 -24
- package/dist/debug/html.js +19 -5
- package/dist/debug/html.mjs +18 -5
- package/dist/dom/catch.feat.js +1 -1
- 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/dom.d.ts +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/placeholder.feat.js +1 -1
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/{dom-R3sALHJt.js → dom-BfydlrCq.js} +27 -23
- package/dist/{dom-DN6BTUmH.mjs → dom-UwNQ-AXt.mjs} +12 -13
- package/dist/dom.js +20 -20
- package/dist/dom.mjs +14 -14
- package/dist/html/writer.d.ts +2 -1
- package/dist/html.d.ts +1 -1
- package/dist/html.js +16 -5
- package/dist/html.mjs +16 -5
- package/dist/translator/index.js +11 -19
- package/dist/translator/visitors/constants/sibling-text.d.ts +0 -1
- package/package.json +3 -3
- package/dist/common/constants/load-signal-value.d.ts +0 -5
- package/dist/common/constants/load-signal-value.debug.d.ts +0 -5
package/dist/debug/dom.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as _attrs_script, $t as $signal, A as _attr_input_value_script, At as _for_closure, B as _attr, Bt as _return, C as _attr_input_checkedValue_script, D as _attr_input_value_attribute_default,
|
|
1
|
+
import { $ as _attrs_script, $t as $signal, A as _attr_input_value_script, At as _for_closure, B as _attr, Bt as _return, C as _attr_input_checkedValue_script, D as _attr_input_value_attribute_default, Dt as _closure_get, E as _attr_input_value, En as EndNode, Et as _closure, F as _controllable_open, Fn as TagVariable, Ft as _id, G as _attr_nonce, Gt as _assert_init, H as _attr_class_item, Ht as _script, I as _controllable_select, It as _if_closure, J as _attr_style_items, Jt as removeAndDestroyBranch, K as _attr_style, Kt as destroyBranch, L as _controllable_textarea, Lt as _let, M as _attr_select_value_default, Mt as _global_read, N as _attr_select_value_script, Nt as _hoist, O as _attr_input_value_default, On as Global, Ot as _const, P as _controllable_input, Pn as StartNode, Pt as _hoist_resume, Q as _attrs_partial_content, Rt as _let_change, S as _attr_input_checkedValue_default, St as readyFailed, T as _attr_input_checked_script, Tt as _child_setup, U as _attr_class_items, Ut as _var, V as _attr_class, Vt as _return_change, W as _attr_content, Wt as _var_change, X as _attrs_content, Xt as _on, Y as _attrs, Yt as syncGen, Z as _attrs_partial, _ as _attr_details_or_dialog_open, _n as _call, _t as _var_resume, a as _for_in, an as queueAsyncRender, at as _text_content, b as _attr_input_checked, bn as Params, bt as initEmbedded, c as _for_until, cn as run, ct as toInsertNode, d as _show, dn as forIn, dt as _content_resume, en as $signalReset, et as _html, f as _try, fn as forOf, ft as createAndSetupBranch, g as renderCatch, gn as _hoist_read_error, gt as _resume, h as patchDynamicTag, hn as _assert_hoist, ht as _el, i as _dynamic_tag_content, in as prepareEffects, it as _text, j as _attr_select_value, jt as _for_selector, k as _attr_input_value_dynamic_default, kn as Load, kt as _el_read, l as _if, ln as runEffects, lt as _content, mn as forUntil, mt as setupBranch, n as _await_promise, nt as _style_rule_item, o as _for_of, on as queueEffect, ot as _to_text, p as addAwaitCounter, pn as forTo, pt as createBranch, q as _attr_style_item, qt as insertBranchBefore, r as _dynamic_tag, rt as _style_shell, s as _for_to, sn as queueRender, st as insertChildNodes, t as _await_content, tt as _lifecycle, u as _resume_dynamic_tag, un as runId, ut as _content_closures, v as _attr_details_or_dialog_open_default, vn as Clone, vt as getRegisteredWithScope, w as _attr_input_checked_default, wt as withLazy, x as _attr_input_checkedValue, xn as Setup, xt as ready, y as _attr_details_or_dialog_open_script, yn as Owner, yt as init, zt as _or } from "./dom-DBMLPLeE.mjs";
|
|
2
2
|
//#region src/common/attr-tag.ts
|
|
3
3
|
const empty = [];
|
|
4
4
|
const rest = Symbol("Attribute Tag");
|
|
@@ -20,10 +20,6 @@ function* attrTagIterator() {
|
|
|
20
20
|
yield* this[rest];
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
|
-
//#region src/common/constants/load-signal-value.debug.ts
|
|
24
|
-
const Value = "value";
|
|
25
|
-
const Signal = "signal";
|
|
26
|
-
//#endregion
|
|
27
23
|
//#region src/common/compat-meta.ts
|
|
28
24
|
const SET_SCOPE_REGISTER_ID = "$compat_setScope";
|
|
29
25
|
const RENDER_BODY_ID = "$compat_renderBody";
|
|
@@ -211,9 +207,10 @@ const _load_template = /*@__PURE__*/ withLazy((id, load) => {
|
|
|
211
207
|
const _load_setup = /*@__PURE__*/ withLazy((nodeAccessor, childScopeAccessor, load) => {
|
|
212
208
|
let pending;
|
|
213
209
|
let renderer;
|
|
210
|
+
const insertCached = (child, marker) => insertLoaded(renderer, child, marker);
|
|
214
211
|
return (owner) => {
|
|
215
212
|
const child = owner[childScopeAccessor];
|
|
216
|
-
if (renderer)
|
|
213
|
+
if (renderer) queueRender(child, insertCached, -1, owner[nodeAccessor]);
|
|
217
214
|
else {
|
|
218
215
|
const awaitCounter = addAwaitCounter(owner);
|
|
219
216
|
child[Load] ||= /* @__PURE__ */ new Map();
|
|
@@ -225,27 +222,26 @@ const _load_setup = /*@__PURE__*/ withLazy((nodeAccessor, childScopeAccessor, lo
|
|
|
225
222
|
};
|
|
226
223
|
});
|
|
227
224
|
function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
228
|
-
const parent = marker.parentNode, values = branch[Load],
|
|
225
|
+
const parent = marker.parentNode, values = branch[Load], clone = () => {
|
|
226
|
+
syncGen(branch);
|
|
227
|
+
renderer[Clone](branch, parent.namespaceURI);
|
|
228
|
+
branch[Load] = 0;
|
|
229
|
+
}, insert = () => {
|
|
229
230
|
insertBranchBefore(branch, parent, marker);
|
|
230
231
|
marker.remove();
|
|
231
232
|
awaitCounter?.c();
|
|
232
233
|
};
|
|
233
234
|
let remaining;
|
|
234
|
-
syncGen(branch);
|
|
235
|
-
renderer[Clone](branch, parent.namespaceURI);
|
|
236
|
-
branch[Load] = 0;
|
|
237
235
|
if (remaining = values?.size) {
|
|
238
236
|
const fail = loadFailed(branch, awaitCounter);
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
insert();
|
|
246
|
-
});
|
|
247
|
-
}, (error) => remaining > 0 && (remaining = 0, fail(error)));
|
|
237
|
+
values.forEach(([, apply], promise) => promise.then((mod) => (apply._ = mod._) && !--remaining && queueAsyncRender(branch, (branch) => {
|
|
238
|
+
clone();
|
|
239
|
+
renderer["setup"]?.(branch);
|
|
240
|
+
values.forEach(([value, apply]) => apply(branch, value));
|
|
241
|
+
insert();
|
|
242
|
+
}), (error) => remaining > 0 && (remaining = 0, fail(error))));
|
|
248
243
|
} else {
|
|
244
|
+
clone();
|
|
249
245
|
setupBranch(renderer, branch);
|
|
250
246
|
insert();
|
|
251
247
|
}
|
|
@@ -259,13 +255,13 @@ function loadFailed(scope, awaitCounter) {
|
|
|
259
255
|
}
|
|
260
256
|
const _load_signal = /*@__PURE__*/ withLazy((load) => {
|
|
261
257
|
let pending;
|
|
262
|
-
|
|
263
|
-
return (scope, value) => {
|
|
258
|
+
const apply = (scope, value) => {
|
|
264
259
|
pending ||= load();
|
|
265
|
-
if (scope["#Load"] || !("#Load" in scope) && scope["#Gen"] === runId) (scope[Load] ||= /* @__PURE__ */ new Map()).set(pending,
|
|
266
|
-
else if (
|
|
267
|
-
else pending.then((mod) => queueAsyncRender(scope,
|
|
260
|
+
if (scope["#Load"] || !("#Load" in scope) && scope["#Gen"] === runId) (scope[Load] ||= /* @__PURE__ */ new Map()).set(pending, [value, apply]);
|
|
261
|
+
else if (apply._) apply._(scope, value);
|
|
262
|
+
else pending.then((mod) => queueAsyncRender(scope, apply._ = mod._, value), () => 0);
|
|
268
263
|
};
|
|
264
|
+
return apply;
|
|
269
265
|
});
|
|
270
266
|
function _load_visible_trigger(selector, options) {
|
|
271
267
|
let pending;
|
package/dist/debug/html.js
CHANGED
|
@@ -2022,10 +2022,23 @@ function _el_resume(scopeId, accessor, shouldResume) {
|
|
|
2022
2022
|
if (shouldResume === 0) return "";
|
|
2023
2023
|
const { state } = $chunk.boundary;
|
|
2024
2024
|
state.needsMainRuntime = true;
|
|
2025
|
-
return state.mark("
|
|
2025
|
+
return state.mark("$", scopeId + " " + accessor);
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2028
|
-
return
|
|
2027
|
+
function _text_resume(scopeId, accessor, val, shouldResume) {
|
|
2028
|
+
return markText(scopeId, accessor, _escape(val), shouldResume);
|
|
2029
|
+
}
|
|
2030
|
+
function _html_resume(scopeId, accessor, val, shouldResume) {
|
|
2031
|
+
const html = _unescaped(val);
|
|
2032
|
+
if (shouldResume === 0 || !~html.indexOf("<")) return markText(scopeId, accessor, html, shouldResume);
|
|
2033
|
+
const { state } = $chunk.boundary;
|
|
2034
|
+
state.needsMainRuntime = true;
|
|
2035
|
+
return state.mark("&", "") + html + state.mark("'", scopeId + " " + accessor);
|
|
2036
|
+
}
|
|
2037
|
+
function markText(scopeId, accessor, text, shouldResume) {
|
|
2038
|
+
if (shouldResume === 0) return text;
|
|
2039
|
+
const { state } = $chunk.boundary;
|
|
2040
|
+
state.needsMainRuntime = true;
|
|
2041
|
+
return text ? (shouldResume === 2 ? "<!>" : "") + text + state.mark("$", scopeId + " " + accessor) : state.mark("%", scopeId + " " + accessor);
|
|
2029
2042
|
}
|
|
2030
2043
|
function _resume_branch(scopeId) {
|
|
2031
2044
|
const branchId = $chunk.context?.[kBranchId];
|
|
@@ -3111,7 +3124,7 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
|
|
|
3111
3124
|
writeScope(branchId, { [Renderer]: renderer });
|
|
3112
3125
|
_script(branchId, DYNAMIC_TAG_SCRIPT_REGISTER_ID);
|
|
3113
3126
|
}
|
|
3114
|
-
if (shouldResume || needsScript) _html(state.mark("
|
|
3127
|
+
if (shouldResume || needsScript) _html(state.mark("(", scopeId + " " + accessor + " " + branchId));
|
|
3115
3128
|
};
|
|
3116
3129
|
renderNative();
|
|
3117
3130
|
result = _el(branchId, DYNAMIC_TAG_VAR_REGISTER_ID);
|
|
@@ -3696,6 +3709,7 @@ exports._for_until = _for_until;
|
|
|
3696
3709
|
exports._hoist = _hoist;
|
|
3697
3710
|
exports._hoist_read_error = _hoist_read_error;
|
|
3698
3711
|
exports._html = _html;
|
|
3712
|
+
exports._html_resume = _html_resume;
|
|
3699
3713
|
exports._id = _id;
|
|
3700
3714
|
exports._if = _if;
|
|
3701
3715
|
exports._peek_scope_id = _peek_scope_id;
|
|
@@ -3712,7 +3726,6 @@ exports._scope_id = _scope_id;
|
|
|
3712
3726
|
exports._scope_reason = _scope_reason;
|
|
3713
3727
|
exports._scope_with_id = _scope_with_id;
|
|
3714
3728
|
exports._script = _script;
|
|
3715
|
-
exports._sep = _sep;
|
|
3716
3729
|
exports._serialize_guard = _serialize_guard;
|
|
3717
3730
|
exports._serialize_if = _serialize_if;
|
|
3718
3731
|
exports._set_serialize_reason = _set_serialize_reason;
|
|
@@ -3721,6 +3734,7 @@ exports._show_start = _show_start;
|
|
|
3721
3734
|
exports._style_html = _style_html;
|
|
3722
3735
|
exports._subscribe = _subscribe;
|
|
3723
3736
|
exports._template = _template;
|
|
3737
|
+
exports._text_resume = _text_resume;
|
|
3724
3738
|
exports._textarea_value = _textarea_value;
|
|
3725
3739
|
exports._to_text = _to_text;
|
|
3726
3740
|
exports._trailers = _trailers;
|
package/dist/debug/html.mjs
CHANGED
|
@@ -2020,10 +2020,23 @@ function _el_resume(scopeId, accessor, shouldResume) {
|
|
|
2020
2020
|
if (shouldResume === 0) return "";
|
|
2021
2021
|
const { state } = $chunk.boundary;
|
|
2022
2022
|
state.needsMainRuntime = true;
|
|
2023
|
-
return state.mark("
|
|
2023
|
+
return state.mark("$", scopeId + " " + accessor);
|
|
2024
2024
|
}
|
|
2025
|
-
function
|
|
2026
|
-
return
|
|
2025
|
+
function _text_resume(scopeId, accessor, val, shouldResume) {
|
|
2026
|
+
return markText(scopeId, accessor, _escape(val), shouldResume);
|
|
2027
|
+
}
|
|
2028
|
+
function _html_resume(scopeId, accessor, val, shouldResume) {
|
|
2029
|
+
const html = _unescaped(val);
|
|
2030
|
+
if (shouldResume === 0 || !~html.indexOf("<")) return markText(scopeId, accessor, html, shouldResume);
|
|
2031
|
+
const { state } = $chunk.boundary;
|
|
2032
|
+
state.needsMainRuntime = true;
|
|
2033
|
+
return state.mark("&", "") + html + state.mark("'", scopeId + " " + accessor);
|
|
2034
|
+
}
|
|
2035
|
+
function markText(scopeId, accessor, text, shouldResume) {
|
|
2036
|
+
if (shouldResume === 0) return text;
|
|
2037
|
+
const { state } = $chunk.boundary;
|
|
2038
|
+
state.needsMainRuntime = true;
|
|
2039
|
+
return text ? (shouldResume === 2 ? "<!>" : "") + text + state.mark("$", scopeId + " " + accessor) : state.mark("%", scopeId + " " + accessor);
|
|
2027
2040
|
}
|
|
2028
2041
|
function _resume_branch(scopeId) {
|
|
2029
2042
|
const branchId = $chunk.context?.[kBranchId];
|
|
@@ -3109,7 +3122,7 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
|
|
|
3109
3122
|
writeScope(branchId, { [Renderer]: renderer });
|
|
3110
3123
|
_script(branchId, DYNAMIC_TAG_SCRIPT_REGISTER_ID);
|
|
3111
3124
|
}
|
|
3112
|
-
if (shouldResume || needsScript) _html(state.mark("
|
|
3125
|
+
if (shouldResume || needsScript) _html(state.mark("(", scopeId + " " + accessor + " " + branchId));
|
|
3113
3126
|
};
|
|
3114
3127
|
renderNative();
|
|
3115
3128
|
result = _el(branchId, DYNAMIC_TAG_VAR_REGISTER_ID);
|
|
@@ -3646,4 +3659,4 @@ function drainClassFunctions($global, writeScope) {
|
|
|
3646
3659
|
}
|
|
3647
3660
|
function NOOP() {}
|
|
3648
3661
|
//#endregion
|
|
3649
|
-
export { $global, _assert_hoist, _attr, _attr_and, _attr_class, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_input_checked, _attr_input_checkedValue, _attr_input_value, _attr_nonce, _attr_nullish, _attr_option_value, _attr_or, _attr_select_value, _attr_style, _attr_textarea_value, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _await, _content, _content_resume, _dynamic_tag, _el, _el_read_error, _el_resume, _escape, _escape_comment, _escape_script, _escape_style, _escape_style_value, _existing_scope, _flush_head, _for_in, _for_of, _for_to, _for_until, _hoist, _hoist_read_error, _html, _id, _if, _peek_scope_id, _resume, _resume_branch, _resume_locals, writeScope as _scope, _scope_id, _scope_reason, _scope_with_id, _script,
|
|
3662
|
+
export { $global, _assert_hoist, _attr, _attr_and, _attr_class, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_input_checked, _attr_input_checkedValue, _attr_input_value, _attr_nonce, _attr_nullish, _attr_option_value, _attr_or, _attr_select_value, _attr_style, _attr_textarea_value, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _await, _content, _content_resume, _dynamic_tag, _el, _el_read_error, _el_resume, _escape, _escape_comment, _escape_script, _escape_style, _escape_style_value, _existing_scope, _flush_head, _for_in, _for_of, _for_to, _for_until, _hoist, _hoist_read_error, _html, _html_resume, _id, _if, _peek_scope_id, _resume, _resume_branch, _resume_locals, writeScope as _scope, _scope_id, _scope_reason, _scope_with_id, _script, _serialize_guard, _serialize_if, _set_serialize_reason, _show_end, _show_start, _style_html, _subscribe, _template, _text_resume, _textarea_value, _to_text, _trailers, _try, _unescaped, _var, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, withLoadAssets, withPageAssets };
|
package/dist/dom/catch.feat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-BfydlrCq.js"), handlePendingTry = (fn, scope, branch) => {
|
|
2
2
|
for (; branch;) {
|
|
3
3
|
if (branch.O?.i) return (branch.J ||= []).push(fn, scope);
|
|
4
4
|
branch = branch.N;
|
package/dist/dom/catch.feat.mjs
CHANGED
|
@@ -4,7 +4,7 @@ let handlePendingTry = (fn, scope, branch) => {
|
|
|
4
4
|
branch = branch.N;
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
|
-
import { $t as caughtError, en as installCatch, g as renderCatch, tn as placeholderShown } from "../dom-
|
|
7
|
+
import { $t as caughtError, en as installCatch, g as renderCatch, tn as placeholderShown } from "../dom-UwNQ-AXt.mjs";
|
|
8
8
|
//#region src/dom/catch.feat.ts
|
|
9
9
|
installCatch((runEffects) => (effects, checkPending = placeholderShown.has(effects)) => {
|
|
10
10
|
if (checkPending || caughtError.has(effects)) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-BfydlrCq.js");
|
|
2
2
|
require_control_flow.z[0] = require_control_flow.T, require_control_flow.z[1] = require_control_flow.C, require_control_flow.z[2] = require_control_flow.A;
|
|
3
3
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as _attr_input_value_script, C as _attr_input_checkedValue_script, T as _attr_input_checked_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { A as _attr_input_value_script, C as _attr_input_checkedValue_script, T as _attr_input_checked_script, z as controllableScripts } from "../dom-UwNQ-AXt.mjs";
|
|
2
2
|
controllableScripts[0] = _attr_input_checked_script, controllableScripts[1] = _attr_input_checkedValue_script, controllableScripts[2] = _attr_input_value_script;
|
|
3
3
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as _attr_details_or_dialog_open_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { y as _attr_details_or_dialog_open_script, z as controllableScripts } from "../dom-UwNQ-AXt.mjs";
|
|
2
2
|
//#region src/dom/controllable-open.feat.ts
|
|
3
3
|
controllableScripts[4] = _attr_details_or_dialog_open_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as _attr_select_value_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { N as _attr_select_value_script, z as controllableScripts } from "../dom-UwNQ-AXt.mjs";
|
|
2
2
|
//#region src/dom/controllable-select.feat.ts
|
|
3
3
|
controllableScripts[3] = _attr_select_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as _attr_input_value_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { A as _attr_input_value_script, z as controllableScripts } from "../dom-UwNQ-AXt.mjs";
|
|
2
2
|
//#region src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-BfydlrCq.js");
|
|
2
2
|
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.R.INPUT = require_control_flow.P, require_control_flow.R.TEXTAREA = require_control_flow.L, require_control_flow.R.SELECT = require_control_flow.I, require_control_flow.R.DETAILS = require_control_flow.R.DIALOG = require_control_flow.F;
|
|
3
3
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as _controllable_open, I as _controllable_select, L as _controllable_textarea, P as _controllable_input, R as controllableRenders } from "../dom-
|
|
1
|
+
import { F as _controllable_open, I as _controllable_select, L as _controllable_textarea, P as _controllable_input, R as controllableRenders } from "../dom-UwNQ-AXt.mjs";
|
|
2
2
|
import "./controllable-input.feat.mjs";
|
|
3
3
|
import "./controllable-open.feat.mjs";
|
|
4
4
|
import "./controllable-select.feat.mjs";
|
package/dist/dom/dom.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare function _attrs_partial(scope: Scope, nodeAccessor: Accessor, nex
|
|
|
19
19
|
export declare function _attrs_partial_content(scope: Scope, nodeAccessor: Accessor, nextAttrs: Record<string, unknown>, skip: Record<string, 1>, controllable?: ControllableAttrs): void;
|
|
20
20
|
export declare function _attr_content(scope: Scope, nodeAccessor: Accessor, value: unknown): void;
|
|
21
21
|
export declare function _attrs_script(scope: Scope, nodeAccessor: Accessor): void;
|
|
22
|
-
export declare
|
|
22
|
+
export declare const _html: (scope: Scope, value: unknown, accessor: Accessor) => void;
|
|
23
23
|
export declare function normalizeAttrValue(value: unknown): string | undefined;
|
|
24
24
|
export declare function _lifecycle(scope: Scope, thisObj: Record<string, unknown> & {
|
|
25
25
|
onMount?: (this: unknown) => Record<string, unknown> | void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-BfydlrCq.js"), elementGetter = (branch) => () => branch.S;
|
|
2
2
|
require_control_flow.m((branch) => branch.T(elementGetter(branch))), require_control_flow.gt("_e", elementGetter);
|
|
3
3
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
let elementGetter = (branch) => () => branch.S;
|
|
2
|
-
import { gt as _resume, m as installDynamicTagVar } from "../dom-
|
|
2
|
+
import { gt as _resume, m as installDynamicTagVar } from "../dom-UwNQ-AXt.mjs";
|
|
3
3
|
installDynamicTagVar((branch) => branch.T(elementGetter(branch))), _resume("_e", elementGetter);
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ct as registeredValues, Kt as destroyBranch } from "../dom-
|
|
1
|
+
import { Ct as registeredValues, Kt as destroyBranch } from "../dom-UwNQ-AXt.mjs";
|
|
2
2
|
//#region src/dom/placeholder.feat.ts
|
|
3
3
|
registeredValues._f = (tryBranch) => {
|
|
4
4
|
tryBranch.P &&= (destroyBranch(tryBranch.P), 0);
|
|
@@ -4,7 +4,7 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
4
4
|
else if (Array.isArray(val)) for (let v of val) part = toDelimitedString(v, delimiter, stringify), part && (str += sep + part, sep = delimiter);
|
|
5
5
|
else for (let name in val) part = stringify(name, val[name]), part && (str += sep + part, sep = delimiter);
|
|
6
6
|
return str;
|
|
7
|
-
}, decodeAccessor = (num) => (num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36), branchesEnabled, rendering, runId = 2, caughtError = /* @__PURE__ */ new WeakSet(), placeholderShown = /* @__PURE__ */ new WeakSet(), pendingEffects = [], pendingRenders = [], runEffects = ((effects) => {
|
|
7
|
+
}, decodeAccessor = (num) => (num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36), branchesEnabled, dynamicHtmlEnabled, rendering, runId = 2, caughtError = /* @__PURE__ */ new WeakSet(), placeholderShown = /* @__PURE__ */ new WeakSet(), pendingEffects = [], pendingRenders = [], runEffects = ((effects) => {
|
|
8
8
|
for (let i = 0; i < effects.length;) effects[i++](effects[i++]);
|
|
9
9
|
}), runRender = (render) => {
|
|
10
10
|
(!branchesEnabled || render.b.F?.H !== 0) && render.c(render.b, render.d);
|
|
@@ -26,7 +26,10 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
26
26
|
if (currentNode.firstChild) return currentNode = currentNode.firstChild;
|
|
27
27
|
for (; !currentNode.nextSibling && currentNode.parentNode;) currentNode = currentNode.parentNode;
|
|
28
28
|
walkNextSibling();
|
|
29
|
-
}, walkNextSibling = () => currentNode = currentNode.nextSibling || currentNode, registeredValues = {}, curRenders, embedRenders, readyIds, lazyEnabled, isResuming, cloneCache = {},
|
|
29
|
+
}, walkNextSibling = () => currentNode = currentNode.nextSibling || currentNode, registeredValues = {}, curRenders, embedRenders, readyIds, lazyEnabled, isResuming, cloneCache = {}, _html = /*@__PURE__*/ withDynamicHtml(function(scope, value, accessor) {
|
|
30
|
+
let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["H" + accessor] || firstChild, newContent = parseHTML(_to_text(value), parentNode.namespaceURI);
|
|
31
|
+
insertChildNodes(parentNode, firstChild, scope[accessor] = newContent.firstChild || newContent.appendChild(new Text()), scope["H" + accessor] = newContent.lastChild), removeChildNodes(firstChild, lastChild);
|
|
32
|
+
}), R = /[\p{L}\p{N}]/gu, inputType = "", controllableScripts = {}, controllableRenders = {}, _if = /*@__PURE__*/ withBranches((nodeAccessor, ...branchesArgs) => {
|
|
30
33
|
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
31
34
|
let branchAccessor = "D" + nodeAccessor, branches = [], i = 0;
|
|
32
35
|
for (; i < branchesArgs.length;) branches.push(_content("", branchesArgs[i++], branchesArgs[i++], branchesArgs[i++])());
|
|
@@ -163,6 +166,9 @@ function normalizeDynamicRenderer(value) {
|
|
|
163
166
|
function withBranches(runtime) {
|
|
164
167
|
return branchesEnabled = 1, runtime;
|
|
165
168
|
}
|
|
169
|
+
function withDynamicHtml(runtime) {
|
|
170
|
+
return dynamicHtmlEnabled = 1, runtime;
|
|
171
|
+
}
|
|
166
172
|
function _hoist_read_error() {}
|
|
167
173
|
function _assert_hoist(value) {}
|
|
168
174
|
//#endregion
|
|
@@ -541,7 +547,7 @@ function init(runtimeId = "M") {
|
|
|
541
547
|
for (visitType !== "[" && (visitScope[nextToken()] = visitType === ")" || visitType === "}" ? parent : visit, accessor = "A" + lastToken, singleNode = visitType !== "]" && visitType !== ")", nextToken()); branchId = +lastToken;) {
|
|
542
548
|
if ((endedBranches ||= []).push(branch = getScope(branchId)), setParentBranch(branch, branch.F), (branch.O = render.p?.[branchId]) && (branch.O.m = render.m), singleNode) {
|
|
543
549
|
for (; startVisit.previousSibling && ~visits.indexOf(startVisit = startVisit.previousSibling););
|
|
544
|
-
branch._ ??= visitScope, branch.K = branch.S = startVisit, visitType === "
|
|
550
|
+
branch._ ??= visitScope, branch.K = branch.S = startVisit, visitType === "(" && (branch.a = startVisit);
|
|
545
551
|
} else curBranchScopes = push(curBranchScopes, branch), accessor && (visitScope[accessor] = curBranchScopes, forEach(curBranchScopes, (scope) => scope._ ??= visitScope), curBranchScopes = branchScopesStack.pop()), startVisit = branchStarts.pop(), parent !== startVisit.parentNode && parent.prepend(startVisit), branch.S = startVisit, branch.K = visit.previousSibling === startVisit ? startVisit : parent.insertBefore(new Text(), visit);
|
|
546
552
|
for (; i && orphanBranches[i - 1].L > branchId;) i--, setParentBranch(orphanBranches.pop(), branch);
|
|
547
553
|
for (; j && deferredOwners[j - 1].L > branchId;) {
|
|
@@ -570,7 +576,7 @@ function init(runtimeId = "M") {
|
|
|
570
576
|
}
|
|
571
577
|
}
|
|
572
578
|
return resumes.splice(0, i), i;
|
|
573
|
-
}, lastEffect, visits, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, visitBranches, embedAnchor;
|
|
579
|
+
}, lastEffect, visits, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, visitBranches, htmlStart, embedAnchor;
|
|
574
580
|
return serializeContext._ = registeredValues, render.m = (effects) => {
|
|
575
581
|
if (processResumes(render.r, effects), readyIds && render.b) for (let progress = 1; progress;) {
|
|
576
582
|
progress = 0;
|
|
@@ -580,10 +586,7 @@ function init(runtimeId = "M") {
|
|
|
580
586
|
}
|
|
581
587
|
}
|
|
582
588
|
let retained = 0;
|
|
583
|
-
for (visit of visits = render.v)
|
|
584
|
-
let prev = visit.previousSibling;
|
|
585
|
-
visitScope[nextToken()] = prev && (prev.nodeType < 8 || prev.data) ? prev : visit.parentNode.insertBefore(new Text(), visit);
|
|
586
|
-
} else branchesEnabled ? (visitBranches ||= createVisitBranches())() : lazyEnabled && render.b && (visits[retained++] = visit);
|
|
589
|
+
for (visit of visits = render.v) lastTokenIndex = render.i.length, visitText = visit.data, visitType = visitText[lastTokenIndex++], visitScope = getScope(nextToken()), dynamicHtmlEnabled && visitType > "%" && visitType <= "'" ? visitType === "&" ? htmlStart = visit : (visitScope[nextToken()] = htmlStart, visitScope["H" + lastToken] = visit) : branchesEnabled && visitType > "'" ? (visitBranches ||= createVisitBranches())() : lazyEnabled && render.b && visitType > "%" ? visits[retained++] = visit : visitScope[nextToken()] = visitType === "$" ? visit.previousSibling : visit.parentNode.insertBefore(new Text(), visit);
|
|
587
590
|
return embedRenders && !embedAnchor && visit && embedRenders.set(embedAnchor = visit.parentNode.insertBefore(new Text(), visit.nextSibling), [renderId, scopeLookup]), visits.length = retained, effects;
|
|
588
591
|
}, render.w = () => {
|
|
589
592
|
walk(), runResumeEffects(render);
|
|
@@ -775,10 +778,6 @@ function _attrs_script(scope, nodeAccessor) {
|
|
|
775
778
|
controllableScripts[scope["F" + nodeAccessor]]?.(scope, nodeAccessor);
|
|
776
779
|
for (let name in events) _on(el, name, events[name]);
|
|
777
780
|
}
|
|
778
|
-
function _html(scope, value, accessor) {
|
|
779
|
-
let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["H" + accessor] || firstChild, newContent = parseHTML(_to_text(value), parentNode.namespaceURI);
|
|
780
|
-
insertChildNodes(parentNode, firstChild, scope[accessor] = newContent.firstChild || newContent.appendChild(new Text()), scope["H" + accessor] = newContent.lastChild), removeChildNodes(firstChild, lastChild);
|
|
781
|
-
}
|
|
782
781
|
function normalizeClientRender(value) {
|
|
783
782
|
let renderer = normalizeDynamicRenderer(value);
|
|
784
783
|
if (renderer && renderer.a) return renderer;
|
|
@@ -1441,7 +1440,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1441
1440
|
}), Object.defineProperty(exports, "an", {
|
|
1442
1441
|
enumerable: !0,
|
|
1443
1442
|
get: function() {
|
|
1444
|
-
return
|
|
1443
|
+
return queueRender;
|
|
1445
1444
|
}
|
|
1446
1445
|
}), Object.defineProperty(exports, "at", {
|
|
1447
1446
|
enumerable: !0,
|
|
@@ -1466,7 +1465,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1466
1465
|
}), Object.defineProperty(exports, "cn", {
|
|
1467
1466
|
enumerable: !0,
|
|
1468
1467
|
get: function() {
|
|
1469
|
-
return
|
|
1468
|
+
return runId;
|
|
1470
1469
|
}
|
|
1471
1470
|
}), Object.defineProperty(exports, "ct", {
|
|
1472
1471
|
enumerable: !0,
|
|
@@ -1481,7 +1480,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1481
1480
|
}), Object.defineProperty(exports, "dn", {
|
|
1482
1481
|
enumerable: !0,
|
|
1483
1482
|
get: function() {
|
|
1484
|
-
return
|
|
1483
|
+
return forTo;
|
|
1485
1484
|
}
|
|
1486
1485
|
}), Object.defineProperty(exports, "dt", {
|
|
1487
1486
|
enumerable: !0,
|
|
@@ -1506,7 +1505,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1506
1505
|
}), Object.defineProperty(exports, "fn", {
|
|
1507
1506
|
enumerable: !0,
|
|
1508
1507
|
get: function() {
|
|
1509
|
-
return
|
|
1508
|
+
return forUntil;
|
|
1510
1509
|
}
|
|
1511
1510
|
}), Object.defineProperty(exports, "ft", {
|
|
1512
1511
|
enumerable: !0,
|
|
@@ -1518,6 +1517,11 @@ Object.defineProperty(exports, "$", {
|
|
|
1518
1517
|
get: function() {
|
|
1519
1518
|
return renderCatch;
|
|
1520
1519
|
}
|
|
1520
|
+
}), Object.defineProperty(exports, "gn", {
|
|
1521
|
+
enumerable: !0,
|
|
1522
|
+
get: function() {
|
|
1523
|
+
return decodeAccessor;
|
|
1524
|
+
}
|
|
1521
1525
|
}), Object.defineProperty(exports, "gt", {
|
|
1522
1526
|
enumerable: !0,
|
|
1523
1527
|
get: function() {
|
|
@@ -1531,7 +1535,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1531
1535
|
}), Object.defineProperty(exports, "hn", {
|
|
1532
1536
|
enumerable: !0,
|
|
1533
1537
|
get: function() {
|
|
1534
|
-
return
|
|
1538
|
+
return _call;
|
|
1535
1539
|
}
|
|
1536
1540
|
}), Object.defineProperty(exports, "ht", {
|
|
1537
1541
|
enumerable: !0,
|
|
@@ -1581,7 +1585,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1581
1585
|
}), Object.defineProperty(exports, "ln", {
|
|
1582
1586
|
enumerable: !0,
|
|
1583
1587
|
get: function() {
|
|
1584
|
-
return
|
|
1588
|
+
return forIn;
|
|
1585
1589
|
}
|
|
1586
1590
|
}), Object.defineProperty(exports, "lt", {
|
|
1587
1591
|
enumerable: !0,
|
|
@@ -1596,7 +1600,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1596
1600
|
}), Object.defineProperty(exports, "mn", {
|
|
1597
1601
|
enumerable: !0,
|
|
1598
1602
|
get: function() {
|
|
1599
|
-
return
|
|
1603
|
+
return _hoist_read_error;
|
|
1600
1604
|
}
|
|
1601
1605
|
}), Object.defineProperty(exports, "mt", {
|
|
1602
1606
|
enumerable: !0,
|
|
@@ -1626,7 +1630,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1626
1630
|
}), Object.defineProperty(exports, "on", {
|
|
1627
1631
|
enumerable: !0,
|
|
1628
1632
|
get: function() {
|
|
1629
|
-
return
|
|
1633
|
+
return run;
|
|
1630
1634
|
}
|
|
1631
1635
|
}), Object.defineProperty(exports, "ot", {
|
|
1632
1636
|
enumerable: !0,
|
|
@@ -1641,7 +1645,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1641
1645
|
}), Object.defineProperty(exports, "pn", {
|
|
1642
1646
|
enumerable: !0,
|
|
1643
1647
|
get: function() {
|
|
1644
|
-
return
|
|
1648
|
+
return _assert_hoist;
|
|
1645
1649
|
}
|
|
1646
1650
|
}), Object.defineProperty(exports, "pt", {
|
|
1647
1651
|
enumerable: !0,
|
|
@@ -1681,7 +1685,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1681
1685
|
}), Object.defineProperty(exports, "sn", {
|
|
1682
1686
|
enumerable: !0,
|
|
1683
1687
|
get: function() {
|
|
1684
|
-
return
|
|
1688
|
+
return runEffects;
|
|
1685
1689
|
}
|
|
1686
1690
|
}), Object.defineProperty(exports, "st", {
|
|
1687
1691
|
enumerable: !0,
|
|
@@ -1711,7 +1715,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1711
1715
|
}), Object.defineProperty(exports, "un", {
|
|
1712
1716
|
enumerable: !0,
|
|
1713
1717
|
get: function() {
|
|
1714
|
-
return
|
|
1718
|
+
return forOf;
|
|
1715
1719
|
}
|
|
1716
1720
|
}), Object.defineProperty(exports, "ut", {
|
|
1717
1721
|
enumerable: !0,
|
|
@@ -4,7 +4,7 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
4
4
|
else if (Array.isArray(val)) for (let v of val) part = toDelimitedString(v, delimiter, stringify), part && (str += sep + part, sep = delimiter);
|
|
5
5
|
else for (let name in val) part = stringify(name, val[name]), part && (str += sep + part, sep = delimiter);
|
|
6
6
|
return str;
|
|
7
|
-
}, decodeAccessor = (num) => (num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36), branchesEnabled, rendering, runId = 2, caughtError = /* @__PURE__ */ new WeakSet(), placeholderShown = /* @__PURE__ */ new WeakSet(), pendingEffects = [], pendingRenders = [], runEffects = ((effects) => {
|
|
7
|
+
}, decodeAccessor = (num) => (num + (num < 26 ? 10 : num < 962 ? 334 : 11998)).toString(36), branchesEnabled, dynamicHtmlEnabled, rendering, runId = 2, caughtError = /* @__PURE__ */ new WeakSet(), placeholderShown = /* @__PURE__ */ new WeakSet(), pendingEffects = [], pendingRenders = [], runEffects = ((effects) => {
|
|
8
8
|
for (let i = 0; i < effects.length;) effects[i++](effects[i++]);
|
|
9
9
|
}), runRender = (render) => {
|
|
10
10
|
(!branchesEnabled || render.b.F?.H !== 0) && render.c(render.b, render.d);
|
|
@@ -26,7 +26,10 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
|
|
|
26
26
|
if (currentNode.firstChild) return currentNode = currentNode.firstChild;
|
|
27
27
|
for (; !currentNode.nextSibling && currentNode.parentNode;) currentNode = currentNode.parentNode;
|
|
28
28
|
walkNextSibling();
|
|
29
|
-
}, walkNextSibling = () => currentNode = currentNode.nextSibling || currentNode, registeredValues = {}, curRenders, embedRenders, readyIds, lazyEnabled, isResuming, cloneCache = {},
|
|
29
|
+
}, walkNextSibling = () => currentNode = currentNode.nextSibling || currentNode, registeredValues = {}, curRenders, embedRenders, readyIds, lazyEnabled, isResuming, cloneCache = {}, _html = /*@__PURE__*/ withDynamicHtml(function(scope, value, accessor) {
|
|
30
|
+
let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["H" + accessor] || firstChild, newContent = parseHTML(_to_text(value), parentNode.namespaceURI);
|
|
31
|
+
insertChildNodes(parentNode, firstChild, scope[accessor] = newContent.firstChild || newContent.appendChild(new Text()), scope["H" + accessor] = newContent.lastChild), removeChildNodes(firstChild, lastChild);
|
|
32
|
+
}), R = /[\p{L}\p{N}]/gu, inputType = "", controllableScripts = {}, controllableRenders = {}, _if = /*@__PURE__*/ withBranches((nodeAccessor, ...branchesArgs) => {
|
|
30
33
|
nodeAccessor = decodeAccessor(nodeAccessor);
|
|
31
34
|
let branchAccessor = "D" + nodeAccessor, branches = [], i = 0;
|
|
32
35
|
for (; i < branchesArgs.length;) branches.push(_content("", branchesArgs[i++], branchesArgs[i++], branchesArgs[i++])());
|
|
@@ -163,6 +166,9 @@ function normalizeDynamicRenderer(value) {
|
|
|
163
166
|
function withBranches(runtime) {
|
|
164
167
|
return branchesEnabled = 1, runtime;
|
|
165
168
|
}
|
|
169
|
+
function withDynamicHtml(runtime) {
|
|
170
|
+
return dynamicHtmlEnabled = 1, runtime;
|
|
171
|
+
}
|
|
166
172
|
function _hoist_read_error() {}
|
|
167
173
|
function _assert_hoist(value) {}
|
|
168
174
|
//#endregion
|
|
@@ -541,7 +547,7 @@ function init(runtimeId = "M") {
|
|
|
541
547
|
for (visitType !== "[" && (visitScope[nextToken()] = visitType === ")" || visitType === "}" ? parent : visit, accessor = "A" + lastToken, singleNode = visitType !== "]" && visitType !== ")", nextToken()); branchId = +lastToken;) {
|
|
542
548
|
if ((endedBranches ||= []).push(branch = getScope(branchId)), setParentBranch(branch, branch.F), (branch.O = render.p?.[branchId]) && (branch.O.m = render.m), singleNode) {
|
|
543
549
|
for (; startVisit.previousSibling && ~visits.indexOf(startVisit = startVisit.previousSibling););
|
|
544
|
-
branch._ ??= visitScope, branch.K = branch.S = startVisit, visitType === "
|
|
550
|
+
branch._ ??= visitScope, branch.K = branch.S = startVisit, visitType === "(" && (branch.a = startVisit);
|
|
545
551
|
} else curBranchScopes = push(curBranchScopes, branch), accessor && (visitScope[accessor] = curBranchScopes, forEach(curBranchScopes, (scope) => scope._ ??= visitScope), curBranchScopes = branchScopesStack.pop()), startVisit = branchStarts.pop(), parent !== startVisit.parentNode && parent.prepend(startVisit), branch.S = startVisit, branch.K = visit.previousSibling === startVisit ? startVisit : parent.insertBefore(new Text(), visit);
|
|
546
552
|
for (; i && orphanBranches[i - 1].L > branchId;) i--, setParentBranch(orphanBranches.pop(), branch);
|
|
547
553
|
for (; j && deferredOwners[j - 1].L > branchId;) {
|
|
@@ -570,7 +576,7 @@ function init(runtimeId = "M") {
|
|
|
570
576
|
}
|
|
571
577
|
}
|
|
572
578
|
return resumes.splice(0, i), i;
|
|
573
|
-
}, lastEffect, visits, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, visitBranches, embedAnchor;
|
|
579
|
+
}, lastEffect, visits, visit, visitText, visitType, visitScope, lastToken, lastTokenIndex, visitBranches, htmlStart, embedAnchor;
|
|
574
580
|
return serializeContext._ = registeredValues, render.m = (effects) => {
|
|
575
581
|
if (processResumes(render.r, effects), readyIds && render.b) for (let progress = 1; progress;) {
|
|
576
582
|
progress = 0;
|
|
@@ -580,10 +586,7 @@ function init(runtimeId = "M") {
|
|
|
580
586
|
}
|
|
581
587
|
}
|
|
582
588
|
let retained = 0;
|
|
583
|
-
for (visit of visits = render.v)
|
|
584
|
-
let prev = visit.previousSibling;
|
|
585
|
-
visitScope[nextToken()] = prev && (prev.nodeType < 8 || prev.data) ? prev : visit.parentNode.insertBefore(new Text(), visit);
|
|
586
|
-
} else branchesEnabled ? (visitBranches ||= createVisitBranches())() : lazyEnabled && render.b && (visits[retained++] = visit);
|
|
589
|
+
for (visit of visits = render.v) lastTokenIndex = render.i.length, visitText = visit.data, visitType = visitText[lastTokenIndex++], visitScope = getScope(nextToken()), dynamicHtmlEnabled && visitType > "%" && visitType <= "'" ? visitType === "&" ? htmlStart = visit : (visitScope[nextToken()] = htmlStart, visitScope["H" + lastToken] = visit) : branchesEnabled && visitType > "'" ? (visitBranches ||= createVisitBranches())() : lazyEnabled && render.b && visitType > "%" ? visits[retained++] = visit : visitScope[nextToken()] = visitType === "$" ? visit.previousSibling : visit.parentNode.insertBefore(new Text(), visit);
|
|
587
590
|
return embedRenders && !embedAnchor && visit && embedRenders.set(embedAnchor = visit.parentNode.insertBefore(new Text(), visit.nextSibling), [renderId, scopeLookup]), visits.length = retained, effects;
|
|
588
591
|
}, render.w = () => {
|
|
589
592
|
walk(), runResumeEffects(render);
|
|
@@ -775,10 +778,6 @@ function _attrs_script(scope, nodeAccessor) {
|
|
|
775
778
|
controllableScripts[scope["F" + nodeAccessor]]?.(scope, nodeAccessor);
|
|
776
779
|
for (let name in events) _on(el, name, events[name]);
|
|
777
780
|
}
|
|
778
|
-
function _html(scope, value, accessor) {
|
|
779
|
-
let firstChild = scope[accessor], parentNode = firstChild.parentNode, lastChild = scope["H" + accessor] || firstChild, newContent = parseHTML(_to_text(value), parentNode.namespaceURI);
|
|
780
|
-
insertChildNodes(parentNode, firstChild, scope[accessor] = newContent.firstChild || newContent.appendChild(new Text()), scope["H" + accessor] = newContent.lastChild), removeChildNodes(firstChild, lastChild);
|
|
781
|
-
}
|
|
782
781
|
function normalizeClientRender(value) {
|
|
783
782
|
let renderer = normalizeDynamicRenderer(value);
|
|
784
783
|
if (renderer && renderer.a) return renderer;
|
|
@@ -1154,4 +1153,4 @@ function byFirstArg(name) {
|
|
|
1154
1153
|
return name;
|
|
1155
1154
|
}
|
|
1156
1155
|
//#endregion
|
|
1157
|
-
export { _attrs_script as $, caughtError as $t, _attr_input_value_script as A, _for_closure as At, _attr as B, _return as Bt, _attr_input_checkedValue_script as C, registeredValues as Ct, _attr_input_value_attribute_default as D, _closure_get as Dt, _attr_input_value as E, _closure as Et, _controllable_open as F, _id as Ft, _attr_nonce as G, _assert_init as Gt, _attr_class_item as H, _script as Ht, _controllable_select as I, _if_closure as It, _attr_style_items as J, removeAndDestroyBranch as Jt, _attr_style as K, destroyBranch as Kt, _controllable_textarea as L, _let as Lt, _attr_select_value_default as M, _global_read as Mt, _attr_select_value_script as N, _hoist as Nt, _attr_input_value_default as O, _const as Ot, _controllable_input as P, _hoist_resume as Pt, _attrs_partial_content as Q, $signalReset as Qt, controllableRenders as R, _let_change as Rt, _attr_input_checkedValue_default as S, readyFailed as St, _attr_input_checked_script as T, _child_setup as Tt, _attr_class_items as U, _var as Ut, _attr_class as V, _return_change as Vt, _attr_content as W, _var_change as Wt, _attrs_content as X, _on as Xt, _attrs as Y, syncGen as Yt, _attrs_partial as Z, $signal as Zt, _attr_details_or_dialog_open as _, _var_resume as _t, _for_in as a,
|
|
1156
|
+
export { _attrs_script as $, caughtError as $t, _attr_input_value_script as A, _for_closure as At, _attr as B, _return as Bt, _attr_input_checkedValue_script as C, registeredValues as Ct, _attr_input_value_attribute_default as D, _closure_get as Dt, _attr_input_value as E, _closure as Et, _controllable_open as F, _id as Ft, _attr_nonce as G, _assert_init as Gt, _attr_class_item as H, _script as Ht, _controllable_select as I, _if_closure as It, _attr_style_items as J, removeAndDestroyBranch as Jt, _attr_style as K, destroyBranch as Kt, _controllable_textarea as L, _let as Lt, _attr_select_value_default as M, _global_read as Mt, _attr_select_value_script as N, _hoist as Nt, _attr_input_value_default as O, _const as Ot, _controllable_input as P, _hoist_resume as Pt, _attrs_partial_content as Q, $signalReset as Qt, controllableRenders as R, _let_change as Rt, _attr_input_checkedValue_default as S, readyFailed as St, _attr_input_checked_script as T, _child_setup as Tt, _attr_class_items as U, _var as Ut, _attr_class as V, _return_change as Vt, _attr_content as W, _var_change as Wt, _attrs_content as X, _on as Xt, _attrs as Y, syncGen as Yt, _attrs_partial as Z, $signal as Zt, _attr_details_or_dialog_open as _, _var_resume as _t, _for_in as a, queueRender as an, _text_content as at, _attr_input_checked as b, initEmbedded as bt, _for_until as c, runId as cn, toInsertNode as ct, _show as d, forTo as dn, _content_resume as dt, installCatch as en, _html as et, _try as f, forUntil as fn, createAndSetupBranch as ft, renderCatch as g, decodeAccessor as gn, _resume as gt, patchDynamicTag as h, _call as hn, _el as ht, _dynamic_tag_content as i, queueEffect as in, _text as it, _attr_select_value as j, _for_selector as jt, _attr_input_value_dynamic_default as k, _el_read as kt, _if as l, forIn as ln, _content as lt, installDynamicTagVar as m, _hoist_read_error as mn, setupBranch as mt, _await_promise as n, prepareEffects as nn, _style_rule_item as nt, _for_of as o, run as on, _to_text as ot, addAwaitCounter as p, _assert_hoist as pn, createBranch as pt, _attr_style_item as q, insertBranchBefore as qt, _dynamic_tag as r, queueAsyncRender as rn, _style_shell as rt, _for_to as s, runEffects as sn, insertChildNodes as st, _await_content as t, placeholderShown as tn, _lifecycle as tt, _resume_dynamic_tag as u, forOf as un, _content_closures as ut, _attr_details_or_dialog_open_default as v, getRegisteredWithScope as vt, _attr_input_checked_default as w, withLazy as wt, _attr_input_checkedValue as x, ready as xt, _attr_details_or_dialog_open_script as y, init as yt, controllableScripts as z, _or as zt };
|