dishui 0.0.49 → 0.0.50

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 (52) hide show
  1. package/dist/components/pro/Flow/Flow.js +419 -407
  2. package/dist/components/pro/Flow/Flow.js.map +1 -1
  3. package/dist/components/pro/Flow/archify/build.d.ts +74 -0
  4. package/dist/components/pro/Flow/archify/build.js +103 -0
  5. package/dist/components/pro/Flow/archify/build.js.map +1 -0
  6. package/dist/components/pro/Flow/archify/convert.d.ts +14 -0
  7. package/dist/components/pro/Flow/archify/convert.js +534 -0
  8. package/dist/components/pro/Flow/archify/convert.js.map +1 -0
  9. package/dist/components/pro/Flow/archify/index.d.ts +12 -0
  10. package/dist/components/pro/Flow/archify/palette.d.ts +64 -0
  11. package/dist/components/pro/Flow/archify/palette.js +112 -0
  12. package/dist/components/pro/Flow/archify/palette.js.map +1 -0
  13. package/dist/components/pro/Flow/archify/presets.d.ts +26 -0
  14. package/dist/components/pro/Flow/archify/presets.js +43 -0
  15. package/dist/components/pro/Flow/archify/presets.js.map +1 -0
  16. package/dist/components/pro/Flow/archify/spec.d.ts +283 -0
  17. package/dist/components/pro/Flow/archify/spec.js +10 -0
  18. package/dist/components/pro/Flow/archify/spec.js.map +1 -0
  19. package/dist/components/pro/Flow/constants.js +14 -0
  20. package/dist/components/pro/Flow/constants.js.map +1 -1
  21. package/dist/components/pro/Flow/hooks/useClipboard.d.ts +5 -0
  22. package/dist/components/pro/Flow/hooks/useClipboard.js +129 -73
  23. package/dist/components/pro/Flow/hooks/useClipboard.js.map +1 -1
  24. package/dist/components/pro/Flow/hooks/useFlowImportExport.d.ts +1 -0
  25. package/dist/components/pro/Flow/hooks/useFlowImportExport.js +108 -93
  26. package/dist/components/pro/Flow/hooks/useFlowImportExport.js.map +1 -1
  27. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.d.ts +1 -0
  28. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js +7 -7
  29. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js.map +1 -1
  30. package/dist/components/pro/Flow/index.d.ts +2 -0
  31. package/dist/components/pro/Flow/nodes/DataNodeView.d.ts +4 -1
  32. package/dist/components/pro/Flow/nodes/DataNodeView.js +127 -115
  33. package/dist/components/pro/Flow/nodes/DataNodeView.js.map +1 -1
  34. package/dist/components/pro/Flow/nodes/MediaContent.js +72 -67
  35. package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
  36. package/dist/components/pro/Flow/nodes/NodeRenderer.d.ts +5 -0
  37. package/dist/components/pro/Flow/nodes/NodeRenderer.js +216 -115
  38. package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
  39. package/dist/components/pro/Flow/panels/FlowToolbar.js +208 -169
  40. package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
  41. package/dist/components/pro/Flow/panels/InspectorPanel.js +602 -369
  42. package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
  43. package/dist/components/pro/Flow/panels/ShapePalette.js +50 -39
  44. package/dist/components/pro/Flow/panels/ShapePalette.js.map +1 -1
  45. package/dist/components/pro/Flow/panels/toolbarIcons.d.ts +1 -0
  46. package/dist/components/pro/Flow/panels/toolbarIcons.js +36 -8
  47. package/dist/components/pro/Flow/panels/toolbarIcons.js.map +1 -1
  48. package/dist/components/pro/Flow/types.d.ts +30 -0
  49. package/dist/components/pro/Flow/types.js.map +1 -1
  50. package/dist/dishui.css +1 -1
  51. package/dist/flow.js +73 -56
  52. package/package.json +18 -17
@@ -0,0 +1,112 @@
1
+ var d = "#020617", i = "#1e293b", u = "#94a3b8", f = "#64748b", o = "#334155", a = "#64748b", s = "#34d399", n = "#fb7185", e = {
2
+ frontend: {
3
+ fill: "#07222c",
4
+ stroke: "#22d3ee",
5
+ text: "#e6feff",
6
+ sub: "#7bc6d4"
7
+ },
8
+ backend: {
9
+ fill: "#052e26",
10
+ stroke: "#34d399",
11
+ text: "#e7fff5",
12
+ sub: "#79c9ad"
13
+ },
14
+ database: {
15
+ fill: "#1e123a",
16
+ stroke: "#a78bfa",
17
+ text: "#f1ecff",
18
+ sub: "#b4a0e6"
19
+ },
20
+ cloud: {
21
+ fill: "#2a1c0a",
22
+ stroke: "#fbbf24",
23
+ text: "#fff6e2",
24
+ sub: "#d9b878"
25
+ },
26
+ security: {
27
+ fill: "#320d21",
28
+ stroke: "#fb7185",
29
+ text: "#ffe9ef",
30
+ sub: "#e59aab"
31
+ },
32
+ messagebus: {
33
+ fill: "#2a1a0c",
34
+ stroke: "#fb923c",
35
+ text: "#fff1e3",
36
+ sub: "#dcab7f"
37
+ },
38
+ external: {
39
+ fill: "#111a2b",
40
+ stroke: "#94a3b8",
41
+ text: "#eef2f8",
42
+ sub: "#9aa8bd"
43
+ }
44
+ }, l = {
45
+ start: e.frontend,
46
+ active: e.backend,
47
+ waiting: e.cloud,
48
+ decision: e.security,
49
+ success: e.database,
50
+ failure: e.security,
51
+ neutral: e.external,
52
+ external: e.external
53
+ };
54
+ function b(t) {
55
+ return e[t] ?? e.external;
56
+ }
57
+ function S(t) {
58
+ return l[t] ?? l.neutral;
59
+ }
60
+ function c(t, r = 1.75) {
61
+ switch (t) {
62
+ case "emphasis":
63
+ return {
64
+ color: s,
65
+ width: r + 0.75,
66
+ lineStyle: "solid"
67
+ };
68
+ case "security":
69
+ return {
70
+ color: n,
71
+ width: r,
72
+ lineStyle: "dashed"
73
+ };
74
+ case "dashed":
75
+ return {
76
+ color: a,
77
+ width: r,
78
+ lineStyle: "dashed"
79
+ };
80
+ default:
81
+ return {
82
+ color: a,
83
+ width: r,
84
+ lineStyle: "solid"
85
+ };
86
+ }
87
+ }
88
+ function R(t) {
89
+ return t === "return" ? {
90
+ color: f,
91
+ width: 1.5,
92
+ lineStyle: "dashed"
93
+ } : c(t);
94
+ }
95
+ export {
96
+ a as ARCHIFY_ARROW,
97
+ s as ARCHIFY_ARROW_EMPHASIS,
98
+ n as ARCHIFY_ARROW_SECURITY,
99
+ d as ARCHIFY_BG,
100
+ i as ARCHIFY_GRID,
101
+ o as ARCHIFY_LANE_STROKE,
102
+ f as ARCHIFY_TEXT_DIM,
103
+ u as ARCHIFY_TEXT_MUTED,
104
+ e as COMPONENT_STYLES,
105
+ l as STATE_STYLES,
106
+ b as componentStyle,
107
+ R as messageEdgeStyle,
108
+ S as stateStyle,
109
+ c as variantEdgeStyle
110
+ };
111
+
112
+ //# sourceMappingURL=palette.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palette.js","names":[],"sources":["../../../../../src/components/pro/Flow/archify/palette.ts"],"sourcesContent":["/**\n * Archify color palette + styling helpers.\n *\n * Mirrors the `classic` dark theme in archify's `assets/template.html` so an\n * imported spec looks like the reference artifact: dark navy canvas, semantic\n * component cards (frontend/backend/database/cloud/security/messagebus/external),\n * and relationship variants (emphasis = green rail, security = rose dashed,\n * dashed = muted). Lifecycle state kinds are mapped onto the same accents.\n *\n * Colors are stored as literal hex on the produced FlowDocument (not theme\n * tokens) so the imported diagram keeps the archify look regardless of the\n * active DishUI theme.\n */\n\nimport type { ArchifyComponentType, ArchifyStateType, ArchifyVariant } from './spec';\nimport type { FlowEdgeLineStyle } from '../types';\n\n/** The dark canvas backdrop archify uses (`--bg`). */\nexport const ARCHIFY_BG = '#020617';\n/** Grid dot / lane stroke color (`--grid`). */\nexport const ARCHIFY_GRID = '#1e293b';\n\nexport const ARCHIFY_TEXT = '#ffffff';\nexport const ARCHIFY_TEXT_MUTED = '#94a3b8';\nexport const ARCHIFY_TEXT_DIM = '#64748b';\n\nexport const ARCHIFY_LANE_STROKE = '#334155';\nexport const ARCHIFY_LANE_FILL = 'transparent';\n\nexport const ARCHIFY_ARROW = '#64748b';\nexport const ARCHIFY_ARROW_EMPHASIS = '#34d399';\nexport const ARCHIFY_ARROW_SECURITY = '#fb7185';\n\nexport interface SemanticStyle {\n /** Card fill (opaque approximation of archify's translucent fill on #020617). */\n fill: string;\n /** Card border / accent stroke. */\n stroke: string;\n /** Title text color (archify keeps titles near-white). */\n text: string;\n /** Muted sub-label / tag text. */\n sub: string;\n}\n\n/**\n * Semantic component styling. archify fills are translucent over #020617; the\n * hexes below are those fills pre-composited on the dark backdrop so PixiJS can\n * paint them as solid colors while looking identical.\n */\nexport const COMPONENT_STYLES: Record<ArchifyComponentType, SemanticStyle> = {\n frontend: { fill: '#07222c', stroke: '#22d3ee', text: '#e6feff', sub: '#7bc6d4' },\n backend: { fill: '#052e26', stroke: '#34d399', text: '#e7fff5', sub: '#79c9ad' },\n database: { fill: '#1e123a', stroke: '#a78bfa', text: '#f1ecff', sub: '#b4a0e6' },\n cloud: { fill: '#2a1c0a', stroke: '#fbbf24', text: '#fff6e2', sub: '#d9b878' },\n security: { fill: '#320d21', stroke: '#fb7185', text: '#ffe9ef', sub: '#e59aab' },\n messagebus: { fill: '#2a1a0c', stroke: '#fb923c', text: '#fff1e3', sub: '#dcab7f' },\n external: { fill: '#111a2b', stroke: '#94a3b8', text: '#eef2f8', sub: '#9aa8bd' },\n};\n\n/**\n * Lifecycle state kinds mapped onto semantic accents so the state machine reads\n * with the same color grammar as the other diagram types.\n */\nexport const STATE_STYLES: Record<ArchifyStateType, SemanticStyle> = {\n start: COMPONENT_STYLES.frontend,\n active: COMPONENT_STYLES.backend,\n waiting: COMPONENT_STYLES.cloud,\n decision: COMPONENT_STYLES.security,\n success: COMPONENT_STYLES.database,\n failure: COMPONENT_STYLES.security,\n neutral: COMPONENT_STYLES.external,\n external: COMPONENT_STYLES.external,\n};\n\nexport function componentStyle(type: ArchifyComponentType): SemanticStyle {\n return COMPONENT_STYLES[type] ?? COMPONENT_STYLES.external;\n}\n\nexport function stateStyle(type: ArchifyStateType): SemanticStyle {\n return STATE_STYLES[type] ?? STATE_STYLES.neutral;\n}\n\nexport interface EdgeStyle {\n color: string;\n width: number;\n lineStyle: FlowEdgeLineStyle;\n}\n\n/** Resolve a relationship variant to an edge stroke color / width / dash. */\nexport function variantEdgeStyle(variant?: ArchifyVariant, baseWidth = 1.75): EdgeStyle {\n switch (variant) {\n case 'emphasis':\n return { color: ARCHIFY_ARROW_EMPHASIS, width: baseWidth + 0.75, lineStyle: 'solid' };\n case 'security':\n return { color: ARCHIFY_ARROW_SECURITY, width: baseWidth, lineStyle: 'dashed' };\n case 'dashed':\n return { color: ARCHIFY_ARROW, width: baseWidth, lineStyle: 'dashed' };\n case 'default':\n default:\n return { color: ARCHIFY_ARROW, width: baseWidth, lineStyle: 'solid' };\n }\n}\n\n/**\n * Sequence messages have an extra `return` variant (a quiet dashed reply). Map\n * it here; everything else reuses the shared variant styling.\n */\nexport function messageEdgeStyle(variant?: string): EdgeStyle {\n if (variant === 'return') {\n return { color: ARCHIFY_TEXT_DIM, width: 1.5, lineStyle: 'dashed' };\n }\n return variantEdgeStyle(variant as ArchifyVariant | undefined);\n}\n\n/** Card accent dot colors (used when we surface archify `cards` as legend). */\nexport const CARD_DOT_COLORS: Record<string, string> = {\n cyan: '#22d3ee',\n emerald: '#34d399',\n violet: '#a78bfa',\n amber: '#fbbf24',\n rose: '#fb7185',\n orange: '#fb923c',\n slate: '#94a3b8',\n};\n"],"mappings":"AAkBA,IAAa,IAAa,WAEb,IAAe,WAGf,IAAqB,WACrB,IAAmB,WAEnB,IAAsB,WAGtB,IAAgB,WAChB,IAAyB,WACzB,IAAyB,WAkBzB,IAAgE;AAAA,EAC3E,UAAU;AAAA,IAAE,MAAM;AAAA,IAAW,QAAQ;AAAA,IAAW,MAAM;AAAA,IAAW,KAAK;AAAA,EAAU;AAAA,EAChF,SAAS;AAAA,IAAE,MAAM;AAAA,IAAW,QAAQ;AAAA,IAAW,MAAM;AAAA,IAAW,KAAK;AAAA,EAAU;AAAA,EAC/E,UAAU;AAAA,IAAE,MAAM;AAAA,IAAW,QAAQ;AAAA,IAAW,MAAM;AAAA,IAAW,KAAK;AAAA,EAAU;AAAA,EAChF,OAAO;AAAA,IAAE,MAAM;AAAA,IAAW,QAAQ;AAAA,IAAW,MAAM;AAAA,IAAW,KAAK;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AAA,IAAkB,OAAO;AAAA,IAAK,WAAW;AAAA,EAAS,IAE7D,EAAiB,CAAqC;AAC/D"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Archify styling helpers for hand-drawn diagrams.
3
+ *
4
+ * These let the Inspector recolor any ordinary shape to Archify's semantic card
5
+ * palette (frontend / backend / database / cloud / security / messagebus /
6
+ * external) and let the toolbar apply that palette across a whole canvas. No
7
+ * dedicated node types are introduced — every regular shape can adopt the look.
8
+ */
9
+ import type { FlowNodeData } from '../types';
10
+ import type { ArchifyComponentType } from './spec';
11
+ /** The seven semantic component kinds, in Archify's legend order. */
12
+ export declare const ARCHIFY_COMPONENT_ORDER: ArchifyComponentType[];
13
+ /** Human labels for the semantic kinds (used in swatch tooltips). */
14
+ export declare const ARCHIFY_COMPONENT_LABELS: Record<ArchifyComponentType, string>;
15
+ /**
16
+ * Apply an Archify semantic style to a node's data, returning the fields to
17
+ * merge. Recolors fill / stroke / label / sublabel while leaving text content
18
+ * and geometry untouched, so any existing shape can adopt the Archify look.
19
+ */
20
+ export declare function archifyStylePatch(type: ArchifyComponentType): Partial<FlowNodeData>;
21
+ /**
22
+ * Infer the closest Archify semantic kind for an arbitrary node from its
23
+ * current stroke color, so "apply Archify style" can recolor a hand-drawn
24
+ * diagram without the user tagging every node. Falls back to `external`.
25
+ */
26
+ export declare function inferComponentType(data: FlowNodeData): ArchifyComponentType;
@@ -0,0 +1,43 @@
1
+ import { COMPONENT_STYLES as o } from "./palette.js";
2
+ var s = [
3
+ "frontend",
4
+ "backend",
5
+ "database",
6
+ "cloud",
7
+ "security",
8
+ "messagebus",
9
+ "external"
10
+ ], n = {
11
+ frontend: "Frontend",
12
+ backend: "Backend",
13
+ database: "Database",
14
+ cloud: "Cloud",
15
+ security: "Security",
16
+ messagebus: "Message bus",
17
+ external: "External"
18
+ };
19
+ function l(t) {
20
+ const e = o[t];
21
+ return {
22
+ fill: e.fill,
23
+ stroke: e.stroke,
24
+ color: e.text,
25
+ labelColor: e.text,
26
+ sublabelColor: e.sub,
27
+ strokeWidth: 1.75,
28
+ borderStyle: "solid"
29
+ };
30
+ }
31
+ function c(t) {
32
+ const e = (t.stroke ?? "").toLowerCase();
33
+ for (const r of s) if (o[r].stroke.toLowerCase() === e) return r;
34
+ return "external";
35
+ }
36
+ export {
37
+ n as ARCHIFY_COMPONENT_LABELS,
38
+ s as ARCHIFY_COMPONENT_ORDER,
39
+ l as archifyStylePatch,
40
+ c as inferComponentType
41
+ };
42
+
43
+ //# sourceMappingURL=presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presets.js","names":[],"sources":["../../../../../src/components/pro/Flow/archify/presets.ts"],"sourcesContent":["/**\n * Archify styling helpers for hand-drawn diagrams.\n *\n * These let the Inspector recolor any ordinary shape to Archify's semantic card\n * palette (frontend / backend / database / cloud / security / messagebus /\n * external) and let the toolbar apply that palette across a whole canvas. No\n * dedicated node types are introduced — every regular shape can adopt the look.\n */\n\nimport type { FlowNodeData } from '../types';\nimport type { ArchifyComponentType } from './spec';\nimport { COMPONENT_STYLES } from './palette';\n\n/** The seven semantic component kinds, in Archify's legend order. */\nexport const ARCHIFY_COMPONENT_ORDER: ArchifyComponentType[] = [\n 'frontend',\n 'backend',\n 'database',\n 'cloud',\n 'security',\n 'messagebus',\n 'external',\n];\n\n/** Human labels for the semantic kinds (used in swatch tooltips). */\nexport const ARCHIFY_COMPONENT_LABELS: Record<ArchifyComponentType, string> = {\n frontend: 'Frontend',\n backend: 'Backend',\n database: 'Database',\n cloud: 'Cloud',\n security: 'Security',\n messagebus: 'Message bus',\n external: 'External',\n};\n\n/**\n * Apply an Archify semantic style to a node's data, returning the fields to\n * merge. Recolors fill / stroke / label / sublabel while leaving text content\n * and geometry untouched, so any existing shape can adopt the Archify look.\n */\nexport function archifyStylePatch(type: ArchifyComponentType): Partial<FlowNodeData> {\n const s = COMPONENT_STYLES[type];\n return {\n fill: s.fill,\n stroke: s.stroke,\n color: s.text,\n labelColor: s.text,\n sublabelColor: s.sub,\n strokeWidth: 1.75,\n borderStyle: 'solid',\n };\n}\n\n/**\n * Infer the closest Archify semantic kind for an arbitrary node from its\n * current stroke color, so \"apply Archify style\" can recolor a hand-drawn\n * diagram without the user tagging every node. Falls back to `external`.\n */\nexport function inferComponentType(data: FlowNodeData): ArchifyComponentType {\n const stroke = (data.stroke ?? '').toLowerCase();\n for (const type of ARCHIFY_COMPONENT_ORDER) {\n if (COMPONENT_STYLES[type].stroke.toLowerCase() === stroke) return type;\n }\n return 'external';\n}\n"],"mappings":";AAcA,IAAa,IAAkD;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAGa,IAAiE;AAAA,EAC5E,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AACZ;AAOA,SAAgB,EAAkB,GAAmD;AACnF,QAAM,IAAI,EAAiB,CAAA;AAC3B,SAAO;AAAA,IACL,MAAM,EAAE;AAAA,IACR,QAAQ,EAAE;AAAA,IACV,OAAO,EAAE;AAAA,IACT,YAAY,EAAE;AAAA,IACd,eAAe,EAAE;AAAA,IACjB,aAAa;AAAA,IACb,aAAa;AAAA,EACf;AACF;AAOA,SAAgB,EAAmB,GAA0C;AAC3E,QAAM,KAAU,EAAK,UAAU,IAAI,YAAY;AAC/C,aAAW,KAAQ,EACjB,KAAI,EAAiB,CAAA,EAAM,OAAO,YAAY,MAAM,EAAQ,QAAO;AAErE,SAAO;AACT"}
@@ -0,0 +1,283 @@
1
+ /**
2
+ * Archify diagram specification types.
3
+ *
4
+ * These mirror the JSON schemas shipped with the `archify` skill
5
+ * (architecture / workflow / sequence / dataflow / lifecycle). A spec of any of
6
+ * these five types can be converted into a native Flow `FlowDocument` by the
7
+ * converters in this folder, which reproduce archify's grid/lane layout,
8
+ * semantic styling, and optional "trace" motion (played in presentation mode).
9
+ *
10
+ * Only the fields the converters actually use are typed strictly; unknown
11
+ * fields are tolerated so newer specs still import.
12
+ */
13
+ /** Semantic component type shared by architecture / workflow / sequence / dataflow. */
14
+ export type ArchifyComponentType = 'frontend' | 'backend' | 'database' | 'cloud' | 'security' | 'messagebus' | 'external';
15
+ /** Lifecycle state kinds. */
16
+ export type ArchifyStateType = 'start' | 'active' | 'waiting' | 'decision' | 'success' | 'failure' | 'neutral' | 'external';
17
+ /** Relationship / edge visual variant. */
18
+ export type ArchifyVariant = 'default' | 'emphasis' | 'security' | 'dashed';
19
+ /** Side an edge leaves / enters a node from. */
20
+ export type ArchifySide = 'left' | 'right' | 'top' | 'bottom';
21
+ export type ArchifyDiagramType = 'architecture' | 'workflow' | 'sequence' | 'dataflow' | 'lifecycle';
22
+ export interface ArchifyMeta {
23
+ title: string;
24
+ subtitle?: string;
25
+ animation?: 'trace' | 'none';
26
+ quality_profile?: 'standard' | 'showcase';
27
+ visual_preset?: 'classic' | 'signal-flow' | 'blueprint' | 'editorial';
28
+ /** Explicit [width, height] authoring canvas. */
29
+ viewBox?: [number, number];
30
+ column_fit?: 'fixed' | 'spread';
31
+ [key: string]: unknown;
32
+ }
33
+ export interface ArchifyCard {
34
+ dot: 'cyan' | 'emerald' | 'violet' | 'amber' | 'rose' | 'orange' | 'slate';
35
+ title: string;
36
+ items: string[];
37
+ }
38
+ export interface ArchifyArchComponent {
39
+ id: string;
40
+ type: ArchifyComponentType;
41
+ label: string;
42
+ sublabel?: string;
43
+ tag?: string;
44
+ brand?: unknown;
45
+ /** Explicit top-left position [x, y] in authoring units. */
46
+ pos?: [number, number];
47
+ /** Explicit [width, height]. */
48
+ size?: [number, number];
49
+ /** Grid placement fallback. */
50
+ row?: number;
51
+ col?: number;
52
+ }
53
+ export interface ArchifyBoundary {
54
+ kind: 'region' | 'security-group';
55
+ label: string;
56
+ wraps: string[];
57
+ pad?: number;
58
+ }
59
+ export interface ArchifyConnection {
60
+ id?: string;
61
+ from: string;
62
+ to: string;
63
+ label?: string;
64
+ variant?: ArchifyVariant;
65
+ fromSide?: ArchifySide;
66
+ toSide?: ArchifySide;
67
+ route?: string;
68
+ via?: Array<[number, number]>;
69
+ labelAt?: [number, number];
70
+ labelDx?: number;
71
+ labelDy?: number;
72
+ width?: number;
73
+ }
74
+ export interface ArchifyArchitectureSpec {
75
+ schema_version: 1;
76
+ diagram_type: 'architecture';
77
+ meta: ArchifyMeta;
78
+ layout?: {
79
+ mode: 'grid';
80
+ origin?: [number, number];
81
+ cols?: number;
82
+ gapX?: number;
83
+ gapY?: number;
84
+ cellW?: number;
85
+ cellH?: number;
86
+ };
87
+ components: ArchifyArchComponent[];
88
+ boundaries?: ArchifyBoundary[];
89
+ connections?: ArchifyConnection[];
90
+ cards?: ArchifyCard[];
91
+ }
92
+ export interface ArchifyLane {
93
+ id: string;
94
+ label: string;
95
+ variant?: 'normal' | 'exception';
96
+ }
97
+ export interface ArchifyPhase {
98
+ id: string;
99
+ label: string;
100
+ fromCol: number;
101
+ toCol: number;
102
+ variant?: ArchifyVariant;
103
+ }
104
+ export interface ArchifyWorkflowGroup {
105
+ id: string;
106
+ label: string;
107
+ lane: string;
108
+ fromCol: number;
109
+ toCol: number;
110
+ variant?: ArchifyVariant;
111
+ }
112
+ export interface ArchifyWorkflowNode {
113
+ id: string;
114
+ lane: string;
115
+ col: number;
116
+ type: ArchifyComponentType;
117
+ label: string;
118
+ sublabel?: string;
119
+ tag?: string;
120
+ brand?: unknown;
121
+ width?: number;
122
+ height?: number;
123
+ yOffset?: number;
124
+ }
125
+ export interface ArchifyWorkflowEdge {
126
+ id?: string;
127
+ from: string;
128
+ to: string;
129
+ label?: string;
130
+ variant?: ArchifyVariant;
131
+ role?: 'main' | 'branch' | 'async' | 'return' | 'error';
132
+ fromSide?: ArchifySide;
133
+ toSide?: ArchifySide;
134
+ route?: string;
135
+ via?: Array<[number, number]>;
136
+ labelAt?: [number, number];
137
+ labelDx?: number;
138
+ labelDy?: number;
139
+ channelX?: number;
140
+ channelY?: number;
141
+ width?: number;
142
+ }
143
+ export interface ArchifyWorkflowSpec {
144
+ schema_version: 1;
145
+ diagram_type: 'workflow';
146
+ meta: ArchifyMeta;
147
+ lanes: ArchifyLane[];
148
+ phases?: ArchifyPhase[];
149
+ groups?: ArchifyWorkflowGroup[];
150
+ mainPath?: string[];
151
+ nodes: ArchifyWorkflowNode[];
152
+ edges: ArchifyWorkflowEdge[];
153
+ cards?: ArchifyCard[];
154
+ }
155
+ export interface ArchifyParticipant {
156
+ id: string;
157
+ type: ArchifyComponentType;
158
+ label: string;
159
+ sublabel?: string;
160
+ brand?: unknown;
161
+ }
162
+ export interface ArchifySegment {
163
+ from: number;
164
+ to: number;
165
+ label: string;
166
+ }
167
+ export interface ArchifyMessage {
168
+ id?: string;
169
+ from: string;
170
+ to: string;
171
+ y: number;
172
+ label: string;
173
+ variant?: 'default' | 'emphasis' | 'security' | 'dashed' | 'return';
174
+ note?: string;
175
+ }
176
+ export interface ArchifyActivation {
177
+ participant: string;
178
+ from: number;
179
+ to: number;
180
+ type?: ArchifyComponentType;
181
+ }
182
+ export interface ArchifySequenceSpec {
183
+ schema_version: 1;
184
+ diagram_type: 'sequence';
185
+ meta: ArchifyMeta;
186
+ participants: ArchifyParticipant[];
187
+ segments?: ArchifySegment[];
188
+ messages: ArchifyMessage[];
189
+ activations?: ArchifyActivation[];
190
+ cards?: ArchifyCard[];
191
+ }
192
+ export interface ArchifyStage {
193
+ label: string;
194
+ }
195
+ export interface ArchifyDataflowNode {
196
+ id: string;
197
+ type: ArchifyComponentType;
198
+ label: string;
199
+ sublabel?: string;
200
+ tag?: string;
201
+ brand?: unknown;
202
+ stage: number;
203
+ row: number;
204
+ width?: number;
205
+ height?: number;
206
+ yOffset?: number;
207
+ }
208
+ export interface ArchifyFlow {
209
+ id?: string;
210
+ from: string;
211
+ to: string;
212
+ label: string;
213
+ classification?: string;
214
+ variant?: ArchifyVariant;
215
+ route?: string;
216
+ fromSide?: ArchifySide;
217
+ toSide?: ArchifySide;
218
+ channelX?: number;
219
+ channelY?: number;
220
+ labelAt?: [number, number];
221
+ labelDx?: number;
222
+ labelDy?: number;
223
+ via?: Array<[number, number]>;
224
+ width?: number;
225
+ }
226
+ export interface ArchifyDataflowSpec {
227
+ schema_version: 1;
228
+ diagram_type: 'dataflow';
229
+ meta: ArchifyMeta;
230
+ stages: ArchifyStage[];
231
+ nodes: ArchifyDataflowNode[];
232
+ flows: ArchifyFlow[];
233
+ cards?: ArchifyCard[];
234
+ }
235
+ export interface ArchifyLifecycleLane {
236
+ id: string;
237
+ label: string;
238
+ }
239
+ export interface ArchifyState {
240
+ id: string;
241
+ type: ArchifyStateType;
242
+ label: string;
243
+ sublabel?: string;
244
+ tag?: string;
245
+ brand?: unknown;
246
+ step?: string;
247
+ lane: string;
248
+ col: number;
249
+ width?: number;
250
+ height?: number;
251
+ yOffset?: number;
252
+ }
253
+ export interface ArchifyTransition {
254
+ id?: string;
255
+ from: string;
256
+ to: string;
257
+ label?: string;
258
+ note?: string;
259
+ variant?: ArchifyVariant;
260
+ route?: string;
261
+ fromSide?: ArchifySide;
262
+ toSide?: ArchifySide;
263
+ channelX?: number;
264
+ channelY?: number;
265
+ cornerRadius?: number;
266
+ labelAt?: [number, number];
267
+ labelDx?: number;
268
+ labelDy?: number;
269
+ via?: Array<[number, number]>;
270
+ width?: number;
271
+ }
272
+ export interface ArchifyLifecycleSpec {
273
+ schema_version: 1;
274
+ diagram_type: 'lifecycle';
275
+ meta: ArchifyMeta;
276
+ lanes: ArchifyLifecycleLane[];
277
+ states: ArchifyState[];
278
+ transitions: ArchifyTransition[];
279
+ cards?: ArchifyCard[];
280
+ }
281
+ export type ArchifySpec = ArchifyArchitectureSpec | ArchifyWorkflowSpec | ArchifySequenceSpec | ArchifyDataflowSpec | ArchifyLifecycleSpec;
282
+ /** Narrow an unknown value to an ArchifySpec if it looks like one. */
283
+ export declare function isArchifySpec(value: unknown): value is ArchifySpec;
@@ -0,0 +1,10 @@
1
+ function r(t) {
2
+ if (!t || typeof t != "object") return !1;
3
+ const c = t, e = c.diagram_type;
4
+ return c.schema_version === 1 && (e === "architecture" || e === "workflow" || e === "sequence" || e === "dataflow" || e === "lifecycle");
5
+ }
6
+ export {
7
+ r as isArchifySpec
8
+ };
9
+
10
+ //# sourceMappingURL=spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec.js","names":[],"sources":["../../../../../src/components/pro/Flow/archify/spec.ts"],"sourcesContent":["/**\n * Archify diagram specification types.\n *\n * These mirror the JSON schemas shipped with the `archify` skill\n * (architecture / workflow / sequence / dataflow / lifecycle). A spec of any of\n * these five types can be converted into a native Flow `FlowDocument` by the\n * converters in this folder, which reproduce archify's grid/lane layout,\n * semantic styling, and optional \"trace\" motion (played in presentation mode).\n *\n * Only the fields the converters actually use are typed strictly; unknown\n * fields are tolerated so newer specs still import.\n */\n\n/** Semantic component type shared by architecture / workflow / sequence / dataflow. */\nexport type ArchifyComponentType =\n | 'frontend'\n | 'backend'\n | 'database'\n | 'cloud'\n | 'security'\n | 'messagebus'\n | 'external';\n\n/** Lifecycle state kinds. */\nexport type ArchifyStateType =\n | 'start'\n | 'active'\n | 'waiting'\n | 'decision'\n | 'success'\n | 'failure'\n | 'neutral'\n | 'external';\n\n/** Relationship / edge visual variant. */\nexport type ArchifyVariant = 'default' | 'emphasis' | 'security' | 'dashed';\n\n/** Side an edge leaves / enters a node from. */\nexport type ArchifySide = 'left' | 'right' | 'top' | 'bottom';\n\nexport type ArchifyDiagramType =\n | 'architecture'\n | 'workflow'\n | 'sequence'\n | 'dataflow'\n | 'lifecycle';\n\nexport interface ArchifyMeta {\n title: string;\n subtitle?: string;\n animation?: 'trace' | 'none';\n quality_profile?: 'standard' | 'showcase';\n visual_preset?: 'classic' | 'signal-flow' | 'blueprint' | 'editorial';\n /** Explicit [width, height] authoring canvas. */\n viewBox?: [number, number];\n column_fit?: 'fixed' | 'spread';\n [key: string]: unknown;\n}\n\nexport interface ArchifyCard {\n dot: 'cyan' | 'emerald' | 'violet' | 'amber' | 'rose' | 'orange' | 'slate';\n title: string;\n items: string[];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Architecture */\n/* -------------------------------------------------------------------------- */\n\nexport interface ArchifyArchComponent {\n id: string;\n type: ArchifyComponentType;\n label: string;\n sublabel?: string;\n tag?: string;\n brand?: unknown;\n /** Explicit top-left position [x, y] in authoring units. */\n pos?: [number, number];\n /** Explicit [width, height]. */\n size?: [number, number];\n /** Grid placement fallback. */\n row?: number;\n col?: number;\n}\n\nexport interface ArchifyBoundary {\n kind: 'region' | 'security-group';\n label: string;\n wraps: string[];\n pad?: number;\n}\n\nexport interface ArchifyConnection {\n id?: string;\n from: string;\n to: string;\n label?: string;\n variant?: ArchifyVariant;\n fromSide?: ArchifySide;\n toSide?: ArchifySide;\n route?: string;\n via?: Array<[number, number]>;\n labelAt?: [number, number];\n labelDx?: number;\n labelDy?: number;\n width?: number;\n}\n\nexport interface ArchifyArchitectureSpec {\n schema_version: 1;\n diagram_type: 'architecture';\n meta: ArchifyMeta;\n layout?: {\n mode: 'grid';\n origin?: [number, number];\n cols?: number;\n gapX?: number;\n gapY?: number;\n cellW?: number;\n cellH?: number;\n };\n components: ArchifyArchComponent[];\n boundaries?: ArchifyBoundary[];\n connections?: ArchifyConnection[];\n cards?: ArchifyCard[];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Workflow */\n/* -------------------------------------------------------------------------- */\n\nexport interface ArchifyLane {\n id: string;\n label: string;\n variant?: 'normal' | 'exception';\n}\n\nexport interface ArchifyPhase {\n id: string;\n label: string;\n fromCol: number;\n toCol: number;\n variant?: ArchifyVariant;\n}\n\nexport interface ArchifyWorkflowGroup {\n id: string;\n label: string;\n lane: string;\n fromCol: number;\n toCol: number;\n variant?: ArchifyVariant;\n}\n\nexport interface ArchifyWorkflowNode {\n id: string;\n lane: string;\n col: number;\n type: ArchifyComponentType;\n label: string;\n sublabel?: string;\n tag?: string;\n brand?: unknown;\n width?: number;\n height?: number;\n yOffset?: number;\n}\n\nexport interface ArchifyWorkflowEdge {\n id?: string;\n from: string;\n to: string;\n label?: string;\n variant?: ArchifyVariant;\n role?: 'main' | 'branch' | 'async' | 'return' | 'error';\n fromSide?: ArchifySide;\n toSide?: ArchifySide;\n route?: string;\n via?: Array<[number, number]>;\n labelAt?: [number, number];\n labelDx?: number;\n labelDy?: number;\n channelX?: number;\n channelY?: number;\n width?: number;\n}\n\nexport interface ArchifyWorkflowSpec {\n schema_version: 1;\n diagram_type: 'workflow';\n meta: ArchifyMeta;\n lanes: ArchifyLane[];\n phases?: ArchifyPhase[];\n groups?: ArchifyWorkflowGroup[];\n mainPath?: string[];\n nodes: ArchifyWorkflowNode[];\n edges: ArchifyWorkflowEdge[];\n cards?: ArchifyCard[];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Sequence */\n/* -------------------------------------------------------------------------- */\n\nexport interface ArchifyParticipant {\n id: string;\n type: ArchifyComponentType;\n label: string;\n sublabel?: string;\n brand?: unknown;\n}\n\nexport interface ArchifySegment {\n from: number;\n to: number;\n label: string;\n}\n\nexport interface ArchifyMessage {\n id?: string;\n from: string;\n to: string;\n y: number;\n label: string;\n variant?: 'default' | 'emphasis' | 'security' | 'dashed' | 'return';\n note?: string;\n}\n\nexport interface ArchifyActivation {\n participant: string;\n from: number;\n to: number;\n type?: ArchifyComponentType;\n}\n\nexport interface ArchifySequenceSpec {\n schema_version: 1;\n diagram_type: 'sequence';\n meta: ArchifyMeta;\n participants: ArchifyParticipant[];\n segments?: ArchifySegment[];\n messages: ArchifyMessage[];\n activations?: ArchifyActivation[];\n cards?: ArchifyCard[];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Dataflow */\n/* -------------------------------------------------------------------------- */\n\nexport interface ArchifyStage {\n label: string;\n}\n\nexport interface ArchifyDataflowNode {\n id: string;\n type: ArchifyComponentType;\n label: string;\n sublabel?: string;\n tag?: string;\n brand?: unknown;\n stage: number;\n row: number;\n width?: number;\n height?: number;\n yOffset?: number;\n}\n\nexport interface ArchifyFlow {\n id?: string;\n from: string;\n to: string;\n label: string;\n classification?: string;\n variant?: ArchifyVariant;\n route?: string;\n fromSide?: ArchifySide;\n toSide?: ArchifySide;\n channelX?: number;\n channelY?: number;\n labelAt?: [number, number];\n labelDx?: number;\n labelDy?: number;\n via?: Array<[number, number]>;\n width?: number;\n}\n\nexport interface ArchifyDataflowSpec {\n schema_version: 1;\n diagram_type: 'dataflow';\n meta: ArchifyMeta;\n stages: ArchifyStage[];\n nodes: ArchifyDataflowNode[];\n flows: ArchifyFlow[];\n cards?: ArchifyCard[];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Lifecycle */\n/* -------------------------------------------------------------------------- */\n\nexport interface ArchifyLifecycleLane {\n id: string;\n label: string;\n}\n\nexport interface ArchifyState {\n id: string;\n type: ArchifyStateType;\n label: string;\n sublabel?: string;\n tag?: string;\n brand?: unknown;\n step?: string;\n lane: string;\n col: number;\n width?: number;\n height?: number;\n yOffset?: number;\n}\n\nexport interface ArchifyTransition {\n id?: string;\n from: string;\n to: string;\n label?: string;\n note?: string;\n variant?: ArchifyVariant;\n route?: string;\n fromSide?: ArchifySide;\n toSide?: ArchifySide;\n channelX?: number;\n channelY?: number;\n cornerRadius?: number;\n labelAt?: [number, number];\n labelDx?: number;\n labelDy?: number;\n via?: Array<[number, number]>;\n width?: number;\n}\n\nexport interface ArchifyLifecycleSpec {\n schema_version: 1;\n diagram_type: 'lifecycle';\n meta: ArchifyMeta;\n lanes: ArchifyLifecycleLane[];\n states: ArchifyState[];\n transitions: ArchifyTransition[];\n cards?: ArchifyCard[];\n}\n\n/* -------------------------------------------------------------------------- */\n\nexport type ArchifySpec =\n | ArchifyArchitectureSpec\n | ArchifyWorkflowSpec\n | ArchifySequenceSpec\n | ArchifyDataflowSpec\n | ArchifyLifecycleSpec;\n\n/** Narrow an unknown value to an ArchifySpec if it looks like one. */\nexport function isArchifySpec(value: unknown): value is ArchifySpec {\n if (!value || typeof value !== 'object') return false;\n const v = value as Record<string, unknown>;\n const type = v.diagram_type;\n return (\n v.schema_version === 1 &&\n (type === 'architecture' ||\n type === 'workflow' ||\n type === 'sequence' ||\n type === 'dataflow' ||\n type === 'lifecycle')\n );\n}\n"],"mappings":"AAyWA,SAAgB,EAAc,GAAsC;AAClE,MAAI,CAAC,KAAS,OAAO,KAAU,SAAU,QAAO;AAChD,QAAM,IAAI,GACJ,IAAO,EAAE;AACf,SACE,EAAE,mBAAmB,MACpB,MAAS,kBACR,MAAS,cACT,MAAS,cACT,MAAS,cACT,MAAS;AAEf"}
@@ -168,6 +168,20 @@ var t = "root", e = {
168
168
  borderStyle: "dashed"
169
169
  }
170
170
  },
171
+ {
172
+ type: "flowGroup",
173
+ width: 200,
174
+ height: 160,
175
+ data: {
176
+ ...e,
177
+ label: "Group",
178
+ fill: "#f0f9ff",
179
+ stroke: "#9ca3af",
180
+ strokeWidth: 1.5,
181
+ borderStyle: "dotted",
182
+ isGroup: !0
183
+ }
184
+ },
171
185
  {
172
186
  type: "geometryGroup",
173
187
  width: 200,
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../../../../src/components/pro/Flow/constants.ts"],"sourcesContent":["import type {\n FlowNodeData,\n FlowShapeType,\n FlowEdgeTypeName,\n FlowEdgeMarkerKind,\n FlowEdgeLineStyle,\n FlowEdgeDashDensity,\n FlowBorderStyle,\n GradientDirection,\n FlowDocument,\n FlowEdgeData,\n} from './types';\n\nexport const ROOT_CANVAS_ID = 'root';\n\nexport const DEFAULT_NODE_DATA: FlowNodeData = {\n label: 'Text',\n fill: 'theme:base-100',\n stroke: 'theme:base-content',\n strokeWidth: 2,\n color: 'theme:base-content',\n fontSize: 14,\n attributes: [],\n};\n\nexport const TEXT_NODE_DATA: FlowNodeData = {\n label: 'Label',\n fill: 'transparent',\n stroke: 'transparent',\n strokeWidth: 0,\n color: 'theme:base-content',\n fontSize: 14,\n attributes: [],\n};\n\nexport const DEFAULT_EDGE_DATA: FlowEdgeData = {\n strokeColor: 'theme:base-content',\n strokeWidth: 2,\n lineStyle: 'solid',\n markerEnd: 'arrowclosed',\n};\n\nexport const PALETTE_ITEMS: Array<{\n type: FlowShapeType;\n width: number;\n height: number;\n data: FlowNodeData;\n}> = [\n { type: 'shapeRect', width: 140, height: 72, data: { ...DEFAULT_NODE_DATA, label: 'Rectangle' } },\n { type: 'shapeRoundRect', width: 140, height: 72, data: { ...DEFAULT_NODE_DATA, label: 'Rounded' } },\n { type: 'shapeEllipse', width: 120, height: 120, data: { ...DEFAULT_NODE_DATA, label: 'Ellipse' } },\n { type: 'shapeDiamond', width: 120, height: 120, data: { ...DEFAULT_NODE_DATA, label: 'Diamond' } },\n { type: 'shapeDocument', width: 120, height: 80, data: { ...DEFAULT_NODE_DATA, label: 'Document' } },\n { type: 'shapeParallelogram', width: 140, height: 72, data: { ...DEFAULT_NODE_DATA, label: 'Parallelogram' } },\n { type: 'shapeTriangle', width: 120, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Triangle' } },\n { type: 'shapeTrapezoid', width: 140, height: 72, data: { ...DEFAULT_NODE_DATA, label: 'Trapezoid' } },\n { type: 'shapePentagon', width: 100, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Pentagon' } },\n { type: 'shapeHexagon', width: 120, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Hexagon' } },\n { type: 'shapeStar', width: 100, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Star' } },\n { type: 'shapeHexagram', width: 100, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Hexagram' } },\n { type: 'shapeRightTriangle', width: 120, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Right Triangle' } },\n { type: 'shapeCorner', width: 100, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Corner' } },\n { type: 'textLabel', width: 120, height: 40, data: { ...TEXT_NODE_DATA, label: 'Label' } },\n { type: 'animAnchor', width: 320, height: 240, data: { ...DEFAULT_NODE_DATA, label: 'Anchor', fill: 'transparent', stroke: '#8b5cf6', strokeWidth: 1.5, borderStyle: 'dashed' } },\n { type: 'geometryGroup', width: 200, height: 160, data: { ...DEFAULT_NODE_DATA, label: 'Geo Group', fill: '#fefce8', stroke: '#9ca3af', strokeWidth: 1.5, borderStyle: 'dashed', isGroup: true } },\n];\n\nexport const EDGE_TYPE_OPTIONS: FlowEdgeTypeName[] = [\n 'smoothstep',\n 'step',\n 'straight',\n 'simplebezier',\n];\n\nexport const EDGE_MARKER_OPTIONS: FlowEdgeMarkerKind[] = [\n 'none',\n 'arrow',\n 'arrowclosed',\n];\n\nexport const EDGE_LINE_STYLE_OPTIONS: FlowEdgeLineStyle[] = [\n 'solid',\n 'dashed',\n 'dotted',\n 'dynamic',\n];\n\nexport const BORDER_STYLE_OPTIONS: FlowBorderStyle[] = [\n 'solid',\n 'dashed',\n 'dotted',\n 'dynamic',\n];\n\nexport const DASH_DENSITY_OPTIONS: FlowEdgeDashDensity[] = [\n 'sparse',\n 'medium',\n 'dense',\n];\n\nexport const GRADIENT_DIRECTION_OPTIONS: Array<{\n value: GradientDirection;\n label: string;\n}> = [\n { value: 'to-r', label: 'Left → Right' },\n { value: 'to-l', label: 'Right → Left' },\n { value: 'to-b', label: 'Top → Bottom' },\n { value: 'to-t', label: 'Bottom → Top' },\n { value: 'to-br', label: 'Top-Left → Bottom-Right' },\n { value: 'to-tl', label: 'Bottom-Right → Top-Left' },\n { value: 'to-tr', label: 'Bottom-Left → Top-Right' },\n { value: 'to-bl', label: 'Top-Right → Bottom-Left' },\n];\n\nexport const MIN_ZOOM = 0.1;\nexport const MAX_ZOOM = 4;\nexport const DEFAULT_GRID_SIZE = 20;\nexport const ZOOM_SENSITIVITY = 0.001;\nexport const SNAP_THRESHOLD = 5;\nexport const HANDLE_SIZE = 8;\n\nexport function createEmptyDocument(): FlowDocument {\n return {\n canvases: { [ROOT_CANVAS_ID]: { nodes: [], edges: [], lines: [] } },\n stack: [ROOT_CANVAS_ID],\n };\n}\n"],"mappings":"AAaA,IAA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B;AAAA,EACnD;AAAA,IAAE,OAAO;AAAA,IAAS,OAAO;AAAA,EAA0B;AAAA,EACnD;AAAA,IAAE,OAAO;AAAA,IAAS,OAAO;AAAA,EAA0B;AAAA,EACnD;AAAA,IAAE,OAAO;AAAA,IAAS,OAAO;AAAA,EAA0B;AACrD,GAEa,IAAW;AAOxB,SAAgB,IAAoC;AAClD,SAAO;AAAA,IACL,UAAU,EAAA,CAAG,CAAA,GAAiB;AAAA,MAAE,OAAO,CAAC;AAAA,MAAG,OAAO,CAAC;AAAA,MAAG,OAAO,CAAC;AAAA,IAAE,EAAE;AAAA,IAClE,OAAO,CAAC,CAAc;AAAA,EACxB;AACF"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../../../../src/components/pro/Flow/constants.ts"],"sourcesContent":["import type {\n FlowNodeData,\n FlowShapeType,\n FlowEdgeTypeName,\n FlowEdgeMarkerKind,\n FlowEdgeLineStyle,\n FlowEdgeDashDensity,\n FlowBorderStyle,\n GradientDirection,\n FlowDocument,\n FlowEdgeData,\n} from './types';\n\nexport const ROOT_CANVAS_ID = 'root';\n\nexport const DEFAULT_NODE_DATA: FlowNodeData = {\n label: 'Text',\n fill: 'theme:base-100',\n stroke: 'theme:base-content',\n strokeWidth: 2,\n color: 'theme:base-content',\n fontSize: 14,\n attributes: [],\n};\n\nexport const TEXT_NODE_DATA: FlowNodeData = {\n label: 'Label',\n fill: 'transparent',\n stroke: 'transparent',\n strokeWidth: 0,\n color: 'theme:base-content',\n fontSize: 14,\n attributes: [],\n};\n\nexport const DEFAULT_EDGE_DATA: FlowEdgeData = {\n strokeColor: 'theme:base-content',\n strokeWidth: 2,\n lineStyle: 'solid',\n markerEnd: 'arrowclosed',\n};\n\nexport const PALETTE_ITEMS: Array<{\n type: FlowShapeType;\n width: number;\n height: number;\n data: FlowNodeData;\n}> = [\n { type: 'shapeRect', width: 140, height: 72, data: { ...DEFAULT_NODE_DATA, label: 'Rectangle' } },\n { type: 'shapeRoundRect', width: 140, height: 72, data: { ...DEFAULT_NODE_DATA, label: 'Rounded' } },\n { type: 'shapeEllipse', width: 120, height: 120, data: { ...DEFAULT_NODE_DATA, label: 'Ellipse' } },\n { type: 'shapeDiamond', width: 120, height: 120, data: { ...DEFAULT_NODE_DATA, label: 'Diamond' } },\n { type: 'shapeDocument', width: 120, height: 80, data: { ...DEFAULT_NODE_DATA, label: 'Document' } },\n { type: 'shapeParallelogram', width: 140, height: 72, data: { ...DEFAULT_NODE_DATA, label: 'Parallelogram' } },\n { type: 'shapeTriangle', width: 120, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Triangle' } },\n { type: 'shapeTrapezoid', width: 140, height: 72, data: { ...DEFAULT_NODE_DATA, label: 'Trapezoid' } },\n { type: 'shapePentagon', width: 100, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Pentagon' } },\n { type: 'shapeHexagon', width: 120, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Hexagon' } },\n { type: 'shapeStar', width: 100, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Star' } },\n { type: 'shapeHexagram', width: 100, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Hexagram' } },\n { type: 'shapeRightTriangle', width: 120, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Right Triangle' } },\n { type: 'shapeCorner', width: 100, height: 100, data: { ...DEFAULT_NODE_DATA, label: 'Corner' } },\n { type: 'textLabel', width: 120, height: 40, data: { ...TEXT_NODE_DATA, label: 'Label' } },\n { type: 'animAnchor', width: 320, height: 240, data: { ...DEFAULT_NODE_DATA, label: 'Anchor', fill: 'transparent', stroke: '#8b5cf6', strokeWidth: 1.5, borderStyle: 'dashed' } },\n { type: 'flowGroup', width: 200, height: 160, data: { ...DEFAULT_NODE_DATA, label: 'Group', fill: '#f0f9ff', stroke: '#9ca3af', strokeWidth: 1.5, borderStyle: 'dotted', isGroup: true } },\n { type: 'geometryGroup', width: 200, height: 160, data: { ...DEFAULT_NODE_DATA, label: 'Geo Group', fill: '#fefce8', stroke: '#9ca3af', strokeWidth: 1.5, borderStyle: 'dashed', isGroup: true } },\n];\n\nexport const EDGE_TYPE_OPTIONS: FlowEdgeTypeName[] = [\n 'smoothstep',\n 'step',\n 'straight',\n 'simplebezier',\n];\n\nexport const EDGE_MARKER_OPTIONS: FlowEdgeMarkerKind[] = [\n 'none',\n 'arrow',\n 'arrowclosed',\n];\n\nexport const EDGE_LINE_STYLE_OPTIONS: FlowEdgeLineStyle[] = [\n 'solid',\n 'dashed',\n 'dotted',\n 'dynamic',\n];\n\nexport const BORDER_STYLE_OPTIONS: FlowBorderStyle[] = [\n 'solid',\n 'dashed',\n 'dotted',\n 'dynamic',\n];\n\nexport const DASH_DENSITY_OPTIONS: FlowEdgeDashDensity[] = [\n 'sparse',\n 'medium',\n 'dense',\n];\n\nexport const GRADIENT_DIRECTION_OPTIONS: Array<{\n value: GradientDirection;\n label: string;\n}> = [\n { value: 'to-r', label: 'Left → Right' },\n { value: 'to-l', label: 'Right → Left' },\n { value: 'to-b', label: 'Top → Bottom' },\n { value: 'to-t', label: 'Bottom → Top' },\n { value: 'to-br', label: 'Top-Left → Bottom-Right' },\n { value: 'to-tl', label: 'Bottom-Right → Top-Left' },\n { value: 'to-tr', label: 'Bottom-Left → Top-Right' },\n { value: 'to-bl', label: 'Top-Right → Bottom-Left' },\n];\n\nexport const MIN_ZOOM = 0.1;\nexport const MAX_ZOOM = 4;\nexport const DEFAULT_GRID_SIZE = 20;\nexport const ZOOM_SENSITIVITY = 0.001;\nexport const SNAP_THRESHOLD = 5;\nexport const HANDLE_SIZE = 8;\n\nexport function createEmptyDocument(): FlowDocument {\n return {\n canvases: { [ROOT_CANVAS_ID]: { nodes: [], edges: [], lines: [] } },\n stack: [ROOT_CANVAS_ID],\n };\n}\n"],"mappings":"AAaA,IAAa,IAAiB,QAEjB,IAAkC;AAAA,EAC7C,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,OAAO;AA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Ae;AAAA,EACvC;AAAA,IAAE,OAAO;AAAA,IAAQ,OAAO;AAAA,EAAe;AAAA,EACvC;AAAA,IAAE,OAAO;AAAA,IAAS,OAAO;AAAA,EAA0B;AAAA,EACnD;AAAA,IAAE,OAAO;AAAA,IAAS,OAAO;AAAA,EAA0B;AAAA,EACnD;AAAA,IAAE,OAAO;AAAA,IAAS,OAAO;AAAA,EAA0B;AAAA,EACnD;AAAA,IAAE,OAAO;AAAA,IAAS,OAAO;AAAA,EAA0B;AACrD,GAEa,IAAW;AAOxB,SAAgB,IAAoC;AAClD,SAAO;AAAA,IACL,UAAU,EAAA,CAAG,CAAA,GAAiB;AAAA,MAAE,OAAO,CAAC;AAAA,MAAG,OAAO,CAAC;AAAA,MAAG,OAAO,CAAC;AAAA,IAAE,EAAE;AAAA,IAClE,OAAO,CAAC,CAAc;AAAA,EACxB;AACF"}
@@ -6,5 +6,10 @@ export declare function useClipboard(): {
6
6
  copy: () => void;
7
7
  cut: () => void;
8
8
  paste: (offsetX?: number, offsetY?: number) => void;
9
+ duplicate: (offsetX?: number, offsetY?: number, targets?: {
10
+ nodeIds?: Set<string>;
11
+ edgeIds?: Set<string>;
12
+ lineIds?: Set<string>;
13
+ }) => void;
9
14
  hasClipboard: boolean;
10
15
  };