@quillmark/wasm 0.12.0 → 0.13.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 +3 -3
- package/package.json +1 -1
- package/wasm.d.ts +24 -24
- package/wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -70,9 +70,9 @@ const engine = new Quillmark();
|
|
|
70
70
|
const quillJson = {
|
|
71
71
|
files: {
|
|
72
72
|
'Quill.toml': {
|
|
73
|
-
contents: '[Quill]\nname = "my-quill"\nbackend = "typst"\
|
|
73
|
+
contents: '[Quill]\nname = "my-quill"\nbackend = "typst"\nplate_file = "plate.typ"\ndescription = "My template"\n'
|
|
74
74
|
},
|
|
75
|
-
'
|
|
75
|
+
'plate.typ': {
|
|
76
76
|
contents: '= {{ title }}\n\n{{ body | Content }}'
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -113,7 +113,7 @@ The main workflow for rendering documents:
|
|
|
113
113
|
Additional methods for managing the engine and debugging:
|
|
114
114
|
|
|
115
115
|
- `new Quillmark()` - Create a new engine instance
|
|
116
|
-
- `
|
|
116
|
+
- `processPlate(quillName, markdown)` - Debug helper that processes markdown through the template engine and returns the intermediate template source code (e.g., Typst, LaTeX) without compiling to final artifacts. Useful for inspecting template output during development.
|
|
117
117
|
- `listQuills()` - List all registered Quill names
|
|
118
118
|
- `unregisterQuill(name)` - Unregister a Quill to free memory
|
|
119
119
|
|
package/package.json
CHANGED
package/wasm.d.ts
CHANGED
|
@@ -4,17 +4,15 @@
|
|
|
4
4
|
* Initialize the WASM module with panic hooks for better error messages
|
|
5
5
|
*/
|
|
6
6
|
export function init(): void;
|
|
7
|
-
export
|
|
8
|
-
format: OutputFormat;
|
|
9
|
-
bytes: Uint8Array;
|
|
10
|
-
mimeType: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type Severity = "error" | "warning" | "note";
|
|
7
|
+
export type OutputFormat = "pdf" | "svg" | "txt";
|
|
14
8
|
|
|
15
|
-
export interface
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
export interface Diagnostic {
|
|
10
|
+
severity: Severity;
|
|
11
|
+
code?: string;
|
|
12
|
+
message: string;
|
|
13
|
+
location?: Location;
|
|
14
|
+
hint?: string;
|
|
15
|
+
sourceChain: string[];
|
|
18
16
|
}
|
|
19
17
|
|
|
20
18
|
export interface RenderOptions {
|
|
@@ -23,7 +21,13 @@ export interface RenderOptions {
|
|
|
23
21
|
quillName?: string;
|
|
24
22
|
}
|
|
25
23
|
|
|
26
|
-
export type
|
|
24
|
+
export type Severity = "error" | "warning" | "note";
|
|
25
|
+
|
|
26
|
+
export interface Location {
|
|
27
|
+
file: string;
|
|
28
|
+
line: number;
|
|
29
|
+
column: number;
|
|
30
|
+
}
|
|
27
31
|
|
|
28
32
|
export interface QuillInfo {
|
|
29
33
|
name: string;
|
|
@@ -36,6 +40,11 @@ export interface QuillInfo {
|
|
|
36
40
|
supportedFormats: OutputFormat[];
|
|
37
41
|
}
|
|
38
42
|
|
|
43
|
+
export interface ParsedDocument {
|
|
44
|
+
fields: Record<string, any>;
|
|
45
|
+
quillTag: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
39
48
|
export interface RenderResult {
|
|
40
49
|
artifacts: Artifact[];
|
|
41
50
|
warnings: Diagnostic[];
|
|
@@ -43,19 +52,10 @@ export interface RenderResult {
|
|
|
43
52
|
renderTimeMs: number;
|
|
44
53
|
}
|
|
45
54
|
|
|
46
|
-
export interface
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
location?: Location;
|
|
51
|
-
hint?: string;
|
|
52
|
-
sourceChain: string[];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface Location {
|
|
56
|
-
file: string;
|
|
57
|
-
line: number;
|
|
58
|
-
column: number;
|
|
55
|
+
export interface Artifact {
|
|
56
|
+
format: OutputFormat;
|
|
57
|
+
bytes: Uint8Array;
|
|
58
|
+
mimeType: string;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|