marko 6.4.14 → 6.4.16
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/compat.feat.js +1 -1
- package/dist/debug/dom/compat.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-sfzdCRAg.js → dom-BLoTKI2r.js} +3 -3
- package/dist/debug/{dom-BORByF2b.mjs → dom-DlBA4dCe.mjs} +2 -2
- package/dist/debug/dom.js +3 -2
- package/dist/debug/dom.mjs +2 -2
- package/dist/debug/html/compat.feat.js +1 -1
- package/dist/debug/html/compat.feat.mjs +1 -1
- package/dist/debug/{html-DMo6pc_h.mjs → html-DM7X2D_b.mjs} +37 -29
- package/dist/debug/{html-DfZjMkhx.js → html-Du0z056z.js} +37 -29
- package/dist/debug/html.js +1 -1
- package/dist/debug/html.mjs +1 -1
- package/dist/dom/catch.feat.js +1 -1
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/compat.feat.js +1 -1
- package/dist/dom/compat.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-script.feat.js +1 -1
- package/dist/dom/dynamic-tag-script.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/lazy.feat.js +1 -1
- package/dist/dom/lazy.feat.mjs +1 -1
- package/dist/dom/placeholder.feat.js +1 -1
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/renderer.d.ts +1 -1
- package/dist/{dom-DRiewpRL.js → dom-BRtFOIF-.js} +2 -2
- package/dist/{dom-DKn1bCPC.mjs → dom-Cqajrs_w.mjs} +2 -2
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +2 -2
- package/dist/dom.mjs +2 -2
- package/dist/html/assets.d.ts +1 -1
- package/dist/html/compat.feat.js +1 -1
- package/dist/html/compat.feat.mjs +1 -1
- package/dist/html/control-flow.d.ts +9 -9
- package/dist/html/for.d.ts +3 -3
- package/dist/html/inlined-runtimes.d.ts +1 -1
- package/dist/html/inlined-runtimes.debug.d.ts +1 -1
- package/dist/html/serializer.d.ts +2 -0
- package/dist/html/writer.d.ts +3 -2
- package/dist/{html-DrHsybFm.js → html-4A3vJpIT.js} +32 -32
- package/dist/{html-DMDc0zKs.mjs → html-C3dQGQ2x.mjs} +32 -32
- package/dist/html.js +1 -1
- package/dist/html.mjs +1 -1
- package/dist/translator/index.js +251 -160
- package/dist/translator/interop/build-aggregate-error.d.ts +1 -1
- package/dist/translator/util/cyclic-memo.d.ts +2 -0
- package/dist/translator/util/sections.d.ts +1 -0
- package/dist/translator/util/solve-reasons.d.ts +6 -4
- package/dist/translator/util/write-guard.d.ts +2 -0
- package/dist/translator/util/writer.d.ts +1 -2
- package/package.json +4 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { S as _attr_details_or_dialog_open_script, V as controllableScripts } from "../dom-
|
|
1
|
+
import { S as _attr_details_or_dialog_open_script, V as controllableScripts } from "../dom-Cqajrs_w.mjs";
|
|
2
2
|
// src/dom/controllable-open.feat.ts
|
|
3
3
|
controllableScripts[4] = _attr_details_or_dialog_open_script;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { I as _attr_select_value_script, V as controllableScripts } from "../dom-
|
|
1
|
+
import { I as _attr_select_value_script, V as controllableScripts } from "../dom-Cqajrs_w.mjs";
|
|
2
2
|
// src/dom/controllable-select.feat.ts
|
|
3
3
|
controllableScripts[3] = _attr_select_value_script;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { N as _attr_input_value_script, V as controllableScripts } from "../dom-
|
|
1
|
+
import { N as _attr_input_value_script, V as controllableScripts } from "../dom-Cqajrs_w.mjs";
|
|
2
2
|
// src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-BRtFOIF-.js");
|
|
3
3
|
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.H.INPUT = require_control_flow.L, require_control_flow.H.TEXTAREA = require_control_flow.B, require_control_flow.H.SELECT = require_control_flow.z, require_control_flow.H.DETAILS = require_control_flow.H.DIALOG = require_control_flow.R;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as _controllable_textarea, H as controllableSpreadHelpers, L as _controllable_input, R as _controllable_open, z as _controllable_select } from "../dom-
|
|
1
|
+
import { B as _controllable_textarea, H as controllableSpreadHelpers, L as _controllable_input, R as _controllable_open, z as _controllable_select } from "../dom-Cqajrs_w.mjs";
|
|
2
2
|
import "./controllable-input.feat.mjs";
|
|
3
3
|
import "./controllable-open.feat.mjs";
|
|
4
4
|
import "./controllable-select.feat.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { h as dynamicTagScript, xn as withBranches, yt as _resumed } from "../dom-
|
|
1
|
+
import { h as dynamicTagScript, xn as withBranches, yt as _resumed } from "../dom-Cqajrs_w.mjs";
|
|
2
2
|
// src/dom/dynamic-tag-script.feat.ts
|
|
3
3
|
_resumed._d = withBranches(dynamicTagScript);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-BRtFOIF-.js");
|
|
3
3
|
require_control_flow.nn(), require_control_flow.g((scope, branch, scopeKey, renderer) => {
|
|
4
4
|
branch.BR = require_control_flow.tn(scope, scopeKey), typeof renderer == "string" && branch.T((_) => branch.S);
|
|
5
5
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as installDynamicTagVar, nn as installBranchRenders, tn as createBranchRenders } from "../dom-
|
|
1
|
+
import { g as installDynamicTagVar, nn as installBranchRenders, tn as createBranchRenders } from "../dom-Cqajrs_w.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,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../dom-
|
|
2
|
+
let require_control_flow = require("../dom-BRtFOIF-.js");
|
|
3
3
|
// src/dom/placeholder.feat.ts
|
|
4
4
|
require_control_flow.yt._f = (tryBranch) => {
|
|
5
5
|
tryBranch.P &&= (require_control_flow.qt(tryBranch.P), 0);
|
package/dist/dom/renderer.d.ts
CHANGED
|
@@ -22,5 +22,5 @@ export declare function _return_setup<T extends ((...args: any[]) => unknown) &
|
|
|
22
22
|
export declare function _content(id: string, template?: string | 0, walks?: string | 0, setup?: {
|
|
23
23
|
_: Signal<unknown>;
|
|
24
24
|
} | SetupFn | 0, params?: Signal<unknown> | 0, dynamicScopesAccessor?: Accessor): (owner?: Scope) => Renderer;
|
|
25
|
-
export declare function
|
|
25
|
+
export declare function _content_closures_resume(renderer: (owner?: Scope, localValues?: Record<Accessor, unknown>) => Renderer, hasLocalValues?: number): (owner: Scope, ...values: Scope[]) => Renderer;
|
|
26
26
|
export declare function _content_closures(renderer: ReturnType<typeof _content>, closureFns: Record<Accessor, SignalFn>): (owner: Scope, closureValues: Record<Accessor, unknown>) => Renderer;
|
|
@@ -664,7 +664,7 @@ function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
|
664
664
|
f: dynamicScopesAccessor
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function _content_closures_resume(renderer, hasLocalValues = 0) {
|
|
668
668
|
return _resumed[renderer().a] = (owner, ...values) => {
|
|
669
669
|
for (let i = values.length, scope = owner; i > hasLocalValues;) {
|
|
670
670
|
let closures = values[--i];
|
|
@@ -1692,7 +1692,7 @@ Object.defineProperty(exports, "$", {
|
|
|
1692
1692
|
}), Object.defineProperty(exports, "pt", {
|
|
1693
1693
|
enumerable: !0,
|
|
1694
1694
|
get: function() {
|
|
1695
|
-
return
|
|
1695
|
+
return _content_closures_resume;
|
|
1696
1696
|
}
|
|
1697
1697
|
}), Object.defineProperty(exports, "q", {
|
|
1698
1698
|
enumerable: !0,
|
|
@@ -663,7 +663,7 @@ function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
|
663
663
|
f: dynamicScopesAccessor
|
|
664
664
|
});
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function _content_closures_resume(renderer, hasLocalValues = 0) {
|
|
667
667
|
return _resumed[renderer().a] = (owner, ...values) => {
|
|
668
668
|
for (let i = values.length, scope = owner; i > hasLocalValues;) {
|
|
669
669
|
let closures = values[--i];
|
|
@@ -1183,4 +1183,4 @@ function bySecondArg(_item, index) {
|
|
|
1183
1183
|
function byFirstArg(name) {
|
|
1184
1184
|
return name;
|
|
1185
1185
|
}
|
|
1186
|
-
export { _attrs as $, $signalReset as $t, _attr_input_value_attribute_default as A, _el_read as At, _controllable_textarea as B, _or as Bt, _attr_input_checked as C, initEmbedded as Ct, _attr_input_checked_default as D, _closure as Dt, _attr_input_checkedValue_script as E, withLazy as Et, _attr_select_value_default as F, _hoist_resume as Ft, _attr_class_item as G, _var_change as Gt, controllableSpreadHelpers as H, _return_change as Ht, _attr_select_value_script as I, _id as It, _attr_content as J, insertBranchBefore as Jt, _attr_class_items as K, _assert_init as Kt, _controllable_input as L, _if_closure as Lt, _attr_input_value_dynamic_default as M, _for_selector as Mt, _attr_input_value_script as N, _global_read as Nt, _attr_input_checked_script as O, _closure_get as Ot, _attr_select_value as P, _hoist as Pt, _attr_style_items as Q, $signal as Qt, _controllable_open as R, _let as Rt, _attr_details_or_dialog_open_script as S, init as St, _attr_input_checkedValue_default as T, readyFailed as Tt, _attr as U, _script as Ut, controllableScripts as V, _return as Vt, _attr_class as W, _var as Wt, _attr_style as X, syncGen as Xt, _attr_nonce as Y, removeAndDestroyBranch as Yt, _attr_style_item as Z, _on as Zt, renderCatch as _, _assert_hoist as _n, _dynamic_tag_var_resume as _t, _for_in as a, queueAsyncRender as an, _lifecycle as at, _attr_details_or_dialog_open as b, setClassAPIRenderer as bn, _var_resume as bt, _for_to as c, rendering as cn, _text as ct, _for_until_unkeyed as d, runId as dn, _content as dt, onAbort as en, _attrs_content as et, _if as f, forIn as fn, _content_closures as ft, installDynamicTagVar as g, _assert_class_toggles as gn, setupBranch as gt, dynamicTagScript as h, forUntil as hn, createBranch as ht, _dynamic_tag_content as i, prepareEffects as in, _html as it, _attr_input_value_default as j, _for_closure as jt, _attr_input_value as k, _const as kt, _for_to_unkeyed as l, run as ln, _text_content as lt, _try as m, forTo as mn, _return_setup as mt, _await_promise as n, installBranchRenders as nn, _attrs_partial_content as nt, _for_of as o, queueEffect as on, _style_rule_item as ot, _show as p, forOf as pn,
|
|
1186
|
+
export { _attrs as $, $signalReset as $t, _attr_input_value_attribute_default as A, _el_read as At, _controllable_textarea as B, _or as Bt, _attr_input_checked as C, initEmbedded as Ct, _attr_input_checked_default as D, _closure as Dt, _attr_input_checkedValue_script as E, withLazy as Et, _attr_select_value_default as F, _hoist_resume as Ft, _attr_class_item as G, _var_change as Gt, controllableSpreadHelpers as H, _return_change as Ht, _attr_select_value_script as I, _id as It, _attr_content as J, insertBranchBefore as Jt, _attr_class_items as K, _assert_init as Kt, _controllable_input as L, _if_closure as Lt, _attr_input_value_dynamic_default as M, _for_selector as Mt, _attr_input_value_script as N, _global_read as Nt, _attr_input_checked_script as O, _closure_get as Ot, _attr_select_value as P, _hoist as Pt, _attr_style_items as Q, $signal as Qt, _controllable_open as R, _let as Rt, _attr_details_or_dialog_open_script as S, init as St, _attr_input_checkedValue_default as T, readyFailed as Tt, _attr as U, _script as Ut, controllableScripts as V, _return as Vt, _attr_class as W, _var as Wt, _attr_style as X, syncGen as Xt, _attr_nonce as Y, removeAndDestroyBranch as Yt, _attr_style_item as Z, _on as Zt, renderCatch as _, _assert_hoist as _n, _dynamic_tag_var_resume as _t, _for_in as a, queueAsyncRender as an, _lifecycle as at, _attr_details_or_dialog_open as b, setClassAPIRenderer as bn, _var_resume as bt, _for_to as c, rendering as cn, _text as ct, _for_until_unkeyed as d, runId as dn, _content as dt, onAbort as en, _attrs_content as et, _if as f, forIn as fn, _content_closures as ft, installDynamicTagVar as g, _assert_class_toggles as gn, setupBranch as gt, dynamicTagScript as h, forUntil as hn, createBranch as ht, _dynamic_tag_content as i, prepareEffects as in, _html as it, _attr_input_value_default as j, _for_closure as jt, _attr_input_value as k, _const as kt, _for_to_unkeyed as l, run as ln, _text_content as lt, _try as m, forTo as mn, _return_setup as mt, _await_promise as n, installBranchRenders as nn, _attrs_partial_content as nt, _for_of as o, queueEffect as on, _style_rule_item as ot, _show as p, forOf as pn, _content_closures_resume as pt, _attr_class_names as q, destroyBranch as qt, _dynamic_tag as r, installCatch as rn, _attrs_script as rt, _for_of_unkeyed as s, queueRender as sn, _style_shell as st, _await_content as t, createBranchRenders as tn, _attrs_partial as tt, _for_until as u, runEffects as un, _to_text as ut, runPendingEffects as v, _hoist_read_error as vn, _el as vt, _attr_input_checkedValue as w, ready as wt, _attr_details_or_dialog_open_default as x, withBranches as xn, getRegisteredWithScope as xt, startAwait as y, _call as yn, _resumed as yt, _controllable_select as z, _let_change as zt };
|
package/dist/dom.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_class_na
|
|
|
9
9
|
export { _on } from "./dom/event";
|
|
10
10
|
export { _load_event_trigger, _load_idle_trigger, _load_media_trigger, _load_race_trigger, _load_setup, _load_signal, _load_template, _load_visible_trigger, } from "./dom/load";
|
|
11
11
|
export { run } from "./dom/queue";
|
|
12
|
-
export { _content, _content_closures,
|
|
12
|
+
export { _content, _content as _content_resume, _content_closures, _content_closures_resume, _return_setup, } from "./dom/renderer";
|
|
13
13
|
export { _dynamic_tag_var_resume, _el, _resumed, _var_resume, init, initEmbedded, ready, readyFailed, } from "./dom/resume";
|
|
14
14
|
export { _assert_init } from "./dom/scope";
|
|
15
15
|
export { _closure, _closure_get, _const, _el_read, _global_read, _for_closure, _for_selector, _hoist, _hoist_resume, _id, _if_closure, _let, _let_change, _or, _return, _return_change, _script, _var, _var_change, } from "./dom/signals";
|
package/dist/dom.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("./dom-
|
|
2
|
+
let require_control_flow = require("./dom-BRtFOIF-.js"), empty = [], rest = Symbol(), _template = (id, template, walks, setup, inputSignal) => {
|
|
3
3
|
let renderer = require_control_flow.dt(id, template, walks, setup, inputSignal)();
|
|
4
4
|
return renderer.mount = mount, renderer._ = renderer, require_control_flow.yt[id] = renderer;
|
|
5
5
|
}, noop = (_) => 0;
|
|
@@ -121,4 +121,4 @@ function _load_race_trigger(...triggers) {
|
|
|
121
121
|
function getSelectorOrResolve(selector, resolve) {
|
|
122
122
|
return document.querySelector(selector) || resolve();
|
|
123
123
|
}
|
|
124
|
-
exports.$signal = require_control_flow.Qt, exports.$signalReset = require_control_flow.$t, exports._assert_class_toggles = require_control_flow.gn, exports._assert_hoist = require_control_flow._n, exports._assert_init = require_control_flow.Kt, exports._attr = require_control_flow.U, exports._attr_class = require_control_flow.W, exports._attr_class_item = require_control_flow.G, exports._attr_class_items = require_control_flow.K, exports._attr_class_names = require_control_flow.q, exports._attr_content = require_control_flow.J, exports._attr_details_open = require_control_flow.b, exports._attr_dialog_open = require_control_flow.b, exports._attr_details_open_default = require_control_flow.x, exports._attr_dialog_open_default = require_control_flow.x, exports._attr_details_open_script = require_control_flow.S, exports._attr_dialog_open_script = require_control_flow.S, exports._attr_input_checked = require_control_flow.C, exports._attr_input_checkedValue = require_control_flow.w, exports._attr_input_checkedValue_default = require_control_flow.T, exports._attr_input_checkedValue_script = require_control_flow.E, exports._attr_input_checked_default = require_control_flow.D, exports._attr_input_checked_script = require_control_flow.O, exports._attr_input_value = require_control_flow.k, exports._attr_textarea_value = require_control_flow.k, exports._attr_input_value_attribute_default = require_control_flow.A, exports._attr_input_value_default = require_control_flow.j, exports._attr_textarea_value_default = require_control_flow.j, exports._attr_input_value_dynamic_default = require_control_flow.M, exports._attr_input_value_script = require_control_flow.N, exports._attr_textarea_value_script = require_control_flow.N, exports._attr_nonce = require_control_flow.Y, exports._attr_select_value = require_control_flow.P, exports._attr_select_value_default = require_control_flow.F, exports._attr_select_value_script = require_control_flow.I, exports._attr_style = require_control_flow.X, exports._attr_style_item = require_control_flow.Z, exports._attr_style_items = require_control_flow.Q, exports._attrs = require_control_flow.$, exports._attrs_content = require_control_flow.et, exports._attrs_partial = require_control_flow.tt, exports._attrs_partial_content = require_control_flow.nt, exports._attrs_script = require_control_flow.rt, exports._await_content = require_control_flow.t, exports._await_promise = require_control_flow.n, exports._call = require_control_flow.yn, exports._closure = require_control_flow.Dt, exports._closure_get = require_control_flow.Ot, exports._const = require_control_flow.kt, exports._content = require_control_flow.dt, exports._content_closures = require_control_flow.ft, exports.
|
|
124
|
+
exports.$signal = require_control_flow.Qt, exports.$signalReset = require_control_flow.$t, exports._assert_class_toggles = require_control_flow.gn, exports._assert_hoist = require_control_flow._n, exports._assert_init = require_control_flow.Kt, exports._attr = require_control_flow.U, exports._attr_class = require_control_flow.W, exports._attr_class_item = require_control_flow.G, exports._attr_class_items = require_control_flow.K, exports._attr_class_names = require_control_flow.q, exports._attr_content = require_control_flow.J, exports._attr_details_open = require_control_flow.b, exports._attr_dialog_open = require_control_flow.b, exports._attr_details_open_default = require_control_flow.x, exports._attr_dialog_open_default = require_control_flow.x, exports._attr_details_open_script = require_control_flow.S, exports._attr_dialog_open_script = require_control_flow.S, exports._attr_input_checked = require_control_flow.C, exports._attr_input_checkedValue = require_control_flow.w, exports._attr_input_checkedValue_default = require_control_flow.T, exports._attr_input_checkedValue_script = require_control_flow.E, exports._attr_input_checked_default = require_control_flow.D, exports._attr_input_checked_script = require_control_flow.O, exports._attr_input_value = require_control_flow.k, exports._attr_textarea_value = require_control_flow.k, exports._attr_input_value_attribute_default = require_control_flow.A, exports._attr_input_value_default = require_control_flow.j, exports._attr_textarea_value_default = require_control_flow.j, exports._attr_input_value_dynamic_default = require_control_flow.M, exports._attr_input_value_script = require_control_flow.N, exports._attr_textarea_value_script = require_control_flow.N, exports._attr_nonce = require_control_flow.Y, exports._attr_select_value = require_control_flow.P, exports._attr_select_value_default = require_control_flow.F, exports._attr_select_value_script = require_control_flow.I, exports._attr_style = require_control_flow.X, exports._attr_style_item = require_control_flow.Z, exports._attr_style_items = require_control_flow.Q, exports._attrs = require_control_flow.$, exports._attrs_content = require_control_flow.et, exports._attrs_partial = require_control_flow.tt, exports._attrs_partial_content = require_control_flow.nt, exports._attrs_script = require_control_flow.rt, exports._await_content = require_control_flow.t, exports._await_promise = require_control_flow.n, exports._call = require_control_flow.yn, exports._closure = require_control_flow.Dt, exports._closure_get = require_control_flow.Ot, exports._const = require_control_flow.kt, exports._content = require_control_flow.dt, exports._content_resume = require_control_flow.dt, exports._content_closures = require_control_flow.ft, exports._content_closures_resume = require_control_flow.pt, exports._controllable_input = require_control_flow.L, exports._controllable_open = require_control_flow.R, exports._controllable_select = require_control_flow.z, exports._controllable_textarea = require_control_flow.B, exports._dynamic_tag = require_control_flow.r, exports._dynamic_tag_content = require_control_flow.i, exports._dynamic_tag_var_resume = require_control_flow._t, exports._el = require_control_flow.vt, exports._el_read = require_control_flow.At, exports._for_closure = require_control_flow.jt, exports._for_in = require_control_flow.a, exports._for_of = require_control_flow.o, exports._for_of_unkeyed = require_control_flow.s, exports._for_selector = require_control_flow.Mt, exports._for_to = require_control_flow.c, exports._for_to_unkeyed = require_control_flow.l, exports._for_until = require_control_flow.u, exports._for_until_unkeyed = require_control_flow.d, exports._global_read = require_control_flow.Nt, exports._hoist = require_control_flow.Pt, exports._hoist_read_error = require_control_flow.vn, exports._hoist_resume = require_control_flow.Ft, exports._html = require_control_flow.it, exports._id = require_control_flow.It, exports._if = require_control_flow.f, exports._if_closure = require_control_flow.Lt, exports._let = require_control_flow.Rt, exports._let_change = require_control_flow.zt, exports._lifecycle = require_control_flow.at, 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.Zt, exports._or = require_control_flow.Bt, exports._resumed = require_control_flow.yt, exports._return = require_control_flow.Vt, exports._return_change = require_control_flow.Ht, exports._return_setup = require_control_flow.mt, exports._script = require_control_flow.Ut, exports._show = require_control_flow.p, exports._style_rule_item = require_control_flow.ot, exports._style_shell = require_control_flow.st, exports._template = _template, exports._text = require_control_flow.ct, exports._text_content = require_control_flow.lt, exports._to_text = require_control_flow.ut, exports._try = require_control_flow.m, exports._var = require_control_flow.Wt, exports._var_change = require_control_flow.Gt, exports._var_resume = require_control_flow.bt, exports.attrTag = attrTag, exports.attrTags = attrTags, exports.forIn = require_control_flow.fn, exports.forOf = require_control_flow.pn, exports.forTo = require_control_flow.mn, exports.forUntil = require_control_flow.hn, exports.init = require_control_flow.St, exports.initEmbedded = require_control_flow.Ct, exports.onAbort = require_control_flow.en, exports.ready = require_control_flow.wt, exports.readyFailed = require_control_flow.Tt, exports.run = require_control_flow.ln;
|
package/dist/dom.mjs
CHANGED
|
@@ -2,7 +2,7 @@ let empty = [], rest = Symbol(), _template = (id, template, walks, setup, inputS
|
|
|
2
2
|
let renderer = _content(id, template, walks, setup, inputSignal)();
|
|
3
3
|
return renderer.mount = mount, renderer._ = renderer, _resumed[id] = renderer;
|
|
4
4
|
}, noop = (_) => 0;
|
|
5
|
-
import { $ as _attrs, $t as $signalReset, A as _attr_input_value_attribute_default, At as _el_read, B as _controllable_textarea, Bt as _or, C as _attr_input_checked, Ct as initEmbedded, D as _attr_input_checked_default, Dt as _closure, E as _attr_input_checkedValue_script, F as _attr_select_value_default, Ft as _hoist_resume, G as _attr_class_item, Gt as _var_change, Ht as _return_change, I as _attr_select_value_script, It as _id, J as _attr_content, Jt as insertBranchBefore, K as _attr_class_items, Kt as _assert_init, L as _controllable_input, Lt as _if_closure, M as _attr_input_value_dynamic_default, Mt as _for_selector, N as _attr_input_value_script, Nt as _global_read, O as _attr_input_checked_script, Ot as _closure_get, P as _attr_select_value, Pt as _hoist, Q as _attr_style_items, Qt as $signal, R as _controllable_open, Rt as _let, S as _attr_details_or_dialog_open_script, St as init, T as _attr_input_checkedValue_default, Tt as readyFailed, U as _attr, Ut as _script, Vt as _return, W as _attr_class, Wt as _var, X as _attr_style, Xt as syncGen, Y as _attr_nonce, Yt as removeAndDestroyBranch, Z as _attr_style_item, Zt as _on, _ as renderCatch, _n as _assert_hoist, _t as _dynamic_tag_var_resume, a as _for_in, an as queueAsyncRender, at as _lifecycle, b as _attr_details_or_dialog_open, bt as _var_resume, c as _for_to, ct as _text, d as _for_until_unkeyed, dn as runId, dt as _content, en as onAbort, et as _attrs_content, f as _if, fn as forIn, ft as _content_closures, gn as _assert_class_toggles, gt as setupBranch, hn as forUntil, ht as createBranch, i as _dynamic_tag_content, in as prepareEffects, it as _html, j as _attr_input_value_default, jt as _for_closure, k as _attr_input_value, kt as _const, l as _for_to_unkeyed, ln as run, lt as _text_content, m as _try, mn as forTo, mt as _return_setup, n as _await_promise, nt as _attrs_partial_content, o as _for_of, ot as _style_rule_item, p as _show, pn as forOf, pt as
|
|
5
|
+
import { $ as _attrs, $t as $signalReset, A as _attr_input_value_attribute_default, At as _el_read, B as _controllable_textarea, Bt as _or, C as _attr_input_checked, Ct as initEmbedded, D as _attr_input_checked_default, Dt as _closure, E as _attr_input_checkedValue_script, F as _attr_select_value_default, Ft as _hoist_resume, G as _attr_class_item, Gt as _var_change, Ht as _return_change, I as _attr_select_value_script, It as _id, J as _attr_content, Jt as insertBranchBefore, K as _attr_class_items, Kt as _assert_init, L as _controllable_input, Lt as _if_closure, M as _attr_input_value_dynamic_default, Mt as _for_selector, N as _attr_input_value_script, Nt as _global_read, O as _attr_input_checked_script, Ot as _closure_get, P as _attr_select_value, Pt as _hoist, Q as _attr_style_items, Qt as $signal, R as _controllable_open, Rt as _let, S as _attr_details_or_dialog_open_script, St as init, T as _attr_input_checkedValue_default, Tt as readyFailed, U as _attr, Ut as _script, Vt as _return, W as _attr_class, Wt as _var, X as _attr_style, Xt as syncGen, Y as _attr_nonce, Yt as removeAndDestroyBranch, Z as _attr_style_item, Zt as _on, _ as renderCatch, _n as _assert_hoist, _t as _dynamic_tag_var_resume, a as _for_in, an as queueAsyncRender, at as _lifecycle, b as _attr_details_or_dialog_open, bt as _var_resume, c as _for_to, ct as _text, d as _for_until_unkeyed, dn as runId, dt as _content, en as onAbort, et as _attrs_content, f as _if, fn as forIn, ft as _content_closures, gn as _assert_class_toggles, gt as setupBranch, hn as forUntil, ht as createBranch, i as _dynamic_tag_content, in as prepareEffects, it as _html, j as _attr_input_value_default, jt as _for_closure, k as _attr_input_value, kt as _const, l as _for_to_unkeyed, ln as run, lt as _text_content, m as _try, mn as forTo, mt as _return_setup, n as _await_promise, nt as _attrs_partial_content, o as _for_of, ot as _style_rule_item, p as _show, pn as forOf, pt as _content_closures_resume, q as _attr_class_names, r as _dynamic_tag, rt as _attrs_script, s as _for_of_unkeyed, sn as queueRender, st as _style_shell, t as _await_content, tt as _attrs_partial, u as _for_until, un as runEffects, ut as _to_text, vn as _hoist_read_error, vt as _el, w as _attr_input_checkedValue, wt as ready, x as _attr_details_or_dialog_open_default, y as startAwait, yn as _call, yt as _resumed, z as _controllable_select, zt as _let_change } from "./dom-Cqajrs_w.mjs";
|
|
6
6
|
// src/common/attr-tag.ts
|
|
7
7
|
function attrTag(attrs) {
|
|
8
8
|
return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
|
|
@@ -120,4 +120,4 @@ function _load_race_trigger(...triggers) {
|
|
|
120
120
|
function getSelectorOrResolve(selector, resolve) {
|
|
121
121
|
return document.querySelector(selector) || resolve();
|
|
122
122
|
}
|
|
123
|
-
export { $signal, $signalReset, _assert_class_toggles, _assert_hoist, _assert_init, _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_class_names, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_details_or_dialog_open_default as _attr_details_open_default, _attr_details_or_dialog_open_default as _attr_dialog_open_default, _attr_details_or_dialog_open_script as _attr_details_open_script, _attr_details_or_dialog_open_script as _attr_dialog_open_script, _attr_input_checked, _attr_input_checkedValue, _attr_input_checkedValue_default, _attr_input_checkedValue_script, _attr_input_checked_default, _attr_input_checked_script, _attr_input_value, _attr_input_value as _attr_textarea_value, _attr_input_value_attribute_default, _attr_input_value_default, _attr_input_value_default as _attr_textarea_value_default, _attr_input_value_dynamic_default, _attr_input_value_script, _attr_input_value_script as _attr_textarea_value_script, _attr_nonce, _attr_select_value, _attr_select_value_default, _attr_select_value_script, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _await_content, _await_promise, _call, _closure, _closure_get, _const, _content, _content_closures,
|
|
123
|
+
export { $signal, $signalReset, _assert_class_toggles, _assert_hoist, _assert_init, _attr, _attr_class, _attr_class_item, _attr_class_items, _attr_class_names, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_details_or_dialog_open_default as _attr_details_open_default, _attr_details_or_dialog_open_default as _attr_dialog_open_default, _attr_details_or_dialog_open_script as _attr_details_open_script, _attr_details_or_dialog_open_script as _attr_dialog_open_script, _attr_input_checked, _attr_input_checkedValue, _attr_input_checkedValue_default, _attr_input_checkedValue_script, _attr_input_checked_default, _attr_input_checked_script, _attr_input_value, _attr_input_value as _attr_textarea_value, _attr_input_value_attribute_default, _attr_input_value_default, _attr_input_value_default as _attr_textarea_value_default, _attr_input_value_dynamic_default, _attr_input_value_script, _attr_input_value_script as _attr_textarea_value_script, _attr_nonce, _attr_select_value, _attr_select_value_default, _attr_select_value_script, _attr_style, _attr_style_item, _attr_style_items, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_script, _await_content, _await_promise, _call, _closure, _closure_get, _const, _content, _content as _content_resume, _content_closures, _content_closures_resume, _controllable_input, _controllable_open, _controllable_select, _controllable_textarea, _dynamic_tag, _dynamic_tag_content, _dynamic_tag_var_resume, _el, _el_read, _for_closure, _for_in, _for_of, _for_of_unkeyed, _for_selector, _for_to, _for_to_unkeyed, _for_until, _for_until_unkeyed, _global_read, _hoist, _hoist_read_error, _hoist_resume, _html, _id, _if, _if_closure, _let, _let_change, _lifecycle, _load_event_trigger, _load_idle_trigger, _load_media_trigger, _load_race_trigger, _load_setup, _load_signal, _load_template, _load_visible_trigger, _on, _or, _resumed, _return, _return_change, _return_setup, _script, _show, _style_rule_item, _style_shell, _template, _text, _text_content, _to_text, _try, _var, _var_change, _var_resume, attrTag, attrTags, forIn, forOf, forTo, forUntil, init, initEmbedded, onAbort, ready, readyFailed, run };
|
package/dist/html/assets.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ declare module "../common/types" {
|
|
|
44
44
|
[kHead]?: true;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
type AssetFlush = (g: $Global, type: "block" | "defer", asset: string) => string;
|
|
47
|
+
export type AssetFlush = (g: $Global, type: "block" | "defer", asset: string) => string;
|
|
48
48
|
export declare function withLoadAssets(template: () => ServerRenderer, id: string, flush: AssetFlush, assetId: string, triggers?: LoadTrigger[]): ServerRenderer;
|
|
49
49
|
export declare function writeLoadAsset(assetId: string, flush: AssetFlush, triggers?: LoadTrigger[]): void;
|
|
50
50
|
export declare function withPageAssets(template: ServerRenderer & Template, flush: AssetFlush, assetId: string, runtimeId?: string): Template;
|
package/dist/html/compat.feat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let require_control_flow = require("../html-
|
|
2
|
+
let require_control_flow = require("../html-4A3vJpIT.js"), SET_SCOPE_REGISTER_ID = "$C_s", RENDER_BODY_ID = "$C_b", K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
|
|
3
3
|
$global: require_control_flow.A,
|
|
4
4
|
writeLoadAsset: require_control_flow._,
|
|
5
5
|
fork(scopeId, promise, content) {
|
|
@@ -149,7 +149,7 @@ let SET_SCOPE_REGISTER_ID = "$C_s", RENDER_BODY_ID = "$C_b", K_TAGS_API_STATE =
|
|
|
149
149
|
return !!pendingClassFunctions.get($global)?.length;
|
|
150
150
|
}
|
|
151
151
|
}, pendingClassFunctions = /* @__PURE__ */ new WeakMap();
|
|
152
|
-
import { A as $global, F as State, Ft as register, J as _scope_id, M as Boundary, N as Chunk, P as NOOP, Pt as REGISTRY, Q as _set_scope_reason, V as _html, Vt as setClassAPIRenderer, W as _peek_scope_id, Z as _script, _ as writeLoadAsset, at as getChunk, ct as joinHeldEffects, dt as writeScript, j as ALL_GROUPS, k as $chunk, lt as withChunk, ot as getScopeId, st as isInResumedBranch, t as _await, ut as writeScope } from "../html-
|
|
152
|
+
import { A as $global, F as State, Ft as register, J as _scope_id, M as Boundary, N as Chunk, P as NOOP, Pt as REGISTRY, Q as _set_scope_reason, V as _html, Vt as setClassAPIRenderer, W as _peek_scope_id, Z as _script, _ as writeLoadAsset, at as getChunk, ct as joinHeldEffects, dt as writeScript, j as ALL_GROUPS, k as $chunk, lt as withChunk, ot as getScopeId, st as isInResumedBranch, t as _await, ut as writeScope } from "../html-C3dQGQ2x.mjs";
|
|
153
153
|
// src/common/compat-meta.ts
|
|
154
154
|
// src/html/compat.feat.ts
|
|
155
155
|
function drainClassFunctions($global, writeScope) {
|
|
@@ -2,15 +2,15 @@ import { type Accessor, type Falsy } from "../common/types";
|
|
|
2
2
|
import type { ServerRenderer } from "./template";
|
|
3
3
|
export declare function _show_start(display: unknown, markerGuard?: number, branchExprGuard?: number, parentEndTag?: string | 0): void;
|
|
4
4
|
export declare function _show_end(scopeId: number, accessor: Accessor, display: unknown, markerGuard?: number, branchExprGuard?: number, parentEndTag?: string | 0, singleNode?: 1 | 0): void;
|
|
5
|
-
export declare function _for_of(list: Falsy | Iterable<unknown>, cb: (item: unknown, index: number) => void, by: Falsy | ((item: unknown, index: number) =>
|
|
6
|
-
export declare function iterateForOf(list: Falsy | Iterable<unknown>, cb: (item: unknown, index: number) => void, by: Falsy | ((item: unknown, index: number) =>
|
|
7
|
-
export declare function _for_in(obj: Falsy | {}, cb: (key: string, value: unknown) => void, by: Falsy | ((key: string, v: unknown) =>
|
|
8
|
-
export declare function iterateForIn(obj: Falsy | {}, cb: (key: string, value: unknown) => void, by: Falsy | ((key: string, v: unknown) =>
|
|
9
|
-
export declare function _for_to(to: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void, by: Falsy | ((v: number) =>
|
|
10
|
-
export declare function iterateForTo(to: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void, by: Falsy | ((v: number) =>
|
|
11
|
-
export declare function _for_until(until: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void, by: Falsy | ((v: number) =>
|
|
12
|
-
export declare function iterateForUntil(until: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void, by: Falsy | ((v: number) =>
|
|
13
|
-
export type LoopIterate<A, B = void> = (each: 0 | ((itemKey:
|
|
5
|
+
export declare function _for_of(list: Falsy | Iterable<unknown>, cb: (item: unknown, index: number) => void, by: Falsy | string | ((item: unknown, index: number) => string | number), scopeId: number, accessor: Accessor, branchGuard?: number, markerGuard?: number, branchExprGuard?: number, parentEndTag?: string | 0, singleNode?: 1): void;
|
|
6
|
+
export declare function iterateForOf(list: Falsy | Iterable<unknown>, cb: (item: unknown, index: number) => void, by: Falsy | string | ((item: unknown, index: number) => string | number)): LoopIterate<unknown, number>;
|
|
7
|
+
export declare function _for_in(obj: Falsy | {}, cb: (key: string, value: unknown) => void, by: Falsy | ((key: string, v: unknown) => string | number), scopeId: number, accessor: Accessor, branchGuard?: number, markerGuard?: number, branchExprGuard?: number, parentEndTag?: string | 0, singleNode?: 1): void;
|
|
8
|
+
export declare function iterateForIn(obj: Falsy | {}, cb: (key: string, value: unknown) => void, by: Falsy | ((key: string, v: unknown) => string | number)): LoopIterate<string, unknown>;
|
|
9
|
+
export declare function _for_to(to: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void, by: Falsy | ((v: number) => string | number), scopeId: number, accessor: Accessor, branchGuard?: number, markerGuard?: number, branchExprGuard?: number, parentEndTag?: string | 0, singleNode?: 1): void;
|
|
10
|
+
export declare function iterateForTo(to: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void, by: Falsy | ((v: number) => string | number)): LoopIterate<number>;
|
|
11
|
+
export declare function _for_until(until: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void, by: Falsy | ((v: number) => string | number), scopeId: number, accessor: Accessor, branchGuard?: number, markerGuard?: number, branchExprGuard?: number, parentEndTag?: string | 0, singleNode?: 1): void;
|
|
12
|
+
export declare function iterateForUntil(until: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void, by: Falsy | ((v: number) => string | number)): LoopIterate<number>;
|
|
13
|
+
export type LoopIterate<A, B = void> = (each: 0 | ((itemKey: string | number, sameAsIndex: boolean, a: A, b: B) => void)) => void;
|
|
14
14
|
export declare function checkLoopKeys<A, B>(cb: (a: A, b: B) => void, iterate: LoopIterate<A, B>): LoopIterate<A, B>;
|
|
15
15
|
export declare function forBranches<A, B = void>(by: unknown, cb: (a: A, b: B) => void, iterate: LoopIterate<A, B>, scopeId: number, accessor: Accessor, branchGuard: undefined | number, markerGuard: undefined | number, branchExprGuard: undefined | number, parentEndTag: string | undefined | 0, singleNode?: 1): void;
|
|
16
16
|
export declare function _if(cb: () => void | number, scopeId: number, accessor: Accessor, branchGuard?: number, markerGuard?: number, branchExprGuard?: number, parentEndTag?: string | 0, singleNode?: 1): void;
|
package/dist/html/for.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Falsy } from "../common/types";
|
|
2
|
-
export declare function forOfBy(by: Falsy | string | ((item: unknown, index: number) =>
|
|
3
|
-
export declare function forInBy(by: Falsy | ((key: string, value: unknown) =>
|
|
4
|
-
export declare function forStepBy(by: Falsy | ((index: number) =>
|
|
2
|
+
export declare function forOfBy(by: Falsy | string | ((item: unknown, index: number) => string | number), item: unknown, index: number): string | number;
|
|
3
|
+
export declare function forInBy(by: Falsy | ((key: string, value: unknown) => string | number), name: string, value: unknown): string | number;
|
|
4
|
+
export declare function forStepBy(by: Falsy | ((index: number) => string | number), index: number): string | number;
|
|
@@ -1,2 +1,2 @@
|
|
|
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,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(r=l.slice(s+1),(l=l[s])>\"#\"||(a[r]=e),l),r,e),l>\"#\"&&d.push(e)}},self[e]))";
|
|
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,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(r=l.slice(s+1),(l=l[s])>\"#\"||(a[r]=e),l),r,e),l>\"#\"&&d.push(e);n.currentNode=document.currentScript}},self[e]))";
|
|
2
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++:\"T\"==d.tagName&&(a=d.getAttribute(e.i))&&(r=d.nextSibling,i=e=>{d.remove(),o||c(a,d),l.c()},l=t[a]||(o=t[a]={i:1,r:a,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)}}),e.v.push({data:e.i+\"*\"+l.r}),(n=e.j[a])&&(g=l.c,l.c=i=>g()||n(e.r)))}})";
|
|
@@ -1,2 +1,2 @@
|
|
|
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 l: lookup,\n v: visits,\n x() {},\n w(node, op, id) {\n while ((node = walker.nextNode())) {\n // Only reorder markers (\"#\", \"!\") are ever looked up, so only they are\n // kept: the lookup lives as long as the page, and every node marker\n // would otherwise stay referenced in it after resume consumed it.\n doc.x(\n (op =\n (op = node.data) &&\n !op.indexOf(prefix) &&\n ((id = op.slice(prefixLen + 1)),\n (op = op[prefixLen]) > \"#\" || (lookup[id] = node),\n op)),\n id,\n node,\n );\n\n if (op > \"#\") {\n visits.push(node);\n }\n }\n },\n })\n, self[runtimeId]))";
|
|
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 l: lookup,\n v: visits,\n x() {},\n w(node, op, id) {\n while ((node = walker.nextNode())) {\n // Only reorder markers (\"#\", \"!\") are ever looked up, so only they are\n // kept: the lookup lives as long as the page, and every node marker\n // would otherwise stay referenced in it after resume consumed it.\n doc.x(\n (op =\n (op = node.data) &&\n !op.indexOf(prefix) &&\n ((id = op.slice(prefixLen + 1)),\n (op = op[prefixLen]) > \"#\" || (lookup[id] = node),\n op)),\n id,\n node,\n );\n\n if (op > \"#\") {\n visits.push(node);\n }\n }\n\n // Back to the script calling it, which is where the parser is: a node\n // another script appended lies past it, ahead of what streams in later.\n walker.currentNode = document.currentScript;\n },\n })\n, self[runtimeId]))";
|
|
2
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 (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 // The writer streams a reorder only after its markers.\n i: 1,\n r: id,\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 // Opens the chunk's visits for resume to parent to the root's branch; the\n // walk that this chunk's own script triggers closes it.\n runtime.v.push({ data: runtime.i + \"*\" + placeholder.r });\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})";
|
|
@@ -45,6 +45,7 @@ declare class State {
|
|
|
45
45
|
wrapPayload(result: string, extras: string): string;
|
|
46
46
|
writeScopedRegistration(val: WeakKey, parent: Reference | null, accessor: string, registered: Registered): void;
|
|
47
47
|
}
|
|
48
|
+
export declare function writeLocalArgs(state: State, ref: Reference, locals: PartialScope[]): void;
|
|
48
49
|
export declare class Reference {
|
|
49
50
|
debug?: Debug;
|
|
50
51
|
assignments: null | string[];
|
|
@@ -76,6 +77,7 @@ export declare function dropQueuedCall(state: State, value: unknown, object: unk
|
|
|
76
77
|
export declare function register<T extends WeakKey>(id: string, val: T, scope?: unknown, locals?: Locals, access?: string): T;
|
|
77
78
|
export declare function writeDeferred(state: State): void;
|
|
78
79
|
export declare function hasMatchingCalls(state: State, readyId: string | undefined): boolean;
|
|
80
|
+
export declare function writeProp(state: State, val: unknown, parent: Reference | null, accessor: string): boolean;
|
|
79
81
|
export declare function quoteRegistryId(id: string): string;
|
|
80
82
|
export declare function toObjectKey(name: string): string;
|
|
81
83
|
export declare function toAccess(accessor: string): string;
|
package/dist/html/writer.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as Mark from "./constants/mark";
|
|
|
6
6
|
import { K_SCOPE_ID, type Locals, type SerializeChannel, SerializerState } from "./serializer";
|
|
7
7
|
import type { ServerRenderer } from "./template";
|
|
8
8
|
export type PartialScope = Record<Accessor, unknown>;
|
|
9
|
-
interface Channel extends SerializeChannel {
|
|
9
|
+
export interface Channel extends SerializeChannel {
|
|
10
10
|
parent?: Channel;
|
|
11
11
|
resumes: string;
|
|
12
12
|
writeScopes: Record<number, PartialScope>;
|
|
@@ -34,7 +34,6 @@ export declare function _peek_scope_id(): number;
|
|
|
34
34
|
export declare function withContext<T>(key: PropertyKey, value: unknown, cb: () => T): T;
|
|
35
35
|
export declare function withContext<T, U>(key: PropertyKey, value: unknown, cb: (value: U) => T, cbValue: U): T;
|
|
36
36
|
export declare function withContext<T, U, V>(key: PropertyKey, value: unknown, cb: (value: U, value2: V) => T, cbValue: U, cbValue2: V): T;
|
|
37
|
-
export declare function captureContext(chunk: Chunk): void;
|
|
38
37
|
export declare const kBranchId: unique symbol;
|
|
39
38
|
export interface AsyncContent {
|
|
40
39
|
visit?: string;
|
|
@@ -122,7 +121,9 @@ export declare class State implements Channel {
|
|
|
122
121
|
queuePassiveScope(target: Channel, scopeId: number, partialScope: PartialScope): void;
|
|
123
122
|
queueEffect(scopeId: number, registryId: string): void;
|
|
124
123
|
serializeFlush(boundary: Boundary): void;
|
|
124
|
+
getSerializedGlobals(): 0 | Record<string, unknown>;
|
|
125
125
|
runtimeScript(): string;
|
|
126
|
+
captureContext(chunk: Chunk): void;
|
|
126
127
|
keepsTryMarks(chunk: Chunk, resumeWrites: number): boolean;
|
|
127
128
|
resumeScript(resumes: string): string;
|
|
128
129
|
get runtimePrefix(): string;
|
|
@@ -362,13 +362,13 @@ var State$1 = class {
|
|
|
362
362
|
let scope = registered.scope, scopeId = scope[K_SCOPE_ID];
|
|
363
363
|
trackScope(this, scope, scopeId);
|
|
364
364
|
let locals = registered.locals?.(this.boundary.state.scope);
|
|
365
|
-
|
|
366
|
-
this.buf.push(registered.access + "(_(" + scopeId + ")");
|
|
367
|
-
for (let local of locals) this.buf.push(","), writePlainObject(this, local, newArgReference(this, ref, local));
|
|
368
|
-
} else this.buf.push("_(" + scopeId + "," + quoteRegistryId(registered.id));
|
|
369
|
-
this.buf.push(")");
|
|
365
|
+
locals ? (this.buf.push(registered.access + "(_(" + scopeId + ")"), writeLocalArgs(this, ref, locals)) : this.buf.push("_(" + scopeId + "," + quoteRegistryId(registered.id)), this.buf.push(")");
|
|
370
366
|
}
|
|
371
|
-
}
|
|
367
|
+
};
|
|
368
|
+
function writeLocalArgs(state, ref, locals) {
|
|
369
|
+
for (let local of locals) state.buf.push(","), writePlainObject(state, local, newArgReference(state, ref, local));
|
|
370
|
+
}
|
|
371
|
+
var Reference = class {
|
|
372
372
|
assignments = null;
|
|
373
373
|
deferredMembers = null;
|
|
374
374
|
scopeId = void 0;
|
|
@@ -1293,12 +1293,6 @@ function withContext(key, value, cb, cbValue, cbValue2) {
|
|
|
1293
1293
|
ctx[kPendingContexts]--, ctx[key] = prev;
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
function captureContext(chunk) {
|
|
1297
|
-
chunk.context?.[kPendingContexts] && (chunk.context = {
|
|
1298
|
-
...chunk.context,
|
|
1299
|
-
[kPendingContexts]: 0
|
|
1300
|
-
});
|
|
1301
|
-
}
|
|
1302
1296
|
function isInResumedBranch() {
|
|
1303
1297
|
return $chunk?.context?.[kBranchId] !== void 0;
|
|
1304
1298
|
}
|
|
@@ -1510,8 +1504,28 @@ var State = class {
|
|
|
1510
1504
|
serializeFlush(boundary) {
|
|
1511
1505
|
flushSerializer(boundary, this);
|
|
1512
1506
|
}
|
|
1507
|
+
getSerializedGlobals() {
|
|
1508
|
+
let { $global } = this, serializedGlobals = $global.serializedGlobals;
|
|
1509
|
+
if (!serializedGlobals) return 0;
|
|
1510
|
+
let filtered = 0;
|
|
1511
|
+
if (Array.isArray(serializedGlobals)) for (let key of serializedGlobals) {
|
|
1512
|
+
let value = $global[key];
|
|
1513
|
+
value !== void 0 && ((filtered ||= {})[key] = value);
|
|
1514
|
+
}
|
|
1515
|
+
else for (let key in serializedGlobals) if (serializedGlobals[key]) {
|
|
1516
|
+
let value = $global[key];
|
|
1517
|
+
value !== void 0 && ((filtered ||= {})[key] = value);
|
|
1518
|
+
}
|
|
1519
|
+
return filtered;
|
|
1520
|
+
}
|
|
1513
1521
|
runtimeScript() {
|
|
1514
|
-
return "(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,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(r=l.slice(s+1),(l=l[s])>\"#\"||(a[r]=e),l),r,e),l>\"#\"&&d.push(e)}},self[e]))(\"" + this.$global.runtimeId + "\")(\"" + this.$global.renderId + "\")";
|
|
1522
|
+
return "(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,l:a,v:d,x(){},w(e,l,r){for(;e=n.nextNode();)t.x(l=(l=e.data)&&!l.indexOf(f)&&(r=l.slice(s+1),(l=l[s])>\"#\"||(a[r]=e),l),r,e),l>\"#\"&&d.push(e);n.currentNode=document.currentScript}},self[e]))(\"" + this.$global.runtimeId + "\")(\"" + this.$global.renderId + "\")";
|
|
1523
|
+
}
|
|
1524
|
+
captureContext(chunk) {
|
|
1525
|
+
chunk.context?.[kPendingContexts] && (chunk.context = {
|
|
1526
|
+
...chunk.context,
|
|
1527
|
+
[kPendingContexts]: 0
|
|
1528
|
+
});
|
|
1515
1529
|
}
|
|
1516
1530
|
keepsTryMarks(chunk, resumeWrites) {
|
|
1517
1531
|
return chunk !== $chunk || chunk.boundary.resumeWrites !== resumeWrites;
|
|
@@ -1806,7 +1820,7 @@ function flushSerializer(boundary, channel) {
|
|
|
1806
1820
|
}
|
|
1807
1821
|
if (!channel.readyId && !state.hasWrittenGlobals) {
|
|
1808
1822
|
state.hasWrittenGlobals = !0;
|
|
1809
|
-
let globals =
|
|
1823
|
+
let globals = state.getSerializedGlobals();
|
|
1810
1824
|
globals && flushes.push([
|
|
1811
1825
|
0,
|
|
1812
1826
|
globals,
|
|
@@ -1828,7 +1842,7 @@ function flushSerializerGlobals(boundary) {
|
|
|
1828
1842
|
let { state } = boundary;
|
|
1829
1843
|
if (state.hasWrittenGlobals) return;
|
|
1830
1844
|
state.hasWrittenGlobals = !0;
|
|
1831
|
-
let globals =
|
|
1845
|
+
let globals = state.getSerializedGlobals();
|
|
1832
1846
|
globals && (state.needsWalkerRuntime = !0, state.resumes = concatSequence(state.resumes, stringifyScopes(state.serializer, [[
|
|
1833
1847
|
0,
|
|
1834
1848
|
globals,
|
|
@@ -1843,20 +1857,6 @@ function readyBatch(state, channel, deps, resumes) {
|
|
|
1843
1857
|
}
|
|
1844
1858
|
return resumes && own[readyId]++, concatSequence(wait && wait + "}", resumes);
|
|
1845
1859
|
}
|
|
1846
|
-
function getFilteredGlobals($global) {
|
|
1847
|
-
let serializedGlobals = $global.serializedGlobals;
|
|
1848
|
-
if (!serializedGlobals) return 0;
|
|
1849
|
-
let filtered = 0;
|
|
1850
|
-
if (Array.isArray(serializedGlobals)) for (let key of serializedGlobals) {
|
|
1851
|
-
let value = $global[key];
|
|
1852
|
-
value !== void 0 && ((filtered ||= {})[key] = value);
|
|
1853
|
-
}
|
|
1854
|
-
else for (let key in serializedGlobals) if (serializedGlobals[key]) {
|
|
1855
|
-
let value = $global[key];
|
|
1856
|
-
value !== void 0 && ((filtered ||= {})[key] = value);
|
|
1857
|
-
}
|
|
1858
|
-
return filtered;
|
|
1859
|
-
}
|
|
1860
1860
|
function concatEffects(a, b) {
|
|
1861
1861
|
return a ? b ? a + " " + b : a : b;
|
|
1862
1862
|
}
|
|
@@ -2320,7 +2320,7 @@ function _await(scopeId, accessor, promise, content, markerGuard) {
|
|
|
2320
2320
|
return;
|
|
2321
2321
|
}
|
|
2322
2322
|
let chunk = $chunk, { boundary } = chunk, startId = _peek_scope_id(), after = chunk.next = chunk.forkRest(boundary);
|
|
2323
|
-
chunk.async = !0, captureContext(chunk), boundary.startAsync(), promise.then((value) => {
|
|
2323
|
+
chunk.async = !0, boundary.state.captureContext(chunk), boundary.startAsync(), promise.then((value) => {
|
|
2324
2324
|
if (chunk.async && (chunk.async = !1, !boundary.aborted)) {
|
|
2325
2325
|
let { state } = boundary;
|
|
2326
2326
|
chunk.render(() => {
|
|
@@ -2343,7 +2343,7 @@ function _try(scopeId, accessor, content, placeholderContent, catchContent, plac
|
|
|
2343
2343
|
}
|
|
2344
2344
|
function tryPlaceholder(content, placeholder, branchId, scopeId, placeholderBranchId) {
|
|
2345
2345
|
let chunk = $chunk, { boundary } = chunk, body = chunk.fork(boundary, null);
|
|
2346
|
-
body === body.render(content) ? chunk.append(body) : (chunk.next = chunk.forkRest(boundary), captureContext(chunk), chunk.placeholder = {
|
|
2346
|
+
body === body.render(content) ? chunk.append(body) : (chunk.next = chunk.forkRest(boundary), boundary.state.captureContext(chunk), chunk.placeholder = {
|
|
2347
2347
|
body,
|
|
2348
2348
|
render: placeholder,
|
|
2349
2349
|
branchId,
|
|
@@ -2366,7 +2366,7 @@ function tryBoundary(content, catchContent, branchId, renderers) {
|
|
|
2366
2366
|
return reorderId && (chunk.catchRange = {
|
|
2367
2367
|
id: reorderId,
|
|
2368
2368
|
end: bodyEnd
|
|
2369
|
-
}, captureContext(chunk)), bodyBoundary.onNext = () => {
|
|
2369
|
+
}, state.captureContext(chunk)), bodyBoundary.onNext = () => {
|
|
2370
2370
|
if (!boundary.aborted) {
|
|
2371
2371
|
if (bodyBoundary.aborted) {
|
|
2372
2372
|
if (!reorderId) {
|