marko 6.3.31 → 6.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cheatsheet.md +39 -18
- package/dist/common/helpers.d.ts +2 -0
- package/dist/debug/dom/catch.feat.js +38 -0
- package/dist/debug/dom/catch.feat.mjs +37 -0
- package/dist/debug/dom/controllable-input.feat.js +7 -0
- package/dist/debug/dom/controllable-input.feat.mjs +6 -0
- package/dist/debug/dom/controllable-open.feat.js +5 -0
- package/dist/debug/dom/controllable-open.feat.mjs +4 -0
- package/dist/debug/dom/controllable-select.feat.js +5 -0
- package/dist/debug/dom/controllable-select.feat.mjs +4 -0
- package/dist/debug/dom/controllable-textarea.feat.js +5 -0
- package/dist/debug/dom/controllable-textarea.feat.mjs +4 -0
- package/dist/debug/dom/controllable.feat.js +11 -0
- package/dist/debug/dom/controllable.feat.mjs +10 -0
- package/dist/debug/dom-BJ93mcSe.mjs +2016 -0
- package/dist/debug/dom-CiFITSPN.js +2814 -0
- package/dist/debug/dom.js +156 -2250
- package/dist/debug/dom.mjs +6 -2094
- package/dist/debug/html.js +35 -7
- package/dist/debug/html.mjs +36 -5
- package/dist/dom/catch.feat.d.ts +1 -0
- package/dist/dom/catch.feat.js +25 -0
- package/dist/dom/catch.feat.mjs +26 -0
- package/dist/dom/control-flow.d.ts +3 -3
- package/dist/dom/controllable-input.feat.d.ts +1 -0
- package/dist/dom/controllable-input.feat.js +3 -0
- package/dist/dom/controllable-input.feat.mjs +3 -0
- package/dist/dom/controllable-open.feat.d.ts +1 -0
- package/dist/dom/controllable-open.feat.js +4 -0
- package/dist/dom/controllable-open.feat.mjs +4 -0
- package/dist/dom/controllable-select.feat.d.ts +1 -0
- package/dist/dom/controllable-select.feat.js +4 -0
- package/dist/dom/controllable-select.feat.mjs +4 -0
- package/dist/dom/controllable-textarea.feat.d.ts +1 -0
- package/dist/dom/controllable-textarea.feat.js +4 -0
- package/dist/dom/controllable-textarea.feat.mjs +4 -0
- package/dist/dom/controllable.d.ts +3 -8
- package/dist/dom/controllable.feat.d.ts +3 -0
- package/dist/dom/controllable.feat.js +3 -0
- package/dist/dom/controllable.feat.mjs +6 -0
- package/dist/dom/queue.d.ts +2 -2
- package/dist/dom/resume.d.ts +0 -1
- package/dist/dom-CI-06TZb.js +1721 -0
- package/dist/dom-Cj4HQ7T_.mjs +1137 -0
- package/dist/dom.d.ts +2 -2
- package/dist/dom.js +36 -1224
- package/dist/dom.mjs +4 -1191
- package/dist/html/compat.d.ts +3 -1
- package/dist/html/writer.d.ts +3 -0
- package/dist/html.d.ts +1 -1
- package/dist/html.js +31 -11
- package/dist/html.mjs +31 -11
- package/dist/translator/index.js +680 -583
- package/dist/translator/util/branch-tag.d.ts +5 -0
- package/dist/translator/util/constants/structure-kind.d.ts +7 -0
- package/dist/translator/util/get-tag-name.d.ts +2 -1
- package/dist/translator/util/import-reference.d.ts +3 -0
- package/dist/translator/util/runtime.d.ts +2 -0
- package/dist/translator/util/sections.d.ts +28 -1
- package/dist/translator/util/signals.d.ts +1 -3
- package/dist/translator/util/{walks.d.ts → structure.d.ts} +20 -9
- package/dist/translator/util/writer.d.ts +0 -8
- package/dist/translator/visitors/placeholder.d.ts +4 -3
- package/dist/translator/visitors/tag/native-tag.d.ts +9 -6
- package/dist/translator/visitors/text.d.ts +3 -7
- package/index.d.ts +19 -1
- package/package.json +4 -4
package/dist/debug/html.js
CHANGED
|
@@ -1844,6 +1844,15 @@ let $chunk;
|
|
|
1844
1844
|
function getChunk() {
|
|
1845
1845
|
return $chunk;
|
|
1846
1846
|
}
|
|
1847
|
+
function withChunk(chunk, cb) {
|
|
1848
|
+
const prev = $chunk;
|
|
1849
|
+
$chunk = chunk;
|
|
1850
|
+
try {
|
|
1851
|
+
return cb();
|
|
1852
|
+
} finally {
|
|
1853
|
+
$chunk = prev;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1847
1856
|
function getContext(key) {
|
|
1848
1857
|
return $chunk.context?.[key];
|
|
1849
1858
|
}
|
|
@@ -2041,19 +2050,28 @@ function forBranches(by, iterate, scopeId, accessor, serializeBranch, serializeM
|
|
|
2041
2050
|
writeBranchEnd(scopeId, accessor, serializeStateful, serializeMarker, parentEndTag, singleNode, singleNode ? flushBranchIds : flushBranchIds ? " " + flushBranchIds : "");
|
|
2042
2051
|
}
|
|
2043
2052
|
function _if(cb, scopeId, accessor, serializeBranch, serializeMarker, serializeStateful, parentEndTag, singleNode) {
|
|
2044
|
-
const { state } = $chunk.boundary;
|
|
2045
2053
|
const resumeBranch = serializeBranch !== 0;
|
|
2046
2054
|
const resumeMarker = serializeMarker !== 0 && (!parentEndTag || serializeStateful !== 0);
|
|
2047
2055
|
const branchId = _peek_scope_id();
|
|
2048
|
-
|
|
2056
|
+
const chunk = $chunk;
|
|
2057
|
+
const beforeBranch = resumeMarker && resumeBranch && !singleNode ? deferBranchStart(chunk) : void 0;
|
|
2049
2058
|
const branchIndex = resumeBranch ? withBranchId(branchId, cb) : cb();
|
|
2050
2059
|
const shouldWriteBranch = resumeBranch && branchIndex !== void 0;
|
|
2060
|
+
if (beforeBranch !== void 0) applyBranchStart(chunk, beforeBranch, shouldWriteBranch);
|
|
2051
2061
|
if (shouldWriteBranch && (branchIndex || !resumeMarker)) writeScope(scopeId, {
|
|
2052
2062
|
[ConditionalRenderer + accessor]: branchIndex || void 0,
|
|
2053
2063
|
[BranchScopes + accessor]: resumeMarker ? void 0 : writeScope(branchId, {})
|
|
2054
2064
|
});
|
|
2055
2065
|
writeBranchEnd(scopeId, accessor, serializeStateful, serializeMarker, parentEndTag, singleNode, shouldWriteBranch ? " " + branchId : "");
|
|
2056
2066
|
}
|
|
2067
|
+
function deferBranchStart(chunk) {
|
|
2068
|
+
const beforeBranch = chunk.html;
|
|
2069
|
+
chunk.html = "";
|
|
2070
|
+
return beforeBranch;
|
|
2071
|
+
}
|
|
2072
|
+
function applyBranchStart(chunk, beforeBranch, rendered) {
|
|
2073
|
+
chunk.html = beforeBranch + (rendered ? chunk.boundary.state.mark("[", "") : "") + chunk.html;
|
|
2074
|
+
}
|
|
2057
2075
|
function writeBranchEnd(scopeId, accessor, serializeStateful, serializeMarker, parentEndTag, singleNode, branchIds) {
|
|
2058
2076
|
const endTag = parentEndTag || "";
|
|
2059
2077
|
if (serializeMarker !== 0) if (!parentEndTag || serializeStateful !== 0) {
|
|
@@ -2981,7 +2999,8 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
|
|
|
2981
2999
|
};
|
|
2982
3000
|
renderNative();
|
|
2983
3001
|
} else {
|
|
2984
|
-
|
|
3002
|
+
const chunk = getChunk();
|
|
3003
|
+
const beforeBranch = shouldResume ? deferBranchStart(chunk) : void 0;
|
|
2985
3004
|
const render = () => {
|
|
2986
3005
|
if (renderer) try {
|
|
2987
3006
|
_set_serialize_reason(shouldResume && inputOrArgs !== void 0 ? 1 : 0);
|
|
@@ -2996,7 +3015,10 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
|
|
|
2996
3015
|
};
|
|
2997
3016
|
result = shouldResume ? withBranchId(branchId, render) : render();
|
|
2998
3017
|
rendered = _peek_scope_id() !== branchId;
|
|
2999
|
-
if (
|
|
3018
|
+
if (beforeBranch !== void 0) {
|
|
3019
|
+
applyBranchStart(chunk, beforeBranch, rendered);
|
|
3020
|
+
_html(state.mark("]", scopeId + " " + accessor + (rendered ? " " + branchId : "")));
|
|
3021
|
+
}
|
|
3000
3022
|
}
|
|
3001
3023
|
if (rendered) {
|
|
3002
3024
|
if (shouldResume) writeScope(scopeId, { [ConditionalRenderer + accessor]: renderer?.["id"] || renderer });
|
|
@@ -3147,6 +3169,8 @@ var ServerRendered = class {
|
|
|
3147
3169
|
}, (err) => {
|
|
3148
3170
|
const socket = "socket" in stream && stream.socket;
|
|
3149
3171
|
if (socket && typeof socket.destroySoon === "function") socket.destroySoon();
|
|
3172
|
+
else if (stream.destroy) stream.destroy();
|
|
3173
|
+
else stream.end();
|
|
3150
3174
|
if (!stream.emit?.("error", err)) throw err;
|
|
3151
3175
|
}, () => {
|
|
3152
3176
|
stream.end();
|
|
@@ -3360,6 +3384,7 @@ const compat = {
|
|
|
3360
3384
|
nextScopeId: _scope_id,
|
|
3361
3385
|
peekNextScopeId: _peek_scope_id,
|
|
3362
3386
|
isInResumedBranch,
|
|
3387
|
+
withChunk,
|
|
3363
3388
|
ensureState($global) {
|
|
3364
3389
|
let state = $global[K_TAGS_API_STATE] ||= getChunk()?.boundary.state;
|
|
3365
3390
|
if (!state) {
|
|
@@ -3454,6 +3479,12 @@ const compat = {
|
|
|
3454
3479
|
register,
|
|
3455
3480
|
registerRenderBody(fn) {
|
|
3456
3481
|
register(RENDER_BODY_ID, fn);
|
|
3482
|
+
},
|
|
3483
|
+
registerClassFunctions(input) {
|
|
3484
|
+
for (const key in input) {
|
|
3485
|
+
const value = input[key];
|
|
3486
|
+
if (typeof value === "function" && !getRegistered(value)) register(RENDER_BODY_ID, value);
|
|
3487
|
+
}
|
|
3457
3488
|
}
|
|
3458
3489
|
};
|
|
3459
3490
|
function NOOP() {}
|
|
@@ -3541,10 +3572,7 @@ exports.attrTag = attrTag;
|
|
|
3541
3572
|
exports.attrTags = attrTags;
|
|
3542
3573
|
exports.compat = compat;
|
|
3543
3574
|
exports.forIn = forIn;
|
|
3544
|
-
exports.forInBy = forInBy;
|
|
3545
3575
|
exports.forOf = forOf;
|
|
3546
|
-
exports.forOfBy = forOfBy;
|
|
3547
|
-
exports.forStepBy = forStepBy;
|
|
3548
3576
|
exports.forTo = forTo;
|
|
3549
3577
|
exports.forUntil = forUntil;
|
|
3550
3578
|
exports.withLoadAssets = withLoadAssets;
|
package/dist/debug/html.mjs
CHANGED
|
@@ -1842,6 +1842,15 @@ let $chunk;
|
|
|
1842
1842
|
function getChunk() {
|
|
1843
1843
|
return $chunk;
|
|
1844
1844
|
}
|
|
1845
|
+
function withChunk(chunk, cb) {
|
|
1846
|
+
const prev = $chunk;
|
|
1847
|
+
$chunk = chunk;
|
|
1848
|
+
try {
|
|
1849
|
+
return cb();
|
|
1850
|
+
} finally {
|
|
1851
|
+
$chunk = prev;
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1845
1854
|
function getContext(key) {
|
|
1846
1855
|
return $chunk.context?.[key];
|
|
1847
1856
|
}
|
|
@@ -2039,19 +2048,28 @@ function forBranches(by, iterate, scopeId, accessor, serializeBranch, serializeM
|
|
|
2039
2048
|
writeBranchEnd(scopeId, accessor, serializeStateful, serializeMarker, parentEndTag, singleNode, singleNode ? flushBranchIds : flushBranchIds ? " " + flushBranchIds : "");
|
|
2040
2049
|
}
|
|
2041
2050
|
function _if(cb, scopeId, accessor, serializeBranch, serializeMarker, serializeStateful, parentEndTag, singleNode) {
|
|
2042
|
-
const { state } = $chunk.boundary;
|
|
2043
2051
|
const resumeBranch = serializeBranch !== 0;
|
|
2044
2052
|
const resumeMarker = serializeMarker !== 0 && (!parentEndTag || serializeStateful !== 0);
|
|
2045
2053
|
const branchId = _peek_scope_id();
|
|
2046
|
-
|
|
2054
|
+
const chunk = $chunk;
|
|
2055
|
+
const beforeBranch = resumeMarker && resumeBranch && !singleNode ? deferBranchStart(chunk) : void 0;
|
|
2047
2056
|
const branchIndex = resumeBranch ? withBranchId(branchId, cb) : cb();
|
|
2048
2057
|
const shouldWriteBranch = resumeBranch && branchIndex !== void 0;
|
|
2058
|
+
if (beforeBranch !== void 0) applyBranchStart(chunk, beforeBranch, shouldWriteBranch);
|
|
2049
2059
|
if (shouldWriteBranch && (branchIndex || !resumeMarker)) writeScope(scopeId, {
|
|
2050
2060
|
[ConditionalRenderer + accessor]: branchIndex || void 0,
|
|
2051
2061
|
[BranchScopes + accessor]: resumeMarker ? void 0 : writeScope(branchId, {})
|
|
2052
2062
|
});
|
|
2053
2063
|
writeBranchEnd(scopeId, accessor, serializeStateful, serializeMarker, parentEndTag, singleNode, shouldWriteBranch ? " " + branchId : "");
|
|
2054
2064
|
}
|
|
2065
|
+
function deferBranchStart(chunk) {
|
|
2066
|
+
const beforeBranch = chunk.html;
|
|
2067
|
+
chunk.html = "";
|
|
2068
|
+
return beforeBranch;
|
|
2069
|
+
}
|
|
2070
|
+
function applyBranchStart(chunk, beforeBranch, rendered) {
|
|
2071
|
+
chunk.html = beforeBranch + (rendered ? chunk.boundary.state.mark("[", "") : "") + chunk.html;
|
|
2072
|
+
}
|
|
2055
2073
|
function writeBranchEnd(scopeId, accessor, serializeStateful, serializeMarker, parentEndTag, singleNode, branchIds) {
|
|
2056
2074
|
const endTag = parentEndTag || "";
|
|
2057
2075
|
if (serializeMarker !== 0) if (!parentEndTag || serializeStateful !== 0) {
|
|
@@ -2979,7 +2997,8 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
|
|
|
2979
2997
|
};
|
|
2980
2998
|
renderNative();
|
|
2981
2999
|
} else {
|
|
2982
|
-
|
|
3000
|
+
const chunk = getChunk();
|
|
3001
|
+
const beforeBranch = shouldResume ? deferBranchStart(chunk) : void 0;
|
|
2983
3002
|
const render = () => {
|
|
2984
3003
|
if (renderer) try {
|
|
2985
3004
|
_set_serialize_reason(shouldResume && inputOrArgs !== void 0 ? 1 : 0);
|
|
@@ -2994,7 +3013,10 @@ let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, s
|
|
|
2994
3013
|
};
|
|
2995
3014
|
result = shouldResume ? withBranchId(branchId, render) : render();
|
|
2996
3015
|
rendered = _peek_scope_id() !== branchId;
|
|
2997
|
-
if (
|
|
3016
|
+
if (beforeBranch !== void 0) {
|
|
3017
|
+
applyBranchStart(chunk, beforeBranch, rendered);
|
|
3018
|
+
_html(state.mark("]", scopeId + " " + accessor + (rendered ? " " + branchId : "")));
|
|
3019
|
+
}
|
|
2998
3020
|
}
|
|
2999
3021
|
if (rendered) {
|
|
3000
3022
|
if (shouldResume) writeScope(scopeId, { [ConditionalRenderer + accessor]: renderer?.["id"] || renderer });
|
|
@@ -3145,6 +3167,8 @@ var ServerRendered = class {
|
|
|
3145
3167
|
}, (err) => {
|
|
3146
3168
|
const socket = "socket" in stream && stream.socket;
|
|
3147
3169
|
if (socket && typeof socket.destroySoon === "function") socket.destroySoon();
|
|
3170
|
+
else if (stream.destroy) stream.destroy();
|
|
3171
|
+
else stream.end();
|
|
3148
3172
|
if (!stream.emit?.("error", err)) throw err;
|
|
3149
3173
|
}, () => {
|
|
3150
3174
|
stream.end();
|
|
@@ -3358,6 +3382,7 @@ const compat = {
|
|
|
3358
3382
|
nextScopeId: _scope_id,
|
|
3359
3383
|
peekNextScopeId: _peek_scope_id,
|
|
3360
3384
|
isInResumedBranch,
|
|
3385
|
+
withChunk,
|
|
3361
3386
|
ensureState($global) {
|
|
3362
3387
|
let state = $global[K_TAGS_API_STATE] ||= getChunk()?.boundary.state;
|
|
3363
3388
|
if (!state) {
|
|
@@ -3452,8 +3477,14 @@ const compat = {
|
|
|
3452
3477
|
register,
|
|
3453
3478
|
registerRenderBody(fn) {
|
|
3454
3479
|
register(RENDER_BODY_ID, fn);
|
|
3480
|
+
},
|
|
3481
|
+
registerClassFunctions(input) {
|
|
3482
|
+
for (const key in input) {
|
|
3483
|
+
const value = input[key];
|
|
3484
|
+
if (typeof value === "function" && !getRegistered(value)) register(RENDER_BODY_ID, value);
|
|
3485
|
+
}
|
|
3455
3486
|
}
|
|
3456
3487
|
};
|
|
3457
3488
|
function NOOP() {}
|
|
3458
3489
|
//#endregion
|
|
3459
|
-
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,
|
|
3490
|
+
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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
let require_control_flow = require("../dom-CI-06TZb.js"), handlePendingTry = (fn, scope, branch) => {
|
|
2
|
+
for (; branch;) {
|
|
3
|
+
if (branch.O?.i) return (branch.J ||= []).push(fn, scope);
|
|
4
|
+
branch = branch.N;
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
//#region src/dom/catch.feat.ts
|
|
8
|
+
require_control_flow.Yt((runEffects) => (effects, checkPending = require_control_flow.Xt.has(effects)) => {
|
|
9
|
+
if (checkPending || require_control_flow.Jt.has(effects)) {
|
|
10
|
+
let i = 0, fn, scope, branch;
|
|
11
|
+
for (; i < effects.length;) fn = effects[i++], scope = effects[i++], (branch = scope.F)?.H !== 0 && !(checkPending && handlePendingTry(fn, scope, branch)) && fn(scope);
|
|
12
|
+
} else runEffects(effects);
|
|
13
|
+
}, (runRender) => (render) => {
|
|
14
|
+
try {
|
|
15
|
+
let branch = render.b.F;
|
|
16
|
+
for (; branch;) {
|
|
17
|
+
if (branch.W) return render.f = 1, branch.W.push(render);
|
|
18
|
+
branch = branch.N;
|
|
19
|
+
}
|
|
20
|
+
render.f = 0, runRender(render);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
require_control_flow.h(render.b, error);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
//#endregion
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
let handlePendingTry = (fn, scope, branch) => {
|
|
2
|
+
for (; branch;) {
|
|
3
|
+
if (branch.O?.i) return (branch.J ||= []).push(fn, scope);
|
|
4
|
+
branch = branch.N;
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
import { Jt as caughtError, Xt as placeholderShown, Yt as installCatch, h as renderCatch } from "../dom-Cj4HQ7T_.mjs";
|
|
8
|
+
//#region src/dom/catch.feat.ts
|
|
9
|
+
installCatch((runEffects) => (effects, checkPending = placeholderShown.has(effects)) => {
|
|
10
|
+
if (checkPending || caughtError.has(effects)) {
|
|
11
|
+
let i = 0, fn, scope, branch;
|
|
12
|
+
for (; i < effects.length;) fn = effects[i++], scope = effects[i++], (branch = scope.F)?.H !== 0 && !(checkPending && handlePendingTry(fn, scope, branch)) && fn(scope);
|
|
13
|
+
} else runEffects(effects);
|
|
14
|
+
}, (runRender) => (render) => {
|
|
15
|
+
try {
|
|
16
|
+
let branch = render.b.F;
|
|
17
|
+
for (; branch;) {
|
|
18
|
+
if (branch.W) return render.f = 1, branch.W.push(render);
|
|
19
|
+
branch = branch.N;
|
|
20
|
+
}
|
|
21
|
+
render.f = 0, runRender(render);
|
|
22
|
+
} catch (error) {
|
|
23
|
+
renderCatch(render.b, error);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
@@ -9,11 +9,11 @@ export declare function _try(nodeAccessor: EncodedAccessor, template?: string |
|
|
|
9
9
|
placeholder: unknown;
|
|
10
10
|
}) => void;
|
|
11
11
|
export declare function renderCatch(scope: Scope, error: unknown): void;
|
|
12
|
-
export declare
|
|
13
|
-
export declare
|
|
12
|
+
export declare const _if: (nodeAccessor: EncodedAccessor, ...branchesArgs: (string | SetupFn | 0)[]) => (scope: Scope, newBranch: number) => void;
|
|
13
|
+
export declare const _show: (nodeAccessor: EncodedAccessor, startNodeAccessor?: EncodedAccessor, endNodeAccessor?: EncodedAccessor) => (scope: Scope, display: unknown) => void;
|
|
14
14
|
export declare function patchDynamicTag(fn: <T extends typeof _dynamic_tag>(cond: T) => T): void;
|
|
15
15
|
export declare let _dynamic_tag: (nodeAccessor: EncodedAccessor, getContent?: ((scope: Scope) => Renderer) | 0, getTagVar?: (() => Signal<unknown>) | 0, inputIsArgs?: 1) => Signal<Renderer | string | undefined>;
|
|
16
|
-
export declare
|
|
16
|
+
export declare const _dynamic_tag_content: (nodeAccessor: EncodedAccessor) => Signal<Renderer | undefined>;
|
|
17
17
|
export declare function _resume_dynamic_tag(): void;
|
|
18
18
|
export declare function setConditionalRenderer<T>(scope: Scope, nodeAccessor: Accessor, newRenderer: T, createBranch: ($global: Scope[typeof AccessorProp.Global], renderer: NonNullable<T>, parentScope: Scope, parentNode: ParentNode) => BranchScope): void;
|
|
19
19
|
export declare const _for_of: (nodeAccessor: EncodedAccessor, template?: string | 0, walks?: string | 0, setup?: SetupFn | 0, params?: Signal<unknown>) => (scope: Scope, value: [all: unknown[], by?: ((item: unknown, index: number) => unknown) | undefined]) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { R as controllableScripts, S as _attr_input_checkedValue_script, k as _attr_input_value_script, w as _attr_input_checked_script } from "../dom-Cj4HQ7T_.mjs";
|
|
2
|
+
controllableScripts[0] = _attr_input_checked_script, controllableScripts[1] = _attr_input_checkedValue_script, controllableScripts[2] = _attr_input_value_script;
|
|
3
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type Accessor, ControlledType, type Scope } from "../common/types";
|
|
2
2
|
export declare function _attr_input_checked_default(scope: Scope, nodeAccessor: Accessor, checked: boolean): void;
|
|
3
|
-
/** Filled by the
|
|
4
|
-
* control kinds its tags can be (`_attrs_script`
|
|
3
|
+
/** Filled by the `controllable-*.feat` modules a compiled page imports, so a
|
|
4
|
+
* page carries only the control kinds its tags can be (`_attrs_script`
|
|
5
|
+
* resolves the kind at run time). */
|
|
5
6
|
export declare const controllableScripts: {
|
|
6
7
|
[T in ControlledType]?: (scope: Scope, nodeAccessor: Accessor) => void;
|
|
7
8
|
};
|
|
@@ -11,12 +12,6 @@ export declare const controllableRenders: {
|
|
|
11
12
|
[tagName: string]: ControllableAttrs;
|
|
12
13
|
};
|
|
13
14
|
export type ControllableAttrs = (scope: Scope, nodeAccessor: Accessor, nextAttrs: Record<string, unknown>) => RegExp | void;
|
|
14
|
-
export declare function _enable_controllable_input(): void;
|
|
15
|
-
export declare function _enable_controllable_textarea(): void;
|
|
16
|
-
export declare function _enable_controllable_select(): void;
|
|
17
|
-
export declare function _enable_controllable_open(): void;
|
|
18
|
-
/** A run-time tag name can be any controllable, so its page enables them all. */
|
|
19
|
-
export declare function _enable_controllable(): void;
|
|
20
15
|
export declare function _attr_input_checked(scope: Scope, nodeAccessor: Accessor, checked: unknown, checkedChange: unknown): void;
|
|
21
16
|
export declare function _attr_input_checked_script(scope: Scope, nodeAccessor: Accessor): void;
|
|
22
17
|
export declare function _attr_input_checkedValue_default(scope: Scope, nodeAccessor: Accessor, checkedValue: unknown, value: unknown): void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
let require_control_flow = require("../dom-CI-06TZb.js");
|
|
2
|
+
require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.L.INPUT = require_control_flow.N, require_control_flow.L.TEXTAREA = require_control_flow.I, require_control_flow.L.SELECT = require_control_flow.F, require_control_flow.L.DETAILS = require_control_flow.L.DIALOG = require_control_flow.P;
|
|
3
|
+
//#endregion
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { F as _controllable_select, I as _controllable_textarea, L as controllableRenders, N as _controllable_input, P as _controllable_open } from "../dom-Cj4HQ7T_.mjs";
|
|
2
|
+
import "./controllable-input.feat.mjs";
|
|
3
|
+
import "./controllable-open.feat.mjs";
|
|
4
|
+
import "./controllable-select.feat.mjs";
|
|
5
|
+
controllableRenders.INPUT = _controllable_input, controllableRenders.TEXTAREA = _controllable_textarea, controllableRenders.SELECT = _controllable_select, controllableRenders.DETAILS = controllableRenders.DIALOG = _controllable_open;
|
|
6
|
+
//#endregion
|
package/dist/dom/queue.d.ts
CHANGED
|
@@ -21,6 +21,6 @@ export declare function run(): void;
|
|
|
21
21
|
export declare function queueAsyncRender<T, U extends Scope = Scope>(scope: U, signal: Signal<T, U>, value?: T): void;
|
|
22
22
|
export declare function prepareEffects(fn: () => void): unknown[];
|
|
23
23
|
export declare let runEffects: (effects: unknown[], checkPending?: boolean | 1) => void;
|
|
24
|
-
|
|
25
|
-
export declare function
|
|
24
|
+
declare let runRender: (render: PendingRender) => void;
|
|
25
|
+
export declare function installCatch(wrapEffects: (base: typeof runEffects) => typeof runEffects, wrapRender: (base: typeof runRender) => typeof runRender): void;
|
|
26
26
|
export {};
|
package/dist/dom/resume.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ export interface RenderData {
|
|
|
23
23
|
j?: never;
|
|
24
24
|
p?: Record<string | number, AwaitCounter>;
|
|
25
25
|
}
|
|
26
|
-
export declare function enableBranches(): void;
|
|
27
26
|
export declare function ready(readyId: string): void;
|
|
28
27
|
export declare function initEmbedded(readyId: string, runtimeId?: string): void;
|
|
29
28
|
export declare function init(runtimeId?: string): void;
|