@likec4/diagram 1.34.1 → 1.35.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/bundle/{chunk-Dd7et66b.js → chunk-C0Eg81Gj.js} +971 -1045
- package/bundle/custom.js +59 -55
- package/bundle/index.js +6656 -4263
- package/dist/LikeC4Diagram.props.d.ts +51 -4
- package/dist/LikeC4ModelProvider.d.ts +3 -3
- package/dist/base/BaseXYFlow.d.ts +2 -2
- package/dist/base/BaseXYFlow.js +3 -3
- package/dist/base/primitives/compound/CompoundActionButton.js +1 -1
- package/dist/base/primitives/compound/CompoundDetailsButton.js +1 -1
- package/dist/base/primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base/primitives/element/ElementDetailsButton.js +1 -1
- package/dist/base/primitives/element/ElementNodeContainer.d.ts +3 -3
- package/dist/base/primitives/element/ElementTitle.js +9 -9
- package/dist/bundle/LikeC4View.js +3 -3
- package/dist/bundle/LikeC4View.props.d.ts +8 -4
- package/dist/bundle/custom.js +1 -0
- package/dist/bundle/index.js +1 -0
- package/dist/components/ErrorFallback.d.ts +2 -1
- package/dist/components/ErrorFallback.js +15 -2
- package/dist/components/Link.js +2 -2
- package/dist/components/NavigationLink.d.ts +6 -0
- package/dist/components/NavigationLink.js +25 -0
- package/dist/components/SearchControl.js +1 -1
- package/dist/context/ControlsCustomLayout.d.ts +0 -1
- package/dist/context/DiagramFeatures.d.ts +4 -1
- package/dist/context/IconRenderer.js +6 -6
- package/dist/custom/customNodes.js +10 -2
- package/dist/custom/hooks.d.ts +1 -0
- package/dist/custom/index.js +1 -0
- package/dist/hooks/useDiagram.d.ts +1 -2
- package/dist/hooks/useDiagram.js +1 -5
- package/dist/index.js +1 -0
- package/dist/likec4diagram/DiagramUI.js +8 -4
- package/dist/likec4diagram/DiagramXYFlow.js +1 -1
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +4 -4
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
- package/dist/likec4diagram/ui/controls/ChangeAutoLayoutButton.js +1 -1
- package/dist/likec4diagram/ui/controls/Controls.js +11 -15
- package/dist/likec4diagram/ui/controls/LayoutDriftNotification.js +1 -1
- package/dist/likec4diagram/ui/controls/ManualLayoutToolsButton.js +9 -9
- package/dist/likec4diagram/ui/controls/NavigationButtons.js +4 -2
- package/dist/likec4diagram/ui/controls/ToggleReadonly.js +2 -2
- package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +15 -13
- package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
- package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.js +4 -4
- package/dist/likec4model/LikeC4ModelContext.d.ts +4 -1
- package/dist/likec4model/LikeC4ModelContext.js +2 -1
- package/dist/likec4model/index.d.ts +1 -0
- package/dist/likec4model/useCurrentViewModel.d.ts +2 -0
- package/dist/likec4model/useCurrentViewModel.js +12 -0
- package/dist/likec4model/useLikeC4Model.d.ts +2 -5
- package/dist/likec4model/useLikeC4Model.js +10 -16
- package/dist/navigationpanel/NavigationPanel.d.ts +2 -0
- package/dist/navigationpanel/NavigationPanel.js +124 -0
- package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -0
- package/dist/navigationpanel/NavigationPanelControls.js +134 -0
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -0
- package/dist/navigationpanel/NavigationPanelDropdown.js +436 -0
- package/dist/navigationpanel/_common.d.ts +15 -0
- package/dist/navigationpanel/_common.js +69 -0
- package/dist/navigationpanel/actor.d.ts +300 -0
- package/dist/navigationpanel/actor.js +240 -0
- package/dist/navigationpanel/controls/BurgerButton.d.ts +1 -0
- package/dist/navigationpanel/controls/BurgerButton.js +36 -0
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -0
- package/dist/navigationpanel/controls/NavigationButtons.js +44 -0
- package/dist/navigationpanel/controls/OpenSource.d.ts +1 -0
- package/dist/navigationpanel/controls/OpenSource.js +27 -0
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -0
- package/dist/navigationpanel/controls/SearchControl.js +68 -0
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -0
- package/dist/navigationpanel/controls/ToggleReadonly.js +69 -0
- package/dist/navigationpanel/controls/index.d.ts +5 -0
- package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +1 -0
- package/dist/navigationpanel/editorpanel/CenterCamera.js +12 -0
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -0
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +157 -0
- package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +1 -0
- package/dist/navigationpanel/editorpanel/EditorPanel.js +48 -0
- package/dist/navigationpanel/editorpanel/LayoutDriftNotification.d.ts +1 -0
- package/dist/navigationpanel/editorpanel/LayoutDriftNotification.js +56 -0
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +2 -0
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +174 -0
- package/dist/navigationpanel/editorpanel/_common.d.ts +6 -0
- package/dist/navigationpanel/editorpanel/_common.js +14 -0
- package/dist/navigationpanel/editorpanel/index.d.ts +1 -0
- package/dist/navigationpanel/editorpanel/styles.d.ts +8 -0
- package/dist/navigationpanel/editorpanel/styles.js +79 -0
- package/dist/navigationpanel/hooks.d.ts +20 -0
- package/dist/navigationpanel/hooks.js +38 -0
- package/dist/navigationpanel/index.d.ts +1 -0
- package/dist/navigationpanel/styles.css.d.ts +16 -0
- package/dist/navigationpanel/styles.css.js +32 -0
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +2 -0
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +157 -0
- package/dist/navigationpanel/walkthrough/index.d.ts +1 -0
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.31.0_react@19.1.0 → @tabler_icons-react@3.34.1_react@19.1.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
- package/dist/node_modules/.pnpm/{@tabler_icons-react@3.31.0_react@19.1.0 → @tabler_icons-react@3.34.1_react@19.1.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu2.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +14 -0
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +14 -0
- package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
- package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
- package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
- 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 +3 -3
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/search/components/ElementsColumn.js +1 -1
- package/dist/search/components/PickView.js +1 -1
- package/dist/search/components/SearchByTags.js +1 -1
- package/dist/search/components/SearchInput.js +1 -1
- package/dist/search/components/ViewsColum.js +2 -2
- package/dist/state/DiagramActorProvider.d.ts +2 -2
- package/dist/state/DiagramActorProvider.js +48 -10
- package/dist/state/diagram-machine.d.ts +2 -2
- package/dist/styles-min.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css2.js +1 -1
- package/package.json +16 -15
- package/panda.buildinfo.json +170 -134
- package/src/LikeC4Diagram.props.ts +51 -3
- package/src/LikeC4ModelProvider.tsx +3 -3
- package/src/base/BaseXYFlow.tsx +4 -4
- package/src/base/primitives/element/ElementNodeContainer.tsx +2 -2
- package/src/base/primitives/element/ElementTitle.tsx +4 -4
- package/src/bundle/LikeC4View.props.ts +14 -4
- package/src/bundle/LikeC4View.tsx +2 -2
- package/src/components/ErrorFallback.tsx +16 -1
- package/src/components/NavigationLink.tsx +31 -0
- package/src/context/ControlsCustomLayout.ts +0 -1
- package/src/context/DiagramFeatures.tsx +6 -1
- package/src/custom/customNodes.tsx +10 -2
- package/src/custom/hooks.ts +3 -0
- package/src/hooks/useDiagram.ts +0 -8
- package/src/likec4diagram/DiagramUI.tsx +9 -3
- package/src/likec4diagram/DiagramXYFlow.tsx +1 -1
- package/src/likec4diagram/ui/controls/Controls.tsx +8 -18
- package/src/likec4diagram/ui/controls/NavigationButtons.tsx +2 -0
- package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +14 -11
- package/src/likec4model/LikeC4ModelContext.ts +5 -1
- package/src/likec4model/index.ts +3 -0
- package/src/likec4model/useCurrentViewModel.ts +10 -0
- package/src/likec4model/useLikeC4Model.ts +17 -27
- package/src/navigationpanel/NavigationPanel.tsx +136 -0
- package/src/navigationpanel/NavigationPanelControls.tsx +155 -0
- package/src/navigationpanel/NavigationPanelDropdown.tsx +523 -0
- package/src/navigationpanel/_common.tsx +81 -0
- package/src/navigationpanel/actor.ts +321 -0
- package/src/navigationpanel/controls/BurgerButton.tsx +32 -0
- package/src/navigationpanel/controls/NavigationButtons.tsx +36 -0
- package/src/navigationpanel/controls/OpenSource.tsx +28 -0
- package/src/navigationpanel/controls/SearchControl.tsx +64 -0
- package/src/navigationpanel/controls/ToggleReadonly.tsx +66 -0
- package/src/navigationpanel/controls/index.ts +5 -0
- package/src/navigationpanel/editorpanel/CenterCamera.tsx +15 -0
- package/src/navigationpanel/editorpanel/ChangeAutoLayoutButton.tsx +199 -0
- package/src/navigationpanel/editorpanel/EditorPanel.tsx +49 -0
- package/src/navigationpanel/editorpanel/LayoutDriftNotification.tsx +56 -0
- package/src/navigationpanel/editorpanel/ManualLayoutToolsButton.tsx +151 -0
- package/src/navigationpanel/editorpanel/_common.tsx +14 -0
- package/src/navigationpanel/editorpanel/index.ts +1 -0
- package/src/navigationpanel/editorpanel/styles.ts +84 -0
- package/src/navigationpanel/hooks.tsx +70 -0
- package/src/navigationpanel/index.ts +1 -0
- package/src/navigationpanel/styles.css.ts +30 -0
- package/src/navigationpanel/walkthrough/ActiveWalkthroughControls.tsx +160 -0
- package/src/navigationpanel/walkthrough/index.tsx +1 -0
- package/src/state/DiagramActorProvider.tsx +60 -12
- package/src/state/diagram-machine.ts +2 -2
- package/dist/base/primitives/element/ElementTitle.css.d.ts +0 -34
- package/dist/base/primitives/element/ElementTitle.css.js +0 -201
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu2.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -13
- package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -13
- package/src/base/primitives/element/ElementTitle.css.ts +0 -206
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { ViewId } from '@likec4/core/types';
|
|
2
|
+
import { ActorLogicFrom, ActorRefFrom, SnapshotFrom, StateMachine, Values, NonReducibleUnknown, MetaObject, ActorRefFromLogic, AnyActorLogic, ConditionalRequired, InputFrom, RequiredLogicInput, IsNotNever, ActorRef, MachineSnapshot, AnyActorRef, StateValue, AnyEventObject, ActionFunction } from 'xstate';
|
|
3
|
+
import { CurrentViewModel } from '../likec4model/LikeC4ModelContext';
|
|
4
|
+
export interface NavigationPanelActorInput {
|
|
5
|
+
viewModel: CurrentViewModel;
|
|
6
|
+
}
|
|
7
|
+
export type NavigationPanelActorEvent = {
|
|
8
|
+
type: 'update.inputs';
|
|
9
|
+
inputs: NavigationPanelActorInput;
|
|
10
|
+
} | {
|
|
11
|
+
type: 'searchQuery.change';
|
|
12
|
+
value: string;
|
|
13
|
+
} | {
|
|
14
|
+
type: 'searchQuery.changed';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'select.folder';
|
|
17
|
+
folderPath: string;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'select.view';
|
|
20
|
+
viewId: ViewId;
|
|
21
|
+
} | {
|
|
22
|
+
type: 'breadcrumbs.mouseLeave';
|
|
23
|
+
} | {
|
|
24
|
+
type: 'breadcrumbs.mouseEnter.root';
|
|
25
|
+
} | {
|
|
26
|
+
type: 'breadcrumbs.mouseLeave.root';
|
|
27
|
+
} | {
|
|
28
|
+
type: 'breadcrumbs.mouseEnter.folder';
|
|
29
|
+
folderPath: string;
|
|
30
|
+
} | {
|
|
31
|
+
type: 'breadcrumbs.mouseLeave.folder';
|
|
32
|
+
folderPath: string;
|
|
33
|
+
} | {
|
|
34
|
+
type: 'breadcrumbs.mouseEnter.viewtitle';
|
|
35
|
+
} | {
|
|
36
|
+
type: 'breadcrumbs.mouseLeave.viewtitle';
|
|
37
|
+
} | {
|
|
38
|
+
type: 'breadcrumbs.click.root';
|
|
39
|
+
} | {
|
|
40
|
+
type: 'breadcrumbs.click.folder';
|
|
41
|
+
folderPath: string;
|
|
42
|
+
} | {
|
|
43
|
+
type: 'breadcrumbs.click.viewtitle';
|
|
44
|
+
} | {
|
|
45
|
+
type: 'dropdown.mouseEnter';
|
|
46
|
+
} | {
|
|
47
|
+
type: 'dropdown.mouseLeave';
|
|
48
|
+
} | {
|
|
49
|
+
type: 'dropdown.dismiss';
|
|
50
|
+
};
|
|
51
|
+
export type NavigationPanelActorEmitted = {
|
|
52
|
+
type: 'trigger.navigateTo';
|
|
53
|
+
viewId: ViewId;
|
|
54
|
+
};
|
|
55
|
+
export type BreadcrumbItem = {
|
|
56
|
+
type: 'folder';
|
|
57
|
+
folderPath: string;
|
|
58
|
+
title: string;
|
|
59
|
+
} | {
|
|
60
|
+
type: 'viewtitle';
|
|
61
|
+
title: string;
|
|
62
|
+
};
|
|
63
|
+
export type DropdownColumnItem = {
|
|
64
|
+
type: 'folder';
|
|
65
|
+
folderPath: string;
|
|
66
|
+
title: string;
|
|
67
|
+
selected: boolean;
|
|
68
|
+
} | {
|
|
69
|
+
type: 'view';
|
|
70
|
+
viewType: 'element' | 'deployment' | 'dynamic' | 'index';
|
|
71
|
+
viewId: string;
|
|
72
|
+
title: string;
|
|
73
|
+
description: string | null;
|
|
74
|
+
selected: boolean;
|
|
75
|
+
};
|
|
76
|
+
export interface NavigationPanelActorContext {
|
|
77
|
+
viewModel: CurrentViewModel;
|
|
78
|
+
/**
|
|
79
|
+
* Who activated the dropdown
|
|
80
|
+
* (if `click` then the dropdown is always open until dismissed)
|
|
81
|
+
* @default 'hover'
|
|
82
|
+
*/
|
|
83
|
+
activatedBy: 'hover' | 'click';
|
|
84
|
+
/**
|
|
85
|
+
* The folder that is currently selected in the dropdown
|
|
86
|
+
* By default it is the root
|
|
87
|
+
*/
|
|
88
|
+
selectedFolder: string;
|
|
89
|
+
searchQuery: string;
|
|
90
|
+
}
|
|
91
|
+
declare const _actorLogic: StateMachine<NavigationPanelActorContext, NavigationPanelActorEvent, {}, never, Values<{
|
|
92
|
+
"update activatedBy": {
|
|
93
|
+
type: "update activatedBy";
|
|
94
|
+
params: NonReducibleUnknown;
|
|
95
|
+
};
|
|
96
|
+
"keep dropdown open": {
|
|
97
|
+
type: "keep dropdown open";
|
|
98
|
+
params: NonReducibleUnknown;
|
|
99
|
+
};
|
|
100
|
+
"update selected folder": {
|
|
101
|
+
type: "update selected folder";
|
|
102
|
+
params: NonReducibleUnknown;
|
|
103
|
+
};
|
|
104
|
+
"reset selected folder": {
|
|
105
|
+
type: "reset selected folder";
|
|
106
|
+
params: NonReducibleUnknown;
|
|
107
|
+
};
|
|
108
|
+
"update inputs": {
|
|
109
|
+
type: "update inputs";
|
|
110
|
+
params: NonReducibleUnknown;
|
|
111
|
+
};
|
|
112
|
+
"reset search query": {
|
|
113
|
+
type: "reset search query";
|
|
114
|
+
params: NonReducibleUnknown;
|
|
115
|
+
};
|
|
116
|
+
"update search query": {
|
|
117
|
+
type: "update search query";
|
|
118
|
+
params: NonReducibleUnknown;
|
|
119
|
+
};
|
|
120
|
+
"emit trigger.navigateTo": {
|
|
121
|
+
type: "emit trigger.navigateTo";
|
|
122
|
+
params: NonReducibleUnknown;
|
|
123
|
+
};
|
|
124
|
+
}>, Values<{
|
|
125
|
+
"was opened on hover": {
|
|
126
|
+
type: "was opened on hover";
|
|
127
|
+
params: unknown;
|
|
128
|
+
};
|
|
129
|
+
"has search query": {
|
|
130
|
+
type: "has search query";
|
|
131
|
+
params: unknown;
|
|
132
|
+
};
|
|
133
|
+
"search query is empty": {
|
|
134
|
+
type: "search query is empty";
|
|
135
|
+
params: unknown;
|
|
136
|
+
};
|
|
137
|
+
}>, "open timeout" | "close timeout", "pending" | "idle" | {
|
|
138
|
+
active: "search" | "opened" | "closing" | "decide";
|
|
139
|
+
}, "active", NavigationPanelActorInput, NonReducibleUnknown, NavigationPanelActorEmitted, MetaObject, {
|
|
140
|
+
readonly id: "breadcrumbs";
|
|
141
|
+
readonly context: ({ input }: {
|
|
142
|
+
spawn: {
|
|
143
|
+
<TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
|
|
144
|
+
<TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
|
|
145
|
+
id?: never;
|
|
146
|
+
systemId?: string;
|
|
147
|
+
input?: InputFrom<TLogic>;
|
|
148
|
+
syncSnapshot?: boolean;
|
|
149
|
+
} & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
|
|
150
|
+
};
|
|
151
|
+
input: NavigationPanelActorInput;
|
|
152
|
+
self: ActorRef<MachineSnapshot<NavigationPanelActorContext, NavigationPanelActorEvent, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, NavigationPanelActorEvent, AnyEventObject>;
|
|
153
|
+
}) => {
|
|
154
|
+
breadcrumbs: never[];
|
|
155
|
+
activatedBy: "hover";
|
|
156
|
+
selectedFolder: string;
|
|
157
|
+
searchQuery: string;
|
|
158
|
+
folderColumns: never[];
|
|
159
|
+
viewModel: CurrentViewModel;
|
|
160
|
+
};
|
|
161
|
+
readonly initial: "idle";
|
|
162
|
+
readonly entry: readonly ["update activatedBy", "reset selected folder"];
|
|
163
|
+
readonly on: {
|
|
164
|
+
readonly 'update.inputs': {
|
|
165
|
+
readonly actions: "update inputs";
|
|
166
|
+
};
|
|
167
|
+
readonly 'searchQuery.change': {
|
|
168
|
+
readonly actions: readonly ["update search query", ActionFunction<NavigationPanelActorContext, {
|
|
169
|
+
type: "searchQuery.change";
|
|
170
|
+
value: string;
|
|
171
|
+
}, NavigationPanelActorEvent, undefined, never, never, never, "open timeout" | "close timeout", never>];
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
readonly states: {
|
|
175
|
+
readonly idle: {
|
|
176
|
+
readonly id: "idle";
|
|
177
|
+
readonly on: {
|
|
178
|
+
readonly 'breadcrumbs.mouseEnter.*': {
|
|
179
|
+
readonly target: "pending";
|
|
180
|
+
readonly actions: "update activatedBy";
|
|
181
|
+
};
|
|
182
|
+
readonly 'breadcrumbs.click.*': {
|
|
183
|
+
readonly target: "active";
|
|
184
|
+
readonly actions: "update activatedBy";
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
readonly pending: {
|
|
189
|
+
readonly on: {
|
|
190
|
+
readonly 'breadcrumbs.mouseEnter.*': {
|
|
191
|
+
readonly actions: "update activatedBy";
|
|
192
|
+
};
|
|
193
|
+
readonly 'breadcrumbs.mouseLeave.*': {
|
|
194
|
+
readonly target: "idle";
|
|
195
|
+
};
|
|
196
|
+
readonly 'breadcrumbs.click.*': {
|
|
197
|
+
readonly target: "active";
|
|
198
|
+
readonly actions: "update activatedBy";
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
readonly after: {
|
|
202
|
+
readonly 'open timeout': {
|
|
203
|
+
readonly target: "active";
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
readonly active: {
|
|
208
|
+
readonly tags: readonly ["active"];
|
|
209
|
+
readonly initial: "decide";
|
|
210
|
+
readonly on: {
|
|
211
|
+
readonly 'dropdown.dismiss': {
|
|
212
|
+
readonly target: "#idle";
|
|
213
|
+
};
|
|
214
|
+
readonly 'breadcrumbs.mouseLeave': {
|
|
215
|
+
readonly guard: "was opened on hover";
|
|
216
|
+
readonly target: ".closing";
|
|
217
|
+
};
|
|
218
|
+
readonly 'dropdown.mouseLeave': {
|
|
219
|
+
readonly guard: "was opened on hover";
|
|
220
|
+
readonly target: ".closing";
|
|
221
|
+
};
|
|
222
|
+
readonly 'searchQuery.changed': {
|
|
223
|
+
readonly target: ".decide";
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
readonly states: {
|
|
227
|
+
readonly decide: {
|
|
228
|
+
readonly always: readonly [{
|
|
229
|
+
readonly guard: "has search query";
|
|
230
|
+
readonly target: "search";
|
|
231
|
+
}, {
|
|
232
|
+
readonly target: "opened";
|
|
233
|
+
}];
|
|
234
|
+
};
|
|
235
|
+
readonly opened: {
|
|
236
|
+
readonly on: {
|
|
237
|
+
readonly 'searchQuery.changed': {
|
|
238
|
+
readonly guard: "has search query";
|
|
239
|
+
readonly actions: "keep dropdown open";
|
|
240
|
+
readonly target: "search";
|
|
241
|
+
};
|
|
242
|
+
readonly 'breadcrumbs.click.folder': {
|
|
243
|
+
readonly actions: "update selected folder";
|
|
244
|
+
readonly target: "opened";
|
|
245
|
+
readonly reenter: true;
|
|
246
|
+
};
|
|
247
|
+
readonly 'breadcrumbs.click.viewtitle': {
|
|
248
|
+
readonly actions: "reset selected folder";
|
|
249
|
+
readonly reenter: true;
|
|
250
|
+
readonly target: "opened";
|
|
251
|
+
};
|
|
252
|
+
readonly 'select.folder': {
|
|
253
|
+
readonly actions: readonly ["keep dropdown open", "update selected folder"];
|
|
254
|
+
};
|
|
255
|
+
readonly 'select.view': {
|
|
256
|
+
readonly actions: readonly ["emit trigger.navigateTo"];
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
readonly search: {
|
|
261
|
+
readonly on: {
|
|
262
|
+
readonly 'breadcrumbs.click.folder': {
|
|
263
|
+
readonly actions: readonly ["reset search query", "update selected folder"];
|
|
264
|
+
readonly target: "opened";
|
|
265
|
+
};
|
|
266
|
+
readonly 'breadcrumbs.click.*': {
|
|
267
|
+
readonly actions: readonly ["reset search query", "reset selected folder"];
|
|
268
|
+
readonly target: "opened";
|
|
269
|
+
};
|
|
270
|
+
readonly 'select.view': {
|
|
271
|
+
readonly actions: readonly ["emit trigger.navigateTo"];
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
readonly closing: {
|
|
276
|
+
readonly on: {
|
|
277
|
+
readonly 'breadcrumbs.mouseEnter.*': {
|
|
278
|
+
readonly target: "decide";
|
|
279
|
+
};
|
|
280
|
+
readonly 'dropdown.mouseEnter': {
|
|
281
|
+
readonly target: "decide";
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
readonly after: {
|
|
285
|
+
readonly 'close timeout': {
|
|
286
|
+
readonly target: "#idle";
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
}>;
|
|
294
|
+
export interface NavigationPanelActorLogic extends ActorLogicFrom<typeof _actorLogic> {
|
|
295
|
+
}
|
|
296
|
+
export declare const navigationPanelActorLogic: NavigationPanelActorLogic;
|
|
297
|
+
export type NavigationPanelActorSnapshot = SnapshotFrom<NavigationPanelActorLogic>;
|
|
298
|
+
export interface NavigationPanelActorRef extends ActorRefFrom<NavigationPanelActorLogic> {
|
|
299
|
+
}
|
|
300
|
+
export {};
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { ViewId } from '@likec4/core/types';
|
|
2
|
+
import { isEmpty } from 'remeda';
|
|
3
|
+
import { setup, emit, assign, assertEvent, raise } from 'xstate';
|
|
4
|
+
|
|
5
|
+
const _actorLogic = setup({
|
|
6
|
+
types: {
|
|
7
|
+
context: {},
|
|
8
|
+
events: {},
|
|
9
|
+
tags: "active",
|
|
10
|
+
input: {},
|
|
11
|
+
emitted: {}
|
|
12
|
+
},
|
|
13
|
+
delays: {
|
|
14
|
+
"open timeout": 500,
|
|
15
|
+
"close timeout": 350
|
|
16
|
+
},
|
|
17
|
+
actions: {
|
|
18
|
+
"update activatedBy": assign({
|
|
19
|
+
activatedBy: ({ context, event }) => {
|
|
20
|
+
switch (true) {
|
|
21
|
+
case event.type.includes("click"):
|
|
22
|
+
return "click";
|
|
23
|
+
case event.type.includes("mouseEnter"):
|
|
24
|
+
return "hover";
|
|
25
|
+
default:
|
|
26
|
+
return context.activatedBy;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
"keep dropdown open": assign({
|
|
31
|
+
activatedBy: "click"
|
|
32
|
+
}),
|
|
33
|
+
"update selected folder": assign(({ event }) => {
|
|
34
|
+
assertEvent(event, ["breadcrumbs.click.folder", "select.folder"]);
|
|
35
|
+
return { selectedFolder: event.folderPath };
|
|
36
|
+
}),
|
|
37
|
+
"reset selected folder": assign({
|
|
38
|
+
selectedFolder: ({ context }) => context.viewModel.folder.path
|
|
39
|
+
}),
|
|
40
|
+
"update inputs": assign(({ context, event }) => {
|
|
41
|
+
assertEvent(event, "update.inputs");
|
|
42
|
+
const viewChanged = event.inputs.viewModel.id !== context.viewModel.id;
|
|
43
|
+
let selectedFolder = context.selectedFolder;
|
|
44
|
+
if (!event.inputs.viewModel.folder.path.startsWith(selectedFolder)) {
|
|
45
|
+
selectedFolder = event.inputs.viewModel.folder.path;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
viewModel: event.inputs.viewModel,
|
|
49
|
+
selectedFolder,
|
|
50
|
+
// allow dropdown to close on mouse leave if view changed
|
|
51
|
+
activatedBy: viewChanged ? "hover" : context.activatedBy
|
|
52
|
+
};
|
|
53
|
+
}),
|
|
54
|
+
"reset search query": assign({
|
|
55
|
+
searchQuery: ""
|
|
56
|
+
}),
|
|
57
|
+
"update search query": assign(({ event }) => {
|
|
58
|
+
assertEvent(event, "searchQuery.change");
|
|
59
|
+
return { searchQuery: event.value ?? "" };
|
|
60
|
+
}),
|
|
61
|
+
"emit trigger.navigateTo": emit(({ event }) => {
|
|
62
|
+
assertEvent(event, "select.view");
|
|
63
|
+
return {
|
|
64
|
+
type: "trigger.navigateTo",
|
|
65
|
+
viewId: ViewId(event.viewId)
|
|
66
|
+
};
|
|
67
|
+
})
|
|
68
|
+
},
|
|
69
|
+
guards: {
|
|
70
|
+
"was opened on hover": ({ context }) => context.activatedBy === "hover",
|
|
71
|
+
"has search query": ({ context }) => !isEmpty(context.searchQuery),
|
|
72
|
+
"search query is empty": ({ context }) => isEmpty(context.searchQuery)
|
|
73
|
+
}
|
|
74
|
+
}).createMachine({
|
|
75
|
+
id: "breadcrumbs",
|
|
76
|
+
context: ({ input }) => ({
|
|
77
|
+
...input,
|
|
78
|
+
breadcrumbs: [],
|
|
79
|
+
activatedBy: "hover",
|
|
80
|
+
selectedFolder: "",
|
|
81
|
+
searchQuery: "",
|
|
82
|
+
folderColumns: []
|
|
83
|
+
}),
|
|
84
|
+
initial: "idle",
|
|
85
|
+
entry: [
|
|
86
|
+
"update activatedBy",
|
|
87
|
+
"reset selected folder"
|
|
88
|
+
],
|
|
89
|
+
on: {
|
|
90
|
+
"update.inputs": {
|
|
91
|
+
actions: "update inputs"
|
|
92
|
+
},
|
|
93
|
+
"searchQuery.change": {
|
|
94
|
+
actions: [
|
|
95
|
+
"update search query",
|
|
96
|
+
raise({ type: "searchQuery.changed" })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
states: {
|
|
101
|
+
idle: {
|
|
102
|
+
id: "idle",
|
|
103
|
+
on: {
|
|
104
|
+
"breadcrumbs.mouseEnter.*": {
|
|
105
|
+
target: "pending",
|
|
106
|
+
actions: "update activatedBy"
|
|
107
|
+
},
|
|
108
|
+
"breadcrumbs.click.*": {
|
|
109
|
+
target: "active",
|
|
110
|
+
actions: "update activatedBy"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
// Breadcrumbs are hovered, but dropdown is not opened yet
|
|
115
|
+
pending: {
|
|
116
|
+
on: {
|
|
117
|
+
"breadcrumbs.mouseEnter.*": {
|
|
118
|
+
actions: "update activatedBy"
|
|
119
|
+
},
|
|
120
|
+
"breadcrumbs.mouseLeave.*": {
|
|
121
|
+
target: "idle"
|
|
122
|
+
},
|
|
123
|
+
"breadcrumbs.click.*": {
|
|
124
|
+
target: "active",
|
|
125
|
+
actions: "update activatedBy"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
after: {
|
|
129
|
+
"open timeout": {
|
|
130
|
+
target: "active"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
active: {
|
|
135
|
+
tags: ["active"],
|
|
136
|
+
initial: "decide",
|
|
137
|
+
on: {
|
|
138
|
+
"dropdown.dismiss": {
|
|
139
|
+
target: "#idle"
|
|
140
|
+
},
|
|
141
|
+
"breadcrumbs.mouseLeave": {
|
|
142
|
+
guard: "was opened on hover",
|
|
143
|
+
target: ".closing"
|
|
144
|
+
},
|
|
145
|
+
"dropdown.mouseLeave": {
|
|
146
|
+
guard: "was opened on hover",
|
|
147
|
+
target: ".closing"
|
|
148
|
+
},
|
|
149
|
+
"searchQuery.changed": {
|
|
150
|
+
target: ".decide"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
states: {
|
|
154
|
+
// Decide next state based on the search query
|
|
155
|
+
decide: {
|
|
156
|
+
always: [
|
|
157
|
+
{
|
|
158
|
+
guard: "has search query",
|
|
159
|
+
target: "search"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
target: "opened"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
opened: {
|
|
167
|
+
on: {
|
|
168
|
+
"searchQuery.changed": {
|
|
169
|
+
guard: "has search query",
|
|
170
|
+
actions: "keep dropdown open",
|
|
171
|
+
target: "search"
|
|
172
|
+
},
|
|
173
|
+
"breadcrumbs.click.folder": {
|
|
174
|
+
actions: "update selected folder",
|
|
175
|
+
target: "opened",
|
|
176
|
+
reenter: true
|
|
177
|
+
},
|
|
178
|
+
"breadcrumbs.click.viewtitle": {
|
|
179
|
+
actions: "reset selected folder",
|
|
180
|
+
reenter: true,
|
|
181
|
+
target: "opened"
|
|
182
|
+
},
|
|
183
|
+
"select.folder": {
|
|
184
|
+
actions: [
|
|
185
|
+
"keep dropdown open",
|
|
186
|
+
"update selected folder"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"select.view": {
|
|
190
|
+
actions: [
|
|
191
|
+
"emit trigger.navigateTo"
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
search: {
|
|
197
|
+
on: {
|
|
198
|
+
"breadcrumbs.click.folder": {
|
|
199
|
+
actions: [
|
|
200
|
+
"reset search query",
|
|
201
|
+
"update selected folder"
|
|
202
|
+
],
|
|
203
|
+
target: "opened"
|
|
204
|
+
},
|
|
205
|
+
"breadcrumbs.click.*": {
|
|
206
|
+
actions: [
|
|
207
|
+
"reset search query",
|
|
208
|
+
"reset selected folder"
|
|
209
|
+
],
|
|
210
|
+
target: "opened"
|
|
211
|
+
},
|
|
212
|
+
"select.view": {
|
|
213
|
+
actions: [
|
|
214
|
+
"emit trigger.navigateTo"
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
closing: {
|
|
220
|
+
on: {
|
|
221
|
+
"breadcrumbs.mouseEnter.*": {
|
|
222
|
+
target: "decide"
|
|
223
|
+
},
|
|
224
|
+
"dropdown.mouseEnter": {
|
|
225
|
+
target: "decide"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
after: {
|
|
229
|
+
"close timeout": {
|
|
230
|
+
target: "#idle"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
const navigationPanelActorLogic = _actorLogic;
|
|
239
|
+
|
|
240
|
+
export { navigationPanelActorLogic };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BurgerButton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { PanelActionIcon } from '../_common.js';
|
|
3
|
+
import { useNavigationActorRef } from '../hooks.js';
|
|
4
|
+
import { useDiagramEventHandlers } from '../../context/DiagramEventHandlers.js';
|
|
5
|
+
import IconMenu2 from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu2.js';
|
|
6
|
+
|
|
7
|
+
const BurgerButton = () => {
|
|
8
|
+
const actor = useNavigationActorRef();
|
|
9
|
+
const { onBurgerMenuClick } = useDiagramEventHandlers();
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
PanelActionIcon,
|
|
12
|
+
{
|
|
13
|
+
layout: "position",
|
|
14
|
+
onMouseEnter: () => {
|
|
15
|
+
actor.send({ type: "breadcrumbs.mouseEnter.root" });
|
|
16
|
+
},
|
|
17
|
+
onMouseLeave: () => {
|
|
18
|
+
actor.send({ type: "breadcrumbs.mouseLeave.root" });
|
|
19
|
+
},
|
|
20
|
+
onClick: (e) => {
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
if (onBurgerMenuClick) {
|
|
23
|
+
actor.send({ type: "breadcrumbs.mouseLeave.root" });
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
onBurgerMenuClick();
|
|
26
|
+
}, 100);
|
|
27
|
+
} else {
|
|
28
|
+
actor.send({ type: "breadcrumbs.click.root" });
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
children: /* @__PURE__ */ jsx(IconMenu2, { style: { width: "80%", height: "80%" } })
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { BurgerButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NavigationButtons: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { hstack } from '@likec4/styles/patterns';
|
|
3
|
+
import * as m from 'motion/react-m';
|
|
4
|
+
import { useDiagram, useDiagramContext } from '../../hooks/useDiagram.js';
|
|
5
|
+
import { PanelActionIcon } from '../_common.js';
|
|
6
|
+
import IconArrowLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js';
|
|
7
|
+
import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
|
|
8
|
+
|
|
9
|
+
const NavigationButtons = () => {
|
|
10
|
+
const diagram = useDiagram();
|
|
11
|
+
const {
|
|
12
|
+
hasStepBack,
|
|
13
|
+
hasStepForward
|
|
14
|
+
} = useDiagramContext((s) => ({
|
|
15
|
+
hasStepBack: s.navigationHistory.currentIndex > 0,
|
|
16
|
+
hasStepForward: s.navigationHistory.currentIndex < s.navigationHistory.history.length - 1
|
|
17
|
+
}));
|
|
18
|
+
return /* @__PURE__ */ jsxs(m.div, { layout: "position", className: hstack({ gap: 1, mdDown: { display: "none" } }), children: [
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
PanelActionIcon,
|
|
21
|
+
{
|
|
22
|
+
disabled: !hasStepBack,
|
|
23
|
+
onClick: (e) => {
|
|
24
|
+
e.stopPropagation();
|
|
25
|
+
diagram.navigate("back");
|
|
26
|
+
},
|
|
27
|
+
children: /* @__PURE__ */ jsx(IconArrowLeft, { size: 14 })
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ jsx(
|
|
31
|
+
PanelActionIcon,
|
|
32
|
+
{
|
|
33
|
+
disabled: !hasStepForward,
|
|
34
|
+
onClick: (e) => {
|
|
35
|
+
e.stopPropagation();
|
|
36
|
+
diagram.navigate("forward");
|
|
37
|
+
},
|
|
38
|
+
children: /* @__PURE__ */ jsx(IconArrowRight, { size: 14 })
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] });
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { NavigationButtons };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const OpenSource: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useDiagramEventHandlers } from '../../context/DiagramEventHandlers.js';
|
|
3
|
+
import { useEnabledFeatures } from '../../context/DiagramFeatures.js';
|
|
4
|
+
import { useCurrentViewId } from '../../hooks/useCurrentViewId.js';
|
|
5
|
+
import { Tooltip, PanelActionIcon } from '../_common.js';
|
|
6
|
+
import IconFileSymlink from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
|
|
7
|
+
|
|
8
|
+
const OpenSource = () => {
|
|
9
|
+
const viewId = useCurrentViewId();
|
|
10
|
+
const { enableVscode } = useEnabledFeatures();
|
|
11
|
+
const { onOpenSource } = useDiagramEventHandlers();
|
|
12
|
+
if (!enableVscode) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ jsx(Tooltip, { label: "Open View Source", children: /* @__PURE__ */ jsx(
|
|
16
|
+
PanelActionIcon,
|
|
17
|
+
{
|
|
18
|
+
onClick: (e) => {
|
|
19
|
+
e.stopPropagation();
|
|
20
|
+
onOpenSource?.({ view: viewId });
|
|
21
|
+
},
|
|
22
|
+
children: /* @__PURE__ */ jsx(IconFileSymlink, { size: 12, stroke: 1.5, style: { width: "65%" } })
|
|
23
|
+
}
|
|
24
|
+
) });
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { OpenSource };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SearchControl(): import("react/jsx-runtime").JSX.Element;
|