marko 6.0.0-next.3.71 → 6.0.0-next.3.73
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 +5 -5
- package/dist/debug/dom.js +93 -85
- package/dist/debug/dom.mjs +93 -85
- package/dist/debug/html.js +4 -3
- package/dist/debug/html.mjs +4 -3
- package/dist/dom/control-flow.d.ts +1 -1
- package/dist/dom/queue.d.ts +1 -1
- package/dist/dom/resume.d.ts +1 -1
- package/dist/dom/schedule.d.ts +0 -1
- package/dist/dom.js +105 -98
- package/dist/dom.mjs +105 -98
- package/dist/html.js +4 -3
- package/dist/html.mjs +4 -3
- package/dist/translator/index.js +2135 -2152
- package/dist/translator/util/signals.d.ts +0 -1
- package/dist/translator/visitors/program/index.d.ts +1 -2
- package/index.d.ts +22 -14
- package/package.json +2 -2
@@ -39,7 +39,6 @@ export declare const getHTMLSectionStatements: (section: Section) => t.Statement
|
|
39
39
|
export declare function getHoistFunctionIdentifier(hoistedBinding: Binding): t.Identifier;
|
40
40
|
export declare function getSignal(section: Section, referencedBindings: ReferencedBindings, name?: string): Signal;
|
41
41
|
export declare function initValue(binding: Binding, runtimeHelper?: "value" | "state"): Signal;
|
42
|
-
export declare function getSignalFn(signal: Signal, params: Array<t.Identifier | t.Pattern>, referencedBindings?: ReferencedBindings): t.ArrowFunctionExpression;
|
43
42
|
export declare function getDestructureSignal(bindingIdentifiersByName: Record<string, t.Identifier> | t.Identifier[], destructurePattern: t.LVal): {
|
44
43
|
readonly identifier: t.Identifier;
|
45
44
|
build(canCallOnlyWhenDirty?: boolean): t.ArrowFunctionExpression;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
2
2
|
import { type Binding } from "../../util/references";
|
3
|
-
export declare let currentProgramPath: t.NodePath<t.Program>;
|
4
3
|
export declare let cleanIdentifier: t.Identifier;
|
5
4
|
export declare let scopeIdentifier: t.Identifier;
|
6
5
|
export declare function isScopeIdentifier(node: t.Node): node is t.Identifier;
|
@@ -26,7 +25,7 @@ declare module "@marko/compiler/dist/types" {
|
|
26
25
|
declare const _default: {
|
27
26
|
migrate: {
|
28
27
|
enter(this: unknown, program: t.NodePath<t.Program>): void;
|
29
|
-
exit(this: unknown): void;
|
28
|
+
exit(this: unknown, program: t.NodePath<t.Program>): void;
|
30
29
|
};
|
31
30
|
analyze: {
|
32
31
|
enter(this: unknown, program: t.NodePath<t.Program>): void;
|
package/index.d.ts
CHANGED
@@ -33,6 +33,24 @@ declare global {
|
|
33
33
|
$global?: Global;
|
34
34
|
};
|
35
35
|
|
36
|
+
/** The result of calling `template.render`. */
|
37
|
+
export type RenderedTemplate = Promise<string> &
|
38
|
+
AsyncIterable<string> & {
|
39
|
+
toReadable(): ReadableStream<Uint8Array<ArrayBufferLike>>;
|
40
|
+
pipe(stream: {
|
41
|
+
write(chunk: string): unknown;
|
42
|
+
end(): unknown;
|
43
|
+
flush?(): void;
|
44
|
+
}): void;
|
45
|
+
toString(): string;
|
46
|
+
};
|
47
|
+
|
48
|
+
/** The result of calling `template.mount`. */
|
49
|
+
export type MountedTemplate<Input = unknown> = {
|
50
|
+
update(input: Marko.TemplateInput<Input>): void;
|
51
|
+
destroy(): void;
|
52
|
+
};
|
53
|
+
|
36
54
|
/** Body content created by a template. */
|
37
55
|
export interface Body<
|
38
56
|
in Params extends readonly any[] = [],
|
@@ -68,26 +86,16 @@ declare global {
|
|
68
86
|
|
69
87
|
/** @marko-overload-start */
|
70
88
|
/** Render the template to a string. */
|
71
|
-
abstract render(
|
72
|
-
|
73
|
-
|
74
|
-
pipe(stream: {
|
75
|
-
write(chunk: string): unknown;
|
76
|
-
end(): unknown;
|
77
|
-
flush?(): void;
|
78
|
-
}): void;
|
79
|
-
toString(): string;
|
80
|
-
};
|
89
|
+
abstract render(
|
90
|
+
input: Marko.TemplateInput<Input>,
|
91
|
+
): Marko.RenderedTemplate;
|
81
92
|
|
82
93
|
/** Render and attach the template to a DOM node. */
|
83
94
|
abstract mount(
|
84
95
|
input: Marko.TemplateInput<Input>,
|
85
96
|
reference: Node,
|
86
97
|
position?: "afterbegin" | "afterend" | "beforebegin" | "beforeend",
|
87
|
-
):
|
88
|
-
update(input: Marko.TemplateInput<Input>): void;
|
89
|
-
destroy(): void;
|
90
|
-
};
|
98
|
+
): Marko.MountedTemplate<typeof input>;
|
91
99
|
/** @marko-overload-end */
|
92
100
|
}
|
93
101
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "marko",
|
3
|
-
"version": "6.0.0-next.3.
|
3
|
+
"version": "6.0.0-next.3.73",
|
4
4
|
"description": "Optimized runtime for Marko templates.",
|
5
5
|
"keywords": [
|
6
6
|
"api",
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"build": "node -r ~ts ./scripts/bundle.ts"
|
49
49
|
},
|
50
50
|
"dependencies": {
|
51
|
-
"@marko/compiler": "^5.39.
|
51
|
+
"@marko/compiler": "^5.39.15",
|
52
52
|
"csstype": "^3.1.3",
|
53
53
|
"magic-string": "^0.30.17"
|
54
54
|
},
|