marko 6.0.0-next.3.51 → 6.0.0-next.3.53
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/types.d.ts +6 -7
- package/dist/debug/dom.js +81 -55
- package/dist/debug/dom.mjs +81 -55
- package/dist/dom/compat.d.ts +1 -1
- package/dist/dom/renderer.d.ts +8 -5
- package/dist/dom/signals.d.ts +5 -9
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +117 -95
- package/dist/dom.mjs +117 -95
- package/dist/translator/index.js +199 -146
- package/dist/translator/util/references.d.ts +3 -2
- package/dist/translator/util/sections.d.ts +6 -1
- package/dist/translator/util/signals.d.ts +2 -3
- package/package.json +1 -1
@@ -1,4 +1,5 @@
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
2
|
+
import { Sorted } from "./optional";
|
2
3
|
import type { Binding, ReferencedBindings } from "./references";
|
3
4
|
export declare enum ContentType {
|
4
5
|
Comment = 0,
|
@@ -18,7 +19,8 @@ export interface Section {
|
|
18
19
|
suffix: string;
|
19
20
|
} | undefined;
|
20
21
|
params: undefined | Binding;
|
21
|
-
|
22
|
+
referencedClosures: ReferencedBindings;
|
23
|
+
referencedHoists: ReferencedBindings;
|
22
24
|
bindings: ReferencedBindings;
|
23
25
|
hoisted: ReferencedBindings;
|
24
26
|
isHoistThrough: true | undefined;
|
@@ -42,6 +44,7 @@ declare module "@marko/compiler/dist/types" {
|
|
42
44
|
section?: Section;
|
43
45
|
}
|
44
46
|
}
|
47
|
+
export declare const sectionUtil: Sorted<Section>;
|
45
48
|
export declare function startSection(path: t.NodePath<t.MarkoTagBody | t.Program>): Section | undefined;
|
46
49
|
export declare function getOrCreateSection(path: t.NodePath<any>): Section;
|
47
50
|
export declare function getSectionForBody(body: t.NodePath<t.MarkoTagBody | t.Program>): Section | undefined;
|
@@ -56,5 +59,7 @@ export declare function getNodeContentType(path: t.NodePath<t.Statement>, extraM
|
|
56
59
|
export declare const isSerializedSection: (section: Section) => boolean;
|
57
60
|
export declare const isStatefulSection: (section: Section) => boolean;
|
58
61
|
export declare const checkStatefulClosures: (section: Section, immediateOnly: boolean) => boolean;
|
62
|
+
export declare function isImmediateOwner(section: Section, binding: Binding): boolean;
|
63
|
+
export declare function isDynamicClosure(section: Section, closure: Binding): boolean;
|
59
64
|
export declare function isSameOrChildSection(section: Section, other: Section): boolean;
|
60
65
|
export declare function getCommonSection(section: Section, other: Section): Section;
|
@@ -24,18 +24,17 @@ export type Signal = {
|
|
24
24
|
renderReferencedBindings: ReferencedBindings;
|
25
25
|
effect: t.Statement[];
|
26
26
|
effectReferencedBindings: ReferencedBindings;
|
27
|
-
closures: Map<Section, Signal>;
|
28
27
|
hasDownstreamIntersections: () => boolean;
|
29
28
|
hasDynamicSubscribers?: true;
|
30
29
|
export: boolean;
|
31
30
|
extraArgs?: t.Expression[];
|
31
|
+
prependStatements?: t.Statement[];
|
32
32
|
buildAssignment?: (valueSection: Section, value: t.Expression) => t.Expression;
|
33
33
|
};
|
34
|
-
type closureSignalBuilder = (
|
34
|
+
type closureSignalBuilder = (closure: Binding, render: t.Expression) => t.Expression;
|
35
35
|
export declare function setClosureSignalBuilder(tag: t.NodePath<t.MarkoTag>, builder: closureSignalBuilder): void;
|
36
36
|
export declare function setForceResumeScope(section: Section): void;
|
37
37
|
export declare function setSerializedProperty(section: Section, key: string, value: t.Expression): void;
|
38
|
-
export declare const getSectionSubscriberIdentifier: (section: Section) => t.Identifier | undefined, setSectionSubscriberIdentifiers: (section: Section, value: t.Identifier | undefined) => void;
|
39
38
|
export declare const getHTMLSectionStatements: (section: Section) => t.Statement[];
|
40
39
|
export declare function getHoistFunctionIdentifier(hoistedBinding: Binding): t.Identifier;
|
41
40
|
export declare function getSignal(section: Section, referencedBindings: ReferencedBindings, name?: string): Signal;
|