marko 6.4.7 → 6.4.9
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/common/constants/closure-signal-prop.d.ts +1 -1
- package/dist/common/constants/closure-signal-prop.debug.d.ts +1 -1
- 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-script.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-script.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/lazy.feat.js +1 -1
- package/dist/debug/dom/lazy.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-D8znnhpf.js → dom-QkYva5Qx.js} +35 -61
- package/dist/debug/{dom-CFCBDift.mjs → dom-VKjkbuuo.mjs} +36 -50
- package/dist/debug/dom.js +4 -4
- package/dist/debug/dom.mjs +4 -4
- package/dist/debug/html.js +20 -13
- package/dist/debug/html.mjs +18 -11
- package/dist/dom/catch.feat.js +3 -3
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/compat.d.ts +1 -1
- package/dist/dom/control-flow.d.ts +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 +2 -3
- package/dist/dom/dynamic-tag-script.feat.js +2 -2
- package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +3 -3
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/lazy.feat.js +1 -1
- package/dist/dom/lazy.feat.mjs +1 -1
- package/dist/dom/placeholder.feat.js +3 -3
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/resume.d.ts +1 -1
- package/dist/dom/scope.d.ts +1 -1
- package/dist/dom/signals.d.ts +1 -1
- package/dist/{dom-CVAevsbz.mjs → dom-DtKQb840.mjs} +19 -33
- package/dist/{dom-Bpkm72vV.js → dom-IujlfJ6b.js} +82 -106
- package/dist/dom.js +31 -31
- package/dist/dom.mjs +4 -4
- package/dist/html/serializer.d.ts +1 -1
- package/dist/html/writer.d.ts +3 -3
- package/dist/html.d.ts +1 -1
- package/dist/html.js +21 -15
- package/dist/html.mjs +21 -15
- package/dist/translator/core/show.d.ts +3 -4
- package/dist/translator/index.js +1253 -1134
- package/dist/translator/util/bindings.d.ts +6 -5
- package/dist/translator/util/branch-tag.d.ts +1 -1
- package/dist/translator/util/constants/slot-kind.d.ts +1 -1
- package/dist/translator/util/known-tag.d.ts +6 -2
- package/dist/translator/util/module-registrations.d.ts +1 -1
- package/dist/translator/util/optional.d.ts +1 -0
- package/dist/translator/util/params-tree.d.ts +3 -3
- package/dist/translator/util/reasons.d.ts +3 -4
- package/dist/translator/util/references.d.ts +13 -8
- package/dist/translator/util/replace-with-statements.d.ts +4 -0
- package/dist/translator/util/runtime.d.ts +1 -0
- package/dist/translator/util/scope-accessor.d.ts +1 -1
- package/dist/translator/util/sections.d.ts +42 -17
- package/dist/translator/util/signals.d.ts +3 -11
- package/dist/translator/util/slots.d.ts +1 -1
- package/dist/translator/util/solve-reasons.d.ts +6 -0
- package/dist/translator/util/static-text.d.ts +1 -0
- package/dist/translator/util/structure.d.ts +3 -2
- package/dist/translator/util/tag-import.d.ts +0 -2
- package/dist/translator/util/write-guard.d.ts +4 -1
- package/dist/translator/visitors/placeholder.d.ts +4 -4
- package/package.json +4 -4
- package/tags-html.d.ts +3 -0
- package/dist/translator/visitors/constants/sibling-text.d.ts +0 -6
package/dist/debug/dom.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_control_flow = require("./dom-
|
|
3
|
+
const require_control_flow = require("./dom-QkYva5Qx.js");
|
|
4
4
|
//#region src/common/attr-tag.ts
|
|
5
5
|
const empty = [];
|
|
6
6
|
const rest = Symbol("Attribute Tag");
|
|
@@ -83,7 +83,7 @@ const compat = {
|
|
|
83
83
|
if (this.scope) require_control_flow.destroyBranch(this.scope);
|
|
84
84
|
},
|
|
85
85
|
resolveRegistered(value, $global) {
|
|
86
|
-
if (Array.isArray(value) && typeof value[0] === "string") return require_control_flow.getRegisteredWithScope(
|
|
86
|
+
if (Array.isArray(value) && typeof value[0] === "string") return require_control_flow.getRegisteredWithScope(getRenderScopes($global)?.[value[1]], value[0]);
|
|
87
87
|
return value;
|
|
88
88
|
},
|
|
89
89
|
createRenderer(params, clone) {
|
|
@@ -117,7 +117,7 @@ const compat = {
|
|
|
117
117
|
renderer[require_control_flow.Params]?.(branch, renderer._ ? args[0] : args);
|
|
118
118
|
};
|
|
119
119
|
component.effects = require_control_flow.rendering ? renderBranch() : require_control_flow.prepareEffects(renderBranch);
|
|
120
|
-
if (created) return
|
|
120
|
+
if (created) return branch["#StartNode"].parentNode || branch["#StartNode"];
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
//#endregion
|
|
@@ -171,7 +171,7 @@ function mount(input = {}, reference, position) {
|
|
|
171
171
|
this[require_control_flow.Setup]?.(branch);
|
|
172
172
|
args?.(branch, input);
|
|
173
173
|
});
|
|
174
|
-
require_control_flow.
|
|
174
|
+
require_control_flow.insertBranchBefore(branch, parentNode, nextSibling);
|
|
175
175
|
require_control_flow.runEffects(effects);
|
|
176
176
|
return {
|
|
177
177
|
get value() {
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as _attr_style_items,
|
|
1
|
+
import { $ as _attr_style_items, A as _attr_input_value, An as Setup, At as _closure_get, B as _controllable_select, Bt as _let, C as _attr_details_or_dialog_open_script, Ct as getRegisteredWithScope, D as _attr_input_checkedValue_script, Dn as Owner, Dt as readyFailed, E as _attr_input_checkedValue_default, En as LocalClosures, Et as ready, F as _attr_select_value, Ft as _global_read, G as _attr_class, Gn as StartNode, Gt as _script, Ht as _or, I as _attr_select_value_default, In as EndNode, It as _hoist, J as _attr_class_names, Jt as _assert_init, K as _attr_class_item, Kn as TagVariable, Kt as _var, L as _attr_select_value_script, Lt as _hoist_resume, M as _attr_input_value_default, Mt as _el_read, N as _attr_input_value_dynamic_default, Nt as _for_closure, O as _attr_input_checked_default, On as Params, P as _attr_input_value_script, Pt as _for_selector, Q as _attr_style_item, Qt as syncGen, R as _controllable_input, Rn as Global, Rt as _id, S as _attr_details_or_dialog_open_default, Sn as _call, St as _var_resume, T as _attr_input_checkedValue, Tn as Lazy, Tt as initEmbedded, Ut as _return, V as _controllable_textarea, Vt as _let_change, W as _attr, Wt as _return_change, X as _attr_nonce, Xt as insertBranchBefore, Y as _attr_content, Yt as destroyBranch, Z as _attr_style, Zt as removeAndDestroyBranch, _ as patchDynamicTag, _n as forTo, _t as createBranch, a as _for_in, at as _html, b as startAwait, bn as _assert_hoist, bt as _el, c as _for_to, cn as queueAsyncRender, ct as _style_shell, d as _for_until_unkeyed, dn as rendering, dt as _to_text, et as _attrs, f as _if, fn as run, ft as _content, gn as forOf, gt as createAndSetupBranch, hn as forIn, ht as _return_setup, i as _dynamic_tag_content, it as _attrs_script, j as _attr_input_value_attribute_default, jt as _const, k as _attr_input_checked_script, kt as _closure, l as _for_to_unkeyed, ln as queueEffect, lt as _text, m as _try, mn as runId, mt as _content_resume, n as _await_promise, nn as $signal, nt as _attrs_partial, o as _for_of, ot as _lifecycle, p as _show, pn as runEffects, pt as _content_closures, q as _attr_class_items, qt as _var_change, r as _dynamic_tag, rn as $signalReset, rt as _attrs_partial_content, s as _for_of_unkeyed, sn as prepareEffects, st as _style_rule_item, t as _await_content, tn as _on, tt as _attrs_content, u as _for_until, un as queueRender, ut as _text_content, v as renderCatch, vn as forUntil, vt as setupBranch, w as _attr_input_checked, wn as Clone, wt as init, x as _attr_details_or_dialog_open, xn as _hoist_read_error, xt as _resumed, yn as _assert_class_toggles, yt as _dynamic_tag_var_resume, z as _controllable_open, zn as Load, zt as _if_closure } from "./dom-VKjkbuuo.mjs";
|
|
2
2
|
//#region src/common/attr-tag.ts
|
|
3
3
|
const empty = [];
|
|
4
4
|
const rest = Symbol("Attribute Tag");
|
|
@@ -81,7 +81,7 @@ const compat = {
|
|
|
81
81
|
if (this.scope) destroyBranch(this.scope);
|
|
82
82
|
},
|
|
83
83
|
resolveRegistered(value, $global) {
|
|
84
|
-
if (Array.isArray(value) && typeof value[0] === "string") return getRegisteredWithScope(
|
|
84
|
+
if (Array.isArray(value) && typeof value[0] === "string") return getRegisteredWithScope(getRenderScopes($global)?.[value[1]], value[0]);
|
|
85
85
|
return value;
|
|
86
86
|
},
|
|
87
87
|
createRenderer(params, clone) {
|
|
@@ -115,7 +115,7 @@ const compat = {
|
|
|
115
115
|
renderer[Params]?.(branch, renderer._ ? args[0] : args);
|
|
116
116
|
};
|
|
117
117
|
component.effects = rendering ? renderBranch() : prepareEffects(renderBranch);
|
|
118
|
-
if (created) return
|
|
118
|
+
if (created) return branch["#StartNode"].parentNode || branch["#StartNode"];
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
//#endregion
|
|
@@ -169,7 +169,7 @@ function mount(input = {}, reference, position) {
|
|
|
169
169
|
this[Setup]?.(branch);
|
|
170
170
|
args?.(branch, input);
|
|
171
171
|
});
|
|
172
|
-
|
|
172
|
+
insertBranchBefore(branch, parentNode, nextSibling);
|
|
173
173
|
runEffects(effects);
|
|
174
174
|
return {
|
|
175
175
|
get value() {
|
package/dist/debug/html.js
CHANGED
|
@@ -600,7 +600,7 @@ var State$1 = class {
|
|
|
600
600
|
this.buf.push(",");
|
|
601
601
|
writePlainObject(this, local, newArgReference(this, ref, local));
|
|
602
602
|
}
|
|
603
|
-
} else this.buf.push("_(" + scopeId + "," +
|
|
603
|
+
} else this.buf.push("_(" + scopeId + "," + quoteRegistryId(registered.id));
|
|
604
604
|
this.buf.push(")");
|
|
605
605
|
}
|
|
606
606
|
};
|
|
@@ -864,7 +864,7 @@ function newScopeReference(state, val, scopeId) {
|
|
|
864
864
|
ref.debug = DEBUG.get(val);
|
|
865
865
|
return ref;
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function quoteRegistryId(id) {
|
|
868
868
|
return quote(id, 0);
|
|
869
869
|
}
|
|
870
870
|
function writeRegistered(state, val, parent, accessor, registered) {
|
|
@@ -2283,16 +2283,16 @@ function _hoist(scopeId, id) {
|
|
|
2283
2283
|
getter[Symbol.iterator] = _hoist_read_error;
|
|
2284
2284
|
return _resume(getter, id, scopeId);
|
|
2285
2285
|
}
|
|
2286
|
-
function
|
|
2286
|
+
function _el_mark(scopeId, accessor, markerGuard) {
|
|
2287
2287
|
if (markerGuard === 0) return "";
|
|
2288
2288
|
const { state } = $chunk.boundary;
|
|
2289
2289
|
state.needsWalkerRuntime = true;
|
|
2290
2290
|
return state.mark("$", scopeId + " " + accessor);
|
|
2291
2291
|
}
|
|
2292
|
-
function
|
|
2292
|
+
function _text_mark(scopeId, accessor, val, markerGuard) {
|
|
2293
2293
|
return markText(scopeId, accessor, _escape(val), markerGuard);
|
|
2294
2294
|
}
|
|
2295
|
-
function
|
|
2295
|
+
function _html_mark(scopeId, accessor, val, markerGuard) {
|
|
2296
2296
|
const html = _unescaped(val);
|
|
2297
2297
|
if (markerGuard === 0 || !~html.indexOf("<")) return markText(scopeId, accessor, html, markerGuard);
|
|
2298
2298
|
const { state } = $chunk.boundary;
|
|
@@ -2837,9 +2837,10 @@ var Chunk = class Chunk {
|
|
|
2837
2837
|
}
|
|
2838
2838
|
if (readyId && !this.async) {
|
|
2839
2839
|
const { state } = boundary;
|
|
2840
|
+
const effects = holdEffects ? "" : this.effects;
|
|
2841
|
+
if (effects) flushSerializerGlobals(boundary);
|
|
2840
2842
|
flushSerializer(boundary, channel);
|
|
2841
2843
|
const deps = takeChannelDeps(state.serializer);
|
|
2842
|
-
const effects = holdEffects ? "" : this.effects;
|
|
2843
2844
|
const { resumes } = channel;
|
|
2844
2845
|
const chunkScripts = this.scripts;
|
|
2845
2846
|
channel.resumes = this.scripts = "";
|
|
@@ -2881,6 +2882,7 @@ var Chunk = class Chunk {
|
|
|
2881
2882
|
scripts = concatScripts(scripts, readyResumeScripts);
|
|
2882
2883
|
if (effects) {
|
|
2883
2884
|
needsWalk = true;
|
|
2885
|
+
flushSerializerGlobals(boundary);
|
|
2884
2886
|
state.resumes = state.resumes ? state.resumes + ",\"" + effects + "\"" : "\"" + effects + "\"";
|
|
2885
2887
|
}
|
|
2886
2888
|
let reordered = "";
|
|
@@ -3034,7 +3036,7 @@ function flushSerializer(boundary, channel) {
|
|
|
3034
3036
|
]);
|
|
3035
3037
|
}
|
|
3036
3038
|
if (flushes.length || pending) {
|
|
3037
|
-
if (channel.readyId
|
|
3039
|
+
if (channel.readyId) flushSerializerGlobals(boundary);
|
|
3038
3040
|
state.addResumes(channel, stringifyScopes(serializer, flushes, boundary, channel));
|
|
3039
3041
|
}
|
|
3040
3042
|
channel.writeScopes = {};
|
|
@@ -3044,9 +3046,10 @@ function flushSerializer(boundary, channel) {
|
|
|
3044
3046
|
}
|
|
3045
3047
|
function flushSerializerGlobals(boundary) {
|
|
3046
3048
|
const { state } = boundary;
|
|
3049
|
+
if (state.hasWrittenGlobals) return;
|
|
3050
|
+
state.hasWrittenGlobals = true;
|
|
3047
3051
|
const globals = getFilteredGlobals(state.$global);
|
|
3048
3052
|
if (globals) {
|
|
3049
|
-
state.hasWrittenGlobals = true;
|
|
3050
3053
|
state.needsWalkerRuntime = true;
|
|
3051
3054
|
state.resumes = concatSequence(state.resumes, stringifyScopes(state.serializer, [[
|
|
3052
3055
|
0,
|
|
@@ -3787,7 +3790,7 @@ function writeBranchEnd(scopeId, accessor, branchExprGuard, markerGuard, parentE
|
|
|
3787
3790
|
const { state } = $chunk.boundary;
|
|
3788
3791
|
const mark = singleNode ? state.mark(parentEndTag ? "}" : "|", scopeId + " " + accessor + (branchIds || "")) : state.mark(parentEndTag ? ")" : "]", scopeId + " " + accessor + (branchIds || ""));
|
|
3789
3792
|
$chunk.writeHTML(mark + endTag);
|
|
3790
|
-
} else if (markerGuard !== 0) $chunk.writeHTML(endTag +
|
|
3793
|
+
} else if (markerGuard !== 0) $chunk.writeHTML(endTag + _el_mark(scopeId, accessor));
|
|
3791
3794
|
else $chunk.writeHTML(endTag);
|
|
3792
3795
|
}
|
|
3793
3796
|
function _await(scopeId, accessor, promise, content, markerGuard) {
|
|
@@ -3961,7 +3964,11 @@ const COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap();
|
|
|
3961
3964
|
const compat = {
|
|
3962
3965
|
$global,
|
|
3963
3966
|
writeLoadAsset,
|
|
3964
|
-
fork: _await,
|
|
3967
|
+
fork: ((scopeId, accessor, promise, content) => _await(scopeId, accessor, promise, (value) => {
|
|
3968
|
+
const branchId = _peek_scope_id();
|
|
3969
|
+
content(value);
|
|
3970
|
+
if (_peek_scope_id() === branchId) _scope_id();
|
|
3971
|
+
})),
|
|
3965
3972
|
write: _html,
|
|
3966
3973
|
writeScript,
|
|
3967
3974
|
nextScopeId: _scope_id,
|
|
@@ -4198,8 +4205,8 @@ Object.defineProperty(exports, "_dynamic_tag", {
|
|
|
4198
4205
|
}
|
|
4199
4206
|
});
|
|
4200
4207
|
exports._el = _el;
|
|
4208
|
+
exports._el_mark = _el_mark;
|
|
4201
4209
|
exports._el_read_error = _el_read_error;
|
|
4202
|
-
exports._el_resume = _el_resume;
|
|
4203
4210
|
exports._escape = _escape;
|
|
4204
4211
|
exports._escape_comment = _escape_comment;
|
|
4205
4212
|
exports._escape_script = _escape_script;
|
|
@@ -4214,7 +4221,7 @@ exports._for_until = _for_until;
|
|
|
4214
4221
|
exports._hoist = _hoist;
|
|
4215
4222
|
exports._hoist_read_error = _hoist_read_error;
|
|
4216
4223
|
exports._html = _html;
|
|
4217
|
-
exports.
|
|
4224
|
+
exports._html_mark = _html_mark;
|
|
4218
4225
|
exports._id = _id;
|
|
4219
4226
|
exports._if = _if;
|
|
4220
4227
|
exports._peek_scope_id = _peek_scope_id;
|
|
@@ -4238,7 +4245,7 @@ exports._signal_read_error = _signal_read_error;
|
|
|
4238
4245
|
exports._style_html = _style_html;
|
|
4239
4246
|
exports._subscribe = _subscribe;
|
|
4240
4247
|
exports._template = _template;
|
|
4241
|
-
exports.
|
|
4248
|
+
exports._text_mark = _text_mark;
|
|
4242
4249
|
exports._textarea_value = _textarea_value;
|
|
4243
4250
|
exports._to_text = _to_text;
|
|
4244
4251
|
exports._trailers = _trailers;
|
package/dist/debug/html.mjs
CHANGED
|
@@ -598,7 +598,7 @@ var State$1 = class {
|
|
|
598
598
|
this.buf.push(",");
|
|
599
599
|
writePlainObject(this, local, newArgReference(this, ref, local));
|
|
600
600
|
}
|
|
601
|
-
} else this.buf.push("_(" + scopeId + "," +
|
|
601
|
+
} else this.buf.push("_(" + scopeId + "," + quoteRegistryId(registered.id));
|
|
602
602
|
this.buf.push(")");
|
|
603
603
|
}
|
|
604
604
|
};
|
|
@@ -862,7 +862,7 @@ function newScopeReference(state, val, scopeId) {
|
|
|
862
862
|
ref.debug = DEBUG.get(val);
|
|
863
863
|
return ref;
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function quoteRegistryId(id) {
|
|
866
866
|
return quote(id, 0);
|
|
867
867
|
}
|
|
868
868
|
function writeRegistered(state, val, parent, accessor, registered) {
|
|
@@ -2281,16 +2281,16 @@ function _hoist(scopeId, id) {
|
|
|
2281
2281
|
getter[Symbol.iterator] = _hoist_read_error;
|
|
2282
2282
|
return _resume(getter, id, scopeId);
|
|
2283
2283
|
}
|
|
2284
|
-
function
|
|
2284
|
+
function _el_mark(scopeId, accessor, markerGuard) {
|
|
2285
2285
|
if (markerGuard === 0) return "";
|
|
2286
2286
|
const { state } = $chunk.boundary;
|
|
2287
2287
|
state.needsWalkerRuntime = true;
|
|
2288
2288
|
return state.mark("$", scopeId + " " + accessor);
|
|
2289
2289
|
}
|
|
2290
|
-
function
|
|
2290
|
+
function _text_mark(scopeId, accessor, val, markerGuard) {
|
|
2291
2291
|
return markText(scopeId, accessor, _escape(val), markerGuard);
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2293
|
+
function _html_mark(scopeId, accessor, val, markerGuard) {
|
|
2294
2294
|
const html = _unescaped(val);
|
|
2295
2295
|
if (markerGuard === 0 || !~html.indexOf("<")) return markText(scopeId, accessor, html, markerGuard);
|
|
2296
2296
|
const { state } = $chunk.boundary;
|
|
@@ -2835,9 +2835,10 @@ var Chunk = class Chunk {
|
|
|
2835
2835
|
}
|
|
2836
2836
|
if (readyId && !this.async) {
|
|
2837
2837
|
const { state } = boundary;
|
|
2838
|
+
const effects = holdEffects ? "" : this.effects;
|
|
2839
|
+
if (effects) flushSerializerGlobals(boundary);
|
|
2838
2840
|
flushSerializer(boundary, channel);
|
|
2839
2841
|
const deps = takeChannelDeps(state.serializer);
|
|
2840
|
-
const effects = holdEffects ? "" : this.effects;
|
|
2841
2842
|
const { resumes } = channel;
|
|
2842
2843
|
const chunkScripts = this.scripts;
|
|
2843
2844
|
channel.resumes = this.scripts = "";
|
|
@@ -2879,6 +2880,7 @@ var Chunk = class Chunk {
|
|
|
2879
2880
|
scripts = concatScripts(scripts, readyResumeScripts);
|
|
2880
2881
|
if (effects) {
|
|
2881
2882
|
needsWalk = true;
|
|
2883
|
+
flushSerializerGlobals(boundary);
|
|
2882
2884
|
state.resumes = state.resumes ? state.resumes + ",\"" + effects + "\"" : "\"" + effects + "\"";
|
|
2883
2885
|
}
|
|
2884
2886
|
let reordered = "";
|
|
@@ -3032,7 +3034,7 @@ function flushSerializer(boundary, channel) {
|
|
|
3032
3034
|
]);
|
|
3033
3035
|
}
|
|
3034
3036
|
if (flushes.length || pending) {
|
|
3035
|
-
if (channel.readyId
|
|
3037
|
+
if (channel.readyId) flushSerializerGlobals(boundary);
|
|
3036
3038
|
state.addResumes(channel, stringifyScopes(serializer, flushes, boundary, channel));
|
|
3037
3039
|
}
|
|
3038
3040
|
channel.writeScopes = {};
|
|
@@ -3042,9 +3044,10 @@ function flushSerializer(boundary, channel) {
|
|
|
3042
3044
|
}
|
|
3043
3045
|
function flushSerializerGlobals(boundary) {
|
|
3044
3046
|
const { state } = boundary;
|
|
3047
|
+
if (state.hasWrittenGlobals) return;
|
|
3048
|
+
state.hasWrittenGlobals = true;
|
|
3045
3049
|
const globals = getFilteredGlobals(state.$global);
|
|
3046
3050
|
if (globals) {
|
|
3047
|
-
state.hasWrittenGlobals = true;
|
|
3048
3051
|
state.needsWalkerRuntime = true;
|
|
3049
3052
|
state.resumes = concatSequence(state.resumes, stringifyScopes(state.serializer, [[
|
|
3050
3053
|
0,
|
|
@@ -3785,7 +3788,7 @@ function writeBranchEnd(scopeId, accessor, branchExprGuard, markerGuard, parentE
|
|
|
3785
3788
|
const { state } = $chunk.boundary;
|
|
3786
3789
|
const mark = singleNode ? state.mark(parentEndTag ? "}" : "|", scopeId + " " + accessor + (branchIds || "")) : state.mark(parentEndTag ? ")" : "]", scopeId + " " + accessor + (branchIds || ""));
|
|
3787
3790
|
$chunk.writeHTML(mark + endTag);
|
|
3788
|
-
} else if (markerGuard !== 0) $chunk.writeHTML(endTag +
|
|
3791
|
+
} else if (markerGuard !== 0) $chunk.writeHTML(endTag + _el_mark(scopeId, accessor));
|
|
3789
3792
|
else $chunk.writeHTML(endTag);
|
|
3790
3793
|
}
|
|
3791
3794
|
function _await(scopeId, accessor, promise, content, markerGuard) {
|
|
@@ -3959,7 +3962,11 @@ const COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap();
|
|
|
3959
3962
|
const compat = {
|
|
3960
3963
|
$global,
|
|
3961
3964
|
writeLoadAsset,
|
|
3962
|
-
fork: _await,
|
|
3965
|
+
fork: ((scopeId, accessor, promise, content) => _await(scopeId, accessor, promise, (value) => {
|
|
3966
|
+
const branchId = _peek_scope_id();
|
|
3967
|
+
content(value);
|
|
3968
|
+
if (_peek_scope_id() === branchId) _scope_id();
|
|
3969
|
+
})),
|
|
3963
3970
|
write: _html,
|
|
3964
3971
|
writeScript,
|
|
3965
3972
|
nextScopeId: _scope_id,
|
|
@@ -4161,4 +4168,4 @@ function swapReorders(state, reorders) {
|
|
|
4161
4168
|
}
|
|
4162
4169
|
function NOOP() {}
|
|
4163
4170
|
//#endregion
|
|
4164
|
-
export { $global, _assert_class_toggles, _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, _attrs_select_value, _attrs_textarea_value, _await, _content, _content_resume, _dynamic_tag, _el,
|
|
4171
|
+
export { $global, _assert_class_toggles, _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, _attrs_select_value, _attrs_textarea_value, _await, _content, _content_resume, _dynamic_tag, _el, _el_mark, _el_read_error, _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_mark, _id, _if, _peek_scope_id, _resume, _resume_branch, _resume_locals, writeScope as _scope, _scope_id, _scope_reason, _scope_with_id, _script, _set_scope_reason, _show_end, _show_start, _signal_read_error, _style_html, _subscribe, _template, _text_mark, _textarea_value, _to_text, _trailers, _try, _unescaped, _var, _write_guard, _write_if, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, withLoadAssets, withPageAssets };
|
package/dist/dom/catch.feat.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-IujlfJ6b.js"), deferToPendingTry = (fn, scope, branch) => {
|
|
3
3
|
for (; branch;) {
|
|
4
|
-
if (branch.O?.i) return (scope.J ||= ((branch.JS ||= (branch.O.m && ((complete) => branch.O.c = (_) => complete() || require_control_flow.
|
|
4
|
+
if (branch.O?.i) return (scope.J ||= ((branch.JS ||= (branch.O.m && ((complete) => branch.O.c = (_) => complete() || require_control_flow.on(branch, require_control_flow.sn, require_control_flow.y))(branch.O.c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
5
5
|
branch = branch.N;
|
|
6
6
|
}
|
|
7
7
|
};
|
|
8
8
|
//#region src/dom/catch.feat.ts
|
|
9
|
-
require_control_flow.
|
|
9
|
+
require_control_flow.in((effects) => {
|
|
10
10
|
let i = 0, fn, scope, branch;
|
|
11
11
|
for (; i < effects.length;) fn = effects[i++], scope = effects[i++], (branch = scope.F)?.H !== 0 && !deferToPendingTry(fn, scope, branch) && fn(scope);
|
|
12
12
|
}, (runRender) => (render) => {
|
package/dist/dom/catch.feat.mjs
CHANGED
|
@@ -4,7 +4,7 @@ let deferToPendingTry = (fn, scope, branch) => {
|
|
|
4
4
|
branch = branch.N;
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { in as installCatch, on as queueAsyncRender, sn as queueEffect, v as renderCatch, y as runPendingEffects } from "../dom-DtKQb840.mjs";
|
|
8
8
|
//#region src/dom/catch.feat.ts
|
|
9
9
|
installCatch((effects) => {
|
|
10
10
|
let i = 0, fn, scope, branch;
|
package/dist/dom/compat.d.ts
CHANGED
|
@@ -24,5 +24,5 @@ export declare const compat: {
|
|
|
24
24
|
startNode: ChildNode;
|
|
25
25
|
endNode: ChildNode;
|
|
26
26
|
}): Renderer;
|
|
27
|
-
render(out: any, component: any, renderer: Renderer, args: any):
|
|
27
|
+
render(out: any, component: any, renderer: Renderer, args: any): ChildNode | ParentNode | undefined;
|
|
28
28
|
};
|
|
@@ -8,7 +8,7 @@ export declare function runPendingEffects(tryBranch: BranchScope): void;
|
|
|
8
8
|
export declare function _try(nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, placeholderContent?: ReturnType<typeof _content> | 0, catchContent?: ReturnType<typeof _content>): (scope: Scope) => void;
|
|
9
9
|
export declare function renderCatch(scope: Scope, error?: unknown): void;
|
|
10
10
|
export declare const _if: (nodeAccessor: EncodedAccessor, ...branchesArgs: (string | SetupFn | 0)[]) => (scope: Scope, newBranch: number) => void;
|
|
11
|
-
export declare const _show: (nodeAccessor: EncodedAccessor, startNodeAccessor?: EncodedAccessor
|
|
11
|
+
export declare const _show: (nodeAccessor: EncodedAccessor, startNodeAccessor?: EncodedAccessor) => (scope: Scope, display: unknown) => void;
|
|
12
12
|
export declare function rendererKey(renderer: Renderer | string | undefined): string | Renderer | undefined;
|
|
13
13
|
export declare function patchDynamicTag(fn: <T extends typeof _dynamic_tag>(cond: T) => T): void;
|
|
14
14
|
export declare let _dynamic_tag: (nodeAccessor: EncodedAccessor, getContent?: ((scope: Scope) => Renderer) | 0, getTagVar?: (() => (scope: Scope, value?: unknown) => void) | 0, inputIsArgs?: 1) => Signal<Renderer | string | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-IujlfJ6b.js");
|
|
3
3
|
require_control_flow.H[0] = require_control_flow.k, require_control_flow.H[1] = require_control_flow.D, require_control_flow.H[2] = require_control_flow.P;
|
|
4
4
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { D as _attr_input_checkedValue_script, H as controllableScripts, P as _attr_input_value_script, k as _attr_input_checked_script } from "../dom-
|
|
1
|
+
import { D as _attr_input_checkedValue_script, H as controllableScripts, P as _attr_input_value_script, k as _attr_input_checked_script } from "../dom-DtKQb840.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 { C as _attr_details_or_dialog_open_script, H as controllableScripts } from "../dom-
|
|
1
|
+
import { C as _attr_details_or_dialog_open_script, H as controllableScripts } from "../dom-DtKQb840.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 { H as controllableScripts, L as _attr_select_value_script } from "../dom-
|
|
1
|
+
import { H as controllableScripts, L as _attr_select_value_script } from "../dom-DtKQb840.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 { H as controllableScripts, P as _attr_input_value_script } from "../dom-
|
|
1
|
+
import { H as controllableScripts, P as _attr_input_value_script } from "../dom-DtKQb840.mjs";
|
|
2
2
|
//#region src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-IujlfJ6b.js");
|
|
3
3
|
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.U.INPUT = require_control_flow.R, require_control_flow.U.TEXTAREA = require_control_flow.V, require_control_flow.U.SELECT = require_control_flow.B, require_control_flow.U.DETAILS = require_control_flow.U.DIALOG = require_control_flow.z;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as _controllable_select, R as _controllable_input, U as controllableSpreadHelpers, V as _controllable_textarea, z as _controllable_open } from "../dom-
|
|
1
|
+
import { B as _controllable_select, R as _controllable_input, U as controllableSpreadHelpers, V as _controllable_textarea, z as _controllable_open } from "../dom-DtKQb840.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
|
@@ -27,6 +27,5 @@ export declare function _lifecycle(scope: Scope, thisObj: Record<string, unknown
|
|
|
27
27
|
onUpdate?: (this: unknown) => void;
|
|
28
28
|
onDestroy?: (this: unknown) => void;
|
|
29
29
|
}, index?: number): void;
|
|
30
|
-
export declare function removeChildNodes(startNode: ChildNode, endNode: ChildNode): void;
|
|
31
|
-
export declare function insertChildNodes(parentNode: ParentNode, referenceNode: Node | null, startNode: Node, endNode: Node):
|
|
32
|
-
export declare function toInsertNode(startNode: Node, endNode: Node): Node;
|
|
30
|
+
export declare function removeChildNodes(startNode: ChildNode, endNode: ChildNode | null): void;
|
|
31
|
+
export declare function insertChildNodes(parentNode: ParentNode, referenceNode: Node | null, startNode: Node, endNode: Node | null): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-IujlfJ6b.js");
|
|
3
3
|
//#region src/dom/dynamic-tag-script.feat.ts
|
|
4
|
-
require_control_flow.
|
|
4
|
+
require_control_flow.xt._d = require_control_flow.xn(require_control_flow.h);
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as dynamicTagScript, xn as withBranches, xt as _resumed } from "../dom-DtKQb840.mjs";
|
|
2
2
|
//#region src/dom/dynamic-tag-script.feat.ts
|
|
3
3
|
_resumed._d = withBranches(dynamicTagScript);
|
|
4
4
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
3
|
-
require_control_flow.
|
|
4
|
-
branch.BR = require_control_flow.
|
|
2
|
+
let require_control_flow = require("../dom-IujlfJ6b.js");
|
|
3
|
+
require_control_flow.rn(), require_control_flow.g((scope, branch, scopeKey, renderer) => {
|
|
4
|
+
branch.BR = require_control_flow.nn(scope, scopeKey), typeof renderer == "string" && branch.T((_) => branch.S);
|
|
5
5
|
});
|
|
6
6
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as installDynamicTagVar, nn as createBranchRenders, rn as installBranchRenders } from "../dom-DtKQb840.mjs";
|
|
2
2
|
installBranchRenders(), installDynamicTagVar((scope, branch, scopeKey, renderer) => {
|
|
3
3
|
branch.BR = createBranchRenders(scope, scopeKey), typeof renderer == "string" && branch.T((_) => branch.S);
|
|
4
4
|
});
|
package/dist/dom/lazy.feat.js
CHANGED
package/dist/dom/lazy.feat.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-IujlfJ6b.js");
|
|
3
3
|
//#region src/dom/placeholder.feat.ts
|
|
4
|
-
require_control_flow.
|
|
5
|
-
tryBranch.P &&= (require_control_flow.
|
|
4
|
+
require_control_flow.xt._f = (tryBranch) => {
|
|
5
|
+
tryBranch.P &&= (require_control_flow.Yt(tryBranch.P), 0);
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Yt as destroyBranch, xt as _resumed } from "../dom-DtKQb840.mjs";
|
|
2
2
|
//#region src/dom/placeholder.feat.ts
|
|
3
3
|
_resumed._f = (tryBranch) => {
|
|
4
4
|
tryBranch.P &&= (destroyBranch(tryBranch.P), 0);
|
package/dist/dom/resume.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare function withLazy(): void;
|
|
|
29
29
|
export declare function initEmbedded(readyId: string, runtimeId?: string): void;
|
|
30
30
|
export declare function init(runtimeId?: string): void;
|
|
31
31
|
export declare let isResuming: undefined | 0 | 1;
|
|
32
|
-
export declare function getRegisteredWithScope<T = unknown>(
|
|
32
|
+
export declare function getRegisteredWithScope<T = unknown>(scope: Scope | undefined, id: string): T;
|
|
33
33
|
export declare function _var_resume<T extends Signal<unknown>>(id: string, signal: T): T;
|
|
34
34
|
export declare function _el(id: string, accessor: EncodedAccessor): (scope: Scope) => (_?: never) => any;
|
|
35
35
|
export declare function _dynamic_tag_var_resume(accessor: EncodedAccessor): void;
|
package/dist/dom/scope.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export declare function destroyBranch(branch: BranchScope): void;
|
|
|
8
8
|
export declare function destroyScope(scope: Scope): void;
|
|
9
9
|
export declare function removeAndDestroyBranch(branch: BranchScope): void;
|
|
10
10
|
export declare function insertBranchBefore(branch: BranchScope, parentNode: ParentNode, nextSibling: Node | null): void;
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function detachBranch(branch: BranchScope): void;
|
package/dist/dom/signals.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare function _if_closure(ownerConditionalNodeAccessor: EncodedAccesso
|
|
|
14
14
|
export declare function subscribeToScopeSet(owner: Record<Accessor, unknown>, accessor: Accessor, scope: Scope): void;
|
|
15
15
|
export declare function _closure(...closureSignals: ReturnType<typeof _closure_get>[]): (scope: Scope) => void;
|
|
16
16
|
export declare function _closure_get(valueAccessor: EncodedAccessor, fn: SignalFn, getOwnerScope?: (scope: Scope) => Scope, resumeId?: string): ((scope: Scope, resumed?: 1) => void) & {
|
|
17
|
-
|
|
17
|
+
scopesAccessor: string;
|
|
18
18
|
signalIndexAccessor: string;
|
|
19
19
|
index: number;
|
|
20
20
|
};
|