@eventcatalog/visualiser 5.0.1 → 5.1.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/dist/chunk-P2DH6CFV.mjs +1196 -0
- package/dist/chunk-P2DH6CFV.mjs.map +1 -0
- package/dist/chunk-STJQWGKW.mjs +1 -0
- package/dist/{chunk-KVTGV7VK.mjs → chunk-ZHXUMAPK.mjs} +1706 -1484
- package/dist/chunk-ZHXUMAPK.mjs.map +1 -0
- package/dist/export-mermaid-CbER9roE.d.mts +23 -0
- package/dist/{elk-layout-CpbZ6hB9.d.ts → export-mermaid-xL98eL1l.d.ts} +21 -1
- package/dist/index.d.mts +57 -41
- package/dist/index.d.ts +58 -42
- package/dist/index.js +2159 -1246
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/layout.d.mts +1 -0
- package/dist/layout.d.ts +1 -1
- package/dist/layout.js +453 -0
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +4 -2
- package/dist/model.d.mts +2 -2
- package/dist/{schema-DKA0EQ_H.d.mts → schema-CKdQ-Ak2.d.mts} +7 -7
- package/dist/studio.d.mts +13 -3
- package/dist/studio.mjs +66 -85
- package/dist/studio.mjs.map +1 -1
- package/dist/styles-core.css +122 -120
- package/dist/styles.css +122 -120
- package/package.json +1 -2
- package/dist/chunk-KVTGV7VK.mjs.map +0 -1
- package/dist/chunk-NOHQEQD7.mjs +0 -468
- package/dist/chunk-NOHQEQD7.mjs.map +0 -1
- package/dist/chunk-Q3OM5AL5.mjs +0 -1
- /package/dist/{chunk-Q3OM5AL5.mjs.map → chunk-STJQWGKW.mjs.map} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Node, Edge } from '@xyflow/react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Mermaid Export Utility
|
|
5
|
+
* Converts React Flow nodes and edges to Mermaid flowchart syntax. Used by the
|
|
6
|
+
* visualiser's Mermaid view and by EventCatalog (the `.mermaid` routes, AI Chat
|
|
7
|
+
* and the MCP server), so every level of a diagram exports the same way.
|
|
8
|
+
*/
|
|
9
|
+
interface MermaidExportOptions {
|
|
10
|
+
/** Include class definitions for styling */
|
|
11
|
+
includeStyles?: boolean;
|
|
12
|
+
/** Direction of the flowchart: LR (left-right), TB (top-bottom), etc. */
|
|
13
|
+
direction?: "LR" | "TB" | "RL" | "BT";
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Convert React Flow nodes and edges to Mermaid flowchart syntax. Domains,
|
|
17
|
+
* systems and a flow's lanes are subgraphs around what's in them (nested, as
|
|
18
|
+
* on the diagram), so every level of a domain or system diagram keeps its
|
|
19
|
+
* boundaries. Edges between domains are highlighted.
|
|
20
|
+
*/
|
|
21
|
+
declare function convertToMermaid(graphNodes: Node[], graphEdges: Edge[], options?: MermaidExportOptions): string;
|
|
22
|
+
|
|
23
|
+
export { type MermaidExportOptions as M, convertToMermaid as c };
|
|
@@ -57,4 +57,24 @@ declare const layoutWithElk: ({ nodes, edges }: LayoutGraph, { sizeOf }?: {
|
|
|
57
57
|
sizeOf?: (node: Node) => LayoutSize;
|
|
58
58
|
}) => Promise<LayoutGraph>;
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Mermaid Export Utility
|
|
62
|
+
* Converts React Flow nodes and edges to Mermaid flowchart syntax. Used by the
|
|
63
|
+
* visualiser's Mermaid view and by EventCatalog (the `.mermaid` routes, AI Chat
|
|
64
|
+
* and the MCP server), so every level of a diagram exports the same way.
|
|
65
|
+
*/
|
|
66
|
+
interface MermaidExportOptions {
|
|
67
|
+
/** Include class definitions for styling */
|
|
68
|
+
includeStyles?: boolean;
|
|
69
|
+
/** Direction of the flowchart: LR (left-right), TB (top-bottom), etc. */
|
|
70
|
+
direction?: "LR" | "TB" | "RL" | "BT";
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Convert React Flow nodes and edges to Mermaid flowchart syntax. Domains,
|
|
74
|
+
* systems and a flow's lanes are subgraphs around what's in them (nested, as
|
|
75
|
+
* on the diagram), so every level of a domain or system diagram keeps its
|
|
76
|
+
* boundaries. Edges between domains are highlighted.
|
|
77
|
+
*/
|
|
78
|
+
declare function convertToMermaid(graphNodes: Node[], graphEdges: Edge[], options?: MermaidExportOptions): string;
|
|
79
|
+
|
|
80
|
+
export { type CopiedEdgeRoute as C, type EdgeRoute as E, type LayoutGraph as L, type MermaidExportOptions as M, type LayoutSize as a, convertToMermaid as c, getNodeSize as g, layoutWithElk as l };
|
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
4
4
|
import { C as CopiedEdgeRoute } from './elk-layout-CpbZ6hB9.mjs';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { ReactNode, ComponentType } from 'react';
|
|
7
|
+
export { M as MermaidExportOptions, c as convertToMermaid } from './export-mermaid-CbER9roE.mjs';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* EventCatalog resource mode
|
|
@@ -394,6 +395,17 @@ type OpenInStudioRequest = {
|
|
|
394
395
|
};
|
|
395
396
|
interface NodeGraphProps {
|
|
396
397
|
id: string;
|
|
398
|
+
/**
|
|
399
|
+
* Keeps the Mermaid view in the page's URL (`?render=mermaid`), so links open
|
|
400
|
+
* in it. Only for the visualiser's own pages: not diagrams embedded in docs
|
|
401
|
+
* or other apps, which can share a page (or an iframe) with others.
|
|
402
|
+
*/
|
|
403
|
+
syncRenderModeWithUrl?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* The level of detail to open at (1, 2 or 3), rather than the URL's or the
|
|
406
|
+
* saved one, e.g. the level an MCP client asked for
|
|
407
|
+
*/
|
|
408
|
+
initialLevel?: 1 | 2 | 3;
|
|
397
409
|
title?: string;
|
|
398
410
|
href?: string;
|
|
399
411
|
hrefLabel?: string;
|
|
@@ -473,14 +485,50 @@ interface NodeGraphProps {
|
|
|
473
485
|
/** Starts a Studio canvas from what the diagram shows (the menu has "Open in Studio" when set) */
|
|
474
486
|
onOpenInStudio?: (request: OpenInStudioRequest) => void;
|
|
475
487
|
}
|
|
476
|
-
declare const NodeGraph: ({ id, nodes: nodesProp, edges: edgesProp, graph, title: titleProp, href, linkTo, hrefLabel, includeKey: includeKeyProp, footerLabel, linksToVisualiser, links, mode, portalId, showFlowWalkthrough, showSearch: showSearchProp, showMenu, compactSearch, hideAttribution, zoomOnScroll, designId, isChatEnabled, maxTextSize, isDevMode, resourceKey, animated: animatedProp, disableMessageAnimation, overviewGraph, hiddenMessagesGraph, preferenceScope, swimlanes, focusNodeId, focusRequestId, fitRequestId, onNodeClick, onBuildUrl, onNavigate, onSaveLayout, onResetLayout, onOpenInStudio, }: NodeGraphProps) => react_jsx_runtime.JSX.Element | null;
|
|
488
|
+
declare const NodeGraph: ({ id, nodes: nodesProp, edges: edgesProp, graph, title: titleProp, href, linkTo, hrefLabel, includeKey: includeKeyProp, footerLabel, linksToVisualiser, links, syncRenderModeWithUrl, initialLevel, mode, portalId, showFlowWalkthrough, showSearch: showSearchProp, showMenu, compactSearch, hideAttribution, zoomOnScroll, designId, isChatEnabled, maxTextSize, isDevMode, resourceKey, animated: animatedProp, disableMessageAnimation, overviewGraph, hiddenMessagesGraph, preferenceScope, swimlanes, focusNodeId, focusRequestId, fitRequestId, onNodeClick, onBuildUrl, onNavigate, onSaveLayout, onResetLayout, onOpenInStudio, }: NodeGraphProps) => react_jsx_runtime.JSX.Element | null;
|
|
489
|
+
|
|
490
|
+
type CanvasLevel = {
|
|
491
|
+
description: string;
|
|
492
|
+
active: boolean;
|
|
493
|
+
/** Why the level is greyed out (e.g. the diagram doesn't have it), shown on hover */
|
|
494
|
+
disabledReason?: string;
|
|
495
|
+
onSelect: () => void;
|
|
496
|
+
};
|
|
497
|
+
/** A button in a toolbar, with its tooltip (what it does, and why it can't be used when it can't) */
|
|
498
|
+
declare const ToolbarButton: ({ label, hint, active, disabled, onClick, children, }: {
|
|
499
|
+
label: string;
|
|
500
|
+
/** Shown under the label on hover */
|
|
501
|
+
hint?: string;
|
|
502
|
+
active?: boolean;
|
|
503
|
+
disabled?: boolean;
|
|
504
|
+
onClick: () => void;
|
|
505
|
+
children: ReactNode;
|
|
506
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
507
|
+
/**
|
|
508
|
+
* How far the canvas is zoomed in, as a percentage. Isolated, so what it's in only re-renders when the zoom changes
|
|
509
|
+
* (not on every pan). Studio's bar shows it too.
|
|
510
|
+
*/
|
|
511
|
+
declare const ZoomLevel: react.NamedExoticComponent<{
|
|
512
|
+
className?: string;
|
|
513
|
+
}>;
|
|
514
|
+
declare const ToolbarDivider: () => react_jsx_runtime.JSX.Element;
|
|
515
|
+
/** The frame of a toolbar (e.g. the bar at the bottom of a diagram, or of a Studio canvas), with tooltips */
|
|
516
|
+
declare const Toolbar: ({ children }: {
|
|
517
|
+
children: ReactNode;
|
|
518
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
477
519
|
|
|
478
520
|
interface MermaidViewProps {
|
|
479
521
|
nodes: Node[];
|
|
480
522
|
edges: Edge[];
|
|
481
523
|
maxTextSize?: number;
|
|
524
|
+
/** The diagram's levels of detail, shown in the toolbar as on the diagram */
|
|
525
|
+
levels?: CanvasLevel[];
|
|
526
|
+
/** Zoom with the wheel; otherwise only with Ctrl or Cmd held (or a pinch), as on the diagram */
|
|
527
|
+
zoomOnScroll?: boolean;
|
|
528
|
+
/** Goes back to the diagram (the toolbar's Mermaid toggle, which is on here) */
|
|
529
|
+
onShowDiagram?: () => void;
|
|
482
530
|
}
|
|
483
|
-
declare const MermaidView: ({ nodes, edges, maxTextSize, }: MermaidViewProps) => react_jsx_runtime.JSX.Element;
|
|
531
|
+
declare const MermaidView: ({ nodes, edges, maxTextSize, levels, zoomOnScroll, onShowDiagram, }: MermaidViewProps) => react_jsx_runtime.JSX.Element;
|
|
484
532
|
|
|
485
533
|
/**
|
|
486
534
|
* A diagram's background: dots on the canvas colour (`.react-flow` in styles-core.css), the same wherever a
|
|
@@ -488,6 +536,12 @@ declare const MermaidView: ({ nodes, edges, maxTextSize, }: MermaidViewProps) =>
|
|
|
488
536
|
*/
|
|
489
537
|
declare const DiagramBackground: react.NamedExoticComponent<object>;
|
|
490
538
|
|
|
539
|
+
/**
|
|
540
|
+
* A diagram's minimap: each node in its resource's colour, and domains and systems as outlined containers with
|
|
541
|
+
* what's in them inside, as the diagram draws them. The same wherever a diagram is drawn (the visualiser and Studio).
|
|
542
|
+
*/
|
|
543
|
+
declare const DiagramMiniMap: react.NamedExoticComponent<object>;
|
|
544
|
+
|
|
491
545
|
/**
|
|
492
546
|
* A diagram's legend: how many of each kind of node it shows (and of each domain's, when steps are grouped by
|
|
493
547
|
* domain), with the kind's icon. Clicking an entry hides or shows those nodes. Studio's canvases have the same one.
|
|
@@ -508,29 +562,6 @@ declare const LegendPanel: react.NamedExoticComponent<{
|
|
|
508
562
|
onLegendClick: (key: string) => void;
|
|
509
563
|
}>;
|
|
510
564
|
|
|
511
|
-
/** A button in a toolbar, with its tooltip (what it does, and why it can't be used when it can't) */
|
|
512
|
-
declare const ToolbarButton: ({ label, hint, active, disabled, onClick, children, }: {
|
|
513
|
-
label: string;
|
|
514
|
-
/** Shown under the label on hover */
|
|
515
|
-
hint?: string;
|
|
516
|
-
active?: boolean;
|
|
517
|
-
disabled?: boolean;
|
|
518
|
-
onClick: () => void;
|
|
519
|
-
children: ReactNode;
|
|
520
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
521
|
-
/**
|
|
522
|
-
* How far the canvas is zoomed in, as a percentage. Isolated, so what it's in only re-renders when the zoom changes
|
|
523
|
-
* (not on every pan). Studio's bar shows it too.
|
|
524
|
-
*/
|
|
525
|
-
declare const ZoomLevel: react.NamedExoticComponent<{
|
|
526
|
-
className?: string;
|
|
527
|
-
}>;
|
|
528
|
-
declare const ToolbarDivider: () => react_jsx_runtime.JSX.Element;
|
|
529
|
-
/** The frame of a toolbar (e.g. the bar at the bottom of a diagram, or of a Studio canvas), with tooltips */
|
|
530
|
-
declare const Toolbar: ({ children }: {
|
|
531
|
-
children: ReactNode;
|
|
532
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
533
|
-
|
|
534
565
|
/** Tooltips for a group of controls (e.g. a toolbar): shown after a moment, then straight away while moving along */
|
|
535
566
|
declare const TipProvider: ({ children }: {
|
|
536
567
|
children: ReactNode;
|
|
@@ -1054,21 +1085,6 @@ declare const edgeTypes: {
|
|
|
1054
1085
|
step: react.NamedExoticComponent<_xyflow_react.EdgeProps>;
|
|
1055
1086
|
};
|
|
1056
1087
|
|
|
1057
|
-
/**
|
|
1058
|
-
* Mermaid Export Utility
|
|
1059
|
-
* Converts React Flow nodes and edges to Mermaid flowchart syntax
|
|
1060
|
-
*/
|
|
1061
|
-
interface MermaidExportOptions {
|
|
1062
|
-
/** Include class definitions for styling */
|
|
1063
|
-
includeStyles?: boolean;
|
|
1064
|
-
/** Direction of the flowchart: LR (left-right), TB (top-bottom), etc. */
|
|
1065
|
-
direction?: "LR" | "TB" | "RL" | "BT";
|
|
1066
|
-
}
|
|
1067
|
-
/**
|
|
1068
|
-
* Convert React Flow nodes and edges to Mermaid flowchart syntax
|
|
1069
|
-
*/
|
|
1070
|
-
declare function convertToMermaid(graphNodes: Node[], edges: Edge[], options?: MermaidExportOptions): string;
|
|
1071
|
-
|
|
1072
1088
|
declare const exportNodeGraphForStudio: (data: ReactFlowJsonObject) => ReactFlowJsonObject;
|
|
1073
1089
|
|
|
1074
1090
|
interface BaseCollectionData {
|
|
@@ -1135,4 +1151,4 @@ declare const memoNode: <P extends object>(Component: ComponentType<P>) => react
|
|
|
1135
1151
|
*/
|
|
1136
1152
|
declare const pauseEdgeAnimations: (canvas: Element | null, paused: boolean) => void | undefined;
|
|
1137
1153
|
|
|
1138
|
-
export { ACTOR, AGENT, AGENT_TOOL, _default$p as Actor, type ActorNode, type Agent$1 as Agent, _default$j as AgentNode, type AgentTool$1 as AgentTool, _default$k as AgentToolNode, type AgentToolNode as AgentToolNodeType, AnimatedMessageEdge, type BaseNodeData, CHANNEL, COMMAND, type Channel, type ChannelNode, _default$g as Command, type CommandNode, _default$8 as ContextActorNode, type ContextMenuItem, _default$c as CustomNode, DATA, DIAGRAM_FIT_VIEW_OPTIONS, DIAGRAM_MENU, DIAGRAM_MENU_BUTTON, DIAGRAM_MENU_BUTTON_COMPACT, DIAGRAM_MENU_BUTTON_ICON, DIAGRAM_MENU_BUTTON_ICON_COMPACT, DIAGRAM_MENU_ITEM, DIAGRAM_MENU_ITEM_ICON, DIAGRAM_MENU_SEPARATOR, DIAGRAM_MENU_TITLE, type Data, type DataNode, _default$t as DataProductNode, DiagramBackground, _default$a as DomainCardNode, _default$b as DomainNode, type DslGraph, ENTITY_TARGET_HANDLE_ID, EVENT, type EdgeType, _default$d as EntityNode, type EntityProperty, _default$f as Event, type EventCatalogResource, type EventNode, type ExternalSystem, _default$2 as ExternalSystem2Node, type ExternalSystemNode, _default$r as Field, type FieldNode as FieldNodeType, _default$1 as FlowEdge, _default$s as FlowExpandedNode, type FlowGroupBy, type FlowGroupStyle, _default$6 as FlowNode, FocusModeModal, type GraphEdge, type GraphEdgeType, type GraphNode, _default$5 as GroupNode, LabelledDefaultEdge, LabelledSmoothStepEdge, LabelledStepEdge, type LegendEntry, LegendPanel, MESSAGE,
|
|
1154
|
+
export { ACTOR, AGENT, AGENT_TOOL, _default$p as Actor, type ActorNode, type Agent$1 as Agent, _default$j as AgentNode, type AgentTool$1 as AgentTool, _default$k as AgentToolNode, type AgentToolNode as AgentToolNodeType, AnimatedMessageEdge, type BaseNodeData, CHANNEL, COMMAND, type Channel, type ChannelNode, _default$g as Command, type CommandNode, _default$8 as ContextActorNode, type ContextMenuItem, _default$c as CustomNode, DATA, DIAGRAM_FIT_VIEW_OPTIONS, DIAGRAM_MENU, DIAGRAM_MENU_BUTTON, DIAGRAM_MENU_BUTTON_COMPACT, DIAGRAM_MENU_BUTTON_ICON, DIAGRAM_MENU_BUTTON_ICON_COMPACT, DIAGRAM_MENU_ITEM, DIAGRAM_MENU_ITEM_ICON, DIAGRAM_MENU_SEPARATOR, DIAGRAM_MENU_TITLE, type Data, type DataNode, _default$t as DataProductNode, DiagramBackground, DiagramMiniMap, _default$a as DomainCardNode, _default$b as DomainNode, type DslGraph, ENTITY_TARGET_HANDLE_ID, EVENT, type EdgeType, _default$d as EntityNode, type EntityProperty, _default$f as Event, type EventCatalogResource, type EventNode, type ExternalSystem, _default$2 as ExternalSystem2Node, type ExternalSystemNode, _default$r as Field, type FieldNode as FieldNodeType, _default$1 as FlowEdge, _default$s as FlowExpandedNode, type FlowGroupBy, type FlowGroupStyle, _default$6 as FlowNode, FocusModeModal, type GraphEdge, type GraphEdgeType, type GraphNode, _default$5 as GroupNode, LabelledDefaultEdge, LabelledSmoothStepEdge, LabelledStepEdge, type LegendEntry, LegendPanel, MESSAGE, MermaidView, type Message, _default$u as MessageGroupExpandedNode, type MessageGroupExpandedNodeData, _default$v as MessageGroupNode, type MessageGroupNodeData, type MessageGroupNode as MessageGroupNodeType, _default as MultilineEdgeLabel, type NodeCategory, type NodeConfiguration, _default$w as NodeContextMenu, NodeGraph, type NodeGraphProps, type NodeType, _default$l as Note, type NoteNode, NotesIndicator, type OpenInStudioRequest, OwnerIndicator, QUERY, _default$h as Query, type QueryNode, type RegisteredNode, SERVICE, _default$i as Service, type ServiceNode, type Service as ServiceType, _default$4 as StepNode, _default$x as StepWalkthrough, _default$7 as SystemGroupNode, _default$9 as SystemNode, Tip, TipProvider, Toolbar, ToolbarButton, ToolbarDivider, _default$3 as UserNode, VIEW, type View, type ViewNode, VisualiserSearch, type VisualiserSnapshot, type VisualizerCallbacks, type VisualizerLink, type VisualizerMode, ZoomLevel, _default$o as actorConfig, buildNodeData, createEdge, createNode, _default$n as dataNodeConfig, diagramNodeComponents, edgeTypes, _default$e as eventConfig, exportNodeGraphForStudio, _default$m as externalSystemConfig, _default$q as fieldConfig, generateIdForNode, generateIdForNodes, generatedIdForEdge, getColorFromString, getEdgeLabelForMessageAsSource, getEdgeLabelForServiceAsTarget, getEdgeLabelSize, getLegend, getNestedEntityProperties, getPropertyTypeLabel, isFlowGroupBy, layoutGraph, memoNode, nodeComponents, nodeConfigs, normalizeOwners, pauseEdgeAnimations };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _xyflow_react from '@xyflow/react';
|
|
2
2
|
import { Node, Connection, MarkerType, Edge, NodeTypes, EdgeTypes, NodeProps, EdgeProps, ReactFlowJsonObject } from '@xyflow/react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { C as CopiedEdgeRoute } from './
|
|
4
|
+
import { C as CopiedEdgeRoute } from './export-mermaid-xL98eL1l.js';
|
|
5
|
+
export { M as MermaidExportOptions, c as convertToMermaid } from './export-mermaid-xL98eL1l.js';
|
|
5
6
|
import * as react from 'react';
|
|
6
7
|
import react__default, { ReactNode, ComponentType } from 'react';
|
|
7
8
|
|
|
@@ -394,6 +395,17 @@ type OpenInStudioRequest = {
|
|
|
394
395
|
};
|
|
395
396
|
interface NodeGraphProps {
|
|
396
397
|
id: string;
|
|
398
|
+
/**
|
|
399
|
+
* Keeps the Mermaid view in the page's URL (`?render=mermaid`), so links open
|
|
400
|
+
* in it. Only for the visualiser's own pages: not diagrams embedded in docs
|
|
401
|
+
* or other apps, which can share a page (or an iframe) with others.
|
|
402
|
+
*/
|
|
403
|
+
syncRenderModeWithUrl?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* The level of detail to open at (1, 2 or 3), rather than the URL's or the
|
|
406
|
+
* saved one, e.g. the level an MCP client asked for
|
|
407
|
+
*/
|
|
408
|
+
initialLevel?: 1 | 2 | 3;
|
|
397
409
|
title?: string;
|
|
398
410
|
href?: string;
|
|
399
411
|
hrefLabel?: string;
|
|
@@ -473,14 +485,50 @@ interface NodeGraphProps {
|
|
|
473
485
|
/** Starts a Studio canvas from what the diagram shows (the menu has "Open in Studio" when set) */
|
|
474
486
|
onOpenInStudio?: (request: OpenInStudioRequest) => void;
|
|
475
487
|
}
|
|
476
|
-
declare const NodeGraph: ({ id, nodes: nodesProp, edges: edgesProp, graph, title: titleProp, href, linkTo, hrefLabel, includeKey: includeKeyProp, footerLabel, linksToVisualiser, links, mode, portalId, showFlowWalkthrough, showSearch: showSearchProp, showMenu, compactSearch, hideAttribution, zoomOnScroll, designId, isChatEnabled, maxTextSize, isDevMode, resourceKey, animated: animatedProp, disableMessageAnimation, overviewGraph, hiddenMessagesGraph, preferenceScope, swimlanes, focusNodeId, focusRequestId, fitRequestId, onNodeClick, onBuildUrl, onNavigate, onSaveLayout, onResetLayout, onOpenInStudio, }: NodeGraphProps) => react_jsx_runtime.JSX.Element | null;
|
|
488
|
+
declare const NodeGraph: ({ id, nodes: nodesProp, edges: edgesProp, graph, title: titleProp, href, linkTo, hrefLabel, includeKey: includeKeyProp, footerLabel, linksToVisualiser, links, syncRenderModeWithUrl, initialLevel, mode, portalId, showFlowWalkthrough, showSearch: showSearchProp, showMenu, compactSearch, hideAttribution, zoomOnScroll, designId, isChatEnabled, maxTextSize, isDevMode, resourceKey, animated: animatedProp, disableMessageAnimation, overviewGraph, hiddenMessagesGraph, preferenceScope, swimlanes, focusNodeId, focusRequestId, fitRequestId, onNodeClick, onBuildUrl, onNavigate, onSaveLayout, onResetLayout, onOpenInStudio, }: NodeGraphProps) => react_jsx_runtime.JSX.Element | null;
|
|
489
|
+
|
|
490
|
+
type CanvasLevel = {
|
|
491
|
+
description: string;
|
|
492
|
+
active: boolean;
|
|
493
|
+
/** Why the level is greyed out (e.g. the diagram doesn't have it), shown on hover */
|
|
494
|
+
disabledReason?: string;
|
|
495
|
+
onSelect: () => void;
|
|
496
|
+
};
|
|
497
|
+
/** A button in a toolbar, with its tooltip (what it does, and why it can't be used when it can't) */
|
|
498
|
+
declare const ToolbarButton: ({ label, hint, active, disabled, onClick, children, }: {
|
|
499
|
+
label: string;
|
|
500
|
+
/** Shown under the label on hover */
|
|
501
|
+
hint?: string;
|
|
502
|
+
active?: boolean;
|
|
503
|
+
disabled?: boolean;
|
|
504
|
+
onClick: () => void;
|
|
505
|
+
children: ReactNode;
|
|
506
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
507
|
+
/**
|
|
508
|
+
* How far the canvas is zoomed in, as a percentage. Isolated, so what it's in only re-renders when the zoom changes
|
|
509
|
+
* (not on every pan). Studio's bar shows it too.
|
|
510
|
+
*/
|
|
511
|
+
declare const ZoomLevel: react.NamedExoticComponent<{
|
|
512
|
+
className?: string;
|
|
513
|
+
}>;
|
|
514
|
+
declare const ToolbarDivider: () => react_jsx_runtime.JSX.Element;
|
|
515
|
+
/** The frame of a toolbar (e.g. the bar at the bottom of a diagram, or of a Studio canvas), with tooltips */
|
|
516
|
+
declare const Toolbar: ({ children }: {
|
|
517
|
+
children: ReactNode;
|
|
518
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
477
519
|
|
|
478
520
|
interface MermaidViewProps {
|
|
479
521
|
nodes: Node[];
|
|
480
522
|
edges: Edge[];
|
|
481
523
|
maxTextSize?: number;
|
|
524
|
+
/** The diagram's levels of detail, shown in the toolbar as on the diagram */
|
|
525
|
+
levels?: CanvasLevel[];
|
|
526
|
+
/** Zoom with the wheel; otherwise only with Ctrl or Cmd held (or a pinch), as on the diagram */
|
|
527
|
+
zoomOnScroll?: boolean;
|
|
528
|
+
/** Goes back to the diagram (the toolbar's Mermaid toggle, which is on here) */
|
|
529
|
+
onShowDiagram?: () => void;
|
|
482
530
|
}
|
|
483
|
-
declare const MermaidView: ({ nodes, edges, maxTextSize, }: MermaidViewProps) => react_jsx_runtime.JSX.Element;
|
|
531
|
+
declare const MermaidView: ({ nodes, edges, maxTextSize, levels, zoomOnScroll, onShowDiagram, }: MermaidViewProps) => react_jsx_runtime.JSX.Element;
|
|
484
532
|
|
|
485
533
|
/**
|
|
486
534
|
* A diagram's background: dots on the canvas colour (`.react-flow` in styles-core.css), the same wherever a
|
|
@@ -488,6 +536,12 @@ declare const MermaidView: ({ nodes, edges, maxTextSize, }: MermaidViewProps) =>
|
|
|
488
536
|
*/
|
|
489
537
|
declare const DiagramBackground: react.NamedExoticComponent<object>;
|
|
490
538
|
|
|
539
|
+
/**
|
|
540
|
+
* A diagram's minimap: each node in its resource's colour, and domains and systems as outlined containers with
|
|
541
|
+
* what's in them inside, as the diagram draws them. The same wherever a diagram is drawn (the visualiser and Studio).
|
|
542
|
+
*/
|
|
543
|
+
declare const DiagramMiniMap: react.NamedExoticComponent<object>;
|
|
544
|
+
|
|
491
545
|
/**
|
|
492
546
|
* A diagram's legend: how many of each kind of node it shows (and of each domain's, when steps are grouped by
|
|
493
547
|
* domain), with the kind's icon. Clicking an entry hides or shows those nodes. Studio's canvases have the same one.
|
|
@@ -508,29 +562,6 @@ declare const LegendPanel: react.NamedExoticComponent<{
|
|
|
508
562
|
onLegendClick: (key: string) => void;
|
|
509
563
|
}>;
|
|
510
564
|
|
|
511
|
-
/** A button in a toolbar, with its tooltip (what it does, and why it can't be used when it can't) */
|
|
512
|
-
declare const ToolbarButton: ({ label, hint, active, disabled, onClick, children, }: {
|
|
513
|
-
label: string;
|
|
514
|
-
/** Shown under the label on hover */
|
|
515
|
-
hint?: string;
|
|
516
|
-
active?: boolean;
|
|
517
|
-
disabled?: boolean;
|
|
518
|
-
onClick: () => void;
|
|
519
|
-
children: ReactNode;
|
|
520
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
521
|
-
/**
|
|
522
|
-
* How far the canvas is zoomed in, as a percentage. Isolated, so what it's in only re-renders when the zoom changes
|
|
523
|
-
* (not on every pan). Studio's bar shows it too.
|
|
524
|
-
*/
|
|
525
|
-
declare const ZoomLevel: react.NamedExoticComponent<{
|
|
526
|
-
className?: string;
|
|
527
|
-
}>;
|
|
528
|
-
declare const ToolbarDivider: () => react_jsx_runtime.JSX.Element;
|
|
529
|
-
/** The frame of a toolbar (e.g. the bar at the bottom of a diagram, or of a Studio canvas), with tooltips */
|
|
530
|
-
declare const Toolbar: ({ children }: {
|
|
531
|
-
children: ReactNode;
|
|
532
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
533
|
-
|
|
534
565
|
/** Tooltips for a group of controls (e.g. a toolbar): shown after a moment, then straight away while moving along */
|
|
535
566
|
declare const TipProvider: ({ children }: {
|
|
536
567
|
children: ReactNode;
|
|
@@ -1054,21 +1085,6 @@ declare const edgeTypes: {
|
|
|
1054
1085
|
step: react.NamedExoticComponent<_xyflow_react.EdgeProps>;
|
|
1055
1086
|
};
|
|
1056
1087
|
|
|
1057
|
-
/**
|
|
1058
|
-
* Mermaid Export Utility
|
|
1059
|
-
* Converts React Flow nodes and edges to Mermaid flowchart syntax
|
|
1060
|
-
*/
|
|
1061
|
-
interface MermaidExportOptions {
|
|
1062
|
-
/** Include class definitions for styling */
|
|
1063
|
-
includeStyles?: boolean;
|
|
1064
|
-
/** Direction of the flowchart: LR (left-right), TB (top-bottom), etc. */
|
|
1065
|
-
direction?: "LR" | "TB" | "RL" | "BT";
|
|
1066
|
-
}
|
|
1067
|
-
/**
|
|
1068
|
-
* Convert React Flow nodes and edges to Mermaid flowchart syntax
|
|
1069
|
-
*/
|
|
1070
|
-
declare function convertToMermaid(graphNodes: Node[], edges: Edge[], options?: MermaidExportOptions): string;
|
|
1071
|
-
|
|
1072
1088
|
declare const exportNodeGraphForStudio: (data: ReactFlowJsonObject) => ReactFlowJsonObject;
|
|
1073
1089
|
|
|
1074
1090
|
interface BaseCollectionData {
|
|
@@ -1135,4 +1151,4 @@ declare const memoNode: <P extends object>(Component: ComponentType<P>) => react
|
|
|
1135
1151
|
*/
|
|
1136
1152
|
declare const pauseEdgeAnimations: (canvas: Element | null, paused: boolean) => void | undefined;
|
|
1137
1153
|
|
|
1138
|
-
export { ACTOR, AGENT, AGENT_TOOL, _default$p as Actor, type ActorNode, type Agent$1 as Agent, _default$j as AgentNode, type AgentTool$1 as AgentTool, _default$k as AgentToolNode, type AgentToolNode as AgentToolNodeType, AnimatedMessageEdge, type BaseNodeData, CHANNEL, COMMAND, type Channel, type ChannelNode, _default$g as Command, type CommandNode, _default$8 as ContextActorNode, type ContextMenuItem, _default$c as CustomNode, DATA, DIAGRAM_FIT_VIEW_OPTIONS, DIAGRAM_MENU, DIAGRAM_MENU_BUTTON, DIAGRAM_MENU_BUTTON_COMPACT, DIAGRAM_MENU_BUTTON_ICON, DIAGRAM_MENU_BUTTON_ICON_COMPACT, DIAGRAM_MENU_ITEM, DIAGRAM_MENU_ITEM_ICON, DIAGRAM_MENU_SEPARATOR, DIAGRAM_MENU_TITLE, type Data, type DataNode, _default$t as DataProductNode, DiagramBackground, _default$a as DomainCardNode, _default$b as DomainNode, type DslGraph, ENTITY_TARGET_HANDLE_ID, EVENT, type EdgeType, _default$d as EntityNode, type EntityProperty, _default$f as Event, type EventCatalogResource, type EventNode, type ExternalSystem, _default$2 as ExternalSystem2Node, type ExternalSystemNode, _default$r as Field, type FieldNode as FieldNodeType, _default$1 as FlowEdge, _default$s as FlowExpandedNode, type FlowGroupBy, type FlowGroupStyle, _default$6 as FlowNode, FocusModeModal, type GraphEdge, type GraphEdgeType, type GraphNode, _default$5 as GroupNode, LabelledDefaultEdge, LabelledSmoothStepEdge, LabelledStepEdge, type LegendEntry, LegendPanel, MESSAGE,
|
|
1154
|
+
export { ACTOR, AGENT, AGENT_TOOL, _default$p as Actor, type ActorNode, type Agent$1 as Agent, _default$j as AgentNode, type AgentTool$1 as AgentTool, _default$k as AgentToolNode, type AgentToolNode as AgentToolNodeType, AnimatedMessageEdge, type BaseNodeData, CHANNEL, COMMAND, type Channel, type ChannelNode, _default$g as Command, type CommandNode, _default$8 as ContextActorNode, type ContextMenuItem, _default$c as CustomNode, DATA, DIAGRAM_FIT_VIEW_OPTIONS, DIAGRAM_MENU, DIAGRAM_MENU_BUTTON, DIAGRAM_MENU_BUTTON_COMPACT, DIAGRAM_MENU_BUTTON_ICON, DIAGRAM_MENU_BUTTON_ICON_COMPACT, DIAGRAM_MENU_ITEM, DIAGRAM_MENU_ITEM_ICON, DIAGRAM_MENU_SEPARATOR, DIAGRAM_MENU_TITLE, type Data, type DataNode, _default$t as DataProductNode, DiagramBackground, DiagramMiniMap, _default$a as DomainCardNode, _default$b as DomainNode, type DslGraph, ENTITY_TARGET_HANDLE_ID, EVENT, type EdgeType, _default$d as EntityNode, type EntityProperty, _default$f as Event, type EventCatalogResource, type EventNode, type ExternalSystem, _default$2 as ExternalSystem2Node, type ExternalSystemNode, _default$r as Field, type FieldNode as FieldNodeType, _default$1 as FlowEdge, _default$s as FlowExpandedNode, type FlowGroupBy, type FlowGroupStyle, _default$6 as FlowNode, FocusModeModal, type GraphEdge, type GraphEdgeType, type GraphNode, _default$5 as GroupNode, LabelledDefaultEdge, LabelledSmoothStepEdge, LabelledStepEdge, type LegendEntry, LegendPanel, MESSAGE, MermaidView, type Message, _default$u as MessageGroupExpandedNode, type MessageGroupExpandedNodeData, _default$v as MessageGroupNode, type MessageGroupNodeData, type MessageGroupNode as MessageGroupNodeType, _default as MultilineEdgeLabel, type NodeCategory, type NodeConfiguration, _default$w as NodeContextMenu, NodeGraph, type NodeGraphProps, type NodeType, _default$l as Note, type NoteNode, NotesIndicator, type OpenInStudioRequest, OwnerIndicator, QUERY, _default$h as Query, type QueryNode, type RegisteredNode, SERVICE, _default$i as Service, type ServiceNode, type Service as ServiceType, _default$4 as StepNode, _default$x as StepWalkthrough, _default$7 as SystemGroupNode, _default$9 as SystemNode, Tip, TipProvider, Toolbar, ToolbarButton, ToolbarDivider, _default$3 as UserNode, VIEW, type View, type ViewNode, VisualiserSearch, type VisualiserSnapshot, type VisualizerCallbacks, type VisualizerLink, type VisualizerMode, ZoomLevel, _default$o as actorConfig, buildNodeData, createEdge, createNode, _default$n as dataNodeConfig, diagramNodeComponents, edgeTypes, _default$e as eventConfig, exportNodeGraphForStudio, _default$m as externalSystemConfig, _default$q as fieldConfig, generateIdForNode, generateIdForNodes, generatedIdForEdge, getColorFromString, getEdgeLabelForMessageAsSource, getEdgeLabelForServiceAsTarget, getEdgeLabelSize, getLegend, getNestedEntityProperties, getPropertyTypeLabel, isFlowGroupBy, layoutGraph, memoNode, nodeComponents, nodeConfigs, normalizeOwners, pauseEdgeAnimations };
|