@dskripchenko/flow 0.0.0-stage → 1.0.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 +66 -0
- package/LICENSE +21 -0
- package/README.md +87 -2
- package/dist/core-DfJMfClV.js +4121 -0
- package/dist/core-dyjNI9N1.cjs +4522 -0
- package/dist/index.cjs +69 -0
- package/dist/index.d.ts +767 -0
- package/dist/index.mjs +1 -0
- package/dist/mermaid.cjs +222 -0
- package/dist/mermaid.d.ts +107 -0
- package/dist/mermaid.mjs +220 -0
- package/dist/standalone.css +2 -0
- package/dist/standalone.js +14 -0
- package/dist/style.css +1131 -0
- package/dist/vue.cjs +5836 -0
- package/dist/vue.d.ts +1039 -0
- package/dist/vue.mjs +5823 -0
- package/package.json +122 -4
- package/schema/graph.schema.json +95 -0
- package/schema/snapshot.schema.json +35 -0
package/package.json
CHANGED
|
@@ -1,6 +1,124 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dskripchenko/flow",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Process and state-machine graphs: a zero-dependency TypeScript core (model, validation, layered layout, monitoring state, polling, undoable editing commands) and Vue components on @dskripchenko/ui — viewer, live monitoring overlay, drill-down and a visual editor",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"flow",
|
|
7
|
+
"state-machine",
|
|
8
|
+
"workflow",
|
|
9
|
+
"process",
|
|
10
|
+
"bpm",
|
|
11
|
+
"graph",
|
|
12
|
+
"diagram-editor",
|
|
13
|
+
"node-editor",
|
|
14
|
+
"monitoring",
|
|
15
|
+
"sugiyama",
|
|
16
|
+
"svg",
|
|
17
|
+
"vue",
|
|
18
|
+
"zero-dependency"
|
|
19
|
+
],
|
|
20
|
+
"homepage": "https://github.com/dskripchenko/flow#readme",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/dskripchenko/flow.git"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/dskripchenko/flow/issues"
|
|
27
|
+
},
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"author": "Denis Skripchenko (https://github.com/dskripchenko)",
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=20"
|
|
32
|
+
},
|
|
33
|
+
"packageManager": "pnpm@10.28.0",
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"type": "module",
|
|
38
|
+
"main": "./dist/index.cjs",
|
|
39
|
+
"module": "./dist/index.mjs",
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"exports": {
|
|
42
|
+
".": {
|
|
43
|
+
"types": "./dist/index.d.ts",
|
|
44
|
+
"import": "./dist/index.mjs",
|
|
45
|
+
"require": "./dist/index.cjs"
|
|
46
|
+
},
|
|
47
|
+
"./mermaid": {
|
|
48
|
+
"types": "./dist/mermaid.d.ts",
|
|
49
|
+
"import": "./dist/mermaid.mjs",
|
|
50
|
+
"require": "./dist/mermaid.cjs"
|
|
51
|
+
},
|
|
52
|
+
"./vue": {
|
|
53
|
+
"types": "./dist/vue.d.ts",
|
|
54
|
+
"import": "./dist/vue.mjs",
|
|
55
|
+
"require": "./dist/vue.cjs"
|
|
56
|
+
},
|
|
57
|
+
"./style.css": "./dist/style.css",
|
|
58
|
+
"./standalone": "./dist/standalone.js",
|
|
59
|
+
"./standalone.css": "./dist/standalone.css",
|
|
60
|
+
"./schema/graph.schema.json": "./schema/graph.schema.json",
|
|
61
|
+
"./schema/snapshot.schema.json": "./schema/snapshot.schema.json",
|
|
62
|
+
"./package.json": "./package.json"
|
|
63
|
+
},
|
|
64
|
+
"sideEffects": [
|
|
65
|
+
"*.css",
|
|
66
|
+
"./dist/standalone.js"
|
|
67
|
+
],
|
|
68
|
+
"files": [
|
|
69
|
+
"dist",
|
|
70
|
+
"!dist/**/*.map",
|
|
71
|
+
"schema",
|
|
72
|
+
"CHANGELOG.md"
|
|
73
|
+
],
|
|
74
|
+
"scripts": {
|
|
75
|
+
"build": "tsc --noEmit -p tsconfig.build.json && vue-tsc --noEmit -p tsconfig.vue.json && vite build && vite build -c vite.standalone.config.ts",
|
|
76
|
+
"test": "vitest run",
|
|
77
|
+
"test:watch": "vitest",
|
|
78
|
+
"lint": "eslint src tests scripts",
|
|
79
|
+
"typecheck": "tsc --noEmit && vue-tsc --noEmit -p tsconfig.vue.json",
|
|
80
|
+
"changeset": "changeset",
|
|
81
|
+
"release": "pnpm build && changeset publish",
|
|
82
|
+
"check:browser": "node scripts/browser-check.mjs",
|
|
83
|
+
"dev": "vite --config playground/vite.config.ts",
|
|
84
|
+
"prepublishOnly": "pnpm build"
|
|
85
|
+
},
|
|
86
|
+
"peerDependencies": {
|
|
87
|
+
"@dskripchenko/diagrams": "^1.1.0",
|
|
88
|
+
"@dskripchenko/ui": "^1.14.0",
|
|
89
|
+
"vue": "^3.4.0"
|
|
90
|
+
},
|
|
91
|
+
"peerDependenciesMeta": {
|
|
92
|
+
"@dskripchenko/diagrams": {
|
|
93
|
+
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"@dskripchenko/ui": {
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"vue": {
|
|
99
|
+
"optional": true
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"devDependencies": {
|
|
103
|
+
"@changesets/cli": "^3.0.3",
|
|
104
|
+
"@dskripchenko/diagrams": "^1.1.0",
|
|
105
|
+
"@dskripchenko/ui": "^1.14.0",
|
|
106
|
+
"@eslint/js": "^10.0.1",
|
|
107
|
+
"@microsoft/api-extractor": "^7.59.4",
|
|
108
|
+
"@types/node": "^22.20.5",
|
|
109
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
110
|
+
"@vue/test-utils": "^2.5.1",
|
|
111
|
+
"eslint": "^10.13.0",
|
|
112
|
+
"eslint-plugin-vue": "^10.11.1",
|
|
113
|
+
"jsdom": "^29.1.1",
|
|
114
|
+
"playwright": "1.64.1",
|
|
115
|
+
"prettier": "^3.9.10",
|
|
116
|
+
"typescript": "^6.0.3",
|
|
117
|
+
"typescript-eslint": "^8.72.0",
|
|
118
|
+
"vite": "^8.3.5",
|
|
119
|
+
"vite-plugin-dts": "^5.1.2",
|
|
120
|
+
"vitest": "^5.0.5",
|
|
121
|
+
"vue": "^3.5.44",
|
|
122
|
+
"vue-tsc": "^3.3.13"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://unpkg.com/@dskripchenko/flow/schema/graph.schema.json",
|
|
4
|
+
"title": "@dskripchenko/flow model, version 1",
|
|
5
|
+
"description": "A process or state machine: nodes, edges and groups. Positions are optional (nodes without one are laid out automatically). Ids are unique across nodes, edges and groups.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["nodes"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": { "const": 1, "description": "The model format; 1 when missing." },
|
|
10
|
+
"nodes": { "type": "array", "items": { "$ref": "#/$defs/node" } },
|
|
11
|
+
"edges": { "type": "array", "items": { "$ref": "#/$defs/edge" }, "default": [] },
|
|
12
|
+
"groups": { "type": "array", "items": { "$ref": "#/$defs/group" } },
|
|
13
|
+
"meta": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"title": { "type": "string" },
|
|
17
|
+
"direction": { "enum": ["TB", "LR"], "description": "Auto-layout direction; follows the screen shape when missing." }
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": { "$ref": "#/$defs/value" }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"$defs": {
|
|
23
|
+
"id": { "type": "string", "minLength": 1 },
|
|
24
|
+
"point": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": ["x", "y"],
|
|
27
|
+
"properties": { "x": { "type": "number" }, "y": { "type": "number" } },
|
|
28
|
+
"description": "The node's centre in graph units."
|
|
29
|
+
},
|
|
30
|
+
"value": {
|
|
31
|
+
"description": "Any JSON value.",
|
|
32
|
+
"type": ["string", "number", "boolean", "null", "array", "object"]
|
|
33
|
+
},
|
|
34
|
+
"data": { "type": "object", "additionalProperties": { "$ref": "#/$defs/value" } },
|
|
35
|
+
"port": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": ["id", "side"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"id": { "$ref": "#/$defs/id" },
|
|
40
|
+
"side": { "enum": ["top", "right", "bottom", "left"] },
|
|
41
|
+
"offset": { "type": "number", "minimum": 0, "maximum": 1, "default": 0.5 },
|
|
42
|
+
"kind": { "enum": ["in", "out", "both"], "default": "both" },
|
|
43
|
+
"label": { "type": "string" }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"node": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": ["id"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"id": { "$ref": "#/$defs/id" },
|
|
51
|
+
"type": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"default": "state",
|
|
54
|
+
"description": "Built in: start, end, state, task, decision, subprocess, note; any other name is a host-registered type."
|
|
55
|
+
},
|
|
56
|
+
"label": { "type": "string" },
|
|
57
|
+
"description": { "type": "string" },
|
|
58
|
+
"position": { "$ref": "#/$defs/point" },
|
|
59
|
+
"group": { "$ref": "#/$defs/id" },
|
|
60
|
+
"data": { "$ref": "#/$defs/data" },
|
|
61
|
+
"enabled": { "type": "boolean", "default": true },
|
|
62
|
+
"subgraph": {
|
|
63
|
+
"description": "An inline graph, or a reference the host resolves (FlowView's `subgraphs` / `loadSubgraph`).",
|
|
64
|
+
"oneOf": [{ "type": "string" }, { "$ref": "#" }]
|
|
65
|
+
},
|
|
66
|
+
"ports": { "type": "array", "items": { "$ref": "#/$defs/port" } }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"edge": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"required": ["id", "from", "to"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"id": { "$ref": "#/$defs/id" },
|
|
74
|
+
"from": { "$ref": "#/$defs/id" },
|
|
75
|
+
"to": { "$ref": "#/$defs/id" },
|
|
76
|
+
"fromPort": { "$ref": "#/$defs/id" },
|
|
77
|
+
"toPort": { "$ref": "#/$defs/id" },
|
|
78
|
+
"label": { "type": "string" },
|
|
79
|
+
"condition": { "type": "string" },
|
|
80
|
+
"enabled": { "type": "boolean", "default": true },
|
|
81
|
+
"kind": { "enum": ["transition", "association"], "default": "transition" },
|
|
82
|
+
"data": { "$ref": "#/$defs/data" }
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"group": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"required": ["id"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"id": { "$ref": "#/$defs/id" },
|
|
90
|
+
"label": { "type": "string" },
|
|
91
|
+
"parent": { "$ref": "#/$defs/id" }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://unpkg.com/@dskripchenko/flow/schema/snapshot.schema.json",
|
|
4
|
+
"title": "@dskripchenko/flow monitoring snapshot",
|
|
5
|
+
"description": "What a monitoring endpoint returns for the graph on screen. Every field is optional; ids refer to the graph's nodes and edges.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"nodes": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"status": { "type": "string", "description": "active, done, error, waiting, skipped, or a host status (drawn neutral unless mapped by statusTones)." },
|
|
14
|
+
"count": { "type": "number", "description": "Instances in or through the node." },
|
|
15
|
+
"badge": { "type": ["string", "number"], "description": "A short corner badge, e.g. an error count." },
|
|
16
|
+
"message": { "type": "string", "description": "Shown in the details panel." },
|
|
17
|
+
"updatedAt": { "type": ["string", "number"], "description": "ISO 8601 or epoch milliseconds." }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"edges": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"count": { "type": "number" },
|
|
27
|
+
"traversed": { "type": "boolean" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"path": { "type": "array", "items": { "type": "string" }, "description": "The current instance's node ids in visiting order." },
|
|
32
|
+
"current": { "type": "array", "items": { "type": "string" }, "description": "Nodes the current instance is in now." },
|
|
33
|
+
"updatedAt": { "type": ["string", "number"], "description": "When the host produced the snapshot." }
|
|
34
|
+
}
|
|
35
|
+
}
|