marko 6.3.39 → 6.3.41
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/meta.d.ts +1 -0
- package/dist/debug/dom/catch.feat.js +1 -1
- package/dist/debug/dom/catch.feat.mjs +1 -1
- package/dist/debug/dom/controllable-input.feat.js +1 -1
- package/dist/debug/dom/controllable-input.feat.mjs +1 -1
- package/dist/debug/dom/controllable-open.feat.js +1 -1
- package/dist/debug/dom/controllable-open.feat.mjs +1 -1
- package/dist/debug/dom/controllable-select.feat.js +1 -1
- package/dist/debug/dom/controllable-select.feat.mjs +1 -1
- package/dist/debug/dom/controllable-textarea.feat.js +1 -1
- package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/debug/dom/controllable.feat.js +1 -1
- package/dist/debug/dom/controllable.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/debug/dom/placeholder.feat.js +10 -0
- package/dist/debug/dom/placeholder.feat.mjs +9 -0
- package/dist/debug/{dom-BkYlHM4b.js → dom-BbtmY5_5.js} +25 -0
- package/dist/debug/{dom-woc_wRhN.mjs → dom-DYV177a1.mjs} +2 -1
- package/dist/debug/dom.js +5 -1
- package/dist/debug/dom.mjs +5 -2
- package/dist/debug/html.js +59 -14
- package/dist/debug/html.mjs +59 -14
- package/dist/dom/catch.feat.js +3 -3
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/compat.d.ts +1 -0
- package/dist/dom/controllable-input.feat.js +1 -1
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +1 -1
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +1 -1
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +1 -1
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.feat.js +1 -1
- package/dist/dom/controllable.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/placeholder.feat.d.ts +1 -0
- package/dist/dom/placeholder.feat.js +6 -0
- package/dist/dom/placeholder.feat.mjs +6 -0
- package/dist/dom/resume.d.ts +1 -0
- package/dist/{dom-CPUybM_C.mjs → dom-BVNolGe1.mjs} +2 -1
- package/dist/{dom-B15s3PHD.js → dom-BfloYt04.js} +55 -44
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +27 -24
- package/dist/dom.mjs +5 -2
- package/dist/html/compat.d.ts +2 -0
- package/dist/html/writer.d.ts +2 -0
- package/dist/html.js +35 -13
- package/dist/html.mjs +35 -13
- package/dist/translator/index.js +7 -4
- package/dist/translator/util/references.d.ts +4 -0
- package/dist/translator/util/runtime.d.ts +1 -1
- package/package.json +6 -3
package/dist/common/meta.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export declare const DEFAULT_RUNTIME_ID = "M";
|
|
|
2
2
|
export declare const DEFAULT_RENDER_ID = "_";
|
|
3
3
|
export declare const DYNAMIC_TAG_SCRIPT_REGISTER_ID: string;
|
|
4
4
|
export declare const DYNAMIC_TAG_VAR_REGISTER_ID: string;
|
|
5
|
+
export declare const PLACEHOLDER_DISMISS_REGISTER_ID: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as
|
|
1
|
+
import { $t as caughtError, Dn as ParentBranch, On as PendingEffects, Sn as ClosestBranch, bn as Scope, en as installCatch, g as renderCatch, kn as PendingRenders, tn as placeholderShown, yn as Pending } from "../dom-DYV177a1.mjs";
|
|
2
2
|
//#region src/dom/catch.feat.ts
|
|
3
3
|
const handlePendingTry = (fn, scope, branch) => {
|
|
4
4
|
while (branch) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BbtmY5_5.js");
|
|
3
3
|
//#region src/dom/controllable-input.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[0] = require_control_flow._attr_input_checked_script;
|
|
5
5
|
require_control_flow.controllableScripts[1] = require_control_flow._attr_input_checkedValue_script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as _attr_input_value_script, C as _attr_input_checkedValue_script, T as _attr_input_checked_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { A as _attr_input_value_script, C as _attr_input_checkedValue_script, T as _attr_input_checked_script, z as controllableScripts } from "../dom-DYV177a1.mjs";
|
|
2
2
|
//#region src/dom/controllable-input.feat.ts
|
|
3
3
|
controllableScripts[0] = _attr_input_checked_script;
|
|
4
4
|
controllableScripts[1] = _attr_input_checkedValue_script;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BbtmY5_5.js");
|
|
3
3
|
//#region src/dom/controllable-open.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[4] = require_control_flow._attr_details_or_dialog_open_script;
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as _attr_details_or_dialog_open_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { y as _attr_details_or_dialog_open_script, z as controllableScripts } from "../dom-DYV177a1.mjs";
|
|
2
2
|
//#region src/dom/controllable-open.feat.ts
|
|
3
3
|
controllableScripts[4] = _attr_details_or_dialog_open_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BbtmY5_5.js");
|
|
3
3
|
//#region src/dom/controllable-select.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[3] = require_control_flow._attr_select_value_script;
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as _attr_select_value_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { N as _attr_select_value_script, z as controllableScripts } from "../dom-DYV177a1.mjs";
|
|
2
2
|
//#region src/dom/controllable-select.feat.ts
|
|
3
3
|
controllableScripts[3] = _attr_select_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BbtmY5_5.js");
|
|
3
3
|
//#region src/dom/controllable-textarea.feat.ts
|
|
4
4
|
require_control_flow.controllableScripts[2] = require_control_flow._attr_input_value_script;
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as _attr_input_value_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { A as _attr_input_value_script, z as controllableScripts } from "../dom-DYV177a1.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
|
-
import { F as _controllable_open, I as _controllable_select, L as _controllable_textarea, P as _controllable_input, R as controllableRenders } from "../dom-
|
|
1
|
+
import { F as _controllable_open, I as _controllable_select, L as _controllable_textarea, P as _controllable_input, R as controllableRenders } from "../dom-DYV177a1.mjs";
|
|
2
2
|
import "./controllable-input.feat.mjs";
|
|
3
3
|
import "./controllable-open.feat.mjs";
|
|
4
4
|
import "./controllable-select.feat.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-BbtmY5_5.js");
|
|
3
3
|
//#region src/dom/dynamic-tag-var.feat.ts
|
|
4
4
|
const elementGetter = (branch) => () => require_control_flow._el_read(branch[require_control_flow.StartNode]);
|
|
5
5
|
require_control_flow.installDynamicTagVar((branch) => branch[require_control_flow.TagVariable](elementGetter(branch)));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mn as TagVariable, Ot as _el_read, Yt as DYNAMIC_TAG_VAR_REGISTER_ID, gt as _resume, jn as StartNode, m as installDynamicTagVar } from "../dom-DYV177a1.mjs";
|
|
2
2
|
//#region src/dom/dynamic-tag-var.feat.ts
|
|
3
3
|
const elementGetter = (branch) => () => _el_read(branch[StartNode]);
|
|
4
4
|
installDynamicTagVar((branch) => branch[TagVariable](elementGetter(branch)));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const require_control_flow = require("../dom-BbtmY5_5.js");
|
|
3
|
+
//#region src/dom/placeholder.feat.ts
|
|
4
|
+
require_control_flow.registeredValues[require_control_flow.PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
|
|
5
|
+
if (tryBranch["#PlaceholderBranch"]) {
|
|
6
|
+
require_control_flow.destroyBranch(tryBranch[require_control_flow.PlaceholderBranch]);
|
|
7
|
+
tryBranch[require_control_flow.PlaceholderBranch] = 0;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { An as PlaceholderBranch, St as registeredValues, Wt as destroyBranch, Xt as PLACEHOLDER_DISMISS_REGISTER_ID } from "../dom-DYV177a1.mjs";
|
|
2
|
+
//#region src/dom/placeholder.feat.ts
|
|
3
|
+
registeredValues[PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
|
|
4
|
+
if (tryBranch["#PlaceholderBranch"]) {
|
|
5
|
+
destroyBranch(tryBranch[PlaceholderBranch]);
|
|
6
|
+
tryBranch[PlaceholderBranch] = 0;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
@@ -453,6 +453,7 @@ function abort(ctrl) {
|
|
|
453
453
|
//#region src/common/meta.ts
|
|
454
454
|
const DYNAMIC_TAG_SCRIPT_REGISTER_ID = "_dynamicTagScript";
|
|
455
455
|
const DYNAMIC_TAG_VAR_REGISTER_ID = "_dynamicTagVar";
|
|
456
|
+
const PLACEHOLDER_DISMISS_REGISTER_ID = "_placeholderDismiss";
|
|
456
457
|
//#endregion
|
|
457
458
|
//#region src/common/opt.ts
|
|
458
459
|
function toArray(opt) {
|
|
@@ -2139,6 +2140,12 @@ Object.defineProperty(exports, "Owner", {
|
|
|
2139
2140
|
return Owner;
|
|
2140
2141
|
}
|
|
2141
2142
|
});
|
|
2143
|
+
Object.defineProperty(exports, "PLACEHOLDER_DISMISS_REGISTER_ID", {
|
|
2144
|
+
enumerable: true,
|
|
2145
|
+
get: function() {
|
|
2146
|
+
return PLACEHOLDER_DISMISS_REGISTER_ID;
|
|
2147
|
+
}
|
|
2148
|
+
});
|
|
2142
2149
|
Object.defineProperty(exports, "Params", {
|
|
2143
2150
|
enumerable: true,
|
|
2144
2151
|
get: function() {
|
|
@@ -2169,6 +2176,12 @@ Object.defineProperty(exports, "PendingRenders", {
|
|
|
2169
2176
|
return PendingRenders;
|
|
2170
2177
|
}
|
|
2171
2178
|
});
|
|
2179
|
+
Object.defineProperty(exports, "PlaceholderBranch", {
|
|
2180
|
+
enumerable: true,
|
|
2181
|
+
get: function() {
|
|
2182
|
+
return PlaceholderBranch;
|
|
2183
|
+
}
|
|
2184
|
+
});
|
|
2172
2185
|
Object.defineProperty(exports, "Scope", {
|
|
2173
2186
|
enumerable: true,
|
|
2174
2187
|
get: function() {
|
|
@@ -2541,6 +2554,12 @@ Object.defineProperty(exports, "_hoist", {
|
|
|
2541
2554
|
return _hoist;
|
|
2542
2555
|
}
|
|
2543
2556
|
});
|
|
2557
|
+
Object.defineProperty(exports, "_hoist_read_error", {
|
|
2558
|
+
enumerable: true,
|
|
2559
|
+
get: function() {
|
|
2560
|
+
return _hoist_read_error;
|
|
2561
|
+
}
|
|
2562
|
+
});
|
|
2544
2563
|
Object.defineProperty(exports, "_hoist_resume", {
|
|
2545
2564
|
enumerable: true,
|
|
2546
2565
|
get: function() {
|
|
@@ -2835,6 +2854,12 @@ Object.defineProperty(exports, "ready", {
|
|
|
2835
2854
|
return ready;
|
|
2836
2855
|
}
|
|
2837
2856
|
});
|
|
2857
|
+
Object.defineProperty(exports, "registeredValues", {
|
|
2858
|
+
enumerable: true,
|
|
2859
|
+
get: function() {
|
|
2860
|
+
return registeredValues;
|
|
2861
|
+
}
|
|
2862
|
+
});
|
|
2838
2863
|
Object.defineProperty(exports, "removeAndDestroyBranch", {
|
|
2839
2864
|
enumerable: true,
|
|
2840
2865
|
get: function() {
|
|
@@ -452,6 +452,7 @@ function abort(ctrl) {
|
|
|
452
452
|
//#region src/common/meta.ts
|
|
453
453
|
const DYNAMIC_TAG_SCRIPT_REGISTER_ID = "_dynamicTagScript";
|
|
454
454
|
const DYNAMIC_TAG_VAR_REGISTER_ID = "_dynamicTagVar";
|
|
455
|
+
const PLACEHOLDER_DISMISS_REGISTER_ID = "_placeholderDismiss";
|
|
455
456
|
//#endregion
|
|
456
457
|
//#region src/common/opt.ts
|
|
457
458
|
function toArray(opt) {
|
|
@@ -2072,4 +2073,4 @@ function byFirstArg(name) {
|
|
|
2072
2073
|
return name;
|
|
2073
2074
|
}
|
|
2074
2075
|
//#endregion
|
|
2075
|
-
export { _attrs_script as $,
|
|
2076
|
+
export { _attrs_script as $, caughtError as $t, _attr_input_value_script as A, PlaceholderBranch as An, _for_selector as At, _attr as B, _script as Bt, _attr_input_checkedValue_script as C, EndNode as Cn, withLazy as Ct, _attr_input_value_attribute_default as D, ParentBranch as Dn, _const as Dt, _attr_input_value as E, Load as En, _closure_get as Et, _controllable_open as F, _let as Ft, _attr_nonce as G, insertBranchBefore as Gt, _attr_class_item as H, _var_change as Ht, _controllable_select as I, _let_change as It, _attr_style_items as J, _on as Jt, _attr_style as K, removeAndDestroyBranch as Kt, _controllable_textarea as L, _or as Lt, _attr_select_value_default as M, TagVariable as Mn, _hoist_resume as Mt, _attr_select_value_script as N, _id as Nt, _attr_input_value_default as O, PendingEffects as On, _el_read as Ot, _controllable_input as P, _if_closure as Pt, _attrs_partial_content as Q, $signalReset as Qt, controllableRenders as R, _return as Rt, _attr_input_checkedValue_default as S, ClosestBranch as Sn, registeredValues as St, _attr_input_checked_script as T, Global as Tn, _closure as Tt, _attr_class_items as U, _assert_init as Ut, _attr_class as V, _var as Vt, _attr_content as W, destroyBranch as Wt, _attrs_content as X, PLACEHOLDER_DISMISS_REGISTER_ID as Xt, _attrs as Y, DYNAMIC_TAG_VAR_REGISTER_ID as Yt, _attrs_partial as Z, $signal as Zt, _attr_details_or_dialog_open as _, Params as _n, _var_resume as _t, _for_in as a, run as an, _text_content as at, _attr_input_checked as b, Scope as bn, initEmbedded as bt, _for_until as c, forIn as cn, toInsertNode as ct, _show as d, forUntil as dn, _content_resume as dt, installCatch as en, _html as et, _try as f, _assert_hoist as fn, createAndSetupBranch as ft, renderCatch as g, Owner as gn, _resume as gt, patchDynamicTag as h, Clone as hn, _el as ht, _dynamic_tag_content as i, queueEffect as in, _text as it, _attr_select_value as j, StartNode as jn, _hoist as jt, _attr_input_value_dynamic_default as k, PendingRenders as kn, _for_closure as kt, _if as l, forOf as ln, _content as lt, installDynamicTagVar as m, _call as mn, setupBranch as mt, _await_promise as n, prepareEffects as nn, _style_rule_item as nt, _for_of as o, runEffects as on, _to_text as ot, addAwaitCounter as p, _hoist_read_error as pn, createBranch as pt, _attr_style_item as q, syncGen as qt, _dynamic_tag as r, queueAsyncRender as rn, _style_shell as rt, _for_to as s, runId as sn, insertChildNodes as st, _await_content as t, placeholderShown as tn, _lifecycle as tt, _resume_dynamic_tag as u, forTo as un, _content_closures as ut, _attr_details_or_dialog_open_default as v, Setup as vn, getRegisteredWithScope as vt, _attr_input_checked_default as w, Gen$1 as wn, _child_setup as wt, _attr_input_checkedValue as x, AwaitCounter as xn, ready as xt, _attr_details_or_dialog_open_script as y, Pending as yn, init as yt, controllableScripts as z, _return_change as zt };
|
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-BbtmY5_5.js");
|
|
4
4
|
//#region src/common/attr-tag.ts
|
|
5
5
|
const empty = [];
|
|
6
6
|
const rest = Symbol("Attribute Tag");
|
|
@@ -58,6 +58,9 @@ const compat = {
|
|
|
58
58
|
setClassEventResolver(fn) {
|
|
59
59
|
classEventResolver = fn;
|
|
60
60
|
},
|
|
61
|
+
resumeClassFunction(id, build) {
|
|
62
|
+
require_control_flow._resume(id, build);
|
|
63
|
+
},
|
|
61
64
|
getScope($global, scopeId) {
|
|
62
65
|
return getRenderScopes($global)?.[scopeId];
|
|
63
66
|
},
|
|
@@ -364,6 +367,7 @@ exports._for_selector = require_control_flow._for_selector;
|
|
|
364
367
|
exports._for_to = require_control_flow._for_to;
|
|
365
368
|
exports._for_until = require_control_flow._for_until;
|
|
366
369
|
exports._hoist = require_control_flow._hoist;
|
|
370
|
+
exports._hoist_read_error = require_control_flow._hoist_read_error;
|
|
367
371
|
exports._hoist_resume = require_control_flow._hoist_resume;
|
|
368
372
|
exports._html = require_control_flow._html;
|
|
369
373
|
exports._id = require_control_flow._id;
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as _attrs_script, A as _attr_input_value_script, At as
|
|
1
|
+
import { $ as _attrs_script, A as _attr_input_value_script, At as _for_selector, B as _attr, Bt as _script, C as _attr_input_checkedValue_script, Cn as EndNode, Ct as withLazy, D as _attr_input_value_attribute_default, Dt as _const, E as _attr_input_value, En as Load, Et as _closure_get, F as _controllable_open, Ft as _let, G as _attr_nonce, Gt as insertBranchBefore, H as _attr_class_item, Ht as _var_change, I as _controllable_select, It as _let_change, J as _attr_style_items, Jt as _on, K as _attr_style, Kt as removeAndDestroyBranch, L as _controllable_textarea, Lt as _or, M as _attr_select_value_default, Mn as TagVariable, Mt as _hoist_resume, N as _attr_select_value_script, Nt as _id, O as _attr_input_value_default, Ot as _el_read, P as _controllable_input, Pt as _if_closure, Q as _attrs_partial_content, Qt as $signalReset, Rt as _return, S as _attr_input_checkedValue_default, T as _attr_input_checked_script, Tn as Global, Tt as _closure, U as _attr_class_items, Ut as _assert_init, V as _attr_class, Vt as _var, W as _attr_content, Wt as destroyBranch, X as _attrs_content, Y as _attrs, Z as _attrs_partial, Zt as $signal, _ as _attr_details_or_dialog_open, _n as Params, _t as _var_resume, a as _for_in, an as run, at as _text_content, b as _attr_input_checked, bt as initEmbedded, c as _for_until, cn as forIn, ct as toInsertNode, d as _show, dn as forUntil, dt as _content_resume, et as _html, f as _try, fn as _assert_hoist, ft as createAndSetupBranch, g as renderCatch, gn as Owner, gt as _resume, h as patchDynamicTag, hn as Clone, ht as _el, i as _dynamic_tag_content, in as queueEffect, it as _text, j as _attr_select_value, jn as StartNode, jt as _hoist, k as _attr_input_value_dynamic_default, kt as _for_closure, l as _if, ln as forOf, lt as _content, mn as _call, mt as setupBranch, n as _await_promise, nn as prepareEffects, nt as _style_rule_item, o as _for_of, on as runEffects, ot as _to_text, p as addAwaitCounter, pn as _hoist_read_error, pt as createBranch, q as _attr_style_item, qt as syncGen, r as _dynamic_tag, rn as queueAsyncRender, rt as _style_shell, s as _for_to, sn as runId, st as insertChildNodes, t as _await_content, tt as _lifecycle, u as _resume_dynamic_tag, un as forTo, ut as _content_closures, v as _attr_details_or_dialog_open_default, vn as Setup, vt as getRegisteredWithScope, w as _attr_input_checked_default, wt as _child_setup, x as _attr_input_checkedValue, xt as ready, y as _attr_details_or_dialog_open_script, yt as init, zt as _return_change } from "./dom-DYV177a1.mjs";
|
|
2
2
|
//#region src/common/attr-tag.ts
|
|
3
3
|
const empty = [];
|
|
4
4
|
const rest = Symbol("Attribute Tag");
|
|
@@ -56,6 +56,9 @@ const compat = {
|
|
|
56
56
|
setClassEventResolver(fn) {
|
|
57
57
|
classEventResolver = fn;
|
|
58
58
|
},
|
|
59
|
+
resumeClassFunction(id, build) {
|
|
60
|
+
_resume(id, build);
|
|
61
|
+
},
|
|
59
62
|
getScope($global, scopeId) {
|
|
60
63
|
return getRenderScopes($global)?.[scopeId];
|
|
61
64
|
},
|
|
@@ -291,4 +294,4 @@ function getSelectorOrResolve(selector, resolve) {
|
|
|
291
294
|
return document.querySelector(selector) || (console.warn(`A lazy load trigger could not find an element matching "${selector}". The module was loaded immediately.`), resolve());
|
|
292
295
|
}
|
|
293
296
|
//#endregion
|
|
294
|
-
export { $signal, $signalReset, _assert_hoist, _assert_init, _attr, _attr_class, _attr_class_item, _attr_class_items, _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, _child_setup, _closure, _closure_get, _const, _content, _content_closures, _content_resume, _controllable_input, _controllable_open, _controllable_select, _controllable_textarea, _dynamic_tag, _dynamic_tag_content, _el, _el_read, _for_closure, _for_in, _for_of, _for_selector, _for_to, _for_until, _hoist, _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, _resume, _resume_dynamic_tag, _return, _return_change, _script, _show, _style_rule_item, _style_shell, _template, _text, _text_content, _to_text, _try, _var, _var_change, _var_resume, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, init, initEmbedded, ready, run };
|
|
297
|
+
export { $signal, $signalReset, _assert_hoist, _assert_init, _attr, _attr_class, _attr_class_item, _attr_class_items, _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, _child_setup, _closure, _closure_get, _const, _content, _content_closures, _content_resume, _controllable_input, _controllable_open, _controllable_select, _controllable_textarea, _dynamic_tag, _dynamic_tag_content, _el, _el_read, _for_closure, _for_in, _for_of, _for_selector, _for_to, _for_until, _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, _resume, _resume_dynamic_tag, _return, _return_change, _script, _show, _style_rule_item, _style_shell, _template, _text, _text_content, _to_text, _try, _var, _var_change, _var_resume, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, init, initEmbedded, ready, run };
|
package/dist/debug/html.js
CHANGED
|
@@ -32,6 +32,7 @@ const BranchAccessor = "#BranchAccessor";
|
|
|
32
32
|
const CatchContent = "#CatchContent";
|
|
33
33
|
const ClosestBranchId = "#ClosestBranchId";
|
|
34
34
|
const LoopKey = "#LoopKey";
|
|
35
|
+
const PlaceholderBranch = "#PlaceholderBranch";
|
|
35
36
|
const PlaceholderContent = "#PlaceholderContent";
|
|
36
37
|
const Renderer = "#Renderer";
|
|
37
38
|
const TagVariable = "#TagVariable";
|
|
@@ -256,6 +257,7 @@ function joinWithAnd(a) {
|
|
|
256
257
|
//#region src/common/meta.ts
|
|
257
258
|
const DYNAMIC_TAG_SCRIPT_REGISTER_ID = "_dynamicTagScript";
|
|
258
259
|
const DYNAMIC_TAG_VAR_REGISTER_ID = "_dynamicTagVar";
|
|
260
|
+
const PLACEHOLDER_DISMISS_REGISTER_ID = "_placeholderDismiss";
|
|
259
261
|
//#endregion
|
|
260
262
|
//#region src/html/content.ts
|
|
261
263
|
function _to_text(val) {
|
|
@@ -2276,12 +2278,13 @@ function _await(scopeId, accessor, promise, content, serializeMarker) {
|
|
|
2276
2278
|
});
|
|
2277
2279
|
}
|
|
2278
2280
|
function _try(scopeId, accessor, content, input) {
|
|
2279
|
-
const branchId = _peek_scope_id();
|
|
2280
|
-
$chunk.writeHTML($chunk.boundary.state.mark("[", ""));
|
|
2281
2281
|
const catchContent = input.catch ? normalizeDynamicRenderer(input.catch) || 0 : void 0;
|
|
2282
2282
|
const placeholderContent = normalizeDynamicRenderer(input.placeholder);
|
|
2283
|
-
|
|
2284
|
-
|
|
2283
|
+
const placeholderBranchId = placeholderContent ? _scope_id() : 0;
|
|
2284
|
+
const branchId = _peek_scope_id();
|
|
2285
|
+
$chunk.writeHTML($chunk.boundary.state.mark("[", ""));
|
|
2286
|
+
if (catchContent !== void 0) tryCatch(placeholderContent ? () => tryPlaceholder(content, placeholderContent, branchId, scopeId, placeholderBranchId) : content, catchContent || (() => {}));
|
|
2287
|
+
else if (placeholderContent) tryPlaceholder(content, placeholderContent, branchId, scopeId, placeholderBranchId);
|
|
2285
2288
|
else content();
|
|
2286
2289
|
writeScope(branchId, {
|
|
2287
2290
|
[BranchAccessor]: accessor,
|
|
@@ -2290,7 +2293,7 @@ function _try(scopeId, accessor, content, input) {
|
|
|
2290
2293
|
});
|
|
2291
2294
|
$chunk.writeHTML($chunk.boundary.state.mark("]", scopeId + " " + accessor + " " + branchId));
|
|
2292
2295
|
}
|
|
2293
|
-
function tryPlaceholder(content, placeholder, branchId) {
|
|
2296
|
+
function tryPlaceholder(content, placeholder, branchId, scopeId, placeholderBranchId) {
|
|
2294
2297
|
const chunk = $chunk;
|
|
2295
2298
|
const { boundary } = chunk;
|
|
2296
2299
|
const body = chunk.fork(boundary, null);
|
|
@@ -2302,7 +2305,9 @@ function tryPlaceholder(content, placeholder, branchId) {
|
|
|
2302
2305
|
chunk.placeholder = {
|
|
2303
2306
|
body,
|
|
2304
2307
|
render: placeholder,
|
|
2305
|
-
branchId
|
|
2308
|
+
branchId,
|
|
2309
|
+
scopeId,
|
|
2310
|
+
placeholderBranchId
|
|
2306
2311
|
};
|
|
2307
2312
|
}
|
|
2308
2313
|
function tryCatch(content, catchContent) {
|
|
@@ -2519,11 +2524,21 @@ var Chunk = class Chunk {
|
|
|
2519
2524
|
const body = placeholder.body.consume();
|
|
2520
2525
|
if (body.async) {
|
|
2521
2526
|
const { state } = this.boundary;
|
|
2522
|
-
const
|
|
2527
|
+
const { branchId, scopeId, placeholderBranchId } = placeholder;
|
|
2528
|
+
const reorderId = body.reorderId = branchId ? branchId + "" : state.nextReorderId();
|
|
2523
2529
|
this.writeHTML(state.mark("!^", reorderId));
|
|
2524
|
-
const
|
|
2530
|
+
const { effects } = this;
|
|
2531
|
+
const beforeBranch = deferBranchStart(this);
|
|
2532
|
+
const after = this.render(() => withBranchId(placeholderBranchId, placeholder.render));
|
|
2533
|
+
const stateful = after === this && this.effects !== effects;
|
|
2534
|
+
applyBranchStart(this, beforeBranch, stateful);
|
|
2525
2535
|
if (after !== this) this.boundary.abort(/* @__PURE__ */ new Error("An @placeholder cannot contain async content."));
|
|
2526
|
-
|
|
2536
|
+
else if (stateful) {
|
|
2537
|
+
this.render(() => writeScope(branchId, { [PlaceholderBranch]: scopeWithId(state, placeholderBranchId) }));
|
|
2538
|
+
this.writeHTML(state.mark("]", scopeId + " " + (PlaceholderBranch + branchId) + " " + placeholderBranchId));
|
|
2539
|
+
body.writeEffect(branchId, PLACEHOLDER_DISMISS_REGISTER_ID);
|
|
2540
|
+
}
|
|
2541
|
+
this.writeHTML(state.mark("!", reorderId));
|
|
2527
2542
|
state.reorder(body);
|
|
2528
2543
|
} else {
|
|
2529
2544
|
body.next = this.next;
|
|
@@ -2631,11 +2646,6 @@ var Chunk = class Chunk {
|
|
|
2631
2646
|
needsWalk = true;
|
|
2632
2647
|
state.resumes = state.resumes ? state.resumes + ",\"" + effects + "\"" : "\"" + effects + "\"";
|
|
2633
2648
|
}
|
|
2634
|
-
if (state.resumes) if (state.hasWrittenResume) scripts = concatScripts(scripts, runtimePrefix + ".r.push(" + state.resumes + ")");
|
|
2635
|
-
else {
|
|
2636
|
-
state.hasWrittenResume = true;
|
|
2637
|
-
scripts = concatScripts(scripts, runtimePrefix + ".r=[" + state.resumes + "]");
|
|
2638
|
-
}
|
|
2639
2649
|
if (state.writeReorders) {
|
|
2640
2650
|
let carried = null;
|
|
2641
2651
|
for (const reorderedChunk of state.writeReorders) {
|
|
@@ -2691,6 +2701,12 @@ var Chunk = class Chunk {
|
|
|
2691
2701
|
}
|
|
2692
2702
|
state.writeReorders = carried;
|
|
2693
2703
|
}
|
|
2704
|
+
flushSerializer(boundary, state);
|
|
2705
|
+
if (state.resumes) if (state.hasWrittenResume) scripts = concatScripts(scripts, runtimePrefix + ".r.push(" + state.resumes + ")");
|
|
2706
|
+
else {
|
|
2707
|
+
state.hasWrittenResume = true;
|
|
2708
|
+
scripts = concatScripts(scripts, runtimePrefix + ".r=[" + state.resumes + "]");
|
|
2709
|
+
}
|
|
2694
2710
|
if (needsWalk) scripts = concatScripts(scripts, runtimePrefix + ".w()");
|
|
2695
2711
|
this.html = html;
|
|
2696
2712
|
this.scripts = scripts;
|
|
@@ -3554,6 +3570,15 @@ const compat = {
|
|
|
3554
3570
|
for (const key in input) normalizedInput[key === "renderBody" ? "content" : key] = input[key];
|
|
3555
3571
|
}
|
|
3556
3572
|
head.render(() => {
|
|
3573
|
+
if (this.hasPendingClassFunctions(classAPIOut.global)) drainClassFunctions(classAPIOut.global, (hostId) => {
|
|
3574
|
+
const fnScopeId = _scope_id();
|
|
3575
|
+
const scope = writeScope(fnScopeId, {
|
|
3576
|
+
m5c: component.id,
|
|
3577
|
+
m5h: hostId
|
|
3578
|
+
});
|
|
3579
|
+
_script(fnScopeId, SET_SCOPE_REGISTER_ID);
|
|
3580
|
+
return scope;
|
|
3581
|
+
});
|
|
3557
3582
|
if (willRerender || registerChildScope) {
|
|
3558
3583
|
const scopeId = _peek_scope_id();
|
|
3559
3584
|
writeScope(scopeId, { m5c: component.id });
|
|
@@ -3597,8 +3622,28 @@ const compat = {
|
|
|
3597
3622
|
const value = input[key];
|
|
3598
3623
|
if (typeof value === "function" && !getRegistered(value)) register(RENDER_BODY_ID, value);
|
|
3599
3624
|
}
|
|
3625
|
+
},
|
|
3626
|
+
registerClassFunction($global, id, fn, hostId) {
|
|
3627
|
+
let pending = pendingClassFunctions.get($global);
|
|
3628
|
+
if (!pending) pendingClassFunctions.set($global, pending = []);
|
|
3629
|
+
pending.push([
|
|
3630
|
+
id,
|
|
3631
|
+
fn,
|
|
3632
|
+
hostId
|
|
3633
|
+
]);
|
|
3634
|
+
return fn;
|
|
3635
|
+
},
|
|
3636
|
+
hasPendingClassFunctions($global) {
|
|
3637
|
+
return !!pendingClassFunctions.get($global)?.length;
|
|
3600
3638
|
}
|
|
3601
3639
|
};
|
|
3640
|
+
const pendingClassFunctions = /* @__PURE__ */ new WeakMap();
|
|
3641
|
+
function drainClassFunctions($global, writeScope) {
|
|
3642
|
+
const pending = pendingClassFunctions.get($global);
|
|
3643
|
+
const scopeByHost = {};
|
|
3644
|
+
for (const [id, fn, hostId] of pending) register(id, fn, scopeByHost[hostId] ||= writeScope(hostId));
|
|
3645
|
+
pending.length = 0;
|
|
3646
|
+
}
|
|
3602
3647
|
function NOOP() {}
|
|
3603
3648
|
//#endregion
|
|
3604
3649
|
exports.$global = $global;
|
package/dist/debug/html.mjs
CHANGED
|
@@ -30,6 +30,7 @@ const BranchAccessor = "#BranchAccessor";
|
|
|
30
30
|
const CatchContent = "#CatchContent";
|
|
31
31
|
const ClosestBranchId = "#ClosestBranchId";
|
|
32
32
|
const LoopKey = "#LoopKey";
|
|
33
|
+
const PlaceholderBranch = "#PlaceholderBranch";
|
|
33
34
|
const PlaceholderContent = "#PlaceholderContent";
|
|
34
35
|
const Renderer = "#Renderer";
|
|
35
36
|
const TagVariable = "#TagVariable";
|
|
@@ -254,6 +255,7 @@ function joinWithAnd(a) {
|
|
|
254
255
|
//#region src/common/meta.ts
|
|
255
256
|
const DYNAMIC_TAG_SCRIPT_REGISTER_ID = "_dynamicTagScript";
|
|
256
257
|
const DYNAMIC_TAG_VAR_REGISTER_ID = "_dynamicTagVar";
|
|
258
|
+
const PLACEHOLDER_DISMISS_REGISTER_ID = "_placeholderDismiss";
|
|
257
259
|
//#endregion
|
|
258
260
|
//#region src/html/content.ts
|
|
259
261
|
function _to_text(val) {
|
|
@@ -2274,12 +2276,13 @@ function _await(scopeId, accessor, promise, content, serializeMarker) {
|
|
|
2274
2276
|
});
|
|
2275
2277
|
}
|
|
2276
2278
|
function _try(scopeId, accessor, content, input) {
|
|
2277
|
-
const branchId = _peek_scope_id();
|
|
2278
|
-
$chunk.writeHTML($chunk.boundary.state.mark("[", ""));
|
|
2279
2279
|
const catchContent = input.catch ? normalizeDynamicRenderer(input.catch) || 0 : void 0;
|
|
2280
2280
|
const placeholderContent = normalizeDynamicRenderer(input.placeholder);
|
|
2281
|
-
|
|
2282
|
-
|
|
2281
|
+
const placeholderBranchId = placeholderContent ? _scope_id() : 0;
|
|
2282
|
+
const branchId = _peek_scope_id();
|
|
2283
|
+
$chunk.writeHTML($chunk.boundary.state.mark("[", ""));
|
|
2284
|
+
if (catchContent !== void 0) tryCatch(placeholderContent ? () => tryPlaceholder(content, placeholderContent, branchId, scopeId, placeholderBranchId) : content, catchContent || (() => {}));
|
|
2285
|
+
else if (placeholderContent) tryPlaceholder(content, placeholderContent, branchId, scopeId, placeholderBranchId);
|
|
2283
2286
|
else content();
|
|
2284
2287
|
writeScope(branchId, {
|
|
2285
2288
|
[BranchAccessor]: accessor,
|
|
@@ -2288,7 +2291,7 @@ function _try(scopeId, accessor, content, input) {
|
|
|
2288
2291
|
});
|
|
2289
2292
|
$chunk.writeHTML($chunk.boundary.state.mark("]", scopeId + " " + accessor + " " + branchId));
|
|
2290
2293
|
}
|
|
2291
|
-
function tryPlaceholder(content, placeholder, branchId) {
|
|
2294
|
+
function tryPlaceholder(content, placeholder, branchId, scopeId, placeholderBranchId) {
|
|
2292
2295
|
const chunk = $chunk;
|
|
2293
2296
|
const { boundary } = chunk;
|
|
2294
2297
|
const body = chunk.fork(boundary, null);
|
|
@@ -2300,7 +2303,9 @@ function tryPlaceholder(content, placeholder, branchId) {
|
|
|
2300
2303
|
chunk.placeholder = {
|
|
2301
2304
|
body,
|
|
2302
2305
|
render: placeholder,
|
|
2303
|
-
branchId
|
|
2306
|
+
branchId,
|
|
2307
|
+
scopeId,
|
|
2308
|
+
placeholderBranchId
|
|
2304
2309
|
};
|
|
2305
2310
|
}
|
|
2306
2311
|
function tryCatch(content, catchContent) {
|
|
@@ -2517,11 +2522,21 @@ var Chunk = class Chunk {
|
|
|
2517
2522
|
const body = placeholder.body.consume();
|
|
2518
2523
|
if (body.async) {
|
|
2519
2524
|
const { state } = this.boundary;
|
|
2520
|
-
const
|
|
2525
|
+
const { branchId, scopeId, placeholderBranchId } = placeholder;
|
|
2526
|
+
const reorderId = body.reorderId = branchId ? branchId + "" : state.nextReorderId();
|
|
2521
2527
|
this.writeHTML(state.mark("!^", reorderId));
|
|
2522
|
-
const
|
|
2528
|
+
const { effects } = this;
|
|
2529
|
+
const beforeBranch = deferBranchStart(this);
|
|
2530
|
+
const after = this.render(() => withBranchId(placeholderBranchId, placeholder.render));
|
|
2531
|
+
const stateful = after === this && this.effects !== effects;
|
|
2532
|
+
applyBranchStart(this, beforeBranch, stateful);
|
|
2523
2533
|
if (after !== this) this.boundary.abort(/* @__PURE__ */ new Error("An @placeholder cannot contain async content."));
|
|
2524
|
-
|
|
2534
|
+
else if (stateful) {
|
|
2535
|
+
this.render(() => writeScope(branchId, { [PlaceholderBranch]: scopeWithId(state, placeholderBranchId) }));
|
|
2536
|
+
this.writeHTML(state.mark("]", scopeId + " " + (PlaceholderBranch + branchId) + " " + placeholderBranchId));
|
|
2537
|
+
body.writeEffect(branchId, PLACEHOLDER_DISMISS_REGISTER_ID);
|
|
2538
|
+
}
|
|
2539
|
+
this.writeHTML(state.mark("!", reorderId));
|
|
2525
2540
|
state.reorder(body);
|
|
2526
2541
|
} else {
|
|
2527
2542
|
body.next = this.next;
|
|
@@ -2629,11 +2644,6 @@ var Chunk = class Chunk {
|
|
|
2629
2644
|
needsWalk = true;
|
|
2630
2645
|
state.resumes = state.resumes ? state.resumes + ",\"" + effects + "\"" : "\"" + effects + "\"";
|
|
2631
2646
|
}
|
|
2632
|
-
if (state.resumes) if (state.hasWrittenResume) scripts = concatScripts(scripts, runtimePrefix + ".r.push(" + state.resumes + ")");
|
|
2633
|
-
else {
|
|
2634
|
-
state.hasWrittenResume = true;
|
|
2635
|
-
scripts = concatScripts(scripts, runtimePrefix + ".r=[" + state.resumes + "]");
|
|
2636
|
-
}
|
|
2637
2647
|
if (state.writeReorders) {
|
|
2638
2648
|
let carried = null;
|
|
2639
2649
|
for (const reorderedChunk of state.writeReorders) {
|
|
@@ -2689,6 +2699,12 @@ var Chunk = class Chunk {
|
|
|
2689
2699
|
}
|
|
2690
2700
|
state.writeReorders = carried;
|
|
2691
2701
|
}
|
|
2702
|
+
flushSerializer(boundary, state);
|
|
2703
|
+
if (state.resumes) if (state.hasWrittenResume) scripts = concatScripts(scripts, runtimePrefix + ".r.push(" + state.resumes + ")");
|
|
2704
|
+
else {
|
|
2705
|
+
state.hasWrittenResume = true;
|
|
2706
|
+
scripts = concatScripts(scripts, runtimePrefix + ".r=[" + state.resumes + "]");
|
|
2707
|
+
}
|
|
2692
2708
|
if (needsWalk) scripts = concatScripts(scripts, runtimePrefix + ".w()");
|
|
2693
2709
|
this.html = html;
|
|
2694
2710
|
this.scripts = scripts;
|
|
@@ -3552,6 +3568,15 @@ const compat = {
|
|
|
3552
3568
|
for (const key in input) normalizedInput[key === "renderBody" ? "content" : key] = input[key];
|
|
3553
3569
|
}
|
|
3554
3570
|
head.render(() => {
|
|
3571
|
+
if (this.hasPendingClassFunctions(classAPIOut.global)) drainClassFunctions(classAPIOut.global, (hostId) => {
|
|
3572
|
+
const fnScopeId = _scope_id();
|
|
3573
|
+
const scope = writeScope(fnScopeId, {
|
|
3574
|
+
m5c: component.id,
|
|
3575
|
+
m5h: hostId
|
|
3576
|
+
});
|
|
3577
|
+
_script(fnScopeId, SET_SCOPE_REGISTER_ID);
|
|
3578
|
+
return scope;
|
|
3579
|
+
});
|
|
3555
3580
|
if (willRerender || registerChildScope) {
|
|
3556
3581
|
const scopeId = _peek_scope_id();
|
|
3557
3582
|
writeScope(scopeId, { m5c: component.id });
|
|
@@ -3595,8 +3620,28 @@ const compat = {
|
|
|
3595
3620
|
const value = input[key];
|
|
3596
3621
|
if (typeof value === "function" && !getRegistered(value)) register(RENDER_BODY_ID, value);
|
|
3597
3622
|
}
|
|
3623
|
+
},
|
|
3624
|
+
registerClassFunction($global, id, fn, hostId) {
|
|
3625
|
+
let pending = pendingClassFunctions.get($global);
|
|
3626
|
+
if (!pending) pendingClassFunctions.set($global, pending = []);
|
|
3627
|
+
pending.push([
|
|
3628
|
+
id,
|
|
3629
|
+
fn,
|
|
3630
|
+
hostId
|
|
3631
|
+
]);
|
|
3632
|
+
return fn;
|
|
3633
|
+
},
|
|
3634
|
+
hasPendingClassFunctions($global) {
|
|
3635
|
+
return !!pendingClassFunctions.get($global)?.length;
|
|
3598
3636
|
}
|
|
3599
3637
|
};
|
|
3638
|
+
const pendingClassFunctions = /* @__PURE__ */ new WeakMap();
|
|
3639
|
+
function drainClassFunctions($global, writeScope) {
|
|
3640
|
+
const pending = pendingClassFunctions.get($global);
|
|
3641
|
+
const scopeByHost = {};
|
|
3642
|
+
for (const [id, fn, hostId] of pending) register(id, fn, scopeByHost[hostId] ||= writeScope(hostId));
|
|
3643
|
+
pending.length = 0;
|
|
3644
|
+
}
|
|
3600
3645
|
function NOOP() {}
|
|
3601
3646
|
//#endregion
|
|
3602
3647
|
export { $global, _assert_hoist, _attr, _attr_and, _attr_class, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_input_checked, _attr_input_checkedValue, _attr_input_value, _attr_nonce, _attr_nullish, _attr_option_value, _attr_or, _attr_select_value, _attr_style, _attr_textarea_value, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _await, _content, _content_resume, _dynamic_tag, _el, _el_read_error, _el_resume, _escape, _escape_comment, _escape_script, _escape_style, _escape_style_value, _existing_scope, _flush_head, _for_in, _for_of, _for_to, _for_until, _hoist, _hoist_read_error, _html, _id, _if, _peek_scope_id, _resume, _resume_branch, _resume_locals, writeScope as _scope, _scope_id, _scope_reason, _scope_with_id, _script, _sep, _serialize_guard, _serialize_if, _set_serialize_reason, _show_end, _show_start, _style_html, _subscribe, _template, _textarea_value, _to_text, _trailers, _try, _unescaped, _var, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, withLoadAssets, withPageAssets };
|
package/dist/dom/catch.feat.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-BfloYt04.js"), handlePendingTry = (fn, scope, branch) => {
|
|
2
2
|
for (; branch;) {
|
|
3
3
|
if (branch.O?.i) return (branch.J ||= []).push(fn, scope);
|
|
4
4
|
branch = branch.N;
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
7
|
//#region src/dom/catch.feat.ts
|
|
8
|
-
require_control_flow.
|
|
9
|
-
if (checkPending || require_control_flow.
|
|
8
|
+
require_control_flow.Qt((runEffects) => (effects, checkPending = require_control_flow.$t.has(effects)) => {
|
|
9
|
+
if (checkPending || require_control_flow.Zt.has(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 && !(checkPending && handlePendingTry(fn, scope, branch)) && fn(scope);
|
|
12
12
|
} else runEffects(effects);
|
package/dist/dom/catch.feat.mjs
CHANGED
|
@@ -4,7 +4,7 @@ let handlePendingTry = (fn, scope, branch) => {
|
|
|
4
4
|
branch = branch.N;
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { $t as placeholderShown, Qt as installCatch, Zt as caughtError, g as renderCatch } from "../dom-BVNolGe1.mjs";
|
|
8
8
|
//#region src/dom/catch.feat.ts
|
|
9
9
|
installCatch((runEffects) => (effects, checkPending = placeholderShown.has(effects)) => {
|
|
10
10
|
if (checkPending || caughtError.has(effects)) {
|
package/dist/dom/compat.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const compat: {
|
|
|
7
7
|
queueEffect: typeof queueEffect;
|
|
8
8
|
init(warp10Noop: any): void;
|
|
9
9
|
setClassEventResolver(fn: (value: unknown, scope: Scope) => unknown): void;
|
|
10
|
+
resumeClassFunction(id: string, build: (scope: Scope) => unknown): void;
|
|
10
11
|
getScope($global: Record<string, unknown>, scopeId: unknown): Scope | undefined;
|
|
11
12
|
setRendererId(renderer: any, id: unknown): void;
|
|
12
13
|
isRenderer(renderer: any): any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-BfloYt04.js");
|
|
2
2
|
require_control_flow.z[0] = require_control_flow.T, require_control_flow.z[1] = require_control_flow.C, require_control_flow.z[2] = require_control_flow.A;
|
|
3
3
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as _attr_input_value_script, C as _attr_input_checkedValue_script, T as _attr_input_checked_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { A as _attr_input_value_script, C as _attr_input_checkedValue_script, T as _attr_input_checked_script, z as controllableScripts } from "../dom-BVNolGe1.mjs";
|
|
2
2
|
controllableScripts[0] = _attr_input_checked_script, controllableScripts[1] = _attr_input_checkedValue_script, controllableScripts[2] = _attr_input_value_script;
|
|
3
3
|
//#endregion
|