@likec4/diagram 1.57.0 → 1.59.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/LikeC4Diagram.js +1 -1
- package/dist/LikeC4Diagram.props.d.ts +1 -1
- package/dist/LikeC4Styles.js +1 -1
- package/dist/LikeC4View.js +2 -2
- package/dist/ReactLikeC4.d.ts +1 -1
- package/dist/base/Base.d.ts +3 -2
- package/dist/base/Base.js +14 -26
- package/dist/base/BaseXYFlow.d.ts +2 -1
- package/dist/base/BaseXYFlow.js +63 -4
- package/dist/base/keyboardZoom.d.ts +3 -0
- package/dist/base/keyboardZoom.js +20 -0
- package/dist/base/updateEdges.js +7 -16
- package/dist/base/updateNodes.js +3 -9
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +2 -1
- package/dist/base-primitives/compound/CompoundActionButton.js +5 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +2 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.js +5 -2
- package/dist/base-primitives/compound/CompoundNodeContainer.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundTitle.d.ts +7 -1
- package/dist/base-primitives/compound/CompoundTitle.js +2 -1
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +2 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +4 -2
- package/dist/base-primitives/edge/EdgeLabel.d.ts +2 -0
- package/dist/base-primitives/edge/EdgeLabel.js +2 -5
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeMarkers.d.ts +8 -8
- package/dist/base-primitives/element/ElementActionButtons.d.ts +2 -1
- package/dist/base-primitives/element/ElementActionButtons.js +4 -1
- package/dist/base-primitives/element/ElementData.d.ts +4 -2
- package/dist/base-primitives/element/ElementData.js +2 -1
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +2 -1
- package/dist/base-primitives/element/ElementDetailsButton.js +5 -2
- package/dist/base-primitives/element/ElementNodeContainer.js +1 -1
- package/dist/base-primitives/element/ElementShape.d.ts +1 -1
- package/dist/base-primitives/element/ElementShape.js +3 -0
- package/dist/base-primitives/element/ElementTags.d.ts +1 -1
- package/dist/base-primitives/element/ElementTags.js +1 -3
- package/dist/components/ErrorFallback.d.ts +2 -2
- package/dist/components/ErrorFallback.js +3 -5
- package/dist/components/Link.js +6 -6
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +1 -1
- package/dist/components/PortalToContainer.d.ts +1 -1
- package/dist/components/RootContainer.d.ts +1 -1
- package/dist/components/SearchControl.css.js +11 -11
- package/dist/components/SearchControl.d.ts +2 -2
- package/dist/components/ViewNotFound.d.ts +2 -2
- package/dist/context/CurrentViewModelProvider.d.ts +1 -1
- package/dist/context/DefaultMantineProvider.d.ts +1 -1
- package/dist/context/DiagramEventHandlers.d.ts +1 -1
- package/dist/context/EnsureMantine.d.ts +1 -1
- package/dist/context/FramerMotionConfig.d.ts +3 -3
- package/dist/context/FramerMotionConfig.js +2 -2
- package/dist/context/IconRenderer.d.ts +2 -2
- package/dist/context/IconRenderer.js +32 -12
- package/dist/context/LikeC4ModelContext.d.ts +1 -1
- package/dist/context/TagStylesContext.d.ts +4 -3
- package/dist/context/TagStylesContext.js +20 -22
- package/dist/custom/index.d.ts +1 -0
- package/dist/custom/index.js +3 -2
- package/dist/editor/LikeC4EditorProvider.d.ts +2 -2
- package/dist/editor/actor/actions.d.ts +74 -15
- package/dist/editor/actor/actions.js +91 -25
- package/dist/editor/actor/hotkey.d.ts +1 -1
- package/dist/editor/actor/hotkey.js +7 -0
- package/dist/editor/actor/machine.d.ts +4 -6
- package/dist/editor/actor/machine.js +1 -0
- package/dist/editor/actor/setup.d.ts +25 -4
- package/dist/editor/actor/setup.js +8 -6
- package/dist/editor/actor/state.editor.d.ts +64 -14
- package/dist/editor/actor/state.editor.js +12 -11
- package/dist/editor/actor/state.sync-queue.d.ts +283 -91
- package/dist/editor/actor/state.sync-queue.js +93 -56
- package/dist/editor/actor/types.d.ts +6 -1
- package/dist/editor/actor/types.js +1 -1
- package/dist/editor/useEditorActorLogic.js +14 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/safeContext.d.ts +156 -3
- package/dist/hooks/safeContext.js +60 -12
- package/dist/hooks/useCurrentViewModel.js +1 -1
- package/dist/hooks/useDiagram.d.ts +8 -0
- package/dist/hooks/useDiagram.js +9 -2
- package/dist/hooks/useEditorActor.d.ts +5 -0
- package/dist/hooks/useEditorActor.js +4 -3
- package/dist/hooks/useLikeC4ElementsTree.js +1 -1
- package/dist/hooks/useLikeC4Model.js +1 -1
- package/dist/hooks/useXYFlow.d.ts +1 -0
- package/dist/hooks/useXYFlow.js +5 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -2
- package/dist/likec4diagram/DiagramUI.d.ts +1 -1
- package/dist/likec4diagram/DiagramUI.js +19 -6
- package/dist/likec4diagram/DiagramXYFlow.js +54 -17
- package/dist/likec4diagram/convert-to-xyflow.d.ts +3 -5
- package/dist/likec4diagram/convert-to-xyflow.js +29 -10
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +140 -18
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +11 -4
- package/dist/likec4diagram/custom/edges/edges.css.d.ts +1 -0
- package/dist/likec4diagram/custom/edges/edges.css.js +6 -2
- package/dist/likec4diagram/custom/index.d.ts +2 -1
- package/dist/likec4diagram/custom/index.js +5 -3
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +1 -0
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +4 -4
- package/dist/likec4diagram/custom/nodes/ElementActions.js +13 -3
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +0 -4
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +32 -19
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.ts +2 -0
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +234 -0
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +7 -7
- package/dist/likec4diagram/custom/nodes/nodes.js +20 -5
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +15 -14
- package/dist/likec4diagram/relationship-popover/components.d.ts +2 -2
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.js +11 -20
- package/dist/likec4diagram/state/aligners.js +1 -1
- package/dist/likec4diagram/state/assign.d.ts +1 -1
- package/dist/likec4diagram/state/assign.js +1 -1
- package/dist/likec4diagram/state/createViewChange.js +2 -1
- package/dist/likec4diagram/state/diagram-api.d.ts +18 -10
- package/dist/likec4diagram/state/diagram-api.js +333 -229
- package/dist/likec4diagram/state/machine.actions.d.ts +1026 -332
- package/dist/likec4diagram/state/machine.actions.js +118 -46
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +123 -51
- package/dist/likec4diagram/state/machine.actions.layout.js +40 -33
- package/dist/likec4diagram/state/machine.d.ts +154 -16
- package/dist/likec4diagram/state/machine.js +5 -41
- package/dist/likec4diagram/state/machine.setup.d.ts +84 -19
- package/dist/likec4diagram/state/machine.setup.js +65 -12
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +59 -33
- package/dist/likec4diagram/state/machine.state.navigating.js +7 -3
- package/dist/likec4diagram/state/machine.state.ready.d.ts +1540 -476
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +294 -53
- package/dist/likec4diagram/state/machine.state.ready.focused.js +3 -3
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +264 -73
- package/dist/likec4diagram/state/machine.state.ready.idle.js +31 -6
- package/dist/likec4diagram/state/machine.state.ready.js +22 -16
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +23 -9
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +288 -84
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +135 -66
- package/dist/likec4diagram/state/types.d.ts +4 -2
- package/dist/likec4diagram/state/utils.d.ts +7 -0
- package/dist/likec4diagram/state/utils.js +36 -34
- package/dist/likec4diagram/types.d.ts +49 -3
- package/dist/likec4diagram/ui/FloatingSequenceActors.d.ts +6 -0
- package/dist/likec4diagram/ui/FloatingSequenceActors.js +155 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +1 -1
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +2 -2
- package/dist/likec4diagram/ui/index.d.ts +2 -0
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -5
- package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +519 -0
- package/dist/likec4diagram/ui/sequence-outline/state.d.ts +36 -0
- package/dist/likec4diagram/ui/sequence-outline/state.js +55 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +1 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +116 -62
- package/dist/likec4diagram/xyflow-sequence/_types.d.ts +55 -5
- package/dist/likec4diagram/xyflow-sequence/const.d.ts +5 -5
- package/dist/likec4diagram/xyflow-sequence/const.js +4 -4
- package/dist/likec4diagram/xyflow-sequence/layouter.d.ts +30 -6
- package/dist/likec4diagram/xyflow-sequence/layouter.js +561 -0
- package/dist/likec4diagram/xyflow-sequence/{sequence-layout.d.ts → sequence-view-to-xy.d.ts} +8 -2
- package/dist/likec4diagram/xyflow-sequence/{sequence-layout.js → sequence-view-to-xy.js} +112 -14
- package/dist/likec4diagram/xyflow-sequence/sequence-view.d.ts +2 -7
- package/dist/likec4diagram/xyflow-sequence/sequence-view.js +144 -0
- package/dist/likec4diagram/xyflow-sequence/utils.d.ts +9 -1
- package/dist/likec4diagram/xyflow-sequence/utils.js +96 -0
- package/dist/navigationpanel/NavigationPanel.d.ts +5 -2
- package/dist/navigationpanel/NavigationPanel.js +58 -59
- package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +47 -40
- package/dist/navigationpanel/_common.d.ts +2 -2
- package/dist/navigationpanel/_common.js +2 -2
- package/dist/navigationpanel/actor.actions.d.ts +19 -0
- package/dist/navigationpanel/actor.actions.js +45 -0
- package/dist/navigationpanel/actor.d.ts +34 -96
- package/dist/navigationpanel/actor.js +21 -84
- package/dist/navigationpanel/actor.setup.d.ts +98 -0
- package/dist/navigationpanel/actor.setup.js +31 -0
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +4 -5
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +1 -1
- package/dist/navigationpanel/controls/DetailsControls.d.ts +1 -1
- package/dist/navigationpanel/controls/DetailsControls.js +7 -8
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +1 -1
- package/dist/navigationpanel/controls/LogoButton.d.ts +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
- package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/styles.js +8 -8
- package/dist/navigationpanel/hooks.d.ts +20 -5
- package/dist/navigationpanel/hooks.js +4 -18
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +2 -2
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +5 -5
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +23 -25
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +5 -5
- package/dist/overlays/Overlays.d.ts +4 -2
- package/dist/overlays/Overlays.js +10 -10
- package/dist/overlays/element-details/ElementDetails.d.ts +1 -1
- package/dist/overlays/element-details/ElementDetailsCard.css.js +17 -17
- package/dist/overlays/element-details/ElementDetailsCard.d.ts +1 -1
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -2
- package/dist/overlays/element-details/MetadataValue.js +15 -15
- package/dist/overlays/element-details/TabPanelDeployments.css.js +5 -5
- package/dist/overlays/element-details/TabPanelRelationships.css.js +11 -11
- package/dist/overlays/element-details/TabPanelRelationships.d.ts +1 -1
- package/dist/overlays/element-details/TabPanelRelationships.js +1 -1
- package/dist/overlays/element-details/TabPanelStructure.css.js +2 -2
- package/dist/overlays/element-details/TabPanelStructure.d.ts +2 -2
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +2 -3
- package/dist/overlays/hooks.d.ts +28 -0
- package/dist/overlays/hooks.js +5 -0
- package/dist/overlays/overlay/Overlay.js +34 -25
- package/dist/overlays/overlaysActor.js +0 -1
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +1 -1
- package/dist/overlays/relationship-details/SelectEdge.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +4 -4
- package/dist/overlays/relationship-details/custom/nodeTypes.js +1 -1
- package/dist/overlays/relationship-details/layout.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +1 -1
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/SelectElement.d.ts +1 -1
- package/dist/overlays/relationships-browser/actor.js +79 -78
- package/dist/overlays/relationships-browser/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/EmptyNode.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +4 -4
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +1 -1
- package/dist/overlays/relationships-browser/hooks.js +1 -1
- package/dist/overlays/relationships-browser/layout.js +2 -2
- package/dist/projects-overview/ProjectsOverview.d.ts +1 -1
- package/dist/projects-overview/actor.js +4 -4
- package/dist/projects-overview/custom/nodeTypes.d.ts +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.d.ts +1 -1
- package/dist/search/Search.d.ts +1 -1
- package/dist/search/Search.js +1 -1
- package/dist/search/XStateSearchAdapter.d.ts +1 -1
- package/dist/search/components/ElementsColumn.css.js +2 -2
- package/dist/search/components/ElementsColumn.d.ts +1 -1
- package/dist/search/components/PickView.d.ts +1 -1
- package/dist/search/components/SearchByTags.d.ts +1 -1
- package/dist/search/components/SearchInput.d.ts +1 -1
- package/dist/search/components/ViewsColum.d.ts +3 -3
- package/dist/search/components/ViewsColum.js +1 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/components/_shared.css.js +23 -23
- package/dist/search/components/styles.css.js +4 -4
- package/dist/shadowroot/ShadowRoot.d.ts +2 -3
- package/dist/shadowroot/ShadowRoot.js +95 -41
- package/dist/shadowroot/index.d.ts +1 -0
- package/dist/styles2.js +1 -1
- package/dist/utils/defineActors.d.ts +21 -0
- package/dist/utils/defineActors.js +13 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +5 -4
- package/dist/utils/readableText.d.ts +11 -0
- package/dist/utils/readableText.js +18 -0
- package/package.json +30 -43
- package/panda.buildinfo.json +271 -295
- package/styles-min.css +1 -1
- package/styles-xyflow.css +1 -1
- package/styles.css +1 -1
- package/adhoc-editor/package.json +0 -4
- package/dist/adhoc-editor/EditorPanel.d.ts +0 -1
- package/dist/adhoc-editor/EditorPanel.js +0 -106
- package/dist/adhoc-editor/ElementsTree.d.ts +0 -2
- package/dist/adhoc-editor/ElementsTree.js +0 -112
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +0 -4
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +0 -83
- package/dist/adhoc-editor/components/Tree.d.ts +0 -48
- package/dist/adhoc-editor/components/Tree.js +0 -213
- package/dist/adhoc-editor/hooks.d.ts +0 -14
- package/dist/adhoc-editor/hooks.js +0 -34
- package/dist/adhoc-editor/index.d.ts +0 -2
- package/dist/adhoc-editor/index.js +0 -2
- package/dist/adhoc-editor/state/ActorProvider.d.ts +0 -5
- package/dist/adhoc-editor/state/ActorProvider.js +0 -37
- package/dist/adhoc-editor/state/actor.d.ts +0 -13
- package/dist/adhoc-editor/state/actor.editor.d.ts +0 -56
- package/dist/adhoc-editor/state/actor.editor.js +0 -167
- package/dist/adhoc-editor/state/actor.js +0 -14
- package/dist/adhoc-editor/state/actor.layouter.d.ts +0 -51
- package/dist/adhoc-editor/state/actor.layouter.js +0 -54
- package/dist/adhoc-editor/state/actor.types.d.ts +0 -63
- package/dist/adhoc-editor/state/actor.types.js +0 -25
- package/dist/adhoc-editor/state/panel.d.ts +0 -95
- package/dist/adhoc-editor/state/panel.js +0 -124
- package/dist/adhoc-editor/state/utils.d.ts +0 -17
- package/dist/adhoc-editor/state/utils.js +0 -25
- package/dist/adhoc-editor/useElementsTree.d.ts +0 -18
- package/dist/adhoc-editor/useElementsTree.js +0 -98
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +0 -6
- package/dist/shadowroot/styles.css.d.ts +0 -12
- package/dist/shadowroot/styles.css.js +0 -59
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Types } from '../../types';
|
|
2
|
-
export declare function SequenceStepEdge(props: Types.EdgeProps<'seq-step'>): import("react
|
|
2
|
+
export declare function SequenceStepEdge(props: Types.EdgeProps<'seq-step'>): import("react").JSX.Element;
|
|
@@ -41,8 +41,10 @@ function SequenceStepEdge(props) {
|
|
|
41
41
|
labelX = props.sourceX + LABEL_OFFSET;
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
|
+
const { state, stepnum } = props.data;
|
|
44
45
|
return /* @__PURE__ */ jsxs(EdgeContainer, {
|
|
45
46
|
...props,
|
|
47
|
+
...state && { "data-seq-edge-state": state },
|
|
46
48
|
children: [
|
|
47
49
|
/* @__PURE__ */ jsx(EdgePath, {
|
|
48
50
|
edgeProps: props,
|
|
@@ -61,10 +63,15 @@ function SequenceStepEdge(props) {
|
|
|
61
63
|
},
|
|
62
64
|
children: /* @__PURE__ */ jsx(EdgeLabel, {
|
|
63
65
|
edgeProps: props,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
isSequenceStep: true,
|
|
67
|
+
stepNum: stepnum,
|
|
68
|
+
children: enableNavigateTo && navigateTo && /* @__PURE__ */ jsx(EdgeActionButton, {
|
|
69
|
+
ariaLabel: "Navigate to view",
|
|
70
|
+
onClick: (e) => {
|
|
71
|
+
e.stopPropagation();
|
|
72
|
+
diagram.navigateTo(navigateTo);
|
|
73
|
+
}
|
|
74
|
+
})
|
|
68
75
|
})
|
|
69
76
|
})
|
|
70
77
|
]
|
|
@@ -12,6 +12,10 @@ var controlPointsContainer = css({
|
|
|
12
12
|
},
|
|
13
13
|
zIndex: "[100]"
|
|
14
14
|
});
|
|
15
|
+
var labelDraggable = css({
|
|
16
|
+
cursor: "grab!",
|
|
17
|
+
_active: { cursor: "grabbing!" }
|
|
18
|
+
});
|
|
15
19
|
var controlPoint = css({
|
|
16
20
|
fill: `[var(--xy-edge-stroke)]`,
|
|
17
21
|
stroke: `transparent`,
|
|
@@ -34,11 +38,11 @@ var controlPoint = css({
|
|
|
34
38
|
[`:where([data-likec4-selected='true']) &`]: { r: 6 },
|
|
35
39
|
[`:is([data-likec4-hovered='true']) &`]: { r: 8 },
|
|
36
40
|
_hover: {
|
|
37
|
-
fill: "mantine.
|
|
41
|
+
fill: "mantine.primary.filledHover",
|
|
38
42
|
r: 10,
|
|
39
43
|
transitionDuration: "100ms"
|
|
40
44
|
},
|
|
41
45
|
_groupActive: { cursor: "grabbing" }
|
|
42
46
|
});
|
|
43
47
|
//#endregion
|
|
44
|
-
export { controlPoint, controlPointsContainer };
|
|
48
|
+
export { controlPoint, controlPointsContainer, labelDraggable };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SequenceStepEdge } from './edges/SequenceStepEdge';
|
|
2
|
-
import { CompoundDeploymentNode, CompoundElementNode, DeploymentNode, ElementNode, SequenceActorNode, SequenceParallelArea, ViewGroupNode } from './nodes';
|
|
2
|
+
import { CompoundDeploymentNode, CompoundElementNode, DeploymentNode, ElementNode, SequenceActorNode, SequenceParallelArea, SequenceSubflowArea, ViewGroupNode } from './nodes';
|
|
3
3
|
import { FunctionComponent } from 'react';
|
|
4
4
|
export declare const BuiltinNodes: {
|
|
5
5
|
ElementNode: typeof ElementNode;
|
|
@@ -9,6 +9,7 @@ export declare const BuiltinNodes: {
|
|
|
9
9
|
ViewGroupNode: typeof ViewGroupNode;
|
|
10
10
|
SequenceActorNode: typeof SequenceActorNode;
|
|
11
11
|
SequenceParallelArea: typeof SequenceParallelArea;
|
|
12
|
+
SequenceSubflowArea: typeof SequenceSubflowArea;
|
|
12
13
|
};
|
|
13
14
|
export declare const BuiltinEdges: {
|
|
14
15
|
RelationshipEdge: FunctionComponent<import("../types").Types.EdgeProps<"relationship">>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { RelationshipEdge } from "./edges/RelationshipEdge.js";
|
|
2
|
-
import { SequenceStepEdge } from "./edges/SequenceStepEdge.js";
|
|
3
1
|
import { CompoundDeploymentNode, CompoundElementNode, DeploymentNode, ElementNode, ViewGroupNode } from "./nodes/nodes.js";
|
|
4
2
|
import { SequenceActorNode, SequenceParallelArea } from "./nodes/SequenceActorNode.js";
|
|
3
|
+
import { SequenceSubflowArea } from "./nodes/SequenceSubFlow.js";
|
|
4
|
+
import { RelationshipEdge } from "./edges/RelationshipEdge.js";
|
|
5
|
+
import { SequenceStepEdge } from "./edges/SequenceStepEdge.js";
|
|
5
6
|
//#region src/likec4diagram/custom/index.tsx
|
|
6
7
|
var BuiltinNodes = {
|
|
7
8
|
ElementNode,
|
|
@@ -10,7 +11,8 @@ var BuiltinNodes = {
|
|
|
10
11
|
CompoundDeploymentNode,
|
|
11
12
|
ViewGroupNode,
|
|
12
13
|
SequenceActorNode,
|
|
13
|
-
SequenceParallelArea
|
|
14
|
+
SequenceParallelArea,
|
|
15
|
+
SequenceSubflowArea
|
|
14
16
|
};
|
|
15
17
|
var BuiltinEdges = {
|
|
16
18
|
RelationshipEdge,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Types } from '../../types';
|
|
2
2
|
type CompoundActionsProps = Types.NodeProps<'compound-deployment' | 'compound-element'>;
|
|
3
|
-
export declare const CompoundActions: (props: CompoundActionsProps) => import("react
|
|
3
|
+
export declare const CompoundActions: (props: CompoundActionsProps) => import("react").JSX.Element | null;
|
|
4
4
|
export {};
|
|
@@ -9,6 +9,7 @@ var CompoundActions = (props) => {
|
|
|
9
9
|
const diagram = useDiagram();
|
|
10
10
|
const { navigateTo } = props.data;
|
|
11
11
|
if (navigateTo && enableNavigateTo) return /* @__PURE__ */ jsx(CompoundActionButton, {
|
|
12
|
+
ariaLabel: "Navigate to view",
|
|
12
13
|
onClick: (e) => {
|
|
13
14
|
e.stopPropagation();
|
|
14
15
|
diagram.navigateTo(navigateTo, props.id);
|
|
@@ -26,7 +26,7 @@ type WithExtraButtons = {
|
|
|
26
26
|
};
|
|
27
27
|
export type ElementActionsProps = SimplifyDeep<{
|
|
28
28
|
selected?: boolean;
|
|
29
|
-
data: Pick<Types.ElementNodeData, 'id' | 'modelFqn' | 'navigateTo'> & BaseNodeData;
|
|
29
|
+
data: Pick<Types.ElementNodeData, 'id' | 'modelFqn' | 'navigateTo' | 'title'> & BaseNodeData;
|
|
30
30
|
}> & WithExtraButtons;
|
|
31
31
|
/**
|
|
32
32
|
* Center-Bottom action bar, includes zoom-in and browse relationships actions, if the features are enabled.
|
|
@@ -53,10 +53,10 @@ export type ElementActionsProps = SimplifyDeep<{
|
|
|
53
53
|
* />
|
|
54
54
|
* ```
|
|
55
55
|
*/
|
|
56
|
-
export declare function ElementActions({ extraButtons, ...props }: ElementActionsProps): import("react
|
|
56
|
+
export declare function ElementActions({ extraButtons, ...props }: ElementActionsProps): import("react").JSX.Element;
|
|
57
57
|
export type DeploymentElementActionsProps = SimplifyDeep<{
|
|
58
58
|
selected?: boolean;
|
|
59
|
-
data: Pick<Types.DeploymentElementNodeData, 'id' | 'modelFqn' | 'navigateTo'> & BaseNodeData;
|
|
59
|
+
data: Pick<Types.DeploymentElementNodeData, 'id' | 'modelFqn' | 'navigateTo' | 'title'> & BaseNodeData;
|
|
60
60
|
}> & WithExtraButtons;
|
|
61
61
|
/**
|
|
62
62
|
* Center-Bottom action bar, includes zoom-in and browse relationships actions, if the features are enabled.
|
|
@@ -83,5 +83,5 @@ export type DeploymentElementActionsProps = SimplifyDeep<{
|
|
|
83
83
|
* />
|
|
84
84
|
* ```
|
|
85
85
|
*/
|
|
86
|
-
export declare const DeploymentElementActions: ({ extraButtons, ...props }: DeploymentElementActionsProps) => import("react
|
|
86
|
+
export declare const DeploymentElementActions: ({ extraButtons, ...props }: DeploymentElementActionsProps) => import("react").JSX.Element;
|
|
87
87
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { useEnabledFeatures } from "../../../context/DiagramFeatures.js";
|
|
3
3
|
import { useDiagram } from "../../../hooks/safeContext.js";
|
|
4
|
+
import { readableText } from "../../../utils/readableText.js";
|
|
4
5
|
import { ElementActionButtons } from "../../../base-primitives/element/ElementActionButtons.js";
|
|
5
6
|
import { IconTransform, IconZoomScan } from "@tabler/icons-react";
|
|
6
7
|
import { useMemo } from "react";
|
|
@@ -35,11 +36,13 @@ import { hasAtLeast } from "remeda";
|
|
|
35
36
|
function ElementActions({ extraButtons, ...props }) {
|
|
36
37
|
const { enableNavigateTo, enableRelationshipBrowser } = useEnabledFeatures();
|
|
37
38
|
const diagram = useDiagram();
|
|
38
|
-
const { id, navigateTo, modelFqn } = props.data;
|
|
39
|
+
const { id, navigateTo, modelFqn, title } = props.data;
|
|
39
40
|
let buttons = useMemo(() => {
|
|
40
41
|
const buttons = [];
|
|
42
|
+
const labelTitle = readableText(title) || id;
|
|
41
43
|
if (navigateTo && enableNavigateTo) buttons.push({
|
|
42
44
|
key: "navigate",
|
|
45
|
+
ariaLabel: "Navigate to view",
|
|
43
46
|
icon: /* @__PURE__ */ jsx(IconZoomScan, {}),
|
|
44
47
|
onClick: (e) => {
|
|
45
48
|
e.stopPropagation();
|
|
@@ -48,6 +51,7 @@ function ElementActions({ extraButtons, ...props }) {
|
|
|
48
51
|
});
|
|
49
52
|
if (enableRelationshipBrowser) buttons.push({
|
|
50
53
|
key: "relationships",
|
|
54
|
+
ariaLabel: `Browse ${labelTitle} relationships`,
|
|
51
55
|
icon: /* @__PURE__ */ jsx(IconTransform, {}),
|
|
52
56
|
onClick: (e) => {
|
|
53
57
|
e.stopPropagation();
|
|
@@ -61,6 +65,7 @@ function ElementActions({ extraButtons, ...props }) {
|
|
|
61
65
|
modelFqn,
|
|
62
66
|
navigateTo,
|
|
63
67
|
id,
|
|
68
|
+
title,
|
|
64
69
|
diagram
|
|
65
70
|
]);
|
|
66
71
|
if (extraButtons && hasAtLeast(extraButtons, 1)) buttons = [...buttons, ...extraButtons];
|
|
@@ -97,11 +102,13 @@ function ElementActions({ extraButtons, ...props }) {
|
|
|
97
102
|
var DeploymentElementActions = ({ extraButtons, ...props }) => {
|
|
98
103
|
const { enableNavigateTo, enableRelationshipBrowser } = useEnabledFeatures();
|
|
99
104
|
const diagram = useDiagram();
|
|
100
|
-
const { id, navigateTo, modelFqn } = props.data;
|
|
105
|
+
const { id, navigateTo, modelFqn, title } = props.data;
|
|
101
106
|
let buttons = useMemo(() => {
|
|
102
107
|
const buttons = [];
|
|
108
|
+
const labelTitle = readableText(title) || id;
|
|
103
109
|
if (navigateTo && enableNavigateTo) buttons.push({
|
|
104
110
|
key: "navigate",
|
|
111
|
+
ariaLabel: "Navigate to view",
|
|
105
112
|
icon: /* @__PURE__ */ jsx(IconZoomScan, {}),
|
|
106
113
|
onClick: (e) => {
|
|
107
114
|
e.stopPropagation();
|
|
@@ -110,6 +117,7 @@ var DeploymentElementActions = ({ extraButtons, ...props }) => {
|
|
|
110
117
|
});
|
|
111
118
|
if (enableRelationshipBrowser && !!modelFqn) buttons.push({
|
|
112
119
|
key: "relationships",
|
|
120
|
+
ariaLabel: `Browse ${labelTitle} relationships`,
|
|
113
121
|
icon: /* @__PURE__ */ jsx(IconTransform, {}),
|
|
114
122
|
onClick: (e) => {
|
|
115
123
|
e.stopPropagation();
|
|
@@ -122,7 +130,9 @@ var DeploymentElementActions = ({ extraButtons, ...props }) => {
|
|
|
122
130
|
enableRelationshipBrowser,
|
|
123
131
|
modelFqn,
|
|
124
132
|
navigateTo,
|
|
125
|
-
id
|
|
133
|
+
id,
|
|
134
|
+
title,
|
|
135
|
+
diagram
|
|
126
136
|
]);
|
|
127
137
|
if (extraButtons && hasAtLeast(extraButtons, 1)) buttons = [...buttons, ...extraButtons];
|
|
128
138
|
return /* @__PURE__ */ jsx(ElementActionButtons, {
|
|
@@ -2,4 +2,4 @@ import { Types } from '../../types';
|
|
|
2
2
|
export type NodeDriftsProps = {
|
|
3
3
|
nodeProps: Types.NodeProps;
|
|
4
4
|
};
|
|
5
|
-
export declare function NodeDrifts({ nodeProps: { data }, }: NodeDriftsProps): import("react
|
|
5
|
+
export declare function NodeDrifts({ nodeProps: { data }, }: NodeDriftsProps): import("react").JSX.Element | null;
|
|
@@ -2,5 +2,5 @@ import { BaseNodePropsWithData } from '../../../base/types';
|
|
|
2
2
|
import { Types } from '../../types';
|
|
3
3
|
type RequiredData = Pick<Types.NodeData, 'id' | 'notes' | 'width' | 'height' | 'x' | 'y'>;
|
|
4
4
|
export type NodeNotesProps = BaseNodePropsWithData<RequiredData>;
|
|
5
|
-
export declare function NodeNotes({ data }: NodeNotesProps): import("react
|
|
5
|
+
export declare function NodeNotes({ data }: NodeNotesProps): import("react").JSX.Element | null;
|
|
6
6
|
export {};
|
|
@@ -31,10 +31,6 @@ function NodeNotesInternal({ data }) {
|
|
|
31
31
|
min: 250,
|
|
32
32
|
max: 500
|
|
33
33
|
});
|
|
34
|
-
clamp(data.height ?? 0, {
|
|
35
|
-
min: 200,
|
|
36
|
-
max: 600
|
|
37
|
-
});
|
|
38
34
|
const [expanded, handlers] = useDisclosure(false, {});
|
|
39
35
|
const id = stringHash(data.id + (markdown.md ?? markdown.txt));
|
|
40
36
|
const onClickCapture = useCallbackRef$1((e) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Types } from '../../types';
|
|
2
|
-
export declare function SequenceActorNode(props: Types.NodeProps<'seq-actor'>): import("react
|
|
3
|
-
export declare function SequenceParallelArea(props: Types.NodeProps<'seq-parallel'>): import("react
|
|
2
|
+
export declare function SequenceActorNode(props: Types.NodeProps<'seq-actor'>): import("react").JSX.Element;
|
|
3
|
+
export declare function SequenceParallelArea(props: Types.NodeProps<'seq-parallel'>): import("react").JSX.Element;
|
|
@@ -12,6 +12,7 @@ import { css } from "@likec4/styles/css";
|
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Handle, Position } from "@xyflow/react";
|
|
14
14
|
import { isTruthy } from "remeda";
|
|
15
|
+
import { m } from "motion/react";
|
|
15
16
|
import { Box } from "@likec4/styles/jsx";
|
|
16
17
|
//#region src/likec4diagram/custom/nodes/SequenceActorNode.tsx
|
|
17
18
|
var positionMap = {
|
|
@@ -20,26 +21,37 @@ var positionMap = {
|
|
|
20
21
|
top: Position.Top,
|
|
21
22
|
bottom: Position.Bottom
|
|
22
23
|
};
|
|
23
|
-
var ActorStepPort = ({ data, port: p }) => {
|
|
24
|
-
|
|
24
|
+
var ActorStepPort = ({ nodeProps: { selected, data }, port: p }) => {
|
|
25
|
+
let scaleX = 1;
|
|
26
|
+
let scaleY = 1;
|
|
27
|
+
if (data.hovered || selected) {
|
|
28
|
+
scaleX = 1.8;
|
|
29
|
+
scaleY = 1.1;
|
|
30
|
+
}
|
|
31
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(m.div, {
|
|
25
32
|
"data-likec4-color": data.color,
|
|
26
33
|
className: css({
|
|
27
34
|
position: "absolute",
|
|
28
35
|
backgroundColor: "var(--likec4-palette-fill)",
|
|
29
|
-
rounded: "xs"
|
|
30
|
-
width: {
|
|
31
|
-
base: "5px",
|
|
32
|
-
_whenHovered: "7px",
|
|
33
|
-
_whenSelected: "7px"
|
|
34
|
-
},
|
|
35
|
-
transition: "fast",
|
|
36
|
-
translateX: "-1/2",
|
|
37
|
-
translateY: "-1/2",
|
|
38
|
-
translate: "auto"
|
|
36
|
+
rounded: "xs"
|
|
39
37
|
}),
|
|
38
|
+
initial: false,
|
|
39
|
+
animate: {
|
|
40
|
+
scaleX,
|
|
41
|
+
scaleY
|
|
42
|
+
},
|
|
43
|
+
transition: {
|
|
44
|
+
type: "spring",
|
|
45
|
+
stiffness: 400,
|
|
46
|
+
damping: 30
|
|
47
|
+
},
|
|
40
48
|
style: {
|
|
49
|
+
x: "-50%",
|
|
50
|
+
y: "-50%",
|
|
41
51
|
top: p.cy,
|
|
42
52
|
left: p.cx,
|
|
53
|
+
width: 5,
|
|
54
|
+
visibility: p.hidden ? "hidden" : "visible",
|
|
43
55
|
height: p.height
|
|
44
56
|
}
|
|
45
57
|
}), /* @__PURE__ */ jsx(Handle, {
|
|
@@ -73,16 +85,15 @@ function SequenceActorNode(props) {
|
|
|
73
85
|
pointerEvents: "none",
|
|
74
86
|
transition: "fast",
|
|
75
87
|
translateX: "-1/2",
|
|
76
|
-
translate: "auto"
|
|
88
|
+
translate: "auto",
|
|
89
|
+
zIndex: "z-0"
|
|
77
90
|
}),
|
|
78
91
|
style: {
|
|
79
92
|
backgroundColor: "var(--likec4-palette-stroke)",
|
|
80
93
|
opacity: isHovered ? .6 : .4,
|
|
81
94
|
left: "50%",
|
|
82
95
|
width: isHovered ? 3 : 2,
|
|
83
|
-
height: viewHeight - positionAbsoluteY
|
|
84
|
-
zIndex: -1,
|
|
85
|
-
pointerEvents: "none"
|
|
96
|
+
height: viewHeight - positionAbsoluteY
|
|
86
97
|
}
|
|
87
98
|
}),
|
|
88
99
|
/* @__PURE__ */ jsxs(ElementNodeContainer, {
|
|
@@ -90,7 +101,10 @@ function SequenceActorNode(props) {
|
|
|
90
101
|
children: [
|
|
91
102
|
enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
|
|
92
103
|
/* @__PURE__ */ jsx(ElementShape, { ...props }),
|
|
93
|
-
/* @__PURE__ */ jsx(ElementData, {
|
|
104
|
+
/* @__PURE__ */ jsx(ElementData, {
|
|
105
|
+
...props,
|
|
106
|
+
"aria-hidden": true
|
|
107
|
+
}),
|
|
94
108
|
hasModelFqn(props) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
95
109
|
/* @__PURE__ */ jsx(ElementActions, { ...props }),
|
|
96
110
|
enableElementDetails && /* @__PURE__ */ jsx(ElementDetailsButtonWithHandler, {
|
|
@@ -104,7 +118,7 @@ function SequenceActorNode(props) {
|
|
|
104
118
|
}),
|
|
105
119
|
ports.map((p) => /* @__PURE__ */ jsx(ActorStepPort, {
|
|
106
120
|
port: p,
|
|
107
|
-
|
|
121
|
+
nodeProps: props
|
|
108
122
|
}, p.id))
|
|
109
123
|
] });
|
|
110
124
|
}
|
|
@@ -116,7 +130,6 @@ function SequenceParallelArea(props) {
|
|
|
116
130
|
height: "100%",
|
|
117
131
|
border: "default",
|
|
118
132
|
rounded: "sm",
|
|
119
|
-
borderWidth: 1,
|
|
120
133
|
"--_color": {
|
|
121
134
|
base: "var(--likec4-palette-stroke)",
|
|
122
135
|
_dark: "[color-mix(in oklab, var(--likec4-palette-hiContrast) 40%, var(--likec4-palette-fill))]"
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { useDiagram } from "../../../hooks/safeContext.js";
|
|
3
|
+
import { css, cx, sva } from "@likec4/styles/css";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import "@likec4/core";
|
|
6
|
+
import { hstack } from "@likec4/styles/patterns";
|
|
7
|
+
//#region src/likec4diagram/custom/nodes/SequenceSubFlow.tsx
|
|
8
|
+
var labelStyle = css.raw({
|
|
9
|
+
color: "colorPalette.text",
|
|
10
|
+
fontSize: "[9px]",
|
|
11
|
+
fontWeight: "bold",
|
|
12
|
+
lineHeight: "xs",
|
|
13
|
+
letterSpacing: "tight",
|
|
14
|
+
textTransform: "uppercase"
|
|
15
|
+
});
|
|
16
|
+
var withBorder = css.raw({ border: "{borderWidths.2} solid {colors.colorPalette.border}" });
|
|
17
|
+
var withBackground = css.raw({
|
|
18
|
+
background: "colorPalette",
|
|
19
|
+
["&[data-state=\"hovered\"]"]: {
|
|
20
|
+
background: "colorPalette.hovered",
|
|
21
|
+
transition: "faster",
|
|
22
|
+
transitionDelay: "faster",
|
|
23
|
+
transitionTimingFunction: "out",
|
|
24
|
+
transitionProperty: "background"
|
|
25
|
+
},
|
|
26
|
+
["&[data-state=\"collapsed\"]"]: { background: "colorPalette.label" }
|
|
27
|
+
});
|
|
28
|
+
var recipe = sva({
|
|
29
|
+
slots: [
|
|
30
|
+
"root",
|
|
31
|
+
"content",
|
|
32
|
+
"label",
|
|
33
|
+
"title"
|
|
34
|
+
],
|
|
35
|
+
base: {
|
|
36
|
+
root: css.raw({
|
|
37
|
+
width: "100%",
|
|
38
|
+
height: "100%",
|
|
39
|
+
padding: "0"
|
|
40
|
+
}),
|
|
41
|
+
content: hstack.raw({
|
|
42
|
+
gap: "2",
|
|
43
|
+
width: "100%",
|
|
44
|
+
alignItems: "center"
|
|
45
|
+
}),
|
|
46
|
+
label: css.raw(labelStyle),
|
|
47
|
+
title: css.raw({
|
|
48
|
+
flex: "1",
|
|
49
|
+
color: `[oklch(from {colors.colorPalette.text} l calc(c - 0.15) h)]`,
|
|
50
|
+
fontSize: "xs",
|
|
51
|
+
lineHeight: "xxs",
|
|
52
|
+
fontWeight: "medium",
|
|
53
|
+
truncate: true
|
|
54
|
+
})
|
|
55
|
+
},
|
|
56
|
+
variants: { variant: {
|
|
57
|
+
subflow: {
|
|
58
|
+
root: css.raw(withBackground, withBorder, { rounded: "md" }),
|
|
59
|
+
label: css.raw(withBorder, {
|
|
60
|
+
alignSelf: "stretch",
|
|
61
|
+
paddingInline: "2",
|
|
62
|
+
paddingBlock: "1",
|
|
63
|
+
background: "colorPalette.label",
|
|
64
|
+
width: "max-content",
|
|
65
|
+
borderTopLeftRadius: "sm",
|
|
66
|
+
borderBottomRightRadius: "sm",
|
|
67
|
+
borderTop: "none",
|
|
68
|
+
borderLeft: "none",
|
|
69
|
+
[":is([data-state=\"collapsed\"]) &"]: {
|
|
70
|
+
background: "none",
|
|
71
|
+
borderColor: "transparent"
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
branch: {
|
|
76
|
+
root: css.raw(withBackground, withBorder, {
|
|
77
|
+
rounded: "0",
|
|
78
|
+
borderTopWidth: "1",
|
|
79
|
+
["&[data-is-last=\"true\"]"]: {
|
|
80
|
+
borderBottomLeftRadius: "md",
|
|
81
|
+
borderBottomRightRadius: "md"
|
|
82
|
+
},
|
|
83
|
+
["&:not([data-is-last=\"true\"])"]: { borderBottomWidth: "1" },
|
|
84
|
+
["&[data-state=\"collapsed\"]"]: { background: "colorPalette.header" }
|
|
85
|
+
}),
|
|
86
|
+
label: css.raw({
|
|
87
|
+
position: "relative",
|
|
88
|
+
background: "colorPalette.label",
|
|
89
|
+
paddingLeft: "4.5",
|
|
90
|
+
paddingRight: "2",
|
|
91
|
+
paddingBlock: "1",
|
|
92
|
+
marginBlock: "2",
|
|
93
|
+
marginInlineStart: "2",
|
|
94
|
+
rounded: "sm",
|
|
95
|
+
minWidth: "[40px]",
|
|
96
|
+
width: "min-content",
|
|
97
|
+
textAlign: "center",
|
|
98
|
+
_before: {
|
|
99
|
+
position: "absolute",
|
|
100
|
+
content: "\" \"",
|
|
101
|
+
background: "currentColor",
|
|
102
|
+
width: "[5px]",
|
|
103
|
+
height: "[5px]",
|
|
104
|
+
opacity: "[.6]",
|
|
105
|
+
rounded: "pill",
|
|
106
|
+
top: "[50%]",
|
|
107
|
+
left: "2",
|
|
108
|
+
transform: "translateY(-50%)"
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
},
|
|
112
|
+
withbranches: { content: css.raw(withBorder, {
|
|
113
|
+
width: "100%",
|
|
114
|
+
borderTopLeftRadius: "md",
|
|
115
|
+
borderTopRightRadius: "md",
|
|
116
|
+
paddingInline: "2",
|
|
117
|
+
borderBottomWidth: "1",
|
|
118
|
+
background: "colorPalette.header"
|
|
119
|
+
}) }
|
|
120
|
+
} },
|
|
121
|
+
defaultVariants: { variant: "subflow" },
|
|
122
|
+
className: "seq-subflow"
|
|
123
|
+
});
|
|
124
|
+
/**
|
|
125
|
+
* PandaCSS `colorPalette` classes for each sub-flow palette.
|
|
126
|
+
* Declared as literals so the static analyzer can extract them.
|
|
127
|
+
*/
|
|
128
|
+
var palette = {
|
|
129
|
+
loop: css({ colorPalette: "subflow.loop" }),
|
|
130
|
+
opt: css({ colorPalette: "subflow.opt" }),
|
|
131
|
+
par: css({ colorPalette: "subflow.par" }),
|
|
132
|
+
break: css({ colorPalette: "subflow.break" }),
|
|
133
|
+
alt: css({ colorPalette: "subflow.alt" }),
|
|
134
|
+
try: css({ colorPalette: "subflow.try" })
|
|
135
|
+
};
|
|
136
|
+
var flowPresentation = {
|
|
137
|
+
loop: {
|
|
138
|
+
paletteClass: palette.loop,
|
|
139
|
+
variant: "subflow",
|
|
140
|
+
label: "loop"
|
|
141
|
+
},
|
|
142
|
+
opt: {
|
|
143
|
+
paletteClass: palette.opt,
|
|
144
|
+
variant: "subflow",
|
|
145
|
+
label: "opt"
|
|
146
|
+
},
|
|
147
|
+
par: {
|
|
148
|
+
paletteClass: palette.par,
|
|
149
|
+
variant: "subflow",
|
|
150
|
+
label: "par"
|
|
151
|
+
},
|
|
152
|
+
break: {
|
|
153
|
+
paletteClass: palette.break,
|
|
154
|
+
variant: "subflow",
|
|
155
|
+
label: "break"
|
|
156
|
+
},
|
|
157
|
+
alt: {
|
|
158
|
+
paletteClass: palette.alt,
|
|
159
|
+
variant: "withbranches",
|
|
160
|
+
label: "alt"
|
|
161
|
+
},
|
|
162
|
+
"alt-when": {
|
|
163
|
+
paletteClass: palette.alt,
|
|
164
|
+
variant: "branch",
|
|
165
|
+
label: "when"
|
|
166
|
+
},
|
|
167
|
+
"alt-else": {
|
|
168
|
+
paletteClass: palette.alt,
|
|
169
|
+
variant: "branch",
|
|
170
|
+
label: "else"
|
|
171
|
+
},
|
|
172
|
+
"alt-if": {
|
|
173
|
+
paletteClass: palette.alt,
|
|
174
|
+
variant: "branch",
|
|
175
|
+
label: "if"
|
|
176
|
+
},
|
|
177
|
+
try: {
|
|
178
|
+
paletteClass: palette.try,
|
|
179
|
+
variant: "withbranches",
|
|
180
|
+
label: "try"
|
|
181
|
+
},
|
|
182
|
+
"try-block": {
|
|
183
|
+
paletteClass: palette.try,
|
|
184
|
+
variant: "branch",
|
|
185
|
+
label: "block"
|
|
186
|
+
},
|
|
187
|
+
"try-catch": {
|
|
188
|
+
paletteClass: palette.break,
|
|
189
|
+
variant: "branch",
|
|
190
|
+
label: "catch"
|
|
191
|
+
},
|
|
192
|
+
"try-finally": {
|
|
193
|
+
paletteClass: palette.break,
|
|
194
|
+
variant: "branch",
|
|
195
|
+
label: "finally"
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
function SequenceSubflowArea(props) {
|
|
199
|
+
const { data } = props;
|
|
200
|
+
const isDimmed = data.dimmed ?? false;
|
|
201
|
+
const diagram = useDiagram();
|
|
202
|
+
const toggleSequenceFlow = (event) => {
|
|
203
|
+
event.stopPropagation();
|
|
204
|
+
diagram.toggleSequenceFlow(data.flowId);
|
|
205
|
+
};
|
|
206
|
+
const { paletteClass, variant, label } = flowPresentation[data.flowType];
|
|
207
|
+
const classes = recipe({ variant });
|
|
208
|
+
const headerHeight = data.flowType === "alt" || data.flowType === "try" ? data.headerHeight : void 0;
|
|
209
|
+
let state = void 0;
|
|
210
|
+
if (data.collapsed === true) state = "collapsed";
|
|
211
|
+
else if (data.hovered) state = "hovered";
|
|
212
|
+
return /* @__PURE__ */ jsx("div", {
|
|
213
|
+
className: cx(classes.root, paletteClass),
|
|
214
|
+
"data-is-first": data.isFirst === true,
|
|
215
|
+
"data-is-last": data.isLast === true,
|
|
216
|
+
"data-state": state,
|
|
217
|
+
...isDimmed !== false && { "data-likec4-dimmed": isDimmed },
|
|
218
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
219
|
+
className: classes.content,
|
|
220
|
+
style: { height: headerHeight },
|
|
221
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
222
|
+
className: classes.label,
|
|
223
|
+
onClick: toggleSequenceFlow,
|
|
224
|
+
children: label
|
|
225
|
+
}), data.title && /* @__PURE__ */ jsx("div", {
|
|
226
|
+
className: classes.title,
|
|
227
|
+
onClick: toggleSequenceFlow,
|
|
228
|
+
children: data.title
|
|
229
|
+
})]
|
|
230
|
+
})
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
//#endregion
|
|
234
|
+
export { SequenceSubflowArea };
|
|
@@ -2,6 +2,7 @@ export { CompoundActions } from './CompoundActions';
|
|
|
2
2
|
export { DeploymentElementActions, ElementActions } from './ElementActions';
|
|
3
3
|
export { CompoundDeploymentNode, CompoundDetailsButtonWithHandler, CompoundElementNode, DeploymentNode, ElementDetailsButtonWithHandler, ElementNode, ViewGroupNode, } from './nodes';
|
|
4
4
|
export { SequenceActorNode, SequenceParallelArea } from './SequenceActorNode';
|
|
5
|
+
export { SequenceSubflowArea } from './SequenceSubFlow';
|
|
5
6
|
export { NodeDrifts, type NodeDriftsProps } from './NodeDrifts';
|
|
6
7
|
export * from './CompoundActions';
|
|
7
8
|
export * from './ElementActions';
|
|
@@ -7,13 +7,13 @@ export declare function ElementDetailsButtonWithHandler(props: {
|
|
|
7
7
|
data: BaseNodeData & {
|
|
8
8
|
modelFqn?: Fqn | null | undefined;
|
|
9
9
|
};
|
|
10
|
-
}): import("react
|
|
11
|
-
export declare function CompoundDetailsButtonWithHandler(props: Types.NodeProps<'compound-deployment' | 'compound-element'>): import("react
|
|
10
|
+
}): import("react").JSX.Element | null;
|
|
11
|
+
export declare function CompoundDetailsButtonWithHandler(props: Types.NodeProps<'compound-deployment' | 'compound-element'>): import("react").JSX.Element | null;
|
|
12
12
|
/**
|
|
13
13
|
* Renders an element node.
|
|
14
14
|
*/
|
|
15
|
-
export declare function ElementNode(props: Types.NodeProps<'element'>): import("react
|
|
16
|
-
export declare function DeploymentNode(props: Types.NodeProps<'deployment'>): import("react
|
|
17
|
-
export declare function CompoundElementNode(props: Types.NodeProps<'compound-element'>): import("react
|
|
18
|
-
export declare function CompoundDeploymentNode(props: Types.NodeProps<'compound-deployment'>): import("react
|
|
19
|
-
export declare function ViewGroupNode(props: Types.NodeProps<'view-group'>): import("react
|
|
15
|
+
export declare function ElementNode(props: Types.NodeProps<'element'>): import("react").JSX.Element;
|
|
16
|
+
export declare function DeploymentNode(props: Types.NodeProps<'deployment'>): import("react").JSX.Element;
|
|
17
|
+
export declare function CompoundElementNode(props: Types.NodeProps<'compound-element'>): import("react").JSX.Element;
|
|
18
|
+
export declare function CompoundDeploymentNode(props: Types.NodeProps<'compound-deployment'>): import("react").JSX.Element;
|
|
19
|
+
export declare function ViewGroupNode(props: Types.NodeProps<'view-group'>): import("react").JSX.Element;
|