@likec4/diagram 1.34.2 → 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
|
@@ -10,12 +10,12 @@ import { findDiagramNode, findDiagramEdge } from '../../../state/utils.js';
|
|
|
10
10
|
import { menuDropdown, endpoint, title, menuItemRelationship } from './RelationshipsDropdownMenu.css.js';
|
|
11
11
|
import { useLikeC4Model } from '../../../likec4model/useLikeC4Model.js';
|
|
12
12
|
import { useMantinePortalProps } from '../../../hooks/useMantinePortalProps.js';
|
|
13
|
-
import IconInfoCircle from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
13
|
+
import IconInfoCircle from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
|
|
14
14
|
import { useEnabledFeatures, IfEnabled } from '../../../context/DiagramFeatures.js';
|
|
15
15
|
import { useDiagramEventHandlers } from '../../../context/DiagramEventHandlers.js';
|
|
16
|
-
import IconArrowRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
17
|
-
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
18
|
-
import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
16
|
+
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';
|
|
17
|
+
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
18
|
+
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';
|
|
19
19
|
|
|
20
20
|
const stopPropagation = (e) => e.stopPropagation();
|
|
21
21
|
const Tooltip = Tooltip$1.withProps({
|
|
@@ -3,8 +3,8 @@ import { hasAtLeast } from '@likec4/core';
|
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
|
|
5
5
|
import { useDiagram } from '../../../hooks/useDiagram.js';
|
|
6
|
-
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
7
|
-
import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
6
|
+
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
7
|
+
import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
|
|
8
8
|
import { ElementActionButtons } from '../../../base/primitives/element/ElementActionButtons.js';
|
|
9
9
|
|
|
10
10
|
const ElementActions = ({
|
|
@@ -6,8 +6,8 @@ import { stopPropagation } from '../../../../utils/xyflow.js';
|
|
|
6
6
|
import { useHandlers, GoToSourceButton, BrowseRelationshipsButton } from './_shared.js';
|
|
7
7
|
import { ColorButton } from './ColorButton.js';
|
|
8
8
|
import { Toolbar } from './Toolbar.js';
|
|
9
|
-
import IconSelector from '../../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
10
|
-
import IconCheck from '../../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
9
|
+
import IconSelector from '../../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
|
|
10
|
+
import IconCheck from '../../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
|
|
11
11
|
|
|
12
12
|
function ElementToolbar(props) {
|
|
13
13
|
const { enableVscode, enableRelationshipBrowser } = useEnabledFeatures();
|
|
@@ -6,8 +6,8 @@ import { useState } from 'react';
|
|
|
6
6
|
import { keys } from 'remeda';
|
|
7
7
|
import { useDiagram } from '../../../../hooks/useDiagram.js';
|
|
8
8
|
import { useDiagramEventHandlers } from '../../../../context/DiagramEventHandlers.js';
|
|
9
|
-
import IconFileSymlink from '../../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
10
|
-
import IconTransform from '../../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
9
|
+
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';
|
|
10
|
+
import IconTransform from '../../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
|
|
11
11
|
|
|
12
12
|
const {
|
|
13
13
|
primary,
|
|
@@ -7,7 +7,7 @@ import { useDiagram, useDiagramContext } from '../../../hooks/useDiagram.js';
|
|
|
7
7
|
import { Tooltip, ActionIcon } from './_shared.js';
|
|
8
8
|
import { autolayoutIndicator, autolayoutButton, spacingSliderBody, spacingSliderThumb } from './styles.css.js';
|
|
9
9
|
import { useDiagramEventHandlers } from '../../../context/DiagramEventHandlers.js';
|
|
10
|
-
import IconLayoutDashboard from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
10
|
+
import IconLayoutDashboard from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js';
|
|
11
11
|
|
|
12
12
|
const selector = (state) => ({
|
|
13
13
|
viewId: state.view.id,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
|
-
import {
|
|
3
|
+
import { hstack } from '@likec4/styles/patterns';
|
|
4
|
+
import { ActionIconGroup, Stack, Group, Box } from '@mantine/core';
|
|
4
5
|
import { m, LayoutGroup } from 'motion/react';
|
|
5
6
|
import { memo } from 'react';
|
|
6
7
|
import { SearchControl } from '../../../components/SearchControl.js';
|
|
7
8
|
import { useControlsCustomLayout } from '../../../context/ControlsCustomLayout.js';
|
|
8
|
-
import { useDiagramContext, useDiagram
|
|
9
|
+
import { useDiagramContext, useDiagram } from '../../../hooks/useDiagram.js';
|
|
9
10
|
import { Tooltip, ActionIcon } from './_shared.js';
|
|
10
11
|
import { ChangeAutoLayoutButton } from './ChangeAutoLayoutButton.js';
|
|
11
12
|
import { LayoutDriftNotification } from './LayoutDriftNotification.js';
|
|
@@ -16,9 +17,9 @@ import { ToggleReadonly } from './ToggleReadonly.js';
|
|
|
16
17
|
import { useDiagramEventHandlers } from '../../../context/DiagramEventHandlers.js';
|
|
17
18
|
import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
|
|
18
19
|
import { useMantinePortalProps } from '../../../hooks/useMantinePortalProps.js';
|
|
19
|
-
import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
20
|
-
import IconFocusCentered from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
21
|
-
import IconMenu2 from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
20
|
+
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';
|
|
21
|
+
import IconFocusCentered from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js';
|
|
22
|
+
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';
|
|
22
23
|
import { stopPropagation } from '../../../utils/xyflow.js';
|
|
23
24
|
|
|
24
25
|
const ControlsDefaultLayout = ({
|
|
@@ -27,9 +28,8 @@ const ControlsDefaultLayout = ({
|
|
|
27
28
|
search,
|
|
28
29
|
actionsGroup
|
|
29
30
|
}) => /* @__PURE__ */ jsxs(
|
|
30
|
-
|
|
31
|
+
m.div,
|
|
31
32
|
{
|
|
32
|
-
component: m.div,
|
|
33
33
|
initial: {
|
|
34
34
|
opacity: 0.05,
|
|
35
35
|
translateX: -30,
|
|
@@ -45,13 +45,15 @@ const ControlsDefaultLayout = ({
|
|
|
45
45
|
translateX: -30,
|
|
46
46
|
translateY: -10
|
|
47
47
|
},
|
|
48
|
-
align: "flex-start",
|
|
49
48
|
className: cx(
|
|
49
|
+
hstack({
|
|
50
|
+
gap: "sm",
|
|
51
|
+
alignItems: "flex-start"
|
|
52
|
+
}),
|
|
50
53
|
"react-flow__panel",
|
|
51
54
|
panel,
|
|
52
55
|
"likec4-top-left-panel"
|
|
53
56
|
),
|
|
54
|
-
gap: "xs",
|
|
55
57
|
onClick: stopPropagation,
|
|
56
58
|
children: [
|
|
57
59
|
/* @__PURE__ */ jsxs(Stack, { align: "flex-start", gap: "xs", children: [
|
|
@@ -116,7 +118,6 @@ const Controls = memo(() => {
|
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
),
|
|
119
|
-
syncInProgressBadge: /* @__PURE__ */ jsx(SyncLayoutBadge, {}),
|
|
120
121
|
actionsGroup: /* @__PURE__ */ jsxs(ActionIconGroup, { className: actionIconGroup, orientation: "vertical", children: [
|
|
121
122
|
enableVscode && /* @__PURE__ */ jsx(Tooltip, { label: "Open source", ...portalProps, children: /* @__PURE__ */ jsx(
|
|
122
123
|
ActionIcon,
|
|
@@ -149,10 +150,5 @@ const Controls = memo(() => {
|
|
|
149
150
|
}
|
|
150
151
|
) });
|
|
151
152
|
});
|
|
152
|
-
const SyncLayoutBadge = () => {
|
|
153
|
-
const isPending = useDiagramSyncLayoutState((s) => s.hasTag("pending"));
|
|
154
|
-
if (!isPending) return null;
|
|
155
|
-
return /* @__PURE__ */ jsx(Badge, { color: "pink", radius: "xs", size: "xs", variant: "light", leftSection: /* @__PURE__ */ jsx(Loader, { color: "orange", size: 8 }), children: "Pending..." });
|
|
156
|
-
};
|
|
157
153
|
|
|
158
154
|
export { Controls };
|
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { HoverCard, HoverCardTarget, HoverCardDropdown, Notification, Text, Code } from '@mantine/core';
|
|
3
3
|
import { css } from '@likec4/styles/css';
|
|
4
4
|
import { ActionIcon } from './_shared.js';
|
|
5
|
-
import IconAlertTriangle from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
5
|
+
import IconAlertTriangle from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
|
|
6
6
|
|
|
7
7
|
const LayoutDriftNotification = (props) => /* @__PURE__ */ jsxs(
|
|
8
8
|
HoverCard,
|
|
@@ -2,15 +2,15 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Popover, PopoverTarget, PopoverDropdown, Group, ActionIconGroup } from '@mantine/core';
|
|
3
3
|
import { useDiagram } from '../../../hooks/useDiagram.js';
|
|
4
4
|
import { Tooltip, ActionIcon } from './_shared.js';
|
|
5
|
-
import IconLayoutCollage from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
6
|
-
import IconLayoutBoardSplit from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
7
|
-
import IconLayoutAlignLeft from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
8
|
-
import IconLayoutAlignCenter from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
9
|
-
import IconLayoutAlignRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
10
|
-
import IconLayoutAlignTop from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
11
|
-
import IconLayoutAlignMiddle from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
12
|
-
import IconLayoutAlignBottom from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
13
|
-
import IconRouteOff from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
5
|
+
import IconLayoutCollage from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js';
|
|
6
|
+
import IconLayoutBoardSplit from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js';
|
|
7
|
+
import IconLayoutAlignLeft from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js';
|
|
8
|
+
import IconLayoutAlignCenter from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js';
|
|
9
|
+
import IconLayoutAlignRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js';
|
|
10
|
+
import IconLayoutAlignTop from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js';
|
|
11
|
+
import IconLayoutAlignMiddle from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js';
|
|
12
|
+
import IconLayoutAlignBottom from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js';
|
|
13
|
+
import IconRouteOff from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js';
|
|
14
14
|
|
|
15
15
|
const Action = ({
|
|
16
16
|
label,
|
|
@@ -2,8 +2,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { AnimatePresence, m } from 'motion/react';
|
|
3
3
|
import { useDiagram, useDiagramContext } from '../../../hooks/useDiagram.js';
|
|
4
4
|
import { ActionIcon } from './_shared.js';
|
|
5
|
-
import IconChevronLeft from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
6
|
-
import IconChevronRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
5
|
+
import IconChevronLeft from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js';
|
|
6
|
+
import IconChevronRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
7
7
|
|
|
8
8
|
const NavigationButtons = () => {
|
|
9
9
|
const diagram = useDiagram();
|
|
@@ -18,6 +18,7 @@ const NavigationButtons = () => {
|
|
|
18
18
|
hasStepBack && /* @__PURE__ */ jsx(
|
|
19
19
|
ActionIcon,
|
|
20
20
|
{
|
|
21
|
+
variant: "subtle",
|
|
21
22
|
component: m.button,
|
|
22
23
|
onClick: (e) => {
|
|
23
24
|
e.stopPropagation();
|
|
@@ -37,6 +38,7 @@ const NavigationButtons = () => {
|
|
|
37
38
|
hasStepForward && /* @__PURE__ */ jsx(
|
|
38
39
|
ActionIcon,
|
|
39
40
|
{
|
|
41
|
+
variant: "subtle",
|
|
40
42
|
component: m.button,
|
|
41
43
|
layout: true,
|
|
42
44
|
initial: { opacity: 0.05, transform: "translateX(10px)" },
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useDiagramContext, useDiagram } from '../../../hooks/useDiagram.js';
|
|
3
3
|
import { Tooltip, ActionIcon } from './_shared.js';
|
|
4
|
-
import IconLock from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
5
|
-
import IconLockOpen2 from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
4
|
+
import IconLock from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js';
|
|
5
|
+
import IconLockOpen2 from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js';
|
|
6
6
|
|
|
7
7
|
const selector = (state) => ({
|
|
8
8
|
visible: state.features.enableReadOnly !== true,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { RichText } from '@likec4/core/types';
|
|
3
2
|
import { cx } from '@likec4/styles/css';
|
|
4
3
|
import { Card, CardSection, Button, Group, Text, Spoiler, Stack } from '@mantine/core';
|
|
5
4
|
import { useLocalStorage } from '@mantine/hooks';
|
|
@@ -7,24 +6,27 @@ import { AnimatePresence, m } from 'motion/react';
|
|
|
7
6
|
import { Link } from '../../../components/Link.js';
|
|
8
7
|
import { useDiagramContext } from '../../../hooks/useDiagram.js';
|
|
9
8
|
import { card, title, description } from './DiagramTitlePanel.css.js';
|
|
10
|
-
import
|
|
9
|
+
import { useCurrentViewModel } from '../../../likec4model/useCurrentViewModel.js';
|
|
10
|
+
import IconMenu from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu.js';
|
|
11
11
|
import { MarkdownBlock } from '../../../base/primitives/MarkdownBlock.js';
|
|
12
12
|
|
|
13
13
|
function selector(context) {
|
|
14
14
|
return {
|
|
15
|
-
id: context.view.id,
|
|
16
|
-
title: context.view.title ??
|
|
17
|
-
description: RichText.from(context.view.description),
|
|
18
|
-
links: context.view.links,
|
|
15
|
+
// id: context.view.id,
|
|
16
|
+
// title: context.view.title ?? 'untitled',
|
|
17
|
+
// description: RichText.from(context.view.description),
|
|
18
|
+
// links: context.view.links,
|
|
19
19
|
isNotActiveWalkthrough: context.activeWalkthrough === null
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
function DiagramTitlePanel() {
|
|
23
|
-
const
|
|
23
|
+
const view = useCurrentViewModel();
|
|
24
|
+
const { isNotActiveWalkthrough } = useDiagramContext(selector);
|
|
24
25
|
const [isCollapsed, setCollapsed] = useLocalStorage({
|
|
25
26
|
key: "diagram-title-webview-collapsed",
|
|
26
27
|
defaultValue: false
|
|
27
28
|
});
|
|
29
|
+
const title$1 = view.title ?? "untitled";
|
|
28
30
|
const toggle = () => setCollapsed((v) => !v);
|
|
29
31
|
return /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: isNotActiveWalkthrough && /* @__PURE__ */ jsx(
|
|
30
32
|
m.div,
|
|
@@ -111,12 +113,12 @@ function DiagramTitlePanel() {
|
|
|
111
113
|
"id:",
|
|
112
114
|
" "
|
|
113
115
|
] }),
|
|
114
|
-
id
|
|
116
|
+
view.id
|
|
115
117
|
]
|
|
116
118
|
}
|
|
117
119
|
)
|
|
118
120
|
] }),
|
|
119
|
-
description
|
|
121
|
+
view.description.nonEmpty && /* @__PURE__ */ jsx(
|
|
120
122
|
Spoiler,
|
|
121
123
|
{
|
|
122
124
|
maxHeight: 60,
|
|
@@ -127,12 +129,12 @@ function DiagramTitlePanel() {
|
|
|
127
129
|
{
|
|
128
130
|
className: description,
|
|
129
131
|
textScale: 0.9,
|
|
130
|
-
value: description
|
|
132
|
+
value: view.description
|
|
131
133
|
}
|
|
132
134
|
)
|
|
133
135
|
}
|
|
134
136
|
),
|
|
135
|
-
description
|
|
137
|
+
view.description.isEmpty && /* @__PURE__ */ jsx(
|
|
136
138
|
Text,
|
|
137
139
|
{
|
|
138
140
|
component: "div",
|
|
@@ -141,14 +143,14 @@ function DiagramTitlePanel() {
|
|
|
141
143
|
children: "no description"
|
|
142
144
|
}
|
|
143
145
|
),
|
|
144
|
-
links && /* @__PURE__ */ jsx(
|
|
146
|
+
view.links.length > 0 && /* @__PURE__ */ jsx(
|
|
145
147
|
Stack,
|
|
146
148
|
{
|
|
147
149
|
mt: "xs",
|
|
148
150
|
gap: 4,
|
|
149
151
|
justify: "stretch",
|
|
150
152
|
align: "stretch",
|
|
151
|
-
children: links.map((link) => /* @__PURE__ */ jsx(Link, { value: link }, link.url))
|
|
153
|
+
children: view.links.map((link) => /* @__PURE__ */ jsx(Link, { value: link }, link.url))
|
|
152
154
|
}
|
|
153
155
|
)
|
|
154
156
|
] })
|
|
@@ -9,9 +9,9 @@ import { useDiagramContext, useDiagram } 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.
|
|
13
|
-
import IconHelpCircle from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
14
|
-
import IconArrowDownRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
12
|
+
import IconAlertTriangle from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
|
|
13
|
+
import IconHelpCircle from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js';
|
|
14
|
+
import IconArrowDownRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js';
|
|
15
15
|
import { ElementShape } from '../../../base/primitives/element/ElementShape.js';
|
|
16
16
|
|
|
17
17
|
const ElementNotation = ({ value }) => {
|
|
@@ -6,10 +6,10 @@ import { isTruthy, isNonNull } from 'remeda';
|
|
|
6
6
|
import { useDiagramContext, useDiagram } from '../../../hooks/useDiagram.js';
|
|
7
7
|
import { parallelStateFrame, btn, buttons, container } from './DynamicViewWalkthrough.css.js';
|
|
8
8
|
import { useXYStore } from '../../../hooks/useXYFlow.js';
|
|
9
|
-
import IconPlayerPlayFilled from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
10
|
-
import IconPlayerSkipBackFilled from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
11
|
-
import IconPlayerStopFilled from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
12
|
-
import IconPlayerSkipForwardFilled from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
9
|
+
import IconPlayerPlayFilled from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js';
|
|
10
|
+
import IconPlayerSkipBackFilled from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js';
|
|
11
|
+
import IconPlayerStopFilled from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js';
|
|
12
|
+
import IconPlayerSkipForwardFilled from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js';
|
|
13
13
|
|
|
14
14
|
function DynamicViewWalkthrough() {
|
|
15
15
|
const isMobile = useXYStore((s) => s.width <= 750);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { LikeC4Model } from '@likec4/core/model';
|
|
1
|
+
import { LikeC4Model, LikeC4ViewModel } from '@likec4/core/model';
|
|
2
|
+
import { aux, DiagramView } from '@likec4/core/types';
|
|
2
3
|
import { Context } from 'react';
|
|
3
4
|
export declare const LikeC4ModelContext: Context<LikeC4Model<any> | null>;
|
|
5
|
+
export type CurrentViewModel = LikeC4ViewModel<aux.UnknownLayouted, DiagramView<aux.UnknownLayouted>>;
|
|
6
|
+
export declare const CurrentViewModelContext: Context<CurrentViewModel | null>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { CurrentViewModelContext } from './LikeC4ModelContext.js';
|
|
3
|
+
|
|
4
|
+
function useCurrentViewModel() {
|
|
5
|
+
const vm = useContext(CurrentViewModelContext);
|
|
6
|
+
if (!vm) {
|
|
7
|
+
throw new Error("No LikeC4ViewModel in context found");
|
|
8
|
+
}
|
|
9
|
+
return vm;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { useCurrentViewModel };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { aux, LikeC4Model, LikeC4ViewModel } from '@likec4/core/model';
|
|
2
2
|
import { TagSpecification, ElementSpecification, RelationshipSpecification, CustomColorDefinitions } from '@likec4/core';
|
|
3
|
-
export declare function useLikeC4Model<A extends aux.Any = aux.
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function useLikeC4Model<A extends aux.Any = aux.Unknown>(type: 'computed'): LikeC4Model.Computed<A>;
|
|
6
|
-
export declare function useLikeC4Model<A extends aux.Any = aux.Unknown>(type: 'layouted' | 'computed' | undefined): LikeC4Model<A>;
|
|
7
|
-
export declare function useLikeC4ViewModel<A extends aux.Any = aux.Unknown>(viewId: aux.LooseViewId<A>): LikeC4ViewModel<aux.toLayouted<A>> | null;
|
|
3
|
+
export declare function useLikeC4Model<A extends aux.Any = aux.UnknownLayouted>(): LikeC4Model<A>;
|
|
4
|
+
export declare function useLikeC4ViewModel<A extends aux.Any = aux.UnknownLayouted>(viewId: aux.ViewId<A>): LikeC4ViewModel<A>;
|
|
8
5
|
export declare function useLikeC4Specification(): {
|
|
9
6
|
tags: {
|
|
10
7
|
[x: string]: TagSpecification;
|
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { deepEqual } from 'fast-equals';
|
|
2
|
+
import { useContext, useState, useEffect } from 'react';
|
|
3
3
|
import { LikeC4ModelContext } from './LikeC4ModelContext.js';
|
|
4
4
|
|
|
5
|
-
function useLikeC4Model(
|
|
5
|
+
function useLikeC4Model() {
|
|
6
6
|
const model = useContext(LikeC4ModelContext);
|
|
7
7
|
if (!model) {
|
|
8
8
|
throw new Error("LikeC4Model not found. Make sure you have LikeC4ModelProvider.");
|
|
9
9
|
}
|
|
10
|
-
if (isString(type) && model.stage !== type) {
|
|
11
|
-
throw new Error(`Invalid LikeC4ModelContext, expected "${type}" but got "${model.stage}" in context`);
|
|
12
|
-
}
|
|
13
10
|
return model;
|
|
14
11
|
}
|
|
15
12
|
function useLikeC4ViewModel(viewId) {
|
|
16
|
-
const model = useLikeC4Model(
|
|
17
|
-
|
|
18
|
-
if (!view) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
if (!view.isDiagram()) {
|
|
22
|
-
throw new Error(`View "${viewId}" is not layouted`);
|
|
23
|
-
}
|
|
24
|
-
return view;
|
|
13
|
+
const model = useLikeC4Model();
|
|
14
|
+
return model.view(viewId);
|
|
25
15
|
}
|
|
26
16
|
function useLikeC4Specification() {
|
|
27
17
|
const model = useLikeC4Model();
|
|
28
|
-
|
|
18
|
+
const [specification, setSpecification] = useState(model.$data.specification);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
setSpecification((current) => deepEqual(current, model.$data.specification) ? current : model.$data.specification);
|
|
21
|
+
}, [model]);
|
|
22
|
+
return specification;
|
|
29
23
|
}
|
|
30
24
|
|
|
31
25
|
export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { VStack } from '@likec4/styles/jsx';
|
|
3
|
+
import { hstack } from '@likec4/styles/patterns';
|
|
4
|
+
import { Portal, Popover, PopoverTarget } from '@mantine/core';
|
|
5
|
+
import { useUpdateEffect } from '@react-hookz/web';
|
|
6
|
+
import { useActorRef, useSelector } from '@xstate/react';
|
|
7
|
+
import { LayoutGroup, AnimatePresence } from 'motion/react';
|
|
8
|
+
import * as m from 'motion/react-m';
|
|
9
|
+
import { memo, useEffect } from 'react';
|
|
10
|
+
import { useDiagramActorRef } from '../hooks/safeContext.js';
|
|
11
|
+
import { useDiagramContext } from '../hooks/useDiagram.js';
|
|
12
|
+
import { useMantinePortalProps } from '../hooks/useMantinePortalProps.js';
|
|
13
|
+
import { useCurrentViewModel } from '../likec4model/useCurrentViewModel.js';
|
|
14
|
+
import { navigationPanelActorLogic } from './actor.js';
|
|
15
|
+
import { NavigationPanelActorContextProvider } from './hooks.js';
|
|
16
|
+
import { NavigationPanelControls } from './NavigationPanelControls.js';
|
|
17
|
+
import { NavigationPanelDropdown } from './NavigationPanelDropdown.js';
|
|
18
|
+
import { EditorPanel } from './editorpanel/EditorPanel.js';
|
|
19
|
+
import { ActiveWalkthroughControls } from './walkthrough/ActiveWalkthroughControls.js';
|
|
20
|
+
|
|
21
|
+
const NavigationPanel = memo(() => {
|
|
22
|
+
const diagramActor = useDiagramActorRef();
|
|
23
|
+
const viewModel = useCurrentViewModel();
|
|
24
|
+
const { portalProps } = useMantinePortalProps();
|
|
25
|
+
const actorRef = useActorRef(
|
|
26
|
+
navigationPanelActorLogic,
|
|
27
|
+
{
|
|
28
|
+
input: {
|
|
29
|
+
viewModel
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const subscription = actorRef.on("trigger.navigateTo", (event) => {
|
|
35
|
+
if (diagramActor.getSnapshot().context.view.id !== event.viewId) {
|
|
36
|
+
diagramActor.send({ type: "navigate.to", viewId: event.viewId });
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return () => subscription.unsubscribe();
|
|
40
|
+
}, [actorRef, diagramActor]);
|
|
41
|
+
useUpdateEffect(() => {
|
|
42
|
+
actorRef.send({ type: "update.inputs", inputs: { viewModel } });
|
|
43
|
+
}, [viewModel]);
|
|
44
|
+
return /* @__PURE__ */ jsx(Portal, { ...portalProps, children: /* @__PURE__ */ jsx(
|
|
45
|
+
VStack,
|
|
46
|
+
{
|
|
47
|
+
className: "react-flow__panel",
|
|
48
|
+
css: {
|
|
49
|
+
gap: "sm",
|
|
50
|
+
margin: "sm",
|
|
51
|
+
alignItems: "flex-start",
|
|
52
|
+
pointerEvents: "none",
|
|
53
|
+
top: 0,
|
|
54
|
+
left: 0,
|
|
55
|
+
maxWidth: [
|
|
56
|
+
"calc(100vw - 2 * {spacing.sm})",
|
|
57
|
+
"calc(100cqw - 2 * {spacing.sm})"
|
|
58
|
+
],
|
|
59
|
+
width: "max-content",
|
|
60
|
+
overflow: "hidden",
|
|
61
|
+
smDown: {
|
|
62
|
+
margin: 0,
|
|
63
|
+
width: "100%",
|
|
64
|
+
gap: "2xs",
|
|
65
|
+
maxWidth: [
|
|
66
|
+
"calc(100vw)",
|
|
67
|
+
"calc(100cqw)"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
children: /* @__PURE__ */ jsxs(NavigationPanelActorContextProvider, { value: actorRef, children: [
|
|
72
|
+
/* @__PURE__ */ jsx(NavigationPanelImpl, { actor: actorRef }),
|
|
73
|
+
/* @__PURE__ */ jsx(EditorPanel, {})
|
|
74
|
+
] })
|
|
75
|
+
}
|
|
76
|
+
) });
|
|
77
|
+
});
|
|
78
|
+
NavigationPanel.displayName = "NavigationPanel";
|
|
79
|
+
const NavigationPanelImpl = ({ actor }) => {
|
|
80
|
+
const opened = useSelector(actor, (s) => s.hasTag("active"));
|
|
81
|
+
const portalProps = useMantinePortalProps();
|
|
82
|
+
return /* @__PURE__ */ jsxs(
|
|
83
|
+
Popover,
|
|
84
|
+
{
|
|
85
|
+
offset: {
|
|
86
|
+
mainAxis: 4
|
|
87
|
+
},
|
|
88
|
+
middlewares: { flip: false },
|
|
89
|
+
opened,
|
|
90
|
+
shadow: "md",
|
|
91
|
+
position: "bottom-start",
|
|
92
|
+
trapFocus: true,
|
|
93
|
+
...portalProps,
|
|
94
|
+
clickOutsideEvents: ["pointerdown", "mousedown", "click"],
|
|
95
|
+
onDismiss: () => actor.send({ type: "dropdown.dismiss" }),
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsx(NavigationPanelPopoverTarget, { actor }),
|
|
98
|
+
/* @__PURE__ */ jsx(NavigationPanelDropdown, {})
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
const NavigationPanelPopoverTarget = ({ actor }) => {
|
|
104
|
+
const isActiveWalkthrough = useDiagramContext((c) => c.activeWalkthrough !== null);
|
|
105
|
+
return /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(
|
|
106
|
+
m.div,
|
|
107
|
+
{
|
|
108
|
+
layout: true,
|
|
109
|
+
className: hstack({
|
|
110
|
+
layerStyle: "likec4.panel",
|
|
111
|
+
position: "relative",
|
|
112
|
+
gap: "xs",
|
|
113
|
+
cursor: "pointer",
|
|
114
|
+
paddingRight: "md",
|
|
115
|
+
pointerEvents: "all",
|
|
116
|
+
width: "100%"
|
|
117
|
+
}),
|
|
118
|
+
onMouseLeave: () => actor.send({ type: "breadcrumbs.mouseLeave" }),
|
|
119
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: isActiveWalkthrough ? /* @__PURE__ */ jsx(ActiveWalkthroughControls, {}) : /* @__PURE__ */ jsx(NavigationPanelControls, {}) })
|
|
120
|
+
}
|
|
121
|
+
) }) });
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export { NavigationPanel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NavigationPanelControls: () => import("react/jsx-runtime").JSX.Element;
|