marko 6.0.119 → 6.0.120

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.
@@ -1,12 +1,19 @@
1
1
  import { type Scope } from "../common/types";
2
2
  import type { Signal } from "./signals";
3
3
  type ExecFn<S extends Scope = Scope> = (scope: S, arg?: any) => void;
4
+ export type PendingRender = {
5
+ ___key: number;
6
+ ___scope: Scope;
7
+ ___signal: Signal<any>;
8
+ ___value: unknown;
9
+ };
4
10
  export declare const caughtError: WeakSet<unknown[]>;
5
11
  export declare const placeholderShown: WeakSet<unknown[]>;
6
12
  export declare let pendingEffects: unknown[];
7
13
  export declare let pendingScopes: Scope[];
8
14
  export declare let rendering: undefined | 0 | 1;
9
15
  export declare function queueRender<T>(scope: Scope, signal: Signal<T>, signalKey: number, value?: T, scopeKey?: number): void;
16
+ export declare function queuePendingRender(render: PendingRender): void;
10
17
  export declare function queueEffect<S extends Scope, T extends ExecFn<S>>(scope: S, fn: T): void;
11
18
  export declare function run(): void;
12
19
  export declare function prepareEffects(fn: () => void): unknown[];
@@ -12,6 +12,7 @@ export type Renderer = {
12
12
  };
13
13
  export type SetupFn = (scope: Scope) => void;
14
14
  export declare function createBranch($global: Scope[AccessorProp.Global], renderer: Renderer | string, parentScope: Scope | undefined, parentNode: ParentNode): BranchScope;
15
+ export declare function setParentBranch(branch: BranchScope, parentBranch: BranchScope | undefined): void;
15
16
  export declare function createAndSetupBranch($global: Scope[AccessorProp.Global], renderer: Renderer, parentScope: Scope | undefined, parentNode: ParentNode): BranchScope;
16
17
  export declare function setupBranch(renderer: Renderer, branch: BranchScope): BranchScope;
17
18
  export declare function _content(id: string, template?: string | 0, walks?: string | 0, setup?: {
@@ -10,7 +10,7 @@ export declare function _for_closure(ownerLoopNodeAccessor: EncodedAccessor, fn:
10
10
  export declare function _if_closure(ownerConditionalNodeAccessor: EncodedAccessor, branch: number, fn: SignalFn): SignalFn;
11
11
  export declare function subscribeToScopeSet(ownerScope: Scope, accessor: Accessor, scope: Scope): void;
12
12
  export declare function _closure(...closureSignals: ReturnType<typeof _closure_get>[]): (scope: Scope) => void;
13
- export declare function _closure_get(valueAccessor: EncodedAccessor, fn: SignalFn, getOwnerScope?: (scope: Scope) => Scope): SignalFn & {
13
+ export declare function _closure_get(valueAccessor: EncodedAccessor, fn: SignalFn, getOwnerScope?: (scope: Scope) => Scope, resumeId?: string): SignalFn & {
14
14
  ___scopeInstancesAccessor: string;
15
15
  ___signalIndexAccessor: string;
16
16
  ___index: number;