marko 6.1.24 → 6.2.1
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/helpers.d.ts +1 -0
- package/dist/debug/dom.js +61 -2
- package/dist/debug/dom.mjs +59 -3
- package/dist/debug/html.js +42 -14
- package/dist/debug/html.mjs +39 -15
- package/dist/dom/control-flow.d.ts +1 -0
- package/dist/dom/dom.d.ts +2 -0
- package/dist/dom.d.ts +2 -2
- package/dist/dom.js +35 -3
- package/dist/dom.mjs +35 -3
- package/dist/html/attrs.d.ts +1 -0
- package/dist/html/content.d.ts +1 -0
- package/dist/html/inlined-runtimes.d.ts +1 -1
- package/dist/html/inlined-runtimes.debug.d.ts +1 -1
- package/dist/html/writer.d.ts +8 -5
- package/dist/html.d.ts +3 -3
- package/dist/html.js +28 -9
- package/dist/html.mjs +28 -9
- package/dist/translator/core/index.d.ts +1 -0
- package/dist/translator/core/show.d.ts +17 -0
- package/dist/translator/core/style.d.ts +6 -0
- package/dist/translator/index.d.ts +1 -0
- package/dist/translator/index.js +600 -75
- package/dist/translator/util/known-tag.d.ts +1 -1
- package/dist/translator/util/references.d.ts +5 -0
- package/dist/translator/util/serialize-reasons.d.ts +2 -0
- package/dist/translator/util/setup-statements.d.ts +5 -0
- package/dist/translator/util/signals.d.ts +1 -0
- package/dist/translator/util/style-interpolation.d.ts +3 -0
- package/dist/translator/visitors/program/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -20,6 +20,6 @@ declare module "@marko/compiler/dist/types" {
|
|
|
20
20
|
}
|
|
21
21
|
export declare function knownTagAnalyze(tag: t.NodePath<t.MarkoTag>, contentSection: Section, propTree: BindingPropTree | undefined): void;
|
|
22
22
|
export declare function knownTagTranslateHTML(tag: t.NodePath<t.MarkoTag>, tagIdentifier: t.Expression, contentSection: Section, propTree: BindingPropTree | undefined): void;
|
|
23
|
-
export declare function knownTagTranslateDOM(tag: t.NodePath<t.MarkoTag>, propTree: BindingPropTree | undefined, getBindingIdentifier: (binding: Binding, preferredName?: string, directContent?: boolean) => t.Identifier, callSetup: (section: Section, childBinding: Binding) => void): void;
|
|
23
|
+
export declare function knownTagTranslateDOM(tag: t.NodePath<t.MarkoTag>, propTree: BindingPropTree | undefined, getBindingIdentifier: (binding: Binding, preferredName?: string, directContent?: boolean) => t.Identifier, callSetup: ((section: Section, childBinding: Binding) => void) | undefined): void;
|
|
24
24
|
export declare function finalizeKnownTags(section: Section): void;
|
|
25
25
|
export {};
|
|
@@ -49,6 +49,7 @@ export interface Binding {
|
|
|
49
49
|
nullable: boolean;
|
|
50
50
|
pruned: boolean | undefined;
|
|
51
51
|
exposed: boolean;
|
|
52
|
+
forcePersist: boolean;
|
|
52
53
|
}
|
|
53
54
|
export interface InputBinding extends Binding {
|
|
54
55
|
type: BindingType.input;
|
|
@@ -70,6 +71,7 @@ interface Read {
|
|
|
70
71
|
ownVar: boolean;
|
|
71
72
|
getter: Getter | undefined;
|
|
72
73
|
comparedTo: t.Node | undefined;
|
|
74
|
+
deferred: boolean;
|
|
73
75
|
}
|
|
74
76
|
interface ExtraRead {
|
|
75
77
|
binding: Binding;
|
|
@@ -88,6 +90,8 @@ declare module "@marko/compiler/dist/types" {
|
|
|
88
90
|
read?: ExtraRead;
|
|
89
91
|
pruned?: true;
|
|
90
92
|
isEffect?: true;
|
|
93
|
+
invokeOnly?: true;
|
|
94
|
+
lazyBindings?: ReferencedBindings;
|
|
91
95
|
spreadFrom?: Binding;
|
|
92
96
|
nativeTagSpread?: true;
|
|
93
97
|
nativeTagSpreadMerged?: true;
|
|
@@ -148,6 +152,7 @@ export declare function getDebugNamesAsIdentifier(refs: ReferencedBindings): str
|
|
|
148
152
|
export declare function getSectionInstancesAccessor(section: Section): string;
|
|
149
153
|
export declare function getSectionInstancesAccessorLiteral(section: Section): t.NumericLiteral | t.StringLiteral | undefined;
|
|
150
154
|
export declare function getReadReplacement(node: t.Identifier | t.MemberExpression | t.OptionalMemberExpression, signal?: Signal): t.Expression | undefined;
|
|
155
|
+
export declare function isInvokeOnlyBinding(binding: Binding): boolean;
|
|
151
156
|
export declare function hasNonConstantPropertyAlias(ref: Binding): boolean;
|
|
152
157
|
export declare function pruneBinding(binding: Binding): boolean;
|
|
153
158
|
export declare function createRead(binding: Binding, props: Opt<string>, ownVar?: boolean): ExtraRead;
|
|
@@ -14,6 +14,8 @@ export declare function isReasonDynamic(reason: undefined | SerializeReason): re
|
|
|
14
14
|
state: undefined;
|
|
15
15
|
param: OneMany<InputBinding | ParamBinding>;
|
|
16
16
|
};
|
|
17
|
+
export declare function isStaticSerializeReason(reason: undefined | SerializeReason): reason is SerializeReason;
|
|
18
|
+
export declare function isStateSerializeReason(reason: undefined | SerializeReason): reason is Sources;
|
|
17
19
|
export declare function getSerializeReason(section: Section, prop?: Binding | AccessorProp | symbol, prefix?: AccessorPrefix | symbol): SerializeReason | undefined;
|
|
18
20
|
export declare function getSerializeSourcesForExpr(expr: t.NodeExtra): Sources | undefined;
|
|
19
21
|
export declare function getSerializeSourcesForExprs(exprs: Opt<t.NodeExtra> | boolean): true | Sources | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { types as t } from "@marko/compiler";
|
|
2
|
+
import type { Section } from "./sections";
|
|
3
|
+
export declare function addSetupStatement(section: Section): void;
|
|
4
|
+
export declare function addSetupExpr(section: Section, node: t.Node | undefined): void;
|
|
5
|
+
export declare function sectionHasSetupStatements(section: Section): boolean;
|
|
@@ -33,6 +33,7 @@ type closureSignalBuilder = (closure: Binding, render: t.Expression) => t.Expres
|
|
|
33
33
|
export declare const getSignals: (section: Section) => Map<unknown, Signal>;
|
|
34
34
|
export declare function setClosureSignalBuilder(tag: t.NodePath<t.MarkoTag>, builder: closureSignalBuilder): void;
|
|
35
35
|
export declare const getTryHasPlaceholder: (section: Section) => true | undefined, setTryHasPlaceholder: (section: Section, value: true | undefined) => void;
|
|
36
|
+
export declare function setSectionOwnerResumedByMarker(section: Section): void;
|
|
36
37
|
export declare function setSectionSerializedValue(section: Section, prop: AccessorProp, expression: t.Expression): void;
|
|
37
38
|
export declare function setBindingSerializedValue(section: Section, binding: Binding, expression: t.Expression, prefix?: AccessorPrefix): void;
|
|
38
39
|
export declare function setSerializedValue(section: Section, key: string, expression: t.Expression): void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { types as t } from "@marko/compiler";
|
|
2
|
+
export declare const htmlStyleTagAlternateMsg = " For a native html [`<style>` tag](https://markojs.com/docs/reference/core-tag#style) use the `html-style` core tag instead.";
|
|
3
|
+
export declare function checkStyleInterpolations(tag: t.NodePath<t.MarkoTag>): void;
|