cvdl-ts 1.0.3 → 1.0.4

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.
@@ -2,9 +2,9 @@ import { Box } from "./Box";
2
2
  import { DataSchema } from "./DataSchema";
3
3
  import { Elem } from "./Layout";
4
4
  import { LayoutSchema } from "./LayoutSchema";
5
+ import { LocalStorage } from "./LocalStorage";
5
6
  import { Resume } from "./Resume";
6
7
  import { ResumeLayout } from "./ResumeLayout";
7
- import { Storage } from "./Storage";
8
8
  import * as fontkit from 'fontkit';
9
9
  export declare class ElementBox {
10
10
  bounding_box: Box;
@@ -18,13 +18,13 @@ export type RenderProps = {
18
18
  layout_schemas: LayoutSchema[];
19
19
  data_schemas: DataSchema[];
20
20
  resume_layout: ResumeLayout;
21
- storage: Storage;
21
+ storage: LocalStorage;
22
22
  fontDict?: FontDict;
23
23
  };
24
24
  export declare class FontDict {
25
25
  fonts: Map<string, fontkit.Font>;
26
26
  constructor();
27
- load_fonts_from_schema(schema: LayoutSchema, storage: Storage): Promise<void>;
27
+ load_fonts_from_schema(schema: LayoutSchema, storage: LocalStorage): Promise<void>;
28
28
  get_font(name: string): fontkit.Font;
29
29
  }
30
30
  export declare function render({ resume, layout_schemas, data_schemas, resume_layout, storage, fontDict }: RenderProps): Promise<[FontDict, ElementBox[][]]>;
@@ -1,9 +1,9 @@
1
1
  import { ElementBox, FontDict } from "./AnyLayout";
2
- import { Storage } from "./Storage";
3
2
  import { Resume } from "./Resume";
4
3
  import { DataSchema } from "./DataSchema";
5
4
  import { LayoutSchema } from "./LayoutSchema";
6
5
  import { ResumeLayout } from "./ResumeLayout";
6
+ import { LocalStorage } from "./LocalStorage";
7
7
  export type RenderResult = {
8
8
  blob: Blob;
9
9
  fontDict: FontDict;
@@ -15,7 +15,7 @@ export type RenderProps = {
15
15
  data_schemas?: DataSchema[];
16
16
  layout_schemas?: LayoutSchema[];
17
17
  resume_layout?: ResumeLayout;
18
- storage: Storage;
18
+ storage: LocalStorage;
19
19
  fontDict?: FontDict;
20
20
  debug: boolean;
21
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cvdl-ts",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Typescript Implementation of CVDL Compiler",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",