@quillmark/wasm 0.46.0 → 0.48.0

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.
Binary file
@@ -31,9 +31,9 @@ export const lut_interp_linear16: (a: number, b: number, c: number) => number;
31
31
  export const qcms_enable_iccv4: () => void;
32
32
  export const qcms_profile_is_bogus: (a: number) => number;
33
33
  export const qcms_transform_release: (a: number) => void;
34
- export const __wbindgen_export_0: (a: number, b: number) => number;
35
- export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
36
- export const __wbindgen_export_2: (a: number) => void;
37
- export const __wbindgen_export_3: (a: number, b: number, c: number) => void;
34
+ export const __wbindgen_export: (a: number, b: number) => number;
35
+ export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
36
+ export const __wbindgen_export3: (a: number) => void;
37
+ export const __wbindgen_export4: (a: number, b: number, c: number) => void;
38
38
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
39
39
  export const __wbindgen_start: () => void;
@@ -1,16 +1,23 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Initialize the WASM module with panic hooks for better error messages
5
- */
6
- export function init(): void;
7
3
  export interface Artifact {
8
4
  format: OutputFormat;
9
5
  bytes: Uint8Array;
10
6
  mimeType: string;
11
7
  }
12
8
 
13
- export type OutputFormat = "pdf" | "svg" | "txt" | "png";
9
+ export interface CompileOptions {
10
+ quillRef?: string;
11
+ }
12
+
13
+ export interface Diagnostic {
14
+ severity: Severity;
15
+ code?: string;
16
+ message: string;
17
+ location?: Location;
18
+ hint?: string;
19
+ sourceChain: string[];
20
+ }
14
21
 
15
22
  export interface Location {
16
23
  file: string;
@@ -18,7 +25,21 @@ export interface Location {
18
25
  column: number;
19
26
  }
20
27
 
21
- export type Severity = "error" | "warning" | "note";
28
+ export interface ParsedDocument {
29
+ fields: Record<string, any>;
30
+ quillRef: string;
31
+ }
32
+
33
+ export interface QuillInfo {
34
+ name: string;
35
+ backend: string;
36
+ metadata: Record<string, any>;
37
+ example?: string;
38
+ schema: Record<string, any>;
39
+ defaults: Record<string, any>;
40
+ examples: Record<string, any[]>;
41
+ supportedFormats: OutputFormat[];
42
+ }
22
43
 
23
44
  export interface RenderOptions {
24
45
  format?: OutputFormat;
@@ -32,15 +53,6 @@ export interface RenderPagesOptions {
32
53
  ppi?: number;
33
54
  }
34
55
 
35
- export interface CompileOptions {
36
- quillRef?: string;
37
- }
38
-
39
- export interface ParsedDocument {
40
- fields: Record<string, any>;
41
- quillRef: string;
42
- }
43
-
44
56
  export interface RenderResult {
45
57
  artifacts: Artifact[];
46
58
  warnings: Diagnostic[];
@@ -48,131 +60,122 @@ export interface RenderResult {
48
60
  renderTimeMs: number;
49
61
  }
50
62
 
51
- export interface Diagnostic {
52
- severity: Severity;
53
- code?: string;
54
- message: string;
55
- location?: Location;
56
- hint?: string;
57
- sourceChain: string[];
58
- }
63
+ export type OutputFormat = "pdf" | "svg" | "txt" | "png";
64
+
65
+ export type Severity = "error" | "warning" | "note";
59
66
 
60
- export interface QuillInfo {
61
- name: string;
62
- backend: string;
63
- metadata: Record<string, any>;
64
- example?: string;
65
- schema: Record<string, any>;
66
- defaults: Record<string, any>;
67
- examples: Record<string, any[]>;
68
- supportedFormats: OutputFormat[];
69
- }
70
67
 
71
68
  export class CompiledDocument {
72
- private constructor();
73
- free(): void;
74
- [Symbol.dispose](): void;
75
- /**
76
- * Render selected pages. `pages = null/undefined` renders all pages.
77
- */
78
- renderPages(pages: Uint32Array | null | undefined, opts: RenderPagesOptions): RenderResult;
79
- /**
80
- * Number of pages in this compiled document.
81
- */
82
- readonly pageCount: number;
69
+ private constructor();
70
+ free(): void;
71
+ [Symbol.dispose](): void;
72
+ /**
73
+ * Render selected pages. `pages = null/undefined` renders all pages.
74
+ */
75
+ renderPages(pages: Uint32Array | null | undefined, opts: RenderPagesOptions): RenderResult;
76
+ /**
77
+ * Number of pages in this compiled document.
78
+ */
79
+ readonly pageCount: number;
83
80
  }
81
+
84
82
  /**
85
83
  * Quillmark WASM Engine
86
84
  *
87
85
  * Create once, register Quills, render markdown. That's it.
88
86
  */
89
87
  export class Quillmark {
90
- free(): void;
91
- [Symbol.dispose](): void;
92
- /**
93
- * List registered Quills with their exact versions
94
- *
95
- * Returns strings in the format "name@version" (e.g. "resume-template@2.1.0")
96
- */
97
- listQuills(): string[];
98
- /**
99
- * Compile markdown to JSON data without rendering artifacts.
100
- *
101
- * This exposes the intermediate data structure that would be passed to the backend.
102
- * Useful for debugging and validation.
103
- */
104
- compileData(markdown: string): any;
105
- /**
106
- * Resolve a Quill reference to a registered Quill, or null if not available
107
- *
108
- * Accepts a quill reference string like "resume-template", "resume-template@2",
109
- * or "resume-template@2.1.0". Returns QuillInfo if the engine can resolve it
110
- * locally, or null if an external fetch is needed.
111
- */
112
- resolveQuill(quill_ref: string): any;
113
- /**
114
- * Get shallow information about a registered Quill
115
- *
116
- * This returns metadata, backend info, field schemas, and supported formats
117
- * that consumers need to configure render options for the next step.
118
- */
119
- getQuillInfo(name: string): QuillInfo;
120
- /**
121
- * Parse markdown into a ParsedDocument
122
- *
123
- * This is the first step in the workflow. The returned ParsedDocument contains
124
- * the parsed YAML frontmatter fields and the quill_ref (from QUILL field or "__default__").
125
- */
126
- static parseMarkdown(markdown: string): ParsedDocument;
127
- /**
128
- * Register a Quill template bundle
129
- *
130
- * Accepts either a JSON string or a JsValue object representing the Quill file tree.
131
- * Validation happens automatically on registration.
132
- */
133
- registerQuill(quill_json: any): QuillInfo;
134
- /**
135
- * Unregister a Quill by name or specific version
136
- *
137
- * If a base name is provided (e.g., "my-quill"), all versions of that quill are freed.
138
- * If a versioned name is provided (e.g., "my-quill@2.1.0"), only that specific version is freed.
139
- * Returns true if something was unregistered, false if not found.
140
- */
141
- unregisterQuill(name_or_ref: string): boolean;
142
- /**
143
- * Get the AI-projected JSON schema of a Quill (strips UI metadata and CARDS)
144
- *
145
- * This returns the schema in a format suitable for feeding to LLMs or
146
- * other consumers that don't need the UI configuration "x-ui" fields
147
- * or the internal CARDS array structure.
148
- */
149
- getStrippedSchema(name: string): any;
150
- /**
151
- * JavaScript constructor: `new Quillmark()`
152
- */
153
- constructor();
154
- /**
155
- * Render a ParsedDocument to final artifacts (PDF, SVG, TXT)
156
- *
157
- * Note that the quill reference is optional to specify and can be inferred from the markdown content's frontmatter.
158
- * Uses the Quill specified in options.quill_ref if provided,
159
- * otherwise infers it from the ParsedDocument's quill_ref field.
160
- */
161
- render(parsed: ParsedDocument, opts: RenderOptions): RenderResult;
162
- /**
163
- * Compile a parsed document into an opaque compiled document handle.
164
- */
165
- compile(parsed: ParsedDocument, opts?: CompileOptions | null): CompiledDocument;
166
- /**
167
- * Perform a dry run validation without backend compilation.
168
- *
169
- * Executes parsing, schema validation, and template composition to
170
- * surface input errors quickly. Returns successfully on valid input,
171
- * or throws an error with diagnostic payload on failure.
172
- *
173
- * The quill name is inferred from the markdown's QUILL tag (or defaults to "__default__").
174
- *
175
- * This is useful for fast feedback loops in LLM-driven document generation.
176
- */
177
- dryRun(markdown: string): void;
88
+ free(): void;
89
+ [Symbol.dispose](): void;
90
+ /**
91
+ * Compile a parsed document into an opaque compiled document handle.
92
+ */
93
+ compile(parsed: ParsedDocument, opts?: CompileOptions | null): CompiledDocument;
94
+ /**
95
+ * Compile markdown to JSON data without rendering artifacts.
96
+ *
97
+ * This exposes the intermediate data structure that would be passed to the backend.
98
+ * Useful for debugging and validation.
99
+ */
100
+ compileData(markdown: string): any;
101
+ /**
102
+ * Perform a dry run validation without backend compilation.
103
+ *
104
+ * Executes parsing, schema validation, and template composition to
105
+ * surface input errors quickly. Returns successfully on valid input,
106
+ * or throws an error with diagnostic payload on failure.
107
+ *
108
+ * The quill name is inferred from the markdown's QUILL tag (or defaults to "__default__").
109
+ *
110
+ * This is useful for fast feedback loops in LLM-driven document generation.
111
+ */
112
+ dryRun(markdown: string): void;
113
+ /**
114
+ * Get shallow information about a registered Quill
115
+ *
116
+ * This returns metadata, backend info, field schemas, and supported formats
117
+ * that consumers need to configure render options for the next step.
118
+ */
119
+ getQuillInfo(name: string): QuillInfo;
120
+ /**
121
+ * Get the AI-projected JSON schema of a Quill (strips UI metadata and CARDS)
122
+ *
123
+ * This returns the schema in a format suitable for feeding to LLMs or
124
+ * other consumers that don't need the UI configuration "x-ui" fields
125
+ * or the internal CARDS array structure.
126
+ */
127
+ getStrippedSchema(name: string): any;
128
+ /**
129
+ * List registered Quills with their exact versions
130
+ *
131
+ * Returns strings in the format "name@version" (e.g. "resume-template@2.1.0")
132
+ */
133
+ listQuills(): string[];
134
+ /**
135
+ * JavaScript constructor: `new Quillmark()`
136
+ */
137
+ constructor();
138
+ /**
139
+ * Parse markdown into a ParsedDocument
140
+ *
141
+ * This is the first step in the workflow. The returned ParsedDocument contains
142
+ * the parsed YAML frontmatter fields and the quill_ref (from QUILL field or "__default__").
143
+ */
144
+ static parseMarkdown(markdown: string): ParsedDocument;
145
+ /**
146
+ * Register a Quill template bundle
147
+ *
148
+ * Accepts either a JSON string or a JsValue object representing the Quill file tree.
149
+ * Validation happens automatically on registration.
150
+ */
151
+ registerQuill(quill_json: any): QuillInfo;
152
+ /**
153
+ * Render a ParsedDocument to final artifacts (PDF, SVG, TXT)
154
+ *
155
+ * Note that the quill reference is optional to specify and can be inferred from the markdown content's frontmatter.
156
+ * Uses the Quill specified in options.quill_ref if provided,
157
+ * otherwise infers it from the ParsedDocument's quill_ref field.
158
+ */
159
+ render(parsed: ParsedDocument, opts: RenderOptions): RenderResult;
160
+ /**
161
+ * Resolve a Quill reference to a registered Quill, or null if not available
162
+ *
163
+ * Accepts a quill reference string like "resume-template", "resume-template@2",
164
+ * or "resume-template@2.1.0". Returns QuillInfo if the engine can resolve it
165
+ * locally, or null if an external fetch is needed.
166
+ */
167
+ resolveQuill(quill_ref: string): any;
168
+ /**
169
+ * Unregister a Quill by name or specific version
170
+ *
171
+ * If a base name is provided (e.g., "my-quill"), all versions of that quill are freed.
172
+ * If a versioned name is provided (e.g., "my-quill@2.1.0"), only that specific version is freed.
173
+ * Returns true if something was unregistered, false if not found.
174
+ */
175
+ unregisterQuill(name_or_ref: string): boolean;
178
176
  }
177
+
178
+ /**
179
+ * Initialize the WASM module with panic hooks for better error messages
180
+ */
181
+ export function init(): void;