@flowconsole/web 0.0.0-beta-20260127184843

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.
Files changed (53) hide show
  1. package/LICENSE +202 -0
  2. package/dist/_.contribution-CNMVP3ek.js +124160 -0
  3. package/dist/components/ArchitectureDiagram.d.ts +16 -0
  4. package/dist/components/FlowConsoleLogo.d.ts +3 -0
  5. package/dist/components/NavigationPanel/NavigationPanel.d.ts +29 -0
  6. package/dist/components/NavigationPanel/NavigationPanelControls.d.ts +22 -0
  7. package/dist/components/NavigationPanel/NavigationPanelDropdown.d.ts +15 -0
  8. package/dist/components/NavigationPanel/SearchOverlay.d.ts +11 -0
  9. package/dist/components/NavigationPanel/index.d.ts +2 -0
  10. package/dist/components/VerticalSplit.d.ts +15 -0
  11. package/dist/components/Workbench/CodeDiagramWorkbench.d.ts +7 -0
  12. package/dist/components/ui/index.d.ts +92 -0
  13. package/dist/csharp-BQi3szM0.js +326 -0
  14. package/dist/csharp.contribution-Er9Y3QJk.js +7 -0
  15. package/dist/diagram/graphvizLayoutService.d.ts +2 -0
  16. package/dist/diagram/registry.d.ts +3 -0
  17. package/dist/diagram/theme.d.ts +9 -0
  18. package/dist/diagram/types.d.ts +89 -0
  19. package/dist/diagram/utils/scopedModel.d.ts +3 -0
  20. package/dist/flowconsole-web.css +1 -0
  21. package/dist/flowconsole-web.js +5184 -0
  22. package/dist/flowconsole-web.umd.cjs +1110 -0
  23. package/dist/go-D1-I258M.js +218 -0
  24. package/dist/go.contribution-D2SBTWls.js +7 -0
  25. package/dist/hooks/hooks.d.ts +24 -0
  26. package/dist/index.d.ts +9 -0
  27. package/dist/java-OBvaP_SS.js +232 -0
  28. package/dist/java.contribution-BVkCm4-Q.js +8 -0
  29. package/dist/languages/csharp/csharp.d.ts +2 -0
  30. package/dist/languages/go/go.d.ts +2 -0
  31. package/dist/languages/index.d.ts +4 -0
  32. package/dist/languages/java/java.d.ts +2 -0
  33. package/dist/languages/parseResultMapper.d.ts +26 -0
  34. package/dist/languages/python/python.d.ts +2 -0
  35. package/dist/languages/runtime.d.ts +4 -0
  36. package/dist/languages/types.d.ts +25 -0
  37. package/dist/languages/typescript/diagramRuntime.d.ts +93 -0
  38. package/dist/languages/typescript/evaluateDiagramCode.d.ts +2 -0
  39. package/dist/languages/typescript/modelToReactflowMapper.d.ts +3 -0
  40. package/dist/languages/typescript/samples.d.ts +4 -0
  41. package/dist/languages/typescript/typescript.d.ts +2 -0
  42. package/dist/python-CRr7iztI.js +294 -0
  43. package/dist/python.contribution-DDUpm_jJ.js +8 -0
  44. package/dist/reactflow/edges/FloatingConnectionLine.d.ts +13 -0
  45. package/dist/reactflow/edges/RelationshipEdge.d.ts +13 -0
  46. package/dist/reactflow/nodes/ContainerNode.d.ts +3 -0
  47. package/dist/reactflow/nodes/ElementNode.d.ts +3 -0
  48. package/dist/reactflow/nodes/HiddenHandles.d.ts +1 -0
  49. package/dist/reactflow/utils/floating.d.ts +24 -0
  50. package/dist/theme/ThemeProvider.d.ts +13 -0
  51. package/dist/types/theme.d.ts +5 -0
  52. package/dist/vite.config.d.ts +2 -0
  53. package/package.json +94 -0
@@ -0,0 +1,2 @@
1
+ import { LanguageDefinition } from '../types';
2
+ export declare const typescriptLanguage: LanguageDefinition;
@@ -0,0 +1,294 @@
1
+ import { l as e } from "./_.contribution-CNMVP3ek.js";
2
+ const t = {
3
+ comments: {
4
+ lineComment: "#",
5
+ blockComment: ["'''", "'''"]
6
+ },
7
+ brackets: [
8
+ ["{", "}"],
9
+ ["[", "]"],
10
+ ["(", ")"]
11
+ ],
12
+ autoClosingPairs: [
13
+ { open: "{", close: "}" },
14
+ { open: "[", close: "]" },
15
+ { open: "(", close: ")" },
16
+ { open: '"', close: '"', notIn: ["string"] },
17
+ { open: "'", close: "'", notIn: ["string", "comment"] }
18
+ ],
19
+ surroundingPairs: [
20
+ { open: "{", close: "}" },
21
+ { open: "[", close: "]" },
22
+ { open: "(", close: ")" },
23
+ { open: '"', close: '"' },
24
+ { open: "'", close: "'" }
25
+ ],
26
+ onEnterRules: [
27
+ {
28
+ beforeText: new RegExp(
29
+ "^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"
30
+ ),
31
+ action: { indentAction: e.IndentAction.Indent }
32
+ }
33
+ ],
34
+ folding: {
35
+ offSide: !0,
36
+ markers: {
37
+ start: new RegExp("^\\s*#region\\b"),
38
+ end: new RegExp("^\\s*#endregion\\b")
39
+ }
40
+ }
41
+ }, s = {
42
+ defaultToken: "",
43
+ tokenPostfix: ".python",
44
+ keywords: [
45
+ // This section is the result of running
46
+ // `import keyword; for k in sorted(keyword.kwlist + keyword.softkwlist): print(" '" + k + "',")`
47
+ // in a Python REPL,
48
+ // though note that the output from Python 3 is not a strict superset of the
49
+ // output from Python 2.
50
+ "False",
51
+ // promoted to keyword.kwlist in Python 3
52
+ "None",
53
+ // promoted to keyword.kwlist in Python 3
54
+ "True",
55
+ // promoted to keyword.kwlist in Python 3
56
+ "_",
57
+ // new in Python 3.10
58
+ "and",
59
+ "as",
60
+ "assert",
61
+ "async",
62
+ // new in Python 3
63
+ "await",
64
+ // new in Python 3
65
+ "break",
66
+ "case",
67
+ // new in Python 3.10
68
+ "class",
69
+ "continue",
70
+ "def",
71
+ "del",
72
+ "elif",
73
+ "else",
74
+ "except",
75
+ "exec",
76
+ // Python 2, but not 3.
77
+ "finally",
78
+ "for",
79
+ "from",
80
+ "global",
81
+ "if",
82
+ "import",
83
+ "in",
84
+ "is",
85
+ "lambda",
86
+ "match",
87
+ // new in Python 3.10
88
+ "nonlocal",
89
+ // new in Python 3
90
+ "not",
91
+ "or",
92
+ "pass",
93
+ "print",
94
+ // Python 2, but not 3.
95
+ "raise",
96
+ "return",
97
+ "try",
98
+ "type",
99
+ // new in Python 3.12
100
+ "while",
101
+ "with",
102
+ "yield",
103
+ "int",
104
+ "float",
105
+ "long",
106
+ "complex",
107
+ "hex",
108
+ "abs",
109
+ "all",
110
+ "any",
111
+ "apply",
112
+ "basestring",
113
+ "bin",
114
+ "bool",
115
+ "buffer",
116
+ "bytearray",
117
+ "callable",
118
+ "chr",
119
+ "classmethod",
120
+ "cmp",
121
+ "coerce",
122
+ "compile",
123
+ "complex",
124
+ "delattr",
125
+ "dict",
126
+ "dir",
127
+ "divmod",
128
+ "enumerate",
129
+ "eval",
130
+ "execfile",
131
+ "file",
132
+ "filter",
133
+ "format",
134
+ "frozenset",
135
+ "getattr",
136
+ "globals",
137
+ "hasattr",
138
+ "hash",
139
+ "help",
140
+ "id",
141
+ "input",
142
+ "intern",
143
+ "isinstance",
144
+ "issubclass",
145
+ "iter",
146
+ "len",
147
+ "locals",
148
+ "list",
149
+ "map",
150
+ "max",
151
+ "memoryview",
152
+ "min",
153
+ "next",
154
+ "object",
155
+ "oct",
156
+ "open",
157
+ "ord",
158
+ "pow",
159
+ "print",
160
+ "property",
161
+ "reversed",
162
+ "range",
163
+ "raw_input",
164
+ "reduce",
165
+ "reload",
166
+ "repr",
167
+ "reversed",
168
+ "round",
169
+ "self",
170
+ "set",
171
+ "setattr",
172
+ "slice",
173
+ "sorted",
174
+ "staticmethod",
175
+ "str",
176
+ "sum",
177
+ "super",
178
+ "tuple",
179
+ "type",
180
+ "unichr",
181
+ "unicode",
182
+ "vars",
183
+ "xrange",
184
+ "zip",
185
+ "__dict__",
186
+ "__methods__",
187
+ "__members__",
188
+ "__class__",
189
+ "__bases__",
190
+ "__name__",
191
+ "__mro__",
192
+ "__subclasses__",
193
+ "__init__",
194
+ "__import__"
195
+ ],
196
+ brackets: [
197
+ { open: "{", close: "}", token: "delimiter.curly" },
198
+ { open: "[", close: "]", token: "delimiter.bracket" },
199
+ { open: "(", close: ")", token: "delimiter.parenthesis" }
200
+ ],
201
+ tokenizer: {
202
+ root: [
203
+ { include: "@whitespace" },
204
+ { include: "@numbers" },
205
+ { include: "@strings" },
206
+ [/[,:;]/, "delimiter"],
207
+ [/[{}\[\]()]/, "@brackets"],
208
+ [/@[a-zA-Z_]\w*/, "tag"],
209
+ [
210
+ /[a-zA-Z_]\w*/,
211
+ {
212
+ cases: {
213
+ "@keywords": "keyword",
214
+ "@default": "identifier"
215
+ }
216
+ }
217
+ ]
218
+ ],
219
+ // Deal with white space, including single and multi-line comments
220
+ whitespace: [
221
+ [/\s+/, "white"],
222
+ [/(^#.*$)/, "comment"],
223
+ [/'''/, "string", "@endDocString"],
224
+ [/"""/, "string", "@endDblDocString"]
225
+ ],
226
+ endDocString: [
227
+ [/[^']+/, "string"],
228
+ [/\\'/, "string"],
229
+ [/'''/, "string", "@popall"],
230
+ [/'/, "string"]
231
+ ],
232
+ endDblDocString: [
233
+ [/[^"]+/, "string"],
234
+ [/\\"/, "string"],
235
+ [/"""/, "string", "@popall"],
236
+ [/"/, "string"]
237
+ ],
238
+ // Recognize hex, negatives, decimals, imaginaries, longs, and scientific notation
239
+ numbers: [
240
+ [/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/, "number.hex"],
241
+ [/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/, "number"]
242
+ ],
243
+ // Recognize strings, including those broken across lines with \ (but not without)
244
+ strings: [
245
+ [/'$/, "string.escape", "@popall"],
246
+ [/f'{1,3}/, "string.escape", "@fStringBody"],
247
+ [/'/, "string.escape", "@stringBody"],
248
+ [/"$/, "string.escape", "@popall"],
249
+ [/f"{1,3}/, "string.escape", "@fDblStringBody"],
250
+ [/"/, "string.escape", "@dblStringBody"]
251
+ ],
252
+ fStringBody: [
253
+ [/[^\\'\{\}]+$/, "string", "@popall"],
254
+ [/[^\\'\{\}]+/, "string"],
255
+ [/\{[^\}':!=]+/, "identifier", "@fStringDetail"],
256
+ [/\\./, "string"],
257
+ [/'/, "string.escape", "@popall"],
258
+ [/\\$/, "string"]
259
+ ],
260
+ stringBody: [
261
+ [/[^\\']+$/, "string", "@popall"],
262
+ [/[^\\']+/, "string"],
263
+ [/\\./, "string"],
264
+ [/'/, "string.escape", "@popall"],
265
+ [/\\$/, "string"]
266
+ ],
267
+ fDblStringBody: [
268
+ [/[^\\"\{\}]+$/, "string", "@popall"],
269
+ [/[^\\"\{\}]+/, "string"],
270
+ [/\{[^\}':!=]+/, "identifier", "@fStringDetail"],
271
+ [/\\./, "string"],
272
+ [/"/, "string.escape", "@popall"],
273
+ [/\\$/, "string"]
274
+ ],
275
+ dblStringBody: [
276
+ [/[^\\"]+$/, "string", "@popall"],
277
+ [/[^\\"]+/, "string"],
278
+ [/\\./, "string"],
279
+ [/"/, "string.escape", "@popall"],
280
+ [/\\$/, "string"]
281
+ ],
282
+ fStringDetail: [
283
+ [/[:][^}]+/, "string"],
284
+ [/[!][ars]/, "string"],
285
+ // only !a, !r, !s are supported by f-strings: https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals
286
+ [/=/, "string"],
287
+ [/\}/, "identifier", "@pop"]
288
+ ]
289
+ }
290
+ };
291
+ export {
292
+ t as conf,
293
+ s as language
294
+ };
@@ -0,0 +1,8 @@
1
+ import { r as p } from "./_.contribution-CNMVP3ek.js";
2
+ p({
3
+ id: "python",
4
+ extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
5
+ aliases: ["Python", "py"],
6
+ firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
7
+ loader: () => import("./python-CRr7iztI.js")
8
+ });
@@ -0,0 +1,13 @@
1
+ import { Position, Node } from '@xyflow/react';
2
+ type FloatingConnectionLineProps = {
3
+ fromX: number;
4
+ fromY: number;
5
+ fromPosition: Position;
6
+ toX: number;
7
+ toY: number;
8
+ toPosition: Position;
9
+ fromNode?: Node | null;
10
+ toNode?: Node | null;
11
+ };
12
+ export declare function FloatingConnectionLine(props: FloatingConnectionLineProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Position, useInternalNode, EdgeProps } from '@xyflow/react';
2
+ import { RelationshipEdgeType } from '../../diagram/types';
3
+ type InternalNodeInstance = NonNullable<ReturnType<typeof useInternalNode>>;
4
+ export declare function getEdgeParams(source: InternalNodeInstance, target: InternalNodeInstance): {
5
+ sx: number;
6
+ sy: number;
7
+ tx: number;
8
+ ty: number;
9
+ sourcePos: Position;
10
+ targetPos: Position;
11
+ };
12
+ export declare function RelationshipEdge(props: EdgeProps<RelationshipEdgeType>): import("react/jsx-runtime").JSX.Element | null;
13
+ export {};
@@ -0,0 +1,3 @@
1
+ import { NodeProps } from '@xyflow/react';
2
+ import { ContainerNodeType } from '../../diagram/types';
3
+ export declare function ContainerNode({ id, data, selected }: NodeProps<ContainerNodeType>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { NodeProps } from '@xyflow/react';
2
+ import { ElementNodeType } from '../../diagram/types';
3
+ export declare function ElementNode({ data, selected }: NodeProps<ElementNodeType>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function HiddenHandles(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { Position, Node } from '@xyflow/react';
2
+ type InternalNode = Node & {
3
+ positionAbsolute?: {
4
+ x: number;
5
+ y: number;
6
+ };
7
+ measured?: {
8
+ width?: number;
9
+ height?: number;
10
+ };
11
+ };
12
+ export declare function getFloatingParams(sourceNode?: InternalNode | null, targetNode?: InternalNode | null): {
13
+ source: {
14
+ x: number;
15
+ y: number;
16
+ position: Position;
17
+ };
18
+ target: {
19
+ x: number;
20
+ y: number;
21
+ position: Position;
22
+ };
23
+ } | null;
24
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ type Scheme = 'light' | 'dark' | 'auto';
3
+ type ThemeContextValue = {
4
+ scheme: Scheme;
5
+ resolvedScheme: 'light' | 'dark';
6
+ setScheme: (scheme: Scheme) => void;
7
+ toggleScheme: (next?: Scheme) => void;
8
+ };
9
+ export declare function useTheme(): ThemeContextValue;
10
+ export declare function ThemeProvider({ children }: {
11
+ children: ReactNode;
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,5 @@
1
+ export type ThemeControls = {
2
+ scheme: 'light' | 'dark' | 'auto';
3
+ resolvedScheme: 'light' | 'dark';
4
+ toggleScheme: (next?: ThemeControls['scheme']) => void;
5
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vite').UserConfig;
2
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "@flowconsole/web",
3
+ "private": false,
4
+ "version": "0.0.0-beta-20260127184843",
5
+ "type": "module",
6
+ "license": "Apache-2.0",
7
+ "description": "FlowConsole React components for architecture diagrams",
8
+ "main": "dist/flowconsole-web.umd.cjs",
9
+ "module": "dist/flowconsole-web.js",
10
+ "types": "dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/flowconsole-web.js",
15
+ "require": "./dist/flowconsole-web.umd.cjs"
16
+ },
17
+ "./style.css": "./dist/style.css"
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "sideEffects": [
23
+ "**/*.css"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "dependencies": {
29
+ "@react-hookz/web": "^25.1.1",
30
+ "@tabler/icons-react": "^3.35.0",
31
+ "d3-shape": "^3.2.0",
32
+ "fast-equals": "^5.3.2",
33
+ "graphviz-wasm": "^3.0.2",
34
+ "monaco-editor": "^0.55.1",
35
+ "remeda": "^2.32.0",
36
+ "type-fest": "^5.1.0",
37
+ "@flowconsole/sdk": "0.0.0-beta-20260127184843"
38
+ },
39
+ "peerDependencies": {
40
+ "react": ">=18.0.0",
41
+ "react-dom": ">=18.0.0",
42
+ "@xyflow/react": ">=12.0.0",
43
+ "@xyflow/system": ">=0.0.50",
44
+ "@monaco-editor/react": ">=4.0.0",
45
+ "react-router-dom": ">=7.0.0"
46
+ },
47
+ "devDependencies": {
48
+ "@eslint/js": "^9.36.0",
49
+ "@monaco-editor/react": "^4.7.0",
50
+ "@playwright/test": "^1.56.1",
51
+ "@testing-library/jest-dom": "^6.9.1",
52
+ "@testing-library/react": "^16.3.0",
53
+ "@testing-library/user-event": "^14.6.1",
54
+ "@types/d3-shape": "^3.1.7",
55
+ "@types/node": "^24.6.0",
56
+ "@types/react": "^19.1.16",
57
+ "@types/react-dom": "^19.1.9",
58
+ "@vitejs/plugin-react": "^5.0.4",
59
+ "@vitest/coverage-v8": "^4.0.10",
60
+ "@xyflow/react": "^12.9.2",
61
+ "@xyflow/system": "^0.0.72",
62
+ "eslint": "^9.36.0",
63
+ "eslint-plugin-react-hooks": "^5.2.0",
64
+ "eslint-plugin-react-refresh": "^0.4.22",
65
+ "globals": "^16.4.0",
66
+ "jsdom": "^27.2.0",
67
+ "postcss": "^8.5.6",
68
+ "postcss-simple-vars": "^7.0.1",
69
+ "react": "19.2.1",
70
+ "react-dom": "19.2.1",
71
+ "react-router-dom": "^7.9.5",
72
+ "typescript": "~5.9.3",
73
+ "typescript-eslint": "^8.45.0",
74
+ "vite": "^7.1.7",
75
+ "vite-plugin-dts": "^4.5.4",
76
+ "vitest": "^4.0.10"
77
+ },
78
+ "scripts": {
79
+ "dev": "vite",
80
+ "build": "pnpm run build:web",
81
+ "build:web": "tsc -b && vite build",
82
+ "build:wasm": "bash scripts/dotnet-wasm/build.sh",
83
+ "lint": "eslint .",
84
+ "lint:fix": "eslint . --fix",
85
+ "preview": "vite preview",
86
+ "test": "vitest run --config ../../vitest.config.ts",
87
+ "test:watch": "vitest --config ../../vitest.config.ts",
88
+ "test:unit": "vitest run --config ../../vitest.config.ts",
89
+ "test:coverage": "vitest run --config ../../vitest.config.ts --coverage",
90
+ "test:e2e": "pnpm --dir ../app build && playwright test --config ../../playwright.config.ts",
91
+ "wasm:setup": "bash scripts/dotnet-wasm/install.sh",
92
+ "wasm:clean": "bash scripts/dotnet-wasm/clean.sh"
93
+ }
94
+ }