@likec4/diagram 1.47.0 → 1.49.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/LICENSE +1 -1
- package/README.md +8 -10
- package/adhoc-editor/package.json +4 -0
- package/dist/LikeC4Diagram.d.ts +2 -1
- package/dist/LikeC4Diagram.js +85 -81
- package/dist/LikeC4Diagram.props.d.ts +10 -6
- package/dist/LikeC4ModelProvider.d.ts +4 -4
- package/dist/LikeC4ModelProvider.js +2 -2
- package/dist/LikeC4ProjectsOverview.d.ts +3 -2
- package/dist/LikeC4ProjectsProvider.d.ts +2 -1
- package/dist/LikeC4ProjectsProvider.js +10 -8
- package/dist/LikeC4Styles.d.ts +3 -6
- package/dist/LikeC4Styles.js +44 -43
- package/dist/LikeC4View.d.ts +22 -1
- package/dist/LikeC4View.js +40 -25
- package/dist/ReactLikeC4.d.ts +13 -2
- package/dist/ReactLikeC4.js +8 -4
- package/dist/StaticLikeC4Diagram.d.ts +2 -1
- package/dist/StaticLikeC4Diagram.js +1 -0
- package/dist/_virtual/store-1b2fbb72.cjs.js +3 -0
- package/dist/_virtual/xstate-store-react.cjs.js +5 -0
- package/dist/_virtual/xstate-store-react.cjs2.js +3 -0
- package/dist/adhoc-editor/EditorPanel.d.ts +1 -0
- package/dist/adhoc-editor/EditorPanel.js +105 -0
- package/dist/adhoc-editor/ElementsTree.d.ts +2 -0
- package/dist/adhoc-editor/ElementsTree.js +142 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +4 -0
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +74 -0
- package/dist/adhoc-editor/components/Tree.d.ts +48 -0
- package/dist/adhoc-editor/components/Tree.js +296 -0
- package/dist/adhoc-editor/hooks.d.ts +14 -0
- package/dist/adhoc-editor/hooks.js +29 -0
- package/dist/adhoc-editor/index.d.ts +2 -0
- package/dist/adhoc-editor/index.js +1 -0
- package/dist/adhoc-editor/state/ActorProvider.d.ts +5 -0
- package/dist/adhoc-editor/state/ActorProvider.js +40 -0
- package/dist/adhoc-editor/state/actor.d.ts +13 -0
- package/dist/adhoc-editor/state/actor.editor.d.ts +56 -0
- package/dist/adhoc-editor/state/actor.editor.js +205 -0
- package/dist/adhoc-editor/state/actor.js +16 -0
- package/dist/adhoc-editor/state/actor.layouter.d.ts +51 -0
- package/dist/adhoc-editor/state/actor.layouter.js +70 -0
- package/dist/adhoc-editor/state/actor.types.d.ts +63 -0
- package/dist/adhoc-editor/state/actor.types.js +29 -0
- package/dist/adhoc-editor/state/panel.d.ts +95 -0
- package/dist/adhoc-editor/state/panel.js +139 -0
- package/dist/adhoc-editor/state/utils.d.ts +17 -0
- package/dist/adhoc-editor/state/utils.js +32 -0
- package/dist/adhoc-editor/useElementsTree.d.ts +18 -0
- package/dist/adhoc-editor/useElementsTree.js +130 -0
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +6 -0
- package/dist/base/const.d.ts +2 -0
- package/dist/base/const.js +2 -1
- package/dist/base/updateEdges.js +26 -3
- package/dist/base/updateNodes.js +8 -5
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/Markdown.js +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +4 -2
- package/dist/base-primitives/NodeHandles.js +46 -19
- package/dist/base-primitives/compound/CompoundActionButton.js +28 -12
- package/dist/base-primitives/compound/CompoundDetailsButton.js +24 -9
- package/dist/base-primitives/compound/CompoundNodeContainer.js +11 -8
- package/dist/base-primitives/compound/CompoundTitle.js +1 -2
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +5 -2
- package/dist/base-primitives/edge/EdgeLabel.js +3 -4
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +17 -20
- package/dist/base-primitives/element/ElementActionButtons.js +57 -59
- package/dist/base-primitives/element/ElementData.d.ts +7 -7
- package/dist/base-primitives/element/ElementData.js +61 -48
- package/dist/base-primitives/element/ElementDetailsButton.js +48 -18
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +5 -5
- package/dist/base-primitives/element/ElementNodeContainer.js +24 -10
- package/dist/base-primitives/element/ElementShape.d.ts +2 -2
- package/dist/base-primitives/element/ElementShape.js +70 -7
- package/dist/base-primitives/element/ElementTags.d.ts +6 -2
- package/dist/base-primitives/element/ElementTags.js +55 -32
- package/dist/base-primitives/index.d.ts +1 -1
- package/dist/base-primitives/memoEdge.js +1 -1
- package/dist/base-primitives/memoNode.js +1 -1
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +3 -3
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +5 -26
- package/dist/components/PortalToContainer.js +3 -4
- package/dist/components/RootContainer.js +9 -19
- package/dist/components/ViewNotFound.d.ts +3 -3
- package/dist/components/ViewNotFound.js +30 -26
- package/dist/context/CurrentViewModelProvider.d.ts +2 -0
- package/dist/context/CurrentViewModelProvider.js +12 -0
- package/dist/context/DefaultMantineProvider.d.ts +2 -0
- package/dist/context/DefaultMantineProvider.js +75 -0
- package/dist/context/DiagramEventHandlers.d.ts +5 -5
- package/dist/context/DiagramEventHandlers.js +10 -4
- package/dist/context/DiagramFeatures.d.ts +8 -7
- package/dist/context/DiagramFeatures.js +16 -13
- package/dist/context/EnsureMantine.d.ts +0 -3
- package/dist/context/EnsureMantine.js +3 -4
- package/dist/context/FramerMotionConfig.d.ts +1 -3
- package/dist/context/IconRenderer.d.ts +19 -4
- package/dist/context/IconRenderer.js +52 -25
- package/dist/context/LikeC4ModelContext.d.ts +10 -5
- package/dist/context/LikeC4ModelContext.js +11 -3
- package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
- package/dist/context/LikeC4ProjectsContext.js +6 -2
- package/dist/context/RootContainerContext.d.ts +10 -3
- package/dist/context/RootContainerContext.js +8 -3
- package/dist/context/TagStylesContext.js +13 -5
- package/dist/custom/hooks.d.ts +2 -2
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +16 -15
- package/dist/editor/LikeC4EditorCallbacks.d.ts +18 -0
- package/dist/editor/LikeC4EditorCallbacks.js +5 -0
- package/dist/editor/LikeC4EditorProvider.d.ts +30 -18
- package/dist/editor/LikeC4EditorProvider.js +3 -3
- package/dist/editor/applyChangesToManualLayout.js +7 -6
- package/dist/editor/editorActor.actions.d.ts +25 -25
- package/dist/editor/editorActor.actions.js +22 -22
- package/dist/editor/editorActor.setup.d.ts +84 -0
- package/dist/editor/editorActor.setup.js +38 -0
- package/dist/editor/editorActor.states.d.ts +9 -0
- package/dist/editor/{editorActor.js → editorActor.states.js} +21 -72
- package/dist/editor/index.d.ts +4 -3
- package/dist/editor/useEditorActorLogic.d.ts +2 -565
- package/dist/editor/useEditorActorLogic.js +14 -21
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/safeContext.d.ts +4 -5
- package/dist/hooks/useCallbackRef.d.ts +6 -0
- package/dist/hooks/useCallbackRef.js +7 -6
- package/dist/hooks/useCurrentView.js +5 -10
- package/dist/hooks/useCurrentViewModel.d.ts +8 -2
- package/dist/hooks/useCurrentViewModel.js +3 -7
- package/dist/hooks/useDiagram.d.ts +9 -1
- package/dist/hooks/useDiagram.js +10 -4
- package/dist/hooks/useDiagramCompareLayout.d.ts +6 -6
- package/dist/hooks/useDiagramCompareLayout.js +1 -1
- package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +2 -2
- package/dist/hooks/useLikeC4Model.d.ts +6 -2
- package/dist/hooks/useLikeC4Model.js +7 -9
- package/dist/hooks/useLikeC4Project.d.ts +4 -6
- package/dist/hooks/useLikeC4Project.js +19 -31
- package/dist/hooks/useLikeC4Styles.js +3 -9
- package/dist/hooks/useMantinePortalProps.d.ts +1 -1
- package/dist/hooks/useMediaPrint.d.ts +0 -2
- package/dist/hooks/useOverlaysActor.js +4 -4
- package/dist/hooks/useSearchActor.js +4 -4
- package/dist/hooks/useSetState.d.ts +6 -1
- package/dist/hooks/useSetState.js +7 -4
- package/dist/hooks/useXYFlow.d.ts +7 -1
- package/dist/hooks/useXYFlow.js +4 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -1
- package/dist/likec4diagram/DiagramUI.js +1 -3
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
- package/dist/likec4diagram/DiagramXYFlow.js +29 -18
- package/dist/likec4diagram/convert-to-xyflow.d.ts +2 -1
- package/dist/likec4diagram/convert-to-xyflow.js +2 -6
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +34 -37
- package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
- package/dist/likec4diagram/custom/edges/useControlPoints.js +3 -3
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +3 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +52 -34
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/ElementActions.js +7 -10
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +3 -20
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +286 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +10 -6
- package/dist/likec4diagram/custom/nodes/nodes.js +30 -8
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +5 -4
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +6 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +14 -9
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +4 -4
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +3 -3
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +16 -36
- package/dist/likec4diagram/relationship-popover/components.d.ts +7 -0
- package/dist/likec4diagram/relationship-popover/components.js +39 -0
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
- package/dist/likec4diagram/state/DiagramActorProvider.js +39 -66
- package/dist/likec4diagram/state/assign.d.ts +1 -1
- package/dist/likec4diagram/state/createViewChange.js +16 -4
- package/dist/likec4diagram/state/diagram-api.d.ts +11 -0
- package/dist/likec4diagram/state/diagram-api.js +15 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +92 -0
- package/dist/likec4diagram/state/machine.actions.js +127 -58
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +23 -2
- package/dist/likec4diagram/state/machine.actions.layout.js +68 -15
- package/dist/likec4diagram/state/machine.d.ts +1 -1
- package/dist/likec4diagram/state/machine.js +35 -31
- package/dist/likec4diagram/state/machine.setup.d.ts +40 -7
- package/dist/likec4diagram/state/machine.setup.js +13 -4
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +32 -2
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +1 -1
- package/dist/likec4diagram/state/machine.state.navigating.js +82 -50
- package/dist/likec4diagram/state/machine.state.ready.d.ts +565 -579
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +17 -148
- package/dist/likec4diagram/state/machine.state.ready.focused.js +6 -14
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +11 -96
- package/dist/likec4diagram/state/machine.state.ready.idle.js +7 -12
- package/dist/likec4diagram/state/machine.state.ready.js +89 -70
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +4 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +4 -3
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +145 -2
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +29 -21
- package/dist/likec4diagram/state/types.d.ts +1 -1
- package/dist/likec4diagram/state/utils.d.ts +14 -14
- package/dist/likec4diagram/state/utils.js +12 -4
- package/dist/likec4diagram/types.d.ts +11 -3
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +2 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
- package/dist/likec4diagram/useLayoutConstraints.js +126 -84
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +11 -3
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.d.ts +7 -3
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +15 -8
- package/dist/navigationpanel/NavigationPanel.js +4 -3
- package/dist/navigationpanel/NavigationPanelControls.js +4 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
- package/dist/navigationpanel/_common.d.ts +1 -1
- package/dist/navigationpanel/_common.js +2 -3
- package/dist/navigationpanel/actor.js +1 -1
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
- package/dist/navigationpanel/comparepanel/ComparePanel.js +155 -29
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +264 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +4 -5
- package/dist/navigationpanel/controls/DetailsControls.js +7 -7
- package/dist/navigationpanel/controls/LayoutWarning.js +2 -2
- package/dist/navigationpanel/controls/LogoButton.js +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
- package/dist/navigationpanel/controls/OpenSource.js +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -2
- package/dist/navigationpanel/controls/SearchControl.js +8 -12
- package/dist/navigationpanel/controls/ToggleReadonly.js +5 -6
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +12 -6
- package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
- package/dist/navigationpanel/editorpanel/styles.js +4 -4
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/styles.css.js +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +6 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +77 -77
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +2 -2
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +2 -2
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +14 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/dist/store-1b2fbb72.cjs.js +742 -0
- package/dist/node_modules/.pnpm/@xstate_store@3.14.0_react@19.2.4/node_modules/@xstate/store/react/dist/xstate-store-react.cjs.js +175 -0
- package/dist/overlays/element-details/ElementDetailsCard.css.js +15 -15
- package/dist/overlays/element-details/ElementDetailsCard.js +39 -40
- package/dist/overlays/element-details/MetadataValue.js +11 -12
- package/dist/overlays/element-details/TabPanelDeployments.js +8 -6
- package/dist/overlays/element-details/TabPanelRelationships.css.js +10 -30
- package/dist/overlays/element-details/TabPanelRelationships.js +4 -5
- package/dist/overlays/element-details/TabPanelStructure.css.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +3 -2
- package/dist/overlays/overlaysActor.js +19 -1
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +0 -5
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -4
- package/dist/overlays/relationship-details/SelectEdge.css.js +6 -6
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/compute.js +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationship-details/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationship-details/layout.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +0 -5
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +116 -21
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/actor.js +1 -1
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +21 -6
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +14 -1
- package/dist/overlays/relationships-browser/layout.d.ts +1 -1
- package/dist/overlays/relationships-browser/layout.js +1 -1
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +1 -1
- package/dist/projects-overview/ProjectsOverview.js +2 -2
- package/dist/projects-overview/ProjectsOverviewXY.d.ts +1 -5
- package/dist/projects-overview/ProjectsOverviewXY.js +1 -1
- package/dist/projects-overview/actor.d.ts +1 -1
- package/dist/projects-overview/actor.js +8 -31
- package/dist/projects-overview/context.d.ts +2 -2
- package/dist/projects-overview/context.js +2 -1
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.js +1 -1
- package/dist/search/Search.d.ts +2 -4
- package/dist/search/Search.js +67 -44
- package/dist/search/components/ElementsColumn.css.js +6 -6
- package/dist/search/components/ElementsColumn.js +93 -60
- package/dist/search/components/PickView.d.ts +3 -1
- package/dist/search/components/PickView.js +12 -7
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +2 -2
- package/dist/search/components/ViewsColum.d.ts +2 -1
- package/dist/search/components/ViewsColum.js +39 -35
- package/dist/search/components/ViewsColumn.css.js +1 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/components/_shared.css.js +12 -12
- package/dist/search/components/utils.js +1 -4
- package/dist/search/hooks.d.ts +1 -6
- package/dist/search/hooks.js +15 -9
- package/dist/search/searchActor.d.ts +12 -2
- package/dist/search/searchActor.js +60 -4
- package/dist/shadowroot/ShadowRoot.d.ts +5 -2
- package/dist/shadowroot/ShadowRoot.js +25 -22
- package/dist/shadowroot/styles.css.d.ts +0 -2
- package/dist/shadowroot/styles.css.js +4 -36
- package/dist/styles-font.css2.js +1 -1
- package/dist/styles.css2.js +1 -1
- package/dist/utils/view-bounds.d.ts +3 -2
- package/dist/utils/view-bounds.js +10 -6
- package/dist/utils/xyflow.d.ts +27 -6
- package/dist/utils/xyflow.js +68 -23
- package/package.json +39 -37
- package/panda.buildinfo.json +226 -161
- package/styles-font.css +1 -1
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/bundle/index.js +0 -51974
- package/bundle/package.json +0 -4
- package/dist/editor/__tests__/fixture.d.ts +0 -205
- package/dist/editor/editorActor.d.ts +0 -653
- package/dist/likec4diagram/relationship-popover/styles.css.d.ts +0 -2
- package/dist/likec4diagram/relationship-popover/styles.css.js +0 -28
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
- package/dist/overlays/relationships-browser/custom/styles.css.d.ts +0 -1
- package/dist/overlays/relationships-browser/custom/styles.css.js +0 -14
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { BBox, DeploymentFqn, DiagramEdge, DiagramNode, DiagramNodeDriftReason, ExclusiveUnion, Fqn, IconUrl, MarkdownOrString, NonEmptyReadonlyArray, ViewId } from '@likec4/core/types';
|
|
1
|
+
import { AutoLayoutDirection, BBox, DeploymentFqn, DiagramEdge, DiagramNode, DiagramNodeDriftReason, ExclusiveUnion, Fqn, IconUrl, MarkdownOrString, NonEmptyReadonlyArray, ViewId } from '@likec4/core/types';
|
|
2
2
|
import { XYPosition } from '@xyflow/system';
|
|
3
3
|
import { FunctionComponent } from 'react';
|
|
4
4
|
import { Simplify } from 'type-fest';
|
|
5
5
|
import { BaseEdge, BaseEdgeData, BaseEdgeProps, BaseNode, BaseNodeData, BaseNodeProps, NonOptional } from '../base/types';
|
|
6
6
|
export declare namespace Types {
|
|
7
|
-
type LeafNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'technology' | 'description' | 'color' | 'shape' | 'width' | 'level' | 'height' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
7
|
+
type LeafNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'technology' | 'description' | 'notes' | 'color' | 'shape' | 'width' | 'level' | 'height' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
8
|
+
/**
|
|
9
|
+
* View layout direction, used by DefaultHandles to position node handles
|
|
10
|
+
*/
|
|
11
|
+
viewLayoutDir?: AutoLayoutDirection | undefined;
|
|
8
12
|
/**
|
|
9
13
|
* View this node belongs to
|
|
10
14
|
*/
|
|
@@ -49,7 +53,11 @@ export declare namespace Types {
|
|
|
49
53
|
type SequenceParallelAreaData = Simplify<LeafNodeData & {
|
|
50
54
|
parallelPrefix: string;
|
|
51
55
|
}>;
|
|
52
|
-
type CompoundNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'color' | 'shape' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
56
|
+
type CompoundNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'notes' | 'color' | 'shape' | 'style' | 'tags' | 'x' | 'y'>> & {
|
|
57
|
+
/**
|
|
58
|
+
* View layout direction, used by DefaultHandles to position node handles
|
|
59
|
+
*/
|
|
60
|
+
viewLayoutDir?: AutoLayoutDirection | undefined;
|
|
53
61
|
/**
|
|
54
62
|
* View this node belongs to
|
|
55
63
|
*/
|
|
@@ -23,7 +23,7 @@ const card = css({
|
|
|
23
23
|
userSelect: "none",
|
|
24
24
|
minWidth: 200,
|
|
25
25
|
maxWidth: "calc(100vw - 20px)",
|
|
26
|
-
backgroundColor: `
|
|
26
|
+
backgroundColor: `body/80`,
|
|
27
27
|
// WebkitBackdropFilter: fallbackVar(vars.safariAnimationHook, 'blur(8px)'),
|
|
28
28
|
// backdropFilter: fallbackVar(vars.safariAnimationHook, 'blur(8px)'),
|
|
29
29
|
sm: {
|
|
@@ -72,7 +72,7 @@ css({
|
|
|
72
72
|
`
|
|
73
73
|
});
|
|
74
74
|
const shapeBadge = css({
|
|
75
|
-
fontWeight:
|
|
75
|
+
fontWeight: "medium",
|
|
76
76
|
letterSpacing: "0.2px",
|
|
77
77
|
paddingTop: "0",
|
|
78
78
|
paddingBottom: "0",
|
|
@@ -9,9 +9,9 @@ import { useDiagramContext } from '../../../hooks/useDiagram.js';
|
|
|
9
9
|
import { useXYStore } from '../../../hooks/useXYFlow.js';
|
|
10
10
|
import { container, icon, card, tabPanel, shapeBadge, elementNotation } from './NotationPanel.css.js';
|
|
11
11
|
import { useMantinePortalProps } from '../../../hooks/useMantinePortalProps.js';
|
|
12
|
-
import IconAlertTriangle from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
13
|
-
import IconHelpCircle from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
14
|
-
import IconArrowDownRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
12
|
+
import IconAlertTriangle from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
|
|
13
|
+
import IconHelpCircle from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js';
|
|
14
|
+
import IconArrowDownRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js';
|
|
15
15
|
import { useDiagram } from '../../../hooks/safeContext.js';
|
|
16
16
|
import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
|
|
17
17
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NonEmptyArray } from '@likec4/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Dimensions, XYPoint, BBox } from '@likec4/core/geometry';
|
|
3
|
+
import { InternalNode as RFInternalNode, OnNodeDrag } from '@xyflow/react';
|
|
3
4
|
import { XYStoreApi } from '../hooks';
|
|
4
5
|
import { Types } from './types';
|
|
5
6
|
type InternalNode = RFInternalNode<Types.AnyNode>;
|
|
@@ -13,18 +14,14 @@ declare abstract class Rect {
|
|
|
13
14
|
minY: number;
|
|
14
15
|
maxX: number;
|
|
15
16
|
maxY: number;
|
|
16
|
-
readonly
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
get
|
|
20
|
-
|
|
21
|
-
get dimensions(): {
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
};
|
|
25
|
-
get diff(): XYPosition;
|
|
17
|
+
readonly initial: BBox;
|
|
18
|
+
get positionAbsolute(): XYPoint;
|
|
19
|
+
set positionAbsolute(pos: XYPoint);
|
|
20
|
+
get dimensions(): Dimensions;
|
|
21
|
+
get diff(): XYPoint;
|
|
26
22
|
get isMoved(): boolean;
|
|
27
|
-
get
|
|
23
|
+
get isResized(): boolean;
|
|
24
|
+
get position(): XYPoint;
|
|
28
25
|
protected abstract parent: CompoundRect | null;
|
|
29
26
|
constructor(xynode: InternalNode, parent?: CompoundRect | null);
|
|
30
27
|
}
|
|
@@ -41,6 +38,9 @@ export declare function createLayoutConstraints(xyflowApi: XYStoreApi, editingNo
|
|
|
41
38
|
rects: ReadonlyMap<string, Leaf | CompoundRect>;
|
|
42
39
|
onMove: () => void;
|
|
43
40
|
updateXYFlow: () => void;
|
|
41
|
+
hasChanges: () => boolean;
|
|
42
|
+
cancelPending: () => void;
|
|
43
|
+
flushPending: () => void;
|
|
44
44
|
};
|
|
45
45
|
type LayoutConstraints = {
|
|
46
46
|
onNodeDragStart: OnNodeDrag<Types.Node>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { DefaultMap, nonNullable
|
|
2
|
-
import {
|
|
1
|
+
import { DefaultMap, nonNullable } from '@likec4/core';
|
|
2
|
+
import { vector, BBox } from '@likec4/core/geometry';
|
|
3
|
+
import { invariant, isome } from '@likec4/core/utils';
|
|
3
4
|
import { getNodeDimensions } from '@xyflow/system';
|
|
4
5
|
import { produce } from 'immer';
|
|
5
6
|
import { useRef, useMemo } from 'react';
|
|
@@ -9,7 +10,6 @@ import 'fast-equals';
|
|
|
9
10
|
import { useDiagram } from '../hooks/safeContext.js';
|
|
10
11
|
import { nodeToRect, bezierControlPoints } from '../utils/xyflow.js';
|
|
11
12
|
import { useXYStoreApi } from '../hooks/useXYFlow.js';
|
|
12
|
-
import { vector } from '@likec4/core/geometry';
|
|
13
13
|
|
|
14
14
|
class Rect {
|
|
15
15
|
static LeftPadding = 42;
|
|
@@ -21,23 +21,17 @@ class Rect {
|
|
|
21
21
|
minY = Infinity;
|
|
22
22
|
maxX = -Infinity;
|
|
23
23
|
maxY = -Infinity;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
// Initial position absolute and dimensions
|
|
25
|
+
initial;
|
|
26
26
|
get positionAbsolute() {
|
|
27
27
|
return {
|
|
28
28
|
x: this.minX,
|
|
29
29
|
y: this.minY
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
get initialPositionAbsolute() {
|
|
33
|
-
return {
|
|
34
|
-
x: this.initialX,
|
|
35
|
-
y: this.initialY
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
32
|
set positionAbsolute(pos) {
|
|
39
|
-
const x = Math.
|
|
40
|
-
const y = Math.
|
|
33
|
+
const x = Math.trunc(pos.x);
|
|
34
|
+
const y = Math.trunc(pos.y);
|
|
41
35
|
this.maxX += x - this.minX;
|
|
42
36
|
this.maxY += y - this.minY;
|
|
43
37
|
this.minX = x;
|
|
@@ -45,18 +39,24 @@ class Rect {
|
|
|
45
39
|
}
|
|
46
40
|
get dimensions() {
|
|
47
41
|
return {
|
|
48
|
-
width: Math.
|
|
49
|
-
height: Math.
|
|
42
|
+
width: Math.ceil(this.maxX - this.minX),
|
|
43
|
+
height: Math.ceil(this.maxY - this.minY)
|
|
50
44
|
};
|
|
51
45
|
}
|
|
52
46
|
get diff() {
|
|
47
|
+
const { x, y } = this.positionAbsolute;
|
|
53
48
|
return {
|
|
54
|
-
x: Math.
|
|
55
|
-
y: Math.
|
|
49
|
+
x: Math.trunc(x - this.initial.x),
|
|
50
|
+
y: Math.trunc(y - this.initial.y)
|
|
56
51
|
};
|
|
57
52
|
}
|
|
58
53
|
get isMoved() {
|
|
59
|
-
|
|
54
|
+
const diff = this.diff;
|
|
55
|
+
return diff.x !== 0 || diff.y !== 0;
|
|
56
|
+
}
|
|
57
|
+
get isResized() {
|
|
58
|
+
const dim = this.dimensions;
|
|
59
|
+
return dim.width !== this.initial.width || dim.height !== this.initial.height;
|
|
60
60
|
}
|
|
61
61
|
// Position relative to parent
|
|
62
62
|
get position() {
|
|
@@ -79,8 +79,12 @@ class Rect {
|
|
|
79
79
|
const { width, height } = getNodeDimensions(xynode);
|
|
80
80
|
this.maxX = this.minX + Math.ceil(width);
|
|
81
81
|
this.maxY = this.minY + Math.ceil(height);
|
|
82
|
-
this.
|
|
83
|
-
|
|
82
|
+
this.initial = {
|
|
83
|
+
x: this.minX,
|
|
84
|
+
y: this.minY,
|
|
85
|
+
width: Math.ceil(width),
|
|
86
|
+
height: Math.ceil(height)
|
|
87
|
+
};
|
|
84
88
|
if (parent) {
|
|
85
89
|
parent.children.push(this);
|
|
86
90
|
}
|
|
@@ -125,14 +129,13 @@ function makeEdgeModifier(edge, anchor) {
|
|
|
125
129
|
x: pt.x + dx,
|
|
126
130
|
y: pt.y + dy
|
|
127
131
|
}));
|
|
132
|
+
} else {
|
|
133
|
+
draft.data.controlPoints = null;
|
|
128
134
|
}
|
|
129
135
|
if (edge.data.labelBBox) {
|
|
130
|
-
draft.data.labelBBox
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
width: edge.data.labelBBox.width,
|
|
134
|
-
height: edge.data.labelBBox.height
|
|
135
|
-
};
|
|
136
|
+
draft.data.labelBBox ??= edge.data.labelBBox;
|
|
137
|
+
draft.data.labelBBox.x = edge.data.labelBBox.x + dx;
|
|
138
|
+
draft.data.labelBBox.y = edge.data.labelBBox.y + dy;
|
|
136
139
|
}
|
|
137
140
|
})
|
|
138
141
|
};
|
|
@@ -160,14 +163,18 @@ function makeRelativeEdgeModifier(edge, movingRect, anchorNode, staticNode) {
|
|
|
160
163
|
}
|
|
161
164
|
const d = vector(dx, dy);
|
|
162
165
|
const relativePoint = (pt) => {
|
|
163
|
-
const
|
|
164
|
-
const staticToP =
|
|
166
|
+
const point = vector(pt);
|
|
167
|
+
const staticToP = point.subtract(staticV);
|
|
165
168
|
const projLength = staticToP.dot(staticToAnchor);
|
|
166
169
|
const coeff = clamp(projLength / staticToAnchorLength ** 2, {
|
|
167
170
|
min: -1,
|
|
168
171
|
max: 1
|
|
169
172
|
});
|
|
170
|
-
|
|
173
|
+
const newPoint = point.add(d.multiply(coeff)).trunc();
|
|
174
|
+
return {
|
|
175
|
+
x: newPoint.x,
|
|
176
|
+
y: newPoint.y
|
|
177
|
+
};
|
|
171
178
|
};
|
|
172
179
|
return {
|
|
173
180
|
id: edge.id,
|
|
@@ -245,41 +252,49 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
|
|
|
245
252
|
const rectsToUpdate = [...rects.values()];
|
|
246
253
|
const edgeModifiers = /* @__PURE__ */ new Map();
|
|
247
254
|
const findMovingAncestor = (nodeId) => {
|
|
248
|
-
|
|
255
|
+
const r = rects.get(nodeId);
|
|
256
|
+
if (r) {
|
|
257
|
+
return r;
|
|
258
|
+
}
|
|
259
|
+
for (const parent of ancestorsOf.get(nodeId)) {
|
|
260
|
+
const rect = rects.get(parent);
|
|
261
|
+
if (rect) {
|
|
262
|
+
return rect;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return null;
|
|
249
266
|
};
|
|
250
267
|
const movingNodes = new Set(editingNodeIds.flatMap((id) => [id, ...nestedOf.get(id)]));
|
|
251
268
|
for (const edge of edges) {
|
|
252
269
|
const isSourceMoving = movingNodes.has(edge.source);
|
|
253
270
|
const isTargetMoving = movingNodes.has(edge.target);
|
|
271
|
+
if (!isSourceMoving && !isTargetMoving) {
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
254
274
|
if (isSourceMoving && isTargetMoving) {
|
|
255
275
|
let r = rects.get(edge.source) ?? rects.get(edge.target) ?? findMovingAncestor(edge.source) ?? findMovingAncestor(edge.target);
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
276
|
+
invariant(!!r, "At least one of the edge nodes should have a moving ancestor");
|
|
277
|
+
edgeModifiers.set(edge, makeEdgeModifier(edge, r));
|
|
259
278
|
continue;
|
|
260
279
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
280
|
+
invariant(isSourceMoving !== isTargetMoving, "Logic error");
|
|
281
|
+
const movingRect = isSourceMoving ? findMovingAncestor(edge.source) : findMovingAncestor(edge.target);
|
|
282
|
+
invariant(!!movingRect, "Moving endpoint should be found");
|
|
283
|
+
const [sourceNode, targetNode] = pipe(
|
|
284
|
+
[edge.source, edge.target],
|
|
285
|
+
map((id) => nonNullable(nodeLookup.get(id), `Node ${id} not found`)),
|
|
286
|
+
map(nodeToRect)
|
|
287
|
+
);
|
|
288
|
+
const [anchorNode, staticNode] = isSourceMoving ? [sourceNode, targetNode] : [targetNode, sourceNode];
|
|
289
|
+
edgeModifiers.set(
|
|
290
|
+
edge,
|
|
291
|
+
makeRelativeEdgeModifier(
|
|
273
292
|
edge,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
)
|
|
280
|
-
);
|
|
281
|
-
continue;
|
|
282
|
-
}
|
|
293
|
+
movingRect,
|
|
294
|
+
anchorNode,
|
|
295
|
+
staticNode
|
|
296
|
+
)
|
|
297
|
+
);
|
|
283
298
|
}
|
|
284
299
|
function applyConstraints(targets) {
|
|
285
300
|
for (const r of targets) {
|
|
@@ -307,9 +322,25 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
|
|
|
307
322
|
}
|
|
308
323
|
const _edgeModifiers = [...edgeModifiers.values()];
|
|
309
324
|
function updateXYFlow() {
|
|
325
|
+
const { edgeLookup, triggerNodeChanges, triggerEdgeChanges, nodeLookup: nodeLookup2 } = xyflowApi.getState();
|
|
326
|
+
for (const id of editingNodeIds) {
|
|
327
|
+
const rect = rects.get(id);
|
|
328
|
+
if (!rect) {
|
|
329
|
+
console.warn(`Rect not found for id ${id}`);
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
const node = nodeLookup2.get(id);
|
|
333
|
+
if (!node) {
|
|
334
|
+
console.warn(`Node not found for id ${id}`);
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
rect.positionAbsolute = node.internals.positionAbsolute;
|
|
338
|
+
}
|
|
310
339
|
applyConstraints(rectsToUpdate);
|
|
311
|
-
const nodeUpdates =
|
|
312
|
-
|
|
340
|
+
const nodeUpdates = [];
|
|
341
|
+
const edgeUpdates = [];
|
|
342
|
+
for (const r of rectsToUpdate) {
|
|
343
|
+
nodeUpdates.push({
|
|
313
344
|
id: r.id,
|
|
314
345
|
type: "position",
|
|
315
346
|
dragging: false,
|
|
@@ -317,49 +348,52 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
|
|
|
317
348
|
positionAbsolute: r.positionAbsolute
|
|
318
349
|
});
|
|
319
350
|
if (r instanceof CompoundRect) {
|
|
320
|
-
|
|
351
|
+
nodeUpdates.push({
|
|
321
352
|
id: r.id,
|
|
322
353
|
type: "dimensions",
|
|
323
354
|
setAttributes: true,
|
|
355
|
+
resizing: false,
|
|
324
356
|
dimensions: r.dimensions
|
|
325
357
|
});
|
|
326
358
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
359
|
+
}
|
|
360
|
+
if (nodeUpdates.length > 0) {
|
|
361
|
+
triggerNodeChanges(nodeUpdates);
|
|
362
|
+
}
|
|
363
|
+
for (const fm of _edgeModifiers) {
|
|
364
|
+
edgeUpdates.push(fm(edgeLookup));
|
|
365
|
+
}
|
|
366
|
+
if (edgeUpdates.length > 0) {
|
|
367
|
+
triggerEdgeChanges(edgeUpdates);
|
|
334
368
|
}
|
|
335
369
|
}
|
|
336
370
|
let animationFrameId = null;
|
|
337
|
-
function
|
|
338
|
-
if (
|
|
339
|
-
|
|
371
|
+
function cancelPending() {
|
|
372
|
+
if (animationFrameId !== null) {
|
|
373
|
+
cancelAnimationFrame(animationFrameId);
|
|
374
|
+
animationFrameId = null;
|
|
340
375
|
}
|
|
376
|
+
}
|
|
377
|
+
function flushPending() {
|
|
378
|
+
cancelPending();
|
|
379
|
+
updateXYFlow();
|
|
380
|
+
}
|
|
381
|
+
function onMove() {
|
|
341
382
|
animationFrameId ??= requestAnimationFrame(() => {
|
|
342
383
|
animationFrameId = null;
|
|
343
|
-
for (const id of editingNodeIds) {
|
|
344
|
-
const rect = rects.get(id);
|
|
345
|
-
if (!rect) {
|
|
346
|
-
console.warn(`Rect not found for id ${id}`);
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
const node = nodeLookup.get(id);
|
|
350
|
-
if (!node) {
|
|
351
|
-
console.warn(`Node not found for id ${id}`);
|
|
352
|
-
continue;
|
|
353
|
-
}
|
|
354
|
-
rect.positionAbsolute = node.internals.positionAbsolute;
|
|
355
|
-
}
|
|
356
384
|
updateXYFlow();
|
|
357
385
|
});
|
|
358
386
|
}
|
|
387
|
+
function hasChanges() {
|
|
388
|
+
return isome(rectsToUpdate, (r) => r.isMoved || r.isResized);
|
|
389
|
+
}
|
|
359
390
|
return {
|
|
360
391
|
rects,
|
|
361
392
|
onMove,
|
|
362
|
-
updateXYFlow
|
|
393
|
+
updateXYFlow,
|
|
394
|
+
hasChanges,
|
|
395
|
+
cancelPending,
|
|
396
|
+
flushPending
|
|
363
397
|
};
|
|
364
398
|
}
|
|
365
399
|
function useLayoutConstraints() {
|
|
@@ -369,7 +403,6 @@ function useLayoutConstraints() {
|
|
|
369
403
|
return useMemo(() => {
|
|
370
404
|
return {
|
|
371
405
|
onNodeDragStart: (_event, xynode) => {
|
|
372
|
-
diagram.startEditing("node");
|
|
373
406
|
const { nodeLookup } = xystore.getState();
|
|
374
407
|
const draggingNodes = pipe(
|
|
375
408
|
Array.from(nodeLookup.values()),
|
|
@@ -377,6 +410,7 @@ function useLayoutConstraints() {
|
|
|
377
410
|
map((n) => n.id)
|
|
378
411
|
);
|
|
379
412
|
if (hasAtLeast(draggingNodes, 1)) {
|
|
413
|
+
diagram.startEditing("node");
|
|
380
414
|
solverRef.current = createLayoutConstraints(xystore, draggingNodes);
|
|
381
415
|
}
|
|
382
416
|
},
|
|
@@ -384,8 +418,16 @@ function useLayoutConstraints() {
|
|
|
384
418
|
solverRef.current?.onMove();
|
|
385
419
|
},
|
|
386
420
|
onNodeDragStop: (_event) => {
|
|
387
|
-
|
|
388
|
-
|
|
421
|
+
if (!solverRef.current) {
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
const hasChanges = solverRef.current.hasChanges();
|
|
425
|
+
if (hasChanges) {
|
|
426
|
+
solverRef.current.flushPending();
|
|
427
|
+
} else {
|
|
428
|
+
solverRef.current.cancelPending();
|
|
429
|
+
}
|
|
430
|
+
diagram.stopEditing(hasChanges);
|
|
389
431
|
solverRef.current = void 0;
|
|
390
432
|
}
|
|
391
433
|
};
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import { DiagramView,
|
|
1
|
+
import { DiagramView, ViewId, WhereOperator } from '@likec4/core';
|
|
2
2
|
import { Types } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Convert a diagram view to XY flow nodes and edges.
|
|
5
|
+
* @param opts
|
|
6
|
+
* @param opts.view - The diagram view to convert.
|
|
7
|
+
* @param opts.currentViewId - The ID of the current view.
|
|
8
|
+
* @param opts.where - Optional filter for nodes and edges.
|
|
9
|
+
* @returns An object containing an array of XY flow nodes and an array of XY flow edges.
|
|
10
|
+
*/
|
|
3
11
|
export declare function diagramToXY(opts: {
|
|
4
|
-
view: Pick<DiagramView, 'id' | 'nodes' | 'edges' | '
|
|
12
|
+
view: Pick<DiagramView, 'id' | 'nodes' | 'edges' | '_type' | 'autoLayout'>;
|
|
13
|
+
currentViewId: ViewId | undefined;
|
|
5
14
|
where: WhereOperator | null;
|
|
6
15
|
}): {
|
|
7
|
-
bounds: BBox;
|
|
8
16
|
xynodes: Types.Node[];
|
|
9
17
|
xyedges: Types.Edge[];
|
|
10
18
|
};
|
|
@@ -7,6 +7,7 @@ function diagramToXY(opts) {
|
|
|
7
7
|
view
|
|
8
8
|
} = opts;
|
|
9
9
|
const xynodes = [], xyedges = [], nodeLookup = /* @__PURE__ */ new Map();
|
|
10
|
+
const viewLayoutDir = view.autoLayout?.direction ?? "TB";
|
|
10
11
|
const queue = Queue.from(view.nodes.reduce(
|
|
11
12
|
(acc, node) => {
|
|
12
13
|
nodeLookup.set(node.id, node);
|
|
@@ -78,7 +79,9 @@ function diagramToXY(opts) {
|
|
|
78
79
|
tags: node.tags ?? null,
|
|
79
80
|
x: node.x,
|
|
80
81
|
y: node.y,
|
|
81
|
-
drifts: node.drifts ?? null
|
|
82
|
+
drifts: node.drifts ?? null,
|
|
83
|
+
notes: node.notes,
|
|
84
|
+
viewLayoutDir
|
|
82
85
|
};
|
|
83
86
|
const leafNodeData = {
|
|
84
87
|
viewId: view.id,
|
|
@@ -94,10 +97,12 @@ function diagramToXY(opts) {
|
|
|
94
97
|
style: node.style,
|
|
95
98
|
icon: node.icon ?? null,
|
|
96
99
|
tags: node.tags,
|
|
100
|
+
notes: node.notes,
|
|
97
101
|
x: node.x,
|
|
98
102
|
y: node.y,
|
|
99
103
|
isMultiple: node.style?.multiple ?? false,
|
|
100
|
-
drifts: node.drifts ?? null
|
|
104
|
+
drifts: node.drifts ?? null,
|
|
105
|
+
viewLayoutDir
|
|
101
106
|
};
|
|
102
107
|
if (node.kind === GroupElementKind) {
|
|
103
108
|
xynodes.push({
|
|
@@ -218,7 +223,6 @@ function diagramToXY(opts) {
|
|
|
218
223
|
});
|
|
219
224
|
}
|
|
220
225
|
return {
|
|
221
|
-
bounds: view.bounds,
|
|
222
226
|
xynodes,
|
|
223
227
|
xyedges
|
|
224
228
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LayoutedDynamicView, ViewId } from '@likec4/core/types';
|
|
2
2
|
import { Types } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Converts a sequence layout to XY flow nodes and edges.
|
|
5
|
+
* @param view The next dynamic view which contains the sequence layout.
|
|
6
|
+
* @param currentViewId The ID of the current view (optional, used to exclude navigation to the current view)
|
|
7
|
+
*/
|
|
8
|
+
export declare function sequenceLayoutToXY(view: LayoutedDynamicView, currentViewId: ViewId | undefined): {
|
|
5
9
|
xynodes: Array<Types.SequenceActorNode | Types.SequenceParallelArea | Types.ViewGroupNode>;
|
|
6
10
|
xyedges: Array<Types.SequenceStepEdge>;
|
|
7
11
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { nonNullable } from '@likec4/core';
|
|
2
2
|
import { SeqZIndex, SeqParallelAreaColor } from './const.js';
|
|
3
3
|
|
|
4
|
-
function sequenceLayoutToXY(view) {
|
|
4
|
+
function sequenceLayoutToXY(view, currentViewId) {
|
|
5
5
|
const { actors, steps, compounds, parallelAreas, bounds } = view.sequenceLayout;
|
|
6
6
|
const xynodes = [];
|
|
7
7
|
const xyedges = [];
|
|
@@ -22,10 +22,9 @@ function sequenceLayoutToXY(view) {
|
|
|
22
22
|
if (!edge) {
|
|
23
23
|
throw new Error(`Edge ${step.id} not found`);
|
|
24
24
|
}
|
|
25
|
-
xyedges.push(toSeqStepEdge(step, edge));
|
|
25
|
+
xyedges.push(toSeqStepEdge(step, edge, currentViewId ?? view.id));
|
|
26
26
|
}
|
|
27
27
|
return {
|
|
28
|
-
bounds,
|
|
29
28
|
xynodes,
|
|
30
29
|
xyedges
|
|
31
30
|
};
|
|
@@ -46,7 +45,10 @@ function toCompoundArea({ id, x, y, width, height, depth }, node, view) {
|
|
|
46
45
|
viewId: view.id,
|
|
47
46
|
depth,
|
|
48
47
|
isViewGroup: true,
|
|
49
|
-
drifts: node.drifts ?? null
|
|
48
|
+
drifts: node.drifts ?? null,
|
|
49
|
+
viewLayoutDir: "LR",
|
|
50
|
+
// Ignore notes for Compound nodes
|
|
51
|
+
notes: void 0
|
|
50
52
|
},
|
|
51
53
|
// zIndex: SeqZIndex.compound,
|
|
52
54
|
position: {
|
|
@@ -86,7 +88,10 @@ function toSeqParallelArea({ parallelPrefix, x, y, width, height }, view) {
|
|
|
86
88
|
description: null,
|
|
87
89
|
viewId: view.id,
|
|
88
90
|
parallelPrefix,
|
|
89
|
-
drifts: null
|
|
91
|
+
drifts: null,
|
|
92
|
+
viewLayoutDir: "LR",
|
|
93
|
+
// Ignore notes for Parallel Area nodes
|
|
94
|
+
notes: void 0
|
|
90
95
|
},
|
|
91
96
|
zIndex: SeqZIndex.parallel,
|
|
92
97
|
position: {
|
|
@@ -130,8 +135,10 @@ function toSeqActorNode({ id, x, y, width, height, ports }, actor, bounds, view)
|
|
|
130
135
|
description: actor.description ?? null,
|
|
131
136
|
viewHeight: bounds.height,
|
|
132
137
|
viewId: view.id,
|
|
138
|
+
notes: actor.notes,
|
|
133
139
|
ports,
|
|
134
|
-
drifts: actor.drifts ?? null
|
|
140
|
+
drifts: actor.drifts ?? null,
|
|
141
|
+
viewLayoutDir: "LR"
|
|
135
142
|
},
|
|
136
143
|
deletable: false,
|
|
137
144
|
selectable: true,
|
|
@@ -143,7 +150,7 @@ function toSeqActorNode({ id, x, y, width, height, ports }, actor, bounds, view)
|
|
|
143
150
|
initialHeight: height
|
|
144
151
|
};
|
|
145
152
|
}
|
|
146
|
-
function toSeqStepEdge({ id, labelBBox, sourceHandle, targetHandle }, edge) {
|
|
153
|
+
function toSeqStepEdge({ id, labelBBox, sourceHandle, targetHandle }, edge, currentViewId) {
|
|
147
154
|
return {
|
|
148
155
|
id,
|
|
149
156
|
type: "seq-step",
|
|
@@ -152,7 +159,7 @@ function toSeqStepEdge({ id, labelBBox, sourceHandle, targetHandle }, edge) {
|
|
|
152
159
|
label: edge.label,
|
|
153
160
|
technology: edge.technology,
|
|
154
161
|
notes: edge.notes ?? null,
|
|
155
|
-
navigateTo: edge.navigateTo,
|
|
162
|
+
navigateTo: edge.navigateTo !== currentViewId ? edge.navigateTo : null,
|
|
156
163
|
controlPoints: null,
|
|
157
164
|
labelBBox: {
|
|
158
165
|
x: 0,
|
|
@@ -8,7 +8,7 @@ import * as m from 'motion/react-m';
|
|
|
8
8
|
import { memo, useEffect } from 'react';
|
|
9
9
|
import { useDiagram } from '../hooks/safeContext.js';
|
|
10
10
|
import { useCurrentView } from '../hooks/useCurrentView.js';
|
|
11
|
-
import { useOptionalCurrentViewModel } from '../
|
|
11
|
+
import { useOptionalCurrentViewModel } from '../context/LikeC4ModelContext.js';
|
|
12
12
|
import { useDiagramContext } from '../hooks/useDiagram.js';
|
|
13
13
|
import { useMantinePortalProps } from '../hooks/useMantinePortalProps.js';
|
|
14
14
|
import { navigationPanelActorLogic } from './actor.js';
|
|
@@ -41,7 +41,7 @@ const NavigationPanel = memo(() => {
|
|
|
41
41
|
}, [actorRef, diagram]);
|
|
42
42
|
useEffect(() => {
|
|
43
43
|
actorRef.send({ type: "update.inputs", inputs: { viewModel, view } });
|
|
44
|
-
}, [viewModel, view]);
|
|
44
|
+
}, [actorRef, viewModel, view]);
|
|
45
45
|
return /* @__PURE__ */ jsx(
|
|
46
46
|
VStack,
|
|
47
47
|
{
|
|
@@ -81,8 +81,9 @@ const NavigationPanel = memo(() => {
|
|
|
81
81
|
);
|
|
82
82
|
});
|
|
83
83
|
NavigationPanel.displayName = "NavigationPanel";
|
|
84
|
+
const stateHasActiveTag = (state) => state.hasTag("active");
|
|
84
85
|
const NavigationPanelImpl = ({ actor }) => {
|
|
85
|
-
const opened = useSelector(actor,
|
|
86
|
+
const opened = useSelector(actor, stateHasActiveTag);
|
|
86
87
|
const portalProps = useMantinePortalProps();
|
|
87
88
|
return /* @__PURE__ */ jsxs(
|
|
88
89
|
Popover,
|
|
@@ -38,7 +38,9 @@ const NavigationPanelControls = memo(() => {
|
|
|
38
38
|
const actor = useNavigationActor();
|
|
39
39
|
const {
|
|
40
40
|
enableNavigationButtons,
|
|
41
|
-
enableDynamicViewWalkthrough
|
|
41
|
+
enableDynamicViewWalkthrough,
|
|
42
|
+
enableCompareWithLatest,
|
|
43
|
+
enableSearch
|
|
42
44
|
} = useEnabledFeatures();
|
|
43
45
|
const {
|
|
44
46
|
folders,
|
|
@@ -143,7 +145,7 @@ const NavigationPanelControls = memo(() => {
|
|
|
143
145
|
"actions"
|
|
144
146
|
),
|
|
145
147
|
enableDynamicViewWalkthrough && isDynamicView && /* @__PURE__ */ jsx(DynamicViewControls, {}, "dynamic-view-controls"),
|
|
146
|
-
/* @__PURE__ */ jsx(SearchControl, {}, "search-control"),
|
|
148
|
+
enableSearch && !enableCompareWithLatest && /* @__PURE__ */ jsx(SearchControl, {}, "search-control"),
|
|
147
149
|
/* @__PURE__ */ jsx(LayoutWarning, {}, "outdated-manual-layout-warning")
|
|
148
150
|
] });
|
|
149
151
|
});
|