@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
package/dist/index.mjs
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import { DefaultIconRenderer, IconRendererProvider } from "./context/IconRenderer.mjs";
|
|
2
2
|
import { MaxZoom, MinZoom } from "./base/const.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { selectDiagramContext, selectDiagramSnapshot, useDiagram, useDiagramSelector } from "./hooks/safeContext.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { LikeC4Diagram } from "./LikeC4Diagram.mjs";
|
|
4
|
+
import { LikeC4ModelProvider } from "./LikeC4ModelProvider.mjs";
|
|
5
|
+
import { LikeC4EditorProvider } from "./editor/LikeC4EditorProvider.mjs";
|
|
6
|
+
import { selectDiagramContext, selectDiagramSnapshot, useDiagram, useDiagramActorRef, useDiagramSelector } from "./hooks/safeContext.mjs";
|
|
7
|
+
import { createLikeC4Editor } from "./editor/LikeC4EditorCallbacks.mjs";
|
|
8
|
+
import { LikeC4ProjectsProvider } from "./LikeC4ProjectsProvider.mjs";
|
|
9
9
|
import { useOptionalCurrentViewModel, useOptionalLikeC4Model } from "./context/LikeC4ModelContext.mjs";
|
|
10
|
+
import { useOnDiagramEvent } from "./hooks/useDiagram.mjs";
|
|
11
|
+
import { useDiagramCompareLayout } from "./hooks/useDiagramCompareLayout.mjs";
|
|
10
12
|
import { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from "./hooks/useLikeC4Model.mjs";
|
|
11
|
-
import { useLikeC4Styles } from "./hooks/useLikeC4Styles.mjs";
|
|
12
|
-
import { createLikeC4Editor } from "./editor/LikeC4EditorCallbacks.mjs";
|
|
13
|
-
import { LikeC4EditorProvider } from "./editor/LikeC4EditorProvider.mjs";
|
|
14
|
-
import { pickViewBounds } from "./utils/view-bounds.mjs";
|
|
15
13
|
import { useCurrentViewModel } from "./hooks/useCurrentViewModel.mjs";
|
|
16
14
|
import { useChangeLikeC4Project, useHasProjects, useLikeC4Project, useLikeC4ProjectId, useLikeC4Projects, useLikeC4ProjectsContext } from "./hooks/useLikeC4Project.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { SearchPanelContent, bodyCss, dialogCss } from "./search/Search.mjs";
|
|
21
|
-
import { LikeC4Diagram } from "./LikeC4Diagram.mjs";
|
|
22
|
-
import { LikeC4ModelProvider } from "./LikeC4ModelProvider.mjs";
|
|
23
|
-
import { LikeC4ProjectsProvider } from "./LikeC4ProjectsProvider.mjs";
|
|
15
|
+
import { useLikeC4Styles } from "./hooks/useLikeC4Styles.mjs";
|
|
16
|
+
import { filterProjects, projectSearchHighlights } from "./utils/filterProjects.mjs";
|
|
17
|
+
import { useUpdateEffect } from "./hooks/useUpdateEffect.mjs";
|
|
24
18
|
import { StaticLikeC4Diagram } from "./StaticLikeC4Diagram.mjs";
|
|
25
19
|
import { LikeC4View } from "./LikeC4View.mjs";
|
|
26
20
|
import { ReactLikeC4 } from "./ReactLikeC4.mjs";
|
|
21
|
+
import { useCurrentView, useCurrentViewId } from "./hooks/useCurrentView.mjs";
|
|
22
|
+
import { pickViewBounds } from "./utils/view-bounds.mjs";
|
|
27
23
|
import { LikeC4ProjectsOverview } from "./LikeC4ProjectsOverview.mjs";
|
|
24
|
+
import { SearchContext, normalizeSearch, useSearchContext } from "./search/SearchContext.mjs";
|
|
25
|
+
import { SearchPanelContent, bodyCss, dialogCss } from "./search/Search.mjs";
|
|
28
26
|
import { SearchControl } from "./components/SearchControl.mjs";
|
|
27
|
+
import { DefaultMantineProvider, LikeC4MantineProvider } from "./LikeC4MantineProvider.mjs";
|
|
28
|
+
import { FramerMotionConfig } from "./context/FramerMotionConfig.mjs";
|
|
29
|
+
import { Logo, LogoIcon } from "./components/Logo.mjs";
|
|
30
|
+
import { defineLikeC4Webcomponent } from "./webcomponent/defineWebcomponent.mjs";
|
|
29
31
|
|
|
30
|
-
export { DefaultIconRenderer, DefaultMantineProvider, FramerMotionConfig, IconRendererProvider, LikeC4Diagram, LikeC4EditorProvider, LikeC4MantineProvider, LikeC4ModelProvider, LikeC4ProjectsOverview, LikeC4ProjectsProvider, LikeC4View, Logo, LogoIcon, MaxZoom, MinZoom, ReactLikeC4, SearchContext, SearchControl, SearchPanelContent, StaticLikeC4Diagram, createLikeC4Editor, normalizeSearch, pickViewBounds, bodyCss as searchBodyCss, dialogCss as searchDialogCss, selectDiagramContext, selectDiagramSnapshot, useChangeLikeC4Project, useCurrentView, useCurrentViewId, useCurrentViewModel, useDiagram, useDiagramCompareLayout, useDiagramSelector, useHasProjects, useLikeC4Model, useLikeC4Project, useLikeC4ProjectId, useLikeC4Projects, useLikeC4ProjectsContext, useLikeC4Specification, useLikeC4Styles, useLikeC4ViewModel, useOnDiagramEvent, useOptionalCurrentViewModel, useOptionalLikeC4Model, useSearchContext, useUpdateEffect };
|
|
32
|
+
export { DefaultIconRenderer, DefaultMantineProvider, FramerMotionConfig, IconRendererProvider, LikeC4Diagram, LikeC4EditorProvider, LikeC4MantineProvider, LikeC4ModelProvider, LikeC4ProjectsOverview, LikeC4ProjectsProvider, LikeC4View, Logo, LogoIcon, MaxZoom, MinZoom, ReactLikeC4, SearchContext, SearchControl, SearchPanelContent, StaticLikeC4Diagram, createLikeC4Editor, defineLikeC4Webcomponent, filterProjects, normalizeSearch, pickViewBounds, projectSearchHighlights, bodyCss as searchBodyCss, dialogCss as searchDialogCss, selectDiagramContext, selectDiagramSnapshot, useChangeLikeC4Project, useCurrentView, useCurrentViewId, useCurrentViewModel, useDiagram, useDiagramActorRef, useDiagramCompareLayout, useDiagramSelector, useHasProjects, useLikeC4Model, useLikeC4Project, useLikeC4ProjectId, useLikeC4Projects, useLikeC4ProjectsContext, useLikeC4Specification, useLikeC4Styles, useLikeC4ViewModel, useOnDiagramEvent, useOptionalCurrentViewModel, useOptionalLikeC4Model, useSearchContext, useUpdateEffect };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { ErrorBoundary } from "../components/ErrorFallback.mjs";
|
|
2
3
|
import { useEnabledFeatures } from "../context/DiagramFeatures.mjs";
|
|
3
4
|
import { selectDiagramSnapshot, useDiagramSelector } from "../hooks/safeContext.mjs";
|
|
4
|
-
import { ErrorBoundary } from "../components/ErrorFallback.mjs";
|
|
5
5
|
import { NavigationPanel } from "../navigationpanel/NavigationPanel.mjs";
|
|
6
6
|
import { Overlays } from "../overlays/Overlays.mjs";
|
|
7
7
|
import { Search } from "../search/Search.mjs";
|
|
8
8
|
import { RelationshipPopover } from "./relationship-popover/RelationshipPopover.mjs";
|
|
9
|
+
import { isComparingLayouts } from "./state/machine.setup.mjs";
|
|
9
10
|
import { FloatingSequenceActors } from "./ui/FloatingSequenceActors.mjs";
|
|
10
|
-
import { LayoutDriftFrame } from "./ui/LayoutDriftFrame.mjs";
|
|
11
11
|
import { NotationPanel } from "./ui/notation/NotationPanel.mjs";
|
|
12
12
|
import { SequenceOutlinePanel } from "./ui/sequence-outline/SequenceOutlinePanel.mjs";
|
|
13
13
|
import { memo, useCallback } from "react";
|
|
@@ -15,11 +15,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
15
15
|
import { useRerender } from "@react-hookz/web";
|
|
16
16
|
import { hasProp, isDynamicView } from "@likec4/core";
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// src/likec4diagram/DiagramUI.tsx
|
|
19
19
|
const selectChildren = selectDiagramSnapshot((s) => ({
|
|
20
20
|
overlays: s.children.overlays ?? null,
|
|
21
21
|
search: s.children.search ?? null,
|
|
22
22
|
navigation: s.children.navigationPanel ?? null,
|
|
23
|
+
isComparing: isComparingLayouts(s),
|
|
23
24
|
...isDynamicView(s.context.view) ? {
|
|
24
25
|
isSequenceView: s.context.dynamicViewVariant === "sequence",
|
|
25
26
|
isActiveWalkthrough: s.context.dynamicViewVariant === "sequence" && !!s.context.activeWalkthrough && hasProp(s.context.view, "flow")
|
|
@@ -29,10 +30,10 @@ const selectChildren = selectDiagramSnapshot((s) => ({
|
|
|
29
30
|
isActiveWalkthrough: false
|
|
30
31
|
}
|
|
31
32
|
}));
|
|
32
|
-
|
|
33
|
-
const { enableControls, enableNotations, enableSearch, enableRelationshipDetails, enableReadOnly
|
|
33
|
+
const LikeC4DiagramUI = memo(() => {
|
|
34
|
+
const { enableControls, enableNotations, enableSearch, enableRelationshipDetails, enableReadOnly } = useEnabledFeatures();
|
|
34
35
|
const rerender = useRerender();
|
|
35
|
-
const { isSequenceView, isActiveWalkthrough, ...actors } = useDiagramSelector(selectChildren);
|
|
36
|
+
const { isSequenceView, isActiveWalkthrough, isComparing, ...actors } = useDiagramSelector(selectChildren);
|
|
36
37
|
const handleReset = useCallback(() => {
|
|
37
38
|
if (import.meta.env.DEV) console.warn("DiagramUI: resetting error boundary and rerendering...");
|
|
38
39
|
rerender();
|
|
@@ -42,15 +43,17 @@ function LikeC4DiagramUI() {
|
|
|
42
43
|
children: [
|
|
43
44
|
isSequenceView && /* @__PURE__ */ jsx(FloatingSequenceActors, { isActiveWalkthrough }),
|
|
44
45
|
isActiveWalkthrough && /* @__PURE__ */ jsx(SequenceOutlinePanel, {}),
|
|
45
|
-
enableControls && actors.navigation && !isActiveWalkthrough && /* @__PURE__ */ jsx(NavigationPanel, {
|
|
46
|
+
enableControls && actors.navigation && !isActiveWalkthrough && /* @__PURE__ */ jsx(NavigationPanel, {
|
|
47
|
+
actorRef: actors.navigation,
|
|
48
|
+
isComparing
|
|
49
|
+
}),
|
|
46
50
|
actors.overlays && /* @__PURE__ */ jsx(Overlays, { overlaysActorRef: actors.overlays }),
|
|
47
51
|
enableNotations && /* @__PURE__ */ jsx(NotationPanel, {}),
|
|
48
52
|
enableSearch && actors.search && /* @__PURE__ */ jsx(Search, { searchActorRef: actors.search }),
|
|
49
|
-
enableRelationshipDetails && enableReadOnly && /* @__PURE__ */ jsx(RelationshipPopover, {})
|
|
50
|
-
enableCompareWithLatest && /* @__PURE__ */ jsx(LayoutDriftFrame, {})
|
|
53
|
+
enableRelationshipDetails && enableReadOnly && /* @__PURE__ */ jsx(RelationshipPopover, {})
|
|
51
54
|
]
|
|
52
55
|
});
|
|
53
|
-
}
|
|
56
|
+
});
|
|
57
|
+
LikeC4DiagramUI.displayName = "LikeC4DiagramUI";
|
|
54
58
|
|
|
55
|
-
//#endregion
|
|
56
59
|
export { LikeC4DiagramUI };
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { __name } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { IS_SERVER } from "../base/const.mjs";
|
|
3
|
-
import { useCallbackRef as useCallbackRef$1 } from "../hooks/useCallbackRef.mjs";
|
|
4
|
-
import { depsShallowEqual, useUpdateEffect as useUpdateEffect$1 } from "../hooks/useUpdateEffect.mjs";
|
|
5
2
|
import { BaseXYFlow } from "../base/BaseXYFlow.mjs";
|
|
6
|
-
import {
|
|
3
|
+
import { IS_SERVER } from "../base/const.mjs";
|
|
7
4
|
import { useDiagramEventHandlers } from "../context/DiagramEventHandlers.mjs";
|
|
5
|
+
import { useRootContainer } from "../context/RootContainerContext.mjs";
|
|
8
6
|
import { selectDiagramSnapshot, useDiagram, useDiagramSelector } from "../hooks/safeContext.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { useCallbackRef as useCallbackRef$1 } from "../hooks/useCallbackRef.mjs";
|
|
8
|
+
import { depsShallowEqual, useUpdateEffect as useUpdateEffect$1 } from "../hooks/useUpdateEffect.mjs";
|
|
11
9
|
import { useEditorActorStateHasTag } from "../hooks/useEditorActor.mjs";
|
|
10
|
+
import { viewRouting } from "../utils/view-routing.mjs";
|
|
12
11
|
import { BuiltinEdges, BuiltinNodes } from "./custom/index.mjs";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { deriveToggledFeatures } from "./state/machine.setup.mjs";
|
|
13
|
+
import { viewBounds } from "./state/utils.mjs";
|
|
14
|
+
import { useNodeDragHandlers } from "./useNodeDragHandlers.mjs";
|
|
15
|
+
import { selectGraphTopology } from "./xyflow-graph/useGraphForceSimulation.mjs";
|
|
16
|
+
import { resolveControlledViewport, resolveInteractionEnabled } from "./xyflow-props.mjs";
|
|
15
17
|
import { cx } from "@likec4/styles/css";
|
|
16
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
19
|
import { useCustomCompareMemo } from "@react-hookz/web";
|
|
@@ -21,7 +23,7 @@ import { isEmpty } from "remeda";
|
|
|
21
23
|
import { nonNullable } from "@likec4/core";
|
|
22
24
|
import { useDebouncedCallback as useDebouncedCallback$1, useTimeout } from "@mantine/hooks";
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
// src/likec4diagram/DiagramXYFlow.tsx
|
|
25
27
|
const edgeTypes = {
|
|
26
28
|
relationship: BuiltinEdges.RelationshipEdge,
|
|
27
29
|
"seq-step": BuiltinEdges.SequenceStepEdge
|
|
@@ -51,19 +53,9 @@ function prepareNodeTypes(nodeTypes) {
|
|
|
51
53
|
"graph-element": nodeTypes.graphElement ?? builtinNodes["graph-element"]
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
x: -bounds.x,
|
|
58
|
-
y: -bounds.y,
|
|
59
|
-
zoom: 1
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function resolveInteractionEnabled(enabled, override, isEditorBusy) {
|
|
63
|
-
return (override ?? enabled) && !isEditorBusy;
|
|
64
|
-
}
|
|
65
|
-
const selectXYProps = selectDiagramSnapshot(({ context: ctx, children }) => {
|
|
66
|
-
const { enableReadOnly } = deriveToggledFeatures(ctx);
|
|
56
|
+
const selectXYProps = selectDiagramSnapshot((snapshot) => {
|
|
57
|
+
const { context: ctx, children } = snapshot;
|
|
58
|
+
const { enableReadOnly } = deriveToggledFeatures(snapshot);
|
|
67
59
|
const controlledViewport = resolveControlledViewport(ctx.features.enableFitView, ctx.initialZoom, viewBounds(ctx));
|
|
68
60
|
const editorSnapshot = enableReadOnly ? null : children.editor?.getSnapshot();
|
|
69
61
|
const isNotEditingEdge = enableReadOnly || editorSnapshot?.context.editing?.subject !== "edge";
|
|
@@ -74,6 +66,8 @@ const selectXYProps = selectDiagramSnapshot(({ context: ctx, children }) => {
|
|
|
74
66
|
return {
|
|
75
67
|
enableReadOnly,
|
|
76
68
|
isGraphVariant,
|
|
69
|
+
graphTopology: isGraphVariant ? selectGraphTopology(ctx.xynodes, ctx.xyedges) : null,
|
|
70
|
+
viewRouting: viewRouting(ctx.view),
|
|
77
71
|
initialized: IS_SERVER || ctx.initialized.xydata && ctx.initialized.xyflow,
|
|
78
72
|
nodes: ctx.xynodes,
|
|
79
73
|
edges: ctx.xyedges,
|
|
@@ -88,24 +82,25 @@ const selectXYProps = selectDiagramSnapshot(({ context: ctx, children }) => {
|
|
|
88
82
|
enableControls: ctx.features.enableControls,
|
|
89
83
|
...controlledViewport && { viewport: controlledViewport }
|
|
90
84
|
};
|
|
91
|
-
}, ({ nodes: aNodes, edges: aEdges, ...a }, { nodes: bNodes, edges: bEdges, ...b }) => {
|
|
85
|
+
}, ({ nodes: aNodes, edges: aEdges, graphTopology: _aTopology, ...a }, { nodes: bNodes, edges: bEdges, graphTopology: _bTopology, ...b }) => {
|
|
92
86
|
return shallowEqual(a, b) && shallowEqual(aNodes, bNodes) && shallowEqual(aEdges, bEdges);
|
|
93
87
|
});
|
|
94
88
|
function LikeC4DiagramXYFlow({ background = "dots", reactFlowProps = {}, children, renderNodes }) {
|
|
95
89
|
const { nodesDraggable: nodesDraggableOverride, elementsSelectable: nodesSelectableOverride, ...safeReactFlowProps } = reactFlowProps;
|
|
96
90
|
const diagram = useDiagram();
|
|
97
|
-
let { enableReadOnly, isGraphVariant, initialized, nodes, edges, enableFitView, nodesDraggable, nodesSelectable, enableControls, ...props } = useDiagramSelector(selectXYProps);
|
|
91
|
+
let { enableReadOnly, isGraphVariant, graphTopology, initialized, nodes, edges, enableFitView, nodesDraggable, nodesSelectable, viewRouting, enableControls, ...props } = useDiagramSelector(selectXYProps);
|
|
98
92
|
const isEditorBusy = useEditorActorStateHasTag("busy");
|
|
99
93
|
nodesDraggable = resolveInteractionEnabled(nodesDraggable, nodesDraggableOverride, isEditorBusy);
|
|
100
94
|
nodesSelectable = resolveInteractionEnabled(nodesSelectable, nodesSelectableOverride, isEditorBusy);
|
|
101
95
|
const { onNodeContextMenu, onCanvasContextMenu, onEdgeContextMenu, onNodeClick, onEdgeClick, onCanvasClick, onCanvasDblClick } = useDiagramEventHandlers();
|
|
102
96
|
const { reducedGraphics, $panning } = useRootContainer();
|
|
103
97
|
const isReducedGraphics = reducedGraphics;
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
98
|
+
const nodeDragHandlers = useNodeDragHandlers({
|
|
99
|
+
nodesDraggable,
|
|
100
|
+
viewRouting,
|
|
101
|
+
isGraphVariant,
|
|
102
|
+
graphTopology,
|
|
103
|
+
diagram
|
|
109
104
|
});
|
|
110
105
|
const $isPanning = $panning;
|
|
111
106
|
const isPanning = useTimeout(() => {
|
|
@@ -170,7 +165,7 @@ function LikeC4DiagramXYFlow({ background = "dots", reactFlowProps = {}, childre
|
|
|
170
165
|
type: "xyflow.nodeClick",
|
|
171
166
|
node
|
|
172
167
|
});
|
|
173
|
-
onNodeClick?.(diagram.findDiagramNode(node.id), e);
|
|
168
|
+
onNodeClick?.(diagram.findDiagramNode(node.data.id), e);
|
|
174
169
|
}),
|
|
175
170
|
onEdgeClick: useCallbackRef$1((e, edge) => {
|
|
176
171
|
if (e.isPropagationStopped()) return;
|
|
@@ -179,7 +174,7 @@ function LikeC4DiagramXYFlow({ background = "dots", reactFlowProps = {}, childre
|
|
|
179
174
|
type: "xyflow.edgeClick",
|
|
180
175
|
edge
|
|
181
176
|
});
|
|
182
|
-
onEdgeClick?.(diagram.findDiagramEdge(edge.id), e);
|
|
177
|
+
onEdgeClick?.(diagram.findDiagramEdge(edge.data.id), e);
|
|
183
178
|
}),
|
|
184
179
|
onEdgeDoubleClick: useCallbackRef$1((e, edge) => {
|
|
185
180
|
if (e.isPropagationStopped()) return;
|
|
@@ -198,17 +193,20 @@ function LikeC4DiagramXYFlow({ background = "dots", reactFlowProps = {}, childre
|
|
|
198
193
|
});
|
|
199
194
|
}),
|
|
200
195
|
onPaneClick: useCallbackRef$1((e) => {
|
|
196
|
+
if (e.isPropagationStopped()) return;
|
|
201
197
|
e.stopPropagation();
|
|
202
198
|
diagram.send({ type: "xyflow.paneClick" });
|
|
203
199
|
onCanvasClick?.(e);
|
|
204
200
|
}),
|
|
205
201
|
onDoubleClick: useCallbackRef$1((e) => {
|
|
202
|
+
if (e.isPropagationStopped()) return;
|
|
206
203
|
e.stopPropagation();
|
|
207
204
|
e.preventDefault();
|
|
208
205
|
diagram.send({ type: "xyflow.paneDblClick" });
|
|
209
206
|
onCanvasDblClick?.(e);
|
|
210
207
|
}),
|
|
211
208
|
onNodeMouseEnter: useCallbackRef$1((event, node) => {
|
|
209
|
+
if (event.isPropagationStopped()) return;
|
|
212
210
|
event.stopPropagation();
|
|
213
211
|
diagram.send({
|
|
214
212
|
type: "xyflow.nodeMouseEnter",
|
|
@@ -216,6 +214,7 @@ function LikeC4DiagramXYFlow({ background = "dots", reactFlowProps = {}, childre
|
|
|
216
214
|
});
|
|
217
215
|
}),
|
|
218
216
|
onNodeMouseLeave: useCallbackRef$1((event, node) => {
|
|
217
|
+
if (event.isPropagationStopped()) return;
|
|
219
218
|
event.stopPropagation();
|
|
220
219
|
diagram.send({
|
|
221
220
|
type: "xyflow.nodeMouseLeave",
|
|
@@ -223,6 +222,7 @@ function LikeC4DiagramXYFlow({ background = "dots", reactFlowProps = {}, childre
|
|
|
223
222
|
});
|
|
224
223
|
}),
|
|
225
224
|
onEdgeMouseEnter: useCallbackRef$1((event, edge) => {
|
|
225
|
+
if (event.isPropagationStopped()) return;
|
|
226
226
|
event.stopPropagation();
|
|
227
227
|
diagram.send({
|
|
228
228
|
type: "xyflow.edgeMouseEnter",
|
|
@@ -231,6 +231,7 @@ function LikeC4DiagramXYFlow({ background = "dots", reactFlowProps = {}, childre
|
|
|
231
231
|
});
|
|
232
232
|
}),
|
|
233
233
|
onEdgeMouseLeave: useCallbackRef$1((event, edge) => {
|
|
234
|
+
if (event.isPropagationStopped()) return;
|
|
234
235
|
event.stopPropagation();
|
|
235
236
|
diagram.send({
|
|
236
237
|
type: "xyflow.edgeMouseLeave",
|
|
@@ -260,7 +261,7 @@ function LikeC4DiagramXYFlow({ background = "dots", reactFlowProps = {}, childre
|
|
|
260
261
|
edgesFocusable: true,
|
|
261
262
|
elevateEdgesOnSelect: !enableReadOnly,
|
|
262
263
|
zIndexMode: "manual",
|
|
263
|
-
...
|
|
264
|
+
...nodeDragHandlers,
|
|
264
265
|
...props,
|
|
265
266
|
...safeReactFlowProps,
|
|
266
267
|
nodesDraggable,
|
|
@@ -283,5 +284,4 @@ const Controls$1 = /* @__PURE__ */ __name(({ fitViewPadding, minZoom, maxZoom })
|
|
|
283
284
|
position: "bottom-left"
|
|
284
285
|
}), "Controls");
|
|
285
286
|
|
|
286
|
-
|
|
287
|
-
export { LikeC4DiagramXYFlow, resolveControlledViewport, resolveInteractionEnabled };
|
|
287
|
+
export { LikeC4DiagramXYFlow };
|
|
@@ -3,7 +3,7 @@ import { diagramToXY } from "./xyflow-diagram/diagram-view.mjs";
|
|
|
3
3
|
import { graphViewToXY } from "./xyflow-graph/graph-view-to-xy.mjs";
|
|
4
4
|
import { sequenceLayoutToXY } from "./xyflow-sequence/sequence-view-to-xy.mjs";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/likec4diagram/convert-to-xyflow.ts
|
|
7
7
|
function convertToXYFlow({ dynamicViewVariant, elementViewVariant, ...params }) {
|
|
8
8
|
const view = params.view;
|
|
9
9
|
const isDynamic = view._type === "dynamic";
|
|
@@ -25,7 +25,7 @@ function convertToXYFlow({ dynamicViewVariant, elementViewVariant, ...params })
|
|
|
25
25
|
currentViewId: params.currentViewId,
|
|
26
26
|
collapsedFlows: params.collapsedSequenceFlows
|
|
27
27
|
});
|
|
28
|
-
return {
|
|
28
|
+
if (layout !== view.sequenceLayout || view.variant !== dynamicViewVariant) return {
|
|
29
29
|
view: {
|
|
30
30
|
...view,
|
|
31
31
|
sequenceLayout: layout,
|
|
@@ -34,6 +34,11 @@ function convertToXYFlow({ dynamicViewVariant, elementViewVariant, ...params })
|
|
|
34
34
|
xynodes,
|
|
35
35
|
xyedges
|
|
36
36
|
};
|
|
37
|
+
return {
|
|
38
|
+
view,
|
|
39
|
+
xynodes,
|
|
40
|
+
xyedges
|
|
41
|
+
};
|
|
37
42
|
}
|
|
38
43
|
if (isElement && elementViewVariant === "graph") {
|
|
39
44
|
const { xynodes, xyedges } = graphViewToXY(params);
|
|
@@ -51,5 +56,4 @@ function convertToXYFlow({ dynamicViewVariant, elementViewVariant, ...params })
|
|
|
51
56
|
};
|
|
52
57
|
}
|
|
53
58
|
|
|
54
|
-
//#endregion
|
|
55
59
|
export { convertToXYFlow };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { useIsComparingLayouts } from "../../../context/ComparingLayoutsContext.mjs";
|
|
2
3
|
import { css, cx } from "@likec4/styles/css";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
// src/likec4diagram/custom/edges/EdgeDrifts.tsx
|
|
6
7
|
function EdgeDrifts({ edgeProps: { data }, svgPath }) {
|
|
8
|
+
const isComparing = useIsComparingLayouts();
|
|
7
9
|
const drifts = data.drifts;
|
|
8
|
-
if (!drifts || drifts.length === 0) return null;
|
|
10
|
+
if (!isComparing || !drifts || drifts.length === 0) return null;
|
|
9
11
|
return /* @__PURE__ */ jsx("path", {
|
|
10
12
|
className: cx("react-flow__edge-path", css({
|
|
11
13
|
pointerEvents: "none",
|
|
@@ -22,5 +24,4 @@ function EdgeDrifts({ edgeProps: { data }, svgPath }) {
|
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
//#endregion
|
|
26
27
|
export { EdgeDrifts };
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { useCallbackRef } from "../../../hooks/useCallbackRef.mjs";
|
|
3
|
-
import { useUpdateEffect as useUpdateEffect$1 } from "../../../hooks/useUpdateEffect.mjs";
|
|
4
|
-
import { useXYFlow, useXYStoreApi } from "../../../hooks/useXYFlow.mjs";
|
|
5
|
-
import { isSamePoint, leafNodeRects } from "../../../utils/xyflow.mjs";
|
|
6
|
-
import { useSetState } from "../../../hooks/useSetState.mjs";
|
|
7
|
-
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
8
|
-
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
9
|
-
import { useCurrentViewRouting } from "../../../hooks/useCurrentView.mjs";
|
|
10
2
|
import { EdgeActionButton } from "../../../base-primitives/edge/EdgeActionButton.mjs";
|
|
11
3
|
import { EdgeContainer } from "../../../base-primitives/edge/EdgeContainer.mjs";
|
|
12
4
|
import { EdgeLabel } from "../../../base-primitives/edge/EdgeLabel.mjs";
|
|
13
5
|
import { EdgeLabelContainer } from "../../../base-primitives/edge/EdgeLabelContainer.mjs";
|
|
14
6
|
import { EdgePath } from "../../../base-primitives/edge/EdgePath.mjs";
|
|
15
7
|
import { memoEdge } from "../../../base-primitives/memoEdge.mjs";
|
|
16
|
-
import {
|
|
8
|
+
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
9
|
+
import { useCallbackRef } from "../../../hooks/useCallbackRef.mjs";
|
|
10
|
+
import { useCurrentViewRouting } from "../../../hooks/useCurrentView.mjs";
|
|
11
|
+
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
17
12
|
import { selectLabelRoutes } from "../../../hooks/useEdgeTracks.mjs";
|
|
13
|
+
import { useSetState } from "../../../hooks/useSetState.mjs";
|
|
14
|
+
import { useUpdateEffect as useUpdateEffect$1 } from "../../../hooks/useUpdateEffect.mjs";
|
|
15
|
+
import { useXYFlow, useXYStoreApi } from "../../../hooks/useXYFlow.mjs";
|
|
18
16
|
import { snapCorner } from "../../../utils/edge-corners.mjs";
|
|
17
|
+
import { edgeEndCenters } from "../../../utils/edge-endpoints.mjs";
|
|
19
18
|
import { edgeLabelPosition } from "../../../utils/edge-label.mjs";
|
|
19
|
+
import { isSamePoint, leafNodeRects } from "../../../utils/xyflow.mjs";
|
|
20
20
|
import { EdgeDrifts } from "./EdgeDrifts.mjs";
|
|
21
|
-
import { controlPoint, controlPointsContainer, labelDraggable } from "./edges.css.mjs";
|
|
22
21
|
import { useControlPoints } from "./useControlPoints.mjs";
|
|
23
22
|
import { useRelationshipEdgePath } from "./useRelationshipEdgePath.mjs";
|
|
24
23
|
import { css, cx } from "@likec4/styles/css";
|
|
@@ -27,8 +26,13 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
|
27
26
|
import { useRafEffect } from "@react-hookz/web";
|
|
28
27
|
import { EdgeLabelRenderer } from "@xyflow/react";
|
|
29
28
|
import { isNumber } from "remeda";
|
|
29
|
+
import { edgeControlPoints } from "@likec4/styles/recipes";
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
// src/likec4diagram/custom/edges/RelationshipEdge.tsx
|
|
32
|
+
const labelDraggable = css({
|
|
33
|
+
cursor: "grab!",
|
|
34
|
+
_active: { cursor: "grabbing!" }
|
|
35
|
+
});
|
|
32
36
|
const RelationshipEdge = memoEdge((props) => {
|
|
33
37
|
const [isControlPointDragging, setIsControlPointDragging] = useState(false);
|
|
34
38
|
const isControlPointDraggingRef = useRef(isControlPointDragging);
|
|
@@ -324,6 +328,7 @@ const RelationshipEdge = memoEdge((props) => {
|
|
|
324
328
|
})] });
|
|
325
329
|
});
|
|
326
330
|
RelationshipEdge.displayName = "RelationshipEdge";
|
|
331
|
+
const controlPointsClasses = edgeControlPoints();
|
|
327
332
|
function ControlPoints({ isControlPointDragging, edgeProps, routing, controlPoints, onMove, onStartMove, onCancelMove, onFinishMove, onDelete }) {
|
|
328
333
|
const xyflowStore = useXYStoreApi();
|
|
329
334
|
const xyflow = useXYFlow();
|
|
@@ -420,7 +425,7 @@ function ControlPoints({ isControlPointDragging, edgeProps, routing, controlPoin
|
|
|
420
425
|
});
|
|
421
426
|
return /* @__PURE__ */ jsx(EdgeLabelRenderer, { children: /* @__PURE__ */ jsx(EdgeContainer, {
|
|
422
427
|
component: "svg",
|
|
423
|
-
className:
|
|
428
|
+
className: controlPointsClasses.container,
|
|
424
429
|
...edgeProps,
|
|
425
430
|
children: /* @__PURE__ */ jsx("g", {
|
|
426
431
|
"data-active": isControlPointDragging ? true : void 0,
|
|
@@ -430,7 +435,7 @@ function ControlPoints({ isControlPointDragging, edgeProps, routing, controlPoin
|
|
|
430
435
|
"data-control-point-index": i,
|
|
431
436
|
onPointerDownCapture: onControlPointerDown,
|
|
432
437
|
onDoubleClick: onControlPointerDblClick,
|
|
433
|
-
className: cx("nodrag nopan",
|
|
438
|
+
className: cx("nodrag nopan", controlPointsClasses.point),
|
|
434
439
|
cx: p.x,
|
|
435
440
|
cy: p.y
|
|
436
441
|
}, "controlPoints" + edgeId + "#" + i))
|
|
@@ -442,5 +447,4 @@ const stopAndPrevent = (e) => {
|
|
|
442
447
|
e.preventDefault();
|
|
443
448
|
};
|
|
444
449
|
|
|
445
|
-
//#endregion
|
|
446
450
|
export { RelationshipEdge };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
3
|
-
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
4
2
|
import { EdgeActionButton } from "../../../base-primitives/edge/EdgeActionButton.mjs";
|
|
5
3
|
import { EdgeContainer } from "../../../base-primitives/edge/EdgeContainer.mjs";
|
|
6
4
|
import { EdgeLabel } from "../../../base-primitives/edge/EdgeLabel.mjs";
|
|
7
5
|
import { EdgeLabelContainer } from "../../../base-primitives/edge/EdgeLabelContainer.mjs";
|
|
8
6
|
import { EdgePath } from "../../../base-primitives/edge/EdgePath.mjs";
|
|
7
|
+
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
8
|
+
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
9
9
|
import { EdgeDrifts } from "./EdgeDrifts.mjs";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { getSmoothStepPath } from "@xyflow/system";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/likec4diagram/custom/edges/SequenceStepEdge.tsx
|
|
14
14
|
const LABEL_OFFSET = 16;
|
|
15
15
|
function SequenceStepEdge(props) {
|
|
16
16
|
const { enableNavigateTo, enableCompareWithLatest } = useEnabledFeatures();
|
|
@@ -77,5 +77,4 @@ function SequenceStepEdge(props) {
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
//#endregion
|
|
81
80
|
export { SequenceStepEdge };
|
|
@@ -2,12 +2,12 @@ import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
|
2
2
|
import { useCallbackRef } from "../../../hooks/useCallbackRef.mjs";
|
|
3
3
|
import { useUpdateEffect } from "../../../hooks/useUpdateEffect.mjs";
|
|
4
4
|
import { useXYStoreApi } from "../../../hooks/useXYFlow.mjs";
|
|
5
|
-
import { edgeEndCenters } from "../../../utils/edge-endpoints.mjs";
|
|
6
5
|
import { initialControlPoints, insertCorner } from "../../../utils/edge-corners.mjs";
|
|
6
|
+
import { edgeEndCenters } from "../../../utils/edge-endpoints.mjs";
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { deepEqual } from "fast-equals";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/likec4diagram/custom/edges/useControlPoints.ts
|
|
11
11
|
function useControlPoints(props, routing) {
|
|
12
12
|
const { data } = props;
|
|
13
13
|
const xyflowStore = useXYStoreApi();
|
|
@@ -37,5 +37,4 @@ function useControlPoints(props, routing) {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
40
|
export { useControlPoints };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { useTrackRoutes } from "../../../hooks/useEdgeTracks.mjs";
|
|
2
3
|
import { useXYStore } from "../../../hooks/useXYFlow.mjs";
|
|
3
4
|
import { edgeEndFromNode } from "../../../utils/edge-endpoints.mjs";
|
|
4
5
|
import { layoutedEdgePath } from "../../../utils/edge-path.mjs";
|
|
5
6
|
import { trackedEdgePath } from "../../../utils/edge-tracks.mjs";
|
|
6
|
-
import { useTrackRoutes } from "../../../hooks/useEdgeTracks.mjs";
|
|
7
7
|
import { useCallback } from "react";
|
|
8
8
|
import { deepEqual } from "fast-equals";
|
|
9
9
|
import { isTruthy } from "remeda";
|
|
10
10
|
import { nonNullable } from "@likec4/core/utils";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/likec4diagram/custom/edges/useRelationshipEdgePath.ts
|
|
13
13
|
/**
|
|
14
14
|
* @returns The SVG path data and, for orthogonal routing, straight segments for label placement.
|
|
15
15
|
*/
|
|
@@ -37,5 +37,4 @@ function useRelationshipEdgePath({ props: { id, source, target, data }, controlP
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
40
|
export { useRelationshipEdgePath };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RelationshipEdge } from "./edges/RelationshipEdge.mjs";
|
|
2
|
+
import { SequenceStepEdge } from "./edges/SequenceStepEdge.mjs";
|
|
2
3
|
import { CompoundDeploymentNode, CompoundElementNode, DeploymentNode, ElementNode, ViewGroupNode } from "./nodes/nodes.mjs";
|
|
4
|
+
import { GraphElementNode } from "./nodes/GraphElementNode.mjs";
|
|
3
5
|
import { SequenceActorNode, SequenceParallelArea } from "./nodes/SequenceActorNode.mjs";
|
|
4
6
|
import { SequenceSubflowArea } from "./nodes/SequenceSubFlow.mjs";
|
|
5
|
-
import { RelationshipEdge } from "./edges/RelationshipEdge.mjs";
|
|
6
|
-
import { SequenceStepEdge } from "./edges/SequenceStepEdge.mjs";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/likec4diagram/custom/index.tsx
|
|
9
9
|
const BuiltinNodes = {
|
|
10
10
|
ElementNode,
|
|
11
11
|
DeploymentNode,
|
|
@@ -22,5 +22,4 @@ const BuiltinEdges = {
|
|
|
22
22
|
SequenceStepEdge
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { BuiltinEdges, BuiltinNodes };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import { Types } from "../../types.mjs";
|
|
3
|
-
//#region src/likec4diagram/custom/nodes/CompoundActions.d.ts
|
|
4
3
|
type CompoundActionsProps = Types.NodeProps<'compound-deployment' | 'compound-element'>;
|
|
5
4
|
export declare const CompoundActions: (props: CompoundActionsProps) => import("react").JSX.Element | null;
|
|
6
|
-
|
|
5
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { CompoundActionButton } from "../../../base-primitives/compound/CompoundActionButton.mjs";
|
|
2
3
|
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
3
4
|
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
4
|
-
import { CompoundActionButton } from "../../../base-primitives/compound/CompoundActionButton.mjs";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/likec4diagram/custom/nodes/CompoundActions.tsx
|
|
8
8
|
const CompoundActions = (props) => {
|
|
9
9
|
const { enableNavigateTo } = useEnabledFeatures();
|
|
10
10
|
const diagram = useDiagram();
|
|
@@ -20,5 +20,4 @@ const CompoundActions = (props) => {
|
|
|
20
20
|
return null;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
//#endregion
|
|
24
23
|
export { CompoundActions };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import "../../../base-primitives/index.mjs";
|
|
2
3
|
import { BaseNodeData } from "../../../base/types.mjs";
|
|
3
|
-
import { Types } from "../../types.mjs";
|
|
4
4
|
import { ElementActionButtons } from "../../../base-primitives/element/ElementActionButtons.mjs";
|
|
5
|
-
import "
|
|
5
|
+
import { Types } from "../../types.mjs";
|
|
6
6
|
import { SimplifyDeep } from "type-fest";
|
|
7
|
-
//#region src/likec4diagram/custom/nodes/ElementActions.d.ts
|
|
8
7
|
type WithExtraButtons = {
|
|
9
8
|
/**
|
|
10
9
|
* Add extra action buttons
|
|
@@ -87,4 +86,4 @@ export type DeploymentElementActionsProps = SimplifyDeep<{
|
|
|
87
86
|
* ```
|
|
88
87
|
*/
|
|
89
88
|
export declare const DeploymentElementActions: ({ extraButtons, ...props }: DeploymentElementActionsProps) => import("react").JSX.Element;
|
|
90
|
-
|
|
89
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
-
import IconTransform from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
3
|
-
import IconZoomScan from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.
|
|
2
|
+
import IconTransform from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.mjs";
|
|
3
|
+
import IconZoomScan from "../../../node_modules/.pnpm/@tabler_icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.mjs";
|
|
4
|
+
import { ElementActionButtons } from "../../../base-primitives/element/ElementActionButtons.mjs";
|
|
4
5
|
import { useEnabledFeatures } from "../../../context/DiagramFeatures.mjs";
|
|
5
6
|
import { useDiagram } from "../../../hooks/safeContext.mjs";
|
|
6
7
|
import { readableText } from "../../../utils/readableText.mjs";
|
|
7
|
-
import { ElementActionButtons } from "../../../base-primitives/element/ElementActionButtons.mjs";
|
|
8
8
|
import { useMemo } from "react";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
import { hasAtLeast } from "remeda";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/likec4diagram/custom/nodes/ElementActions.tsx
|
|
13
13
|
/**
|
|
14
14
|
* Center-Bottom action bar, includes zoom-in and browse relationships actions, if the features are enabled.
|
|
15
15
|
* Intended to be used with model elements.
|
|
@@ -143,5 +143,4 @@ const DeploymentElementActions = ({ extraButtons, ...props }) => {
|
|
|
143
143
|
});
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
//#endregion
|
|
147
146
|
export { DeploymentElementActions, ElementActions };
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import { __name } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { Types } from "../../types.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Renders an element as a compact circle, used in the "graph" display variant of element views.
|
|
5
|
+
*/
|
|
6
|
+
export declare function GraphElementNode(props: Types.NodeProps<'graph-element'>): import("react").JSX.Element;
|