@likec4/diagram 1.60.0 → 1.61.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/README.md +63 -11
- package/dist/LikeC4Diagram.d.mts +4 -6
- package/dist/LikeC4Diagram.mjs +13 -12
- package/dist/LikeC4Diagram.props.d.mts +5 -7
- package/dist/LikeC4MantineProvider.d.mts +1 -2
- package/dist/LikeC4MantineProvider.mjs +26 -11
- package/dist/LikeC4ModelProvider.d.mts +1 -3
- package/dist/LikeC4ModelProvider.mjs +1 -2
- package/dist/LikeC4ProjectsOverview.d.mts +1 -3
- package/dist/LikeC4ProjectsOverview.mjs +1 -2
- package/dist/LikeC4ProjectsProvider.d.mts +1 -2
- package/dist/LikeC4ProjectsProvider.mjs +2 -3
- package/dist/LikeC4Styles.d.mts +1 -2
- package/dist/LikeC4Styles.mjs +11 -6
- package/dist/LikeC4View.d.mts +3 -5
- package/dist/LikeC4View.mjs +12 -11
- package/dist/ReactLikeC4.d.mts +3 -5
- package/dist/ReactLikeC4.mjs +8 -7
- package/dist/StaticLikeC4Diagram.d.mts +1 -3
- package/dist/StaticLikeC4Diagram.mjs +1 -2
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/base/Background.mjs +1 -2
- package/dist/base/Base.d.mts +1 -2
- package/dist/base/Base.mjs +1 -2
- package/dist/base/BaseXYFlow.mjs +12 -10
- package/dist/base/const.d.mts +1 -3
- package/dist/base/const.mjs +1 -2
- package/dist/base/keyboardZoom.mjs +1 -2
- package/dist/base/types.d.mts +2 -4
- package/dist/base/updateEdges.mjs +1 -2
- package/dist/base/updateNodes.mjs +1 -2
- package/dist/base-primitives/Markdown.d.mts +5 -5
- package/dist/base-primitives/Markdown.mjs +22 -11
- package/dist/base-primitives/NodeHandles.d.mts +1 -3
- package/dist/base-primitives/NodeHandles.mjs +1 -2
- package/dist/base-primitives/compound/CompoundActionButton.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundActionButton.mjs +3 -4
- package/dist/base-primitives/compound/CompoundDetailsButton.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.mjs +3 -4
- package/dist/base-primitives/compound/CompoundNodeContainer.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundNodeContainer.mjs +1 -2
- package/dist/base-primitives/compound/CompoundTitle.d.mts +1 -2
- package/dist/base-primitives/compound/CompoundTitle.mjs +1 -2
- package/dist/base-primitives/compound/actionbtns.css.mjs +1 -2
- package/dist/base-primitives/edge/EdgeActionButton.mjs +2 -3
- package/dist/base-primitives/edge/EdgeContainer.mjs +2 -3
- package/dist/base-primitives/edge/EdgeLabel.mjs +3 -3
- package/dist/base-primitives/edge/EdgeLabelContainer.mjs +2 -3
- package/dist/base-primitives/edge/EdgeMarkers.mjs +1 -2
- package/dist/base-primitives/edge/EdgePath.mjs +1 -2
- package/dist/base-primitives/element/ElementActionButtons.d.mts +1 -2
- package/dist/base-primitives/element/ElementActionButtons.mjs +2 -3
- package/dist/base-primitives/element/ElementData.d.mts +1 -2
- package/dist/base-primitives/element/ElementData.mjs +1 -2
- package/dist/base-primitives/element/ElementDetailsButton.d.mts +1 -2
- package/dist/base-primitives/element/ElementDetailsButton.mjs +2 -3
- package/dist/base-primitives/element/ElementNodeContainer.d.mts +1 -2
- package/dist/base-primitives/element/ElementNodeContainer.mjs +2 -3
- package/dist/base-primitives/element/ElementShape.d.mts +11 -6
- package/dist/base-primitives/element/ElementShape.mjs +10 -5
- package/dist/base-primitives/element/ElementTags.d.mts +6 -3
- package/dist/base-primitives/element/ElementTags.mjs +2 -4
- package/dist/base-primitives/index.d.mts +5 -5
- package/dist/base-primitives/memoEdge.d.mts +2 -6
- package/dist/base-primitives/memoEdge.mjs +1 -2
- package/dist/base-primitives/memoNode.d.mts +2 -6
- package/dist/components/EmptyBox.mjs +1 -2
- package/dist/components/ErrorFallback.d.mts +4 -3
- package/dist/components/ErrorFallback.mjs +61 -56
- package/dist/components/FloatingWindow.mjs +3 -4
- package/dist/components/GithubIcon.mjs +1 -2
- package/dist/components/Link.mjs +3 -4
- package/dist/components/Logo.d.mts +3 -5
- package/dist/components/Logo.mjs +28 -35
- package/dist/components/NavigationLink.mjs +1 -2
- package/dist/components/NavigationPanel.mjs +11 -11
- package/dist/components/PortalToContainer.d.mts +1 -3
- package/dist/components/PortalToContainer.mjs +1 -2
- package/dist/components/RootContainer.mjs +1 -2
- package/dist/components/SearchControl.css.mjs +1 -2
- package/dist/components/SearchControl.d.mts +1 -2
- package/dist/components/SearchControl.mjs +2 -3
- package/dist/components/ViewIcon.mjs +5 -6
- package/dist/components/ViewNotFound.mjs +1 -2
- package/dist/components/markdown/MarkdownWithRefs.mjs +268 -0
- package/dist/components/markdown/markdown-refs.mjs +145 -0
- package/dist/components/markdown/useMarkdownRefsInteractivity.mjs +126 -0
- package/dist/context/ComparingLayoutsContext.mjs +24 -0
- package/dist/context/CurrentViewModelProvider.mjs +1 -2
- package/dist/context/DiagramEventHandlers.mjs +3 -4
- package/dist/context/DiagramFeatures.d.mts +2 -3
- package/dist/context/DiagramFeatures.mjs +15 -9
- package/dist/context/EnsureMantine.mjs +1 -2
- package/dist/context/FramerMotionConfig.d.mts +1 -3
- package/dist/context/FramerMotionConfig.mjs +1 -2
- package/dist/context/IconRenderer.d.mts +1 -3
- package/dist/context/IconRenderer.mjs +14 -14
- package/dist/context/LikeC4ModelContext.d.mts +1 -2
- package/dist/context/LikeC4ModelContext.mjs +1 -2
- package/dist/context/LikeC4ProjectsContext.d.mts +1 -3
- package/dist/context/LikeC4ProjectsContext.mjs +1 -2
- package/dist/context/RootContainerContext.mjs +1 -2
- package/dist/context/TagStylesContext.d.mts +1 -2
- package/dist/context/TagStylesContext.mjs +7 -19
- package/dist/custom/builtins.d.mts +4 -1
- package/dist/custom/customNodes.d.mts +164 -7
- package/dist/custom/customNodes.mjs +387 -8
- package/dist/custom/index.d.mts +18 -30
- package/dist/custom/index.mjs +11 -19
- package/dist/custom/primitives.d.mts +3 -5
- package/dist/customization/CustomizationContext.d.mts +50 -0
- package/dist/customization/CustomizationContext.mjs +64 -0
- package/dist/customization/customizable.d.mts +32 -0
- package/dist/customization/customizable.mjs +75 -0
- package/dist/customization/customization-types.d.mts +40 -0
- package/dist/customization/customization-types.mjs +8 -0
- package/dist/customization/stableComponents.mjs +35 -0
- package/dist/editor/LikeC4EditorCallbacks.d.mts +1 -3
- package/dist/editor/LikeC4EditorCallbacks.mjs +1 -2
- package/dist/editor/LikeC4EditorProvider.d.mts +1 -3
- package/dist/editor/LikeC4EditorProvider.mjs +1 -2
- package/dist/editor/actor/actions.mjs +2 -3
- package/dist/editor/actor/hotkey.d.mts +1 -3
- package/dist/editor/actor/hotkey.mjs +1 -2
- package/dist/editor/actor/machine.d.mts +2 -4
- package/dist/editor/actor/machine.mjs +1 -2
- package/dist/editor/actor/setup.d.mts +1 -2
- package/dist/editor/actor/setup.mjs +1 -2
- package/dist/editor/actor/state.editor.mjs +2 -3
- package/dist/editor/actor/state.sync-queue.mjs +2 -3
- package/dist/editor/actor/types.d.mts +1 -3
- package/dist/editor/actor/types.mjs +1 -2
- package/dist/editor/applyChangesToManualLayout.mjs +1 -2
- package/dist/editor/index.d.mts +1 -1
- package/dist/editor/useEditorActorLogic.mjs +3 -4
- package/dist/hooks/safeContext.d.mts +16 -35
- package/dist/hooks/safeContext.mjs +1 -2
- package/dist/hooks/useCallbackRef.mjs +1 -2
- package/dist/hooks/useCurrentView.d.mts +1 -3
- package/dist/hooks/useCurrentView.mjs +1 -2
- package/dist/hooks/useCurrentViewModel.d.mts +0 -2
- package/dist/hooks/useCurrentViewModel.mjs +1 -2
- package/dist/hooks/useDiagram.d.mts +3 -12
- package/dist/hooks/useDiagram.mjs +11 -10
- package/dist/hooks/useDiagramCompareLayout.d.mts +2 -4
- package/dist/hooks/useDiagramCompareLayout.mjs +12 -21
- package/dist/hooks/useDiagramMarkdownRefActions.mjs +35 -0
- package/dist/hooks/useEdgeLabelFontLoader.mjs +29 -0
- package/dist/hooks/useEdgeTracks.mjs +2 -3
- package/dist/hooks/useEditorActor.mjs +1 -2
- package/dist/hooks/useId.mjs +1 -2
- package/dist/hooks/useLikeC4ElementsTree.mjs +1 -2
- package/dist/hooks/useLikeC4Model.d.mts +0 -2
- package/dist/hooks/useLikeC4Model.mjs +1 -2
- package/dist/hooks/useLikeC4Project.d.mts +2 -4
- package/dist/hooks/useLikeC4Project.mjs +1 -2
- package/dist/hooks/useLikeC4Styles.d.mts +1 -3
- package/dist/hooks/useLikeC4Styles.mjs +1 -2
- package/dist/hooks/useMantinePortalProps.mjs +1 -2
- package/dist/hooks/useSetState.mjs +1 -2
- package/dist/hooks/useUpdateEffect.d.mts +0 -2
- package/dist/hooks/useUpdateEffect.mjs +1 -2
- package/dist/hooks/useXYFlow.d.mts +1 -3
- package/dist/hooks/useXYFlow.mjs +1 -2
- package/dist/index.d.mts +20 -18
- package/dist/index.mjs +20 -18
- package/dist/likec4diagram/DiagramUI.mjs +14 -11
- package/dist/likec4diagram/DiagramXYFlow.mjs +34 -34
- package/dist/likec4diagram/convert-to-xyflow.mjs +7 -3
- package/dist/likec4diagram/custom/edges/EdgeDrifts.mjs +4 -3
- package/dist/likec4diagram/custom/edges/RelationshipEdge.mjs +18 -14
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.mjs +3 -4
- package/dist/likec4diagram/custom/edges/useControlPoints.mjs +2 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.mjs +2 -3
- package/dist/likec4diagram/custom/index.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.mts +1 -2
- package/dist/likec4diagram/custom/nodes/CompoundActions.mjs +2 -3
- package/dist/likec4diagram/custom/nodes/ElementActions.d.mts +3 -4
- package/dist/likec4diagram/custom/nodes/ElementActions.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/GraphElementNode.d.mts +6 -1
- package/dist/likec4diagram/custom/nodes/GraphElementNode.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.mts +6 -1
- package/dist/likec4diagram/custom/nodes/NodeDrifts.mjs +4 -3
- package/dist/likec4diagram/custom/nodes/NodeNotes.mjs +3 -5
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.mts +3 -1
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/index.d.mts +4 -4
- package/dist/likec4diagram/custom/nodes/nodes.d.mts +3 -4
- package/dist/likec4diagram/custom/nodes/nodes.mjs +19 -21
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.mjs +4 -5
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.mts +1 -3
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.mjs +4 -6
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.mjs +3 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/types.mjs +1 -2
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.mjs +1 -2
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.mjs +29 -12
- package/dist/likec4diagram/relationship-popover/actor.mjs +1 -2
- package/dist/likec4diagram/relationship-popover/components.mjs +1 -2
- package/dist/likec4diagram/state/DiagramActorProvider.mjs +22 -34
- package/dist/likec4diagram/state/aligners.d.mts +1 -3
- package/dist/likec4diagram/state/aligners.mjs +1 -2
- package/dist/likec4diagram/state/assign.mjs +3 -4
- package/dist/likec4diagram/state/createViewChange.mjs +1 -2
- package/dist/likec4diagram/state/diagram-api.d.mts +33 -16
- package/dist/likec4diagram/state/diagram-api.mjs +55 -31
- package/dist/likec4diagram/state/hotkeyActor.d.mts +1 -3
- package/dist/likec4diagram/state/hotkeyActor.mjs +12 -6
- package/dist/likec4diagram/state/machine.actions.layout.mjs +2 -3
- package/dist/likec4diagram/state/machine.actions.mjs +81 -44
- package/dist/likec4diagram/state/machine.d.mts +107 -15
- package/dist/likec4diagram/state/machine.mjs +3 -4
- package/dist/likec4diagram/state/machine.setup.d.mts +14 -10
- package/dist/likec4diagram/state/machine.setup.mjs +55 -28
- package/dist/likec4diagram/state/machine.state.initializing.mjs +3 -4
- package/dist/likec4diagram/state/machine.state.navigating.mjs +3 -6
- package/dist/likec4diagram/state/machine.state.ready.comparing.mjs +63 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.mjs +10 -7
- package/dist/likec4diagram/state/machine.state.ready.idle.mjs +10 -7
- package/dist/likec4diagram/state/machine.state.ready.mjs +8 -8
- package/dist/likec4diagram/state/machine.state.ready.printing.mjs +3 -4
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.mjs +5 -6
- package/dist/likec4diagram/state/mediaPrintActor.d.mts +1 -3
- package/dist/likec4diagram/state/mediaPrintActor.mjs +1 -2
- package/dist/likec4diagram/state/persistence.mjs +12 -5
- package/dist/likec4diagram/state/types.d.mts +1 -3
- package/dist/likec4diagram/state/utils.mjs +2 -3
- package/dist/likec4diagram/types.d.mts +1 -3
- package/dist/likec4diagram/ui/FloatingSequenceActors.mjs +5 -7
- package/dist/likec4diagram/ui/notation/NotationPanel.css.mjs +1 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.mjs +6 -7
- package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.mjs +2 -3
- package/dist/likec4diagram/ui/sequence-outline/FlowRow.mjs +3 -4
- package/dist/likec4diagram/ui/sequence-outline/OutlineBody.mjs +4 -7
- package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.mjs +4 -5
- package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.mjs +4 -6
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.mjs +2 -3
- package/dist/likec4diagram/ui/sequence-outline/StepBadge.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/StepRow.mjs +7 -8
- package/dist/likec4diagram/ui/sequence-outline/StoreProvider.mjs +3 -9
- package/dist/likec4diagram/ui/sequence-outline/depth-of-field.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/motion.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/presentation.mjs +7 -8
- package/dist/likec4diagram/ui/sequence-outline/tree.mjs +1 -2
- package/dist/likec4diagram/ui/sequence-outline/types.mjs +1 -2
- package/dist/likec4diagram/useLayoutConstraints.mjs +5 -10
- package/dist/likec4diagram/useNodeDragHandlers.mjs +28 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.mjs +9 -2
- package/dist/likec4diagram/xyflow-graph/graph-view-to-xy.mjs +1 -2
- package/dist/likec4diagram/xyflow-graph/useGraphForceSimulation.mjs +3 -6
- package/dist/likec4diagram/xyflow-props.mjs +25 -0
- package/dist/likec4diagram/xyflow-sequence/const.mjs +1 -2
- package/dist/likec4diagram/xyflow-sequence/layouter.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-view.mjs +2 -3
- package/dist/likec4diagram/xyflow-sequence/utils.mjs +1 -2
- package/dist/navigationpanel/ElementViewControls.mjs +6 -7
- package/dist/navigationpanel/NavigationPanel.mjs +38 -67
- package/dist/navigationpanel/NavigationPanelControls.mjs +35 -114
- package/dist/navigationpanel/NavigationPanelDropdown.mjs +37 -34
- package/dist/navigationpanel/_common.mjs +3 -4
- package/dist/navigationpanel/actor.actions.mjs +1 -2
- package/dist/navigationpanel/actor.d.mts +0 -2
- package/dist/navigationpanel/actor.mjs +2 -3
- package/dist/navigationpanel/actor.setup.d.mts +1 -3
- package/dist/navigationpanel/actor.setup.mjs +1 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.mjs +160 -90
- package/dist/navigationpanel/comparepanel/DriftsSummary.mjs +173 -142
- package/dist/{likec4diagram/ui → navigationpanel/comparepanel}/LayoutDriftFrame.mjs +6 -12
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.mjs +14 -19
- package/dist/navigationpanel/controls/LayoutWarning.mjs +3 -4
- package/dist/navigationpanel/controls/LogoButton.mjs +5 -23
- package/dist/navigationpanel/controls/NavigationBreadcrumbs.mjs +110 -0
- package/dist/navigationpanel/controls/NavigationButtons.mjs +3 -4
- package/dist/navigationpanel/controls/OpenSource.mjs +2 -3
- package/dist/navigationpanel/controls/SearchControl.mjs +2 -3
- package/dist/navigationpanel/controls/ToggleReadonly.mjs +36 -21
- package/dist/navigationpanel/controls/ViewDetailsButton.mjs +12 -15
- package/dist/navigationpanel/dropdown/ProjectsMenu.mjs +46 -13
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.mjs +3 -4
- package/dist/navigationpanel/editorpanel/CenterCamera.mjs +2 -3
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.mjs +3 -4
- package/dist/navigationpanel/editorpanel/EditorPanel.mjs +4 -4
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.mjs +11 -13
- package/dist/navigationpanel/editorpanel/ToggleReadonly.mjs +2 -3
- package/dist/navigationpanel/editorpanel/_common.mjs +1 -2
- package/dist/navigationpanel/editorpanel/styles.mjs +1 -2
- package/dist/navigationpanel/hooks.mjs +1 -2
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.mjs +5 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.mjs +7 -9
- package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.mjs +1 -2
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.mjs +3 -4
- package/dist/navigationpanel/windows/ViewDetailsWindow.mjs +44 -38
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowFork.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowGuide.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.mjs +1 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCaretRightFilled.mjs +16 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCornerDownRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRepeat.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRobot.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSparkles.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.mjs +1 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.49.0_react@19.3.0 → @tabler_icons-react@3.49.0_react@19.3.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.mjs +1 -2
- package/dist/overlays/Overlays.mjs +4 -5
- package/dist/overlays/element-details/ElementDetails.mjs +2 -3
- package/dist/overlays/element-details/ElementDetailsCard.css.mjs +148 -102
- package/dist/overlays/element-details/ElementDetailsCard.mjs +503 -256
- package/dist/overlays/element-details/MetadataValue.mjs +115 -222
- package/dist/overlays/element-details/PropertiesSplit.mjs +162 -0
- package/dist/overlays/element-details/TabPanelDeployments.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelDeployments.mjs +5 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelRelationships.mjs +6 -7
- package/dist/overlays/element-details/TabPanelStructure.css.mjs +1 -2
- package/dist/overlays/element-details/TabPanelStructure.mjs +3 -4
- package/dist/overlays/element-details/TabPanelViews.mjs +51 -0
- package/dist/overlays/element-details/actor.d.mts +6 -7
- package/dist/overlays/element-details/actor.mjs +31 -15
- package/dist/overlays/element-details/actorContext.mjs +1 -2
- package/dist/overlays/element-details/subject.d.mts +12 -0
- package/dist/overlays/element-details/subject.mjs +15 -0
- package/dist/overlays/hooks.mjs +1 -2
- package/dist/overlays/overlay/Overlay.d.mts +1 -3
- package/dist/overlays/overlay/Overlay.mjs +4 -5
- package/dist/overlays/overlaysActor.d.mts +12 -5
- package/dist/overlays/overlaysActor.mjs +24 -6
- package/dist/overlays/relationship-details/RelationshipDetails.mjs +16 -8
- package/dist/overlays/relationship-details/SelectEdge.css.mjs +1 -2
- package/dist/overlays/relationship-details/SelectEdge.mjs +3 -4
- package/dist/overlays/relationship-details/_types.d.mts +6 -4
- package/dist/overlays/relationship-details/actor.d.mts +0 -2
- package/dist/overlays/relationship-details/actor.mjs +2 -3
- package/dist/overlays/relationship-details/compute.mjs +1 -2
- package/dist/overlays/relationship-details/custom/ElementActions.mjs +6 -7
- package/dist/overlays/relationship-details/custom/edgeTypes.mjs +8 -13
- package/dist/overlays/relationship-details/custom/nodeTypes.mjs +8 -6
- package/dist/overlays/relationship-details/hooks.mjs +1 -2
- package/dist/overlays/relationship-details/layout-to-xyflow.mjs +3 -3
- package/dist/overlays/relationship-details/layout.d.mts +1 -3
- package/dist/overlays/relationship-details/layout.mjs +39 -13
- package/dist/overlays/relationships-browser/RelationshipsBrowser.mjs +12 -13
- package/dist/overlays/relationships-browser/SelectElement.css.mjs +1 -2
- package/dist/overlays/relationships-browser/SelectElement.mjs +4 -5
- package/dist/overlays/relationships-browser/_types.d.mts +6 -4
- package/dist/overlays/relationships-browser/actor.d.mts +0 -2
- package/dist/overlays/relationships-browser/actor.mjs +4 -5
- package/dist/overlays/relationships-browser/const.mjs +1 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.mjs +6 -7
- package/dist/overlays/relationships-browser/custom/EmptyNode.mjs +1 -2
- package/dist/overlays/relationships-browser/custom/edgeTypes.mjs +14 -17
- package/dist/overlays/relationships-browser/custom/nodeTypes.mjs +12 -7
- package/dist/overlays/relationships-browser/hooks.mjs +1 -2
- package/dist/overlays/relationships-browser/layout.d.mts +1 -3
- package/dist/overlays/relationships-browser/layout.mjs +73 -24
- package/dist/overlays/relationships-browser/useViewToNodesEdges.mjs +2 -2
- package/dist/overlays/types.d.mts +5 -7
- package/dist/projects-overview/ProjectsOverview.d.mts +1 -3
- package/dist/projects-overview/ProjectsOverview.mjs +1 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.mts +1 -3
- package/dist/projects-overview/ProjectsOverviewXY.mjs +3 -4
- package/dist/projects-overview/actor.mjs +1 -2
- package/dist/projects-overview/context.mjs +1 -2
- package/dist/projects-overview/custom/edgeTypes.mjs +2 -3
- package/dist/projects-overview/custom/nodeTypes.mjs +3 -4
- package/dist/projects-overview/hooks.mjs +1 -2
- package/dist/projects-overview/layouted-to-xyflow.mjs +1 -2
- package/dist/projects-overview/panel/ProjectsOverviewPanel.mjs +1 -2
- package/dist/projects-overview/persistence.mjs +1 -2
- package/dist/search/Search.d.mts +1 -3
- package/dist/search/Search.mjs +13 -12
- package/dist/search/SearchContext.d.mts +1 -3
- package/dist/search/SearchContext.mjs +1 -2
- package/dist/search/XStateSearchAdapter.mjs +1 -2
- package/dist/search/components/ElementsColumn.css.mjs +1 -2
- package/dist/search/components/ElementsColumn.mjs +31 -9
- package/dist/search/components/PickView.mjs +3 -4
- package/dist/search/components/SearchByTags.mjs +3 -4
- package/dist/search/components/SearchInput.mjs +3 -4
- package/dist/search/components/ViewsColum.mjs +20 -20
- package/dist/search/components/ViewsColumn.css.mjs +1 -2
- package/dist/search/components/_shared.css.mjs +1 -2
- package/dist/search/components/styles.css.mjs +1 -2
- package/dist/search/components/utils.mjs +32 -3
- package/dist/search/fuzzy.mjs +27 -0
- package/dist/search/hooks.mjs +1 -2
- package/dist/search/metadata-search.mjs +32 -0
- package/dist/search/searchActor.d.mts +1 -3
- package/dist/search/searchActor.mjs +1 -2
- package/dist/shadowroot/ShadowRoot.mjs +8 -7
- package/dist/styles-font2.mjs +1 -2
- package/dist/styles-min.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles2.mjs +2 -3
- package/dist/utils/defineActors.d.mts +1 -3
- package/dist/utils/defineActors.mjs +1 -2
- package/dist/utils/edge-corners.mjs +2 -3
- package/dist/utils/edge-endpoints.mjs +1 -2
- package/dist/utils/edge-label.mjs +1 -2
- package/dist/utils/edge-path-through-label.mjs +51 -0
- package/dist/utils/edge-path.mjs +1 -2
- package/dist/utils/edge-tracks.mjs +1 -2
- package/dist/utils/filterProjects.d.mts +10 -0
- package/dist/utils/filterProjects.mjs +36 -0
- package/dist/utils/index.mjs +1 -0
- package/dist/utils/measure-edge-label.mjs +129 -0
- package/dist/utils/readableText.mjs +1 -2
- package/dist/utils/roundDpr.mjs +1 -2
- package/dist/utils/search-event.mjs +17 -0
- package/dist/utils/view-bounds.d.mts +1 -3
- package/dist/utils/view-bounds.mjs +1 -2
- package/dist/utils/view-routing.mjs +1 -2
- package/dist/utils/xyflow.mjs +2 -3
- package/dist/webcomponent/defineWebcomponent.d.mts +12 -0
- package/dist/webcomponent/defineWebcomponent.mjs +93 -0
- package/package.json +29 -26
- package/panda.buildinfo.json +211 -208
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/base-primitives/memoNode.mjs +0 -23
- package/dist/context/DiagramEventHandlers.d.mts +0 -11
- package/dist/custom/hooks.d.mts +0 -17
- package/dist/hooks/useSetState.d.mts +0 -10
- package/dist/likec4diagram/custom/edges/edges.css.mjs +0 -50
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.mjs +0 -69
- package/dist/navigationpanel/comparepanel/ComparePanelControls.mjs +0 -56
- package/dist/navigationpanel/styles.css.mjs +0 -23
- package/src/styles-font.css +0 -114
- package/src/styles-min.css +0 -2
- package/src/styles-xyflow.css +0 -1
- package/src/styles.css +0 -3
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
import { m } from "motion/react";
|
|
6
6
|
import { Box } from "@likec4/styles/jsx";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/likec4diagram/ui/sequence-outline/StepBadge.tsx
|
|
9
9
|
const stepBadgeBase = css.raw({
|
|
10
10
|
flex: "none",
|
|
11
11
|
display: "flex",
|
|
@@ -50,5 +50,4 @@ const NotesDot = () => /* @__PURE__ */ jsx(Box, { css: {
|
|
|
50
50
|
bg: "text.dimmed"
|
|
51
51
|
} });
|
|
52
52
|
|
|
53
|
-
//#endregion
|
|
54
53
|
export { NotesDot, StepBadge };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconArrowRight from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
import IconArrowRight from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.mjs";
|
|
3
|
+
import { MarkdownWithRefs } from "../../../components/markdown/MarkdownWithRefs.mjs";
|
|
3
4
|
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
4
|
-
import { Markdown } from "../../../base-primitives/Markdown.mjs";
|
|
5
|
-
import { SEQ_CARD_LAYOUT_ID, SEQ_TRANSITION } from "./motion.mjs";
|
|
6
5
|
import { recessed } from "./depth-of-field.mjs";
|
|
6
|
+
import { SEQ_CARD_LAYOUT_ID, SEQ_TRANSITION } from "./motion.mjs";
|
|
7
7
|
import { NotesDot, StepBadge } from "./StepBadge.mjs";
|
|
8
8
|
import { css } from "@likec4/styles/css";
|
|
9
|
-
import {
|
|
9
|
+
import { useRef } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { RichText } from "@likec4/core";
|
|
12
12
|
import { m } from "motion/react";
|
|
13
|
-
import {
|
|
13
|
+
import { styled } from "@likec4/styles/jsx";
|
|
14
14
|
import { hstack } from "@likec4/styles/patterns";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// src/likec4diagram/ui/sequence-outline/StepRow.tsx
|
|
17
17
|
/** A step the walkthrough is not on: one line, clickable, recessed with its level. */
|
|
18
18
|
function StepRow({ node, recession, active }) {
|
|
19
19
|
const diagram = useDiagram();
|
|
@@ -167,7 +167,7 @@ const ActiveStepCard = ({ node }) => {
|
|
|
167
167
|
height: 10
|
|
168
168
|
},
|
|
169
169
|
transition: SEQ_TRANSITION,
|
|
170
|
-
children: /* @__PURE__ */ jsx(
|
|
170
|
+
children: /* @__PURE__ */ jsx(MarkdownWithRefs, {
|
|
171
171
|
value: RichText.from(notes),
|
|
172
172
|
fontSize: "md",
|
|
173
173
|
textScale: .95,
|
|
@@ -188,5 +188,4 @@ const ActiveStepCard = ({ node }) => {
|
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
190
|
|
|
191
|
-
//#endregion
|
|
192
191
|
export { StepRow };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { roundDpr } from "../../../utils/roundDpr.mjs";
|
|
3
2
|
import { selectDiagramContext, useDiagramSelector } from "../../../hooks/safeContext.mjs";
|
|
3
|
+
import { roundDpr } from "../../../utils/roundDpr.mjs";
|
|
4
4
|
import { buildTree } from "./tree.mjs";
|
|
5
|
-
import { createContext, use, useEffect
|
|
5
|
+
import { createContext, use, useEffect } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { shallowEqual } from "fast-equals";
|
|
8
8
|
import { dynamicViewFlow, flowAncestors, invariant, isDynamicViewWithFlow } from "@likec4/core";
|
|
9
9
|
import { extractViewTitleFromPath } from "@likec4/core/model";
|
|
10
10
|
import { createStoreLogic, useSelector, useStore } from "@xstate/store-react";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/likec4diagram/ui/sequence-outline/StoreProvider.tsx
|
|
13
13
|
const selectFlow = selectDiagramContext((s) => {
|
|
14
14
|
const title = extractViewTitleFromPath(s.view.title ?? "Untitled");
|
|
15
15
|
const description = s.view.description;
|
|
@@ -69,11 +69,6 @@ function StoreGuard({ children, input }) {
|
|
|
69
69
|
useEffect(() => {
|
|
70
70
|
store.trigger.updateInput({ input });
|
|
71
71
|
}, [input]);
|
|
72
|
-
useEffect(() => {
|
|
73
|
-
return store.inspect((event) => {
|
|
74
|
-
console.log("event", event);
|
|
75
|
-
}).unsubscribe;
|
|
76
|
-
}, [store]);
|
|
77
72
|
return /* @__PURE__ */ jsx(Context, {
|
|
78
73
|
value: store,
|
|
79
74
|
children
|
|
@@ -92,5 +87,4 @@ function useOutlinePanelWidth() {
|
|
|
92
87
|
return useSelector(store.selectors.outlinePanelWidth);
|
|
93
88
|
}
|
|
94
89
|
|
|
95
|
-
//#endregion
|
|
96
90
|
export { StoreProvider, useIsCollapsed, useOutlinePanelWidth, useSelectContext };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { css } from "@likec4/styles/css";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/likec4diagram/ui/sequence-outline/depth-of-field.ts
|
|
5
5
|
/**
|
|
6
6
|
* The outline reads as a stack of planes: the nesting level the walkthrough is standing on
|
|
7
7
|
* renders at full strength, and every level *above* it steps back in contrast, saturation
|
|
@@ -75,5 +75,4 @@ const activeFrameBorder = css({
|
|
|
75
75
|
pointerEvents: "none"
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
//#endregion
|
|
79
78
|
export { activeFrame, activeFrameBorder, levelBand, nestedBand, recessed, recessionOf, shadedPanelBg };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/likec4diagram/ui/sequence-outline/motion.ts
|
|
2
2
|
/**
|
|
3
3
|
* Shared-layout transitions. The frame, the card and the badge each carry a `layoutId`, so
|
|
4
4
|
* walking a step moves one element rather than swapping two — the frame travels to the branch
|
|
@@ -18,5 +18,4 @@ const SEQ_FRAME_LAYOUT_ID = "likec4-seq-active-frame";
|
|
|
18
18
|
const SEQ_CARD_LAYOUT_ID = "likec4-seq-active-card";
|
|
19
19
|
const SEQ_BADGE_LAYOUT_ID = "likec4-seq-active-badge";
|
|
20
20
|
|
|
21
|
-
//#endregion
|
|
22
21
|
export { SEQ_BADGE_LAYOUT_ID, SEQ_CARD_LAYOUT_ID, SEQ_FRAME_LAYOUT_ID, SEQ_TRANSITION };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import IconAlertTriangle from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
-
import IconArrowFork from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
3
|
-
import IconArrowGuide from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
4
|
-
import IconCornerDownRight from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
5
|
-
import IconPlayerStop from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
6
|
-
import IconRepeat from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
1
|
+
import IconAlertTriangle from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.mjs";
|
|
2
|
+
import IconArrowFork from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowFork.mjs";
|
|
3
|
+
import IconArrowGuide from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowGuide.mjs";
|
|
4
|
+
import IconCornerDownRight from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCornerDownRight.mjs";
|
|
5
|
+
import IconPlayerStop from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.mjs";
|
|
6
|
+
import IconRepeat from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRepeat.mjs";
|
|
7
7
|
import { css } from "@likec4/styles/css";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/likec4diagram/ui/sequence-outline/presentation.ts
|
|
10
10
|
/**
|
|
11
11
|
* PandaCSS `colorPalette` classes for each sub-flow palette.
|
|
12
12
|
* Declared as literals so the static analyzer can extract them.
|
|
@@ -83,5 +83,4 @@ const flowPresentation = {
|
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
//#endregion
|
|
87
86
|
export { flowPresentation };
|
|
@@ -2,7 +2,7 @@ import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { isOutlineFlowNode } from "./types.mjs";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/likec4diagram/ui/sequence-outline/tree.ts
|
|
6
6
|
/** Flattens the walkthrough flow into the nested step/sub-flow tree the outline renders. */
|
|
7
7
|
function buildTree(flow) {
|
|
8
8
|
const tree = [];
|
|
@@ -65,5 +65,4 @@ function collectTrail(nodes, ancestors) {
|
|
|
65
65
|
return trail;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
//#endregion
|
|
69
68
|
export { buildTree, collectTrail, firstStepOf };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/likec4diagram/ui/sequence-outline/types.ts
|
|
4
4
|
/**
|
|
5
5
|
* Type guard narrowing a tree node to a sub-flow node.
|
|
6
6
|
* (The discriminant lives on the nested `nodeProps.type`, so an explicit guard
|
|
@@ -10,5 +10,4 @@ function isOutlineFlowNode(node) {
|
|
|
10
10
|
return node.nodeProps.type !== "step";
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
//#endregion
|
|
14
13
|
export { isOutlineFlowNode };
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { useXYStoreApi } from "../hooks/useXYFlow.mjs";
|
|
3
|
-
import { leafNodeRects, nodeToRect as nodeToRect$1 } from "../utils/xyflow.mjs";
|
|
4
|
-
import { useDiagram } from "../hooks/safeContext.mjs";
|
|
5
|
-
import { useCurrentViewRouting } from "../hooks/useCurrentView.mjs";
|
|
6
|
-
import { vector as vector$1 } from "../utils/index.mjs";
|
|
7
3
|
import { selectLabelRoutes } from "../hooks/useEdgeTracks.mjs";
|
|
4
|
+
import { vector as vector$1 } from "../utils/index.mjs";
|
|
8
5
|
import { initialControlPoints } from "../utils/edge-corners.mjs";
|
|
6
|
+
import { leafNodeRects, nodeToRect as nodeToRect$1 } from "../utils/xyflow.mjs";
|
|
9
7
|
import { useMemo, useRef } from "react";
|
|
10
8
|
import { clamp, difference, filter, flatMap, hasAtLeast, map, pipe, unique } from "remeda";
|
|
11
9
|
import { DefaultMap, nonNullable } from "@likec4/core";
|
|
10
|
+
import { getNodeDimensions } from "@xyflow/system";
|
|
12
11
|
import { BBox as BBox$1, placeLabelsAlongRoutes } from "@likec4/core/geometry";
|
|
13
12
|
import { invariant as invariant$1, isome } from "@likec4/core/utils";
|
|
14
|
-
import { getNodeDimensions } from "@xyflow/system";
|
|
15
13
|
import { produce } from "immer";
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
// src/likec4diagram/useLayoutConstraints.ts
|
|
18
16
|
var Rect$1 = class {
|
|
19
17
|
static {
|
|
20
18
|
__name(this, "Rect");
|
|
@@ -444,10 +442,8 @@ function createLayoutConstraints(xyflowApi, editingNodeIds, routing) {
|
|
|
444
442
|
/**
|
|
445
443
|
* Keeps the layout constraints (parent nodes and children) when dragging a node
|
|
446
444
|
*/
|
|
447
|
-
function useLayoutConstraints() {
|
|
445
|
+
function useLayoutConstraints({ routing, diagram }) {
|
|
448
446
|
const xystore = useXYStoreApi();
|
|
449
|
-
const diagram = useDiagram();
|
|
450
|
-
const routing = useCurrentViewRouting();
|
|
451
447
|
const solverRef = useRef(void 0);
|
|
452
448
|
return useMemo(() => {
|
|
453
449
|
return {
|
|
@@ -478,5 +474,4 @@ function useLayoutConstraints() {
|
|
|
478
474
|
]);
|
|
479
475
|
}
|
|
480
476
|
|
|
481
|
-
//#endregion
|
|
482
477
|
export { createLayoutConstraints, useLayoutConstraints };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { useLayoutConstraints } from "./useLayoutConstraints.mjs";
|
|
3
|
+
import { useGraphForceSimulation } from "./xyflow-graph/useGraphForceSimulation.mjs";
|
|
4
|
+
|
|
5
|
+
// src/likec4diagram/useNodeDragHandlers.ts
|
|
6
|
+
/**
|
|
7
|
+
* Keeps the layout constraints (parent nodes and children) when dragging a node
|
|
8
|
+
*/
|
|
9
|
+
function useNodeDragHandlers({ nodesDraggable, viewRouting, isGraphVariant, graphTopology, diagram }) {
|
|
10
|
+
const graphForceHandlers = useGraphForceSimulation({
|
|
11
|
+
enabled: isGraphVariant,
|
|
12
|
+
topology: graphTopology ?? {
|
|
13
|
+
graphNodes: [],
|
|
14
|
+
graphEdges: [],
|
|
15
|
+
topologyKey: "-none-"
|
|
16
|
+
},
|
|
17
|
+
diagram
|
|
18
|
+
});
|
|
19
|
+
const layoutConstraints = useLayoutConstraints({
|
|
20
|
+
routing: viewRouting,
|
|
21
|
+
diagram
|
|
22
|
+
});
|
|
23
|
+
if (!nodesDraggable) return;
|
|
24
|
+
if (isGraphVariant && graphTopology && graphTopology.graphNodes.length > 0) return graphForceHandlers;
|
|
25
|
+
return layoutConstraints;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { useNodeDragHandlers };
|
|
@@ -4,7 +4,13 @@ import { readableText } from "../../utils/readableText.mjs";
|
|
|
4
4
|
import { hasAtLeast, pick } from "remeda";
|
|
5
5
|
import { GroupElementKind, Queue, invariant, isStepPath, nonNullable, whereOperatorAsPredicate } from "@likec4/core";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/likec4diagram/xyflow-diagram/diagram-view.ts
|
|
8
|
+
/**
|
|
9
|
+
* Always defined: node updates keep the previous class name when the new one is undefined
|
|
10
|
+
*/
|
|
11
|
+
function diffClassName(diffStatus) {
|
|
12
|
+
return diffStatus ? `likec4-diff likec4-diff-${diffStatus}` : "";
|
|
13
|
+
}
|
|
8
14
|
function sentence(parts) {
|
|
9
15
|
return parts.filter((part) => !!part).map((part) => part.endsWith(".") ? part : `${part}.`).join(" ");
|
|
10
16
|
}
|
|
@@ -108,6 +114,7 @@ function diagramToXY(opts) {
|
|
|
108
114
|
height: node.height
|
|
109
115
|
},
|
|
110
116
|
ariaLabel: nodeAriaLabel(node),
|
|
117
|
+
className: diffClassName(node.diffStatus),
|
|
111
118
|
initialWidth: node.width,
|
|
112
119
|
initialHeight: node.height,
|
|
113
120
|
hidden: node.kind !== GroupElementKind && !visiblePredicate(node),
|
|
@@ -239,6 +246,7 @@ function diagramToXY(opts) {
|
|
|
239
246
|
source: ns + source,
|
|
240
247
|
target: ns + target,
|
|
241
248
|
ariaLabel: edgeAriaLabel(edge, nodeById(source), nodeById(target)),
|
|
249
|
+
className: diffClassName(edge.diffStatus),
|
|
242
250
|
zIndex: ZIndexes.Edge,
|
|
243
251
|
hidden: !visiblePredicate(edge),
|
|
244
252
|
deletable,
|
|
@@ -271,5 +279,4 @@ function diagramToXY(opts) {
|
|
|
271
279
|
};
|
|
272
280
|
}
|
|
273
281
|
|
|
274
|
-
//#endregion
|
|
275
282
|
export { diagramToXY };
|
|
@@ -4,7 +4,7 @@ import { readableText } from "../../utils/readableText.mjs";
|
|
|
4
4
|
import { pick } from "remeda";
|
|
5
5
|
import { nonNullable, whereOperatorAsPredicate } from "@likec4/core";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/likec4diagram/xyflow-graph/graph-view-to-xy.ts
|
|
8
8
|
/**
|
|
9
9
|
* Diameter (in px) of the circle used to represent an element in "graph" display variant.
|
|
10
10
|
*/
|
|
@@ -172,5 +172,4 @@ function graphViewToXY(opts) {
|
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
//#endregion
|
|
176
175
|
export { graphViewToXY };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { useDiagram } from "../../hooks/safeContext.mjs";
|
|
3
2
|
import { useEffect, useMemo, useRef } from "react";
|
|
4
3
|
import { forceCollide, forceLink, forceManyBody, forceSimulation, forceX, forceY } from "d3-force";
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
// src/likec4diagram/xyflow-graph/useGraphForceSimulation.ts
|
|
7
6
|
const radius = 20 / 2;
|
|
8
7
|
/**
|
|
9
8
|
* Picks the visible graph-element nodes and visible relationship edges out of a diagram's
|
|
@@ -62,10 +61,9 @@ function buildSimGraph(graphNodes, graphEdges) {
|
|
|
62
61
|
* Positions are pushed through the same `xyflow.applyChanges` channel as a regular node drag,
|
|
63
62
|
* so they stay in sync with the rest of the diagram state instead of drifting out of it.
|
|
64
63
|
*/
|
|
65
|
-
function useGraphForceSimulation({ enabled,
|
|
66
|
-
const diagram = useDiagram();
|
|
64
|
+
function useGraphForceSimulation({ enabled, topology, diagram }) {
|
|
67
65
|
const simulationRef = useRef(void 0);
|
|
68
|
-
const { graphNodes, graphEdges, topologyKey } =
|
|
66
|
+
const { graphNodes, graphEdges, topologyKey } = topology;
|
|
69
67
|
useEffect(() => {
|
|
70
68
|
if (!enabled || graphNodes.length === 0) {
|
|
71
69
|
simulationRef.current?.stop();
|
|
@@ -124,5 +122,4 @@ function useGraphForceSimulation({ enabled, nodes: xynodes, edges: xyedges }) {
|
|
|
124
122
|
}), []);
|
|
125
123
|
}
|
|
126
124
|
|
|
127
|
-
//#endregion
|
|
128
125
|
export { buildSimGraph, selectGraphTopology, useGraphForceSimulation };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
|
|
3
|
+
// src/likec4diagram/xyflow-props.ts
|
|
4
|
+
/**
|
|
5
|
+
* Viewport controlled by the diagram, when neither fit view nor initial zoom is set:
|
|
6
|
+
* top-left corner of the view bounds at zoom 1.
|
|
7
|
+
* Returns `undefined` when the viewport is left to the diagram actor.
|
|
8
|
+
*/
|
|
9
|
+
function resolveControlledViewport(enableFitView, initialZoom, bounds) {
|
|
10
|
+
if (enableFitView || initialZoom !== void 0) return;
|
|
11
|
+
return {
|
|
12
|
+
x: -bounds.x,
|
|
13
|
+
y: -bounds.y,
|
|
14
|
+
zoom: 1
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Resolves whether an interaction (dragging, selection) is enabled:
|
|
19
|
+
* the override wins over the default, and a busy editor disables it.
|
|
20
|
+
*/
|
|
21
|
+
function resolveInteractionEnabled(enabled, override, isEditorBusy) {
|
|
22
|
+
return (override ?? enabled) && !isEditorBusy;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { resolveControlledViewport, resolveInteractionEnabled };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/likec4diagram/xyflow-sequence/const.ts
|
|
2
2
|
const SeqZIndex = {
|
|
3
3
|
compound: 1,
|
|
4
4
|
subflows: 10,
|
|
@@ -10,5 +10,4 @@ const SeqParallelAreaColor = {
|
|
|
10
10
|
active: "amber"
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
//#endregion
|
|
14
13
|
export { SeqParallelAreaColor, SeqZIndex };
|
|
@@ -2,11 +2,11 @@ import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { normalizeSpacing, rectFromSteps } from "./utils.mjs";
|
|
3
3
|
import { filter, first, flatMap, hasAtLeast, last, map, only, pipe } from "remeda";
|
|
4
4
|
import { invariant, nonNullable, nonexhaustive } from "@likec4/core/utils";
|
|
5
|
-
import { StepPath,
|
|
5
|
+
import { StepPath, flowGuards } from "@likec4/core/types";
|
|
6
6
|
import * as kiwi from "@lume/kiwi";
|
|
7
7
|
import defu from "defu";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/likec4diagram/xyflow-sequence/layouter.ts
|
|
10
10
|
const Strength = {
|
|
11
11
|
required: kiwi.Strength.required,
|
|
12
12
|
strong: kiwi.Strength.strong,
|
|
@@ -562,5 +562,4 @@ var SequenceViewLayouter = class {
|
|
|
562
562
|
}
|
|
563
563
|
};
|
|
564
564
|
|
|
565
|
-
//#endregion
|
|
566
565
|
export { SequenceViewLayouter, Strength };
|
|
@@ -5,7 +5,7 @@ import { entries, filter, first, identity, isArray, isEmptyish, isTruthy, map, p
|
|
|
5
5
|
import { nonNullable } from "@likec4/core";
|
|
6
6
|
import { DynamicViewFlow, NodeId as NodeId$1, dynamicViewFlow as dynamicViewFlow$1, hasProp as hasProp$1 } from "@likec4/core/types";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/likec4diagram/xyflow-sequence/sequence-view-to-xy.ts
|
|
9
9
|
const calcCollapsedFlows = piped(identity(), entries(), filter(([_, collapsed]) => collapsed), map(([flowId]) => flowId));
|
|
10
10
|
/**
|
|
11
11
|
* Converts a sequence layout to XY flow nodes and edges.
|
|
@@ -39,7 +39,7 @@ function sequenceLayoutToXY({ view, currentViewId, collapsedFlows }) {
|
|
|
39
39
|
console.error(`Step Edge "${step.id}" not found`);
|
|
40
40
|
continue;
|
|
41
41
|
}
|
|
42
|
-
xyedges.push(toSeqStepEdge(step, edge,
|
|
42
|
+
xyedges.push(toSeqStepEdge(step, edge, view.id, stepnum++, ctx));
|
|
43
43
|
}
|
|
44
44
|
return {
|
|
45
45
|
xynodes,
|
|
@@ -285,5 +285,4 @@ function composeAltTryData(parent, subflow, { flow, subflowArea }) {
|
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
//#endregion
|
|
289
288
|
export { sequenceLayoutToXY };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { buildCompounds } from "./utils.mjs";
|
|
3
2
|
import { SequenceViewLayouter } from "./layouter.mjs";
|
|
3
|
+
import { buildCompounds } from "./utils.mjs";
|
|
4
4
|
import { flat, groupByProp, hasAtLeast, map, mapValues, pipe, values } from "remeda";
|
|
5
5
|
import { DefaultMap, invariant, nonNullable } from "@likec4/core/utils";
|
|
6
6
|
import { parentFlow } from "@likec4/core/types";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/likec4diagram/xyflow-sequence/sequence-view.ts
|
|
9
9
|
function calcSequenceLayout(view, flow, collapsedFlows = []) {
|
|
10
10
|
const actorNodes = /* @__PURE__ */ new Set();
|
|
11
11
|
const getNode = (id) => nonNullable(view.nodes.find((n) => n.id === id));
|
|
@@ -142,5 +142,4 @@ function toSeqActor({ actor, ports, layout }) {
|
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
//#endregion
|
|
146
145
|
export { calcSequenceLayout };
|
|
@@ -2,7 +2,7 @@ import { __name } from "../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { groupBy, mapValues, pipe, values } from "remeda";
|
|
3
3
|
import { Stack, invariant, isAncestor } from "@likec4/core/utils";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/likec4diagram/xyflow-sequence/utils.ts
|
|
6
6
|
const paddingFromNumber = (spacing) => ({
|
|
7
7
|
left: spacing,
|
|
8
8
|
right: spacing,
|
|
@@ -93,5 +93,4 @@ function buildCompounds(actors, nodes) {
|
|
|
93
93
|
return result;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
//#endregion
|
|
97
96
|
export { buildCompounds, normalizeSpacing, rectFromSteps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { useDiagram } from "../hooks/safeContext.mjs";
|
|
3
3
|
import { css } from "@likec4/styles/css";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -7,16 +7,17 @@ import { invariant } from "@likec4/core";
|
|
|
7
7
|
import { SegmentedControl } from "@mantine/core";
|
|
8
8
|
import * as m from "motion/react-m";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/navigationpanel/ElementViewControls.tsx
|
|
11
11
|
/**
|
|
12
12
|
* Diagram/Graph segmented control for element views.
|
|
13
13
|
*/
|
|
14
|
-
const ElementViewModeSwitcher = forwardRef(({ value, onChange }, ref) => /* @__PURE__ */ jsx(m.div, {
|
|
14
|
+
const ElementViewModeSwitcher = forwardRef(({ value, disabled, onChange }, ref) => /* @__PURE__ */ jsx(m.div, {
|
|
15
15
|
ref,
|
|
16
16
|
layout: "position",
|
|
17
17
|
children: /* @__PURE__ */ jsx(SegmentedControl, {
|
|
18
18
|
size: "xs",
|
|
19
19
|
value,
|
|
20
|
+
disabled,
|
|
20
21
|
onChange: (variant) => {
|
|
21
22
|
invariant(variant === "diagram" || variant === "graph", "Invalid element view variant");
|
|
22
23
|
onChange(variant);
|
|
@@ -31,15 +32,14 @@ const ElementViewModeSwitcher = forwardRef(({ value, onChange }, ref) => /* @__P
|
|
|
31
32
|
}]
|
|
32
33
|
})
|
|
33
34
|
}));
|
|
34
|
-
const selectElementViewVariant = selectDiagramContext((c) => c.elementViewVariant);
|
|
35
35
|
/**
|
|
36
36
|
* Renders the Diagram/Graph toggle for the current element view and switches the diagram's
|
|
37
37
|
* display variant when the user picks a different mode.
|
|
38
38
|
*/
|
|
39
|
-
function ElementViewControls() {
|
|
40
|
-
const elementViewVariant = useDiagramSelector(selectElementViewVariant);
|
|
39
|
+
function ElementViewControls({ elementViewVariant, disabled = false }) {
|
|
41
40
|
const diagram = useDiagram();
|
|
42
41
|
return /* @__PURE__ */ jsx(ElementViewModeSwitcher, {
|
|
42
|
+
disabled,
|
|
43
43
|
value: elementViewVariant,
|
|
44
44
|
onChange: (mode) => {
|
|
45
45
|
diagram.switchElementViewVariant(mode);
|
|
@@ -47,5 +47,4 @@ function ElementViewControls() {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
//#endregion
|
|
51
50
|
export { ElementViewControls };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { NavigationPanel as NavigationPanel$1 } from "../components/NavigationPanel.mjs";
|
|
2
3
|
import { selectDiagramContext, useDiagramSelector } from "../hooks/safeContext.mjs";
|
|
3
4
|
import { useMantinePortalProps } from "../hooks/useMantinePortalProps.mjs";
|
|
4
5
|
import { ComparePanel } from "./comparepanel/ComparePanel.mjs";
|
|
5
6
|
import { EditorPanel } from "./editorpanel/EditorPanel.mjs";
|
|
6
7
|
import { NavigationPanelActorContextProvider } from "./hooks.mjs";
|
|
7
|
-
import { ActiveWalkthroughControls } from "./walkthrough/ActiveWalkthroughControls.mjs";
|
|
8
8
|
import { NavigationPanelControls } from "./NavigationPanelControls.mjs";
|
|
9
9
|
import { NavigationPanelDropdown } from "./NavigationPanelDropdown.mjs";
|
|
10
|
+
import { ActiveWalkthroughControls } from "./walkthrough/ActiveWalkthroughControls.mjs";
|
|
10
11
|
import { WalkthroughPanel } from "./walkthrough/WalkthroughPanel.mjs";
|
|
11
12
|
import { memo, useEffect } from "react";
|
|
12
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -17,9 +18,9 @@ import { hasProp, isDynamicView } from "@likec4/core/types";
|
|
|
17
18
|
import { VStack } from "@likec4/styles/jsx";
|
|
18
19
|
import { getViewFolderPath } from "@likec4/core/model";
|
|
19
20
|
import { hstack } from "@likec4/styles/patterns";
|
|
20
|
-
import
|
|
21
|
+
import "motion/react-m";
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
// src/navigationpanel/NavigationPanel.tsx
|
|
23
24
|
const select = selectDiagramContext((s) => {
|
|
24
25
|
const isActiveWalkthrough = !!s.activeWalkthrough;
|
|
25
26
|
const viewFolder = getViewFolderPath(s.view.title ?? "") ?? "";
|
|
@@ -38,7 +39,7 @@ const select = selectDiagramContext((s) => {
|
|
|
38
39
|
};
|
|
39
40
|
});
|
|
40
41
|
const stateHasActiveTag = (state) => state.hasTag("active");
|
|
41
|
-
const NavigationPanel = memo(({ actorRef }) => {
|
|
42
|
+
const NavigationPanel = memo(({ actorRef, isComparing }) => {
|
|
42
43
|
const opened = useSelector(actorRef, stateHasActiveTag);
|
|
43
44
|
const portalProps = useMantinePortalProps();
|
|
44
45
|
const { viewId, mode, viewFolder } = useDiagramSelector(select);
|
|
@@ -55,70 +56,40 @@ const NavigationPanel = memo(({ actorRef }) => {
|
|
|
55
56
|
viewId,
|
|
56
57
|
viewFolder
|
|
57
58
|
]);
|
|
58
|
-
return /* @__PURE__ */ jsx(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
clickOutsideEvents: [
|
|
92
|
-
"pointerdown",
|
|
93
|
-
"mousedown",
|
|
94
|
-
"click"
|
|
95
|
-
],
|
|
96
|
-
onDismiss: () => actorRef.send({ type: "dropdown.dismiss" }),
|
|
97
|
-
children: [/* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(m$1.div, {
|
|
98
|
-
layout: "size",
|
|
99
|
-
layoutDependency: `mode-${mode}-viewId-${viewId}`,
|
|
100
|
-
className: hstack({
|
|
101
|
-
layerStyle: "likec4.panel",
|
|
102
|
-
position: "relative",
|
|
103
|
-
gap: "xs",
|
|
104
|
-
cursor: "pointer",
|
|
105
|
-
pointerEvents: "all",
|
|
106
|
-
width: "100%"
|
|
107
|
-
}),
|
|
108
|
-
"data-panel": "navigation",
|
|
109
|
-
onMouseLeave: () => actorRef.send({ type: "breadcrumbs.mouseLeave" }),
|
|
110
|
-
children: mode === "walkthrough" ? /* @__PURE__ */ jsx(ActiveWalkthroughControls, {}) : /* @__PURE__ */ jsx(NavigationPanelControls, {})
|
|
111
|
-
}) }), /* @__PURE__ */ jsx(NavigationPanelDropdown, {})]
|
|
112
|
-
})
|
|
113
|
-
}) }),
|
|
114
|
-
/* @__PURE__ */ jsx(ComparePanel, {}),
|
|
115
|
-
mode === "walkthrough" && /* @__PURE__ */ jsx(WalkthroughPanel, {}),
|
|
116
|
-
/* @__PURE__ */ jsx(EditorPanel, {})
|
|
117
|
-
] })
|
|
118
|
-
})
|
|
119
|
-
});
|
|
59
|
+
return /* @__PURE__ */ jsx(NavigationPanel$1.Root, { children: /* @__PURE__ */ jsx(NavigationPanelActorContextProvider, {
|
|
60
|
+
value: actorRef,
|
|
61
|
+
children: mode !== "walkthrough-flow" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
62
|
+
/* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
63
|
+
propagate: true,
|
|
64
|
+
initial: false,
|
|
65
|
+
children: /* @__PURE__ */ jsxs(Popover, {
|
|
66
|
+
offset: { mainAxis: 4 },
|
|
67
|
+
opened,
|
|
68
|
+
position: "bottom-start",
|
|
69
|
+
trapFocus: opened,
|
|
70
|
+
keepMounted: false,
|
|
71
|
+
...portalProps,
|
|
72
|
+
clickOutsideEvents: [
|
|
73
|
+
"pointerdown",
|
|
74
|
+
"mousedown",
|
|
75
|
+
"click"
|
|
76
|
+
],
|
|
77
|
+
onDismiss: () => actorRef.send({ type: "dropdown.dismiss" }),
|
|
78
|
+
children: [/* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(NavigationPanel$1.Body, {
|
|
79
|
+
layout: "size",
|
|
80
|
+
layoutDependency: `mode-${mode}-viewId-${viewId}`,
|
|
81
|
+
"data-panel": "navigation",
|
|
82
|
+
onMouseLeave: () => actorRef.send({ type: "breadcrumbs.mouseLeave" }),
|
|
83
|
+
children: mode === "walkthrough" ? /* @__PURE__ */ jsx(ActiveWalkthroughControls, {}) : /* @__PURE__ */ jsx(NavigationPanelControls, {})
|
|
84
|
+
}) }), /* @__PURE__ */ jsx(NavigationPanelDropdown, {})]
|
|
85
|
+
})
|
|
86
|
+
}) }),
|
|
87
|
+
mode === "walkthrough" && /* @__PURE__ */ jsx(WalkthroughPanel, {}),
|
|
88
|
+
isComparing && /* @__PURE__ */ jsx(ComparePanel, {}),
|
|
89
|
+
/* @__PURE__ */ jsx(EditorPanel, {})
|
|
90
|
+
] })
|
|
91
|
+
}) });
|
|
120
92
|
});
|
|
121
93
|
NavigationPanel.displayName = "NavigationPanel";
|
|
122
94
|
|
|
123
|
-
//#endregion
|
|
124
95
|
export { NavigationPanel };
|