@vanduo-oss/vd3-flowchart 1.2.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/CHANGELOG.md +11 -0
- package/LICENSE +22 -0
- package/README.md +118 -0
- package/SKILL.md +47 -0
- package/dist/core.d.ts +288 -0
- package/dist/index.cjs +3482 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +3459 -0
- package/dist/index.js.map +7 -0
- package/dist/meta.json +133 -0
- package/dist/vd3-flowchart.css +729 -0
- package/dist/vue.d.ts +66 -0
- package/package.json +84 -0
package/dist/vue.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { DefineComponent } from 'vue';
|
|
2
|
+
import type {
|
|
3
|
+
FlowchartDocument,
|
|
4
|
+
FlowchartChangeEvent,
|
|
5
|
+
FlowchartSelectEvent,
|
|
6
|
+
FlowchartViewportEvent,
|
|
7
|
+
FlowchartConnectEvent,
|
|
8
|
+
VdFlowchart as VdFlowchartCore,
|
|
9
|
+
LayoutMode,
|
|
10
|
+
LayoutOptions,
|
|
11
|
+
} from './core';
|
|
12
|
+
|
|
13
|
+
/** Loosely-typed document accepted by the `data` prop. */
|
|
14
|
+
export interface VdFlowchartDocument extends Partial<FlowchartDocument> {
|
|
15
|
+
nodes?: Array<Record<string, unknown>>;
|
|
16
|
+
edges?: Array<Record<string, unknown>>;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface VdFlowchartProps {
|
|
21
|
+
/** Flowchart document ({ nodes, edges }). */
|
|
22
|
+
data?: VdFlowchartDocument;
|
|
23
|
+
/** Render as a non-editable viewer. */
|
|
24
|
+
readonly?: boolean;
|
|
25
|
+
/** Background grid size in px. */
|
|
26
|
+
gridSize?: number;
|
|
27
|
+
/** Keep the current selection across data-driven reloads when possible. */
|
|
28
|
+
preserveSelection?: boolean;
|
|
29
|
+
/** Fit the view to content once the editor reports a measurable size. */
|
|
30
|
+
autoFit?: boolean;
|
|
31
|
+
/** Enable the built-in undo/redo history (default true). */
|
|
32
|
+
history?: boolean;
|
|
33
|
+
/** Maximum number of history entries to retain. */
|
|
34
|
+
historyLimit?: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface VdFlowchartEmits {
|
|
38
|
+
(event: 'change', payload: FlowchartChangeEvent): void;
|
|
39
|
+
(event: 'select', payload: FlowchartSelectEvent): void;
|
|
40
|
+
(event: 'viewport', payload: FlowchartViewportEvent): void;
|
|
41
|
+
(event: 'connect', payload: FlowchartConnectEvent): void;
|
|
42
|
+
(event: 'ready', instance: VdFlowchartCore): void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Methods exposed via a template ref. */
|
|
46
|
+
export interface VdFlowchartExposed {
|
|
47
|
+
getInstance(): VdFlowchartCore | null;
|
|
48
|
+
undo(): void;
|
|
49
|
+
redo(): void;
|
|
50
|
+
canUndo(): boolean;
|
|
51
|
+
canRedo(): boolean;
|
|
52
|
+
layout(mode?: LayoutMode, options?: LayoutOptions): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* eslint-disable @typescript-eslint/no-empty-object-type -- DefineComponent filler params */
|
|
56
|
+
export declare const VdFlowchart: DefineComponent<
|
|
57
|
+
VdFlowchartProps,
|
|
58
|
+
VdFlowchartExposed,
|
|
59
|
+
{},
|
|
60
|
+
{},
|
|
61
|
+
{},
|
|
62
|
+
{},
|
|
63
|
+
{},
|
|
64
|
+
VdFlowchartEmits
|
|
65
|
+
>;
|
|
66
|
+
/* eslint-enable @typescript-eslint/no-empty-object-type */
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vanduo-oss/vd3-flowchart",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Vanduo Vue 3 flowchart editor — nodes, edges, layout, undo/redo, and a framework-agnostic core",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "vanduo-oss",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/vanduo-oss/vd3-flowchart#readme",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/vanduo-oss/vd3-flowchart.git"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/vanduo-oss/vd3-flowchart/issues"
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"**/*.css"
|
|
21
|
+
],
|
|
22
|
+
"main": "./dist/index.cjs",
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"require": "./dist/index.cjs"
|
|
30
|
+
},
|
|
31
|
+
"./css": "./dist/vd3-flowchart.css",
|
|
32
|
+
"./package.json": "./package.json"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"README.md",
|
|
37
|
+
"SKILL.md",
|
|
38
|
+
"CHANGELOG.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"keywords": [
|
|
42
|
+
"vanduo",
|
|
43
|
+
"vue",
|
|
44
|
+
"flowchart",
|
|
45
|
+
"diagram",
|
|
46
|
+
"editor",
|
|
47
|
+
"svg"
|
|
48
|
+
],
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"vue": ">=3.3.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@eslint/js": "10.0.1",
|
|
54
|
+
"@playwright/test": "1.63.0",
|
|
55
|
+
"@typescript-eslint/parser": "8.69.0",
|
|
56
|
+
"@vue/test-utils": "2.5.0",
|
|
57
|
+
"esbuild": "0.28.2",
|
|
58
|
+
"eslint": "10.10.0",
|
|
59
|
+
"jsdom": "29.1.1",
|
|
60
|
+
"prettier": "3.9.6",
|
|
61
|
+
"stylelint": "17.15.0",
|
|
62
|
+
"stylelint-config-standard": "40.0.0",
|
|
63
|
+
"typescript": "6.0.3",
|
|
64
|
+
"typescript-eslint": "8.69.0",
|
|
65
|
+
"vitest": "4.1.11",
|
|
66
|
+
"vue": "3.5.42"
|
|
67
|
+
},
|
|
68
|
+
"engines": {
|
|
69
|
+
"node": ">=20.19.0",
|
|
70
|
+
"pnpm": ">=10"
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "node scripts/build.js",
|
|
74
|
+
"clean": "rm -rf dist",
|
|
75
|
+
"lint": "eslint .",
|
|
76
|
+
"format": "prettier --write \"src/**/*.{js,ts}\" \"scripts/**/*.js\" \"tests/**/*.{js,ts}\"",
|
|
77
|
+
"format:check": "prettier --check \"src/**/*.{js,ts}\" \"scripts/**/*.js\" \"tests/**/*.{js,ts}\"",
|
|
78
|
+
"stylelint": "stylelint \"src/**/*.css\"",
|
|
79
|
+
"test": "vitest run",
|
|
80
|
+
"test:types": "tsc --noEmit -p tests/types/tsconfig.json",
|
|
81
|
+
"test:e2e": "playwright test",
|
|
82
|
+
"release": "pnpm run build && pnpm publish"
|
|
83
|
+
}
|
|
84
|
+
}
|