@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
|
@@ -4,8 +4,8 @@ const labelBorderRadius = '4px'
|
|
|
4
4
|
|
|
5
5
|
export const edgeNoteCloseButton = css({
|
|
6
6
|
position: 'absolute',
|
|
7
|
-
top:
|
|
8
|
-
right:
|
|
7
|
+
top: '1',
|
|
8
|
+
right: '1',
|
|
9
9
|
})
|
|
10
10
|
|
|
11
11
|
export const edgeNoteText = css({
|
|
@@ -26,8 +26,8 @@ export const translate = {
|
|
|
26
26
|
} as const
|
|
27
27
|
|
|
28
28
|
export const edgeLabelContainer = css({
|
|
29
|
-
top: 0,
|
|
30
|
-
left: 0,
|
|
29
|
+
top: '0',
|
|
30
|
+
left: '0',
|
|
31
31
|
position: 'absolute',
|
|
32
32
|
pointerEvents: 'all',
|
|
33
33
|
cursor: 'pointer',
|
|
@@ -62,82 +62,3 @@ export const edgeLabelContainer = css({
|
|
|
62
62
|
display: 'none',
|
|
63
63
|
},
|
|
64
64
|
})
|
|
65
|
-
|
|
66
|
-
export const labelsva = sva({
|
|
67
|
-
slots: ['root', 'stepNumber', 'labelContents', 'labelText', 'labelTechnology'],
|
|
68
|
-
base: {
|
|
69
|
-
root: {
|
|
70
|
-
pointerEvents: 'all',
|
|
71
|
-
fontFamily: 'likec4.relation',
|
|
72
|
-
padding: '3px 5px 5px 5px',
|
|
73
|
-
display: 'flex',
|
|
74
|
-
flexDirection: 'column',
|
|
75
|
-
alignItems: 'center',
|
|
76
|
-
width: 'max-content',
|
|
77
|
-
maxWidth: '100%',
|
|
78
|
-
gap: '4px',
|
|
79
|
-
},
|
|
80
|
-
stepNumber: {
|
|
81
|
-
alignSelf: 'stretch',
|
|
82
|
-
flex: '0 0 auto',
|
|
83
|
-
fontWeight: 600,
|
|
84
|
-
fontSize: '14px',
|
|
85
|
-
lineHeight: '1',
|
|
86
|
-
padding: '5px 5px',
|
|
87
|
-
textAlign: 'center',
|
|
88
|
-
minWidth: '22px',
|
|
89
|
-
borderTopLeftRadius: labelBorderRadius,
|
|
90
|
-
borderBottomLeftRadius: labelBorderRadius,
|
|
91
|
-
background: `[color-mix(in srgb, {colors.likec4.relation.label.bg}, {colors.likec4.mixColor} 10%)]`,
|
|
92
|
-
fontVariantNumeric: 'tabular-nums',
|
|
93
|
-
// _dark: {
|
|
94
|
-
[':where([data-likec4-color="gray"]) &']: {
|
|
95
|
-
_dark: {
|
|
96
|
-
background: `[color-mix(in srgb, {colors.likec4.relation.label.bg}, {colors.likec4.mixColor} 15%)]`,
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
labelContents: {
|
|
101
|
-
display: 'contents',
|
|
102
|
-
_empty: {
|
|
103
|
-
display: 'none !important',
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
labelText: {
|
|
107
|
-
whiteSpaceCollapse: 'preserve-breaks',
|
|
108
|
-
fontSize: '14px',
|
|
109
|
-
lineHeight: '1.185',
|
|
110
|
-
},
|
|
111
|
-
labelTechnology: {
|
|
112
|
-
textAlign: 'center',
|
|
113
|
-
whiteSpaceCollapse: 'preserve-breaks',
|
|
114
|
-
fontSize: '11px',
|
|
115
|
-
lineHeight: '1',
|
|
116
|
-
opacity: 0.75,
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
variants: {
|
|
120
|
-
isStepEdge: {
|
|
121
|
-
false: {},
|
|
122
|
-
true: {
|
|
123
|
-
root: {
|
|
124
|
-
flexDirection: 'row',
|
|
125
|
-
gap: '4px',
|
|
126
|
-
padding: '0px',
|
|
127
|
-
},
|
|
128
|
-
labelContents: {
|
|
129
|
-
display: 'flex',
|
|
130
|
-
flexDirection: 'column',
|
|
131
|
-
alignItems: 'center',
|
|
132
|
-
padding: '2px 5px 4px 0px',
|
|
133
|
-
},
|
|
134
|
-
labelText: {
|
|
135
|
-
padding: '2px 6px 4px 0px',
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
defaultVariants: {
|
|
141
|
-
isStepEdge: false,
|
|
142
|
-
},
|
|
143
|
-
})
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { extractStep, isStepEdgeId } from '@likec4/core'
|
|
2
2
|
import type { DiagramEdge } from '@likec4/core/types'
|
|
3
|
-
import { cx } from '@likec4/styles/css'
|
|
3
|
+
import { css, cx } from '@likec4/styles/css'
|
|
4
4
|
import { type BoxProps, Box } from '@likec4/styles/jsx'
|
|
5
|
+
import { edgeLabel } from '@likec4/styles/recipes'
|
|
5
6
|
import { Text } from '@mantine/core'
|
|
6
7
|
import { type PropsWithChildren, forwardRef } from 'react'
|
|
7
8
|
import { isTruthy } from 'remeda'
|
|
8
9
|
import type { UndefinedOnPartialDeep } from 'type-fest'
|
|
9
10
|
import type { EdgeProps } from '../../types'
|
|
10
|
-
import { labelsva } from './EdgeLabel.css'
|
|
11
11
|
|
|
12
12
|
type Data = UndefinedOnPartialDeep<
|
|
13
13
|
Pick<
|
|
@@ -40,27 +40,33 @@ export const EdgeLabel = forwardRef<HTMLDivElement, EdgeLabelProps>((
|
|
|
40
40
|
ref,
|
|
41
41
|
) => {
|
|
42
42
|
const stepNum = isStepEdgeId(id) ? extractStep(id) : null
|
|
43
|
-
const classes =
|
|
43
|
+
const classes = edgeLabel({
|
|
44
44
|
isStepEdge: stepNum !== null,
|
|
45
45
|
})
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
|
-
<Box ref={ref} className={cx(classes.root
|
|
48
|
+
<Box ref={ref} className={cx(classes.root, className)} {...rest}>
|
|
49
49
|
{stepNum !== null && (
|
|
50
|
-
<Box className={classes.stepNumber
|
|
50
|
+
<Box className={classes.stepNumber}>
|
|
51
51
|
{stepNum}
|
|
52
52
|
</Box>
|
|
53
53
|
)}
|
|
54
|
-
<Box className={classes.labelContents
|
|
54
|
+
<Box className={classes.labelContents}>
|
|
55
55
|
{isTruthy(label) && (
|
|
56
|
-
<
|
|
56
|
+
<Box
|
|
57
|
+
className={cx(
|
|
58
|
+
classes.labelText,
|
|
59
|
+
css({
|
|
60
|
+
lineClamp: 5,
|
|
61
|
+
}),
|
|
62
|
+
)}>
|
|
57
63
|
{label}
|
|
58
|
-
</
|
|
64
|
+
</Box>
|
|
59
65
|
)}
|
|
60
66
|
{isTruthy(technology) && (
|
|
61
|
-
<
|
|
67
|
+
<Box className={classes.labelTechnology}>
|
|
62
68
|
{'[ ' + technology + ' ]'}
|
|
63
|
-
</
|
|
69
|
+
</Box>
|
|
64
70
|
)}
|
|
65
71
|
{children}
|
|
66
72
|
</Box>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { DiagramEdge } from '@likec4/core/types'
|
|
2
|
-
import {
|
|
2
|
+
import { cx } from '@likec4/styles/css'
|
|
3
3
|
import { EdgeLabelRenderer } from '@xyflow/react'
|
|
4
4
|
import { type HTMLAttributes } from 'react'
|
|
5
5
|
import { isNumber } from 'remeda'
|
|
6
6
|
import type { UndefinedOnPartialDeep } from 'type-fest'
|
|
7
7
|
import { ZIndexes } from '../../const'
|
|
8
8
|
import type { EdgeProps } from '../../types'
|
|
9
|
-
import { edgeVars } from './edge.css'
|
|
10
9
|
import { edgeLabelContainer, translate as _translate } from './EdgeLabel.css'
|
|
11
10
|
|
|
12
11
|
type Data = UndefinedOnPartialDeep<
|
|
@@ -71,10 +70,6 @@ export function EdgeLabelContainer({
|
|
|
71
70
|
<div
|
|
72
71
|
key={id}
|
|
73
72
|
className={cx(
|
|
74
|
-
css({
|
|
75
|
-
likec4RelationPalette: color,
|
|
76
|
-
}),
|
|
77
|
-
edgeVars,
|
|
78
73
|
edgeLabelContainer,
|
|
79
74
|
'nodrag nopan',
|
|
80
75
|
'likec4-edge-label-container',
|
|
@@ -72,7 +72,7 @@ const OArrow = (props: SVGProps<SVGMarkerElement>) => (
|
|
|
72
72
|
<path
|
|
73
73
|
d="M 0 0 L 8 3 L 0 6 L 1 3 z"
|
|
74
74
|
stroke="context-stroke"
|
|
75
|
-
fill="
|
|
75
|
+
fill="context-stroke"
|
|
76
76
|
strokeWidth={1.25}
|
|
77
77
|
strokeLinejoin="miter"
|
|
78
78
|
strokeLinecap={'square'}
|
|
@@ -113,7 +113,7 @@ const ODiamond = (props: SVGProps<SVGMarkerElement>) => (
|
|
|
113
113
|
<path
|
|
114
114
|
d="M5,0 L10,4 L5,8 L0,4 Z"
|
|
115
115
|
stroke="context-stroke"
|
|
116
|
-
fill="
|
|
116
|
+
fill="context-stroke"
|
|
117
117
|
strokeWidth={1.25}
|
|
118
118
|
strokeLinecap={'round'}
|
|
119
119
|
/>
|
|
@@ -149,7 +149,7 @@ const ODot = (props: SVGProps<SVGMarkerElement>) => (
|
|
|
149
149
|
<circle
|
|
150
150
|
strokeWidth={1.25}
|
|
151
151
|
stroke="context-stroke"
|
|
152
|
-
fill="
|
|
152
|
+
fill="context-stroke"
|
|
153
153
|
cx={4}
|
|
154
154
|
cy={4}
|
|
155
155
|
r={3}
|
|
@@ -2,31 +2,6 @@ import { css } from '@likec4/styles/css'
|
|
|
2
2
|
|
|
3
3
|
const isSelected = '.react-flow__edge.selected'
|
|
4
4
|
|
|
5
|
-
const edgeStroke = '--xy-edge-stroke'
|
|
6
|
-
const edgeStrokeSelected = '--xy-edge-stroke-selected'
|
|
7
|
-
const labelColor = '--xy-edge-label-color'
|
|
8
|
-
const labelBg = '--xy-edge-label-background-color'
|
|
9
|
-
|
|
10
|
-
export const edgeVars = css({
|
|
11
|
-
[edgeStroke]: '{colors.likec4.relation.stroke}',
|
|
12
|
-
[edgeStrokeSelected]: '{colors.likec4.relation.stroke.selected}',
|
|
13
|
-
[labelColor]: {
|
|
14
|
-
base: '{colors.likec4.relation.label}',
|
|
15
|
-
_light: `color-mix(in srgb, {colors.likec4.relation.label}, rgba(255 255 255 / 0.85) 40%)`,
|
|
16
|
-
},
|
|
17
|
-
[labelBg]: {
|
|
18
|
-
_light: `{colors.likec4.relation.label.bg/60}`,
|
|
19
|
-
_dark: `{colors.likec4.relation.label.bg/50}`,
|
|
20
|
-
},
|
|
21
|
-
['--xy-edge-stroke-width']: '3',
|
|
22
|
-
'&:is([data-likec4-hovered=\'true\'],[data-edge-active=\'true\'])': {
|
|
23
|
-
[edgeStroke]: '{colors.likec4.relation.stroke.selected}',
|
|
24
|
-
_whenSelected: {
|
|
25
|
-
['--xy-edge-stroke-width']: '4',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
})
|
|
29
|
-
|
|
30
5
|
export const edgeContainer = css({
|
|
31
6
|
_reduceGraphics: {
|
|
32
7
|
transition: 'none',
|
|
@@ -98,38 +73,3 @@ export const cssEdgePath = css({
|
|
|
98
73
|
animationName: 'none',
|
|
99
74
|
},
|
|
100
75
|
})
|
|
101
|
-
|
|
102
|
-
const aiBg = {
|
|
103
|
-
var: '--ai-bg',
|
|
104
|
-
ref: 'var(--ai-bg)',
|
|
105
|
-
} as const
|
|
106
|
-
|
|
107
|
-
export const actionBtn = css({
|
|
108
|
-
// zIndex: 'calc(var(--layer-overlays, 1) + 1)',
|
|
109
|
-
pointerEvents: 'all',
|
|
110
|
-
// color: `xyedge.label`,
|
|
111
|
-
cursor: 'pointer',
|
|
112
|
-
opacity: 0.75,
|
|
113
|
-
transition: 'fast',
|
|
114
|
-
// backgroundColor: aiBg.ref,
|
|
115
|
-
[aiBg.var]: 'var(--xy-edge-label-background-color)',
|
|
116
|
-
'--ai-hover': `color-mix(in srgb , var(--xy-edge-label-background-color), {colors.likec4.mixColor} 10%)`,
|
|
117
|
-
'--ai-size': `var(--ai-size-sm)`,
|
|
118
|
-
'--ai-radius': `var(--mantine-radius-sm)`,
|
|
119
|
-
_hover: {
|
|
120
|
-
translateY: '1px',
|
|
121
|
-
scale: 1.15,
|
|
122
|
-
},
|
|
123
|
-
_active: {
|
|
124
|
-
translateY: '-1px',
|
|
125
|
-
scale: '0.9',
|
|
126
|
-
},
|
|
127
|
-
_whenHovered: {
|
|
128
|
-
opacity: 1,
|
|
129
|
-
},
|
|
130
|
-
'& .tabler-icon': {
|
|
131
|
-
width: '80%',
|
|
132
|
-
height: '80%',
|
|
133
|
-
strokeWidth: '2',
|
|
134
|
-
},
|
|
135
|
-
})
|
|
@@ -15,9 +15,9 @@ type ElementActionButtonsProps = NodeProps & {
|
|
|
15
15
|
const container = css({
|
|
16
16
|
position: 'absolute',
|
|
17
17
|
zIndex: 1,
|
|
18
|
-
top: `calc(100% - 30px)`,
|
|
18
|
+
top: `[calc(100% - 30px)]`,
|
|
19
19
|
transform: 'translateX(-50%)',
|
|
20
|
-
left: `50
|
|
20
|
+
left: `[50%]`,
|
|
21
21
|
width: 'auto',
|
|
22
22
|
minHeight: '30px',
|
|
23
23
|
display: 'flex',
|
|
@@ -15,20 +15,20 @@ type ElementDetailsButtonProps = NodeProps & {
|
|
|
15
15
|
|
|
16
16
|
const container = css({
|
|
17
17
|
position: 'absolute',
|
|
18
|
-
top:
|
|
19
|
-
right:
|
|
18
|
+
top: '0.5',
|
|
19
|
+
right: '0.5',
|
|
20
20
|
_shapeBrowser: {
|
|
21
|
-
right: '5px',
|
|
21
|
+
right: '[5px]',
|
|
22
22
|
},
|
|
23
23
|
_shapeCylinder: {
|
|
24
|
-
top: '14px',
|
|
24
|
+
top: '[14px]',
|
|
25
25
|
},
|
|
26
26
|
_shapeStorage: {
|
|
27
|
-
top: '14px',
|
|
27
|
+
top: '[14px]',
|
|
28
28
|
},
|
|
29
29
|
_shapeQueue: {
|
|
30
|
-
top: '1px',
|
|
31
|
-
right: '
|
|
30
|
+
top: '[1px]',
|
|
31
|
+
right: '3', // 12px
|
|
32
32
|
},
|
|
33
33
|
_smallZoom: {
|
|
34
34
|
display: 'none',
|
|
@@ -4,8 +4,8 @@ export const container = style({
|
|
|
4
4
|
position: 'relative',
|
|
5
5
|
width: '100%',
|
|
6
6
|
height: '100%',
|
|
7
|
-
padding: 0,
|
|
8
|
-
margin: 0,
|
|
7
|
+
padding: '0',
|
|
8
|
+
margin: '0',
|
|
9
9
|
display: 'flex',
|
|
10
10
|
alignItems: 'center',
|
|
11
11
|
justifyContent: 'center',
|
|
@@ -13,8 +13,8 @@ export const container = style({
|
|
|
13
13
|
_before: {
|
|
14
14
|
content: '" "',
|
|
15
15
|
position: 'absolute',
|
|
16
|
-
top: 'calc(100% - 4px)',
|
|
17
|
-
left: 0,
|
|
16
|
+
top: '[calc(100% - 4px)]',
|
|
17
|
+
left: '0',
|
|
18
18
|
width: '100%',
|
|
19
19
|
height: '24px',
|
|
20
20
|
background: '[transparent]',
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
DefaultTextSize,
|
|
8
8
|
} from '@likec4/core/types'
|
|
9
9
|
import { css, cx } from '@likec4/styles/css'
|
|
10
|
-
import type {
|
|
10
|
+
import type { MotionNodeLayoutOptions } from 'motion/react'
|
|
11
11
|
import * as m from 'motion/react-m'
|
|
12
12
|
import { type CSSProperties, type ReactNode, forwardRef } from 'react'
|
|
13
13
|
import type { NodeProps } from '../../types'
|
|
@@ -27,7 +27,7 @@ export type ElementNodeContainerProps =
|
|
|
27
27
|
style?: CSSProperties | undefined
|
|
28
28
|
[key: `data-${string}`]: string | undefined
|
|
29
29
|
}
|
|
30
|
-
&
|
|
30
|
+
& MotionNodeLayoutOptions
|
|
31
31
|
|
|
32
32
|
export function nodeSizes({
|
|
33
33
|
size,
|
|
@@ -92,9 +92,6 @@ export const ElementNodeContainer = forwardRef<HTMLDivElement, ElementNodeContai
|
|
|
92
92
|
<m.div
|
|
93
93
|
ref={ref}
|
|
94
94
|
className={cx(
|
|
95
|
-
css({
|
|
96
|
-
likec4Palette: data.color,
|
|
97
|
-
}),
|
|
98
95
|
styles.container,
|
|
99
96
|
'group',
|
|
100
97
|
'likec4-element-node',
|
|
@@ -4,7 +4,7 @@ export const indicator = css({
|
|
|
4
4
|
_smallZoom: {
|
|
5
5
|
visibility: 'hidden',
|
|
6
6
|
},
|
|
7
|
-
stroke: 'likec4
|
|
7
|
+
stroke: 'var(--likec4-palette-loContrast)',
|
|
8
8
|
fill: '[none]',
|
|
9
9
|
|
|
10
10
|
strokeWidth: 8,
|
|
@@ -12,7 +12,7 @@ export const indicator = css({
|
|
|
12
12
|
visibility: 'hidden',
|
|
13
13
|
pointerEvents: 'none',
|
|
14
14
|
_light: {
|
|
15
|
-
stroke: `[color-mix(in srgb,
|
|
15
|
+
stroke: `[color-mix(in srgb, var(--likec4-palette-fill) 50%,rgb(121, 121, 121))]`,
|
|
16
16
|
},
|
|
17
17
|
_whenFocused: {
|
|
18
18
|
visibility: 'visible',
|
|
@@ -27,29 +27,29 @@ export const indicator = css({
|
|
|
27
27
|
})
|
|
28
28
|
|
|
29
29
|
export const fillElementFill = css({
|
|
30
|
-
fill: 'likec4
|
|
30
|
+
fill: 'var(--likec4-palette-fill)',
|
|
31
31
|
})
|
|
32
32
|
|
|
33
33
|
export const fillElementStroke = css({
|
|
34
|
-
fill: 'likec4
|
|
34
|
+
fill: 'var(--likec4-palette-stroke)',
|
|
35
35
|
})
|
|
36
36
|
|
|
37
37
|
export const fillMixStroke = css({
|
|
38
|
-
fill: '[color-mix(in srgb,
|
|
38
|
+
fill: '[color-mix(in srgb, var(--likec4-palette-stroke) 90%, var(--likec4-palette-fill))]',
|
|
39
39
|
'.shape-svg-multiple &': {
|
|
40
|
-
fill: 'likec4
|
|
40
|
+
fill: 'var(--likec4-palette-fill)',
|
|
41
41
|
},
|
|
42
42
|
})
|
|
43
43
|
|
|
44
44
|
const shapeBase = css.raw({
|
|
45
|
-
top: 0,
|
|
46
|
-
left: 0,
|
|
45
|
+
top: '0',
|
|
46
|
+
left: '0',
|
|
47
47
|
position: 'absolute',
|
|
48
48
|
width: '100%',
|
|
49
49
|
height: '100%',
|
|
50
50
|
pointerEvents: 'none',
|
|
51
|
-
fill: 'likec4
|
|
52
|
-
stroke: 'likec4
|
|
51
|
+
fill: 'var(--likec4-palette-fill)',
|
|
52
|
+
stroke: 'var(--likec4-palette-stroke)',
|
|
53
53
|
overflow: 'visible',
|
|
54
54
|
// zIndex is removed to improve rendering performance
|
|
55
55
|
// this forces to keep shape in the same layer as the node
|
|
@@ -82,7 +82,7 @@ export const shapeSvg = css(shapeBase, {
|
|
|
82
82
|
transitionDelay: '0ms',
|
|
83
83
|
filter: `
|
|
84
84
|
drop-shadow(0 2px 1px rgba(0, 0, 0, 0.21))
|
|
85
|
-
drop-shadow(0 1px 1px color-mix(in srgb,
|
|
85
|
+
drop-shadow(0 1px 1px color-mix(in srgb, var(--likec4-palette-stroke) 40%, transparent))
|
|
86
86
|
drop-shadow(0 5px 3px rgba(0, 0, 0, 0.1))
|
|
87
87
|
`,
|
|
88
88
|
_whenHovered: {
|
|
@@ -15,10 +15,11 @@ import type { NodeProps } from '../../types'
|
|
|
15
15
|
|
|
16
16
|
export type ElementTagProps = {
|
|
17
17
|
tag: string
|
|
18
|
+
cursor?: 'pointer' | 'default'
|
|
18
19
|
} & Omit<BoxProps, 'children'>
|
|
19
20
|
|
|
20
21
|
export const ElementTag = forwardRef<HTMLDivElement, ElementTagProps>(
|
|
21
|
-
({ tag, className, ...props }, ref) => {
|
|
22
|
+
({ tag, cursor = 'default', className, ...props }, ref) => {
|
|
22
23
|
const spec = useTagSpecification(tag)
|
|
23
24
|
return (
|
|
24
25
|
<Box
|
|
@@ -31,8 +32,9 @@ export const ElementTag = forwardRef<HTMLDivElement, ElementTagProps>(
|
|
|
31
32
|
className,
|
|
32
33
|
)}
|
|
33
34
|
{...props}
|
|
35
|
+
style={{ cursor }}
|
|
34
36
|
>
|
|
35
|
-
<span
|
|
37
|
+
<span>#</span>
|
|
36
38
|
<span>{tag}</span>
|
|
37
39
|
</Box>
|
|
38
40
|
)
|
|
@@ -99,23 +101,23 @@ export const ElementTags = memo(({ id, data: { tags, width, hovered = false } }:
|
|
|
99
101
|
'likec4-element-tags',
|
|
100
102
|
hstack({
|
|
101
103
|
pointerEvents: 'all',
|
|
102
|
-
gap:
|
|
104
|
+
gap: '1',
|
|
103
105
|
alignItems: 'flex-end',
|
|
104
106
|
justifyItems: 'stretch',
|
|
105
107
|
position: 'absolute',
|
|
106
108
|
width: '100%',
|
|
107
|
-
bottom: 0,
|
|
108
|
-
left: 0,
|
|
109
|
-
padding:
|
|
109
|
+
bottom: '0',
|
|
110
|
+
left: '0',
|
|
111
|
+
padding: '1',
|
|
110
112
|
_shapeCylinder: {
|
|
111
|
-
bottom:
|
|
113
|
+
bottom: '[5px]',
|
|
112
114
|
},
|
|
113
115
|
_shapeStorage: {
|
|
114
|
-
bottom:
|
|
116
|
+
bottom: '[5px]',
|
|
115
117
|
},
|
|
116
118
|
_shapeQueue: {
|
|
117
|
-
bottom: 0,
|
|
118
|
-
paddingLeft:
|
|
119
|
+
bottom: '0',
|
|
120
|
+
paddingLeft: '[14px]',
|
|
119
121
|
},
|
|
120
122
|
}),
|
|
121
123
|
)}
|
|
@@ -147,11 +149,12 @@ export const ElementTags = memo(({ id, data: { tags, width, hovered = false } }:
|
|
|
147
149
|
<HStack
|
|
148
150
|
ref={tagsToolbarRef}
|
|
149
151
|
css={{
|
|
150
|
-
gap:
|
|
152
|
+
gap: '0.5',
|
|
153
|
+
alignItems: 'baseline',
|
|
151
154
|
flexWrap: 'wrap',
|
|
152
155
|
pb: 'sm',
|
|
153
156
|
translate: 'auto',
|
|
154
|
-
x: -
|
|
157
|
+
x: '[-8px]',
|
|
155
158
|
maxWidth,
|
|
156
159
|
}}
|
|
157
160
|
>
|
|
@@ -164,8 +167,8 @@ export const ElementTags = memo(({ id, data: { tags, width, hovered = false } }:
|
|
|
164
167
|
cursor: 'pointer',
|
|
165
168
|
...(zoomIsLargeEnough && {
|
|
166
169
|
fontSize: 'lg',
|
|
167
|
-
borderRadius:
|
|
168
|
-
px:
|
|
170
|
+
borderRadius: '[4px]',
|
|
171
|
+
px: '1.5', // 6px
|
|
169
172
|
}),
|
|
170
173
|
})}
|
|
171
174
|
onClick={e => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DiagramNode, RichTextOrEmpty } from '@likec4/core/types'
|
|
2
2
|
import { cx } from '@likec4/styles/css'
|
|
3
3
|
import { Box } from '@likec4/styles/jsx'
|
|
4
|
+
import { elementNodeData, elementNodeIcon as elementIconRecipe } from '@likec4/styles/recipes'
|
|
4
5
|
import { Text } from '@mantine/core'
|
|
5
6
|
import { isEmpty, isNumber, isTruthy } from 'remeda'
|
|
6
7
|
import type { Simplify } from 'type-fest'
|
|
@@ -8,7 +9,6 @@ import { IconRenderer } from '../../../context/IconRenderer'
|
|
|
8
9
|
import type { NodeProps, NonOptional } from '../../types'
|
|
9
10
|
import { MarkdownBlock } from '../MarkdownBlock'
|
|
10
11
|
import { nodeSizes } from './ElementNodeContainer'
|
|
11
|
-
import * as styles from './ElementTitle.css'
|
|
12
12
|
|
|
13
13
|
type Data = Simplify<
|
|
14
14
|
& NonOptional<
|
|
@@ -37,9 +37,9 @@ export function ElementTitle({ id, data, iconSize }: ElementTitleProps) {
|
|
|
37
37
|
title: data.title,
|
|
38
38
|
icon: data.icon,
|
|
39
39
|
},
|
|
40
|
-
className:
|
|
40
|
+
className: elementIconRecipe(),
|
|
41
41
|
})
|
|
42
|
-
const classes =
|
|
42
|
+
const classes = elementNodeData({
|
|
43
43
|
hasIcon: isTruthy(elementIcon),
|
|
44
44
|
hasDescription: !!data.description?.nonEmpty,
|
|
45
45
|
hasTechnology: !isEmpty(data.technology ?? ''),
|
|
@@ -56,7 +56,7 @@ export function ElementTitle({ id, data, iconSize }: ElementTitleProps) {
|
|
|
56
56
|
style={isNumber(iconSize)
|
|
57
57
|
? {
|
|
58
58
|
// @ts-ignore
|
|
59
|
-
[
|
|
59
|
+
['--likec4-icon-size']: `${iconSize}px`,
|
|
60
60
|
}
|
|
61
61
|
: undefined}
|
|
62
62
|
>
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import type { WhereOperator } from '@likec4/core/types'
|
|
2
|
-
import type * as aux from '@likec4/core/types/_aux'
|
|
1
|
+
import type { aux, WhereOperator } from '@likec4/core/types'
|
|
3
2
|
import type { CSSProperties } from 'react'
|
|
4
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
CustomNodes,
|
|
5
|
+
ElementIconRenderer,
|
|
6
|
+
OverrideReactFlowProps,
|
|
7
|
+
PaddingWithUnit,
|
|
8
|
+
ViewPadding,
|
|
9
|
+
} from '../LikeC4Diagram.props'
|
|
5
10
|
|
|
6
11
|
export interface LikeC4ViewProps<A extends aux.Any> {
|
|
7
12
|
/**
|
|
@@ -69,8 +74,10 @@ export interface LikeC4ViewProps<A extends aux.Any> {
|
|
|
69
74
|
/**
|
|
70
75
|
* Padding around the diagram
|
|
71
76
|
* @default '8px'
|
|
77
|
+
*
|
|
78
|
+
* @see {@link ViewPadding}
|
|
72
79
|
*/
|
|
73
|
-
fitViewPadding?:
|
|
80
|
+
fitViewPadding?: ViewPadding | undefined
|
|
74
81
|
|
|
75
82
|
/**
|
|
76
83
|
* Display diagram title / description
|
|
@@ -182,9 +189,11 @@ export interface LikeC4BrowserProps {
|
|
|
182
189
|
|
|
183
190
|
/**
|
|
184
191
|
* Show/hide panel with top left controls,
|
|
185
|
-
*
|
|
192
|
+
* - `next` - show navigation panel (Experimental)
|
|
193
|
+
*
|
|
194
|
+
* @default `next`
|
|
186
195
|
*/
|
|
187
|
-
controls?: boolean | undefined
|
|
196
|
+
controls?: boolean | 'next' | undefined
|
|
188
197
|
|
|
189
198
|
/**
|
|
190
199
|
* Display diagram title / description
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Any, DiagramView } from '@likec4/core/types'
|
|
2
|
-
import type * as aux from '@likec4/core/types/_aux'
|
|
1
|
+
import type { Any, aux, DiagramView } from '@likec4/core/types'
|
|
3
2
|
import { cx } from '@likec4/styles/css'
|
|
4
3
|
import { ActionIcon, Box } from '@mantine/core'
|
|
5
4
|
import { shallowEqual } from '@mantine/hooks'
|
|
@@ -8,6 +7,7 @@ import { memo, useState } from 'react'
|
|
|
8
7
|
import { isBoolean } from 'remeda'
|
|
9
8
|
import { FramerMotionConfig } from '../context/FramerMotionConfig'
|
|
10
9
|
import { LikeC4Diagram } from '../LikeC4Diagram'
|
|
10
|
+
import type { ViewPadding } from '../LikeC4Diagram.props'
|
|
11
11
|
import { useLikeC4Model } from '../likec4model/useLikeC4Model'
|
|
12
12
|
import { Overlay } from '../overlays/overlay/Overlay'
|
|
13
13
|
import type { LikeC4ViewProps } from './LikeC4View.props'
|
|
@@ -37,6 +37,13 @@ export function LikeC4View<A extends aux.Any = aux.UnknownLayouted>({
|
|
|
37
37
|
return <LikeC4ViewInner view={view.$view} {...props} />
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
const DEFAULT_BROWSER_PADDING: ViewPadding = {
|
|
41
|
+
top: '50px',
|
|
42
|
+
bottom: '16px',
|
|
43
|
+
left: '16px',
|
|
44
|
+
right: '16px',
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
type LikeC4ViewInnerProps<A extends aux.Any> = Omit<LikeC4ViewProps<A>, 'viewId'> & {
|
|
41
48
|
view: DiagramView<A>
|
|
42
49
|
}
|
|
@@ -69,7 +76,7 @@ const LikeC4ViewInner = memo<LikeC4ViewInnerProps<aux.Any>>(({
|
|
|
69
76
|
renderNodes,
|
|
70
77
|
...props
|
|
71
78
|
}) => {
|
|
72
|
-
const likec4model = useLikeC4Model(
|
|
79
|
+
const likec4model = useLikeC4Model()
|
|
73
80
|
const colorScheme = useColorScheme(explicitColorScheme)
|
|
74
81
|
|
|
75
82
|
const [shadowRootProps, cssstyle] = useShadowRootStyle(keepAspectRatio, view)
|
|
@@ -159,10 +166,10 @@ const LikeC4ViewInner = memo<LikeC4ViewInnerProps<aux.Any>>(({
|
|
|
159
166
|
enableRelationshipDetails
|
|
160
167
|
enableSearch
|
|
161
168
|
enableElementTags
|
|
162
|
-
controls
|
|
169
|
+
controls="next"
|
|
163
170
|
readonly
|
|
164
171
|
fitView
|
|
165
|
-
fitViewPadding={
|
|
172
|
+
fitViewPadding={DEFAULT_BROWSER_PADDING}
|
|
166
173
|
{...props}
|
|
167
174
|
{...browserProps}
|
|
168
175
|
showNotations={(browserProps.showNotations ?? true) &&
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Any, DiagramView } from '@likec4/core/types'
|
|
2
|
-
import type * as aux from '@likec4/core/types/_aux'
|
|
1
|
+
import type { Any, aux, DiagramView } from '@likec4/core/types'
|
|
3
2
|
import { cx } from '@likec4/styles/css'
|
|
4
3
|
import { type CSSProperties } from 'react'
|
|
5
4
|
import { isFunction, isString } from 'remeda'
|