@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
package/src/bundle/index.ts
CHANGED
|
@@ -19,7 +19,8 @@ export { LikeC4View } from './LikeC4View'
|
|
|
19
19
|
export type { LikeC4BrowserProps, LikeC4ViewProps } from './LikeC4View.props'
|
|
20
20
|
export { ReactLikeC4, type ReactLikeC4Props } from './ReactLikeC4'
|
|
21
21
|
|
|
22
|
-
export {
|
|
22
|
+
export { LikeC4ProjectsProvider, type LikeC4ProjectsProviderProps } from '../LikeC4ProjectsProvider'
|
|
23
|
+
export { LikeC4ModelProvider, type LikeC4ModelProviderProps } from './LikeC4ModelProvider'
|
|
23
24
|
|
|
24
25
|
export { ViewNotFound } from './ViewNotFound'
|
|
25
26
|
|
package/src/bundle/styles.css.ts
CHANGED
|
@@ -18,7 +18,7 @@ export const DefaultTheme = createTheme({
|
|
|
18
18
|
primaryColor: 'indigo',
|
|
19
19
|
cursorType: 'pointer',
|
|
20
20
|
defaultRadius: 'sm',
|
|
21
|
-
fontFamily: 'var(--
|
|
21
|
+
fontFamily: 'var(--likec4-app-font, var(--likec4-app-font-default))',
|
|
22
22
|
headings: {
|
|
23
23
|
fontWeight: '500',
|
|
24
24
|
sizes: {
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { Box } from '@likec4/styles/jsx'
|
|
2
2
|
import { Button, Code, Group, Notification, ScrollAreaAutosize } from '@mantine/core'
|
|
3
3
|
import { IconX } from '@tabler/icons-react'
|
|
4
|
-
import
|
|
4
|
+
import {
|
|
5
|
+
type ErrorBoundaryProps,
|
|
6
|
+
type FallbackProps,
|
|
7
|
+
ErrorBoundary as ErrorBoundaryComponent,
|
|
8
|
+
} from 'react-error-boundary'
|
|
5
9
|
|
|
6
10
|
export function ErrorFallback({ error, resetErrorBoundary }: FallbackProps) {
|
|
7
11
|
const errorString = error instanceof Error ? error.message : 'Unknown error'
|
|
8
12
|
return (
|
|
9
|
-
<Box pos={'fixed'} top={0} left={0} w={'100%'} p={0} style={{ zIndex: 1000 }}>
|
|
13
|
+
<Box pos={'fixed'} top={'0'} left={'0'} w={'100%'} p={'0'} style={{ zIndex: 1000 }}>
|
|
10
14
|
<Notification
|
|
11
15
|
icon={<IconX style={{ width: 16, height: 16 }} />}
|
|
12
16
|
styles={{
|
|
@@ -28,3 +32,14 @@ export function ErrorFallback({ error, resetErrorBoundary }: FallbackProps) {
|
|
|
28
32
|
</Box>
|
|
29
33
|
)
|
|
30
34
|
}
|
|
35
|
+
|
|
36
|
+
export function ErrorBoundary(props: Pick<ErrorBoundaryProps, 'onReset' | 'onError' | 'children'>) {
|
|
37
|
+
return (
|
|
38
|
+
<ErrorBoundaryComponent
|
|
39
|
+
FallbackComponent={ErrorFallback}
|
|
40
|
+
onError={(err, info) => {
|
|
41
|
+
console.error(err, info)
|
|
42
|
+
}}
|
|
43
|
+
{...props} />
|
|
44
|
+
)
|
|
45
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SVGProps } from 'react'
|
|
2
|
+
import { forwardRef } from 'react'
|
|
3
|
+
|
|
4
|
+
export const GithubIcon = forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>((props, ref) => (
|
|
5
|
+
<svg
|
|
6
|
+
height="24"
|
|
7
|
+
width="24"
|
|
8
|
+
fill="currentColor"
|
|
9
|
+
{...props}
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
ref={ref}
|
|
12
|
+
>
|
|
13
|
+
<path d="M12 1C5.923 1 1 5.923 1 12c0 4.867 3.149 8.979 7.521 10.436.55.096.756-.233.756-.522 0-.262-.013-1.128-.013-2.049-2.764.509-3.479-.674-3.699-1.292-.124-.317-.66-1.293-1.127-1.554-.385-.207-.936-.715-.014-.729.866-.014 1.485.797 1.691 1.128.99 1.663 2.571 1.196 3.204.907.096-.715.385-1.196.701-1.471-2.448-.275-5.005-1.224-5.005-5.432 0-1.196.426-2.186 1.128-2.956-.111-.275-.496-1.402.11-2.915 0 0 .921-.288 3.024 1.128a10.193 10.193 0 0 1 2.75-.371c.936 0 1.871.123 2.75.371 2.104-1.43 3.025-1.128 3.025-1.128.605 1.513.221 2.64.111 2.915.701.77 1.127 1.747 1.127 2.956 0 4.222-2.571 5.157-5.019 5.432.399.344.743 1.004.743 2.035 0 1.471-.014 2.654-.014 3.025 0 .289.206.632.756.522C19.851 20.979 23 16.854 23 12c0-6.077-4.922-11-11-11Z">
|
|
14
|
+
</path>
|
|
15
|
+
</svg>
|
|
16
|
+
))
|
package/src/components/Link.tsx
CHANGED
|
@@ -1,119 +1,108 @@
|
|
|
1
1
|
import type { Link as LinkData } from '@likec4/core'
|
|
2
|
-
import { css,
|
|
3
|
-
import {
|
|
2
|
+
import { css, cx } from '@likec4/styles/css'
|
|
3
|
+
import { type BadgeProps, ActionIcon, Badge, CopyButton } from '@mantine/core'
|
|
4
4
|
import { IconCheck, IconCopy } from '@tabler/icons-react'
|
|
5
|
-
import {
|
|
5
|
+
import { forwardRef } from 'react'
|
|
6
|
+
import { GithubIcon } from './GithubIcon'
|
|
6
7
|
|
|
7
|
-
const
|
|
8
|
-
base: {
|
|
9
|
-
display: 'flex',
|
|
10
|
-
overflow: 'hidden',
|
|
11
|
-
alignItems: 'center',
|
|
12
|
-
gap: 'micro',
|
|
13
|
-
justifyContent: 'stretch',
|
|
14
|
-
transitionProperty: 'all',
|
|
15
|
-
transitionDuration: 'fast',
|
|
16
|
-
transitionTimingFunction: 'inOut',
|
|
17
|
-
border: `1px dashed {colors.mantine.colors.defaultBorder}`,
|
|
18
|
-
rounded: 'sm',
|
|
19
|
-
cursor: 'pointer',
|
|
20
|
-
color: 'mantine.colors.gray[7]',
|
|
21
|
-
_dark: {
|
|
22
|
-
color: 'mantine.colors.dark[1]',
|
|
23
|
-
},
|
|
24
|
-
_hover: {
|
|
25
|
-
transitionTimingFunction: 'out',
|
|
26
|
-
color: 'mantine.colors.defaultColor',
|
|
27
|
-
background: 'mantine.colors.defaultHover',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
variants: {
|
|
31
|
-
size: {
|
|
32
|
-
sm: {
|
|
33
|
-
minHeight: '22px',
|
|
34
|
-
padding: '2px 8px 2px 2px',
|
|
35
|
-
},
|
|
36
|
-
md: {
|
|
37
|
-
minHeight: '30px',
|
|
38
|
-
padding: '3px 16px 3px 3px',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
})
|
|
8
|
+
const GITHUB_PREFIX = 'https://github.com/'
|
|
43
9
|
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
transform: 'translateX(1px)',
|
|
51
|
-
},
|
|
52
|
-
})
|
|
10
|
+
export const Link = forwardRef<HTMLDivElement, Omit<BadgeProps, 'children' | 'classNames'> & { value: LinkData }>(
|
|
11
|
+
({ value, className, ...props }, ref) => {
|
|
12
|
+
// If the url is already a full url, use it as is.
|
|
13
|
+
// Otherwise, it's a relative url and we need to make it absolute.
|
|
14
|
+
const url = value.url.includes('://') ? value.url : new window.URL(value.url, window.location.href).toString()
|
|
15
|
+
let isGithub = url.startsWith(GITHUB_PREFIX)
|
|
53
16
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
e.stopPropagation()
|
|
87
|
-
e.preventDefault()
|
|
88
|
-
copy()
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
{copied ? <IconCheck /> : <IconCopy style={{ width: '65%', opacity: 0.65 }} />}
|
|
92
|
-
</ActionIcon>
|
|
93
|
-
<Box className={titleBox}>
|
|
94
|
-
<Text
|
|
95
|
-
component="div"
|
|
96
|
-
fz={isNormalSize ? 'xs' : 11}
|
|
97
|
-
truncate
|
|
98
|
-
lh={isNormalSize ? 1.3 : 1.2}
|
|
99
|
-
fw={value.title ? 500 : 400}>
|
|
100
|
-
{value.title || url}
|
|
101
|
-
</Text>
|
|
102
|
-
{value.title && (
|
|
103
|
-
<Text component="div" fz={isNormalSize ? 10 : 9} c={'dimmed'} lh={isNormalSize ? 1.2 : 1.1} truncate>
|
|
104
|
-
{url}
|
|
105
|
-
</Text>
|
|
17
|
+
return (
|
|
18
|
+
<Badge
|
|
19
|
+
ref={ref}
|
|
20
|
+
variant="default"
|
|
21
|
+
radius="sm"
|
|
22
|
+
size="sm"
|
|
23
|
+
tt="none"
|
|
24
|
+
leftSection={value.title ? <>{value.title}</> : null}
|
|
25
|
+
rightSection={
|
|
26
|
+
<CopyButton value={url} timeout={1500}>
|
|
27
|
+
{({ copy, copied }) => (
|
|
28
|
+
<ActionIcon
|
|
29
|
+
className={css({
|
|
30
|
+
opacity: copied ? 1 : 0.45,
|
|
31
|
+
transition: 'fast',
|
|
32
|
+
_hover: {
|
|
33
|
+
opacity: 1,
|
|
34
|
+
},
|
|
35
|
+
})}
|
|
36
|
+
tabIndex={-1}
|
|
37
|
+
size={'20'}
|
|
38
|
+
variant={copied ? 'light' : 'transparent'}
|
|
39
|
+
color={copied ? 'teal' : 'gray'}
|
|
40
|
+
data-active={copied}
|
|
41
|
+
onClick={e => {
|
|
42
|
+
e.stopPropagation()
|
|
43
|
+
e.preventDefault()
|
|
44
|
+
copy()
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
{copied ? <IconCheck /> : <IconCopy stroke={2.5} />}
|
|
48
|
+
</ActionIcon>
|
|
106
49
|
)}
|
|
107
|
-
</
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
50
|
+
</CopyButton>
|
|
51
|
+
}
|
|
52
|
+
{...props}
|
|
53
|
+
className={cx(className, 'group')}
|
|
54
|
+
classNames={{
|
|
55
|
+
root: css({
|
|
56
|
+
flexWrap: 'nowrap',
|
|
57
|
+
minHeight: 24,
|
|
58
|
+
maxWidth: 500,
|
|
59
|
+
userSelect: 'all',
|
|
60
|
+
pr: '0',
|
|
61
|
+
_hover: {
|
|
62
|
+
backgroundColor: {
|
|
63
|
+
base: 'mantine.colors.gray[1]',
|
|
64
|
+
_dark: 'mantine.colors.dark[5]',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
}),
|
|
68
|
+
section: css({
|
|
69
|
+
'&:is([data-position="left"])': {
|
|
70
|
+
color: 'mantine.colors.dimmed',
|
|
71
|
+
userSelect: 'none',
|
|
72
|
+
pointerEvents: 'none',
|
|
73
|
+
_groupHover: {
|
|
74
|
+
color: '[inherit]',
|
|
75
|
+
opacity: .7,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
label: css({
|
|
80
|
+
'& > a': {
|
|
81
|
+
color: '[inherit]',
|
|
82
|
+
cursor: 'pointer',
|
|
83
|
+
transition: 'fast',
|
|
84
|
+
opacity: {
|
|
85
|
+
base: 0.7,
|
|
86
|
+
_hover: 1,
|
|
87
|
+
},
|
|
88
|
+
textDecoration: {
|
|
89
|
+
base: 'none',
|
|
90
|
+
_hover: 'underline',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
}),
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
<a href={url} target="_blank">
|
|
97
|
+
{isGithub && (
|
|
98
|
+
<GithubIcon
|
|
99
|
+
height="12"
|
|
100
|
+
width="12"
|
|
101
|
+
style={{ verticalAlign: 'middle', marginRight: '4px' }} />
|
|
102
|
+
)}
|
|
103
|
+
{isGithub ? url.replace(GITHUB_PREFIX, '') : url}
|
|
104
|
+
</a>
|
|
105
|
+
</Badge>
|
|
106
|
+
)
|
|
107
|
+
},
|
|
108
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cx } from '@likec4/styles/css'
|
|
2
|
+
import { navigationLink } from '@likec4/styles/recipes'
|
|
3
|
+
import { type NavLinkProps, NavLink } from '@mantine/core'
|
|
4
|
+
import { forwardRef } from 'react'
|
|
5
|
+
import { type ComponentPropsWithoutRef } from 'react'
|
|
6
|
+
|
|
7
|
+
export interface NavigationLinkProps
|
|
8
|
+
extends Omit<NavLinkProps, 'classNames'>, Omit<ComponentPropsWithoutRef<'button'>, keyof NavLinkProps>
|
|
9
|
+
{
|
|
10
|
+
truncateLabel?: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const NavigationLink = forwardRef<HTMLButtonElement, NavigationLinkProps>((
|
|
14
|
+
{ className, truncateLabel = true, ...others },
|
|
15
|
+
ref,
|
|
16
|
+
) => (
|
|
17
|
+
<NavLink
|
|
18
|
+
{...others}
|
|
19
|
+
component="button"
|
|
20
|
+
classNames={navigationLink({
|
|
21
|
+
truncateLabel,
|
|
22
|
+
})}
|
|
23
|
+
className={cx(
|
|
24
|
+
'group',
|
|
25
|
+
'mantine-active',
|
|
26
|
+
className,
|
|
27
|
+
)}
|
|
28
|
+
ref={ref}
|
|
29
|
+
/>
|
|
30
|
+
))
|
|
31
|
+
|
|
32
|
+
NavigationLink.displayName = 'NavigationLink'
|
|
@@ -3,7 +3,7 @@ import { css } from '@likec4/styles/css'
|
|
|
3
3
|
export const root = css({
|
|
4
4
|
height: '30px',
|
|
5
5
|
paddingLeft: 'sm',
|
|
6
|
-
paddingRight: '
|
|
6
|
+
paddingRight: '1',
|
|
7
7
|
borderRadius: 'sm',
|
|
8
8
|
// TODO
|
|
9
9
|
// color: fallbackVar('var(--search-color)', 'mantine.colors.placeholder)',
|
|
@@ -41,14 +41,14 @@ export const root = css({
|
|
|
41
41
|
export const placeholder = css({
|
|
42
42
|
fontSize: 'sm', // mantine.fontSizes.sm,
|
|
43
43
|
fontWeight: 500,
|
|
44
|
-
paddingRight: '
|
|
44
|
+
paddingRight: '2.5', // 10px
|
|
45
45
|
color: 'mantine.colors.placeholder',
|
|
46
46
|
flex: '1',
|
|
47
47
|
sm: {
|
|
48
|
-
paddingRight: '30px',
|
|
48
|
+
paddingRight: '[30px]',
|
|
49
49
|
},
|
|
50
50
|
md: {
|
|
51
|
-
paddingRight: '50px',
|
|
51
|
+
paddingRight: '[50px]',
|
|
52
52
|
},
|
|
53
53
|
})
|
|
54
54
|
|
|
@@ -56,7 +56,7 @@ export const shortcut = css({
|
|
|
56
56
|
fontSize: '11px',
|
|
57
57
|
fontWeight: 600,
|
|
58
58
|
lineHeight: 1,
|
|
59
|
-
padding: '4px 7px',
|
|
59
|
+
padding: '[4px 7px]',
|
|
60
60
|
borderRadius: 'sm',
|
|
61
61
|
border: '1px solid',
|
|
62
62
|
transition: 'fast',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { aux } from '@likec4/core/types'
|
|
2
2
|
import { useSyncedRef } from '@react-hookz/web'
|
|
3
3
|
import { type PropsWithChildren, type RefObject, createContext, useContext, useMemo } from 'react'
|
|
4
4
|
import { isFunction, mapToObj } from 'remeda'
|
|
@@ -22,18 +22,18 @@ const HandlerNames = [
|
|
|
22
22
|
'onCanvasDblClick',
|
|
23
23
|
] as const
|
|
24
24
|
|
|
25
|
-
type
|
|
26
|
-
handlersRef: RefObject<LikeC4DiagramEventHandlers<Any>>
|
|
25
|
+
export type DiagramEventHandlersContext = RequiredOrNull<LikeC4DiagramEventHandlers<aux.Any>> & {
|
|
26
|
+
handlersRef: RefObject<LikeC4DiagramEventHandlers<aux.Any>>
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const
|
|
29
|
+
const DiagramEventHandlersReactContext = createContext<DiagramEventHandlersContext>({
|
|
30
30
|
...mapToObj(HandlerNames, (name) => [name, null]),
|
|
31
31
|
handlersRef: {
|
|
32
32
|
current: {},
|
|
33
33
|
},
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
-
export function DiagramEventHandlers<A extends Any>({
|
|
36
|
+
export function DiagramEventHandlers<A extends aux.Any>({
|
|
37
37
|
handlers,
|
|
38
38
|
children,
|
|
39
39
|
}: PropsWithChildren<{ handlers: LikeC4DiagramEventHandlers<A> }>) {
|
|
@@ -41,7 +41,7 @@ export function DiagramEventHandlers<A extends Any>({
|
|
|
41
41
|
|
|
42
42
|
const deps = HandlerNames.map((name) => isFunction(handlers[name]))
|
|
43
43
|
|
|
44
|
-
const value = useMemo(():
|
|
44
|
+
const value = useMemo((): DiagramEventHandlersContext => ({
|
|
45
45
|
...mapToObj(HandlerNames, (name) => {
|
|
46
46
|
if (handlersRef.current[name]) {
|
|
47
47
|
// @ts-expect-error TODO: fix this
|
|
@@ -53,16 +53,16 @@ export function DiagramEventHandlers<A extends Any>({
|
|
|
53
53
|
}), [handlersRef, ...deps])
|
|
54
54
|
|
|
55
55
|
return (
|
|
56
|
-
<
|
|
56
|
+
<DiagramEventHandlersReactContext.Provider value={value}>
|
|
57
57
|
{children}
|
|
58
|
-
</
|
|
58
|
+
</DiagramEventHandlersReactContext.Provider>
|
|
59
59
|
)
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export function useDiagramEventHandlers() {
|
|
63
|
-
return useContext(
|
|
62
|
+
export function useDiagramEventHandlers(): DiagramEventHandlersContext {
|
|
63
|
+
return useContext(DiagramEventHandlersReactContext)
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
export function useDiagramEventHandlersRef() {
|
|
67
|
-
return useContext(
|
|
66
|
+
export function useDiagramEventHandlersRef<A extends aux.Any = aux.Any>(): RefObject<LikeC4DiagramEventHandlers<A>> {
|
|
67
|
+
return useContext(DiagramEventHandlersReactContext).handlersRef
|
|
68
68
|
}
|
|
@@ -25,8 +25,13 @@ const FeatureNames = [
|
|
|
25
25
|
'ElementTags',
|
|
26
26
|
] as const
|
|
27
27
|
export type FeatureName = typeof FeatureNames[number]
|
|
28
|
+
|
|
29
|
+
type CustomFeatures = {
|
|
30
|
+
enableControls: 'next' | boolean
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
export type EnabledFeatures = {
|
|
29
|
-
[P in `enable${FeatureName}`]: boolean
|
|
34
|
+
[P in `enable${FeatureName}`]: P extends keyof CustomFeatures ? CustomFeatures[P] : boolean
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
export const AllDisabled: EnabledFeatures = mapToObj(
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { DeployedInstanceModel, DeploymentNodeModel, NodeModel } from '@likec4/core/model'
|
|
2
2
|
import type { Any } from '@likec4/core/types'
|
|
3
|
+
import { DEV } from 'esm-env'
|
|
3
4
|
import type { ReactNode } from 'react'
|
|
4
5
|
import { customNode } from '../base/primitives'
|
|
5
6
|
import type { NodeProps } from '../base/types'
|
|
6
7
|
import type { Types } from '../likec4diagram/types'
|
|
7
|
-
import {
|
|
8
|
+
import { useLikeC4ViewModel } from '../likec4model/useLikeC4Model'
|
|
8
9
|
|
|
9
10
|
function customDiagramNode<
|
|
10
11
|
P extends {
|
|
@@ -15,7 +16,14 @@ function customDiagramNode<
|
|
|
15
16
|
Node: (props: P) => ReactNode,
|
|
16
17
|
): (props: P['nodeProps']) => ReactNode {
|
|
17
18
|
return customNode((props) => {
|
|
18
|
-
const viewModel =
|
|
19
|
+
const viewModel = useLikeC4ViewModel(props.data.viewId)
|
|
20
|
+
if (!viewModel) {
|
|
21
|
+
if (DEV) {
|
|
22
|
+
throw new Error(`View "${props.data.viewId}" not found, requested by customNode "${props.id}"`)
|
|
23
|
+
}
|
|
24
|
+
console.error(`View "${props.data.viewId}" not found in likec4model`, { props })
|
|
25
|
+
return null
|
|
26
|
+
}
|
|
19
27
|
const model = viewModel.node(props.id)
|
|
20
28
|
// @ts-ignore
|
|
21
29
|
return <Node nodeProps={props} nodeModel={model} />
|
package/src/custom/hooks.ts
CHANGED
package/src/globals.css
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.likec4-root {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
position: relative;
|
|
4
|
+
padding: 0;
|
|
5
|
+
margin: 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
border: 0px solid transparent;
|
|
9
|
+
container-name: likec4-root;
|
|
10
|
+
container-type: size;
|
|
11
|
+
}
|
|
12
|
+
.likec4-root .react-flow:is(.not-initialized) {
|
|
13
|
+
opacity: 0;
|
|
14
|
+
}
|
|
15
|
+
:where(.likec4-root .mantine-ActionIcon-icon) .tabler-icon {
|
|
16
|
+
width: 75%;
|
|
17
|
+
height: 75%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.likec4-root :where(.react-flow__node, .react-flow__edge, .likec4-edge-label-container):has([data-likec4-dimmed]) {
|
|
21
|
+
opacity: 0.25;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.likec4-root:not([data-likec4-reduced-graphics])
|
|
25
|
+
:where(.react-flow__node, .react-flow__edge, .likec4-edge-label-container):has([data-likec4-dimmed]) {
|
|
26
|
+
filter: grayscale(85%) blur(3px);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.likec4-root:not([data-likec4-reduced-graphics])
|
|
30
|
+
:where(.react-flow__node, .react-flow__edge, .likec4-edge-label-container):has([data-likec4-dimmed="true"]) {
|
|
31
|
+
transition-property: opacity, filter;
|
|
32
|
+
transition-timing-function: cubic-bezier(0.50, 0, 0.2, 1);
|
|
33
|
+
transition-duration: 600ms;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-mantine-color-scheme="dark"]
|
|
37
|
+
.likec4-root:not([data-likec4-reduced-graphics])
|
|
38
|
+
:where(.react-flow__edges, .react-flow__edgelabel-renderer)
|
|
39
|
+
> svg {
|
|
40
|
+
mix-blend-mode: plus-lighter;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[data-mantine-color-scheme="light"]
|
|
44
|
+
.likec4-root:not([data-likec4-reduced-graphics])
|
|
45
|
+
:where(.react-flow__edges, .react-flow__edgelabel-renderer)
|
|
46
|
+
> svg {
|
|
47
|
+
mix-blend-mode: screen;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.likec4-root :where(.likec4-edge-container, .likec4-edge-label-container) {
|
|
51
|
+
--xy-edge-stroke-width: 3;
|
|
52
|
+
--xy-edge-stroke: var(--likec4-palette-relation-stroke);
|
|
53
|
+
--xy-edge-stroke-selected: var(--likec4-palette-relation-stroke-selected);
|
|
54
|
+
--xy-edge-label-color: var(--likec4-palette-relation-label);
|
|
55
|
+
--xy-edge-label-background-color: var(--likec4-palette-relation-label-bg);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.likec4-root
|
|
59
|
+
:where(.likec4-edge-container, .likec4-edge-label-container):is([data-likec4-hovered="true"], [data-edge-active="true"]) {
|
|
60
|
+
--xy-edge-stroke-width: 4;
|
|
61
|
+
--xy-edge-stroke: var(--likec4-palette-relation-stroke-selected);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[data-mantine-color-scheme="dark"] .likec4-root :where(.likec4-edge-container, .likec4-edge-label-container) {
|
|
65
|
+
--xy-edge-label-background-color: color-mix(in srgb, var(--likec4-palette-relation-label-bg) 50%, transparent);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-mantine-color-scheme="light"] .likec4-root :where(.likec4-edge-container, .likec4-edge-label-container) {
|
|
69
|
+
--xy-edge-label-color: color-mix(in srgb, var(--likec4-palette-relation-label), rgba(255 255 255 / 0.85) 40%);
|
|
70
|
+
--xy-edge-label-background-color: color-mix(in srgb, var(--likec4-palette-relation-label-bg) 60%, transparent);
|
|
71
|
+
}
|
package/src/hooks/useDiagram.ts
CHANGED
|
@@ -252,14 +252,6 @@ export function useDiagramActorSnapshot<T = unknown>(
|
|
|
252
252
|
return useXstateSelector(actorRef, useCallbackRef(selector), compare)
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
export function useDiagramSyncLayoutState<T = unknown>(
|
|
256
|
-
selector: (state: SyncLayoutActorSnapshot) => T,
|
|
257
|
-
compare: (a: NoInfer<T>, b: NoInfer<T>) => boolean = shallowEqual,
|
|
258
|
-
): T {
|
|
259
|
-
const syncLayoutActorRef = useDiagramActorSnapshot(s => s.context.syncLayoutActorRef as SyncLayoutActorRef)
|
|
260
|
-
return useXstateSelector(syncLayoutActorRef, useCallbackRef(selector), compare)
|
|
261
|
-
}
|
|
262
|
-
|
|
263
255
|
/**
|
|
264
256
|
* Read diagram context
|
|
265
257
|
*/
|
package/src/index.ts
CHANGED
|
@@ -2,12 +2,14 @@ import { memo } from 'react'
|
|
|
2
2
|
import { useEnabledFeatures } from '../context'
|
|
3
3
|
import { useOverlaysActorRef } from '../hooks/useOverlaysActor'
|
|
4
4
|
import { useSearchActorRef } from '../hooks/useSearchActor'
|
|
5
|
+
import { NavigationPanel } from '../navigationpanel'
|
|
5
6
|
import { Overlays } from '../overlays/Overlays'
|
|
6
7
|
import { Search } from '../search/Search'
|
|
7
8
|
import { Controls, DiagramTitlePanel, DynamicViewWalkthrough, NotationPanel } from './ui'
|
|
8
9
|
|
|
9
10
|
export const DiagramUI = memo(() => {
|
|
10
11
|
const {
|
|
12
|
+
enableControls,
|
|
11
13
|
enableViewTitle,
|
|
12
14
|
enableNotations,
|
|
13
15
|
enableDynamicViewWalkthrough,
|
|
@@ -19,11 +21,15 @@ export const DiagramUI = memo(() => {
|
|
|
19
21
|
|
|
20
22
|
return (
|
|
21
23
|
<>
|
|
22
|
-
<Controls />
|
|
24
|
+
{enableControls === 'next' ? <NavigationPanel /> : <Controls />}
|
|
23
25
|
{overlaysActorRef && <Overlays overlaysActorRef={overlaysActorRef} />}
|
|
24
|
-
{enableViewTitle && <DiagramTitlePanel />}
|
|
25
26
|
{enableNotations && <NotationPanel />}
|
|
26
|
-
{
|
|
27
|
+
{enableControls !== 'next' && (
|
|
28
|
+
<>
|
|
29
|
+
{enableViewTitle && <DiagramTitlePanel />}
|
|
30
|
+
{enableDynamicViewWalkthrough && <DynamicViewWalkthrough />}
|
|
31
|
+
</>
|
|
32
|
+
)}
|
|
27
33
|
{enableSearch && searchActorRef && <Search searchActorRef={searchActorRef} />}
|
|
28
34
|
</>
|
|
29
35
|
)
|
|
@@ -39,9 +39,9 @@ const equalsXYProps = (a: ReturnType<typeof selectXYProps>, b: ReturnType<typeof
|
|
|
39
39
|
a.initialized === b.initialized &&
|
|
40
40
|
a.pannable === b.pannable &&
|
|
41
41
|
a.zoomable === b.zoomable &&
|
|
42
|
-
a.fitViewPadding === b.fitViewPadding &&
|
|
43
42
|
a.enableFitView === b.enableFitView &&
|
|
44
43
|
a.enableReadOnly === b.enableReadOnly &&
|
|
44
|
+
shallowEqual(a.fitViewPadding, b.fitViewPadding) &&
|
|
45
45
|
shallowEqual(a.nodes, b.nodes) &&
|
|
46
46
|
shallowEqual(a.edges, b.edges) &&
|
|
47
47
|
shallowEqual(a.viewport ?? null, b.viewport ?? null)
|
|
@@ -324,7 +324,7 @@ export const RelationshipEdge = customEdge<Types.RelationshipEdgeData>((props) =
|
|
|
324
324
|
const notes = props.data.notes
|
|
325
325
|
if (notes && activeWalkthroughStep === props.id) {
|
|
326
326
|
edgeLabel = (
|
|
327
|
-
<NotePopover notes={notes}>
|
|
327
|
+
<NotePopover notes={notes.txt ?? notes.md}>
|
|
328
328
|
{edgeLabel}
|
|
329
329
|
</NotePopover>
|
|
330
330
|
)
|