marko 6.4.0 → 6.4.2
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 +2 -2
- package/dist/common/constants/accessor-prefix.d.ts +1 -0
- package/dist/common/constants/accessor-prefix.debug.d.ts +1 -0
- package/dist/common/constants/reserved-id.d.ts +5 -0
- package/dist/common/errors.d.ts +2 -1
- package/dist/common/opt.d.ts +1 -0
- package/dist/common/types.d.ts +3 -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-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-BRO5aArp.js → dom-BLbR0hEx.js} +62 -16
- package/dist/debug/{dom-Btj2QJhk.mjs → dom-Cii0IA92.mjs} +51 -17
- package/dist/debug/dom.js +7 -4
- package/dist/debug/dom.mjs +6 -5
- package/dist/debug/html.js +551 -292
- package/dist/debug/html.mjs +548 -290
- 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/dom.d.ts +1 -0
- 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 +1 -1
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/lazy.feat.js +1 -1
- package/dist/dom/lazy.feat.mjs +1 -1
- package/dist/dom/placeholder.feat.js +3 -3
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/signals.d.ts +3 -2
- package/dist/{dom-BSsI9OPC.js → dom-B8UEYzOz.js} +112 -84
- package/dist/{dom-B-v8Gw6T.mjs → dom-BPjLe6YU.mjs} +23 -5
- package/dist/dom.d.ts +2 -2
- package/dist/dom.js +34 -33
- package/dist/dom.mjs +6 -5
- package/dist/html/assets.d.ts +12 -6
- package/dist/html/attrs.d.ts +3 -2
- package/dist/html/compat.d.ts +10 -2
- package/dist/html/dynamic-tag.d.ts +1 -1
- package/dist/html/inlined-runtimes.d.ts +1 -1
- package/dist/html/inlined-runtimes.debug.d.ts +1 -1
- package/dist/html/serializer.d.ts +2 -1
- package/dist/html/writer.d.ts +42 -22
- package/dist/html.d.ts +2 -2
- package/dist/html.js +400 -208
- package/dist/html.mjs +399 -207
- package/dist/translator/core/html-comment.d.ts +0 -7
- package/dist/translator/core/let.d.ts +0 -5
- package/dist/translator/core/show.d.ts +2 -5
- package/dist/translator/core/style.d.ts +6 -8
- package/dist/translator/index.d.ts +9 -0
- package/dist/translator/index.js +8429 -8100
- package/dist/translator/util/binding-has-prop.d.ts +1 -1
- package/dist/translator/util/binding-prop-tree.d.ts +4 -4
- package/dist/translator/util/bindings.d.ts +135 -0
- package/dist/translator/util/body-to-text-literal.d.ts +1 -2
- package/dist/translator/util/branch-tag.d.ts +7 -7
- package/dist/translator/util/constants/binding-type.d.ts +5 -6
- package/dist/translator/util/constants/slot-kind.d.ts +14 -0
- package/dist/translator/util/constants/structure-kind.d.ts +2 -1
- package/dist/translator/util/evaluate.d.ts +11 -10
- package/dist/translator/util/finalize-references.d.ts +4 -0
- package/dist/translator/util/for-selector.d.ts +1 -1
- package/dist/translator/util/generate-uid.d.ts +3 -1
- package/dist/translator/util/get-declared-binding-expression.d.ts +2 -2
- package/dist/translator/util/is-core-tag.d.ts +0 -3
- package/dist/translator/util/is-only-child-in-parent.d.ts +2 -7
- package/dist/translator/util/known-tag.d.ts +10 -8
- package/dist/translator/util/module-read.d.ts +21 -0
- package/dist/translator/util/read-replacement.d.ts +3 -0
- package/dist/translator/util/reasons.d.ts +32 -0
- package/dist/translator/util/references.d.ts +68 -166
- package/dist/translator/util/runtime.d.ts +2 -0
- package/dist/translator/util/scope-accessor.d.ts +14 -0
- package/dist/translator/util/scope-read.d.ts +1 -1
- package/dist/translator/util/sections.d.ts +52 -48
- package/dist/translator/util/set-tag-derived-from.d.ts +7 -0
- package/dist/translator/util/setup-work.d.ts +1 -2
- package/dist/translator/util/signals.d.ts +3 -5
- package/dist/translator/util/slots.d.ts +50 -0
- package/dist/translator/util/solve-reasons.d.ts +10 -0
- package/dist/translator/util/sources.d.ts +21 -0
- package/dist/translator/util/structure.d.ts +6 -2
- package/dist/translator/util/tag-facts.d.ts +21 -0
- package/dist/translator/util/tag-name-type.d.ts +4 -1
- package/dist/translator/util/translate-attrs.d.ts +2 -0
- package/dist/translator/util/translate-var.d.ts +3 -0
- package/dist/translator/util/write-guard.d.ts +12 -0
- package/dist/translator/util/writer.d.ts +3 -3
- package/dist/translator/visitors/export-declaration.d.ts +9 -0
- package/dist/translator/visitors/function.d.ts +5 -4
- package/dist/translator/visitors/import-declaration.d.ts +2 -2
- package/dist/translator/visitors/placeholder.d.ts +0 -3
- package/dist/translator/visitors/program/index.d.ts +13 -3
- package/dist/translator/visitors/referenced-identifier.d.ts +2 -1
- package/dist/translator/visitors/tag/custom-tag.d.ts +1 -1
- package/dist/translator/visitors/tag/dynamic-tag.d.ts +0 -3
- package/dist/translator/visitors/tag/index.d.ts +2 -1
- package/dist/translator/visitors/tag/native-tag.d.ts +26 -12
- package/package.json +3 -3
- package/dist/translator/util/insertion-context.d.ts +0 -1
- package/dist/translator/util/is-non-html-text.d.ts +0 -3
- package/dist/translator/util/serialize-guard.d.ts +0 -11
- package/dist/translator/util/serialize-reasons.d.ts +0 -37
- package/dist/translator/util/set-tag-sections-downstream.d.ts +0 -6
package/cheatsheet.md
CHANGED
|
@@ -128,9 +128,9 @@ Don't fetch while rendering: start data loads early, pass the promise through th
|
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
- Repeated attr tags (many `<@tab ...>`) arrive as the singular prop `input.tab`: the first tab's attrs, made iterable, not an array: `input.tab[i]` and `input.tab.length` are undefined. To index or count, spread first: `<const/tabs=[...input.tab ?? []]>` then `tabs[active]`/`tabs.length`. Looping directly is fine: `<for|tab| of=input.tab>`.
|
|
131
|
-
- Text: `0` renders; `false`/`null`/`undefined`/`""`/`NaN` render nothing. `$!{html}` inserts raw HTML.
|
|
131
|
+
- Text: `0` renders; `false`/`null`/`undefined`/`""`/`NaN` render nothing. `$!{html}` inserts raw HTML; it must be a balanced fragment (no truncated excerpts), or updating it after SSR removes the wrong nodes.
|
|
132
132
|
- Conditional attrs: `false`/`null` attrs are omitted from HTML. `aria-selected` etc. want strings: `aria-selected=(i === active && "true")`.
|
|
133
|
-
- `class=` / `style=` accept strings, objects, arrays: `class=["btn", { active }]`, `style={ color }` (single braces). `style=` keys are kebab-case CSS names (`{ "background-color": c }`); camelCase keys are written verbatim. `...input` spreads attrs onto a tag; `content=` passes body content as an attr.
|
|
133
|
+
- `class=` / `style=` accept strings, objects, arrays: `class=["btn", { active }]`, `style={ color }` (single braces). A toggled class may not repeat another name in its `class=` value (`["a", { a: on }]` is an error). `style=` keys are kebab-case CSS names (`{ "background-color": c }`); camelCase keys are written verbatim. `...input` spreads attrs onto a tag; `content=` passes body content as an attr.
|
|
134
134
|
- `<define/Panel|input|>` declares a local tag inline; `<${Toolbar.Undo}/>` renders a dynamic tag (falsy name → content only).
|
|
135
135
|
- `<select value:=picked>`: every `<option>` needs `value=`; `multiple` binds an array.
|
|
136
136
|
- `<id/x>` mints a collision-free id for label/input wiring (`<label for=x>`/`<input id=x>`); don't hardcode ids in reusable tags; `<id/x=input.id>` reuses a caller's.
|
|
@@ -7,6 +7,7 @@ export declare const ControlledHandler = "E";
|
|
|
7
7
|
export declare const ControlledType = "F";
|
|
8
8
|
export declare const ControlledValue = "G";
|
|
9
9
|
export declare const DynamicHTMLLastChild = "H";
|
|
10
|
+
export declare const DynamicHTMLValue = "R";
|
|
10
11
|
export declare const EventAttributes = "I";
|
|
11
12
|
export declare const IdFallback = "J";
|
|
12
13
|
export declare const KeyedScopes = "O";
|
|
@@ -7,6 +7,7 @@ export declare const ControlledHandler = "ControlledHandler:";
|
|
|
7
7
|
export declare const ControlledType = "ControlledType:";
|
|
8
8
|
export declare const ControlledValue = "ControlledValue:";
|
|
9
9
|
export declare const DynamicHTMLLastChild = "DynamicHTMLLastChild:";
|
|
10
|
+
export declare const DynamicHTMLValue = "DynamicHTMLValue:";
|
|
10
11
|
export declare const EventAttributes = "EventAttributes:";
|
|
11
12
|
export declare const IdFallback = "IdFallback:";
|
|
12
13
|
export declare const KeyedScopes = "KeyedScopes:";
|
package/dist/common/errors.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function assertValidAttrValue(name: string, value: unknown): void;
|
|
2
|
+
export declare function _assert_class_toggles(classes: string, toggles: string[]): void;
|
|
2
3
|
export declare function assertValidTextValue(value: unknown): void;
|
|
3
4
|
export declare function assertValidLoopKey(key: unknown, seenKeys?: Set<unknown>): void;
|
|
4
5
|
export declare function assertValidList(value: unknown): void;
|
|
@@ -8,7 +9,7 @@ export declare function assertValidAttrName(name: string): void;
|
|
|
8
9
|
export declare function _el_read_error(): void;
|
|
9
10
|
export declare function _hoist_read_error(): void;
|
|
10
11
|
export declare function _assert_hoist(value: unknown): void;
|
|
11
|
-
export declare function assertExclusiveAttrs(attrs: Record<string, unknown> | undefined, onError?: typeof throwErr): void;
|
|
12
|
+
export declare function assertExclusiveAttrs(attrs: Record<string, unknown> | undefined, onError?: typeof throwErr, isSet?: (value: unknown) => unknown): void;
|
|
12
13
|
export declare function assertNoValueBindingOnCheckable(type: unknown, valueChange: unknown): void;
|
|
13
14
|
export declare function assertHandlerIsFunction(name: string, value: unknown): void;
|
|
14
15
|
export declare function assertValidTagName(tagName: string): void;
|
package/dist/common/opt.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type Opt<T> = OneMany<T> | undefined | null;
|
|
|
3
3
|
export declare function toArray<T>(oneMany: OneMany<T>): [T, ...T[]];
|
|
4
4
|
export declare function toArray<T>(opt: Opt<T>): T[];
|
|
5
5
|
export declare function forEach<T>(opt: Opt<T>, cb: (item: T) => void): void;
|
|
6
|
+
export declare function reduce<T, R>(opt: Opt<T>, cb: (acc: R, item: T) => R, acc: R): R;
|
|
6
7
|
export declare function push<T>(opt: Opt<T>, item: T): OneMany<T>;
|
|
7
8
|
export declare function push<T>(oneMany: OneMany<T>, item: T): T[];
|
|
8
9
|
export declare function concat<T>(opt: Opt<T>, other: Opt<T>): Opt<T>;
|
package/dist/common/types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { SignalFn } from "../dom/signals";
|
|
|
4
4
|
import type { AccessorProp } from "./accessor.debug";
|
|
5
5
|
import * as ControlledType from "./constants/controlled-type";
|
|
6
6
|
import * as NodeType from "./constants/node-type";
|
|
7
|
+
import * as ReservedId from "./constants/reserved-id";
|
|
7
8
|
import * as ResumeSymbol from "./constants/resume-symbol";
|
|
8
9
|
import * as WalkCode from "./constants/walk-code";
|
|
9
10
|
import * as WalkRangeSize from "./constants/walk-range-size";
|
|
@@ -53,6 +54,8 @@ type WalkCode = WalkCode.Value;
|
|
|
53
54
|
export { WalkCode };
|
|
54
55
|
type WalkRangeSize = WalkRangeSize.Value;
|
|
55
56
|
export { WalkRangeSize };
|
|
57
|
+
type ReservedId = ReservedId.Value;
|
|
58
|
+
export { ReservedId };
|
|
56
59
|
export type Accessor = string;
|
|
57
60
|
export type EncodedAccessor = number | string;
|
|
58
61
|
export interface $Global {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { In as ParentBranch, Ln as PendingEffectScopes, On as Pending, Rn as PendingEffects, b as runPendingEffects, cn as queueAsyncRender, jn as ClosestBranch, kn as Scope, ln as queueEffect, on as installCatch, y as renderCatch, zn as PendingRenders } from "../dom-Cii0IA92.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-BLbR0hEx.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, P as _attr_input_value_script, U as controllableScripts, k as _attr_input_checked_script } from "../dom-
|
|
1
|
+
import { D as _attr_input_checkedValue_script, P as _attr_input_value_script, U as controllableScripts, k as _attr_input_checked_script } from "../dom-Cii0IA92.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-BLbR0hEx.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, U as controllableScripts } from "../dom-
|
|
1
|
+
import { C as _attr_details_or_dialog_open_script, U as controllableScripts } from "../dom-Cii0IA92.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-BLbR0hEx.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 { L as _attr_select_value_script, U as controllableScripts } from "../dom-
|
|
1
|
+
import { L as _attr_select_value_script, U as controllableScripts } from "../dom-Cii0IA92.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-BLbR0hEx.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 { P as _attr_input_value_script, U as controllableScripts } from "../dom-
|
|
1
|
+
import { P as _attr_input_value_script, U as controllableScripts } from "../dom-Cii0IA92.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 { B as _controllable_select, H as controllableRenders, R as _controllable_input, V as _controllable_textarea, z as _controllable_open } from "../dom-
|
|
1
|
+
import { B as _controllable_select, H as controllableRenders, R as _controllable_input, V as _controllable_textarea, z as _controllable_open } from "../dom-Cii0IA92.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-BLbR0hEx.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 {
|
|
1
|
+
import { Cn as withBranches, St as _resumed, g as dynamicTagScript, tn as DYNAMIC_TAG_SCRIPT_REGISTER_ID } from "../dom-Cii0IA92.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-BLbR0hEx.js");
|
|
3
3
|
//#region src/dom/dynamic-tag-var.feat.ts
|
|
4
4
|
require_control_flow.installDynamicTagVar((branch) => branch[require_control_flow.TagVariable](() => require_control_flow._el_read(branch[require_control_flow.StartNode])));
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hn as TagVariable, Pt as _el_read, Vn as StartNode, _ as installDynamicTagVar } from "../dom-Cii0IA92.mjs";
|
|
2
2
|
//#region src/dom/dynamic-tag-var.feat.ts
|
|
3
3
|
installDynamicTagVar((branch) => branch[TagVariable](() => _el_read(branch[StartNode])));
|
|
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-BLbR0hEx.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 {
|
|
1
|
+
import { Bn as PlaceholderBranch, St as _resumed, Zt as destroyBranch, nn as PLACEHOLDER_DISMISS_REGISTER_ID } from "../dom-Cii0IA92.mjs";
|
|
2
2
|
//#region src/dom/placeholder.feat.ts
|
|
3
3
|
_resumed[PLACEHOLDER_DISMISS_REGISTER_ID] = (tryBranch) => {
|
|
4
4
|
if (tryBranch["#PlaceholderBranch"]) {
|
|
@@ -9,6 +9,7 @@ const ControlledHandler = "ControlledHandler:";
|
|
|
9
9
|
const ControlledType = "ControlledType:";
|
|
10
10
|
const ControlledValue = "ControlledValue:";
|
|
11
11
|
const DynamicHTMLLastChild = "DynamicHTMLLastChild:";
|
|
12
|
+
const DynamicHTMLValue = "DynamicHTMLValue:";
|
|
12
13
|
const EventAttributes = "EventAttributes:";
|
|
13
14
|
const KeyedScopes = "KeyedScopes:";
|
|
14
15
|
const Lifecycle = "Lifecycle:";
|
|
@@ -200,6 +201,16 @@ function assertValidAttrValue(name, value) {
|
|
|
200
201
|
const unrenderable = describeUnrenderable(value);
|
|
201
202
|
if (unrenderable) throw new Error(`The \`${name}\` attribute cannot be ${unrenderable}.`);
|
|
202
203
|
}
|
|
204
|
+
function _assert_class_toggles(classes, toggles) {
|
|
205
|
+
{
|
|
206
|
+
const written = new Set(classes.split(" "));
|
|
207
|
+
for (const toggle of toggles) {
|
|
208
|
+
const names = new Set(toggle.split(" "));
|
|
209
|
+
for (const name of names) if (written.has(name)) throw new Error(`The toggled class \`${name}\` is also written by another part of the \`class\` value; a toggled class may appear only once.`);
|
|
210
|
+
for (const name of names) written.add(name);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
203
214
|
function assertValidTextValue(value) {
|
|
204
215
|
const unrenderable = describeUnrenderable(value);
|
|
205
216
|
if (unrenderable) throw new Error(`Text content cannot be ${unrenderable}.`);
|
|
@@ -256,18 +267,18 @@ function _hoist_read_error() {
|
|
|
256
267
|
function _assert_hoist(value) {
|
|
257
268
|
if (value !== void 0 && typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
|
|
258
269
|
}
|
|
259
|
-
function assertExclusiveAttrs(attrs, onError = throwErr) {
|
|
270
|
+
function assertExclusiveAttrs(attrs, onError = throwErr, isSet = isTruthy) {
|
|
260
271
|
if (attrs) {
|
|
261
272
|
let exclusiveAttrs;
|
|
262
|
-
if (attrs.checkedChange) (exclusiveAttrs ||= []).push("checkedChange");
|
|
273
|
+
if (isSet(attrs.checkedChange)) (exclusiveAttrs ||= []).push("checkedChange");
|
|
263
274
|
if ("checkedValue" in attrs) {
|
|
264
275
|
(exclusiveAttrs ||= []).push("checkedValue");
|
|
265
276
|
if ("checked" in attrs) exclusiveAttrs.push("checked");
|
|
266
|
-
} else if (attrs.checkedValueChange) {
|
|
277
|
+
} else if (isSet(attrs.checkedValueChange)) {
|
|
267
278
|
(exclusiveAttrs ||= []).push("checkedValueChange");
|
|
268
279
|
if ("checked" in attrs) exclusiveAttrs.push("checked");
|
|
269
280
|
}
|
|
270
|
-
if (attrs.valueChange) {
|
|
281
|
+
if (isSet(attrs.valueChange)) {
|
|
271
282
|
(exclusiveAttrs ||= []).push("valueChange");
|
|
272
283
|
if ("checked" in attrs && !exclusiveAttrs.includes("checked")) exclusiveAttrs.push("checked");
|
|
273
284
|
}
|
|
@@ -283,6 +294,9 @@ function assertHandlerIsFunction(name, value) {
|
|
|
283
294
|
function assertValidTagName(tagName) {
|
|
284
295
|
if (!/^[a-z][a-z0-9._-]*$/i.test(tagName)) throw new Error(`Invalid tag name: "${tagName}". Tag names must start with a letter and contain only letters, numbers, periods, hyphens, and underscores.`);
|
|
285
296
|
}
|
|
297
|
+
function isTruthy(value) {
|
|
298
|
+
return value;
|
|
299
|
+
}
|
|
286
300
|
function throwErr(msg) {
|
|
287
301
|
throw new Error(msg);
|
|
288
302
|
}
|
|
@@ -808,7 +822,8 @@ function* traverse(scope, path, args, i = path.length - 1) {
|
|
|
808
822
|
if (Symbol.iterator in scope) {
|
|
809
823
|
for (const childScope of scope.values()) if (childScope["#Gen"] !== 0) yield* traverse(childScope, path, args, i);
|
|
810
824
|
} else {
|
|
811
|
-
const
|
|
825
|
+
const step = path[i];
|
|
826
|
+
const item = Array.isArray(step) ? (scope[step[1]] || 0) === step[2] && scope[step[0]] : scope[step];
|
|
812
827
|
if (i) yield* traverse(item, path, args, i - 1);
|
|
813
828
|
else yield typeof item === "function" ? item(...args) : item;
|
|
814
829
|
}
|
|
@@ -1056,6 +1071,7 @@ function init(runtimeId = "M") {
|
|
|
1056
1071
|
if (dynamicHtmlEnabled && visitType > "%" && visitType <= "'") {
|
|
1057
1072
|
if (visitType === "&") htmlStart = visit;
|
|
1058
1073
|
else {
|
|
1074
|
+
if (visit.parentNode !== htmlStart.parentNode) console.error("An unescaped placeholder (`$!{}`) rendered HTML that does not parse as a balanced fragment where it is placed (an unclosed, stray or misnested tag), so updating it removes the wrong nodes.");
|
|
1059
1075
|
visitScope[nextToken()] = htmlStart;
|
|
1060
1076
|
visitScope[DynamicHTMLLastChild + lastToken] = visit;
|
|
1061
1077
|
if ((branchesEnabled || lazyEnabled) && pending[pending.length - 1] !== visitScope) pending.push(visitScope);
|
|
@@ -1163,6 +1179,7 @@ function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
|
1163
1179
|
function _content_resume(renderer, hasLocalValues = 0) {
|
|
1164
1180
|
return _resumed[renderer()["id"]] = (owner, ...values) => {
|
|
1165
1181
|
for (let i = values.length, scope = owner; i > hasLocalValues;) {
|
|
1182
|
+
if (!scope) throw new Error("Unable to resume registered content: its payload does not link the owner of every closure level.");
|
|
1166
1183
|
const closures = values[--i];
|
|
1167
1184
|
for (const key in closures) if (!(key in scope)) scope[key] = closures[key];
|
|
1168
1185
|
scope = scope["_"];
|
|
@@ -1225,6 +1242,14 @@ function _attr_class_items(element, items) {
|
|
|
1225
1242
|
function _attr_class_item(element, name, value) {
|
|
1226
1243
|
element.classList.toggle(name, !!value);
|
|
1227
1244
|
}
|
|
1245
|
+
function _attr_class_names(element, names, value) {
|
|
1246
|
+
let start = 0;
|
|
1247
|
+
let end;
|
|
1248
|
+
do {
|
|
1249
|
+
end = names.indexOf(" ", start);
|
|
1250
|
+
element.classList.toggle(names.slice(start, end >>> 0), !!value);
|
|
1251
|
+
} while (start = end + 1);
|
|
1252
|
+
}
|
|
1228
1253
|
function _attr_style(element, value) {
|
|
1229
1254
|
setAttribute(element, "style", toDelimitedString(value, ";", stringifyStyleObject) || void 0);
|
|
1230
1255
|
}
|
|
@@ -1337,17 +1362,26 @@ function _attrs_script(scope, nodeAccessor) {
|
|
|
1337
1362
|
for (const name in events) _on(el, name, events[name]);
|
|
1338
1363
|
}
|
|
1339
1364
|
const _html = /*@__PURE__*/ withDynamicHtml(function _html(scope, value, accessor) {
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1365
|
+
const prevValue = scope[DynamicHTMLValue + accessor];
|
|
1366
|
+
if (prevValue !== (scope["DynamicHTMLValue:" + accessor] = _to_text(value))) {
|
|
1367
|
+
const firstChild = scope[accessor];
|
|
1368
|
+
const parentNode = firstChild.parentNode;
|
|
1369
|
+
const lastChild = scope["DynamicHTMLLastChild:" + accessor] || firstChild;
|
|
1370
|
+
const newContent = parseHTML(scope[DynamicHTMLValue + accessor], parentNode.namespaceURI);
|
|
1371
|
+
if (prevValue === void 0 && lastChild !== firstChild) {
|
|
1372
|
+
let node = firstChild;
|
|
1373
|
+
let newNode = newContent.firstChild;
|
|
1374
|
+
while ((node = node.nextSibling) !== lastChild && node.isEqualNode(newNode)) newNode = newNode.nextSibling;
|
|
1375
|
+
if (node === lastChild && !newNode) return;
|
|
1376
|
+
}
|
|
1377
|
+
const newFirstChild = scope[accessor] = newContent.firstChild || newContent.appendChild(new Text());
|
|
1378
|
+
const newLastChild = scope[DynamicHTMLLastChild + accessor] = newContent.lastChild;
|
|
1379
|
+
const branch = scope[ClosestBranch];
|
|
1380
|
+
if (branch?.["#StartNode"] === firstChild) branch[StartNode] = newFirstChild;
|
|
1381
|
+
if (branch?.["#EndNode"] === lastChild) branch[EndNode] = newLastChild;
|
|
1382
|
+
insertChildNodes(parentNode, firstChild, newFirstChild, newLastChild);
|
|
1383
|
+
removeChildNodes(firstChild, lastChild);
|
|
1384
|
+
}
|
|
1351
1385
|
});
|
|
1352
1386
|
function normalizeClientRender(value) {
|
|
1353
1387
|
const renderer = normalizeDynamicRenderer(value);
|
|
@@ -2317,6 +2351,12 @@ Object.defineProperty(exports, "TagVariable", {
|
|
|
2317
2351
|
return TagVariable;
|
|
2318
2352
|
}
|
|
2319
2353
|
});
|
|
2354
|
+
Object.defineProperty(exports, "_assert_class_toggles", {
|
|
2355
|
+
enumerable: true,
|
|
2356
|
+
get: function() {
|
|
2357
|
+
return _assert_class_toggles;
|
|
2358
|
+
}
|
|
2359
|
+
});
|
|
2320
2360
|
Object.defineProperty(exports, "_assert_hoist", {
|
|
2321
2361
|
enumerable: true,
|
|
2322
2362
|
get: function() {
|
|
@@ -2353,6 +2393,12 @@ Object.defineProperty(exports, "_attr_class_items", {
|
|
|
2353
2393
|
return _attr_class_items;
|
|
2354
2394
|
}
|
|
2355
2395
|
});
|
|
2396
|
+
Object.defineProperty(exports, "_attr_class_names", {
|
|
2397
|
+
enumerable: true,
|
|
2398
|
+
get: function() {
|
|
2399
|
+
return _attr_class_names;
|
|
2400
|
+
}
|
|
2401
|
+
});
|
|
2356
2402
|
Object.defineProperty(exports, "_attr_content", {
|
|
2357
2403
|
enumerable: true,
|
|
2358
2404
|
get: function() {
|
|
@@ -8,6 +8,7 @@ const ControlledHandler = "ControlledHandler:";
|
|
|
8
8
|
const ControlledType = "ControlledType:";
|
|
9
9
|
const ControlledValue = "ControlledValue:";
|
|
10
10
|
const DynamicHTMLLastChild = "DynamicHTMLLastChild:";
|
|
11
|
+
const DynamicHTMLValue = "DynamicHTMLValue:";
|
|
11
12
|
const EventAttributes = "EventAttributes:";
|
|
12
13
|
const KeyedScopes = "KeyedScopes:";
|
|
13
14
|
const Lifecycle = "Lifecycle:";
|
|
@@ -199,6 +200,16 @@ function assertValidAttrValue(name, value) {
|
|
|
199
200
|
const unrenderable = describeUnrenderable(value);
|
|
200
201
|
if (unrenderable) throw new Error(`The \`${name}\` attribute cannot be ${unrenderable}.`);
|
|
201
202
|
}
|
|
203
|
+
function _assert_class_toggles(classes, toggles) {
|
|
204
|
+
{
|
|
205
|
+
const written = new Set(classes.split(" "));
|
|
206
|
+
for (const toggle of toggles) {
|
|
207
|
+
const names = new Set(toggle.split(" "));
|
|
208
|
+
for (const name of names) if (written.has(name)) throw new Error(`The toggled class \`${name}\` is also written by another part of the \`class\` value; a toggled class may appear only once.`);
|
|
209
|
+
for (const name of names) written.add(name);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
202
213
|
function assertValidTextValue(value) {
|
|
203
214
|
const unrenderable = describeUnrenderable(value);
|
|
204
215
|
if (unrenderable) throw new Error(`Text content cannot be ${unrenderable}.`);
|
|
@@ -255,18 +266,18 @@ function _hoist_read_error() {
|
|
|
255
266
|
function _assert_hoist(value) {
|
|
256
267
|
if (value !== void 0 && typeof value !== "function") throw new Error(`Hoisted values must be functions, received type "${typeof value}".`);
|
|
257
268
|
}
|
|
258
|
-
function assertExclusiveAttrs(attrs, onError = throwErr) {
|
|
269
|
+
function assertExclusiveAttrs(attrs, onError = throwErr, isSet = isTruthy) {
|
|
259
270
|
if (attrs) {
|
|
260
271
|
let exclusiveAttrs;
|
|
261
|
-
if (attrs.checkedChange) (exclusiveAttrs ||= []).push("checkedChange");
|
|
272
|
+
if (isSet(attrs.checkedChange)) (exclusiveAttrs ||= []).push("checkedChange");
|
|
262
273
|
if ("checkedValue" in attrs) {
|
|
263
274
|
(exclusiveAttrs ||= []).push("checkedValue");
|
|
264
275
|
if ("checked" in attrs) exclusiveAttrs.push("checked");
|
|
265
|
-
} else if (attrs.checkedValueChange) {
|
|
276
|
+
} else if (isSet(attrs.checkedValueChange)) {
|
|
266
277
|
(exclusiveAttrs ||= []).push("checkedValueChange");
|
|
267
278
|
if ("checked" in attrs) exclusiveAttrs.push("checked");
|
|
268
279
|
}
|
|
269
|
-
if (attrs.valueChange) {
|
|
280
|
+
if (isSet(attrs.valueChange)) {
|
|
270
281
|
(exclusiveAttrs ||= []).push("valueChange");
|
|
271
282
|
if ("checked" in attrs && !exclusiveAttrs.includes("checked")) exclusiveAttrs.push("checked");
|
|
272
283
|
}
|
|
@@ -282,6 +293,9 @@ function assertHandlerIsFunction(name, value) {
|
|
|
282
293
|
function assertValidTagName(tagName) {
|
|
283
294
|
if (!/^[a-z][a-z0-9._-]*$/i.test(tagName)) throw new Error(`Invalid tag name: "${tagName}". Tag names must start with a letter and contain only letters, numbers, periods, hyphens, and underscores.`);
|
|
284
295
|
}
|
|
296
|
+
function isTruthy(value) {
|
|
297
|
+
return value;
|
|
298
|
+
}
|
|
285
299
|
function throwErr(msg) {
|
|
286
300
|
throw new Error(msg);
|
|
287
301
|
}
|
|
@@ -807,7 +821,8 @@ function* traverse(scope, path, args, i = path.length - 1) {
|
|
|
807
821
|
if (Symbol.iterator in scope) {
|
|
808
822
|
for (const childScope of scope.values()) if (childScope["#Gen"] !== 0) yield* traverse(childScope, path, args, i);
|
|
809
823
|
} else {
|
|
810
|
-
const
|
|
824
|
+
const step = path[i];
|
|
825
|
+
const item = Array.isArray(step) ? (scope[step[1]] || 0) === step[2] && scope[step[0]] : scope[step];
|
|
811
826
|
if (i) yield* traverse(item, path, args, i - 1);
|
|
812
827
|
else yield typeof item === "function" ? item(...args) : item;
|
|
813
828
|
}
|
|
@@ -1055,6 +1070,7 @@ function init(runtimeId = "M") {
|
|
|
1055
1070
|
if (dynamicHtmlEnabled && visitType > "%" && visitType <= "'") {
|
|
1056
1071
|
if (visitType === "&") htmlStart = visit;
|
|
1057
1072
|
else {
|
|
1073
|
+
if (visit.parentNode !== htmlStart.parentNode) console.error("An unescaped placeholder (`$!{}`) rendered HTML that does not parse as a balanced fragment where it is placed (an unclosed, stray or misnested tag), so updating it removes the wrong nodes.");
|
|
1058
1074
|
visitScope[nextToken()] = htmlStart;
|
|
1059
1075
|
visitScope[DynamicHTMLLastChild + lastToken] = visit;
|
|
1060
1076
|
if ((branchesEnabled || lazyEnabled) && pending[pending.length - 1] !== visitScope) pending.push(visitScope);
|
|
@@ -1162,6 +1178,7 @@ function _content(id, template, walks, setup, params, dynamicScopesAccessor) {
|
|
|
1162
1178
|
function _content_resume(renderer, hasLocalValues = 0) {
|
|
1163
1179
|
return _resumed[renderer()["id"]] = (owner, ...values) => {
|
|
1164
1180
|
for (let i = values.length, scope = owner; i > hasLocalValues;) {
|
|
1181
|
+
if (!scope) throw new Error("Unable to resume registered content: its payload does not link the owner of every closure level.");
|
|
1165
1182
|
const closures = values[--i];
|
|
1166
1183
|
for (const key in closures) if (!(key in scope)) scope[key] = closures[key];
|
|
1167
1184
|
scope = scope["_"];
|
|
@@ -1224,6 +1241,14 @@ function _attr_class_items(element, items) {
|
|
|
1224
1241
|
function _attr_class_item(element, name, value) {
|
|
1225
1242
|
element.classList.toggle(name, !!value);
|
|
1226
1243
|
}
|
|
1244
|
+
function _attr_class_names(element, names, value) {
|
|
1245
|
+
let start = 0;
|
|
1246
|
+
let end;
|
|
1247
|
+
do {
|
|
1248
|
+
end = names.indexOf(" ", start);
|
|
1249
|
+
element.classList.toggle(names.slice(start, end >>> 0), !!value);
|
|
1250
|
+
} while (start = end + 1);
|
|
1251
|
+
}
|
|
1227
1252
|
function _attr_style(element, value) {
|
|
1228
1253
|
setAttribute(element, "style", toDelimitedString(value, ";", stringifyStyleObject) || void 0);
|
|
1229
1254
|
}
|
|
@@ -1336,17 +1361,26 @@ function _attrs_script(scope, nodeAccessor) {
|
|
|
1336
1361
|
for (const name in events) _on(el, name, events[name]);
|
|
1337
1362
|
}
|
|
1338
1363
|
const _html = /*@__PURE__*/ withDynamicHtml(function _html(scope, value, accessor) {
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1364
|
+
const prevValue = scope[DynamicHTMLValue + accessor];
|
|
1365
|
+
if (prevValue !== (scope["DynamicHTMLValue:" + accessor] = _to_text(value))) {
|
|
1366
|
+
const firstChild = scope[accessor];
|
|
1367
|
+
const parentNode = firstChild.parentNode;
|
|
1368
|
+
const lastChild = scope["DynamicHTMLLastChild:" + accessor] || firstChild;
|
|
1369
|
+
const newContent = parseHTML(scope[DynamicHTMLValue + accessor], parentNode.namespaceURI);
|
|
1370
|
+
if (prevValue === void 0 && lastChild !== firstChild) {
|
|
1371
|
+
let node = firstChild;
|
|
1372
|
+
let newNode = newContent.firstChild;
|
|
1373
|
+
while ((node = node.nextSibling) !== lastChild && node.isEqualNode(newNode)) newNode = newNode.nextSibling;
|
|
1374
|
+
if (node === lastChild && !newNode) return;
|
|
1375
|
+
}
|
|
1376
|
+
const newFirstChild = scope[accessor] = newContent.firstChild || newContent.appendChild(new Text());
|
|
1377
|
+
const newLastChild = scope[DynamicHTMLLastChild + accessor] = newContent.lastChild;
|
|
1378
|
+
const branch = scope[ClosestBranch];
|
|
1379
|
+
if (branch?.["#StartNode"] === firstChild) branch[StartNode] = newFirstChild;
|
|
1380
|
+
if (branch?.["#EndNode"] === lastChild) branch[EndNode] = newLastChild;
|
|
1381
|
+
insertChildNodes(parentNode, firstChild, newFirstChild, newLastChild);
|
|
1382
|
+
removeChildNodes(firstChild, lastChild);
|
|
1383
|
+
}
|
|
1350
1384
|
});
|
|
1351
1385
|
function normalizeClientRender(value) {
|
|
1352
1386
|
const renderer = normalizeDynamicRenderer(value);
|
|
@@ -2178,4 +2212,4 @@ function byFirstArg(name) {
|
|
|
2178
2212
|
return name;
|
|
2179
2213
|
}
|
|
2180
2214
|
//#endregion
|
|
2181
|
-
export {
|
|
2215
|
+
export { _attr_style_items as $, removeAndDestroyBranch as $t, _attr_input_value as A, AwaitCounter as An, _child_setup as At, _controllable_select as B, PlaceholderBranch as Bn, _id as Bt, _attr_details_or_dialog_open_script as C, withBranches as Cn, _var_resume as Ct, _attr_input_checkedValue_script as D, Setup as Dn, ready as Dt, _attr_input_checkedValue_default as E, Params as En, initEmbedded as Et, _attr_select_value as F, Load as Fn, _for_closure as Ft, _attr_class as G, _return as Gt, controllableRenders as H, TagVariable as Hn, _let as Ht, _attr_select_value_default as I, ParentBranch as In, _for_selector as It, _attr_class_names as J, _var as Jt, _attr_class_item as K, _return_change as Kt, _attr_select_value_script as L, PendingEffectScopes as Ln, _global_read as Lt, _attr_input_value_default as M, EndNode as Mn, _closure_get as Mt, _attr_input_value_dynamic_default as N, Gen$1 as Nn, _const as Nt, _attr_input_checked_default as O, Pending as On, readyFailed as Ot, _attr_input_value_script as P, Global as Pn, _el_read as Pt, _attr_style_item as Q, insertBranchBefore as Qt, _controllable_input as R, PendingEffects as Rn, _hoist as Rt, _attr_details_or_dialog_open_default as S, _call as Sn, _resumed as St, _attr_input_checkedValue as T, Owner as Tn, init as Tt, controllableScripts as U, _let_change as Ut, _controllable_textarea as V, StartNode as Vn, _if_closure as Vt, _attr as W, _or as Wt, _attr_nonce as X, _assert_init as Xt, _attr_content as Y, _var_change as Yt, _attr_style as Z, destroyBranch as Zt, installDynamicTagVar as _, forTo as _n, createAndSetupBranch as _t, _for_in as a, $signalReset as an, _html as at, runPendingEffects as b, _assert_hoist as bn, _dynamic_tag_var_resume as bt, _for_to as c, queueAsyncRender as cn, _style_shell as ct, _for_until_unkeyed as d, rendering as dn, _to_text as dt, syncGen as en, _attrs as et, _if as f, run as fn, insertChildNodes as ft, dynamicTagScript as g, forOf as gn, _content_resume as gt, addAwaitCounter as h, forIn as hn, _content_closures as ht, _dynamic_tag_content as i, $signal as in, _attrs_script as it, _attr_input_value_attribute_default as j, ClosestBranch as jn, _closure as jt, _attr_input_checked_script as k, Scope as kn, withLazy as kt, _for_to_unkeyed as l, queueEffect as ln, _text as lt, _try as m, runId as mn, _content as mt, _await_promise as n, PLACEHOLDER_DISMISS_REGISTER_ID as nn, _attrs_partial as nt, _for_of as o, installCatch as on, _lifecycle as ot, _show as p, runEffects as pn, toInsertNode as pt, _attr_class_items as q, _script as qt, _dynamic_tag as r, _on as rn, _attrs_partial_content as rt, _for_of_unkeyed as s, prepareEffects as sn, _style_rule_item as st, _await_content as t, DYNAMIC_TAG_SCRIPT_REGISTER_ID as tn, _attrs_content as tt, _for_until as u, queueRender as un, _text_content as ut, patchDynamicTag as v, forUntil as vn, createBranch as vt, _attr_input_checked as w, Clone as wn, getRegisteredWithScope as wt, _attr_details_or_dialog_open as x, _hoist_read_error as xn, _el as xt, renderCatch as y, _assert_class_toggles as yn, setupBranch as yt, _controllable_open as z, PendingRenders as zn, _hoist_resume as zt };
|
package/dist/debug/dom.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_control_flow = require("./dom-
|
|
3
|
+
const require_control_flow = require("./dom-BLbR0hEx.js");
|
|
4
4
|
//#region src/common/attr-tag.ts
|
|
5
5
|
const empty = [];
|
|
6
6
|
const rest = Symbol("Attribute Tag");
|
|
@@ -224,17 +224,18 @@ function _load_setup(load) {
|
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
226
|
function insertLoaded(renderer, branch, marker, awaitCounter) {
|
|
227
|
-
const parent = marker.parentNode, values = branch[require_control_flow.Load], clone = () => {
|
|
227
|
+
const parent = () => marker.parentNode, values = branch[require_control_flow.Load], clone = () => {
|
|
228
228
|
require_control_flow.syncGen(branch);
|
|
229
|
-
renderer[require_control_flow.Clone](branch, parent.namespaceURI);
|
|
229
|
+
renderer[require_control_flow.Clone](branch, parent().namespaceURI);
|
|
230
230
|
branch[require_control_flow.Load] = 0;
|
|
231
231
|
}, insert = () => {
|
|
232
|
-
require_control_flow.insertBranchBefore(branch, parent, marker);
|
|
232
|
+
require_control_flow.insertBranchBefore(branch, parent(), marker);
|
|
233
233
|
marker.remove();
|
|
234
234
|
awaitCounter?.c();
|
|
235
235
|
};
|
|
236
236
|
let remaining;
|
|
237
237
|
if (remaining = values?.size) {
|
|
238
|
+
awaitCounter ||= require_control_flow.addAwaitCounter(branch);
|
|
238
239
|
const fail = loadFailed(branch, awaitCounter);
|
|
239
240
|
values.forEach(([, apply], promise) => promise.then((mod) => (apply._ = mod._) && !--remaining && require_control_flow.queueAsyncRender(branch, (branch) => {
|
|
240
241
|
clone();
|
|
@@ -295,12 +296,14 @@ function getSelectorOrResolve(selector, resolve) {
|
|
|
295
296
|
//#endregion
|
|
296
297
|
exports.$signal = require_control_flow.$signal;
|
|
297
298
|
exports.$signalReset = require_control_flow.$signalReset;
|
|
299
|
+
exports._assert_class_toggles = require_control_flow._assert_class_toggles;
|
|
298
300
|
exports._assert_hoist = require_control_flow._assert_hoist;
|
|
299
301
|
exports._assert_init = require_control_flow._assert_init;
|
|
300
302
|
exports._attr = require_control_flow._attr;
|
|
301
303
|
exports._attr_class = require_control_flow._attr_class;
|
|
302
304
|
exports._attr_class_item = require_control_flow._attr_class_item;
|
|
303
305
|
exports._attr_class_items = require_control_flow._attr_class_items;
|
|
306
|
+
exports._attr_class_names = require_control_flow._attr_class_names;
|
|
304
307
|
exports._attr_content = require_control_flow._attr_content;
|
|
305
308
|
exports._attr_details_open = require_control_flow._attr_details_or_dialog_open;
|
|
306
309
|
exports._attr_details_open_default = require_control_flow._attr_details_or_dialog_open_default;
|