@likec4/diagram 1.34.2 → 1.36.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-7MPUJFHj.js} +1102 -1172
- package/bundle/custom.js +59 -55
- package/bundle/index.js +8918 -5681
- package/dist/LikeC4Diagram.js +6 -6
- package/dist/LikeC4Diagram.props.d.ts +53 -7
- package/dist/LikeC4ModelProvider.d.ts +4 -4
- package/dist/LikeC4ProjectsProvider.d.ts +17 -0
- package/dist/LikeC4ProjectsProvider.js +22 -0
- package/dist/LikeC4Styles.d.ts +1 -0
- package/dist/LikeC4Styles.js +94 -0
- package/dist/StaticLikeC4Diagram.d.ts +3 -3
- package/dist/base/BaseXYFlow.d.ts +2 -2
- package/dist/base/BaseXYFlow.js +26 -29
- package/dist/base/primitives/MarkdownBlock.d.ts +7 -1
- package/dist/base/primitives/MarkdownBlock.js +1 -1
- package/dist/base/primitives/compound/CompoundActionButton.js +3 -3
- package/dist/base/primitives/compound/CompoundDetailsButton.js +3 -3
- package/dist/base/primitives/compound/CompoundNodeContainer.css.js +4 -4
- package/dist/base/primitives/compound/CompoundNodeContainer.js +1 -4
- package/dist/base/primitives/compound/CompoundTitle.js +9 -8
- package/dist/base/primitives/compound/actionbtns.css.js +6 -6
- package/dist/base/primitives/edge/EdgeActionButton.js +3 -3
- package/dist/base/primitives/edge/EdgeContainer.js +4 -7
- package/dist/base/primitives/edge/EdgeLabel.css.d.ts +0 -22
- package/dist/base/primitives/edge/EdgeLabel.css.js +6 -84
- package/dist/base/primitives/edge/EdgeLabel.js +16 -6
- package/dist/base/primitives/edge/EdgeLabelContainer.js +1 -6
- package/dist/base/primitives/edge/EdgeMarkers.js +3 -3
- package/dist/base/primitives/edge/edge.css.d.ts +0 -2
- package/dist/base/primitives/edge/edge.css.js +1 -55
- package/dist/base/primitives/element/ElementActionButtons.js +2 -2
- package/dist/base/primitives/element/ElementDetailsButton.js +9 -8
- package/dist/base/primitives/element/ElementNodeContainer.css.js +4 -4
- package/dist/base/primitives/element/ElementNodeContainer.d.ts +3 -3
- package/dist/base/primitives/element/ElementNodeContainer.js +1 -4
- package/dist/base/primitives/element/ElementShape.css.js +11 -11
- package/dist/base/primitives/element/ElementTags.d.ts +1 -0
- package/dist/base/primitives/element/ElementTags.js +17 -14
- package/dist/base/primitives/element/ElementTitle.js +9 -9
- package/dist/bundle/LikeC4View.d.ts +1 -1
- package/dist/bundle/LikeC4View.js +10 -4
- package/dist/bundle/LikeC4View.props.d.ts +9 -6
- package/dist/bundle/ReactLikeC4.d.ts +1 -1
- package/dist/bundle/ViewNotFound.js +1 -1
- package/dist/bundle/custom.js +1 -0
- package/dist/bundle/index.d.ts +2 -1
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/styles.css.js +1 -1
- package/dist/components/ErrorFallback.d.ts +2 -1
- package/dist/components/ErrorFallback.js +16 -3
- package/dist/components/GithubIcon.d.ts +2 -0
- package/dist/components/GithubIcon.js +17 -0
- package/dist/components/Link.d.ts +4 -3
- package/dist/components/Link.js +86 -89
- package/dist/components/NavigationLink.d.ts +6 -0
- package/dist/components/NavigationLink.js +25 -0
- package/dist/components/SearchControl.css.js +6 -5
- package/dist/components/SearchControl.js +1 -1
- package/dist/context/ControlsCustomLayout.d.ts +0 -1
- package/dist/context/DiagramEventHandlers.d.ts +6 -6
- package/dist/context/DiagramEventHandlers.js +4 -7
- 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/globals.css.js +3 -0
- package/dist/hooks/useDiagram.d.ts +1 -2
- package/dist/hooks/useDiagram.js +1 -5
- package/dist/hooks/useXYFlow.d.ts +10 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/likec4diagram/DiagramUI.js +8 -4
- package/dist/likec4diagram/DiagramXYFlow.js +1 -1
- package/dist/likec4diagram/custom/edges/NotePopover.css.js +2 -2
- package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +2 -2
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +1 -1
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.js +7 -7
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +7 -7
- package/dist/likec4diagram/custom/edges/edges.css.js +4 -4
- package/dist/likec4diagram/custom/index.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.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/controls/styles.css.js +5 -5
- package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +15 -13
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +11 -11
- package/dist/likec4diagram/ui/notation/NotationPanel.js +5 -8
- package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.css.js +10 -10
- 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/LikeC4ProjectsContext.d.ts +7 -0
- package/dist/likec4model/LikeC4ProjectsContext.js +5 -0
- package/dist/likec4model/index.d.ts +2 -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/likec4model/useLikeC4Project.d.ts +22 -0
- package/dist/likec4model/useLikeC4Project.js +23 -0
- package/dist/navigationpanel/NavigationPanel.d.ts +2 -0
- package/dist/navigationpanel/NavigationPanel.js +122 -0
- package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -0
- package/dist/navigationpanel/NavigationPanelControls.js +147 -0
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -0
- package/dist/navigationpanel/NavigationPanelDropdown.js +452 -0
- package/dist/navigationpanel/_common.d.ts +15 -0
- package/dist/navigationpanel/_common.js +72 -0
- package/dist/navigationpanel/actor.d.ts +296 -0
- package/dist/navigationpanel/actor.js +239 -0
- package/dist/navigationpanel/controls/BurgerButton.d.ts +1 -0
- package/dist/navigationpanel/controls/BurgerButton.js +34 -0
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -0
- package/dist/navigationpanel/controls/NavigationButtons.js +57 -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 +70 -0
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -0
- package/dist/navigationpanel/controls/ToggleReadonly.js +69 -0
- package/dist/navigationpanel/controls/ViewDetailsCard.d.ts +2 -0
- package/dist/navigationpanel/controls/ViewDetailsCard.js +232 -0
- package/dist/navigationpanel/controls/index.d.ts +6 -0
- package/dist/navigationpanel/dropdown/ProjectsMenu.d.ts +2 -0
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +75 -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 +173 -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 +30 -0
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +2 -0
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +162 -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/IconChevronDown.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/IconLink.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.css.js +18 -17
- package/dist/overlays/element-details/ElementDetailsCard.js +12 -17
- package/dist/overlays/element-details/TabPanelDeployments.css.js +5 -4
- package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
- package/dist/overlays/element-details/TabPanelRelationships.css.js +7 -7
- package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/overlay/Overlay.css.d.ts +3 -3
- package/dist/overlays/overlay/Overlay.css.js +8 -7
- package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
- package/dist/overlays/relationship-details/SelectEdge.css.js +8 -8
- 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.css.js +1 -1
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
- package/dist/search/Search.js +6 -6
- package/dist/search/components/ElementsColumn.css.js +5 -5
- package/dist/search/components/ElementsColumn.js +1 -1
- package/dist/search/components/PickView.js +1 -1
- package/dist/search/components/SearchByTags.js +4 -3
- package/dist/search/components/SearchInput.js +1 -1
- package/dist/search/components/ViewsColum.js +3 -3
- package/dist/search/components/ViewsColumn.css.js +1 -1
- package/dist/search/components/_shared.css.js +3 -3
- package/dist/search/components/styles.css.js +5 -5
- package/dist/state/DiagramActorProvider.d.ts +2 -2
- package/dist/state/DiagramActorProvider.js +82 -25
- package/dist/state/diagram-machine.d.ts +31 -249
- package/dist/state/diagram-machine.js +16 -16
- package/dist/styles-min.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css2.js +1 -1
- package/package.json +20 -17
- package/panda.buildinfo.json +368 -404
- package/src/LikeC4Diagram.props.ts +53 -5
- package/src/LikeC4Diagram.tsx +2 -2
- package/src/LikeC4ModelProvider.tsx +6 -6
- package/src/LikeC4ProjectsProvider.tsx +41 -0
- package/src/LikeC4Styles.tsx +107 -0
- package/src/StaticLikeC4Diagram.tsx +3 -3
- package/src/base/BaseXYFlow.tsx +28 -33
- package/src/base/primitives/MarkdownBlock.tsx +11 -3
- package/src/base/primitives/compound/CompoundActionButton.tsx +2 -2
- package/src/base/primitives/compound/CompoundDetailsButton.tsx +2 -2
- package/src/base/primitives/compound/CompoundNodeContainer.css.ts +4 -13
- package/src/base/primitives/compound/CompoundNodeContainer.tsx +0 -3
- package/src/base/primitives/compound/CompoundTitle.tsx +8 -8
- package/src/base/primitives/compound/actionbtns.css.ts +6 -6
- package/src/base/primitives/edge/EdgeActionButton.tsx +2 -2
- package/src/base/primitives/edge/EdgeContainer.tsx +3 -6
- package/src/base/primitives/edge/EdgeLabel.css.ts +4 -83
- package/src/base/primitives/edge/EdgeLabel.tsx +16 -10
- package/src/base/primitives/edge/EdgeLabelContainer.tsx +1 -6
- package/src/base/primitives/edge/EdgeMarkers.tsx +3 -3
- package/src/base/primitives/edge/edge.css.ts +0 -60
- package/src/base/primitives/element/ElementActionButtons.tsx +2 -2
- package/src/base/primitives/element/ElementDetailsButton.tsx +7 -7
- package/src/base/primitives/element/ElementNodeContainer.css.ts +4 -4
- package/src/base/primitives/element/ElementNodeContainer.tsx +2 -5
- package/src/base/primitives/element/ElementShape.css.ts +11 -11
- package/src/base/primitives/element/ElementTags.tsx +17 -14
- package/src/base/primitives/element/ElementTitle.tsx +4 -4
- package/src/bundle/LikeC4View.props.ts +15 -6
- package/src/bundle/LikeC4View.tsx +12 -5
- package/src/bundle/ReactLikeC4.tsx +1 -2
- package/src/bundle/ViewNotFound.tsx +1 -1
- package/src/bundle/index.ts +2 -1
- package/src/bundle/styles.css.ts +1 -1
- package/src/components/ErrorFallback.tsx +17 -2
- package/src/components/GithubIcon.tsx +16 -0
- package/src/components/Link.tsx +102 -113
- package/src/components/NavigationLink.tsx +32 -0
- package/src/components/SearchControl.css.ts +5 -5
- package/src/context/ControlsCustomLayout.ts +0 -1
- package/src/context/DiagramEventHandlers.tsx +12 -12
- package/src/context/DiagramFeatures.tsx +6 -1
- package/src/custom/customNodes.tsx +10 -2
- package/src/custom/hooks.ts +3 -0
- package/src/globals.css +71 -0
- package/src/hooks/useDiagram.ts +0 -8
- package/src/index.ts +5 -0
- package/src/likec4diagram/DiagramUI.tsx +9 -3
- package/src/likec4diagram/DiagramXYFlow.tsx +1 -1
- package/src/likec4diagram/custom/edges/NotePopover.css.ts +2 -2
- package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +1 -1
- package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.ts +7 -7
- package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +3 -3
- package/src/likec4diagram/custom/edges/edges.css.ts +4 -4
- package/src/likec4diagram/custom/nodes/toolbar/CompoundToolbar.tsx +2 -2
- package/src/likec4diagram/ui/controls/Controls.tsx +8 -18
- package/src/likec4diagram/ui/controls/NavigationButtons.tsx +2 -0
- package/src/likec4diagram/ui/controls/styles.css.ts +5 -5
- package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +14 -11
- package/src/likec4diagram/ui/notation/NotationPanel.css.ts +11 -11
- package/src/likec4diagram/ui/notation/NotationPanel.tsx +1 -4
- package/src/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.css.ts +10 -10
- package/src/likec4model/LikeC4ModelContext.ts +5 -1
- package/src/likec4model/LikeC4ProjectsContext.ts +9 -0
- package/src/likec4model/index.ts +11 -0
- package/src/likec4model/useCurrentViewModel.ts +10 -0
- package/src/likec4model/useLikeC4Model.ts +17 -27
- package/src/likec4model/useLikeC4Project.ts +61 -0
- package/src/navigationpanel/NavigationPanel.tsx +135 -0
- package/src/navigationpanel/NavigationPanelControls.tsx +133 -0
- package/src/navigationpanel/NavigationPanelDropdown.tsx +539 -0
- package/src/navigationpanel/_common.tsx +84 -0
- package/src/navigationpanel/actor.ts +320 -0
- package/src/navigationpanel/controls/BurgerButton.tsx +30 -0
- package/src/navigationpanel/controls/NavigationButtons.tsx +44 -0
- package/src/navigationpanel/controls/OpenSource.tsx +28 -0
- package/src/navigationpanel/controls/SearchControl.tsx +66 -0
- package/src/navigationpanel/controls/ToggleReadonly.tsx +66 -0
- package/src/navigationpanel/controls/ViewDetailsCard.tsx +244 -0
- package/src/navigationpanel/controls/index.ts +6 -0
- package/src/navigationpanel/dropdown/ProjectsMenu.tsx +74 -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 +148 -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 +28 -0
- package/src/navigationpanel/walkthrough/ActiveWalkthroughControls.tsx +165 -0
- package/src/navigationpanel/walkthrough/index.tsx +1 -0
- package/src/overlays/element-details/ElementDetailsCard.css.ts +17 -17
- package/src/overlays/element-details/ElementDetailsCard.tsx +8 -13
- package/src/overlays/element-details/TabPanelDeployments.css.ts +4 -4
- package/src/overlays/element-details/TabPanelRelationships.css.ts +7 -7
- package/src/overlays/overlay/Overlay.css.ts +7 -7
- package/src/overlays/relationship-details/SelectEdge.css.ts +8 -8
- package/src/overlays/relationships-browser/SelectElement.css.ts +1 -1
- package/src/search/Search.tsx +6 -6
- package/src/search/components/ElementsColumn.css.ts +5 -5
- package/src/search/components/SearchByTags.tsx +2 -2
- package/src/search/components/ViewsColum.tsx +1 -1
- package/src/search/components/ViewsColumn.css.ts +1 -1
- package/src/search/components/_shared.css.ts +3 -3
- package/src/search/components/styles.css.ts +5 -5
- package/src/state/DiagramActorProvider.tsx +104 -31
- package/src/state/diagram-machine.ts +24 -18
- package/dist/LikeC4CustomColors.d.ts +0 -2
- package/dist/LikeC4CustomColors.js +0 -45
- 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/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +0 -45
- package/src/LikeC4CustomColors.tsx +0 -85
- package/src/base/primitives/element/ElementTitle.css.ts +0 -206
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const globalsCss = ".likec4-root{overflow:hidden;position:relative;padding:0;margin:0;width:100%;height:100%;border:0px solid transparent;container-name:likec4-root;container-type:size}.likec4-root .react-flow:is(.not-initialized){opacity:0}:where(.likec4-root .mantine-ActionIcon-icon) .tabler-icon{width:75%;height:75%}.likec4-root :where(.react-flow__node,.react-flow__edge,.likec4-edge-label-container):has([data-likec4-dimmed]){opacity:.25}.likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__node,.react-flow__edge,.likec4-edge-label-container):has([data-likec4-dimmed]){filter:grayscale(85%) blur(3px)}.likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__node,.react-flow__edge,.likec4-edge-label-container):has([data-likec4-dimmed=true]){transition-property:opacity,filter;transition-timing-function:cubic-bezier(.5,0,.2,1);transition-duration:.6s}[data-mantine-color-scheme=dark] .likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__edges,.react-flow__edgelabel-renderer)>svg{mix-blend-mode:plus-lighter}[data-mantine-color-scheme=light] .likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__edges,.react-flow__edgelabel-renderer)>svg{mix-blend-mode:screen}.likec4-root :where(.likec4-edge-container,.likec4-edge-label-container){--xy-edge-stroke-width: 3;--xy-edge-stroke: var(--likec4-palette-relation-stroke);--xy-edge-stroke-selected: var(--likec4-palette-relation-stroke-selected);--xy-edge-label-color: var(--likec4-palette-relation-label);--xy-edge-label-background-color: var(--likec4-palette-relation-label-bg)}.likec4-root :where(.likec4-edge-container,.likec4-edge-label-container):is([data-likec4-hovered=true],[data-edge-active=true]){--xy-edge-stroke-width: 4;--xy-edge-stroke: var(--likec4-palette-relation-stroke-selected)}[data-mantine-color-scheme=dark] .likec4-root :where(.likec4-edge-container,.likec4-edge-label-container){--xy-edge-label-background-color: color-mix(in srgb, var(--likec4-palette-relation-label-bg) 50%, transparent)}[data-mantine-color-scheme=light] .likec4-root :where(.likec4-edge-container,.likec4-edge-label-container){--xy-edge-label-color: color-mix(in srgb, var(--likec4-palette-relation-label), rgba(255 255 255 / .85) 40%);--xy-edge-label-background-color: color-mix(in srgb, var(--likec4-palette-relation-label-bg) 60%, transparent)}";
|
|
2
|
+
|
|
3
|
+
export { globalsCss as default };
|
|
@@ -5,7 +5,7 @@ import { FeatureName } from '../context/DiagramFeatures';
|
|
|
5
5
|
import { OpenSourceParams } from '../LikeC4Diagram.props';
|
|
6
6
|
import { Types } from '../likec4diagram/types';
|
|
7
7
|
import { AlignmentMode } from '../state/aligners';
|
|
8
|
-
import { DiagramActorEvent, DiagramActorRef, DiagramActorSnapshot, DiagramContext
|
|
8
|
+
import { DiagramActorEvent, DiagramActorRef, DiagramActorSnapshot, DiagramContext } from '../state/types';
|
|
9
9
|
import { useDiagramActorRef } from './safeContext';
|
|
10
10
|
export { useDiagramActorRef };
|
|
11
11
|
export interface DiagramApi {
|
|
@@ -95,7 +95,6 @@ export interface DiagramApi {
|
|
|
95
95
|
*/
|
|
96
96
|
export declare function useDiagram(): DiagramApi;
|
|
97
97
|
export declare function useDiagramActorSnapshot<T = unknown>(selector: (state: DiagramActorSnapshot) => T, compare?: (a: NoInfer<T>, b: NoInfer<T>) => boolean): T;
|
|
98
|
-
export declare function useDiagramSyncLayoutState<T = unknown>(selector: (state: SyncLayoutActorSnapshot) => T, compare?: (a: NoInfer<T>, b: NoInfer<T>) => boolean): T;
|
|
99
98
|
/**
|
|
100
99
|
* Read diagram context
|
|
101
100
|
*/
|
package/dist/hooks/useDiagram.js
CHANGED
|
@@ -122,14 +122,10 @@ function useDiagramActorSnapshot(selector, compare = shallowEqual) {
|
|
|
122
122
|
const actorRef = useDiagramActorRef();
|
|
123
123
|
return useSelector(actorRef, useCallbackRef(selector), compare);
|
|
124
124
|
}
|
|
125
|
-
function useDiagramSyncLayoutState(selector, compare = shallowEqual) {
|
|
126
|
-
const syncLayoutActorRef = useDiagramActorSnapshot((s) => s.context.syncLayoutActorRef);
|
|
127
|
-
return useSelector(syncLayoutActorRef, useCallbackRef(selector), compare);
|
|
128
|
-
}
|
|
129
125
|
function useDiagramContext(selector, compare = shallowEqual, deps) {
|
|
130
126
|
const actorRef = useDiagramActorRef();
|
|
131
127
|
const select = useCallback((s) => selector(s.context), deps ?? []);
|
|
132
128
|
return useSelector(actorRef, select, compare);
|
|
133
129
|
}
|
|
134
130
|
|
|
135
|
-
export { useDiagram, useDiagramActorRef, useDiagramActorSnapshot, useDiagramContext
|
|
131
|
+
export { useDiagram, useDiagramActorRef, useDiagramActorSnapshot, useDiagramContext };
|
|
@@ -3,7 +3,7 @@ import { Types } from '../likec4diagram/types';
|
|
|
3
3
|
import { EdgeMarkerType, HandleType, XYPosition } from '@xyflow/system';
|
|
4
4
|
import { ReactNode, CSSProperties } from 'react';
|
|
5
5
|
import { Dimmed } from '../base/types.Base';
|
|
6
|
-
import { EdgeId, NonEmptyArray, Point, Color, RelationshipArrowType, RelationshipLineType, BBox, ViewId } from '@likec4/core';
|
|
6
|
+
import { EdgeId, NonEmptyArray, Point, Color, RelationshipArrowType, RelationshipLineType, BBox, ViewId, MarkdownOrString } from '@likec4/core';
|
|
7
7
|
export declare const useXYFlow: () => ReactFlowInstance<Types.Node, {
|
|
8
8
|
id: string;
|
|
9
9
|
source: string;
|
|
@@ -46,7 +46,7 @@ export declare const useXYFlow: () => ReactFlowInstance<Types.Node, {
|
|
|
46
46
|
tail: RelationshipArrowType | undefined;
|
|
47
47
|
labelBBox: BBox | null | undefined;
|
|
48
48
|
navigateTo: ViewId<string> | null | undefined;
|
|
49
|
-
notes:
|
|
49
|
+
notes: MarkdownOrString | undefined;
|
|
50
50
|
labelXY: XYPosition | null;
|
|
51
51
|
controlPoints: XYPosition[] | undefined | null;
|
|
52
52
|
};
|
|
@@ -96,7 +96,7 @@ export declare const useXYStoreApi: () => {
|
|
|
96
96
|
tail: RelationshipArrowType | undefined;
|
|
97
97
|
labelBBox: BBox | null | undefined;
|
|
98
98
|
navigateTo: ViewId<string> | null | undefined;
|
|
99
|
-
notes:
|
|
99
|
+
notes: MarkdownOrString | undefined;
|
|
100
100
|
labelXY: XYPosition | null;
|
|
101
101
|
controlPoints: XYPosition[] | undefined | null;
|
|
102
102
|
};
|
|
@@ -143,7 +143,7 @@ export declare const useXYStoreApi: () => {
|
|
|
143
143
|
tail: RelationshipArrowType | undefined;
|
|
144
144
|
labelBBox: BBox | null | undefined;
|
|
145
145
|
navigateTo: ViewId<string> | null | undefined;
|
|
146
|
-
notes:
|
|
146
|
+
notes: MarkdownOrString | undefined;
|
|
147
147
|
labelXY: XYPosition | null;
|
|
148
148
|
controlPoints: XYPosition[] | undefined | null;
|
|
149
149
|
};
|
|
@@ -189,7 +189,7 @@ export declare const useXYStoreApi: () => {
|
|
|
189
189
|
tail: RelationshipArrowType | undefined;
|
|
190
190
|
labelBBox: BBox | null | undefined;
|
|
191
191
|
navigateTo: ViewId<string> | null | undefined;
|
|
192
|
-
notes:
|
|
192
|
+
notes: MarkdownOrString | undefined;
|
|
193
193
|
labelXY: XYPosition | null;
|
|
194
194
|
controlPoints: XYPosition[] | undefined | null;
|
|
195
195
|
};
|
|
@@ -235,7 +235,7 @@ export declare const useXYStoreApi: () => {
|
|
|
235
235
|
tail: RelationshipArrowType | undefined;
|
|
236
236
|
labelBBox: BBox | null | undefined;
|
|
237
237
|
navigateTo: ViewId<string> | null | undefined;
|
|
238
|
-
notes:
|
|
238
|
+
notes: MarkdownOrString | undefined;
|
|
239
239
|
labelXY: XYPosition | null;
|
|
240
240
|
controlPoints: XYPosition[] | undefined | null;
|
|
241
241
|
};
|
|
@@ -281,7 +281,7 @@ export declare const useXYStoreApi: () => {
|
|
|
281
281
|
tail: RelationshipArrowType | undefined;
|
|
282
282
|
labelBBox: BBox | null | undefined;
|
|
283
283
|
navigateTo: ViewId<string> | null | undefined;
|
|
284
|
-
notes:
|
|
284
|
+
notes: MarkdownOrString | undefined;
|
|
285
285
|
labelXY: XYPosition | null;
|
|
286
286
|
controlPoints: XYPosition[] | undefined | null;
|
|
287
287
|
};
|
|
@@ -327,7 +327,7 @@ export declare const useXYStoreApi: () => {
|
|
|
327
327
|
tail: RelationshipArrowType | undefined;
|
|
328
328
|
labelBBox: BBox | null | undefined;
|
|
329
329
|
navigateTo: ViewId<string> | null | undefined;
|
|
330
|
-
notes:
|
|
330
|
+
notes: MarkdownOrString | undefined;
|
|
331
331
|
labelXY: XYPosition | null;
|
|
332
332
|
controlPoints: XYPosition[] | undefined | null;
|
|
333
333
|
};
|
|
@@ -374,7 +374,7 @@ export declare const useXYStoreApi: () => {
|
|
|
374
374
|
tail: RelationshipArrowType | undefined;
|
|
375
375
|
labelBBox: BBox | null | undefined;
|
|
376
376
|
navigateTo: ViewId<string> | null | undefined;
|
|
377
|
-
notes:
|
|
377
|
+
notes: MarkdownOrString | undefined;
|
|
378
378
|
labelXY: XYPosition | null;
|
|
379
379
|
controlPoints: XYPosition[] | undefined | null;
|
|
380
380
|
};
|
|
@@ -420,7 +420,7 @@ export declare const useXYStoreApi: () => {
|
|
|
420
420
|
tail: RelationshipArrowType | undefined;
|
|
421
421
|
labelBBox: BBox | null | undefined;
|
|
422
422
|
navigateTo: ViewId<string> | null | undefined;
|
|
423
|
-
notes:
|
|
423
|
+
notes: MarkdownOrString | undefined;
|
|
424
424
|
labelXY: XYPosition | null;
|
|
425
425
|
controlPoints: XYPosition[] | undefined | null;
|
|
426
426
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { IconRendererProvider } from './context/IconRenderer';
|
|
|
4
4
|
export { LikeC4Diagram, type LikeC4DiagramProps, } from './LikeC4Diagram';
|
|
5
5
|
export { Overlay, type OverlayProps, } from './overlays/overlay/Overlay';
|
|
6
6
|
export { LikeC4ModelProvider, type LikeC4ModelProviderProps, } from './LikeC4ModelProvider';
|
|
7
|
+
export { LikeC4ProjectsProvider, type LikeC4ProjectsProviderProps, } from './LikeC4ProjectsProvider';
|
|
7
8
|
export * from './custom/hooks';
|
|
8
9
|
export type { ChangeEvent, CustomNodes, DiagramNodeWithNavigate, ElementIconRenderer, LikeC4ColorScheme, LikeC4DiagramEventHandlers, LikeC4DiagramProperties, OnCanvasClick, OnChange, OnEdgeClick, OnNavigateTo, OnNodeClick, OpenSourceParams, PaddingUnit, PaddingWithUnit, WhereOperator, } from './LikeC4Diagram.props';
|
|
9
10
|
export { StaticLikeC4Diagram, type StaticLikeC4DiagramProps, } from './StaticLikeC4Diagram';
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { IconRendererProvider } from './context/IconRenderer.js';
|
|
|
3
3
|
export { LikeC4Diagram } from './LikeC4Diagram.js';
|
|
4
4
|
export { Overlay } from './overlays/overlay/Overlay.js';
|
|
5
5
|
export { LikeC4ModelProvider } from './LikeC4ModelProvider.js';
|
|
6
|
+
export { LikeC4ProjectsProvider } from './LikeC4ProjectsProvider.js';
|
|
6
7
|
export { StaticLikeC4Diagram } from './StaticLikeC4Diagram.js';
|
|
7
8
|
export { useDiagramEventHandlers } from './context/DiagramEventHandlers.js';
|
|
8
9
|
export { useEnabledFeatures } from './context/DiagramFeatures.js';
|
|
@@ -10,6 +11,7 @@ export { useCurrentViewId } from './hooks/useCurrentViewId.js';
|
|
|
10
11
|
export { useDiagram, useDiagramContext } from './hooks/useDiagram.js';
|
|
11
12
|
export { useDiagramActorRef } from './hooks/safeContext.js';
|
|
12
13
|
export { useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi } from './hooks/useXYFlow.js';
|
|
14
|
+
export { useCurrentViewModel } from './likec4model/useCurrentViewModel.js';
|
|
13
15
|
export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from './likec4model/useLikeC4Model.js';
|
|
14
16
|
export { useMantinePortalProps } from './hooks/useMantinePortalProps.js';
|
|
15
17
|
export { useSetState } from './hooks/useSetState.js';
|
|
@@ -5,13 +5,15 @@ import { useSearchActorRef } from '../hooks/useSearchActor.js';
|
|
|
5
5
|
import { Overlays } from '../overlays/Overlays.js';
|
|
6
6
|
import { Search } from '../search/Search.js';
|
|
7
7
|
import { useEnabledFeatures } from '../context/DiagramFeatures.js';
|
|
8
|
+
import { NavigationPanel } from '../navigationpanel/NavigationPanel.js';
|
|
8
9
|
import { Controls } from './ui/controls/Controls.js';
|
|
9
|
-
import { DiagramTitlePanel } from './ui/diagram-title/DiagramTitlePanel.js';
|
|
10
10
|
import { NotationPanel } from './ui/notation/NotationPanel.js';
|
|
11
|
+
import { DiagramTitlePanel } from './ui/diagram-title/DiagramTitlePanel.js';
|
|
11
12
|
import { DynamicViewWalkthrough } from './ui/walkthrough/DynamicViewWalkthrough.js';
|
|
12
13
|
|
|
13
14
|
const DiagramUI = memo(() => {
|
|
14
15
|
const {
|
|
16
|
+
enableControls,
|
|
15
17
|
enableViewTitle,
|
|
16
18
|
enableNotations,
|
|
17
19
|
enableDynamicViewWalkthrough,
|
|
@@ -20,11 +22,13 @@ const DiagramUI = memo(() => {
|
|
|
20
22
|
const overlaysActorRef = useOverlaysActorRef();
|
|
21
23
|
const searchActorRef = useSearchActorRef();
|
|
22
24
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
-
/* @__PURE__ */ jsx(Controls, {}),
|
|
25
|
+
enableControls === "next" ? /* @__PURE__ */ jsx(NavigationPanel, {}) : /* @__PURE__ */ jsx(Controls, {}),
|
|
24
26
|
overlaysActorRef && /* @__PURE__ */ jsx(Overlays, { overlaysActorRef }),
|
|
25
|
-
enableViewTitle && /* @__PURE__ */ jsx(DiagramTitlePanel, {}),
|
|
26
27
|
enableNotations && /* @__PURE__ */ jsx(NotationPanel, {}),
|
|
27
|
-
|
|
28
|
+
enableControls !== "next" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
|
+
enableViewTitle && /* @__PURE__ */ jsx(DiagramTitlePanel, {}),
|
|
30
|
+
enableDynamicViewWalkthrough && /* @__PURE__ */ jsx(DynamicViewWalkthrough, {})
|
|
31
|
+
] }),
|
|
28
32
|
enableSearch && searchActorRef && /* @__PURE__ */ jsx(Search, { searchActorRef })
|
|
29
33
|
] });
|
|
30
34
|
});
|
|
@@ -30,7 +30,7 @@ const selectXYProps = (ctx) => ({
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
const equalsXYProps = (a, b) => a.initialized === b.initialized && a.pannable === b.pannable && a.zoomable === b.zoomable && a.
|
|
33
|
+
const equalsXYProps = (a, b) => a.initialized === b.initialized && a.pannable === b.pannable && a.zoomable === b.zoomable && a.enableFitView === b.enableFitView && a.enableReadOnly === b.enableReadOnly && shallowEqual(a.fitViewPadding, b.fitViewPadding) && shallowEqual(a.nodes, b.nodes) && shallowEqual(a.edges, b.edges) && shallowEqual(a.viewport ?? null, b.viewport ?? null);
|
|
34
34
|
function LikeC4DiagramXYFlow({
|
|
35
35
|
background = "dots",
|
|
36
36
|
nodesDraggable = false,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EdgeId, NonEmptyArray, Point, Color, RelationshipArrowType, RelationshipLineType, BBox, ViewId } from '@likec4/core';
|
|
1
|
+
import { EdgeId, NonEmptyArray, Point, Color, RelationshipArrowType, RelationshipLineType, BBox, ViewId, MarkdownOrString } from '@likec4/core';
|
|
2
2
|
import { XYPosition } from '@xyflow/react';
|
|
3
3
|
import { FunctionComponent, CSSProperties, ReactNode } from 'react';
|
|
4
4
|
import { Position } from '@xyflow/system';
|
|
@@ -45,7 +45,7 @@ export declare const RelationshipEdge: FunctionComponent<{
|
|
|
45
45
|
tail: RelationshipArrowType | undefined;
|
|
46
46
|
labelBBox: BBox | null | undefined;
|
|
47
47
|
navigateTo: ViewId<string> | null | undefined;
|
|
48
|
-
notes:
|
|
48
|
+
notes: MarkdownOrString | undefined;
|
|
49
49
|
labelXY: XYPosition | null;
|
|
50
50
|
controlPoints: XYPosition[] | undefined | null;
|
|
51
51
|
};
|
|
@@ -257,7 +257,7 @@ const RelationshipEdge = customEdge((props) => {
|
|
|
257
257
|
if (!isControlPointDragging && !isPanning) {
|
|
258
258
|
const notes = props.data.notes;
|
|
259
259
|
if (notes && activeWalkthroughStep === props.id) {
|
|
260
|
-
edgeLabel = /* @__PURE__ */ jsx(NotePopover, { notes, children: edgeLabel });
|
|
260
|
+
edgeLabel = /* @__PURE__ */ jsx(NotePopover, { notes: notes.txt ?? notes.md, children: edgeLabel });
|
|
261
261
|
} else if (enableRelationshipDetails) {
|
|
262
262
|
edgeLabel = /* @__PURE__ */ jsx(
|
|
263
263
|
RelationshipsDropdownMenu,
|
|
@@ -6,24 +6,24 @@ const menuDropdown = css({
|
|
|
6
6
|
maxWidth: "min(90vw, 500px)"
|
|
7
7
|
});
|
|
8
8
|
const menuItemRelationship = css({
|
|
9
|
-
gap:
|
|
9
|
+
gap: "1"
|
|
10
10
|
});
|
|
11
11
|
const endpoint = css({
|
|
12
12
|
display: "block",
|
|
13
13
|
fontSize: "xxs",
|
|
14
14
|
fontWeight: 500,
|
|
15
15
|
whiteSpace: "nowrap",
|
|
16
|
-
padding: "2px 4px",
|
|
17
|
-
borderRadius:
|
|
18
|
-
background: `likec4
|
|
16
|
+
padding: "[2px 4px]",
|
|
17
|
+
borderRadius: "[2px]",
|
|
18
|
+
background: `var(--likec4-palette-fill)/30`,
|
|
19
19
|
lineHeight: "[1.11]",
|
|
20
20
|
mixBlendMode: "hard-light",
|
|
21
21
|
color: {
|
|
22
|
-
_light: `[color-mix(in srgb,
|
|
23
|
-
_dark: "likec4
|
|
22
|
+
_light: `[color-mix(in srgb, var(--likec4-palette-stroke), {colors.likec4.mixColor} 60%)]`,
|
|
23
|
+
_dark: "var(--likec4-palette-loContrast)"
|
|
24
24
|
}
|
|
25
25
|
// _dark: {
|
|
26
|
-
// background: `likec4
|
|
26
|
+
// background: `var(--likec4-palette-fill)/60`,
|
|
27
27
|
// },
|
|
28
28
|
});
|
|
29
29
|
const title = css({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { nameFromFqn } from '@likec4/core';
|
|
3
|
-
import { cx
|
|
3
|
+
import { cx } from '@likec4/styles/css';
|
|
4
4
|
import { Menu, MenuTarget, MenuDropdown, MenuLabel, MenuDivider, Box, ActionIcon, MenuItem, Stack, Group, Text, TooltipGroup, Space, Tooltip as Tooltip$1 } from '@mantine/core';
|
|
5
5
|
import { memo, useCallback, Fragment as Fragment$1, forwardRef } from 'react';
|
|
6
6
|
import { pipe, map, filter, isTruthy, partition } from 'remeda';
|
|
@@ -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({
|
|
@@ -155,9 +155,9 @@ const Relationship = forwardRef(({
|
|
|
155
155
|
const links = r.links;
|
|
156
156
|
return /* @__PURE__ */ jsxs(Stack, { ref, className: cx(menuItemRelationship, className), ...props, children: [
|
|
157
157
|
/* @__PURE__ */ jsxs(Group, { gap: 4, children: [
|
|
158
|
-
/* @__PURE__ */ jsx(Text, { component: "div",
|
|
158
|
+
/* @__PURE__ */ jsx(Text, { component: "div", "data-likec4-color": sourceNode.color, className: endpoint, children: sourceId }),
|
|
159
159
|
/* @__PURE__ */ jsx(IconArrowRight, { stroke: 2.5, size: "11px", opacity: 0.65 }),
|
|
160
|
-
/* @__PURE__ */ jsx(Text, { component: "div",
|
|
160
|
+
/* @__PURE__ */ jsx(Text, { component: "div", "data-likec4-color": targetNode.color, className: endpoint, children: targetId }),
|
|
161
161
|
(navigateTo || !!onOpenSource) && /* @__PURE__ */ jsxs(TooltipGroup, { openDelay: 100, children: [
|
|
162
162
|
/* @__PURE__ */ jsx(Space, { w: "xs" }),
|
|
163
163
|
navigateTo && /* @__PURE__ */ jsx(Tooltip, { label: "Open dynamic view", children: /* @__PURE__ */ jsx(
|
|
@@ -5,13 +5,13 @@ const controlPointsContainer = css({
|
|
|
5
5
|
overflow: "visible",
|
|
6
6
|
position: "absolute",
|
|
7
7
|
pointerEvents: "none",
|
|
8
|
-
top: 0,
|
|
9
|
-
left: 0,
|
|
8
|
+
top: "0",
|
|
9
|
+
left: "0",
|
|
10
10
|
mixBlendMode: "normal"
|
|
11
11
|
});
|
|
12
12
|
const controlPoint = css({
|
|
13
|
-
fill: `likec4
|
|
14
|
-
stroke: `likec4
|
|
13
|
+
fill: `var(--likec4-palette-relation-stroke)`,
|
|
14
|
+
stroke: `var(--likec4-palette-relation-stroke)`,
|
|
15
15
|
fillOpacity: 0.75,
|
|
16
16
|
strokeWidth: 1,
|
|
17
17
|
cursor: "grab",
|
|
@@ -3,7 +3,7 @@ import { MemoExoticComponent, FunctionComponent, CSSProperties, ReactNode } from
|
|
|
3
3
|
import { NodeProps } from '../../base';
|
|
4
4
|
import { Position, XYPosition } from '@xyflow/system';
|
|
5
5
|
import { EdgeData, Dimmed } from '../../base/types.Base';
|
|
6
|
-
import { EdgeId, NonEmptyArray, Point, Color, RelationshipArrowType, RelationshipLineType, BBox, ViewId } from '@likec4/core';
|
|
6
|
+
import { EdgeId, NonEmptyArray, Point, Color, RelationshipArrowType, RelationshipLineType, BBox, ViewId, MarkdownOrString } from '@likec4/core';
|
|
7
7
|
export declare const BuiltinNodes: {
|
|
8
8
|
element: MemoExoticComponent<(props: NodeProps<Types.ElementNodeData, "element">) => import("react/jsx-runtime").JSX.Element>;
|
|
9
9
|
deployment: MemoExoticComponent<(props: NodeProps<Types.DeploymentElementNodeData, "deployment">) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -54,7 +54,7 @@ export declare const edgeTypes: {
|
|
|
54
54
|
tail: RelationshipArrowType | undefined;
|
|
55
55
|
labelBBox: BBox | null | undefined;
|
|
56
56
|
navigateTo: ViewId<string> | null | undefined;
|
|
57
|
-
notes:
|
|
57
|
+
notes: MarkdownOrString | undefined;
|
|
58
58
|
labelXY: XYPosition | null;
|
|
59
59
|
controlPoints: XYPosition[] | undefined | null;
|
|
60
60
|
};
|
|
@@ -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,15 +1,15 @@
|
|
|
1
1
|
import { css } from '@likec4/styles/css';
|
|
2
2
|
|
|
3
3
|
const navigationButtons = css({
|
|
4
|
-
gap: "
|
|
4
|
+
gap: "xxs",
|
|
5
5
|
_empty: {
|
|
6
6
|
display: "none"
|
|
7
7
|
}
|
|
8
8
|
});
|
|
9
9
|
const panel = css({
|
|
10
|
-
top: "
|
|
11
|
-
left: "
|
|
12
|
-
margin: 0,
|
|
10
|
+
top: "md",
|
|
11
|
+
left: "md",
|
|
12
|
+
margin: "0",
|
|
13
13
|
pointerEvents: "none",
|
|
14
14
|
"& :where(button, .action-icon, [role='dialog'])": {
|
|
15
15
|
pointerEvents: "all"
|
|
@@ -43,7 +43,7 @@ const autolayoutButton = css({
|
|
|
43
43
|
flex: "1 1 40%",
|
|
44
44
|
textAlign: "center",
|
|
45
45
|
fontWeight: 500,
|
|
46
|
-
padding: "4px 6px",
|
|
46
|
+
padding: "[4px 6px]",
|
|
47
47
|
fontSize: "11px",
|
|
48
48
|
zIndex: 1
|
|
49
49
|
});
|