@bian-womp/spark-workbench 0.2.90 → 0.2.91
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/lib/cjs/index.cjs +114 -66
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/src/misc/DefaultNodeHeader.d.ts +1 -2
- package/lib/cjs/src/misc/DefaultNodeHeader.d.ts.map +1 -1
- package/lib/cjs/src/misc/thumbnail-utils.d.ts +34 -2
- package/lib/cjs/src/misc/thumbnail-utils.d.ts.map +1 -1
- package/lib/esm/index.js +114 -66
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/src/misc/DefaultNodeHeader.d.ts +1 -2
- package/lib/esm/src/misc/DefaultNodeHeader.d.ts.map +1 -1
- package/lib/esm/src/misc/thumbnail-utils.d.ts +34 -2
- package/lib/esm/src/misc/thumbnail-utils.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare function DefaultNodeHeader({ id, typeId,
|
|
2
|
+
export declare function DefaultNodeHeader({ id, typeId, validation, right, showId, onInvalidate, }: {
|
|
3
3
|
id: string;
|
|
4
4
|
typeId?: string;
|
|
5
|
-
title?: string;
|
|
6
5
|
validation: {
|
|
7
6
|
inputs?: any[];
|
|
8
7
|
outputs?: any[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultNodeHeader.d.ts","sourceRoot":"","sources":["../../../../src/misc/DefaultNodeHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,wBAAgB,iBAAiB,CAAC,EAChC,EAAE,EACF,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"DefaultNodeHeader.d.ts","sourceRoot":"","sources":["../../../../src/misc/DefaultNodeHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,wBAAgB,iBAAiB,CAAC,EAChC,EAAE,EACF,MAAM,EACN,UAAU,EACV,KAAK,EACL,MAAM,EACN,YAAY,GACb,EAAE;IACD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE;QAAE,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;QAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAA;KAAE,CAAC;IAChE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B,2CAgJA"}
|
|
@@ -2,16 +2,48 @@
|
|
|
2
2
|
* Flow thumbnail capture utility
|
|
3
3
|
* Captures React Flow canvas as SVG image
|
|
4
4
|
*/
|
|
5
|
+
export interface ThumbnailOptions {
|
|
6
|
+
/**
|
|
7
|
+
* If true, export the whole graph instead of just the viewport. Default: true
|
|
8
|
+
*/
|
|
9
|
+
ignoreViewport?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Padding to add when exporting whole graph (in pixels). Default: 40
|
|
12
|
+
*/
|
|
13
|
+
padding?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Whether to export handles. Default: true
|
|
16
|
+
*/
|
|
17
|
+
exportHandles?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to export node titles. Default: true
|
|
20
|
+
*/
|
|
21
|
+
exportNodeTitle?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to export background dot pattern. Default: true
|
|
24
|
+
*/
|
|
25
|
+
exportBackgroundPattern?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Background color of nodes. Default: "#f3f4f6"
|
|
28
|
+
*/
|
|
29
|
+
nodeBackgroundColor?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Color of background dot pattern. Default: "#f1f1f1"
|
|
32
|
+
*/
|
|
33
|
+
backgroundPatternColor?: string;
|
|
34
|
+
}
|
|
5
35
|
/**
|
|
6
36
|
* Captures a React Flow container element as an SVG image and returns data URL
|
|
7
37
|
* @param containerElement - The React Flow container DOM element
|
|
38
|
+
* @param options - Options for thumbnail capture
|
|
8
39
|
* @returns Promise resolving to SVG data URL string, or null if capture fails
|
|
9
40
|
*/
|
|
10
|
-
export declare function captureCanvasThumbnail(containerElement: HTMLElement | null): Promise<string | null>;
|
|
41
|
+
export declare function captureCanvasThumbnail(containerElement: HTMLElement | null, options?: ThumbnailOptions): Promise<string | null>;
|
|
11
42
|
/**
|
|
12
43
|
* Captures a React Flow container element as an SVG image and downloads it
|
|
13
44
|
* @param containerElement - The React Flow container DOM element
|
|
45
|
+
* @param options - Options for thumbnail capture
|
|
14
46
|
* @returns Promise resolving to true if successful, false otherwise
|
|
15
47
|
*/
|
|
16
|
-
export declare function downloadCanvasThumbnail(containerElement: HTMLElement | null): Promise<boolean>;
|
|
48
|
+
export declare function downloadCanvasThumbnail(containerElement: HTMLElement | null, options?: ThumbnailOptions): Promise<boolean>;
|
|
17
49
|
//# sourceMappingURL=thumbnail-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thumbnail-utils.d.ts","sourceRoot":"","sources":["../../../../src/misc/thumbnail-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"thumbnail-utils.d.ts","sourceRoot":"","sources":["../../../../src/misc/thumbnail-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2DH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AA6rBD;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,gBAAgB,EAAE,WAAW,GAAG,IAAI,EACpC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAwIxB;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,gBAAgB,EAAE,WAAW,GAAG,IAAI,EACpC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,OAAO,CAAC,CAoBlB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bian-womp/spark-workbench",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.91",
|
|
4
4
|
"description": "Spark Workbench - Visual graph editor and runtime for Spark graphs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"react-dom": "^18.2.0"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@bian-womp/spark-graph": "^0.2.
|
|
60
|
-
"@bian-womp/spark-protocol": "^0.2.
|
|
61
|
-
"@bian-womp/spark-remote": "^0.2.
|
|
59
|
+
"@bian-womp/spark-graph": "^0.2.91",
|
|
60
|
+
"@bian-womp/spark-protocol": "^0.2.91",
|
|
61
|
+
"@bian-womp/spark-remote": "^0.2.91",
|
|
62
62
|
"lodash": "^4.17.21"
|
|
63
63
|
}
|
|
64
64
|
}
|