@quillmark/wasm 0.24.3 → 0.26.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 CHANGED
@@ -4,6 +4,31 @@
4
4
  * Initialize the WASM module with panic hooks for better error messages
5
5
  */
6
6
  export function init(): void;
7
+ export interface Location {
8
+ file: string;
9
+ line: number;
10
+ column: number;
11
+ }
12
+
13
+ export interface RenderOptions {
14
+ format?: OutputFormat;
15
+ assets?: Record<string, Uint8Array | number[]>;
16
+ quillName?: string;
17
+ }
18
+
19
+ export interface QuillInfo {
20
+ name: string;
21
+ backend: string;
22
+ metadata: Record<string, any>;
23
+ example?: string;
24
+ schema: Record<string, any>;
25
+ defaults: Record<string, any>;
26
+ examples: Record<string, any[]>;
27
+ supportedFormats: OutputFormat[];
28
+ }
29
+
30
+ export type Severity = "error" | "warning" | "note";
31
+
7
32
  export interface Artifact {
8
33
  format: OutputFormat;
9
34
  bytes: Uint8Array;
@@ -15,11 +40,7 @@ export interface ParsedDocument {
15
40
  quillTag: string;
16
41
  }
17
42
 
18
- export interface RenderOptions {
19
- format?: OutputFormat;
20
- assets?: Record<string, Uint8Array | number[]>;
21
- quillName?: string;
22
- }
43
+ export type OutputFormat = "pdf" | "svg" | "txt";
23
44
 
24
45
  export interface RenderResult {
25
46
  artifacts: Artifact[];
@@ -28,14 +49,6 @@ export interface RenderResult {
28
49
  renderTimeMs: number;
29
50
  }
30
51
 
31
- export type Severity = "error" | "warning" | "note";
32
-
33
- export interface Location {
34
- file: string;
35
- line: number;
36
- column: number;
37
- }
38
-
39
52
  export interface Diagnostic {
40
53
  severity: Severity;
41
54
  code?: string;
@@ -45,19 +58,6 @@ export interface Diagnostic {
45
58
  sourceChain: string[];
46
59
  }
47
60
 
48
- export type OutputFormat = "pdf" | "svg" | "txt";
49
-
50
- export interface QuillInfo {
51
- name: string;
52
- backend: string;
53
- metadata: Record<string, any>;
54
- example?: string;
55
- schema: Record<string, any>;
56
- defaults: Record<string, any>;
57
- examples: Record<string, any[]>;
58
- supportedFormats: OutputFormat[];
59
- }
60
-
61
61
  /**
62
62
  * Quillmark WASM Engine
63
63
  *
@@ -101,6 +101,12 @@ export class Quillmark {
101
101
  * Unregister a Quill (free memory)
102
102
  */
103
103
  unregisterQuill(name: string): void;
104
+ /**
105
+ * Get shallow information about a registered Quill with UI metadata stripped
106
+ *
107
+ * Same as `getQuillInfo`, but removes "x-ui" fields from the schema.
108
+ */
109
+ getQuillInfoSlim(name: string): QuillInfo;
104
110
  /**
105
111
  * JavaScript constructor: `new Quillmark()`
106
112
  */
@@ -380,6 +380,30 @@ export class Quillmark {
380
380
  const len0 = WASM_VECTOR_LEN;
381
381
  wasm.quillmark_unregisterQuill(this.__wbg_ptr, ptr0, len0);
382
382
  }
383
+ /**
384
+ * Get shallow information about a registered Quill with UI metadata stripped
385
+ *
386
+ * Same as `getQuillInfo`, but removes "x-ui" fields from the schema.
387
+ * @param {string} name
388
+ * @returns {QuillInfo}
389
+ */
390
+ getQuillInfoSlim(name) {
391
+ try {
392
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
393
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
394
+ const len0 = WASM_VECTOR_LEN;
395
+ wasm.quillmark_getQuillInfoSlim(retptr, this.__wbg_ptr, ptr0, len0);
396
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
397
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
398
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
399
+ if (r2) {
400
+ throw takeObject(r1);
401
+ }
402
+ return takeObject(r0);
403
+ } finally {
404
+ wasm.__wbindgen_add_to_stack_pointer(16);
405
+ }
406
+ }
383
407
  /**
384
408
  * JavaScript constructor: `new Quillmark()`
385
409
  */
Binary file
@@ -5,6 +5,7 @@ export const __wbg_quillmark_free: (a: number, b: number) => void;
5
5
  export const init: () => void;
6
6
  export const quillmark_dryRun: (a: number, b: number, c: number, d: number) => void;
7
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;
8
9
  export const quillmark_listQuills: (a: number, b: number) => void;
9
10
  export const quillmark_new: () => number;
10
11
  export const quillmark_parseMarkdown: (a: number, b: number, c: number) => void;
@@ -4,6 +4,31 @@
4
4
  * Initialize the WASM module with panic hooks for better error messages
5
5
  */
6
6
  export function init(): void;
7
+ export interface Location {
8
+ file: string;
9
+ line: number;
10
+ column: number;
11
+ }
12
+
13
+ export interface RenderOptions {
14
+ format?: OutputFormat;
15
+ assets?: Record<string, Uint8Array | number[]>;
16
+ quillName?: string;
17
+ }
18
+
19
+ export interface QuillInfo {
20
+ name: string;
21
+ backend: string;
22
+ metadata: Record<string, any>;
23
+ example?: string;
24
+ schema: Record<string, any>;
25
+ defaults: Record<string, any>;
26
+ examples: Record<string, any[]>;
27
+ supportedFormats: OutputFormat[];
28
+ }
29
+
30
+ export type Severity = "error" | "warning" | "note";
31
+
7
32
  export interface Artifact {
8
33
  format: OutputFormat;
9
34
  bytes: Uint8Array;
@@ -15,11 +40,7 @@ export interface ParsedDocument {
15
40
  quillTag: string;
16
41
  }
17
42
 
18
- export interface RenderOptions {
19
- format?: OutputFormat;
20
- assets?: Record<string, Uint8Array | number[]>;
21
- quillName?: string;
22
- }
43
+ export type OutputFormat = "pdf" | "svg" | "txt";
23
44
 
24
45
  export interface RenderResult {
25
46
  artifacts: Artifact[];
@@ -28,14 +49,6 @@ export interface RenderResult {
28
49
  renderTimeMs: number;
29
50
  }
30
51
 
31
- export type Severity = "error" | "warning" | "note";
32
-
33
- export interface Location {
34
- file: string;
35
- line: number;
36
- column: number;
37
- }
38
-
39
52
  export interface Diagnostic {
40
53
  severity: Severity;
41
54
  code?: string;
@@ -45,19 +58,6 @@ export interface Diagnostic {
45
58
  sourceChain: string[];
46
59
  }
47
60
 
48
- export type OutputFormat = "pdf" | "svg" | "txt";
49
-
50
- export interface QuillInfo {
51
- name: string;
52
- backend: string;
53
- metadata: Record<string, any>;
54
- example?: string;
55
- schema: Record<string, any>;
56
- defaults: Record<string, any>;
57
- examples: Record<string, any[]>;
58
- supportedFormats: OutputFormat[];
59
- }
60
-
61
61
  /**
62
62
  * Quillmark WASM Engine
63
63
  *
@@ -101,6 +101,12 @@ export class Quillmark {
101
101
  * Unregister a Quill (free memory)
102
102
  */
103
103
  unregisterQuill(name: string): void;
104
+ /**
105
+ * Get shallow information about a registered Quill with UI metadata stripped
106
+ *
107
+ * Same as `getQuillInfo`, but removes "x-ui" fields from the schema.
108
+ */
109
+ getQuillInfoSlim(name: string): QuillInfo;
104
110
  /**
105
111
  * JavaScript constructor: `new Quillmark()`
106
112
  */
@@ -374,6 +374,30 @@ export class Quillmark {
374
374
  const len0 = WASM_VECTOR_LEN;
375
375
  wasm.quillmark_unregisterQuill(this.__wbg_ptr, ptr0, len0);
376
376
  }
377
+ /**
378
+ * Get shallow information about a registered Quill with UI metadata stripped
379
+ *
380
+ * Same as `getQuillInfo`, but removes "x-ui" fields from the schema.
381
+ * @param {string} name
382
+ * @returns {QuillInfo}
383
+ */
384
+ getQuillInfoSlim(name) {
385
+ try {
386
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
387
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
388
+ const len0 = WASM_VECTOR_LEN;
389
+ wasm.quillmark_getQuillInfoSlim(retptr, this.__wbg_ptr, ptr0, len0);
390
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
391
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
392
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
393
+ if (r2) {
394
+ throw takeObject(r1);
395
+ }
396
+ return takeObject(r0);
397
+ } finally {
398
+ wasm.__wbindgen_add_to_stack_pointer(16);
399
+ }
400
+ }
377
401
  /**
378
402
  * JavaScript constructor: `new Quillmark()`
379
403
  */
Binary file
@@ -5,6 +5,7 @@ export const __wbg_quillmark_free: (a: number, b: number) => void;
5
5
  export const init: () => void;
6
6
  export const quillmark_dryRun: (a: number, b: number, c: number, d: number) => void;
7
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;
8
9
  export const quillmark_listQuills: (a: number, b: number) => void;
9
10
  export const quillmark_new: () => number;
10
11
  export const quillmark_parseMarkdown: (a: number, b: number, c: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/wasm",
3
- "version": "0.24.3",
3
+ "version": "0.26.0",
4
4
  "description": "WebAssembly bindings for quillmark",
5
5
  "type": "module",
6
6
  "license": "MIT OR Apache-2.0",