marko 6.3.31 → 6.3.32

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.
Files changed (57) hide show
  1. package/cheatsheet.md +36 -18
  2. package/dist/common/helpers.d.ts +2 -0
  3. package/dist/debug/dom/catch.feat.js +38 -0
  4. package/dist/debug/dom/catch.feat.mjs +37 -0
  5. package/dist/debug/dom/controllable-input.feat.js +7 -0
  6. package/dist/debug/dom/controllable-input.feat.mjs +6 -0
  7. package/dist/debug/dom/controllable-open.feat.js +5 -0
  8. package/dist/debug/dom/controllable-open.feat.mjs +4 -0
  9. package/dist/debug/dom/controllable-select.feat.js +5 -0
  10. package/dist/debug/dom/controllable-select.feat.mjs +4 -0
  11. package/dist/debug/dom/controllable-textarea.feat.js +5 -0
  12. package/dist/debug/dom/controllable-textarea.feat.mjs +4 -0
  13. package/dist/debug/dom/controllable.feat.js +11 -0
  14. package/dist/debug/dom/controllable.feat.mjs +10 -0
  15. package/dist/debug/dom-BJ93mcSe.mjs +2016 -0
  16. package/dist/debug/dom-CiFITSPN.js +2814 -0
  17. package/dist/debug/dom.js +156 -2250
  18. package/dist/debug/dom.mjs +6 -2094
  19. package/dist/dom/catch.feat.d.ts +1 -0
  20. package/dist/dom/catch.feat.js +25 -0
  21. package/dist/dom/catch.feat.mjs +26 -0
  22. package/dist/dom/control-flow.d.ts +3 -3
  23. package/dist/dom/controllable-input.feat.d.ts +1 -0
  24. package/dist/dom/controllable-input.feat.js +3 -0
  25. package/dist/dom/controllable-input.feat.mjs +3 -0
  26. package/dist/dom/controllable-open.feat.d.ts +1 -0
  27. package/dist/dom/controllable-open.feat.js +4 -0
  28. package/dist/dom/controllable-open.feat.mjs +4 -0
  29. package/dist/dom/controllable-select.feat.d.ts +1 -0
  30. package/dist/dom/controllable-select.feat.js +4 -0
  31. package/dist/dom/controllable-select.feat.mjs +4 -0
  32. package/dist/dom/controllable-textarea.feat.d.ts +1 -0
  33. package/dist/dom/controllable-textarea.feat.js +4 -0
  34. package/dist/dom/controllable-textarea.feat.mjs +4 -0
  35. package/dist/dom/controllable.d.ts +3 -8
  36. package/dist/dom/controllable.feat.d.ts +3 -0
  37. package/dist/dom/controllable.feat.js +3 -0
  38. package/dist/dom/controllable.feat.mjs +6 -0
  39. package/dist/dom/queue.d.ts +2 -2
  40. package/dist/dom/resume.d.ts +0 -1
  41. package/dist/dom-CI-06TZb.js +1721 -0
  42. package/dist/dom-Cj4HQ7T_.mjs +1137 -0
  43. package/dist/dom.d.ts +2 -2
  44. package/dist/dom.js +36 -1224
  45. package/dist/dom.mjs +4 -1191
  46. package/dist/translator/index.js +628 -534
  47. package/dist/translator/util/constants/structure-kind.d.ts +7 -0
  48. package/dist/translator/util/get-tag-name.d.ts +2 -1
  49. package/dist/translator/util/import-reference.d.ts +3 -0
  50. package/dist/translator/util/runtime.d.ts +2 -0
  51. package/dist/translator/util/sections.d.ts +28 -1
  52. package/dist/translator/util/{walks.d.ts → structure.d.ts} +20 -9
  53. package/dist/translator/util/writer.d.ts +0 -8
  54. package/dist/translator/visitors/placeholder.d.ts +4 -3
  55. package/dist/translator/visitors/tag/native-tag.d.ts +9 -6
  56. package/dist/translator/visitors/text.d.ts +3 -7
  57. package/package.json +3 -3
@@ -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 function _if(nodeAccessor: EncodedAccessor, ...branchesArgs: (string | SetupFn | 0)[]): (scope: Scope, newBranch: number) => void;
13
- export declare function _show(nodeAccessor: EncodedAccessor, startNodeAccessor?: EncodedAccessor, endNodeAccessor?: EncodedAccessor): (scope: Scope, display: unknown) => void;
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 function _dynamic_tag_content(nodeAccessor: EncodedAccessor): Signal<Renderer | undefined>;
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
+ let require_control_flow = require("../dom-CI-06TZb.js");
2
+ require_control_flow.R[0] = require_control_flow.w, require_control_flow.R[1] = require_control_flow.S, require_control_flow.R[2] = require_control_flow.k;
3
+ //#endregion
@@ -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,4 @@
1
+ let require_control_flow = require("../dom-CI-06TZb.js");
2
+ //#region src/dom/controllable-open.feat.ts
3
+ require_control_flow.R[4] = require_control_flow.v;
4
+ //#endregion
@@ -0,0 +1,4 @@
1
+ import { R as controllableScripts, v as _attr_details_or_dialog_open_script } from "../dom-Cj4HQ7T_.mjs";
2
+ //#region src/dom/controllable-open.feat.ts
3
+ controllableScripts[4] = _attr_details_or_dialog_open_script;
4
+ //#endregion
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ let require_control_flow = require("../dom-CI-06TZb.js");
2
+ //#region src/dom/controllable-select.feat.ts
3
+ require_control_flow.R[3] = require_control_flow.M;
4
+ //#endregion
@@ -0,0 +1,4 @@
1
+ import { M as _attr_select_value_script, R as controllableScripts } from "../dom-Cj4HQ7T_.mjs";
2
+ //#region src/dom/controllable-select.feat.ts
3
+ controllableScripts[3] = _attr_select_value_script;
4
+ //#endregion
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ let require_control_flow = require("../dom-CI-06TZb.js");
2
+ //#region src/dom/controllable-textarea.feat.ts
3
+ require_control_flow.R[2] = require_control_flow.k;
4
+ //#endregion
@@ -0,0 +1,4 @@
1
+ import { R as controllableScripts, k as _attr_input_value_script } from "../dom-Cj4HQ7T_.mjs";
2
+ //#region src/dom/controllable-textarea.feat.ts
3
+ controllableScripts[2] = _attr_input_value_script;
4
+ //#endregion
@@ -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 latches a compiled page emits, so a page carries only the
4
- * control kinds its tags can be (`_attrs_script` resolves the kind at run time). */
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
+ import "./controllable-input.feat";
2
+ import "./controllable-open.feat";
3
+ import "./controllable-select.feat";
@@ -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
@@ -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
- export declare function skipDestroyedRenders(): void;
25
- export declare function _enable_catch(): void;
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 {};
@@ -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;