marko 6.3.39 → 6.3.40
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-woc_wRhN.mjs → dom-BREcRn0h.mjs} +2 -1
- package/dist/debug/{dom-BkYlHM4b.js → dom-Kmuzoe8t.js} +19 -0
- package/dist/debug/dom.js +1 -1
- package/dist/debug/dom.mjs +1 -1
- package/dist/debug/html.js +30 -14
- package/dist/debug/html.mjs +30 -14
- package/dist/dom/catch.feat.js +3 -3
- package/dist/dom/catch.feat.mjs +1 -1
- package/dist/dom/controllable-input.feat.js +1 -1
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +1 -1
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +1 -1
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +1 -1
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.feat.js +1 -1
- package/dist/dom/controllable.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/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-B15s3PHD.js → dom-B5PaPvwd.js} +49 -44
- package/dist/{dom-CPUybM_C.mjs → dom-BlOP3cfL.mjs} +1 -1
- package/dist/dom.js +24 -24
- package/dist/dom.mjs +1 -1
- package/dist/html/writer.d.ts +2 -0
- package/dist/html.js +11 -11
- package/dist/html.mjs +11 -11
- package/dist/translator/index.js +5 -2
- package/dist/translator/util/references.d.ts +4 -0
- package/dist/translator/util/runtime.d.ts +1 -1
- package/package.json +3 -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 PendingEffects, En as ParentBranch, On as PendingRenders, en as installCatch, g as renderCatch, tn as placeholderShown, vn as Pending, xn as ClosestBranch, yn as Scope } from "../dom-BREcRn0h.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-Kmuzoe8t.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-BREcRn0h.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-Kmuzoe8t.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-BREcRn0h.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-Kmuzoe8t.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-BREcRn0h.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-Kmuzoe8t.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-BREcRn0h.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-BREcRn0h.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-Kmuzoe8t.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 { An as StartNode, Ot as _el_read, Yt as DYNAMIC_TAG_VAR_REGISTER_ID, gt as _resume, jn as TagVariable, m as installDynamicTagVar } from "../dom-BREcRn0h.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-Kmuzoe8t.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 { St as registeredValues, Wt as destroyBranch, Xt as PLACEHOLDER_DISMISS_REGISTER_ID, kn as PlaceholderBranch } from "../dom-BREcRn0h.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
|
|
@@ -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, StartNode as An, _for_selector as At, _attr as B, _script as Bt, _attr_input_checkedValue_script as C, Gen$1 as Cn, withLazy as Ct, _attr_input_value_attribute_default as D, PendingEffects as Dn, _const as Dt, _attr_input_value as E, ParentBranch 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, _hoist_resume as Mt, _attr_select_value_script as N, _id as Nt, _attr_input_value_default as O, PendingRenders 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, EndNode as Sn, registeredValues as St, _attr_input_checked_script as T, Load 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 _, Setup as _n, _var_resume as _t, _for_in as a, run as an, _text_content as at, _attr_input_checked as b, AwaitCounter 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, Params as gn, _resume as gt, patchDynamicTag as h, Owner as hn, _el as ht, _dynamic_tag_content as i, queueEffect as in, _text as it, _attr_select_value as j, TagVariable as jn, _hoist as jt, _attr_input_value_dynamic_default as k, PlaceholderBranch as kn, _for_closure as kt, _if as l, forOf as ln, _content as lt, installDynamicTagVar as m, Clone 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, _call 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, Pending as vn, getRegisteredWithScope as vt, _attr_input_checked_default as w, Global as wn, _child_setup as wt, _attr_input_checkedValue as x, ClosestBranch as xn, ready as xt, _attr_details_or_dialog_open_script as y, Scope as yn, init as yt, controllableScripts as z, _return_change as zt };
|
|
@@ -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() {
|
|
@@ -2835,6 +2848,12 @@ Object.defineProperty(exports, "ready", {
|
|
|
2835
2848
|
return ready;
|
|
2836
2849
|
}
|
|
2837
2850
|
});
|
|
2851
|
+
Object.defineProperty(exports, "registeredValues", {
|
|
2852
|
+
enumerable: true,
|
|
2853
|
+
get: function() {
|
|
2854
|
+
return registeredValues;
|
|
2855
|
+
}
|
|
2856
|
+
});
|
|
2838
2857
|
Object.defineProperty(exports, "removeAndDestroyBranch", {
|
|
2839
2858
|
enumerable: true,
|
|
2840
2859
|
get: function() {
|
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-Kmuzoe8t.js");
|
|
4
4
|
//#region src/common/attr-tag.ts
|
|
5
5
|
const empty = [];
|
|
6
6
|
const rest = Symbol("Attribute Tag");
|
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, An as StartNode, At as _for_selector, B as _attr, Bt as _script, C as _attr_input_checkedValue_script, Ct as withLazy, D as _attr_input_value_attribute_default, Dt as _const, E as _attr_input_value, 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, 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, Sn as EndNode, T as _attr_input_checked_script, Tn as Load, 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 Setup, _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 Params, gt as _resume, h as patchDynamicTag, hn as Owner, ht as _el, i as _dynamic_tag_content, in as queueEffect, it as _text, j as _attr_select_value, jn as TagVariable, 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 Clone, 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 _call, 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, vt as getRegisteredWithScope, w as _attr_input_checked_default, wn as Global, 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-BREcRn0h.mjs";
|
|
2
2
|
//#region src/common/attr-tag.ts
|
|
3
3
|
const empty = [];
|
|
4
4
|
const rest = Symbol("Attribute Tag");
|
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;
|
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;
|
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-B5PaPvwd.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-BlOP3cfL.mjs";
|
|
8
8
|
//#region src/dom/catch.feat.ts
|
|
9
9
|
installCatch((runEffects) => (effects, checkPending = placeholderShown.has(effects)) => {
|
|
10
10
|
if (checkPending || caughtError.has(effects)) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-B5PaPvwd.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-BlOP3cfL.mjs";
|
|
2
2
|
controllableScripts[0] = _attr_input_checked_script, controllableScripts[1] = _attr_input_checkedValue_script, controllableScripts[2] = _attr_input_value_script;
|
|
3
3
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as _attr_details_or_dialog_open_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { y as _attr_details_or_dialog_open_script, z as controllableScripts } from "../dom-BlOP3cfL.mjs";
|
|
2
2
|
//#region src/dom/controllable-open.feat.ts
|
|
3
3
|
controllableScripts[4] = _attr_details_or_dialog_open_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as _attr_select_value_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { N as _attr_select_value_script, z as controllableScripts } from "../dom-BlOP3cfL.mjs";
|
|
2
2
|
//#region src/dom/controllable-select.feat.ts
|
|
3
3
|
controllableScripts[3] = _attr_select_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as _attr_input_value_script, z as controllableScripts } from "../dom-
|
|
1
|
+
import { A as _attr_input_value_script, z as controllableScripts } from "../dom-BlOP3cfL.mjs";
|
|
2
2
|
//#region src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-B5PaPvwd.js");
|
|
2
2
|
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.R.INPUT = require_control_flow.P, require_control_flow.R.TEXTAREA = require_control_flow.L, require_control_flow.R.SELECT = require_control_flow.I, require_control_flow.R.DETAILS = require_control_flow.R.DIALOG = require_control_flow.F;
|
|
3
3
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as _controllable_open, I as _controllable_select, L as _controllable_textarea, P as _controllable_input, R as controllableRenders } from "../dom-
|
|
1
|
+
import { F as _controllable_open, I as _controllable_select, L as _controllable_textarea, P as _controllable_input, R as controllableRenders } from "../dom-BlOP3cfL.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
|
-
let require_control_flow = require("../dom-
|
|
1
|
+
let require_control_flow = require("../dom-B5PaPvwd.js"), elementGetter = (branch) => () => branch.S;
|
|
2
2
|
require_control_flow.m((branch) => branch.T(elementGetter(branch))), require_control_flow.gt("e", elementGetter);
|
|
3
3
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
let elementGetter = (branch) => () => branch.S;
|
|
2
|
-
import { gt as _resume, m as installDynamicTagVar } from "../dom-
|
|
2
|
+
import { gt as _resume, m as installDynamicTagVar } from "../dom-BlOP3cfL.mjs";
|
|
3
3
|
installDynamicTagVar((branch) => branch.T(elementGetter(branch))), _resume("e", elementGetter);
|
|
4
4
|
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/dom/resume.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export interface RenderData {
|
|
|
23
23
|
j?: never;
|
|
24
24
|
p?: Record<string | number, AwaitCounter>;
|
|
25
25
|
}
|
|
26
|
+
export declare const registeredValues: Record<string, unknown>;
|
|
26
27
|
export declare function ready(readyId: string): void;
|
|
27
28
|
export declare function withLazy<T>(runtime: T): T;
|
|
28
29
|
export declare function initEmbedded(readyId: string, runtimeId?: string): void;
|