@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.
- package/README.md +1 -2
- package/bundler/wasm.d.ts +135 -132
- package/bundler/wasm.js +5 -1
- package/bundler/wasm_bg.js +537 -607
- package/bundler/wasm_bg.wasm +0 -0
- package/bundler/wasm_bg.wasm.d.ts +4 -4
- package/node-esm/wasm.d.ts +135 -132
- package/node-esm/wasm.js +844 -10
- package/node-esm/wasm_bg.wasm +0 -0
- package/node-esm/wasm_bg.wasm.d.ts +4 -4
- package/package.json +1 -1
- package/node-esm/wasm_bg.js +0 -909
package/bundler/wasm_bg.wasm
CHANGED
|
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
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
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;
|
package/node-esm/wasm.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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;
|