marko 6.4.4 → 6.4.6
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/errors.d.ts +2 -1
- package/dist/common/helpers.d.ts +7 -7
- package/dist/debug/dom/catch.feat.js +3 -3
- package/dist/debug/dom/catch.feat.mjs +3 -3
- 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 +5 -5
- package/dist/debug/dom/controllable.feat.mjs +5 -5
- package/dist/debug/dom/dynamic-tag-script.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/debug/dom/lazy.feat.js +1 -1
- package/dist/debug/dom/lazy.feat.mjs +1 -1
- package/dist/debug/dom/placeholder.feat.js +1 -1
- package/dist/debug/dom/placeholder.feat.mjs +1 -1
- package/dist/debug/{dom-CUxvM4i9.js → dom-CNgQ6lj9.js} +52 -52
- package/dist/debug/{dom-BeY1nGUb.mjs → dom-o9jQjchF.mjs} +43 -43
- package/dist/debug/dom.js +4 -4
- package/dist/debug/dom.mjs +4 -4
- package/dist/debug/html.js +721 -654
- package/dist/debug/html.mjs +721 -654
- package/dist/dom/catch.feat.js +4 -4
- package/dist/dom/catch.feat.mjs +3 -3
- package/dist/dom/control-flow.d.ts +2 -2
- package/dist/dom/controllable-input.feat.js +2 -2
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +2 -2
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +2 -2
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +2 -2
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.d.ts +4 -4
- package/dist/dom/controllable.feat.js +2 -2
- package/dist/dom/controllable.feat.mjs +2 -2
- package/dist/dom/dom.d.ts +5 -5
- package/dist/dom/dynamic-tag-script.feat.js +2 -2
- package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +2 -2
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/lazy.feat.js +1 -1
- package/dist/dom/lazy.feat.mjs +1 -1
- package/dist/dom/placeholder.feat.js +1 -1
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/signals.d.ts +4 -1
- package/dist/{dom-Diu8MpmL.js → dom-60R4bRWD.js} +40 -40
- package/dist/{dom-DefWmvQB.mjs → dom-Ci2W4l1P.mjs} +33 -33
- package/dist/dom.js +6 -6
- package/dist/dom.mjs +4 -4
- package/dist/html/assets.d.ts +1 -1
- package/dist/html/compat.d.ts +2 -1
- package/dist/html/control-flow.d.ts +20 -0
- package/dist/html/serializer.d.ts +63 -16
- package/dist/html/writer.d.ts +47 -35
- package/dist/html.d.ts +2 -1
- package/dist/html.js +517 -466
- package/dist/html.mjs +517 -466
- package/dist/translator/core/for.d.ts +0 -4
- package/dist/translator/core/return.d.ts +0 -3
- package/dist/translator/core/style.d.ts +2 -2
- package/dist/translator/index.js +8104 -8108
- package/dist/translator/util/analyze-errors.d.ts +2 -1
- package/dist/translator/util/assert.d.ts +8 -1
- package/dist/translator/util/bindings.d.ts +13 -9
- package/dist/translator/util/body-to-text.d.ts +9 -0
- package/dist/translator/util/branch-tag.d.ts +10 -3
- package/dist/translator/util/build-string-expression.d.ts +4 -0
- package/dist/translator/util/content-derives.d.ts +7 -0
- package/dist/translator/util/entry-builder.d.ts +16 -5
- package/dist/translator/util/finalize-references.d.ts +3 -2
- package/dist/translator/util/generate-uid.d.ts +3 -2
- package/dist/translator/util/get-root.d.ts +3 -3
- package/dist/translator/util/get-tag-name.d.ts +1 -1
- package/dist/translator/util/known-tag.d.ts +10 -8
- package/dist/translator/util/module-read.d.ts +0 -3
- package/dist/translator/util/module-registrations.d.ts +44 -0
- package/dist/translator/util/nested-attribute-tags.d.ts +1 -1
- package/dist/translator/util/optional.d.ts +6 -1
- package/dist/translator/util/params-tree.d.ts +18 -0
- package/dist/translator/util/reasons.d.ts +10 -8
- package/dist/translator/util/references.d.ts +23 -28
- package/dist/translator/util/runtime.d.ts +0 -12
- package/dist/translator/util/scope-accessor.d.ts +0 -1
- package/dist/translator/util/scope-read.d.ts +3 -0
- package/dist/translator/util/section-renderer.d.ts +4 -0
- package/dist/translator/util/sections.d.ts +16 -16
- package/dist/translator/util/setup-work.d.ts +2 -1
- package/dist/translator/util/signals.d.ts +22 -11
- package/dist/translator/util/simplify-fn.d.ts +1 -0
- package/dist/translator/util/slots.d.ts +2 -2
- package/dist/translator/util/solve-reasons.d.ts +1 -3
- package/dist/translator/util/sources.d.ts +2 -1
- package/dist/translator/util/statement-tag.d.ts +2 -0
- package/dist/translator/util/static-text.d.ts +2 -1
- package/dist/translator/util/structure.d.ts +0 -10
- package/dist/translator/util/tag-facts.d.ts +8 -1
- package/dist/translator/util/tag-import.d.ts +20 -0
- package/dist/translator/util/tag-name-type.d.ts +9 -2
- package/dist/translator/util/to-only-or-block.d.ts +3 -0
- package/dist/translator/util/to-property-name.d.ts +2 -0
- package/dist/translator/util/translate-attrs.d.ts +7 -5
- package/dist/translator/util/translate-var.d.ts +2 -0
- package/dist/translator/util/traverse.d.ts +1 -2
- package/dist/translator/util/visitors.d.ts +4 -1
- package/dist/translator/util/with-previous-location.d.ts +1 -1
- package/dist/translator/util/write-guard.d.ts +6 -2
- package/dist/translator/util/writer.d.ts +1 -2
- package/dist/translator/visitors/export-declaration.d.ts +2 -3
- package/dist/translator/visitors/function.d.ts +0 -35
- package/dist/translator/visitors/import-declaration.d.ts +0 -16
- package/dist/translator/visitors/placeholder.d.ts +2 -1
- package/dist/translator/visitors/program/html.d.ts +0 -1
- package/dist/translator/visitors/program/index.d.ts +4 -5
- package/dist/translator/visitors/tag/custom-tag.d.ts +0 -14
- package/dist/translator/visitors/tag/native-tag.d.ts +3 -12
- package/package.json +4 -4
- package/dist/translator/util/binding-has-prop.d.ts +0 -8
- package/dist/translator/util/binding-prop-tree.d.ts +0 -18
- package/dist/translator/util/body-to-text-literal.d.ts +0 -9
- package/dist/translator/util/import-reference.d.ts +0 -3
- package/dist/translator/util/normalize-string-expression.d.ts +0 -4
- package/dist/translator/util/plugin-hooks.d.ts +0 -4
- package/dist/translator/util/resolve-relative-to-entry.d.ts +0 -2
- package/dist/translator/util/set-tag-derived-from.d.ts +0 -7
- package/dist/translator/util/to-first-expression-or-block.d.ts +0 -2
- package/dist/translator/util/to-first-statement-or-block.d.ts +0 -2
package/dist/common/errors.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
export declare const lowercaseOnAttrReg: RegExp;
|
|
1
2
|
export declare function assertValidAttrValue(name: string, value: unknown): void;
|
|
2
3
|
export declare function _assert_class_toggles(classes: string, toggles: string[]): void;
|
|
3
4
|
export declare function assertValidTextValue(value: unknown): void;
|
|
4
5
|
export declare function assertValidLoopKey(key: unknown, seenKeys?: Set<unknown>): void;
|
|
5
6
|
export declare function assertValidList(value: unknown): void;
|
|
6
|
-
export declare function
|
|
7
|
+
export declare function assertOptionalRangeNumber(name: string, value: unknown): void;
|
|
7
8
|
export declare function assertValidRangeBound(name: string, value: unknown): void;
|
|
8
9
|
export declare function assertValidAttrName(name: string): void;
|
|
9
10
|
export declare function _el_read_error(): void;
|
package/dist/common/helpers.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const invalidNativeAttrNameReg: RegExp;
|
|
2
|
+
export declare const invalidAttrNameReg: RegExp;
|
|
3
3
|
export declare function getWrongAttrSuggestion(name: string): string | undefined;
|
|
4
4
|
export declare function _call<T>(fn: (v: T) => unknown, v: T): T;
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
5
|
+
export declare function stringifyClassEntry(name: string, value: unknown): string;
|
|
6
|
+
export declare function stringifyStyleEntry(name: string, value: unknown): string;
|
|
7
7
|
export declare function escapeStyleValue(str: string): string;
|
|
8
8
|
export declare const toDelimitedString: (val: unknown, delimiter: string, stringify: (n: string, v: unknown) => string | undefined) => string;
|
|
9
9
|
export declare function isEventHandler(name: string): name is `on${string}`;
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function getEventType(name: `on${string}`): string;
|
|
11
11
|
export declare function hasKeys(obj: object): boolean;
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
12
|
+
export declare function isNullishOrFalse(value: unknown): value is false | null | undefined;
|
|
13
|
+
export declare function isNotNullishOrFalse(value: unknown): boolean;
|
|
14
14
|
export declare function isPromise(value: unknown): value is Promise<unknown>;
|
|
15
15
|
export declare function normalizeDynamicRenderer<Renderer>(value: any): Renderer | string | undefined;
|
|
16
16
|
export declare const decodeAccessor: (num: number) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-CNgQ6lj9.js");
|
|
3
3
|
//#region src/dom/catch.feat.ts
|
|
4
|
-
const
|
|
4
|
+
const deferToPendingTry = (fn, scope, branch) => {
|
|
5
5
|
while (branch) {
|
|
6
6
|
if (branch["#AwaitCounter"]?.i) return (scope[require_control_flow.PendingEffects] ||= ((branch[require_control_flow.PendingEffectScopes] ||= (branch["#AwaitCounter"].m && ((complete) => branch["#AwaitCounter"].c = () => complete() || require_control_flow.queueAsyncRender(branch, require_control_flow.queueEffect, require_control_flow.runPendingEffects))(branch["#AwaitCounter"].c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
7
7
|
branch = branch[require_control_flow.ParentBranch];
|
|
@@ -15,7 +15,7 @@ require_control_flow.installCatch((effects) => {
|
|
|
15
15
|
for (; i < effects.length;) {
|
|
16
16
|
fn = effects[i++];
|
|
17
17
|
scope = effects[i++];
|
|
18
|
-
if ((branch = scope["#ClosestBranch"])?.["#Gen"] !== 0 && !
|
|
18
|
+
if ((branch = scope["#ClosestBranch"])?.["#Gen"] !== 0 && !deferToPendingTry(fn, scope, branch)) fn(scope);
|
|
19
19
|
}
|
|
20
20
|
}, (runRender) => (render) => {
|
|
21
21
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Gn as PendingRenders, Hn as ParentBranch, Ln as ClosestBranch, Nn as Pending, Pn as Scope, Un as PendingEffectScopes, Wn as PendingEffects,
|
|
1
|
+
import { Gn as PendingRenders, Hn as ParentBranch, Ln as ClosestBranch, Nn as Pending, Pn as Scope, Un as PendingEffectScopes, Wn as PendingEffects, dn as queueAsyncRender, fn as queueEffect, ln as installCatch, v as renderCatch, y as runPendingEffects } from "../dom-o9jQjchF.mjs";
|
|
2
2
|
//#region src/dom/catch.feat.ts
|
|
3
|
-
const
|
|
3
|
+
const deferToPendingTry = (fn, scope, branch) => {
|
|
4
4
|
while (branch) {
|
|
5
5
|
if (branch["#AwaitCounter"]?.i) return (scope[PendingEffects] ||= ((branch[PendingEffectScopes] ||= (branch["#AwaitCounter"].m && ((complete) => branch["#AwaitCounter"].c = () => complete() || queueAsyncRender(branch, queueEffect, runPendingEffects))(branch["#AwaitCounter"].c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
|
|
6
6
|
branch = branch[ParentBranch];
|
|
@@ -14,7 +14,7 @@ installCatch((effects) => {
|
|
|
14
14
|
for (; i < effects.length;) {
|
|
15
15
|
fn = effects[i++];
|
|
16
16
|
scope = effects[i++];
|
|
17
|
-
if ((branch = scope["#ClosestBranch"])?.["#Gen"] !== 0 && !
|
|
17
|
+
if ((branch = scope["#ClosestBranch"])?.["#Gen"] !== 0 && !deferToPendingTry(fn, scope, branch)) fn(scope);
|
|
18
18
|
}
|
|
19
19
|
}, (runRender) => (render) => {
|
|
20
20
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-CNgQ6lj9.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 { D as _attr_input_checkedValue_script,
|
|
1
|
+
import { D as _attr_input_checkedValue_script, H as controllableScripts, P as _attr_input_value_script, k as _attr_input_checked_script } from "../dom-o9jQjchF.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-CNgQ6lj9.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 { C as _attr_details_or_dialog_open_script,
|
|
1
|
+
import { C as _attr_details_or_dialog_open_script, H as controllableScripts } from "../dom-o9jQjchF.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-CNgQ6lj9.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 {
|
|
1
|
+
import { H as controllableScripts, L as _attr_select_value_script } from "../dom-o9jQjchF.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-CNgQ6lj9.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 {
|
|
1
|
+
import { H as controllableScripts, P as _attr_input_value_script } from "../dom-o9jQjchF.mjs";
|
|
2
2
|
//#region src/dom/controllable-textarea.feat.ts
|
|
3
3
|
controllableScripts[2] = _attr_input_value_script;
|
|
4
4
|
//#endregion
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-CNgQ6lj9.js");
|
|
3
3
|
require("./controllable-input.feat.js");
|
|
4
4
|
require("./controllable-open.feat.js");
|
|
5
5
|
require("./controllable-select.feat.js");
|
|
6
6
|
//#region src/dom/controllable.feat.ts
|
|
7
|
-
require_control_flow.
|
|
8
|
-
require_control_flow.
|
|
9
|
-
require_control_flow.
|
|
10
|
-
require_control_flow.
|
|
7
|
+
require_control_flow.controllableSpreadHelpers.INPUT = require_control_flow._controllable_input;
|
|
8
|
+
require_control_flow.controllableSpreadHelpers.TEXTAREA = require_control_flow._controllable_textarea;
|
|
9
|
+
require_control_flow.controllableSpreadHelpers.SELECT = require_control_flow._controllable_select;
|
|
10
|
+
require_control_flow.controllableSpreadHelpers.DETAILS = require_control_flow.controllableSpreadHelpers.DIALOG = require_control_flow._controllable_open;
|
|
11
11
|
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as _controllable_select,
|
|
1
|
+
import { B as _controllable_select, R as _controllable_input, U as controllableSpreadHelpers, V as _controllable_textarea, z as _controllable_open } from "../dom-o9jQjchF.mjs";
|
|
2
2
|
import "./controllable-input.feat.mjs";
|
|
3
3
|
import "./controllable-open.feat.mjs";
|
|
4
4
|
import "./controllable-select.feat.mjs";
|
|
5
5
|
//#region src/dom/controllable.feat.ts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
controllableSpreadHelpers.INPUT = _controllable_input;
|
|
7
|
+
controllableSpreadHelpers.TEXTAREA = _controllable_textarea;
|
|
8
|
+
controllableSpreadHelpers.SELECT = _controllable_select;
|
|
9
|
+
controllableSpreadHelpers.DETAILS = controllableSpreadHelpers.DIALOG = _controllable_open;
|
|
10
10
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-CNgQ6lj9.js");
|
|
3
3
|
//#region src/dom/dynamic-tag-script.feat.ts
|
|
4
4
|
require_control_flow._resumed[require_control_flow.DYNAMIC_TAG_SCRIPT_REGISTER_ID] = require_control_flow.withBranches(require_control_flow.dynamicTagScript);
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ct as _resumed, En as withBranches,
|
|
1
|
+
import { Ct as _resumed, En as withBranches, h as dynamicTagScript, nn as DYNAMIC_TAG_SCRIPT_REGISTER_ID } from "../dom-o9jQjchF.mjs";
|
|
2
2
|
//#region src/dom/dynamic-tag-script.feat.ts
|
|
3
3
|
_resumed[DYNAMIC_TAG_SCRIPT_REGISTER_ID] = withBranches(dynamicTagScript);
|
|
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-CNgQ6lj9.js");
|
|
3
3
|
//#region src/dom/dynamic-tag-var.feat.ts
|
|
4
4
|
require_control_flow.installBranchRenders();
|
|
5
5
|
require_control_flow.installDynamicTagVar((scope, branch, scopeKey, renderer) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as _el_read, In as BranchRenders, Jn as TagVariable,
|
|
1
|
+
import { Ft as _el_read, In as BranchRenders, Jn as TagVariable, cn as installBranchRenders, g as installDynamicTagVar, qn as StartNode, sn as createBranchRenders } from "../dom-o9jQjchF.mjs";
|
|
2
2
|
//#region src/dom/dynamic-tag-var.feat.ts
|
|
3
3
|
installBranchRenders();
|
|
4
4
|
installDynamicTagVar((scope, branch, scopeKey, renderer) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_control_flow = require("../dom-
|
|
2
|
+
const require_control_flow = require("../dom-CNgQ6lj9.js");
|
|
3
3
|
//#region src/dom/placeholder.feat.ts
|
|
4
4
|
require_control_flow._resumed[require_control_flow.PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
|
|
5
5
|
if (tryBranch["#PlaceholderBranch"]) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ct as _resumed, Kn as PlaceholderBranch, Qt as destroyBranch, rn as PLACEHOLDER_DISMISS_REGISTER_ID } from "../dom-
|
|
1
|
+
import { Ct as _resumed, Kn as PlaceholderBranch, Qt as destroyBranch, rn as PLACEHOLDER_DISMISS_REGISTER_ID } from "../dom-o9jQjchF.mjs";
|
|
2
2
|
//#region src/dom/placeholder.feat.ts
|
|
3
3
|
_resumed[PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
|
|
4
4
|
if (tryBranch["#PlaceholderBranch"]) {
|
|
@@ -72,7 +72,7 @@ const Returns = "returns";
|
|
|
72
72
|
const Lazy = "lazy";
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/common/helpers.ts
|
|
75
|
-
const
|
|
75
|
+
const invalidNativeAttrNameReg = /^[^a-z_]|[^a-z0-9._:-]/i;
|
|
76
76
|
const knownWrongAttrs = {
|
|
77
77
|
className: "class",
|
|
78
78
|
classList: "class",
|
|
@@ -114,11 +114,11 @@ function _call(fn, v) {
|
|
|
114
114
|
fn(v);
|
|
115
115
|
return v;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function stringifyClassEntry(name, value) {
|
|
118
118
|
return value ? name : "";
|
|
119
119
|
}
|
|
120
120
|
const warnedStyleKeys = /* @__PURE__ */ new Set();
|
|
121
|
-
function
|
|
121
|
+
function stringifyStyleEntry(name, value) {
|
|
122
122
|
if (/[A-Z]/.test(name) && !name.includes("-") && !warnedStyleKeys.has(name)) {
|
|
123
123
|
warnedStyleKeys.add(name);
|
|
124
124
|
console.warn(`\`${name}\` is not a CSS property name; \`style\` object keys are written verbatim, so it renders as invalid CSS. Use \`${name.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase()).replace(/^ms-/, "-ms-")}\`.`);
|
|
@@ -165,10 +165,10 @@ const toDelimitedString = function toDelimitedString(val, delimiter, stringify)
|
|
|
165
165
|
function isEventHandler(name) {
|
|
166
166
|
return /^on[A-Z-]/.test(name);
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function getEventType(name) {
|
|
169
169
|
return name[2] === "-" ? name.slice(3) : name.slice(2).toLowerCase();
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function isNotNullishOrFalse(value) {
|
|
172
172
|
return value != null && value !== false;
|
|
173
173
|
}
|
|
174
174
|
function isPromise(value) {
|
|
@@ -197,9 +197,9 @@ function withDynamicHtml(runtime) {
|
|
|
197
197
|
}
|
|
198
198
|
//#endregion
|
|
199
199
|
//#region src/common/errors.ts
|
|
200
|
-
const
|
|
200
|
+
const lowercaseOnAttrReg = /^on[a-z]/;
|
|
201
201
|
function assertValidAttrValue(name, value) {
|
|
202
|
-
if (value && typeof value !== "string" &&
|
|
202
|
+
if (value && typeof value !== "string" && lowercaseOnAttrReg.test(name)) throw new Error(`The \`${name}\` attribute must be a string or a falsey value (\`null\`, \`undefined\`, \`false\`, \`0\`, …), but received type "${typeof value}". To attach an event listener, use the \`on${name[2].toUpperCase()}${name.slice(3)}\` event handler instead.`);
|
|
203
203
|
if (typeof value === "function") throw new Error(`The \`${name}\` attribute cannot be a function.${/Change$/.test(name) ? " A change handler is only used when its matching controllable attribute combination applies." : ""}`);
|
|
204
204
|
const unrenderable = describeUnrenderable(value);
|
|
205
205
|
if (unrenderable) throw new Error(`The \`${name}\` attribute cannot be ${unrenderable}.`);
|
|
@@ -238,7 +238,7 @@ function describeUnrenderable(value) {
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
function assertValidLoopKey(key, seenKeys) {
|
|
241
|
-
if (typeof key !== "string" && typeof key !== "number") throw new Error(`A \`<for>\` tag's \`by\` attribute must return a string or number for each item, but received ${key === null ?
|
|
241
|
+
if (typeof key !== "string" && typeof key !== "number" || key !== key) throw new Error(`A \`<for>\` tag's \`by\` attribute must return a string or number for each item, but received ${key === null || key !== key ? key : `type "${typeof key}"`}.`);
|
|
242
242
|
if (seenKeys) {
|
|
243
243
|
if (seenKeys.has(key)) throw new Error(`A \`<for>\` tag's \`by\` attribute must return a unique value for each item, but \`${key}\` was used more than once.`);
|
|
244
244
|
seenKeys.add(key);
|
|
@@ -247,7 +247,7 @@ function assertValidLoopKey(key, seenKeys) {
|
|
|
247
247
|
function assertValidList(value) {
|
|
248
248
|
if (value && typeof value[Symbol.iterator] !== "function") throw new Error(`A \`<for>\` tag's \`of\` attribute must be an iterable, such as an array, but received ${describeForValue(value)}.`);
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function assertOptionalRangeNumber(name, value) {
|
|
251
251
|
if (value && (typeof value !== "number" || !isFinite(value))) throw new Error(`A \`<for>\` tag's \`${name}\` attribute must be a finite number, but received ${describeForValue(value)}.`);
|
|
252
252
|
}
|
|
253
253
|
function assertValidRangeBound(name, value) {
|
|
@@ -257,7 +257,7 @@ function describeForValue(value) {
|
|
|
257
257
|
return typeof value === "number" || typeof value === "bigint" ? `\`${value}\`` : value === null ? "null" : `type "${typeof value}"`;
|
|
258
258
|
}
|
|
259
259
|
function assertValidAttrName(name) {
|
|
260
|
-
if (
|
|
260
|
+
if (invalidNativeAttrNameReg.test(name)) throw new Error(`Invalid attribute name: ${JSON.stringify(name)}`);
|
|
261
261
|
const suggestion = getWrongAttrSuggestion(name);
|
|
262
262
|
if (suggestion) throw new Error(`\`${name}\` is not a valid attribute, did you mean \`${suggestion}\`?`);
|
|
263
263
|
}
|
|
@@ -325,16 +325,16 @@ function forOf(list, cb) {
|
|
|
325
325
|
}
|
|
326
326
|
function forTo(to, from, step, cb) {
|
|
327
327
|
assertValidRangeBound("to", to);
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
assertOptionalRangeNumber("from", from);
|
|
329
|
+
assertOptionalRangeNumber("step", step);
|
|
330
330
|
const start = from || 0;
|
|
331
331
|
const delta = step || 1;
|
|
332
332
|
for (let steps = (to - start) / delta, i = 0; i <= steps; i++) cb(start + i * delta);
|
|
333
333
|
}
|
|
334
334
|
function forUntil(until, from, step, cb) {
|
|
335
335
|
assertValidRangeBound("until", until);
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
assertOptionalRangeNumber("from", from);
|
|
337
|
+
assertOptionalRangeNumber("step", step);
|
|
338
338
|
const start = from || 0;
|
|
339
339
|
const delta = step || 1;
|
|
340
340
|
for (let steps = (until - start) / delta, i = 0; i < steps; i++) cb(start + i * delta);
|
|
@@ -1272,7 +1272,7 @@ function setAttribute(element, name, value) {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
function _attr_class(element, value) {
|
|
1275
|
-
setAttribute(element, "class", toDelimitedString(value, " ",
|
|
1275
|
+
setAttribute(element, "class", toDelimitedString(value, " ", stringifyClassEntry) || void 0);
|
|
1276
1276
|
}
|
|
1277
1277
|
function _attr_class_items(element, items) {
|
|
1278
1278
|
for (const key in items) _attr_class_item(element, key, items[key]);
|
|
@@ -1289,7 +1289,7 @@ function _attr_class_names(element, names, value) {
|
|
|
1289
1289
|
} while (start = end + 1);
|
|
1290
1290
|
}
|
|
1291
1291
|
function _attr_style(element, value) {
|
|
1292
|
-
setAttribute(element, "style", toDelimitedString(value, ";",
|
|
1292
|
+
setAttribute(element, "style", toDelimitedString(value, ";", stringifyStyleEntry) || void 0);
|
|
1293
1293
|
}
|
|
1294
1294
|
function _attr_style_items(element, items) {
|
|
1295
1295
|
for (const key in items) _attr_style_item(element, key, items[key]);
|
|
@@ -1346,7 +1346,7 @@ function _attrs_partial(scope, nodeAccessor, nextAttrs, skip, controllable) {
|
|
|
1346
1346
|
if (!skip[name] && !(nextAttrs && (name in nextAttrs || hasAttrAlias(el, name, nextAttrs)))) el.removeAttribute(name);
|
|
1347
1347
|
}
|
|
1348
1348
|
for (const name in nextAttrs) {
|
|
1349
|
-
const key = isEventHandler(name) ? `on-${
|
|
1349
|
+
const key = isEventHandler(name) ? `on-${getEventType(name)}` : name;
|
|
1350
1350
|
if (!skip[key]) partial[key] = nextAttrs[name];
|
|
1351
1351
|
}
|
|
1352
1352
|
assertExclusiveAttrs({
|
|
@@ -1380,7 +1380,7 @@ function attrsInternal(scope, nodeAccessor, nextAttrs, controllable) {
|
|
|
1380
1380
|
break;
|
|
1381
1381
|
default:
|
|
1382
1382
|
assertValidAttrName(name);
|
|
1383
|
-
if (isEventHandler(name)) (events ||= scope[EventAttributes + nodeAccessor] = {})[
|
|
1383
|
+
if (isEventHandler(name)) (events ||= scope[EventAttributes + nodeAccessor] = {})[getEventType(name)] = value;
|
|
1384
1384
|
else if (!(skip?.test(name) || name === "content" && el.tagName !== "META")) _attr(el, name, value);
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
@@ -1388,7 +1388,7 @@ function attrsInternal(scope, nodeAccessor, nextAttrs, controllable) {
|
|
|
1388
1388
|
function _attr_content(scope, nodeAccessor, value) {
|
|
1389
1389
|
const content = normalizeClientRender(value);
|
|
1390
1390
|
if (scope["ConditionalRenderer:" + nodeAccessor] !== (scope["ConditionalRenderer:" + nodeAccessor] = rendererKey(content))) {
|
|
1391
|
-
|
|
1391
|
+
setBranch(scope, nodeAccessor, content, createAndSetupBranch);
|
|
1392
1392
|
if (content?.["accessor"]) subscribeToScopeSet(content[Owner], content[Accessor], scope[BranchScopes$1 + nodeAccessor]);
|
|
1393
1393
|
}
|
|
1394
1394
|
content?.[LocalClosures]?.(scope[BranchScopes$1 + nodeAccessor]);
|
|
@@ -1429,7 +1429,7 @@ function normalizeClientRender(value) {
|
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
1431
|
function normalizeAttrValue(value) {
|
|
1432
|
-
if (
|
|
1432
|
+
if (isNotNullishOrFalse(value)) return value === true ? "" : value + "";
|
|
1433
1433
|
}
|
|
1434
1434
|
function _lifecycle(scope, thisObj, index = 0) {
|
|
1435
1435
|
const accessor = Lifecycle + index;
|
|
@@ -1490,7 +1490,7 @@ function resolveCursorPosition(inputType, initialPosition, initialValue, updated
|
|
|
1490
1490
|
let inputType = "";
|
|
1491
1491
|
function _attr_input_checked_default(scope, nodeAccessor, checked) {
|
|
1492
1492
|
const el = scope[nodeAccessor];
|
|
1493
|
-
const normalizedChecked =
|
|
1493
|
+
const normalizedChecked = isNotNullishOrFalse(checked);
|
|
1494
1494
|
if (el.defaultChecked !== normalizedChecked) {
|
|
1495
1495
|
const restoreValue = scope["#Gen"] < runId ? el.checked : normalizedChecked;
|
|
1496
1496
|
el.defaultChecked = normalizedChecked;
|
|
@@ -1502,11 +1502,11 @@ function _attr_input_checked_default(scope, nodeAccessor, checked) {
|
|
|
1502
1502
|
* resolves the kind at run time). */
|
|
1503
1503
|
const controllableScripts = {};
|
|
1504
1504
|
/** The render pass equivalent, for a tag whose name is only known at run time;
|
|
1505
|
-
* a statically named tag passes its
|
|
1506
|
-
const
|
|
1505
|
+
* a statically named tag passes its helper to `_attrs` instead. */
|
|
1506
|
+
const controllableSpreadHelpers = {};
|
|
1507
1507
|
function _attr_input_checked(scope, nodeAccessor, checked, checkedChange) {
|
|
1508
1508
|
const el = scope[nodeAccessor];
|
|
1509
|
-
const normalizedChecked =
|
|
1509
|
+
const normalizedChecked = isNotNullishOrFalse(checked);
|
|
1510
1510
|
assertHandlerIsFunction("checkedChange", checkedChange);
|
|
1511
1511
|
scope[ControlledHandler + nodeAccessor] = checkedChange;
|
|
1512
1512
|
scope[ControlledType + nodeAccessor] = checkedChange ? 0 : 5;
|
|
@@ -1671,7 +1671,7 @@ function _attr_select_value_script(scope, nodeAccessor) {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
}
|
|
1673
1673
|
syncControllableFormInput(el, hasSelectChanged, onChange);
|
|
1674
|
-
|
|
1674
|
+
observeControlled(scope, nodeAccessor, {
|
|
1675
1675
|
childList: true,
|
|
1676
1676
|
subtree: true
|
|
1677
1677
|
}, () => {
|
|
@@ -1691,10 +1691,10 @@ function assertSelectValueMatchesOption(el, normalizedValue, value) {
|
|
|
1691
1691
|
if ((Array.isArray(normalizedValue) ? normalizedValue : [normalizedValue]).some((v) => v && !options.includes(v))) console.error("A controlled `<select>`'s `value` has no matching `<option>`:", value);
|
|
1692
1692
|
}
|
|
1693
1693
|
function _attr_details_or_dialog_open_default(scope, nodeAccessor, open) {
|
|
1694
|
-
if (scope["#Gen"] === runId) scope[nodeAccessor].open =
|
|
1694
|
+
if (scope["#Gen"] === runId) scope[nodeAccessor].open = isNotNullishOrFalse(open);
|
|
1695
1695
|
}
|
|
1696
1696
|
function _attr_details_or_dialog_open(scope, nodeAccessor, open, openChange) {
|
|
1697
|
-
const normalizedOpen = scope[ControlledValue + nodeAccessor] =
|
|
1697
|
+
const normalizedOpen = scope[ControlledValue + nodeAccessor] = isNotNullishOrFalse(open);
|
|
1698
1698
|
assertHandlerIsFunction("openChange", openChange);
|
|
1699
1699
|
scope[ControlledHandler + nodeAccessor] = openChange;
|
|
1700
1700
|
scope[ControlledType + nodeAccessor] = openChange ? 4 : 5;
|
|
@@ -1703,7 +1703,7 @@ function _attr_details_or_dialog_open(scope, nodeAccessor, open, openChange) {
|
|
|
1703
1703
|
}
|
|
1704
1704
|
function _attr_details_or_dialog_open_script(scope, nodeAccessor) {
|
|
1705
1705
|
const el = scope[nodeAccessor];
|
|
1706
|
-
|
|
1706
|
+
observeControlled(scope, nodeAccessor, {
|
|
1707
1707
|
attributes: true,
|
|
1708
1708
|
attributeFilter: ["open"]
|
|
1709
1709
|
}, () => {
|
|
@@ -1716,7 +1716,7 @@ function _attr_details_or_dialog_open_script(scope, nodeAccessor) {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
});
|
|
1718
1718
|
}
|
|
1719
|
-
function
|
|
1719
|
+
function observeControlled(scope, nodeAccessor, init, callback) {
|
|
1720
1720
|
(scope[ControlledObserver + nodeAccessor] ||= new MutationObserver(callback)).observe(scope[nodeAccessor], init);
|
|
1721
1721
|
}
|
|
1722
1722
|
function syncControllableFormInput(el, hasChanged, onChange) {
|
|
@@ -1821,7 +1821,7 @@ function _await_promise(nodeAccessor, params) {
|
|
|
1821
1821
|
if (scope[tryAccessor]) queueAsyncRender(scope[tryAccessor], completeAwaitCounter, awaitCounter);
|
|
1822
1822
|
});
|
|
1823
1823
|
if (awaitBranch) awaitBranch[PendingRenders] ||= [];
|
|
1824
|
-
if (tryBranch !== awaitBranch) awaitCounter =
|
|
1824
|
+
if (tryBranch !== awaitBranch) awaitCounter = startAwait(scope, tryBranch);
|
|
1825
1825
|
else {
|
|
1826
1826
|
if (!awaitCounter?.i) awaitCounter = createAwaitCounter(tryBranch, () => {
|
|
1827
1827
|
if (tryBranch === scope[branchAccessor]) {
|
|
@@ -1833,7 +1833,7 @@ function _await_promise(nodeAccessor, params) {
|
|
|
1833
1833
|
}
|
|
1834
1834
|
}
|
|
1835
1835
|
});
|
|
1836
|
-
|
|
1836
|
+
countAwait(awaitCounter, scope, () => {
|
|
1837
1837
|
if (!awaitBranch["#DetachedAwait"]) {
|
|
1838
1838
|
awaitBranch[StartNode].parentNode.insertBefore(scope[nodeAccessor], awaitBranch[StartNode]);
|
|
1839
1839
|
tempDetachBranch(tryBranch);
|
|
@@ -1884,18 +1884,18 @@ function _await_content(nodeAccessor, template, walks, setup) {
|
|
|
1884
1884
|
if (typeof scope[promiseAccessor] === "function") scope[promiseAccessor]();
|
|
1885
1885
|
};
|
|
1886
1886
|
}
|
|
1887
|
-
function
|
|
1887
|
+
function startAwait(scope, tryBranch = findTryWithPlaceholder(scope)) {
|
|
1888
1888
|
if (!tryBranch) return;
|
|
1889
1889
|
let awaitCounter = tryBranch[AwaitCounter];
|
|
1890
1890
|
if (!awaitCounter?.i) awaitCounter = createAwaitCounter(tryBranch, () => dismissPlaceholder(tryBranch));
|
|
1891
|
-
|
|
1891
|
+
countAwait(awaitCounter, tryBranch, () => {
|
|
1892
1892
|
(tryBranch[PlaceholderBranch] = createAndSetupBranch(tryBranch[Global], tryBranch[PlaceholderContent](), tryBranch["_"], tryBranch[StartNode].parentNode))[TryBranch] = tryBranch;
|
|
1893
1893
|
insertBranchBefore(tryBranch[PlaceholderBranch], tryBranch[StartNode].parentNode, tryBranch[StartNode]);
|
|
1894
1894
|
tempDetachBranch(tryBranch);
|
|
1895
1895
|
});
|
|
1896
1896
|
return awaitCounter;
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1898
|
+
function countAwait(awaitCounter, scope, render) {
|
|
1899
1899
|
if (!awaitCounter.i++) requestAnimationFrame(() => awaitCounter.i && runEffects(prepareEffects(() => queueRender(scope, render, -1))));
|
|
1900
1900
|
}
|
|
1901
1901
|
function queueCompleteAwaitCounter(tryBranch, awaitCounter) {
|
|
@@ -1946,7 +1946,7 @@ function _try(nodeAccessor, template, walks, setup, placeholderContent, catchCon
|
|
|
1946
1946
|
const branchAccessor = BranchScopes$1 + nodeAccessor;
|
|
1947
1947
|
const renderer = _content("", template, walks, setup)();
|
|
1948
1948
|
return (scope) => {
|
|
1949
|
-
|
|
1949
|
+
setBranch(scope, nodeAccessor, renderer, createAndSetupBranch);
|
|
1950
1950
|
const branch = scope[branchAccessor];
|
|
1951
1951
|
branch[BranchAccessor] = nodeAccessor;
|
|
1952
1952
|
branch[CatchContent] = catchContent;
|
|
@@ -1965,7 +1965,7 @@ function renderCatch(scope, error) {
|
|
|
1965
1965
|
destroyBranch(tryWithCatch);
|
|
1966
1966
|
}
|
|
1967
1967
|
const catchContent = tryWithCatch[CatchContent]();
|
|
1968
|
-
|
|
1968
|
+
setBranch(owner, tryWithCatch[BranchAccessor], catchContent, createAndSetupBranch);
|
|
1969
1969
|
catchContent[Params]?.(owner[BranchScopes$1 + tryWithCatch[BranchAccessor]], [error]);
|
|
1970
1970
|
}
|
|
1971
1971
|
}
|
|
@@ -1985,7 +1985,7 @@ const _if = /*@__PURE__*/ withBranches((nodeAccessor, ...branchesArgs) => {
|
|
|
1985
1985
|
let i = 0;
|
|
1986
1986
|
while (i < branchesArgs.length) branches.push(_content("", branchesArgs[i++], branchesArgs[i++], branchesArgs[i++])());
|
|
1987
1987
|
return (scope, newBranch) => {
|
|
1988
|
-
if (newBranch !== (scope[branchAccessor] ?? (scope["BranchScopes:" + nodeAccessor] && 0)))
|
|
1988
|
+
if (newBranch !== (scope[branchAccessor] ?? (scope["BranchScopes:" + nodeAccessor] && 0))) setBranch(scope, nodeAccessor, branches[scope[branchAccessor] = newBranch], createAndSetupBranch);
|
|
1989
1989
|
};
|
|
1990
1990
|
});
|
|
1991
1991
|
const _show = /*@__PURE__*/ withBranches((nodeAccessor, startNodeAccessor, endNodeAccessor) => {
|
|
@@ -2035,7 +2035,7 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
|
|
|
2035
2035
|
const normalizedRenderer = normalizeDynamicRenderer(newRenderer);
|
|
2036
2036
|
if (scope[rendererAccessor] !== (scope[rendererAccessor] = rendererKey(normalizedRenderer) || (getContent ? void 0 : 0)) || getContent && !(normalizedRenderer || scope[childScopeAccessor])) {
|
|
2037
2037
|
const renderer = normalizedRenderer || (getContent ? getContent(scope) : void 0);
|
|
2038
|
-
|
|
2038
|
+
setBranch(scope, nodeAccessor, renderer, createBranchWithTagNameOrRenderer);
|
|
2039
2039
|
if (getTagVar) {
|
|
2040
2040
|
if (normalizedRenderer) {
|
|
2041
2041
|
scope[childScopeAccessor][TagVariable] = (value) => getTagVar()(scope, value);
|
|
@@ -2045,7 +2045,7 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
|
|
|
2045
2045
|
if (typeof renderer === "string") {
|
|
2046
2046
|
if (getContent) {
|
|
2047
2047
|
const content = getContent(scope);
|
|
2048
|
-
|
|
2048
|
+
setBranch(scope[childScopeAccessor], `#${renderer.toLowerCase()}/0`, content, createAndSetupBranch);
|
|
2049
2049
|
if (content["accessor"]) subscribeToScopeSet(content[Owner], content[Accessor], scope[childScopeAccessor][`BranchScopes:#${renderer.toLowerCase()}/0`]);
|
|
2050
2050
|
}
|
|
2051
2051
|
} else if (renderer) {
|
|
@@ -2058,7 +2058,7 @@ let _dynamic_tag = /*@__PURE__*/ withBranches((nodeAccessor, getContent, getTagV
|
|
|
2058
2058
|
const args = getInput?.();
|
|
2059
2059
|
if (typeof normalizedRenderer === "string") {
|
|
2060
2060
|
const nodeAccessor = `#${normalizedRenderer.toLowerCase()}/0`;
|
|
2061
|
-
(getContent ? _attrs : _attrs_content)(childScope, nodeAccessor, (inputIsArgs ? args[0] : args) || {},
|
|
2061
|
+
(getContent ? _attrs : _attrs_content)(childScope, nodeAccessor, (inputIsArgs ? args[0] : args) || {}, controllableSpreadHelpers[childScope[nodeAccessor].tagName]);
|
|
2062
2062
|
if (childScope["EventAttributes:" + nodeAccessor] || childScope["ControlledHandler:" + nodeAccessor]) queueEffect(childScope, dynamicTagScript);
|
|
2063
2063
|
} else {
|
|
2064
2064
|
normalizedRenderer[LocalClosures]?.(childScope);
|
|
@@ -2081,7 +2081,7 @@ const _dynamic_tag_content = /*@__PURE__*/ withBranches((nodeAccessor) => {
|
|
|
2081
2081
|
const rendererAccessor = ConditionalRenderer + nodeAccessor;
|
|
2082
2082
|
return (scope, renderer) => {
|
|
2083
2083
|
if (scope[rendererAccessor] !== (scope[rendererAccessor] = rendererKey(renderer))) {
|
|
2084
|
-
|
|
2084
|
+
setBranch(scope, nodeAccessor, renderer, createAndSetupBranch);
|
|
2085
2085
|
if (renderer?.["accessor"]) subscribeToScopeSet(renderer[Owner], renderer[Accessor], scope[childScopeAccessor]);
|
|
2086
2086
|
}
|
|
2087
2087
|
renderer?.[LocalClosures]?.(scope[childScopeAccessor]);
|
|
@@ -2094,7 +2094,7 @@ function installDynamicTagVar(bind) {
|
|
|
2094
2094
|
function dynamicTagScript(branch) {
|
|
2095
2095
|
_attrs_script(branch, `#${branch[Renderer].toLowerCase()}/0`);
|
|
2096
2096
|
}
|
|
2097
|
-
function
|
|
2097
|
+
function setBranch(scope, nodeAccessor, newRenderer, createBranch) {
|
|
2098
2098
|
const referenceNode = scope[nodeAccessor];
|
|
2099
2099
|
const prevBranch = scope[BranchScopes$1 + nodeAccessor];
|
|
2100
2100
|
const parentNode = referenceNode.nodeType > 1 ? (prevBranch?.["#StartNode"] || referenceNode).parentNode : referenceNode;
|
|
@@ -2953,22 +2953,16 @@ Object.defineProperty(exports, "_var_resume", {
|
|
|
2953
2953
|
return _var_resume;
|
|
2954
2954
|
}
|
|
2955
2955
|
});
|
|
2956
|
-
Object.defineProperty(exports, "
|
|
2957
|
-
enumerable: true,
|
|
2958
|
-
get: function() {
|
|
2959
|
-
return addAwaitCounter;
|
|
2960
|
-
}
|
|
2961
|
-
});
|
|
2962
|
-
Object.defineProperty(exports, "controllableRenders", {
|
|
2956
|
+
Object.defineProperty(exports, "controllableScripts", {
|
|
2963
2957
|
enumerable: true,
|
|
2964
2958
|
get: function() {
|
|
2965
|
-
return
|
|
2959
|
+
return controllableScripts;
|
|
2966
2960
|
}
|
|
2967
2961
|
});
|
|
2968
|
-
Object.defineProperty(exports, "
|
|
2962
|
+
Object.defineProperty(exports, "controllableSpreadHelpers", {
|
|
2969
2963
|
enumerable: true,
|
|
2970
2964
|
get: function() {
|
|
2971
|
-
return
|
|
2965
|
+
return controllableSpreadHelpers;
|
|
2972
2966
|
}
|
|
2973
2967
|
});
|
|
2974
2968
|
Object.defineProperty(exports, "createAndSetupBranch", {
|
|
@@ -3163,6 +3157,12 @@ Object.defineProperty(exports, "setupBranch", {
|
|
|
3163
3157
|
return setupBranch;
|
|
3164
3158
|
}
|
|
3165
3159
|
});
|
|
3160
|
+
Object.defineProperty(exports, "startAwait", {
|
|
3161
|
+
enumerable: true,
|
|
3162
|
+
get: function() {
|
|
3163
|
+
return startAwait;
|
|
3164
|
+
}
|
|
3165
|
+
});
|
|
3166
3166
|
Object.defineProperty(exports, "syncGen", {
|
|
3167
3167
|
enumerable: true,
|
|
3168
3168
|
get: function() {
|