marko 6.1.15 → 6.1.17

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.
@@ -0,0 +1,13 @@
1
+ import type { types as t } from "@marko/compiler";
2
+ declare module "@marko/compiler" {
3
+ interface MarkoMeta {
4
+ /**
5
+ * Relative import paths of a template's known client side assets (eg css).
6
+ * Collected during analyze so the page entry builder can link them in for
7
+ * otherwise server only templates.
8
+ */
9
+ assetImports?: Set<string>;
10
+ }
11
+ }
12
+ export declare function addAssetImport(file: t.BabelFile, request: string): void;
13
+ export declare function isClientAssetImport(file: t.BabelFile, request: string): boolean;
@@ -6,6 +6,12 @@ export type BindingPropTree = {
6
6
  } | undefined;
7
7
  rest: BindingPropTree | undefined;
8
8
  };
9
+ export declare const kDirectContent: unique symbol;
10
+ declare module "@marko/compiler/dist/types" {
11
+ interface NodeExtra {
12
+ [kDirectContent]?: true;
13
+ }
14
+ }
9
15
  export declare function getBindingPropTree(binding: Binding): BindingPropTree | undefined;
10
16
  export declare function getKnownFromPropTree(propTree: BindingPropTree | true, name: string): BindingPropTree | true | undefined;
11
17
  export declare function getAllKnownPropNames(propTree: BindingPropTree): string[];
@@ -6,10 +6,12 @@ declare module "@marko/compiler/dist/types" {
6
6
  page?: boolean;
7
7
  }
8
8
  }
9
+ interface EntryState {
10
+ init: boolean;
11
+ assets: Set<string>;
12
+ }
9
13
  type EntryFile = t.BabelFile & {
10
- [kState]?: {
11
- init: boolean;
12
- };
14
+ [kState]?: EntryState;
13
15
  };
14
16
  declare const kState: unique symbol;
15
17
  declare const _default: {
@@ -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) => 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): void;
24
24
  export declare function finalizeKnownTags(section: Section): void;
25
25
  export {};
@@ -44,6 +44,7 @@ export interface Binding {
44
44
  scopeOffset: Binding | undefined;
45
45
  scopeAccessor: string | undefined;
46
46
  export: string | undefined;
47
+ directContentExport: string | undefined;
47
48
  declared: boolean;
48
49
  nullable: boolean;
49
50
  pruned: boolean | undefined;
@@ -11,6 +11,7 @@ declare module "@marko/compiler/dist/types" {
11
11
  setup: string;
12
12
  params: BindingPropTree | undefined;
13
13
  };
14
+ styleFile?: string;
14
15
  }
15
16
  }
16
17
  declare const _default: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.1.15",
3
+ "version": "6.1.17",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",
@@ -49,7 +49,7 @@
49
49
  "build": "node -r ~ts ./scripts/bundle.mts"
50
50
  },
51
51
  "dependencies": {
52
- "@marko/compiler": "^5.39.65",
52
+ "@marko/compiler": "^5.39.66",
53
53
  "csstype": "^3.2.3",
54
54
  "fastest-levenshtein": "^1.0.16",
55
55
  "magic-string": "^0.30.21"