marko 6.0.91 → 6.0.93
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/errors.d.ts +3 -0
- package/dist/common/types.d.ts +1 -3
- package/dist/debug/dom.js +54 -19
- package/dist/debug/dom.mjs +54 -19
- package/dist/debug/html.js +33 -13
- package/dist/debug/html.mjs +30 -13
- package/dist/dom/scope.d.ts +1 -1
- package/dist/dom/signals.d.ts +1 -0
- package/dist/dom.d.ts +2 -1
- package/dist/dom.js +93 -82
- package/dist/dom.mjs +93 -82
- package/dist/html/writer.d.ts +4 -3
- package/dist/html.d.ts +1 -0
- package/dist/html.js +17 -6
- package/dist/html.mjs +14 -6
- package/dist/translator/core/html-comment.d.ts +0 -2
- package/dist/translator/core/html-script.d.ts +0 -2
- package/dist/translator/core/html-style.d.ts +0 -2
- package/dist/translator/index.js +271 -367
- package/dist/translator/util/get-defined-binding-expression.d.ts +1 -1
- package/dist/translator/util/references.d.ts +2 -1
- package/dist/translator/util/sections.d.ts +1 -0
- package/dist/translator/util/signals.d.ts +2 -1
- package/dist/translator/util/translate-var.d.ts +2 -0
- package/dist/translator/visitors/program/html.d.ts +1 -0
- package/dist/translator/visitors/tag/native-tag.d.ts +0 -2
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import { type Binding } from "./references";
|
|
3
|
-
export declare function getDeclaredBindingExpression(binding: Binding): t.Identifier | t.
|
|
3
|
+
export declare function getDeclaredBindingExpression(binding: Binding): t.Identifier | t.MemberExpression | t.OptionalMemberExpression;
|
|
@@ -79,6 +79,7 @@ declare module "@marko/compiler/dist/types" {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
export declare function createBinding(name: string, type: Binding["type"], section: Section, upstreamAlias?: Binding["upstreamAlias"], property?: string, excludeProperties?: Opt<string>, loc?: t.SourceLocation | null, declared?: boolean): Binding;
|
|
82
|
+
export declare function trackDomVarReferences(tag: t.NodePath<t.MarkoTag>, binding: Binding): Binding | undefined;
|
|
82
83
|
export declare function trackVarReferences(tag: t.NodePath<t.MarkoTag>, type: BindingType, upstreamAlias?: Binding["upstreamAlias"]): Binding | undefined;
|
|
83
84
|
export declare function trackParamsReferences(body: t.NodePath<t.MarkoTagBody | t.Program>, type: BindingType, upstreamAlias?: Binding["upstreamAlias"]): Binding | undefined;
|
|
84
85
|
export declare function trackHoistedReference(referencePath: t.NodePath<t.Identifier>, binding: Binding): void;
|
|
@@ -108,7 +109,7 @@ export declare function getDebugName(binding: Binding): string;
|
|
|
108
109
|
export declare function getDebugNames(refs: ReferencedBindings): string;
|
|
109
110
|
export declare function getSectionInstancesAccessor(section: Section): string;
|
|
110
111
|
export declare function getSectionInstancesAccessorLiteral(section: Section): t.StringLiteral | t.NumericLiteral | undefined;
|
|
111
|
-
export declare function getReadReplacement(node: t.Identifier | t.MemberExpression): t.Node | undefined;
|
|
112
|
+
export declare function getReadReplacement(node: t.Identifier | t.MemberExpression | t.OptionalMemberExpression): t.Node | undefined;
|
|
112
113
|
export interface ReferencedExtra extends t.NodeExtra {
|
|
113
114
|
section: Section;
|
|
114
115
|
fnExtra?: FnExtra;
|
|
@@ -33,6 +33,7 @@ export interface Section {
|
|
|
33
33
|
referencedClosures: ReferencedBindings;
|
|
34
34
|
referencedHoists: ReferencedBindings;
|
|
35
35
|
bindings: ReferencedBindings;
|
|
36
|
+
domGetterBindings: Map<Binding, string>;
|
|
36
37
|
hoisted: ReferencedBindings;
|
|
37
38
|
serializeReason: undefined | SerializeReason;
|
|
38
39
|
serializeReasons: Map<symbol, SerializeReason>;
|
|
@@ -30,8 +30,9 @@ export declare function setClosureSignalBuilder(tag: t.NodePath<t.MarkoTag>, bui
|
|
|
30
30
|
export declare function setSectionSerializedValue(section: Section, prop: AccessorProp, expression: t.Expression): void;
|
|
31
31
|
export declare function setBindingSerializedValue(section: Section, binding: Binding, expression: t.Expression, prefix?: AccessorPrefix): void;
|
|
32
32
|
export declare function setSerializedValue(section: Section, key: string, expression: t.Expression): void;
|
|
33
|
+
export declare function addWriteScopeBuilder(section: Section, builder: (writeCall: t.Expression) => t.Expression): void;
|
|
33
34
|
export declare const getHTMLSectionStatements: (section: Section) => t.Statement[];
|
|
34
|
-
export declare function
|
|
35
|
+
export declare function getBindingGetterIdentifier(binding: Binding): t.Identifier;
|
|
35
36
|
export declare function getSignal(section: Section, referencedBindings: ReferencedBindings, name?: string): Signal;
|
|
36
37
|
export declare function initValue(binding: Binding, isLet?: boolean): Signal;
|
|
37
38
|
export declare function signalHasStatements(signal: Signal): boolean;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
|
+
import type { Binding } from "./references";
|
|
2
3
|
export default function translateVar(tag: t.NodePath<t.MarkoTag>, initialValue: t.Expression, kind?: "let" | "const"): void;
|
|
4
|
+
export declare function translateDomVar(tag: t.NodePath<t.MarkoTag>, binding: Binding | undefined): void;
|
|
@@ -2,13 +2,11 @@ import { types as t } from "@marko/compiler";
|
|
|
2
2
|
import { type Binding } from "../../util/references";
|
|
3
3
|
export declare const kNativeTagBinding: unique symbol;
|
|
4
4
|
export declare const kSkipEndTag: unique symbol;
|
|
5
|
-
declare const kGetterId: unique symbol;
|
|
6
5
|
declare const kTagContentAttr: unique symbol;
|
|
7
6
|
declare module "@marko/compiler/dist/types" {
|
|
8
7
|
interface NodeExtra {
|
|
9
8
|
[kNativeTagBinding]?: Binding;
|
|
10
9
|
[kSkipEndTag]?: true;
|
|
11
|
-
[kGetterId]?: string;
|
|
12
10
|
[kTagContentAttr]?: true;
|
|
13
11
|
}
|
|
14
12
|
}
|