@hpcc-js/wasm-graphviz 1.18.0 → 1.18.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/wasm-graphviz",
3
- "version": "1.18.0",
3
+ "version": "1.18.1",
4
4
  "description": "hpcc-js - WASM Graphviz",
5
5
  "type": "module",
6
6
  "exports": {
@@ -55,5 +55,5 @@
55
55
  },
56
56
  "homepage": "https://hpcc-systems.github.io/hpcc-js-wasm/",
57
57
  "license": "Apache-2.0",
58
- "gitHead": "6799e024fc9186c4a4f87294862142f00628e597"
58
+ "gitHead": "11395f5acfc865accde71905509bb45d5c79b11b"
59
59
  }
package/src/graphviz.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // @ts-expect-error importing from a wasm file is resolved via a custom esbuild plugin
2
2
  import load, { reset } from "../../../build/packages/graphviz/graphvizlib.wasm";
3
- import type { MainModule } from "../../../build/packages/graphviz/graphvizlib.js";
3
+ import type { MainModule } from "../types/graphvizlib.js";
4
4
  import { MainModuleEx } from "@hpcc-js/wasm-util";
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- import type { MainModule } from "../../../build/packages/graphviz/graphvizlib.js";
1
+ import type { MainModule } from "../types/graphvizlib.js";
2
2
  import { MainModuleEx } from "@hpcc-js/wasm-util";
3
3
  /**
4
4
  * Various graphic and data formats for end user, web, documents and other applications. See [Output Formats](https://graphviz.gitlab.io/docs/outputs/) for more information.
@@ -0,0 +1,65 @@
1
+ // TypeScript bindings for emscripten-generated code. Automatically generated at compile time.
2
+ declare namespace RuntimeExports {
3
+ /**
4
+ * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the
5
+ * emscripten HEAP, returns a copy of that string as a Javascript String object.
6
+ *
7
+ * @param {number} ptr
8
+ * @param {number=} maxBytesToRead - An optional length that specifies the
9
+ * maximum number of bytes to read. You can omit this parameter to scan the
10
+ * string until the first 0 byte. If maxBytesToRead is passed, and the string
11
+ * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the
12
+ * string will cut short at that byte index.
13
+ * @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character.
14
+ * @return {string}
15
+ */
16
+ function UTF8ToString(ptr: number, maxBytesToRead?: number | undefined, ignoreNul?: boolean | undefined): string;
17
+ function lengthBytesUTF8(str: any): number;
18
+ function stringToUTF8(str: any, outPtr: any, maxBytesToWrite: any): any;
19
+ let HEAPU8: any;
20
+ }
21
+ interface WasmModule {
22
+ _malloc(_0: number): number;
23
+ _free(_0: number): void;
24
+ }
25
+
26
+ type EmbindString = ArrayBuffer|Uint8Array|Uint8ClampedArray|Int8Array|string;
27
+ export interface ClassHandle {
28
+ isAliasOf(other: ClassHandle): boolean;
29
+ delete(): void;
30
+ deleteLater(): this;
31
+ isDeleted(): boolean;
32
+ // @ts-ignore - If targeting lower than ESNext, this symbol might not exist.
33
+ [Symbol.dispose](): void;
34
+ clone(): this;
35
+ }
36
+ export interface CGraphviz extends ClassHandle {
37
+ acyclic_num_rev: number;
38
+ get layout_result(): string;
39
+ set layout_result(value: EmbindString);
40
+ get acyclic_outFile(): string;
41
+ set acyclic_outFile(value: EmbindString);
42
+ get tred_out(): string;
43
+ set tred_out(value: EmbindString);
44
+ get tred_err(): string;
45
+ set tred_err(value: EmbindString);
46
+ get unflatten_out(): string;
47
+ set unflatten_out(value: EmbindString);
48
+ createFile(_0: EmbindString, _1: EmbindString): void;
49
+ layout(_0: EmbindString, _1: EmbindString, _2: EmbindString): string;
50
+ acyclic(_0: EmbindString, _1: boolean, _2: boolean): boolean;
51
+ tred(_0: EmbindString, _1: boolean, _2: boolean): void;
52
+ unflatten(_0: EmbindString, _1: number, _2: boolean, _3: number): string;
53
+ }
54
+
55
+ interface EmbindModule {
56
+ CGraphviz: {
57
+ new(): CGraphviz;
58
+ new(_0: number, _1: number): CGraphviz;
59
+ version(): string;
60
+ lastError(): string;
61
+ };
62
+ }
63
+
64
+ export type MainModule = WasmModule & typeof RuntimeExports & EmbindModule;
65
+ export default function MainModuleFactory (options?: unknown): Promise<MainModule>;