@likec4/diagram 1.48.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/README.md +7 -9
- package/adhoc-editor/package.json +4 -0
- package/dist/LikeC4Diagram.d.ts +2 -1
- package/dist/LikeC4Diagram.js +77 -79
- package/dist/LikeC4Diagram.props.d.ts +9 -1
- 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 +4 -4
- package/dist/LikeC4Styles.d.ts +2 -1
- package/dist/LikeC4View.d.ts +14 -1
- package/dist/LikeC4View.js +31 -18
- package/dist/ReactLikeC4.d.ts +2 -1
- package/dist/ReactLikeC4.js +3 -1
- 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 +1 -1
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +46 -43
- 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 +3 -3
- package/dist/adhoc-editor/hooks.js +5 -23
- package/dist/adhoc-editor/index.d.ts +1 -1
- package/dist/adhoc-editor/index.js +1 -0
- package/dist/adhoc-editor/{ActorProvider.d.ts → state/ActorProvider.d.ts} +1 -3
- package/dist/adhoc-editor/{ActorProvider.js → state/ActorProvider.js} +10 -11
- package/dist/adhoc-editor/state/actor.d.ts +13 -0
- package/dist/adhoc-editor/{actor.editor.d.ts → state/actor.editor.d.ts} +6 -4
- package/dist/adhoc-editor/state/actor.editor.js +205 -0
- package/dist/adhoc-editor/{actor.js → state/actor.js} +2 -6
- package/dist/adhoc-editor/{actor.layouter.d.ts → state/actor.layouter.d.ts} +7 -4
- package/dist/adhoc-editor/{actor.layouter.js → state/actor.layouter.js} +17 -13
- package/dist/adhoc-editor/{actor.types.d.ts → state/actor.types.d.ts} +12 -6
- package/dist/adhoc-editor/{actor.types.js → state/actor.types.js} +8 -1
- 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 +1 -1
- package/dist/base/const.d.ts +1 -0
- package/dist/base-primitives/compound/CompoundActionButton.js +26 -12
- package/dist/base-primitives/compound/CompoundDetailsButton.js +22 -9
- package/dist/base-primitives/compound/CompoundNodeContainer.js +5 -4
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- 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 +12 -19
- package/dist/base-primitives/element/ElementActionButtons.js +35 -10
- package/dist/base-primitives/element/ElementDetailsButton.js +47 -18
- package/dist/base-primitives/element/ElementNodeContainer.d.ts +3 -3
- package/dist/base-primitives/element/ElementNodeContainer.js +23 -10
- package/dist/base-primitives/element/ElementShape.d.ts +2 -2
- package/dist/base-primitives/element/ElementShape.js +70 -7
- package/dist/components/ErrorFallback.js +1 -1
- package/dist/components/Link.js +3 -3
- package/dist/components/Logo.js +1 -1
- package/dist/components/NavigationPanel.js +2 -4
- package/dist/components/PortalToContainer.js +3 -4
- package/dist/components/RootContainer.js +9 -16
- 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 +1 -1
- package/dist/context/DefaultMantineProvider.js +10 -1
- 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 +5 -3
- package/dist/context/FramerMotionConfig.d.ts +1 -3
- package/dist/context/IconRenderer.d.ts +5 -4
- package/dist/context/IconRenderer.js +51 -24
- 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 +1 -1
- package/dist/custom/index.js +16 -15
- package/dist/editor/LikeC4EditorProvider.js +1 -1
- package/dist/editor/applyChangesToManualLayout.js +7 -7
- package/dist/editor/editorActor.actions.js +20 -20
- package/dist/editor/editorActor.states.js +0 -9
- package/dist/editor/useEditorActorLogic.d.ts +1 -2
- package/dist/editor/useEditorActorLogic.js +8 -11
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/safeContext.d.ts +4 -5
- package/dist/hooks/useCallbackRef.js +7 -6
- package/dist/hooks/useCurrentView.js +5 -10
- package/dist/hooks/useCurrentViewModel.d.ts +2 -6
- package/dist/hooks/useCurrentViewModel.js +3 -7
- package/dist/hooks/useDiagram.d.ts +9 -1
- package/dist/hooks/useDiagram.js +8 -2
- package/dist/hooks/useDiagramCompareLayout.d.ts +5 -5
- package/dist/hooks/useLikeC4ElementsTree.d.ts +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +1 -1
- 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/index.d.ts +1 -3
- package/dist/index.js +2 -2
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -1
- package/dist/likec4diagram/DiagramXYFlow.js +5 -7
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +22 -24
- package/dist/likec4diagram/custom/edges/edges.css.js +2 -1
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +40 -55
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
- 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 +4 -2
- package/dist/likec4diagram/custom/nodes/nodes.js +5 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +12 -8
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +8 -28
- package/dist/likec4diagram/state/DiagramActorProvider.js +30 -56
- 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 +27 -0
- package/dist/likec4diagram/state/machine.actions.js +78 -21
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +1 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +38 -3
- package/dist/likec4diagram/state/machine.js +4 -1
- package/dist/likec4diagram/state/machine.setup.d.ts +19 -2
- package/dist/likec4diagram/state/machine.state.navigating.js +1 -1
- package/dist/likec4diagram/state/machine.state.ready.d.ts +61 -1
- package/dist/likec4diagram/state/machine.state.ready.js +11 -3
- package/dist/likec4diagram/state/utils.d.ts +2 -1
- package/dist/likec4diagram/state/utils.js +1 -1
- package/dist/likec4diagram/types.d.ts +2 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/useLayoutConstraints.d.ts +12 -12
- package/dist/likec4diagram/useLayoutConstraints.js +125 -86
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +2 -0
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +7 -2
- package/dist/navigationpanel/NavigationPanel.js +2 -2
- package/dist/navigationpanel/NavigationPanelDropdown.js +13 -13
- package/dist/navigationpanel/_common.js +2 -2
- 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/controls/DetailsControls.js +4 -4
- package/dist/navigationpanel/controls/LayoutWarning.js +1 -1
- 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.js +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +3 -3
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- 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/walkthrough/ActiveWalkthroughControls.js +6 -6
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +16 -16
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.4 → @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.0_react@19.2.4 → @tabler_icons-react@3.36.1_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.4 → @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.4 → @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.4 → @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 +11 -11
- package/dist/overlays/element-details/ElementDetailsCard.js +39 -40
- package/dist/overlays/element-details/MetadataValue.js +7 -7
- package/dist/overlays/element-details/TabPanelDeployments.js +4 -4
- package/dist/overlays/element-details/TabPanelRelationships.css.js +5 -5
- 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 +1 -1
- package/dist/overlays/overlaysActor.js +1 -1
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
- package/dist/overlays/relationship-details/SelectEdge.css.js +4 -4
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -6
- 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 +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/context.d.ts +2 -2
- package/dist/projects-overview/context.js +2 -1
- package/dist/projects-overview/custom/nodeTypes.js +1 -1
- package/dist/search/Search.d.ts +2 -1
- package/dist/search/Search.js +108 -87
- package/dist/search/components/ElementsColumn.css.js +3 -3
- package/dist/search/components/ElementsColumn.js +93 -59
- package/dist/search/components/PickView.js +8 -4
- 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.js +11 -11
- package/dist/search/components/utils.js +1 -4
- package/dist/search/hooks.js +4 -1
- 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 +7 -5
- package/dist/shadowroot/styles.css.js +3 -2
- package/dist/styles.css2.js +1 -1
- package/dist/utils/view-bounds.d.ts +3 -2
- package/dist/utils/view-bounds.js +1 -1
- package/dist/utils/xyflow.d.ts +10 -5
- package/dist/utils/xyflow.js +24 -22
- package/package.json +29 -28
- package/panda.buildinfo.json +175 -86
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/bundle/index.js +0 -52554
- package/bundle/package.json +0 -4
- package/dist/adhoc-editor/EditorNavigationPanel.d.ts +0 -1
- package/dist/adhoc-editor/EditorNavigationPanel.js +0 -32
- package/dist/adhoc-editor/SelectElementOverlay.d.ts +0 -1
- package/dist/adhoc-editor/SelectElementOverlay.js +0 -124
- package/dist/adhoc-editor/actor.d.ts +0 -131
- package/dist/adhoc-editor/actor.editor.js +0 -96
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.js +0 -104
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.js +0 -14
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/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.4/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.4/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.4/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -14
|
@@ -7,8 +7,8 @@ import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
|
|
|
7
7
|
import { useRelationshipsBrowser, useRelationshipsBrowserState } from './hooks.js';
|
|
8
8
|
import * as SelectElement_css from './SelectElement.css.js';
|
|
9
9
|
import { scrollArea } from './SelectElement.css.js';
|
|
10
|
-
import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
11
|
-
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
10
|
+
import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
|
|
11
|
+
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
12
12
|
|
|
13
13
|
const selector2 = (state) => {
|
|
14
14
|
const subjectExistsInScope = state.context.layouted?.subjectExistsInScope ?? false;
|
|
@@ -2,7 +2,7 @@ import { nonNullable, invariant, delay } from '@likec4/core/utils';
|
|
|
2
2
|
import { applyEdgeChanges, applyNodeChanges } from '@xyflow/react';
|
|
3
3
|
import { getViewportForBounds } from '@xyflow/system';
|
|
4
4
|
import { hasAtLeast, omit, isNullish } from 'remeda';
|
|
5
|
-
import {
|
|
5
|
+
import { assign, enqueueActions, cancel, raise, setup, assertEvent, fromPromise } from 'xstate';
|
|
6
6
|
import { MinZoom, ZIndexes } from '../../base/const.js';
|
|
7
7
|
import { updateEdges } from '../../base/updateEdges.js';
|
|
8
8
|
import { updateNodes } from '../../base/updateNodes.js';
|
|
@@ -6,9 +6,9 @@ import '@xstate/react';
|
|
|
6
6
|
import 'fast-equals';
|
|
7
7
|
import { useDiagram } from '../../../hooks/safeContext.js';
|
|
8
8
|
import { useRelationshipsBrowser, useRelationshipsBrowserState } from '../hooks.js';
|
|
9
|
-
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
10
|
-
import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
11
|
-
import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
9
|
+
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
10
|
+
import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
|
|
11
|
+
import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
|
|
12
12
|
import { ElementActionButtons } from '../../../base-primitives/element/ElementActionButtons.js';
|
|
13
13
|
|
|
14
14
|
const selectSubject = (state) => state.context.subject;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Queue, GroupElementKind,
|
|
1
|
+
import { Queue, GroupElementKind, invariant, nonNullable } from '@likec4/core';
|
|
2
2
|
import '@react-hookz/web';
|
|
3
3
|
import { hasAtLeast } from 'remeda';
|
|
4
4
|
import { ZIndexes } from '../../base/const.js';
|
|
@@ -5,7 +5,7 @@ import { ReactFlowProvider } from '@xyflow/react';
|
|
|
5
5
|
import { LayoutGroup } from 'motion/react';
|
|
6
6
|
import { useEffect, useRef } from 'react';
|
|
7
7
|
import { projectOverviewLogic } from './actor.js';
|
|
8
|
-
import {
|
|
8
|
+
import { ProjectsOverviewActorContextProvider } from './context.js';
|
|
9
9
|
import { ProjectsOverviewPanel } from './panel/ProjectsOverviewPanel.js';
|
|
10
10
|
import { ProjectsOverviewXY } from './ProjectsOverviewXY.js';
|
|
11
11
|
|
|
@@ -48,7 +48,7 @@ function ProjectsOverview({
|
|
|
48
48
|
initialHeight: bounds.height,
|
|
49
49
|
fitView: false
|
|
50
50
|
});
|
|
51
|
-
return /* @__PURE__ */ jsx(
|
|
51
|
+
return /* @__PURE__ */ jsx(ProjectsOverviewActorContextProvider, { value: actorRef, children: /* @__PURE__ */ jsxs(ReactFlowProvider, { ...initialRef.current, children: [
|
|
52
52
|
/* @__PURE__ */ jsx(LayoutGroup, { id: actorRef.sessionId, inherit: false, children: /* @__PURE__ */ jsx(ProjectsOverviewXY, { ...props }) }),
|
|
53
53
|
/* @__PURE__ */ jsx(ProjectsOverviewPanel, {})
|
|
54
54
|
] }) });
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FunctionComponent, NamedExoticComponent } from 'react';
|
|
3
|
-
export declare const edgeTypes: {
|
|
4
|
-
relationship: FunctionComponent<ProjectsOverviewTypes.EdgeProps>;
|
|
5
|
-
};
|
|
1
|
+
import { NamedExoticComponent } from 'react';
|
|
6
2
|
export type ProjectsOverviewXYProps = {
|
|
7
3
|
/**
|
|
8
4
|
* Background pattern
|
|
@@ -4,7 +4,7 @@ import { EdgeChange, NodeChange } from '@xyflow/system';
|
|
|
4
4
|
import { MouseEvent } from 'react';
|
|
5
5
|
import { Simplify } from 'type-fest';
|
|
6
6
|
import { ActorRef, SnapshotFrom, StateMachine, ActionFunction, Values } from 'xstate';
|
|
7
|
-
import { ViewPadding } from '../
|
|
7
|
+
import { ViewPadding } from '../LikeC4Diagram.props';
|
|
8
8
|
import { ProjectsOverviewTypes, ProjectsOverviewXYFLowInstance, ProjectsOverviewXYStoreApi } from './_types';
|
|
9
9
|
export type Input = {
|
|
10
10
|
view: LayoutedProjectsView;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ProjectsOverviewActorRef } from './actor';
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
2
|
+
import { Provider } from 'react';
|
|
3
|
+
export declare const ProjectsOverviewActorContextProvider: Provider<ProjectsOverviewActorRef | null>;
|
|
4
4
|
export declare function useProjectsOverviewActor(): ProjectsOverviewActorRef;
|
|
@@ -2,8 +2,9 @@ import { nonNullable } from '@likec4/core';
|
|
|
2
2
|
import { createContext, useContext } from 'react';
|
|
3
3
|
|
|
4
4
|
const ProjectsOverviewActorContext = createContext(null);
|
|
5
|
+
const ProjectsOverviewActorContextProvider = ProjectsOverviewActorContext.Provider;
|
|
5
6
|
function useProjectsOverviewActor() {
|
|
6
7
|
return nonNullable(useContext(ProjectsOverviewActorContext), "No ProjectsOverviewActorContext");
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export {
|
|
10
|
+
export { ProjectsOverviewActorContextProvider, useProjectsOverviewActor };
|
|
@@ -5,7 +5,7 @@ import { ElementNodeContainer } from '../../base-primitives/element/ElementNodeC
|
|
|
5
5
|
import { ElementShape } from '../../base-primitives/element/ElementShape.js';
|
|
6
6
|
import { ElementData } from '../../base-primitives/element/ElementData.js';
|
|
7
7
|
import { ElementActionButtons } from '../../base-primitives/element/ElementActionButtons.js';
|
|
8
|
-
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.36.
|
|
8
|
+
import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.36.1_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
9
9
|
import { DefaultHandles } from '../../base-primitives/NodeHandles.js';
|
|
10
10
|
|
|
11
11
|
function ProjectNode(props) {
|
package/dist/search/Search.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { MemoExoticComponent } from 'react';
|
|
2
|
+
export declare const Search: MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
package/dist/search/Search.js
CHANGED
|
@@ -5,9 +5,10 @@ import { Group, Grid, GridCol, Title, ScrollArea } from '@mantine/core';
|
|
|
5
5
|
import { useHotkeys } from '@mantine/hooks';
|
|
6
6
|
import { useTimeoutEffect } from '@react-hookz/web';
|
|
7
7
|
import { useSelector } from '@xstate/react';
|
|
8
|
-
import { AnimatePresence, LayoutGroup } from 'motion/react';
|
|
9
|
-
import { memo, useRef } from 'react';
|
|
8
|
+
import { AnimatePresence, usePresence, LayoutGroup } from 'motion/react';
|
|
9
|
+
import { memo, useRef, useMemo, useEffect, Suspense } from 'react';
|
|
10
10
|
import { isTruthy } from 'remeda';
|
|
11
|
+
import { createEmptyActor } from 'xstate';
|
|
11
12
|
import { useCallbackRef } from '../hooks/useCallbackRef.js';
|
|
12
13
|
import { useSearchActorRef } from '../hooks/useSearchActor.js';
|
|
13
14
|
import { Overlay } from '../overlays/overlay/Overlay.js';
|
|
@@ -67,39 +68,35 @@ const scrollArea = css({
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
});
|
|
70
|
-
const selectIsOpened = (s) =>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
const selectIsOpened = (s) => {
|
|
72
|
+
try {
|
|
73
|
+
return s.status === "active" && (s.value === "opened" || s.value === "pickView");
|
|
74
|
+
} catch (e) {
|
|
75
|
+
console.error(e);
|
|
76
|
+
return false;
|
|
75
77
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const isOpened = useSelector(searchActorRef, selectIsOpened);
|
|
81
|
-
const ref = useRef(null);
|
|
82
|
-
const pickViewFor = useSelector(searchActorRef, selectPickViewFor);
|
|
83
|
-
useTimeoutEffect(() => {
|
|
84
|
-
if (isTruthy(searchActorRef.getSnapshot().context.openedWithSearch)) {
|
|
85
|
-
focusToFirstFoundElement(ref.current);
|
|
86
|
-
}
|
|
87
|
-
}, isOpened ? 150 : void 0);
|
|
88
|
-
const openSearch = () => {
|
|
89
|
-
searchActorRef.send({ type: "open" });
|
|
90
|
-
};
|
|
78
|
+
};
|
|
79
|
+
const Search = memo(() => {
|
|
80
|
+
const searchActorRef = useSearchActorRef();
|
|
81
|
+
const emptyActorRef = useRef(createEmptyActor());
|
|
82
|
+
const isOpened = useSelector(searchActorRef ?? emptyActorRef.current, selectIsOpened);
|
|
91
83
|
const close = useCallbackRef(() => {
|
|
92
|
-
searchActorRef
|
|
84
|
+
searchActorRef?.send({ type: "close" });
|
|
93
85
|
});
|
|
94
|
-
useHotkeys(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
86
|
+
useHotkeys(
|
|
87
|
+
useMemo(() => {
|
|
88
|
+
const openSearch = () => searchActorRef?.send({ type: "open" });
|
|
89
|
+
return searchActorRef ? [
|
|
90
|
+
["mod+k", openSearch, {
|
|
91
|
+
preventDefault: true
|
|
92
|
+
}],
|
|
93
|
+
["mod+f", openSearch, {
|
|
94
|
+
preventDefault: true
|
|
95
|
+
}]
|
|
96
|
+
] : [];
|
|
97
|
+
}, [searchActorRef])
|
|
98
|
+
);
|
|
99
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: searchActorRef && isOpened && /* @__PURE__ */ jsx(
|
|
103
100
|
Overlay,
|
|
104
101
|
{
|
|
105
102
|
fullscreen: true,
|
|
@@ -114,63 +111,87 @@ const SearchOverlayCtx = memo(({ searchActorRef }) => {
|
|
|
114
111
|
openDelay: 0,
|
|
115
112
|
onClose: close,
|
|
116
113
|
"data-likec4-search": "true",
|
|
117
|
-
children: /* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */ jsx(
|
|
119
|
-
Group,
|
|
120
|
-
{
|
|
121
|
-
className: "group",
|
|
122
|
-
wrap: "nowrap",
|
|
123
|
-
onClick: (e) => {
|
|
124
|
-
e.stopPropagation();
|
|
125
|
-
moveFocusToSearchInput(ref.current);
|
|
126
|
-
},
|
|
127
|
-
children: /* @__PURE__ */ jsxs(VStack, { flex: 1, px: "sm", children: [
|
|
128
|
-
/* @__PURE__ */ jsx(LikeC4SearchInput, {}),
|
|
129
|
-
/* @__PURE__ */ jsx(SearchByTags, {})
|
|
130
|
-
] })
|
|
131
|
-
}
|
|
132
|
-
),
|
|
133
|
-
/* @__PURE__ */ jsxs(Grid, { children: [
|
|
134
|
-
/* @__PURE__ */ jsx(GridCol, { span: 6, children: /* @__PURE__ */ jsx(Title, { component: "div", order: 6, c: "dimmed", pl: "sm", children: "Elements" }) }),
|
|
135
|
-
/* @__PURE__ */ jsx(GridCol, { span: 6, children: /* @__PURE__ */ jsx(Title, { component: "div", order: 6, c: "dimmed", pl: "sm", children: "Views" }) })
|
|
136
|
-
] }),
|
|
137
|
-
/* @__PURE__ */ jsxs(
|
|
138
|
-
Grid,
|
|
139
|
-
{
|
|
140
|
-
className: css({
|
|
141
|
-
containerName: "likec4-search-elements",
|
|
142
|
-
containerType: "size",
|
|
143
|
-
overflow: "hidden",
|
|
144
|
-
flexGrow: 1
|
|
145
|
-
}),
|
|
146
|
-
children: [
|
|
147
|
-
/* @__PURE__ */ jsx(GridCol, { span: 6, children: /* @__PURE__ */ jsx(
|
|
148
|
-
ScrollArea,
|
|
149
|
-
{
|
|
150
|
-
type: "scroll",
|
|
151
|
-
className: scrollArea,
|
|
152
|
-
pr: "xs",
|
|
153
|
-
scrollbars: "y",
|
|
154
|
-
children: /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsx(LayoutGroup, { id: "likec4-search-elements", children: /* @__PURE__ */ jsx(ElementsColumn, {}) }) })
|
|
155
|
-
}
|
|
156
|
-
) }),
|
|
157
|
-
/* @__PURE__ */ jsx(GridCol, { span: 6, children: /* @__PURE__ */ jsx(
|
|
158
|
-
ScrollArea,
|
|
159
|
-
{
|
|
160
|
-
type: "scroll",
|
|
161
|
-
className: scrollArea,
|
|
162
|
-
pr: "xs",
|
|
163
|
-
scrollbars: "y",
|
|
164
|
-
children: /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsx(LayoutGroup, { id: "likec4-search-views", children: /* @__PURE__ */ jsx(ViewsColumn, {}) }) })
|
|
165
|
-
}
|
|
166
|
-
) })
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
),
|
|
170
|
-
pickViewFor && /* @__PURE__ */ jsx(PickView, { searchActorRef, elementFqn: pickViewFor })
|
|
171
|
-
] })
|
|
114
|
+
children: /* @__PURE__ */ jsx(SearchOverlayBody, { searchActorRef })
|
|
172
115
|
}
|
|
173
116
|
) });
|
|
174
117
|
});
|
|
118
|
+
Search.displayName = "Search";
|
|
119
|
+
const selectPickViewFor = (s) => s.context.pickViewFor;
|
|
120
|
+
const SearchOverlayBody = memo(({ searchActorRef }) => {
|
|
121
|
+
const ref = useRef(null);
|
|
122
|
+
const pickViewFor = useSelector(searchActorRef, selectPickViewFor);
|
|
123
|
+
useTimeoutEffect(() => {
|
|
124
|
+
if (isTruthy(searchActorRef.getSnapshot().context.openedWithSearch)) {
|
|
125
|
+
focusToFirstFoundElement(ref.current);
|
|
126
|
+
}
|
|
127
|
+
}, 150);
|
|
128
|
+
const [isPresent, safeToRemove] = usePresence();
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
if (isPresent) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
safeToRemove();
|
|
134
|
+
try {
|
|
135
|
+
searchActorRef.send({ type: "animation.presence.end" });
|
|
136
|
+
} catch (e) {
|
|
137
|
+
console.debug("SearchOverlayBody: animation.presence.end failed", e);
|
|
138
|
+
}
|
|
139
|
+
}, [isPresent, searchActorRef, safeToRemove]);
|
|
140
|
+
return /* @__PURE__ */ jsxs(Box, { ref, display: "contents", children: [
|
|
141
|
+
/* @__PURE__ */ jsx(
|
|
142
|
+
Group,
|
|
143
|
+
{
|
|
144
|
+
className: "group",
|
|
145
|
+
wrap: "nowrap",
|
|
146
|
+
onClick: (e) => {
|
|
147
|
+
e.stopPropagation();
|
|
148
|
+
moveFocusToSearchInput(ref.current);
|
|
149
|
+
},
|
|
150
|
+
children: /* @__PURE__ */ jsxs(VStack, { flex: 1, px: "sm", children: [
|
|
151
|
+
/* @__PURE__ */ jsx(LikeC4SearchInput, {}),
|
|
152
|
+
/* @__PURE__ */ jsx(SearchByTags, {})
|
|
153
|
+
] })
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
/* @__PURE__ */ jsxs(Grid, { children: [
|
|
157
|
+
/* @__PURE__ */ jsx(GridCol, { span: 6, children: /* @__PURE__ */ jsx(Title, { component: "div", order: 6, c: "dimmed", pl: "sm", children: "Elements" }) }),
|
|
158
|
+
/* @__PURE__ */ jsx(GridCol, { span: 6, children: /* @__PURE__ */ jsx(Title, { component: "div", order: 6, c: "dimmed", pl: "sm", children: "Views" }) })
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ jsxs(
|
|
161
|
+
Grid,
|
|
162
|
+
{
|
|
163
|
+
className: css({
|
|
164
|
+
containerName: "likec4-search-elements",
|
|
165
|
+
containerType: "size",
|
|
166
|
+
overflow: "hidden",
|
|
167
|
+
flexGrow: 1
|
|
168
|
+
}),
|
|
169
|
+
children: [
|
|
170
|
+
/* @__PURE__ */ jsx(GridCol, { span: 6, children: /* @__PURE__ */ jsx(
|
|
171
|
+
ScrollArea,
|
|
172
|
+
{
|
|
173
|
+
type: "scroll",
|
|
174
|
+
className: scrollArea,
|
|
175
|
+
pr: "xs",
|
|
176
|
+
scrollbars: "y",
|
|
177
|
+
children: /* @__PURE__ */ jsx(LayoutGroup, { id: "likec4-search-elements", children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(ElementsColumn, {}) }) })
|
|
178
|
+
}
|
|
179
|
+
) }),
|
|
180
|
+
/* @__PURE__ */ jsx(GridCol, { span: 6, children: /* @__PURE__ */ jsx(
|
|
181
|
+
ScrollArea,
|
|
182
|
+
{
|
|
183
|
+
type: "scroll",
|
|
184
|
+
className: scrollArea,
|
|
185
|
+
pr: "xs",
|
|
186
|
+
scrollbars: "y",
|
|
187
|
+
children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(LayoutGroup, { id: "likec4-search-views", children: /* @__PURE__ */ jsx(ViewsColumn, {}) }) })
|
|
188
|
+
}
|
|
189
|
+
) })
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
),
|
|
193
|
+
pickViewFor && /* @__PURE__ */ jsx(PickView, { searchActorRef, elementFqn: pickViewFor })
|
|
194
|
+
] });
|
|
195
|
+
});
|
|
175
196
|
|
|
176
197
|
export { Search };
|
|
@@ -25,7 +25,7 @@ const treeSubtree = css({
|
|
|
25
25
|
marginTop: "2"
|
|
26
26
|
});
|
|
27
27
|
const elementExpandIcon = css({
|
|
28
|
-
color: "
|
|
28
|
+
color: "text.dimmed"
|
|
29
29
|
});
|
|
30
30
|
const elementTitleAndId = css({
|
|
31
31
|
[whenContainerIsNarrow]: {
|
|
@@ -35,7 +35,7 @@ const elementTitleAndId = css({
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
const elementId = css({
|
|
38
|
-
// color: `[var(${descriptionColor}, {colors.
|
|
38
|
+
// color: `[var(${descriptionColor}, {colors.text.dimmed})]`,
|
|
39
39
|
fontSize: "10px",
|
|
40
40
|
lineHeight: "1.3",
|
|
41
41
|
display: "block",
|
|
@@ -56,7 +56,7 @@ const elementIcon = css({
|
|
|
56
56
|
});
|
|
57
57
|
const elementViewsCount = css({
|
|
58
58
|
flex: 0,
|
|
59
|
-
// color: `[var(${descriptionColor}, {colors.
|
|
59
|
+
// color: `[var(${descriptionColor}, {colors.text.dimmed})]`,
|
|
60
60
|
fontSize: "10px",
|
|
61
61
|
fontWeight: "medium",
|
|
62
62
|
whiteSpace: "nowrap",
|