sp-svg-diagram 0.1.3 → 0.1.4

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/index.js CHANGED
@@ -3,6 +3,7 @@ import SVGDiagramWASMModule from './wasm/SVGDiagramWASM.js';
3
3
  import { writeFile } from 'fs/promises';
4
4
 
5
5
  const SVGDiagramWASM = await SVGDiagramWASMModule();
6
+ const _compareSVG = SVGDiagramWASM._compareSVG;
6
7
  const SVGDiagram = SVGDiagramWASM.SVGDiagram;
7
8
  const SVGNode = SVGDiagramWASM.SVGNode;
8
9
  const SVGEdge = SVGDiagramWASM.SVGEdge;
@@ -10,7 +11,7 @@ const SVGGraph = SVGDiagramWASM.SVGGraph;
10
11
 
11
12
  SVGNode.SHAPE_NONE = SVGDiagramWASM.NODE_SHAPE_NONE;
12
13
  SVGNode.SHAPE_CIRCLE = SVGDiagramWASM.NODE_SHAPE_CIRCLE;
13
- SVGNode.SHAPE_DOUBLE_CIRCLE = SVGDiagramWASM.NODE_DOUBLE_CIRCLE;
14
+ SVGNode.SHAPE_DOUBLE_CIRCLE = SVGDiagramWASM.NODE_SHAPE_DOUBLE_CIRCLE;
14
15
  SVGNode.SHAPE_RECT = SVGDiagramWASM.NODE_SHAPE_RECT;
15
16
  SVGNode.SHAPE_ELLIPSE = SVGDiagramWASM.NODE_SHAPE_ELLIPSE;
16
17
 
@@ -25,4 +26,4 @@ SVGDiagram.prototype.toSVG = async function(file_path) {
25
26
  await writeFile(file_path, this.render());
26
27
  };
27
28
 
28
- export { SVGDiagram, SVGNode, SVGEdge, SVGGraph };
29
+ export { _compareSVG, SVGDiagram, SVGNode, SVGEdge, SVGGraph };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sp-svg-diagram",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "scripts": {
19
19
  "build": "bash build.sh",
20
- "lint": "npx eslint demo index.js test/*.js",
21
- "test": "mocha"
20
+ "lint": "npx eslint demo index.js test/**/*.js",
21
+ "test": "mocha test/**/*.js"
22
22
  }
23
23
  }
@@ -2246,6 +2246,32 @@ async function createWasm() {
2246
2246
 
2247
2247
 
2248
2248
 
2249
+
2250
+
2251
+
2252
+
2253
+ var __embind_register_function = (name, argCount, rawArgTypesAddr, signature, rawInvoker, fn, isAsync, isNonnullReturn) => {
2254
+ var argTypes = heap32VectorToArray(argCount, rawArgTypesAddr);
2255
+ name = AsciiToString(name);
2256
+ name = getFunctionName(name);
2257
+
2258
+ rawInvoker = embind__requireFunction(signature, rawInvoker, isAsync);
2259
+
2260
+ exposePublicSymbol(name, function() {
2261
+ throwUnboundTypeError(`Cannot call ${name} due to unbound types`, argTypes);
2262
+ }, argCount - 1);
2263
+
2264
+ whenDependentTypesAreResolved([], argTypes, (argTypes) => {
2265
+ var invokerArgsArray = [argTypes[0] /* return value */, null /* no class 'this'*/].concat(argTypes.slice(1) /* actual params */);
2266
+ replacePublicSymbol(name, craftInvokerFunction(name, invokerArgsArray, null /* no class 'this'*/, rawInvoker, fn, isAsync), argCount - 1);
2267
+ return [];
2268
+ });
2269
+ };
2270
+
2271
+
2272
+
2273
+
2274
+
2249
2275
  /** @suppress {globalThis} */
2250
2276
  var __embind_register_integer = (primitiveType, name, size, minRange, maxRange) => {
2251
2277
  name = AsciiToString(name);
@@ -3660,6 +3686,8 @@ var wasmImports = {
3660
3686
  /** @export */
3661
3687
  _embind_register_float: __embind_register_float,
3662
3688
  /** @export */
3689
+ _embind_register_function: __embind_register_function,
3690
+ /** @export */
3663
3691
  _embind_register_integer: __embind_register_integer,
3664
3692
  /** @export */
3665
3693
  _embind_register_memory_view: __embind_register_memory_view,
Binary file