@quillmark/wasm 0.26.0 → 0.29.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/bundler/wasm.d.ts +55 -60
- package/bundler/wasm_bg.js +80 -110
- package/bundler/wasm_bg.wasm +0 -0
- package/bundler/wasm_bg.wasm.d.ts +13 -14
- package/node-esm/wasm.d.ts +55 -60
- package/node-esm/wasm_bg.js +80 -110
- package/node-esm/wasm_bg.wasm +0 -0
- package/node-esm/wasm_bg.wasm.d.ts +13 -14
- package/package.json +1 -1
package/bundler/wasm.d.ts
CHANGED
|
@@ -4,16 +4,36 @@
|
|
|
4
4
|
* Initialize the WASM module with panic hooks for better error messages
|
|
5
5
|
*/
|
|
6
6
|
export function init(): void;
|
|
7
|
+
export type OutputFormat = "pdf" | "svg" | "txt";
|
|
8
|
+
|
|
9
|
+
export type Severity = "error" | "warning" | "note";
|
|
10
|
+
|
|
7
11
|
export interface Location {
|
|
8
12
|
file: string;
|
|
9
13
|
line: number;
|
|
10
14
|
column: number;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
|
-
export interface
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
export interface Diagnostic {
|
|
18
|
+
severity: Severity;
|
|
19
|
+
code?: string;
|
|
20
|
+
message: string;
|
|
21
|
+
location?: Location;
|
|
22
|
+
hint?: string;
|
|
23
|
+
sourceChain: string[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Artifact {
|
|
27
|
+
format: OutputFormat;
|
|
28
|
+
bytes: Uint8Array;
|
|
29
|
+
mimeType: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface RenderResult {
|
|
33
|
+
artifacts: Artifact[];
|
|
34
|
+
warnings: Diagnostic[];
|
|
35
|
+
outputFormat: OutputFormat;
|
|
36
|
+
renderTimeMs: number;
|
|
17
37
|
}
|
|
18
38
|
|
|
19
39
|
export interface QuillInfo {
|
|
@@ -27,35 +47,15 @@ export interface QuillInfo {
|
|
|
27
47
|
supportedFormats: OutputFormat[];
|
|
28
48
|
}
|
|
29
49
|
|
|
30
|
-
export type Severity = "error" | "warning" | "note";
|
|
31
|
-
|
|
32
|
-
export interface Artifact {
|
|
33
|
-
format: OutputFormat;
|
|
34
|
-
bytes: Uint8Array;
|
|
35
|
-
mimeType: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
50
|
export interface ParsedDocument {
|
|
39
51
|
fields: Record<string, any>;
|
|
40
52
|
quillTag: string;
|
|
41
53
|
}
|
|
42
54
|
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
warnings: Diagnostic[];
|
|
48
|
-
outputFormat: OutputFormat;
|
|
49
|
-
renderTimeMs: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface Diagnostic {
|
|
53
|
-
severity: Severity;
|
|
54
|
-
code?: string;
|
|
55
|
-
message: string;
|
|
56
|
-
location?: Location;
|
|
57
|
-
hint?: string;
|
|
58
|
-
sourceChain: string[];
|
|
55
|
+
export interface RenderOptions {
|
|
56
|
+
format?: OutputFormat;
|
|
57
|
+
assets?: Record<string, Uint8Array | number[]>;
|
|
58
|
+
quillName?: string;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -67,22 +67,9 @@ export class Quillmark {
|
|
|
67
67
|
free(): void;
|
|
68
68
|
[Symbol.dispose](): void;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
71
|
-
*/
|
|
72
|
-
listQuills(): string[];
|
|
73
|
-
/**
|
|
74
|
-
* Process markdown through template engine (debugging)
|
|
75
|
-
*
|
|
76
|
-
* Returns template source code (Typst, LaTeX, etc.)
|
|
77
|
-
*/
|
|
78
|
-
processPlate(quill_name: string, markdown: string): string;
|
|
79
|
-
/**
|
|
80
|
-
* Get shallow information about a registered Quill
|
|
81
|
-
*
|
|
82
|
-
* This returns metadata, backend info, field schemas, and supported formats
|
|
83
|
-
* that consumers need to configure render options for the next step.
|
|
70
|
+
* JavaScript constructor: `new Quillmark()`
|
|
84
71
|
*/
|
|
85
|
-
|
|
72
|
+
constructor();
|
|
86
73
|
/**
|
|
87
74
|
* Parse markdown into a ParsedDocument
|
|
88
75
|
*
|
|
@@ -98,19 +85,31 @@ export class Quillmark {
|
|
|
98
85
|
*/
|
|
99
86
|
registerQuill(quill_json: any): QuillInfo;
|
|
100
87
|
/**
|
|
101
|
-
*
|
|
88
|
+
* Get shallow information about a registered Quill
|
|
89
|
+
*
|
|
90
|
+
* This returns metadata, backend info, field schemas, and supported formats
|
|
91
|
+
* that consumers need to configure render options for the next step.
|
|
102
92
|
*/
|
|
103
|
-
|
|
93
|
+
getQuillInfo(name: string): QuillInfo;
|
|
104
94
|
/**
|
|
105
|
-
*
|
|
95
|
+
* Perform a dry run validation without backend compilation.
|
|
96
|
+
*
|
|
97
|
+
* Executes parsing, schema validation, and template composition to
|
|
98
|
+
* surface input errors quickly. Returns successfully on valid input,
|
|
99
|
+
* or throws an error with diagnostic payload on failure.
|
|
106
100
|
*
|
|
107
|
-
*
|
|
101
|
+
* The quill name is inferred from the markdown's QUILL tag (or defaults to "__default__").
|
|
102
|
+
*
|
|
103
|
+
* This is useful for fast feedback loops in LLM-driven document generation.
|
|
108
104
|
*/
|
|
109
|
-
|
|
105
|
+
dryRun(markdown: string): void;
|
|
110
106
|
/**
|
|
111
|
-
*
|
|
107
|
+
* Compile markdown to JSON data without rendering artifacts.
|
|
108
|
+
*
|
|
109
|
+
* This exposes the intermediate data structure that would be passed to the backend.
|
|
110
|
+
* Useful for debugging and validation.
|
|
112
111
|
*/
|
|
113
|
-
|
|
112
|
+
compileData(markdown: string): any;
|
|
114
113
|
/**
|
|
115
114
|
* Render a ParsedDocument to final artifacts (PDF, SVG, TXT)
|
|
116
115
|
*
|
|
@@ -119,15 +118,11 @@ export class Quillmark {
|
|
|
119
118
|
*/
|
|
120
119
|
render(parsed: ParsedDocument, opts: RenderOptions): RenderResult;
|
|
121
120
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* Executes parsing, schema validation, and template composition to
|
|
125
|
-
* surface input errors quickly. Returns successfully on valid input,
|
|
126
|
-
* or throws an error with diagnostic payload on failure.
|
|
127
|
-
*
|
|
128
|
-
* The quill name is inferred from the markdown's QUILL tag (or defaults to "__default__").
|
|
129
|
-
*
|
|
130
|
-
* This is useful for fast feedback loops in LLM-driven document generation.
|
|
121
|
+
* List registered Quill names
|
|
131
122
|
*/
|
|
132
|
-
|
|
123
|
+
listQuills(): string[];
|
|
124
|
+
/**
|
|
125
|
+
* Unregister a Quill (free memory)
|
|
126
|
+
*/
|
|
127
|
+
unregisterQuill(name: string): void;
|
|
133
128
|
}
|
package/bundler/wasm_bg.js
CHANGED
|
@@ -207,12 +207,6 @@ function debugString(val) {
|
|
|
207
207
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
208
208
|
return className;
|
|
209
209
|
}
|
|
210
|
-
/**
|
|
211
|
-
* Initialize the WASM module with panic hooks for better error messages
|
|
212
|
-
*/
|
|
213
|
-
export function init() {
|
|
214
|
-
wasm.init();
|
|
215
|
-
}
|
|
216
210
|
|
|
217
211
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
218
212
|
ptr = ptr >>> 0;
|
|
@@ -223,6 +217,12 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
223
217
|
}
|
|
224
218
|
return result;
|
|
225
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Initialize the WASM module with panic hooks for better error messages
|
|
222
|
+
*/
|
|
223
|
+
export function init() {
|
|
224
|
+
wasm.init();
|
|
225
|
+
}
|
|
226
226
|
|
|
227
227
|
const QuillmarkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
228
228
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -246,72 +246,51 @@ export class Quillmark {
|
|
|
246
246
|
wasm.__wbg_quillmark_free(ptr, 0);
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
|
-
*
|
|
250
|
-
* @returns {string[]}
|
|
249
|
+
* JavaScript constructor: `new Quillmark()`
|
|
251
250
|
*/
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
258
|
-
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
259
|
-
wasm.__wbindgen_export_3(r0, r1 * 4, 4);
|
|
260
|
-
return v1;
|
|
261
|
-
} finally {
|
|
262
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
263
|
-
}
|
|
251
|
+
constructor() {
|
|
252
|
+
const ret = wasm.quillmark_new();
|
|
253
|
+
this.__wbg_ptr = ret >>> 0;
|
|
254
|
+
QuillmarkFinalization.register(this, this.__wbg_ptr, this);
|
|
255
|
+
return this;
|
|
264
256
|
}
|
|
265
257
|
/**
|
|
266
|
-
*
|
|
258
|
+
* Parse markdown into a ParsedDocument
|
|
267
259
|
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
260
|
+
* This is the first step in the workflow. The returned ParsedDocument contains
|
|
261
|
+
* the parsed YAML frontmatter fields and the quill_tag (from QUILL field or "__default__").
|
|
270
262
|
* @param {string} markdown
|
|
271
|
-
* @returns {
|
|
263
|
+
* @returns {ParsedDocument}
|
|
272
264
|
*/
|
|
273
|
-
|
|
274
|
-
let deferred4_0;
|
|
275
|
-
let deferred4_1;
|
|
265
|
+
static parseMarkdown(markdown) {
|
|
276
266
|
try {
|
|
277
267
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
278
|
-
const ptr0 = passStringToWasm0(
|
|
268
|
+
const ptr0 = passStringToWasm0(markdown, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
279
269
|
const len0 = WASM_VECTOR_LEN;
|
|
280
|
-
|
|
281
|
-
const len1 = WASM_VECTOR_LEN;
|
|
282
|
-
wasm.quillmark_processPlate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
270
|
+
wasm.quillmark_parseMarkdown(retptr, ptr0, len0);
|
|
283
271
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
284
272
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
285
273
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
var len3 = r1;
|
|
289
|
-
if (r3) {
|
|
290
|
-
ptr3 = 0; len3 = 0;
|
|
291
|
-
throw takeObject(r2);
|
|
274
|
+
if (r2) {
|
|
275
|
+
throw takeObject(r1);
|
|
292
276
|
}
|
|
293
|
-
|
|
294
|
-
deferred4_1 = len3;
|
|
295
|
-
return getStringFromWasm0(ptr3, len3);
|
|
277
|
+
return takeObject(r0);
|
|
296
278
|
} finally {
|
|
297
279
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
298
|
-
wasm.__wbindgen_export_3(deferred4_0, deferred4_1, 1);
|
|
299
280
|
}
|
|
300
281
|
}
|
|
301
282
|
/**
|
|
302
|
-
*
|
|
283
|
+
* Register a Quill template bundle
|
|
303
284
|
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
* @param {
|
|
285
|
+
* Accepts either a JSON string or a JsValue object representing the Quill file tree.
|
|
286
|
+
* Validation happens automatically on registration.
|
|
287
|
+
* @param {any} quill_json
|
|
307
288
|
* @returns {QuillInfo}
|
|
308
289
|
*/
|
|
309
|
-
|
|
290
|
+
registerQuill(quill_json) {
|
|
310
291
|
try {
|
|
311
292
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
312
|
-
|
|
313
|
-
const len0 = WASM_VECTOR_LEN;
|
|
314
|
-
wasm.quillmark_getQuillInfo(retptr, this.__wbg_ptr, ptr0, len0);
|
|
293
|
+
wasm.quillmark_registerQuill(retptr, this.__wbg_ptr, addHeapObject(quill_json));
|
|
315
294
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
316
295
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
317
296
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -324,19 +303,19 @@ export class Quillmark {
|
|
|
324
303
|
}
|
|
325
304
|
}
|
|
326
305
|
/**
|
|
327
|
-
*
|
|
306
|
+
* Get shallow information about a registered Quill
|
|
328
307
|
*
|
|
329
|
-
* This
|
|
330
|
-
*
|
|
331
|
-
* @param {string}
|
|
332
|
-
* @returns {
|
|
308
|
+
* This returns metadata, backend info, field schemas, and supported formats
|
|
309
|
+
* that consumers need to configure render options for the next step.
|
|
310
|
+
* @param {string} name
|
|
311
|
+
* @returns {QuillInfo}
|
|
333
312
|
*/
|
|
334
|
-
|
|
313
|
+
getQuillInfo(name) {
|
|
335
314
|
try {
|
|
336
315
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
337
|
-
const ptr0 = passStringToWasm0(
|
|
316
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
338
317
|
const len0 = WASM_VECTOR_LEN;
|
|
339
|
-
wasm.
|
|
318
|
+
wasm.quillmark_getQuillInfo(retptr, this.__wbg_ptr, ptr0, len0);
|
|
340
319
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
341
320
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
342
321
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -349,50 +328,46 @@ export class Quillmark {
|
|
|
349
328
|
}
|
|
350
329
|
}
|
|
351
330
|
/**
|
|
352
|
-
*
|
|
331
|
+
* Perform a dry run validation without backend compilation.
|
|
353
332
|
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
333
|
+
* Executes parsing, schema validation, and template composition to
|
|
334
|
+
* surface input errors quickly. Returns successfully on valid input,
|
|
335
|
+
* or throws an error with diagnostic payload on failure.
|
|
336
|
+
*
|
|
337
|
+
* The quill name is inferred from the markdown's QUILL tag (or defaults to "__default__").
|
|
338
|
+
*
|
|
339
|
+
* This is useful for fast feedback loops in LLM-driven document generation.
|
|
340
|
+
* @param {string} markdown
|
|
358
341
|
*/
|
|
359
|
-
|
|
342
|
+
dryRun(markdown) {
|
|
360
343
|
try {
|
|
361
344
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
362
|
-
|
|
345
|
+
const ptr0 = passStringToWasm0(markdown, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
346
|
+
const len0 = WASM_VECTOR_LEN;
|
|
347
|
+
wasm.quillmark_dryRun(retptr, this.__wbg_ptr, ptr0, len0);
|
|
363
348
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
364
349
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
throw takeObject(r1);
|
|
350
|
+
if (r1) {
|
|
351
|
+
throw takeObject(r0);
|
|
368
352
|
}
|
|
369
|
-
return takeObject(r0);
|
|
370
353
|
} finally {
|
|
371
354
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
372
355
|
}
|
|
373
356
|
}
|
|
374
357
|
/**
|
|
375
|
-
*
|
|
376
|
-
* @param {string} name
|
|
377
|
-
*/
|
|
378
|
-
unregisterQuill(name) {
|
|
379
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
380
|
-
const len0 = WASM_VECTOR_LEN;
|
|
381
|
-
wasm.quillmark_unregisterQuill(this.__wbg_ptr, ptr0, len0);
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* Get shallow information about a registered Quill with UI metadata stripped
|
|
358
|
+
* Compile markdown to JSON data without rendering artifacts.
|
|
385
359
|
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
* @
|
|
360
|
+
* This exposes the intermediate data structure that would be passed to the backend.
|
|
361
|
+
* Useful for debugging and validation.
|
|
362
|
+
* @param {string} markdown
|
|
363
|
+
* @returns {any}
|
|
389
364
|
*/
|
|
390
|
-
|
|
365
|
+
compileData(markdown) {
|
|
391
366
|
try {
|
|
392
367
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
393
|
-
const ptr0 = passStringToWasm0(
|
|
368
|
+
const ptr0 = passStringToWasm0(markdown, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
394
369
|
const len0 = WASM_VECTOR_LEN;
|
|
395
|
-
wasm.
|
|
370
|
+
wasm.quillmark_compileData(retptr, this.__wbg_ptr, ptr0, len0);
|
|
396
371
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
397
372
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
398
373
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -404,15 +379,6 @@ export class Quillmark {
|
|
|
404
379
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
405
380
|
}
|
|
406
381
|
}
|
|
407
|
-
/**
|
|
408
|
-
* JavaScript constructor: `new Quillmark()`
|
|
409
|
-
*/
|
|
410
|
-
constructor() {
|
|
411
|
-
const ret = wasm.quillmark_new();
|
|
412
|
-
this.__wbg_ptr = ret >>> 0;
|
|
413
|
-
QuillmarkFinalization.register(this, this.__wbg_ptr, this);
|
|
414
|
-
return this;
|
|
415
|
-
}
|
|
416
382
|
/**
|
|
417
383
|
* Render a ParsedDocument to final artifacts (PDF, SVG, TXT)
|
|
418
384
|
*
|
|
@@ -438,32 +404,31 @@ export class Quillmark {
|
|
|
438
404
|
}
|
|
439
405
|
}
|
|
440
406
|
/**
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
* Executes parsing, schema validation, and template composition to
|
|
444
|
-
* surface input errors quickly. Returns successfully on valid input,
|
|
445
|
-
* or throws an error with diagnostic payload on failure.
|
|
446
|
-
*
|
|
447
|
-
* The quill name is inferred from the markdown's QUILL tag (or defaults to "__default__").
|
|
448
|
-
*
|
|
449
|
-
* This is useful for fast feedback loops in LLM-driven document generation.
|
|
450
|
-
* @param {string} markdown
|
|
407
|
+
* List registered Quill names
|
|
408
|
+
* @returns {string[]}
|
|
451
409
|
*/
|
|
452
|
-
|
|
410
|
+
listQuills() {
|
|
453
411
|
try {
|
|
454
412
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
455
|
-
|
|
456
|
-
const len0 = WASM_VECTOR_LEN;
|
|
457
|
-
wasm.quillmark_dryRun(retptr, this.__wbg_ptr, ptr0, len0);
|
|
413
|
+
wasm.quillmark_listQuills(retptr, this.__wbg_ptr);
|
|
458
414
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
459
415
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
416
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
417
|
+
wasm.__wbindgen_export_3(r0, r1 * 4, 4);
|
|
418
|
+
return v1;
|
|
463
419
|
} finally {
|
|
464
420
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
465
421
|
}
|
|
466
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* Unregister a Quill (free memory)
|
|
425
|
+
* @param {string} name
|
|
426
|
+
*/
|
|
427
|
+
unregisterQuill(name) {
|
|
428
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
429
|
+
const len0 = WASM_VECTOR_LEN;
|
|
430
|
+
wasm.quillmark_unregisterQuill(this.__wbg_ptr, ptr0, len0);
|
|
431
|
+
}
|
|
467
432
|
}
|
|
468
433
|
if (Symbol.dispose) Quillmark.prototype[Symbol.dispose] = Quillmark.prototype.free;
|
|
469
434
|
|
|
@@ -643,6 +608,11 @@ export function __wbg_now_1e80617bcee43265() {
|
|
|
643
608
|
return ret;
|
|
644
609
|
};
|
|
645
610
|
|
|
611
|
+
export function __wbg_parse_442f5ba02e5eaf8b() { return handleError(function (arg0, arg1) {
|
|
612
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
613
|
+
return addHeapObject(ret);
|
|
614
|
+
}, arguments) };
|
|
615
|
+
|
|
646
616
|
export function __wbg_prototypesetcall_3d4a26c1ed734349(arg0, arg1, arg2) {
|
|
647
617
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
648
618
|
};
|
package/bundler/wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -2,30 +2,29 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_quillmark_free: (a: number, b: number) => void;
|
|
5
|
-
export const init: () => void;
|
|
6
|
-
export const quillmark_dryRun: (a: number, b: number, c: number, d: number) => void;
|
|
7
|
-
export const quillmark_getQuillInfo: (a: number, b: number, c: number, d: number) => void;
|
|
8
|
-
export const quillmark_getQuillInfoSlim: (a: number, b: number, c: number, d: number) => void;
|
|
9
|
-
export const quillmark_listQuills: (a: number, b: number) => void;
|
|
10
5
|
export const quillmark_new: () => number;
|
|
11
6
|
export const quillmark_parseMarkdown: (a: number, b: number, c: number) => void;
|
|
12
|
-
export const quillmark_processPlate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
13
7
|
export const quillmark_registerQuill: (a: number, b: number, c: number) => void;
|
|
8
|
+
export const quillmark_getQuillInfo: (a: number, b: number, c: number, d: number) => void;
|
|
9
|
+
export const quillmark_dryRun: (a: number, b: number, c: number, d: number) => void;
|
|
10
|
+
export const quillmark_compileData: (a: number, b: number, c: number, d: number) => void;
|
|
14
11
|
export const quillmark_render: (a: number, b: number, c: number, d: number) => void;
|
|
12
|
+
export const quillmark_listQuills: (a: number, b: number) => void;
|
|
15
13
|
export const quillmark_unregisterQuill: (a: number, b: number, c: number) => void;
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
14
|
+
export const init: () => void;
|
|
15
|
+
export const qcms_profile_is_bogus: (a: number) => number;
|
|
18
16
|
export const qcms_white_point_sRGB: (a: number) => void;
|
|
19
|
-
export const
|
|
20
|
-
export const qcms_transform_data_rgba_out_lut: (a: number, b: number, c: number, d: number) => void;
|
|
21
|
-
export const qcms_transform_data_bgra_out_lut: (a: number, b: number, c: number, d: number) => void;
|
|
17
|
+
export const qcms_profile_precache_output_transform: (a: number) => void;
|
|
22
18
|
export const qcms_transform_data_rgb_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
|
|
23
19
|
export const qcms_transform_data_rgba_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
|
|
24
20
|
export const qcms_transform_data_bgra_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
21
|
+
export const qcms_transform_data_rgb_out_lut: (a: number, b: number, c: number, d: number) => void;
|
|
22
|
+
export const qcms_transform_data_rgba_out_lut: (a: number, b: number, c: number, d: number) => void;
|
|
23
|
+
export const qcms_transform_data_bgra_out_lut: (a: number, b: number, c: number, d: number) => void;
|
|
28
24
|
export const qcms_transform_release: (a: number) => void;
|
|
25
|
+
export const qcms_enable_iccv4: () => void;
|
|
26
|
+
export const lut_interp_linear16: (a: number, b: number, c: number) => number;
|
|
27
|
+
export const lut_inverse_interp16: (a: number, b: number, c: number) => number;
|
|
29
28
|
export const __wbindgen_export_0: (a: number, b: number) => number;
|
|
30
29
|
export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
|
|
31
30
|
export const __wbindgen_export_2: (a: number) => void;
|
package/node-esm/wasm.d.ts
CHANGED
|
@@ -4,16 +4,36 @@
|
|
|
4
4
|
* Initialize the WASM module with panic hooks for better error messages
|
|
5
5
|
*/
|
|
6
6
|
export function init(): void;
|
|
7
|
+
export type OutputFormat = "pdf" | "svg" | "txt";
|
|
8
|
+
|
|
9
|
+
export type Severity = "error" | "warning" | "note";
|
|
10
|
+
|
|
7
11
|
export interface Location {
|
|
8
12
|
file: string;
|
|
9
13
|
line: number;
|
|
10
14
|
column: number;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
|
-
export interface
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
export interface Diagnostic {
|
|
18
|
+
severity: Severity;
|
|
19
|
+
code?: string;
|
|
20
|
+
message: string;
|
|
21
|
+
location?: Location;
|
|
22
|
+
hint?: string;
|
|
23
|
+
sourceChain: string[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Artifact {
|
|
27
|
+
format: OutputFormat;
|
|
28
|
+
bytes: Uint8Array;
|
|
29
|
+
mimeType: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface RenderResult {
|
|
33
|
+
artifacts: Artifact[];
|
|
34
|
+
warnings: Diagnostic[];
|
|
35
|
+
outputFormat: OutputFormat;
|
|
36
|
+
renderTimeMs: number;
|
|
17
37
|
}
|
|
18
38
|
|
|
19
39
|
export interface QuillInfo {
|
|
@@ -27,35 +47,15 @@ export interface QuillInfo {
|
|
|
27
47
|
supportedFormats: OutputFormat[];
|
|
28
48
|
}
|
|
29
49
|
|
|
30
|
-
export type Severity = "error" | "warning" | "note";
|
|
31
|
-
|
|
32
|
-
export interface Artifact {
|
|
33
|
-
format: OutputFormat;
|
|
34
|
-
bytes: Uint8Array;
|
|
35
|
-
mimeType: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
50
|
export interface ParsedDocument {
|
|
39
51
|
fields: Record<string, any>;
|
|
40
52
|
quillTag: string;
|
|
41
53
|
}
|
|
42
54
|
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
warnings: Diagnostic[];
|
|
48
|
-
outputFormat: OutputFormat;
|
|
49
|
-
renderTimeMs: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface Diagnostic {
|
|
53
|
-
severity: Severity;
|
|
54
|
-
code?: string;
|
|
55
|
-
message: string;
|
|
56
|
-
location?: Location;
|
|
57
|
-
hint?: string;
|
|
58
|
-
sourceChain: string[];
|
|
55
|
+
export interface RenderOptions {
|
|
56
|
+
format?: OutputFormat;
|
|
57
|
+
assets?: Record<string, Uint8Array | number[]>;
|
|
58
|
+
quillName?: string;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -67,22 +67,9 @@ export class Quillmark {
|
|
|
67
67
|
free(): void;
|
|
68
68
|
[Symbol.dispose](): void;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
71
|
-
*/
|
|
72
|
-
listQuills(): string[];
|
|
73
|
-
/**
|
|
74
|
-
* Process markdown through template engine (debugging)
|
|
75
|
-
*
|
|
76
|
-
* Returns template source code (Typst, LaTeX, etc.)
|
|
77
|
-
*/
|
|
78
|
-
processPlate(quill_name: string, markdown: string): string;
|
|
79
|
-
/**
|
|
80
|
-
* Get shallow information about a registered Quill
|
|
81
|
-
*
|
|
82
|
-
* This returns metadata, backend info, field schemas, and supported formats
|
|
83
|
-
* that consumers need to configure render options for the next step.
|
|
70
|
+
* JavaScript constructor: `new Quillmark()`
|
|
84
71
|
*/
|
|
85
|
-
|
|
72
|
+
constructor();
|
|
86
73
|
/**
|
|
87
74
|
* Parse markdown into a ParsedDocument
|
|
88
75
|
*
|
|
@@ -98,19 +85,31 @@ export class Quillmark {
|
|
|
98
85
|
*/
|
|
99
86
|
registerQuill(quill_json: any): QuillInfo;
|
|
100
87
|
/**
|
|
101
|
-
*
|
|
88
|
+
* Get shallow information about a registered Quill
|
|
89
|
+
*
|
|
90
|
+
* This returns metadata, backend info, field schemas, and supported formats
|
|
91
|
+
* that consumers need to configure render options for the next step.
|
|
102
92
|
*/
|
|
103
|
-
|
|
93
|
+
getQuillInfo(name: string): QuillInfo;
|
|
104
94
|
/**
|
|
105
|
-
*
|
|
95
|
+
* Perform a dry run validation without backend compilation.
|
|
96
|
+
*
|
|
97
|
+
* Executes parsing, schema validation, and template composition to
|
|
98
|
+
* surface input errors quickly. Returns successfully on valid input,
|
|
99
|
+
* or throws an error with diagnostic payload on failure.
|
|
106
100
|
*
|
|
107
|
-
*
|
|
101
|
+
* The quill name is inferred from the markdown's QUILL tag (or defaults to "__default__").
|
|
102
|
+
*
|
|
103
|
+
* This is useful for fast feedback loops in LLM-driven document generation.
|
|
108
104
|
*/
|
|
109
|
-
|
|
105
|
+
dryRun(markdown: string): void;
|
|
110
106
|
/**
|
|
111
|
-
*
|
|
107
|
+
* Compile markdown to JSON data without rendering artifacts.
|
|
108
|
+
*
|
|
109
|
+
* This exposes the intermediate data structure that would be passed to the backend.
|
|
110
|
+
* Useful for debugging and validation.
|
|
112
111
|
*/
|
|
113
|
-
|
|
112
|
+
compileData(markdown: string): any;
|
|
114
113
|
/**
|
|
115
114
|
* Render a ParsedDocument to final artifacts (PDF, SVG, TXT)
|
|
116
115
|
*
|
|
@@ -119,15 +118,11 @@ export class Quillmark {
|
|
|
119
118
|
*/
|
|
120
119
|
render(parsed: ParsedDocument, opts: RenderOptions): RenderResult;
|
|
121
120
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* Executes parsing, schema validation, and template composition to
|
|
125
|
-
* surface input errors quickly. Returns successfully on valid input,
|
|
126
|
-
* or throws an error with diagnostic payload on failure.
|
|
127
|
-
*
|
|
128
|
-
* The quill name is inferred from the markdown's QUILL tag (or defaults to "__default__").
|
|
129
|
-
*
|
|
130
|
-
* This is useful for fast feedback loops in LLM-driven document generation.
|
|
121
|
+
* List registered Quill names
|
|
131
122
|
*/
|
|
132
|
-
|
|
123
|
+
listQuills(): string[];
|
|
124
|
+
/**
|
|
125
|
+
* Unregister a Quill (free memory)
|
|
126
|
+
*/
|
|
127
|
+
unregisterQuill(name: string): void;
|
|
133
128
|
}
|
package/node-esm/wasm_bg.js
CHANGED
|
@@ -201,12 +201,6 @@ function debugString(val) {
|
|
|
201
201
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
202
202
|
return className;
|
|
203
203
|
}
|
|
204
|
-
/**
|
|
205
|
-
* Initialize the WASM module with panic hooks for better error messages
|
|
206
|
-
*/
|
|
207
|
-
export function init() {
|
|
208
|
-
wasm.init();
|
|
209
|
-
}
|
|
210
204
|
|
|
211
205
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
212
206
|
ptr = ptr >>> 0;
|
|
@@ -217,6 +211,12 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
217
211
|
}
|
|
218
212
|
return result;
|
|
219
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Initialize the WASM module with panic hooks for better error messages
|
|
216
|
+
*/
|
|
217
|
+
export function init() {
|
|
218
|
+
wasm.init();
|
|
219
|
+
}
|
|
220
220
|
|
|
221
221
|
const QuillmarkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
222
222
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -240,72 +240,51 @@ export class Quillmark {
|
|
|
240
240
|
wasm.__wbg_quillmark_free(ptr, 0);
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
|
-
*
|
|
244
|
-
* @returns {string[]}
|
|
243
|
+
* JavaScript constructor: `new Quillmark()`
|
|
245
244
|
*/
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
252
|
-
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
253
|
-
wasm.__wbindgen_export_3(r0, r1 * 4, 4);
|
|
254
|
-
return v1;
|
|
255
|
-
} finally {
|
|
256
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
257
|
-
}
|
|
245
|
+
constructor() {
|
|
246
|
+
const ret = wasm.quillmark_new();
|
|
247
|
+
this.__wbg_ptr = ret >>> 0;
|
|
248
|
+
QuillmarkFinalization.register(this, this.__wbg_ptr, this);
|
|
249
|
+
return this;
|
|
258
250
|
}
|
|
259
251
|
/**
|
|
260
|
-
*
|
|
252
|
+
* Parse markdown into a ParsedDocument
|
|
261
253
|
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
254
|
+
* This is the first step in the workflow. The returned ParsedDocument contains
|
|
255
|
+
* the parsed YAML frontmatter fields and the quill_tag (from QUILL field or "__default__").
|
|
264
256
|
* @param {string} markdown
|
|
265
|
-
* @returns {
|
|
257
|
+
* @returns {ParsedDocument}
|
|
266
258
|
*/
|
|
267
|
-
|
|
268
|
-
let deferred4_0;
|
|
269
|
-
let deferred4_1;
|
|
259
|
+
static parseMarkdown(markdown) {
|
|
270
260
|
try {
|
|
271
261
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
272
|
-
const ptr0 = passStringToWasm0(
|
|
262
|
+
const ptr0 = passStringToWasm0(markdown, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
273
263
|
const len0 = WASM_VECTOR_LEN;
|
|
274
|
-
|
|
275
|
-
const len1 = WASM_VECTOR_LEN;
|
|
276
|
-
wasm.quillmark_processPlate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
264
|
+
wasm.quillmark_parseMarkdown(retptr, ptr0, len0);
|
|
277
265
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
278
266
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
279
267
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
var len3 = r1;
|
|
283
|
-
if (r3) {
|
|
284
|
-
ptr3 = 0; len3 = 0;
|
|
285
|
-
throw takeObject(r2);
|
|
268
|
+
if (r2) {
|
|
269
|
+
throw takeObject(r1);
|
|
286
270
|
}
|
|
287
|
-
|
|
288
|
-
deferred4_1 = len3;
|
|
289
|
-
return getStringFromWasm0(ptr3, len3);
|
|
271
|
+
return takeObject(r0);
|
|
290
272
|
} finally {
|
|
291
273
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
292
|
-
wasm.__wbindgen_export_3(deferred4_0, deferred4_1, 1);
|
|
293
274
|
}
|
|
294
275
|
}
|
|
295
276
|
/**
|
|
296
|
-
*
|
|
277
|
+
* Register a Quill template bundle
|
|
297
278
|
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
* @param {
|
|
279
|
+
* Accepts either a JSON string or a JsValue object representing the Quill file tree.
|
|
280
|
+
* Validation happens automatically on registration.
|
|
281
|
+
* @param {any} quill_json
|
|
301
282
|
* @returns {QuillInfo}
|
|
302
283
|
*/
|
|
303
|
-
|
|
284
|
+
registerQuill(quill_json) {
|
|
304
285
|
try {
|
|
305
286
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
306
|
-
|
|
307
|
-
const len0 = WASM_VECTOR_LEN;
|
|
308
|
-
wasm.quillmark_getQuillInfo(retptr, this.__wbg_ptr, ptr0, len0);
|
|
287
|
+
wasm.quillmark_registerQuill(retptr, this.__wbg_ptr, addHeapObject(quill_json));
|
|
309
288
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
310
289
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
311
290
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -318,19 +297,19 @@ export class Quillmark {
|
|
|
318
297
|
}
|
|
319
298
|
}
|
|
320
299
|
/**
|
|
321
|
-
*
|
|
300
|
+
* Get shallow information about a registered Quill
|
|
322
301
|
*
|
|
323
|
-
* This
|
|
324
|
-
*
|
|
325
|
-
* @param {string}
|
|
326
|
-
* @returns {
|
|
302
|
+
* This returns metadata, backend info, field schemas, and supported formats
|
|
303
|
+
* that consumers need to configure render options for the next step.
|
|
304
|
+
* @param {string} name
|
|
305
|
+
* @returns {QuillInfo}
|
|
327
306
|
*/
|
|
328
|
-
|
|
307
|
+
getQuillInfo(name) {
|
|
329
308
|
try {
|
|
330
309
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
331
|
-
const ptr0 = passStringToWasm0(
|
|
310
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
332
311
|
const len0 = WASM_VECTOR_LEN;
|
|
333
|
-
wasm.
|
|
312
|
+
wasm.quillmark_getQuillInfo(retptr, this.__wbg_ptr, ptr0, len0);
|
|
334
313
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
335
314
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
336
315
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -343,50 +322,46 @@ export class Quillmark {
|
|
|
343
322
|
}
|
|
344
323
|
}
|
|
345
324
|
/**
|
|
346
|
-
*
|
|
325
|
+
* Perform a dry run validation without backend compilation.
|
|
347
326
|
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
327
|
+
* Executes parsing, schema validation, and template composition to
|
|
328
|
+
* surface input errors quickly. Returns successfully on valid input,
|
|
329
|
+
* or throws an error with diagnostic payload on failure.
|
|
330
|
+
*
|
|
331
|
+
* The quill name is inferred from the markdown's QUILL tag (or defaults to "__default__").
|
|
332
|
+
*
|
|
333
|
+
* This is useful for fast feedback loops in LLM-driven document generation.
|
|
334
|
+
* @param {string} markdown
|
|
352
335
|
*/
|
|
353
|
-
|
|
336
|
+
dryRun(markdown) {
|
|
354
337
|
try {
|
|
355
338
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
356
|
-
|
|
339
|
+
const ptr0 = passStringToWasm0(markdown, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
340
|
+
const len0 = WASM_VECTOR_LEN;
|
|
341
|
+
wasm.quillmark_dryRun(retptr, this.__wbg_ptr, ptr0, len0);
|
|
357
342
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
358
343
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
throw takeObject(r1);
|
|
344
|
+
if (r1) {
|
|
345
|
+
throw takeObject(r0);
|
|
362
346
|
}
|
|
363
|
-
return takeObject(r0);
|
|
364
347
|
} finally {
|
|
365
348
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
366
349
|
}
|
|
367
350
|
}
|
|
368
351
|
/**
|
|
369
|
-
*
|
|
370
|
-
* @param {string} name
|
|
371
|
-
*/
|
|
372
|
-
unregisterQuill(name) {
|
|
373
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
374
|
-
const len0 = WASM_VECTOR_LEN;
|
|
375
|
-
wasm.quillmark_unregisterQuill(this.__wbg_ptr, ptr0, len0);
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Get shallow information about a registered Quill with UI metadata stripped
|
|
352
|
+
* Compile markdown to JSON data without rendering artifacts.
|
|
379
353
|
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
* @
|
|
354
|
+
* This exposes the intermediate data structure that would be passed to the backend.
|
|
355
|
+
* Useful for debugging and validation.
|
|
356
|
+
* @param {string} markdown
|
|
357
|
+
* @returns {any}
|
|
383
358
|
*/
|
|
384
|
-
|
|
359
|
+
compileData(markdown) {
|
|
385
360
|
try {
|
|
386
361
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
387
|
-
const ptr0 = passStringToWasm0(
|
|
362
|
+
const ptr0 = passStringToWasm0(markdown, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
388
363
|
const len0 = WASM_VECTOR_LEN;
|
|
389
|
-
wasm.
|
|
364
|
+
wasm.quillmark_compileData(retptr, this.__wbg_ptr, ptr0, len0);
|
|
390
365
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
391
366
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
392
367
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -398,15 +373,6 @@ export class Quillmark {
|
|
|
398
373
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
399
374
|
}
|
|
400
375
|
}
|
|
401
|
-
/**
|
|
402
|
-
* JavaScript constructor: `new Quillmark()`
|
|
403
|
-
*/
|
|
404
|
-
constructor() {
|
|
405
|
-
const ret = wasm.quillmark_new();
|
|
406
|
-
this.__wbg_ptr = ret >>> 0;
|
|
407
|
-
QuillmarkFinalization.register(this, this.__wbg_ptr, this);
|
|
408
|
-
return this;
|
|
409
|
-
}
|
|
410
376
|
/**
|
|
411
377
|
* Render a ParsedDocument to final artifacts (PDF, SVG, TXT)
|
|
412
378
|
*
|
|
@@ -432,32 +398,31 @@ export class Quillmark {
|
|
|
432
398
|
}
|
|
433
399
|
}
|
|
434
400
|
/**
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
* Executes parsing, schema validation, and template composition to
|
|
438
|
-
* surface input errors quickly. Returns successfully on valid input,
|
|
439
|
-
* or throws an error with diagnostic payload on failure.
|
|
440
|
-
*
|
|
441
|
-
* The quill name is inferred from the markdown's QUILL tag (or defaults to "__default__").
|
|
442
|
-
*
|
|
443
|
-
* This is useful for fast feedback loops in LLM-driven document generation.
|
|
444
|
-
* @param {string} markdown
|
|
401
|
+
* List registered Quill names
|
|
402
|
+
* @returns {string[]}
|
|
445
403
|
*/
|
|
446
|
-
|
|
404
|
+
listQuills() {
|
|
447
405
|
try {
|
|
448
406
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
449
|
-
|
|
450
|
-
const len0 = WASM_VECTOR_LEN;
|
|
451
|
-
wasm.quillmark_dryRun(retptr, this.__wbg_ptr, ptr0, len0);
|
|
407
|
+
wasm.quillmark_listQuills(retptr, this.__wbg_ptr);
|
|
452
408
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
453
409
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
410
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
411
|
+
wasm.__wbindgen_export_3(r0, r1 * 4, 4);
|
|
412
|
+
return v1;
|
|
457
413
|
} finally {
|
|
458
414
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
459
415
|
}
|
|
460
416
|
}
|
|
417
|
+
/**
|
|
418
|
+
* Unregister a Quill (free memory)
|
|
419
|
+
* @param {string} name
|
|
420
|
+
*/
|
|
421
|
+
unregisterQuill(name) {
|
|
422
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
423
|
+
const len0 = WASM_VECTOR_LEN;
|
|
424
|
+
wasm.quillmark_unregisterQuill(this.__wbg_ptr, ptr0, len0);
|
|
425
|
+
}
|
|
461
426
|
}
|
|
462
427
|
if (Symbol.dispose) Quillmark.prototype[Symbol.dispose] = Quillmark.prototype.free;
|
|
463
428
|
|
|
@@ -637,6 +602,11 @@ export function __wbg_now_1e80617bcee43265() {
|
|
|
637
602
|
return ret;
|
|
638
603
|
};
|
|
639
604
|
|
|
605
|
+
export function __wbg_parse_442f5ba02e5eaf8b() { return handleError(function (arg0, arg1) {
|
|
606
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
607
|
+
return addHeapObject(ret);
|
|
608
|
+
}, arguments) };
|
|
609
|
+
|
|
640
610
|
export function __wbg_prototypesetcall_3d4a26c1ed734349(arg0, arg1, arg2) {
|
|
641
611
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
642
612
|
};
|
package/node-esm/wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -2,30 +2,29 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_quillmark_free: (a: number, b: number) => void;
|
|
5
|
-
export const init: () => void;
|
|
6
|
-
export const quillmark_dryRun: (a: number, b: number, c: number, d: number) => void;
|
|
7
|
-
export const quillmark_getQuillInfo: (a: number, b: number, c: number, d: number) => void;
|
|
8
|
-
export const quillmark_getQuillInfoSlim: (a: number, b: number, c: number, d: number) => void;
|
|
9
|
-
export const quillmark_listQuills: (a: number, b: number) => void;
|
|
10
5
|
export const quillmark_new: () => number;
|
|
11
6
|
export const quillmark_parseMarkdown: (a: number, b: number, c: number) => void;
|
|
12
|
-
export const quillmark_processPlate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
13
7
|
export const quillmark_registerQuill: (a: number, b: number, c: number) => void;
|
|
8
|
+
export const quillmark_getQuillInfo: (a: number, b: number, c: number, d: number) => void;
|
|
9
|
+
export const quillmark_dryRun: (a: number, b: number, c: number, d: number) => void;
|
|
10
|
+
export const quillmark_compileData: (a: number, b: number, c: number, d: number) => void;
|
|
14
11
|
export const quillmark_render: (a: number, b: number, c: number, d: number) => void;
|
|
12
|
+
export const quillmark_listQuills: (a: number, b: number) => void;
|
|
15
13
|
export const quillmark_unregisterQuill: (a: number, b: number, c: number) => void;
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
14
|
+
export const init: () => void;
|
|
15
|
+
export const qcms_profile_is_bogus: (a: number) => number;
|
|
18
16
|
export const qcms_white_point_sRGB: (a: number) => void;
|
|
19
|
-
export const
|
|
20
|
-
export const qcms_transform_data_rgba_out_lut: (a: number, b: number, c: number, d: number) => void;
|
|
21
|
-
export const qcms_transform_data_bgra_out_lut: (a: number, b: number, c: number, d: number) => void;
|
|
17
|
+
export const qcms_profile_precache_output_transform: (a: number) => void;
|
|
22
18
|
export const qcms_transform_data_rgb_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
|
|
23
19
|
export const qcms_transform_data_rgba_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
|
|
24
20
|
export const qcms_transform_data_bgra_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
21
|
+
export const qcms_transform_data_rgb_out_lut: (a: number, b: number, c: number, d: number) => void;
|
|
22
|
+
export const qcms_transform_data_rgba_out_lut: (a: number, b: number, c: number, d: number) => void;
|
|
23
|
+
export const qcms_transform_data_bgra_out_lut: (a: number, b: number, c: number, d: number) => void;
|
|
28
24
|
export const qcms_transform_release: (a: number) => void;
|
|
25
|
+
export const qcms_enable_iccv4: () => void;
|
|
26
|
+
export const lut_interp_linear16: (a: number, b: number, c: number) => number;
|
|
27
|
+
export const lut_inverse_interp16: (a: number, b: number, c: number) => number;
|
|
29
28
|
export const __wbindgen_export_0: (a: number, b: number) => number;
|
|
30
29
|
export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
|
|
31
30
|
export const __wbindgen_export_2: (a: number) => void;
|