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.
@@ -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;
@@ -9,6 +9,7 @@ declare module "@marko/compiler/dist/types" {
9
9
  template: string;
10
10
  walks: string;
11
11
  setup: string;
12
+ setupEmpty?: true;
12
13
  params: BindingPropTree | undefined;
13
14
  };
14
15
  styleFile?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.1.24",
3
+ "version": "6.2.1",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",