@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/dist/LikeC4Diagram.js
CHANGED
|
@@ -3,8 +3,8 @@ import { ReactFlowProvider } from '@xyflow/react';
|
|
|
3
3
|
import { useRef } from 'react';
|
|
4
4
|
import { ControlsCustomLayoutProvider } from './context/ControlsCustomLayout.js';
|
|
5
5
|
import { ReduceGraphicsContext } from './context/ReduceGraphics.js';
|
|
6
|
-
import { LikeC4CustomColors } from './LikeC4CustomColors.js';
|
|
7
6
|
import { LikeC4DiagramXYFlow } from './likec4diagram/DiagramXYFlow.js';
|
|
7
|
+
import { LikeC4Styles } from './LikeC4Styles.js';
|
|
8
8
|
import { DiagramActorProvider } from './state/DiagramActorProvider.js';
|
|
9
9
|
import { EnsureMantine } from './context/EnsureMantine.js';
|
|
10
10
|
import { FramerMotionConfig } from './context/FramerMotionConfig.js';
|
|
@@ -108,9 +108,9 @@ function LikeC4Diagram({
|
|
|
108
108
|
onOpenSource,
|
|
109
109
|
onBurgerMenuClick
|
|
110
110
|
},
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
/* @__PURE__ */ jsx(
|
|
113
|
-
/* @__PURE__ */ jsx(
|
|
111
|
+
children: /* @__PURE__ */ jsxs(ReduceGraphicsContext, { reduceGraphics: isReducedGraphicsMode, children: [
|
|
112
|
+
/* @__PURE__ */ jsx(LikeC4Styles, {}),
|
|
113
|
+
/* @__PURE__ */ jsx(RootContainer, { className, reduceGraphics: isReducedGraphicsMode, children: /* @__PURE__ */ jsx(
|
|
114
114
|
ReactFlowProvider,
|
|
115
115
|
{
|
|
116
116
|
fitView,
|
|
@@ -138,8 +138,8 @@ function LikeC4Diagram({
|
|
|
138
138
|
}
|
|
139
139
|
)
|
|
140
140
|
}
|
|
141
|
-
)
|
|
142
|
-
] })
|
|
141
|
+
) })
|
|
142
|
+
] })
|
|
143
143
|
}
|
|
144
144
|
)
|
|
145
145
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Any, DiagramEdge, DiagramNode, LayoutedView, ViewChange, WhereOperator } from '@likec4/core/types';
|
|
1
|
+
import { Any, aux, DiagramEdge, DiagramNode, LayoutedView, ViewChange, WhereOperator } from '@likec4/core/types';
|
|
2
2
|
import { ReactFlowProps as XYFlowProps } from '@xyflow/react';
|
|
3
3
|
import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
|
|
4
4
|
import { SetRequired } from 'type-fest';
|
|
5
5
|
import { ControlsCustomLayout } from './context/ControlsCustomLayout';
|
|
6
6
|
import { CustomNodes } from './custom/customNodes';
|
|
7
|
-
import type * as aux from '@likec4/core/types/_aux';
|
|
8
7
|
export type { CustomNodes, WhereOperator };
|
|
9
8
|
export type DiagramNodeWithNavigate<A extends Any> = SetRequired<DiagramNode<A>, 'navigateTo'>;
|
|
10
9
|
type ElementIconRendererProps = {
|
|
@@ -31,6 +30,25 @@ export type LikeC4ColorScheme = 'light' | 'dark';
|
|
|
31
30
|
export type OverrideReactFlowProps = Pick<XYFlowProps, 'paneClickDistance' | 'nodeClickDistance' | 'selectionKeyCode' | 'panActivationKeyCode' | 'multiSelectionKeyCode' | 'zoomActivationKeyCode' | 'snapToGrid' | 'snapGrid' | 'onlyRenderVisibleElements' | 'nodesDraggable' | 'nodesFocusable' | 'elementsSelectable' | 'selectNodesOnDrag' | 'panOnDrag' | 'preventScrolling' | 'zoomOnScroll' | 'zoomOnPinch' | 'panOnScroll' | 'panOnScrollSpeed' | 'panOnScrollMode' | 'zoomOnDoubleClick' | 'nodeDragThreshold'>;
|
|
32
31
|
export type PaddingUnit = 'px' | '%';
|
|
33
32
|
export type PaddingWithUnit = `${number}${PaddingUnit}` | number;
|
|
33
|
+
/**
|
|
34
|
+
* Padding around the diagram
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* {
|
|
38
|
+
* top: '8px',
|
|
39
|
+
* right: '8px',
|
|
40
|
+
* bottom: '8px',
|
|
41
|
+
* left: '8px',
|
|
42
|
+
* }
|
|
43
|
+
*/
|
|
44
|
+
export type ViewPadding = PaddingWithUnit | {
|
|
45
|
+
top?: PaddingWithUnit;
|
|
46
|
+
right?: PaddingWithUnit;
|
|
47
|
+
bottom?: PaddingWithUnit;
|
|
48
|
+
left?: PaddingWithUnit;
|
|
49
|
+
x?: PaddingWithUnit;
|
|
50
|
+
y?: PaddingWithUnit;
|
|
51
|
+
};
|
|
34
52
|
export interface LikeC4DiagramProperties<A extends aux.Any> {
|
|
35
53
|
view: LayoutedView<A>;
|
|
36
54
|
className?: string | undefined;
|
|
@@ -51,10 +69,11 @@ export interface LikeC4DiagramProperties<A extends aux.Any> {
|
|
|
51
69
|
readonly?: boolean | undefined;
|
|
52
70
|
/**
|
|
53
71
|
* Show/hide panel with top left controls,
|
|
72
|
+
* - `next` - Experimental navigation panel
|
|
54
73
|
*
|
|
55
74
|
* @default true if not readonly
|
|
56
75
|
*/
|
|
57
|
-
controls?: boolean | undefined;
|
|
76
|
+
controls?: boolean | 'next' | undefined;
|
|
58
77
|
/**
|
|
59
78
|
* If set, initial viewport will show all nodes & edges
|
|
60
79
|
* @default true
|
|
@@ -63,8 +82,29 @@ export interface LikeC4DiagramProperties<A extends aux.Any> {
|
|
|
63
82
|
/**
|
|
64
83
|
* Padding around the diagram
|
|
65
84
|
* @default '8px'
|
|
66
|
-
|
|
67
|
-
|
|
85
|
+
*
|
|
86
|
+
* @see {@link ViewPadding}
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```tsx
|
|
90
|
+
* <LikeC4Diagram
|
|
91
|
+
* fitViewPadding={{
|
|
92
|
+
* x: '16px',
|
|
93
|
+
* y: '16px',
|
|
94
|
+
* }}
|
|
95
|
+
* />
|
|
96
|
+
*
|
|
97
|
+
* <LikeC4Diagram
|
|
98
|
+
* fitViewPadding={{
|
|
99
|
+
* top: '8px',
|
|
100
|
+
* right: '8px',
|
|
101
|
+
* bottom: '8px',
|
|
102
|
+
* left: '8px',
|
|
103
|
+
* }}
|
|
104
|
+
* />
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
fitViewPadding?: ViewPadding | undefined;
|
|
68
108
|
/**
|
|
69
109
|
* @default false if readonly
|
|
70
110
|
*/
|
|
@@ -149,8 +189,9 @@ export interface LikeC4DiagramProperties<A extends aux.Any> {
|
|
|
149
189
|
/**
|
|
150
190
|
* Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
|
|
151
191
|
* Enable it if you have a large or static view
|
|
192
|
+
* - `auto` - will be `true` if view has more then 3000 * 2000 pixels
|
|
152
193
|
*
|
|
153
|
-
* @default 'auto'
|
|
194
|
+
* @default 'auto'
|
|
154
195
|
*/
|
|
155
196
|
reduceGraphics?: 'auto' | boolean | undefined;
|
|
156
197
|
/**
|
|
@@ -160,6 +201,11 @@ export interface LikeC4DiagramProperties<A extends aux.Any> {
|
|
|
160
201
|
renderIcon?: ElementIconRenderer | undefined;
|
|
161
202
|
/**
|
|
162
203
|
* Customize layout of the controls on the top left
|
|
204
|
+
*
|
|
205
|
+
* @note
|
|
206
|
+
* Ignored if `controls="next"`
|
|
207
|
+
*
|
|
208
|
+
* @see {@link controls}
|
|
163
209
|
*/
|
|
164
210
|
renderControls?: ControlsCustomLayout | undefined;
|
|
165
211
|
/**
|
|
@@ -186,7 +232,7 @@ export type OpenSourceParams<A extends aux.Any = aux.Any> = {
|
|
|
186
232
|
} | {
|
|
187
233
|
view: aux.StrictViewId<A>;
|
|
188
234
|
};
|
|
189
|
-
export interface LikeC4DiagramEventHandlers<A extends aux.Any> {
|
|
235
|
+
export interface LikeC4DiagramEventHandlers<A extends aux.Any = aux.Any> {
|
|
190
236
|
onChange?: OnChange | null | undefined;
|
|
191
237
|
onNavigateTo?: OnNavigateTo<A> | null | undefined;
|
|
192
238
|
onNodeClick?: OnNodeClick<A> | null | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LikeC4Model } from '@likec4/core/model';
|
|
2
|
-
import {
|
|
2
|
+
import { aux } from '@likec4/core/types';
|
|
3
3
|
import { PropsWithChildren } from 'react';
|
|
4
|
-
export
|
|
4
|
+
export interface LikeC4ModelProviderProps<A extends aux.Any = aux.Unknown> {
|
|
5
5
|
likec4model: LikeC4Model<A>;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
/**
|
|
8
8
|
* Ensures LikeC4Model context
|
|
9
9
|
*/
|
|
10
|
-
export declare function LikeC4ModelProvider<A extends Any = Unknown>({ children, likec4model, }: LikeC4ModelProviderProps<A
|
|
10
|
+
export declare function LikeC4ModelProvider<A extends aux.Any = aux.Unknown>({ children, likec4model, }: PropsWithChildren<LikeC4ModelProviderProps<A>>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LikeC4Project, ProjectId } from '@likec4/core/types';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
export interface LikeC4ProjectsProviderProps {
|
|
4
|
+
/**
|
|
5
|
+
* Projects to be used in the navigation panel.
|
|
6
|
+
* Current project is taken from the LikeC4Model
|
|
7
|
+
*/
|
|
8
|
+
projects: ReadonlyArray<LikeC4Project>;
|
|
9
|
+
/**
|
|
10
|
+
* Optional callback when another project is selected.
|
|
11
|
+
*/
|
|
12
|
+
onProjectChange?: (id: ProjectId) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Ensures LikeC4Projects context
|
|
16
|
+
*/
|
|
17
|
+
export declare function LikeC4ProjectsProvider({ children, projects, onProjectChange: _onProjectChange, }: PropsWithChildren<LikeC4ProjectsProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useCallbackRef } from '@mantine/hooks';
|
|
3
|
+
import { useCustomCompareMemo } from '@react-hookz/web';
|
|
4
|
+
import { shallowEqual } from 'fast-equals';
|
|
5
|
+
import { useContext } from 'react';
|
|
6
|
+
import { LikeC4ProjectsContext } from './likec4model/LikeC4ProjectsContext.js';
|
|
7
|
+
|
|
8
|
+
function LikeC4ProjectsProvider({
|
|
9
|
+
children,
|
|
10
|
+
projects,
|
|
11
|
+
onProjectChange: _onProjectChange
|
|
12
|
+
}) {
|
|
13
|
+
const outerScope = useContext(LikeC4ProjectsContext);
|
|
14
|
+
if (outerScope) {
|
|
15
|
+
console.warn("LikeC4ProjectsProvider should not be nested inside another one");
|
|
16
|
+
}
|
|
17
|
+
const onProjectChange = useCallbackRef(_onProjectChange);
|
|
18
|
+
const value = useCustomCompareMemo(() => ({ projects, onProjectChange }), [projects, onProjectChange], shallowEqual);
|
|
19
|
+
return /* @__PURE__ */ jsx(LikeC4ProjectsContext.Provider, { value, children });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { LikeC4ProjectsProvider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LikeC4Styles(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ThemeColors, defaultTheme } from '@likec4/core';
|
|
3
|
+
import { useMantineStyleNonce } from '@mantine/core';
|
|
4
|
+
import { toRgba, mix, toHex, scale } from 'khroma';
|
|
5
|
+
import { pipe, entries, map, join, range } from 'remeda';
|
|
6
|
+
import globalsCss from './globals.css.js';
|
|
7
|
+
import { useLikeC4Specification } from './likec4model/useLikeC4Model.js';
|
|
8
|
+
|
|
9
|
+
const scheme = (scheme2) => `[data-mantine-color-scheme="${scheme2}"]`;
|
|
10
|
+
const whenDark = scheme("dark");
|
|
11
|
+
const whenLight = scheme("light");
|
|
12
|
+
const MAX_DEPTH = 5;
|
|
13
|
+
const generateCompoundColors = (name, colors, depth) => {
|
|
14
|
+
const compoundDarkColor = (color) => toHex(
|
|
15
|
+
scale(color, {
|
|
16
|
+
l: -22 - 5 * depth,
|
|
17
|
+
s: -10 - 6 * depth
|
|
18
|
+
})
|
|
19
|
+
);
|
|
20
|
+
const compoundLightColor = (color) => toHex(
|
|
21
|
+
scale(color, {
|
|
22
|
+
l: -20 - 3 * depth,
|
|
23
|
+
s: -3 - 6 * depth
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
const selector = `:where([data-likec4-color="${name}"][data-compound-depth="${depth}"])`;
|
|
27
|
+
return `
|
|
28
|
+
${selector} {
|
|
29
|
+
--likec4-palette-fill: ${compoundLightColor(colors.elements.fill)};
|
|
30
|
+
--likec4-palette-stroke: ${compoundLightColor(colors.elements.stroke)};
|
|
31
|
+
}
|
|
32
|
+
${whenDark} ${selector} {
|
|
33
|
+
--likec4-palette-fill: ${compoundDarkColor(colors.elements.fill)};
|
|
34
|
+
--likec4-palette-stroke: ${compoundDarkColor(colors.elements.stroke)};
|
|
35
|
+
}
|
|
36
|
+
`.trim();
|
|
37
|
+
};
|
|
38
|
+
function toStyle(name, colors) {
|
|
39
|
+
const selector = `:where([data-likec4-color=${name}])`;
|
|
40
|
+
return [
|
|
41
|
+
`
|
|
42
|
+
${selector} {
|
|
43
|
+
--likec4-palette-fill: ${colors.elements.fill};
|
|
44
|
+
--likec4-palette-stroke: ${colors.elements.stroke};
|
|
45
|
+
--likec4-palette-hiContrast: ${colors.elements.hiContrast};
|
|
46
|
+
--likec4-palette-loContrast: ${colors.elements.loContrast};
|
|
47
|
+
--likec4-palette-relation-stroke: ${colors.relationships.lineColor};
|
|
48
|
+
--likec4-palette-relation-label: ${colors.relationships.labelColor};
|
|
49
|
+
--likec4-palette-relation-label-bg: ${colors.relationships.labelBgColor};
|
|
50
|
+
}
|
|
51
|
+
${whenLight} ${selector} {
|
|
52
|
+
--likec4-palette-relation-stroke-selected: ${toRgba(mix(colors.relationships.lineColor, "black", 85))};
|
|
53
|
+
}
|
|
54
|
+
${whenDark} ${selector} {
|
|
55
|
+
--likec4-palette-relation-stroke-selected: ${toRgba(mix(colors.relationships.lineColor, "white", 70))};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
`.trim(),
|
|
59
|
+
...range(1, MAX_DEPTH + 1).map((depth) => generateCompoundColors(name, colors, depth))
|
|
60
|
+
].join("\n");
|
|
61
|
+
}
|
|
62
|
+
const builtInColors = ThemeColors.map(
|
|
63
|
+
(color) => toStyle(color, {
|
|
64
|
+
elements: defaultTheme.elements[color],
|
|
65
|
+
relationships: defaultTheme.relationships[color]
|
|
66
|
+
})
|
|
67
|
+
).join("\n");
|
|
68
|
+
function generateCustomColorStyles(customColors) {
|
|
69
|
+
return pipe(
|
|
70
|
+
entries(customColors),
|
|
71
|
+
map(([name, color]) => toStyle(name, color)),
|
|
72
|
+
join("\n")
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
function LikeC4Styles() {
|
|
76
|
+
const nonce = useMantineStyleNonce()?.();
|
|
77
|
+
const customColors = useLikeC4Specification().customColors;
|
|
78
|
+
const customColorsStyles = customColors ? generateCustomColorStyles(customColors) : "";
|
|
79
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
80
|
+
/* @__PURE__ */ jsx("style", { type: "text/css", "data-likec4-global": true, dangerouslySetInnerHTML: { __html: globalsCss }, nonce }),
|
|
81
|
+
/* @__PURE__ */ jsx("style", { type: "text/css", "data-likec4-colors": true, dangerouslySetInnerHTML: { __html: builtInColors }, nonce }),
|
|
82
|
+
customColorsStyles && /* @__PURE__ */ jsx(
|
|
83
|
+
"style",
|
|
84
|
+
{
|
|
85
|
+
type: "text/css",
|
|
86
|
+
"data-likec4-custom-colors": true,
|
|
87
|
+
dangerouslySetInnerHTML: { __html: customColorsStyles },
|
|
88
|
+
nonce
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { LikeC4Styles };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import { Any, UnknownLayouted } from '@likec4/core/types';
|
|
1
2
|
import { LikeC4DiagramProperties } from './LikeC4Diagram.props';
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export declare function StaticLikeC4Diagram<A extends aux.Any = aux.UnknownLayouted>({ view, fitView, fitViewPadding, enableRelationshipDetails, enableRelationshipBrowser, background, ...rest }: StaticLikeC4DiagramProps<A>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export type StaticLikeC4DiagramProps<A extends Any> = Pick<LikeC4DiagramProperties<A>, 'view' | 'className' | 'fitView' | 'fitViewPadding' | 'background' | 'enableElementDetails' | 'enableRelationshipDetails' | 'enableRelationshipBrowser' | 'enableElementTags' | 'reduceGraphics' | 'initialWidth' | 'initialHeight' | 'renderIcon' | 'renderNodes' | 'where'>;
|
|
4
|
+
export declare function StaticLikeC4Diagram<A extends Any = UnknownLayouted>({ view, fitView, fitViewPadding, enableRelationshipDetails, enableRelationshipBrowser, background, ...rest }: StaticLikeC4DiagramProps<A>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactFlowProps } from '@xyflow/react';
|
|
2
2
|
import { SetRequired, Simplify } from 'type-fest';
|
|
3
|
-
import {
|
|
3
|
+
import { ViewPadding } from '../LikeC4Diagram.props';
|
|
4
4
|
import { XYBackground } from './Background';
|
|
5
5
|
import { Base } from './types';
|
|
6
6
|
export type BaseXYFlowProps<NodeType extends Base.Node, EdgeType extends Base.Edge> = Simplify<{
|
|
@@ -9,7 +9,7 @@ export type BaseXYFlowProps<NodeType extends Base.Node, EdgeType extends Base.Ed
|
|
|
9
9
|
nodesSelectable?: boolean;
|
|
10
10
|
nodesDraggable?: boolean;
|
|
11
11
|
background?: 'transparent' | 'solid' | XYBackground;
|
|
12
|
-
fitViewPadding?:
|
|
12
|
+
fitViewPadding?: ViewPadding | undefined;
|
|
13
13
|
onViewportResize?: undefined | (() => void);
|
|
14
14
|
} & SetRequired<Omit<ReactFlowProps<NodeType, EdgeType>, 'defaultNodes' | 'defaultEdges' | 'onNodeDoubleClick' | 'onEdgeDoubleClick' | 'fitViewOptions'>, 'nodes' | 'edges' | 'onNodesChange' | 'onEdgesChange'>>;
|
|
15
15
|
export declare const BaseXYFlow: <NodeType extends Base.Node, EdgeType extends Base.Edge>({ nodes, edges, onEdgesChange, onNodesChange, className, pannable, zoomable, nodesSelectable, nodesDraggable, background, children, colorMode, fitViewPadding, fitView, zoomOnDoubleClick, onViewportResize, onMoveEnd, ...props }: BaseXYFlowProps<NodeType, EdgeType>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/base/BaseXYFlow.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { cx,
|
|
2
|
+
import { cx, cva } from '@likec4/styles/css';
|
|
3
3
|
import { useCallbackRef } from '@mantine/hooks';
|
|
4
4
|
import { ReactFlow, useStore } from '@xyflow/react';
|
|
5
|
-
import {
|
|
5
|
+
import { Fragment } from 'react';
|
|
6
6
|
import { useUpdateEffect } from '../hooks/useUpdateEffect.js';
|
|
7
7
|
import { useIsZoomTooSmall, useXYStoreApi } from '../hooks/useXYFlow.js';
|
|
8
8
|
import { stopPropagation } from '../utils/xyflow.js';
|
|
@@ -10,30 +10,26 @@ import { Background } from './Background.js';
|
|
|
10
10
|
import { MinZoom, MaxZoom } from './const.js';
|
|
11
11
|
import { setHovered } from './types.Base.js';
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// // TODO: this workaround disables animations in Safari (to improve performance)
|
|
22
|
-
// vars: {
|
|
23
|
-
// [vars.safariAnimationHook]: '',
|
|
24
|
-
// },
|
|
25
|
-
// },
|
|
26
|
-
// },
|
|
27
|
-
["--xy-background-color"]: "{colors.mantine.colors.body}",
|
|
28
|
-
["--xy-background-pattern-color"]: {
|
|
29
|
-
_dark: "{colors.mantine.colors.dark[5]}",
|
|
30
|
-
_light: "{colors.mantine.colors.gray[4]}"
|
|
31
|
-
},
|
|
32
|
-
"& .react-flow__pane": {
|
|
33
|
-
WebkitUserSelect: "none"
|
|
13
|
+
const cssReactFlow = cva({
|
|
14
|
+
base: {
|
|
15
|
+
"& .react-flow__pane": {
|
|
16
|
+
WebkitUserSelect: "none"
|
|
17
|
+
},
|
|
18
|
+
"& .react-flow__attribution": {
|
|
19
|
+
display: "none"
|
|
20
|
+
}
|
|
34
21
|
},
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
variants: {
|
|
23
|
+
transparent: {
|
|
24
|
+
true: {
|
|
25
|
+
background: "transparent !important",
|
|
26
|
+
["--xy-background-color"]: "transparent !important"
|
|
27
|
+
},
|
|
28
|
+
false: {
|
|
29
|
+
["--xy-background-color"]: "{colors.likec4.background}",
|
|
30
|
+
["--xy-background-pattern-color"]: "{colors.likec4.background.pattern}"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
37
33
|
}
|
|
38
34
|
});
|
|
39
35
|
const BaseXYFlow = ({
|
|
@@ -66,8 +62,9 @@ const BaseXYFlow = ({
|
|
|
66
62
|
nodes,
|
|
67
63
|
edges,
|
|
68
64
|
className: cx(
|
|
69
|
-
cssReactFlow
|
|
70
|
-
|
|
65
|
+
cssReactFlow({
|
|
66
|
+
transparent: background === "transparent"
|
|
67
|
+
}),
|
|
71
68
|
className
|
|
72
69
|
),
|
|
73
70
|
...isZoomTooSmall && {
|
|
@@ -82,12 +79,12 @@ const BaseXYFlow = ({
|
|
|
82
79
|
maxZoom: zoomable ? MaxZoom : 1,
|
|
83
80
|
minZoom: zoomable ? MinZoom : 1,
|
|
84
81
|
fitView,
|
|
85
|
-
fitViewOptions:
|
|
82
|
+
fitViewOptions: {
|
|
86
83
|
minZoom: MinZoom,
|
|
87
84
|
maxZoom: 1,
|
|
88
85
|
padding: fitViewPadding,
|
|
89
86
|
includeHiddenNodes: false
|
|
90
|
-
}
|
|
87
|
+
},
|
|
91
88
|
preventScrolling: zoomable || pannable,
|
|
92
89
|
defaultMarkerColor: "var(--xy-edge-stroke)",
|
|
93
90
|
noDragClassName: "nodrag",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RichTextOrEmpty as RichTextType } from '@likec4/core/types';
|
|
2
2
|
import { BoxProps } from '@likec4/styles/jsx';
|
|
3
|
+
import { JsxStyleProps } from '@likec4/styles/types';
|
|
3
4
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
5
|
export type MarkdownBlockProps = Omit<BoxProps, 'dangerouslySetInnerHTML' | 'children'> & {
|
|
5
6
|
value: RichTextType;
|
|
@@ -9,10 +10,15 @@ export type MarkdownBlockProps = Omit<BoxProps, 'dangerouslySetInnerHTML' | 'chi
|
|
|
9
10
|
*/
|
|
10
11
|
uselikec4palette?: boolean;
|
|
11
12
|
/**
|
|
12
|
-
* Scale factor for the
|
|
13
|
+
* Scale factor for the block
|
|
13
14
|
* @default 1
|
|
14
15
|
*/
|
|
15
16
|
textScale?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Font size for the block
|
|
19
|
+
* @default 'md'
|
|
20
|
+
*/
|
|
21
|
+
fontSize?: JsxStyleProps['fontSize'];
|
|
16
22
|
/**
|
|
17
23
|
* If true, the component will not render anything if the value is empty.
|
|
18
24
|
* @default false
|
|
@@ -17,7 +17,7 @@ const MarkdownBlock = forwardRef(({
|
|
|
17
17
|
if (value.isEmpty && hideIfEmpty) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
const content = value.nonEmpty ? { dangerouslySetInnerHTML: { __html: value.html } } : { children: /* @__PURE__ */ jsx(Text, { component: "span", fz: "xs", c: "dimmed", children: emptyText }) };
|
|
20
|
+
const content = value.nonEmpty ? { dangerouslySetInnerHTML: { __html: value.html } } : { children: /* @__PURE__ */ jsx(Text, { component: "span", fz: "xs", c: "dimmed", style: { userSelect: "none" }, children: emptyText }) };
|
|
21
21
|
return /* @__PURE__ */ jsx(
|
|
22
22
|
Box,
|
|
23
23
|
{
|
|
@@ -7,7 +7,7 @@ import { useDebouncedValue } from '@mantine/hooks';
|
|
|
7
7
|
import * as m from 'motion/react-m';
|
|
8
8
|
import { stopPropagation } from '../../../utils/xyflow.js';
|
|
9
9
|
import { compoundActionBtn } from './actionbtns.css.js';
|
|
10
|
-
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
10
|
+
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
11
11
|
|
|
12
12
|
function CompoundActionButton({
|
|
13
13
|
data: {
|
|
@@ -24,8 +24,8 @@ function CompoundActionButton({
|
|
|
24
24
|
className: cx(
|
|
25
25
|
css({
|
|
26
26
|
position: "absolute",
|
|
27
|
-
top: "5px",
|
|
28
|
-
left: "4px",
|
|
27
|
+
top: "[5px]",
|
|
28
|
+
left: "[4px]",
|
|
29
29
|
_smallZoom: {
|
|
30
30
|
display: "none"
|
|
31
31
|
}
|
|
@@ -7,7 +7,7 @@ import { useDebouncedValue } from '@mantine/hooks';
|
|
|
7
7
|
import * as m from 'motion/react-m';
|
|
8
8
|
import { stopPropagation } from '../../../utils/xyflow.js';
|
|
9
9
|
import { compoundActionBtn } from './actionbtns.css.js';
|
|
10
|
-
import IconId from '../../../node_modules/.pnpm/@tabler_icons-react@3.
|
|
10
|
+
import IconId from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
|
|
11
11
|
|
|
12
12
|
function CompoundDetailsButton({
|
|
13
13
|
data: {
|
|
@@ -24,8 +24,8 @@ function CompoundDetailsButton({
|
|
|
24
24
|
className: cx(
|
|
25
25
|
css({
|
|
26
26
|
position: "absolute",
|
|
27
|
-
top: "
|
|
28
|
-
right: "
|
|
27
|
+
top: "0.5",
|
|
28
|
+
right: "0.5",
|
|
29
29
|
_smallZoom: {
|
|
30
30
|
display: "none"
|
|
31
31
|
}
|
|
@@ -33,7 +33,7 @@ const root = css.raw({
|
|
|
33
33
|
width: "100%",
|
|
34
34
|
height: "100%",
|
|
35
35
|
border: "transparent",
|
|
36
|
-
background: "likec4
|
|
36
|
+
background: "var(--likec4-palette-fill)",
|
|
37
37
|
backgroundClip: "padding-box",
|
|
38
38
|
transitionDelay: ".075ms"
|
|
39
39
|
},
|
|
@@ -70,7 +70,7 @@ const compoundBorder = css.raw({
|
|
|
70
70
|
background: "transparent",
|
|
71
71
|
borderStyle: "dashed",
|
|
72
72
|
borderWidth: `[${borderWidth.ref}]`,
|
|
73
|
-
borderColor: `[color-mix(in srgb,
|
|
73
|
+
borderColor: `[color-mix(in srgb, var(--likec4-palette-stroke) ${borderOpacityPercent.ref}, transparent)]`
|
|
74
74
|
});
|
|
75
75
|
const indicatorSvg = css.raw({
|
|
76
76
|
position: "absolute",
|
|
@@ -92,12 +92,12 @@ const indicatorSvg = css.raw({
|
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
const indicatorRect = css.raw({
|
|
95
|
-
stroke: `[color-mix(in srgb,
|
|
95
|
+
stroke: `[color-mix(in srgb, var(--likec4-palette-stroke) 60%, var(--likec4-palette-hiContrast))]`,
|
|
96
96
|
strokeWidth: "4",
|
|
97
97
|
fill: "[none]",
|
|
98
98
|
animationStyle: "indicator",
|
|
99
99
|
_light: {
|
|
100
|
-
stroke: `[color-mix(in srgb,
|
|
100
|
+
stroke: `[color-mix(in srgb, var(--likec4-palette-stroke) 80%, var(--likec4-palette-hiContrast))]`
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
const compound = sva({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { cx
|
|
2
|
+
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { m } from 'motion/react';
|
|
4
4
|
import { isNumber, clamp } from 'remeda';
|
|
5
5
|
import { compound, borderOpacityPercent, borderRadius, borderWidth, compoundOpacity } from './CompoundNodeContainer.css.js';
|
|
@@ -44,9 +44,6 @@ function CompoundNodeContainer({
|
|
|
44
44
|
m.div,
|
|
45
45
|
{
|
|
46
46
|
className: cx(
|
|
47
|
-
css({
|
|
48
|
-
likec4Palette: `${data.color}.${depth}`
|
|
49
|
-
}),
|
|
50
47
|
classes.root,
|
|
51
48
|
"likec4-compound-node",
|
|
52
49
|
className
|
|
@@ -8,10 +8,11 @@ const titleContainer = css({
|
|
|
8
8
|
position: "absolute",
|
|
9
9
|
display: "flex",
|
|
10
10
|
alignItems: "center",
|
|
11
|
-
gap: "
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
gap: "1.5",
|
|
12
|
+
// 6px
|
|
13
|
+
left: "[14px]",
|
|
14
|
+
top: "[4px]",
|
|
15
|
+
right: "[30px]",
|
|
15
16
|
width: "auto",
|
|
16
17
|
minHeight: "30px",
|
|
17
18
|
[`:where(.react-flow__node.draggable) &`]: {
|
|
@@ -19,7 +20,7 @@ const titleContainer = css({
|
|
|
19
20
|
cursor: "grab"
|
|
20
21
|
},
|
|
21
22
|
[`.likec4-compound-node:has(.compound-action) &`]: {
|
|
22
|
-
paddingLeft: "22px"
|
|
23
|
+
paddingLeft: "[22px]"
|
|
23
24
|
}
|
|
24
25
|
});
|
|
25
26
|
const titleText = css({
|
|
@@ -29,11 +30,11 @@ const titleText = css({
|
|
|
29
30
|
fontSize: "15px",
|
|
30
31
|
textTransform: "uppercase",
|
|
31
32
|
letterSpacing: "0.2px",
|
|
32
|
-
color: "likec4
|
|
33
|
+
color: "var(--likec4-palette-loContrast)",
|
|
33
34
|
"[data-compound-title-inverse] &": {
|
|
34
35
|
color: {
|
|
35
|
-
base: "[color-mix(in srgb,
|
|
36
|
-
_light: "likec4
|
|
36
|
+
base: "[color-mix(in srgb, var(--likec4-palette-loContrast) 60%, var(--likec4-palette-fill))]",
|
|
37
|
+
_light: "var(--likec4-palette-stroke)"
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
});
|
|
@@ -5,14 +5,14 @@ const compoundActionBtn = cva({
|
|
|
5
5
|
transitionDuration: "normal",
|
|
6
6
|
"[data-compound-title-inverse] &": {
|
|
7
7
|
_dark: {
|
|
8
|
-
"--actionbtn-color": "color-mix(in srgb,
|
|
8
|
+
"--actionbtn-color": "color-mix(in srgb, var(--likec4-palette-loContrast) 60%, var(--likec4-palette-fill))"
|
|
9
9
|
},
|
|
10
10
|
_light: {
|
|
11
|
-
"--actionbtn-color": "
|
|
12
|
-
"--actionbtn-color-hovered": "
|
|
13
|
-
"--actionbtn-color-hovered-btn": "
|
|
14
|
-
"--actionbtn-bg-hovered": `
|
|
15
|
-
"--actionbtn-bg-hovered-btn": `
|
|
11
|
+
"--actionbtn-color": "var(--likec4-palette-stroke)",
|
|
12
|
+
"--actionbtn-color-hovered": "var(--likec4-palette-stroke)",
|
|
13
|
+
"--actionbtn-color-hovered-btn": "var(--likec4-palette-hiContrast)",
|
|
14
|
+
"--actionbtn-bg-hovered": `var(--likec4-palette-fill)/50`,
|
|
15
|
+
"--actionbtn-bg-hovered-btn": `var(--likec4-palette-fill)`
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
},
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cx } from '@likec4/styles/css';
|
|
3
|
+
import { edgeActionBtn } from '@likec4/styles/recipes';
|
|
3
4
|
import { ActionIcon } from '@mantine/core';
|
|
4
5
|
import { stopPropagation } from '../../../utils/xyflow.js';
|
|
5
|
-
import
|
|
6
|
-
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
6
|
+
import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
|
|
7
7
|
|
|
8
8
|
function EdgeActionButton({ icon, onClick }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
10
10
|
ActionIcon,
|
|
11
11
|
{
|
|
12
|
-
className: cx("nodrag nopan",
|
|
12
|
+
className: cx("nodrag nopan", edgeActionBtn()),
|
|
13
13
|
onPointerDownCapture: stopPropagation,
|
|
14
14
|
onClick,
|
|
15
15
|
role: "button",
|