@likec4/diagram 1.26.2 → 1.27.1
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/README.md +1 -1
- package/bundle/index.js +48937 -0
- package/dist/LikeC4CustomColors.js +27 -23
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +38 -43
- package/dist/LikeC4Diagram.props.d.ts +6 -0
- package/dist/LikeC4ModelProvider.js +6 -6
- package/dist/StaticLikeC4Diagram.js +5 -5
- package/dist/_virtual/_commonjsHelpers.js +5 -0
- package/dist/_virtual/default-map.js +7 -0
- package/dist/base/Background.js +6 -6
- package/dist/base/BaseXYFlow.d.ts +1 -1
- package/dist/base/BaseXYFlow.js +75 -46
- package/dist/base/const.js +2 -5
- package/dist/base/primitives/NodeHandles.js +5 -5
- package/dist/base/primitives/compound/CompoundActionButton.js +60 -33
- package/dist/base/primitives/compound/CompoundDetailsButton.js +66 -35
- package/dist/base/primitives/compound/CompoundNodeContainer.css.d.ts +35 -7
- package/dist/base/primitives/compound/CompoundNodeContainer.css.js +131 -12
- package/dist/base/primitives/compound/CompoundNodeContainer.d.ts +4 -20
- package/dist/base/primitives/compound/CompoundNodeContainer.js +99 -97
- package/dist/base/primitives/compound/CompoundTitle.d.ts +1 -1
- package/dist/base/primitives/compound/CompoundTitle.js +74 -12
- package/dist/base/primitives/compound/actionbtns.css.d.ts +11 -0
- package/dist/base/primitives/compound/actionbtns.css.js +32 -0
- package/dist/base/primitives/customEdge.d.ts +5 -5
- package/dist/base/primitives/customEdge.js +6 -7
- package/dist/base/primitives/customNode.js +5 -6
- package/dist/base/primitives/edge/EdgeActionButton.js +10 -12
- package/dist/base/primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base/primitives/edge/EdgeContainer.js +21 -15
- package/dist/base/primitives/edge/EdgeLabel.css.d.ts +24 -10
- package/dist/base/primitives/edge/EdgeLabel.css.js +130 -20
- package/dist/base/primitives/edge/EdgeLabel.d.ts +4 -44
- package/dist/base/primitives/edge/EdgeLabel.js +35 -88
- package/dist/base/primitives/edge/EdgeLabelContainer.d.ts +18 -0
- package/dist/base/primitives/edge/EdgeLabelContainer.js +91 -0
- package/dist/base/primitives/edge/EdgeMarkers.js +5 -6
- package/dist/base/primitives/edge/EdgePath.d.ts +7 -7
- package/dist/base/primitives/edge/EdgePath.js +14 -29
- package/dist/base/primitives/edge/edge.css.d.ts +2 -2
- package/dist/base/primitives/edge/edge.css.js +125 -12
- package/dist/base/primitives/edge/xyvars.d.ts +24 -0
- package/dist/base/primitives/element/ElementActionButtons.js +35 -17
- package/dist/base/primitives/element/ElementDetailsButton.js +34 -16
- package/dist/base/primitives/element/ElementNodeContainer.css.d.ts +0 -1
- package/dist/base/primitives/element/ElementNodeContainer.css.js +51 -5
- package/dist/base/primitives/element/ElementNodeContainer.d.ts +1 -1
- package/dist/base/primitives/element/ElementNodeContainer.js +28 -19
- package/dist/base/primitives/element/ElementShape.css.js +107 -16
- package/dist/base/primitives/element/ElementShape.js +8 -10
- package/dist/base/primitives/element/ElementTitle.css.d.ts +33 -8
- package/dist/base/primitives/element/ElementTitle.css.js +196 -19
- package/dist/base/primitives/element/ElementTitle.js +25 -24
- package/dist/base/primitives/index.d.ts +1 -0
- package/dist/base/types.js +6 -6
- package/dist/base/updateEdges.js +5 -5
- package/dist/base/updateNodes.js +6 -6
- package/dist/bundle/LikeC4ModelProvider.d.ts +9 -0
- package/dist/bundle/LikeC4ModelProvider.js +5 -0
- package/dist/bundle/LikeC4View.d.ts +2 -0
- package/dist/bundle/LikeC4View.js +176 -0
- package/dist/bundle/LikeC4View.props.d.ts +207 -0
- package/dist/bundle/ReactLikeC4.d.ts +36 -0
- package/dist/bundle/ReactLikeC4.js +90 -0
- package/dist/bundle/ShadowRoot.d.ts +12 -0
- package/dist/bundle/ShadowRoot.js +52 -0
- package/dist/bundle/ViewNotFound.d.ts +5 -0
- package/dist/bundle/ViewNotFound.js +30 -0
- package/dist/bundle/font.css.js +3 -0
- package/dist/bundle/index.d.ts +5 -0
- package/dist/bundle/index.js +4 -0
- package/dist/bundle/styles.css.d.ts +10 -0
- package/dist/bundle/styles.css.js +145 -0
- package/dist/components/Link.js +62 -13
- package/dist/components/SearchControl.css.js +72 -9
- package/dist/components/SearchControl.js +11 -11
- package/dist/context/ControlsCustomLayout.js +5 -6
- package/dist/context/DiagramEventHandlers.js +8 -13
- package/dist/context/DiagramFeatures.js +7 -12
- package/dist/context/EnsureMantine.js +6 -6
- package/dist/context/FramerMotionConfig.js +8 -9
- package/dist/context/IconRenderer.js +7 -9
- package/dist/context/ReduceGraphics.d.ts +4 -5
- package/dist/context/ReduceGraphics.js +11 -43
- package/dist/context/RootContainer.js +23 -10
- package/dist/hooks/safeContext.js +5 -7
- package/dist/hooks/useCurrentViewId.js +6 -6
- package/dist/hooks/useDiagram.d.ts +5763 -5286
- package/dist/hooks/useDiagram.js +13 -17
- package/dist/hooks/useMantinePortalProps.js +5 -5
- package/dist/hooks/useOverlaysActor.d.ts +2 -0
- package/dist/hooks/useOverlaysActor.js +10 -0
- package/dist/hooks/useReducedGraphics.d.ts +1 -1
- package/dist/hooks/useSetState.js +5 -5
- package/dist/hooks/useUpdateEffect.js +6 -7
- package/dist/hooks/useXYFlow.d.ts +28 -28
- package/dist/hooks/useXYFlow.js +7 -11
- package/dist/index.d.ts +0 -1
- package/dist/index.js +10 -26
- package/dist/likec4diagram/DiagramUI.js +13 -13
- package/dist/likec4diagram/DiagramXYFlow.d.ts +1 -4
- package/dist/likec4diagram/DiagramXYFlow.js +83 -37
- package/dist/likec4diagram/custom/edges/NotePopover.css.js +21 -7
- package/dist/likec4diagram/custom/edges/NotePopover.js +18 -27
- package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +9 -9
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +127 -122
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.d.ts +1 -0
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.js +38 -11
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.d.ts +3 -3
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +28 -30
- package/dist/likec4diagram/custom/edges/edges.css.js +44 -9
- package/dist/likec4diagram/custom/edges/utils.js +6 -7
- package/dist/likec4diagram/custom/index.d.ts +9 -9
- package/dist/likec4diagram/custom/index.js +5 -6
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +7 -7
- package/dist/likec4diagram/custom/nodes/ElementActions.js +8 -9
- package/dist/likec4diagram/custom/nodes/nodeTypes.js +22 -26
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +10 -13
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +15 -16
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +12 -13
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +17 -14
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +15 -20
- package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +15 -5
- package/dist/likec4diagram/ui/controls/ChangeAutoLayoutButton.js +15 -15
- package/dist/likec4diagram/ui/controls/Controls.js +24 -24
- package/dist/likec4diagram/ui/controls/LayoutDriftNotification.js +19 -12
- package/dist/likec4diagram/ui/controls/ManualLayoutToolsButton.js +8 -8
- package/dist/likec4diagram/ui/controls/NavigationButtons.js +8 -8
- package/dist/likec4diagram/ui/controls/ToggleReadonly.js +7 -7
- package/dist/likec4diagram/ui/controls/_shared.js +4 -5
- package/dist/likec4diagram/ui/controls/styles.css.js +79 -17
- package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.css.js +49 -9
- package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +12 -12
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +85 -15
- package/dist/likec4diagram/ui/notation/NotationPanel.js +32 -32
- package/dist/likec4diagram/ui/search/ElementsColumn.css.d.ts +0 -5
- package/dist/likec4diagram/ui/search/ElementsColumn.css.js +70 -30
- package/dist/likec4diagram/ui/search/ElementsColumn.js +40 -33
- package/dist/likec4diagram/ui/search/LikeC4Search.css.js +87 -20
- package/dist/likec4diagram/ui/search/LikeC4Search.js +18 -17
- package/dist/likec4diagram/ui/search/SearchInput.js +22 -24
- package/dist/likec4diagram/ui/search/ViewsColum.js +22 -22
- package/dist/likec4diagram/ui/search/ViewsColumn.css.d.ts +0 -2
- package/dist/likec4diagram/ui/search/ViewsColumn.css.js +29 -14
- package/dist/likec4diagram/ui/search/_shared.css.d.ts +3 -17
- package/dist/likec4diagram/ui/search/_shared.css.js +171 -0
- package/dist/likec4diagram/ui/search/state.js +12 -22
- package/dist/likec4diagram/ui/search/utils.js +2 -5
- package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.css.js +66 -10
- package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.js +18 -27
- package/dist/likec4diagram/useLayoutConstraints.d.ts +11 -10
- package/dist/likec4diagram/useLayoutConstraints.js +100 -104
- package/dist/likec4diagram/useViewToNodesEdges.js +12 -13
- package/dist/likec4model/LikeC4ModelContext.js +4 -4
- package/dist/likec4model/useLikeC4ElementsTree.js +6 -7
- package/dist/likec4model/useLikeC4Model.js +6 -6
- package/dist/node_modules/.pnpm/mnemonist@0.40.3_patch_hash_5c12abb43fcff6fd81e53021b89075d53249640d165a2556cc1e58d71201a13a/node_modules/mnemonist/default-map.js +172 -0
- package/dist/overlays/Overlays.js +22 -22
- package/dist/overlays/element-details/ElementDetails.js +9 -9
- package/dist/overlays/element-details/ElementDetailsCard.css.d.ts +2 -3
- package/dist/overlays/element-details/ElementDetailsCard.css.js +237 -35
- package/dist/overlays/element-details/ElementDetailsCard.js +44 -46
- package/dist/overlays/element-details/TabPanelDeployments.css.js +62 -11
- package/dist/overlays/element-details/TabPanelDeployments.js +11 -11
- package/dist/overlays/element-details/TabPanelRelationships.css.js +99 -9
- package/dist/overlays/element-details/TabPanelRelationships.js +41 -14
- package/dist/overlays/element-details/TabPanelStructure.css.js +36 -7
- package/dist/overlays/element-details/TabPanelStructure.js +8 -9
- package/dist/overlays/element-details/actor.d.ts +21892 -22686
- package/dist/overlays/element-details/actor.js +18 -19
- package/dist/overlays/element-details/actorContext.js +4 -5
- package/dist/overlays/overlay/Overlay.css.d.ts +2 -2
- package/dist/overlays/overlay/Overlay.css.js +76 -98
- package/dist/overlays/overlay/Overlay.d.ts +2 -2
- package/dist/overlays/overlay/Overlay.js +99 -94
- package/dist/overlays/overlaysActor.d.ts +6 -6
- package/dist/overlays/overlaysActor.js +17 -18
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +49 -0
- package/dist/overlays/relationship-details/RelationshipDetails.js +24 -17
- package/dist/overlays/relationship-details/SelectEdge.css.js +82 -17
- package/dist/overlays/relationship-details/SelectEdge.js +15 -17
- package/dist/overlays/relationship-details/actor.js +9 -9
- package/dist/overlays/relationship-details/custom/ElementActions.js +8 -8
- package/dist/overlays/relationship-details/custom/edgeTypes.d.ts +44 -46
- package/dist/overlays/relationship-details/custom/edgeTypes.js +49 -50
- package/dist/overlays/relationship-details/custom/index.d.ts +2 -2
- package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +28 -30
- package/dist/overlays/relationship-details/custom/nodeTypes.js +31 -35
- package/dist/overlays/relationship-details/hooks.js +9 -13
- package/dist/overlays/relationship-details/useLayoutedDetails.js +17 -19
- package/dist/overlays/relationships-browser/-useRelationshipsView.d.ts +8 -24
- package/dist/overlays/relationships-browser/-useRelationshipsView.js +50 -85
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +48 -0
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +101 -101
- package/dist/overlays/relationships-browser/SelectElement.css.js +22 -9
- package/dist/overlays/relationships-browser/SelectElement.d.ts +2 -7
- package/dist/overlays/relationships-browser/SelectElement.js +196 -112
- package/dist/overlays/relationships-browser/_types.d.ts +4 -1
- package/dist/overlays/relationships-browser/actor.d.ts +478 -351
- package/dist/overlays/relationships-browser/actor.js +108 -94
- package/dist/overlays/relationships-browser/const.d.ts +1 -1
- package/dist/overlays/relationships-browser/const.js +3 -4
- package/dist/overlays/relationships-browser/custom/ElementActions.js +9 -9
- package/dist/overlays/relationships-browser/custom/EmptyNode.js +6 -6
- package/dist/overlays/relationships-browser/custom/edgeTypes.d.ts +43 -44
- package/dist/overlays/relationships-browser/custom/edgeTypes.js +97 -65
- package/dist/overlays/relationships-browser/custom/index.d.ts +2 -2
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +37 -37
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +36 -40
- package/dist/overlays/relationships-browser/custom/styles.css.js +14 -5
- package/dist/overlays/relationships-browser/hooks.d.ts +14 -6
- package/dist/overlays/relationships-browser/hooks.js +25 -16
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +13 -18
- package/dist/packages/core/src/compute-view/relationships-view/compute.js +123 -0
- package/dist/packages/core/src/compute-view/relationships-view/utils.js +68 -0
- package/dist/packages/core/src/errors/index.js +15 -0
- package/dist/packages/core/src/utils/fqn.js +43 -0
- package/dist/packages/core/src/utils/guards.js +7 -0
- package/dist/packages/core/src/utils/iterable/filter.js +21 -0
- package/dist/packages/core/src/utils/iterable/map.js +18 -0
- package/dist/packages/core/src/utils/iterable/to.js +14 -0
- package/dist/src/index.ts.d.ts +2 -0
- package/dist/state/DiagramActorProvider.d.ts +4 -2
- package/dist/state/DiagramActorProvider.js +44 -52
- package/dist/state/aligners.js +22 -31
- package/dist/state/assign.js +13 -23
- package/dist/state/diagram-machine.d.ts +5988 -5461
- package/dist/state/diagram-machine.js +476 -376
- package/dist/state/hotkeyActor.js +5 -5
- package/dist/state/inspector.d.ts +1 -1
- package/dist/state/persistence.js +4 -4
- package/dist/state/syncManualLayoutActor.d.ts +1 -1
- package/dist/state/syncManualLayoutActor.js +10 -10
- package/dist/state/utils.js +4 -9
- package/dist/styles.css.js +3 -0
- package/dist/utils/vector.js +2 -4
- package/dist/utils/xyflow.js +7 -12
- package/package.json +43 -42
- package/src/LikeC4CustomColors.tsx +44 -20
- package/src/LikeC4Diagram.props.ts +32 -0
- package/src/LikeC4Diagram.tsx +17 -21
- package/src/base/BaseXYFlow.tsx +67 -43
- package/src/base/primitives/compound/CompoundActionButton.tsx +41 -20
- package/src/base/primitives/compound/CompoundDetailsButton.tsx +48 -25
- package/src/base/primitives/compound/CompoundNodeContainer.css.ts +111 -111
- package/src/base/primitives/compound/CompoundNodeContainer.tsx +92 -92
- package/src/base/primitives/compound/CompoundTitle.tsx +73 -7
- package/src/base/primitives/compound/actionbtns.css.ts +30 -0
- package/src/base/primitives/customEdge.ts +2 -3
- package/src/base/primitives/edge/EdgeActionButton.tsx +3 -5
- package/src/base/primitives/edge/EdgeContainer.tsx +17 -9
- package/src/base/primitives/edge/EdgeLabel.css.ts +110 -177
- package/src/base/primitives/edge/EdgeLabel.tsx +43 -114
- package/src/base/primitives/edge/EdgeLabelContainer.tsx +118 -0
- package/src/base/primitives/edge/EdgePath.tsx +28 -37
- package/src/base/primitives/edge/edge.css.ts +107 -132
- package/src/base/primitives/edge/xyvars.ts +31 -0
- package/src/base/primitives/element/ElementActionButtons.tsx +30 -10
- package/src/base/primitives/element/ElementDetailsButton.tsx +27 -8
- package/src/base/primitives/element/ElementNodeContainer.css.ts +44 -70
- package/src/base/primitives/element/ElementNodeContainer.tsx +18 -8
- package/src/base/primitives/element/ElementShape.css.ts +70 -114
- package/src/base/primitives/element/ElementShape.tsx +0 -1
- package/src/base/primitives/element/ElementTitle.css.ts +169 -124
- package/src/base/primitives/element/ElementTitle.tsx +16 -16
- package/src/base/primitives/index.ts +1 -0
- package/src/base/types.ts +2 -2
- package/src/bundle/LikeC4ModelProvider.tsx +12 -0
- package/src/bundle/LikeC4View.props.ts +249 -0
- package/src/bundle/LikeC4View.tsx +196 -0
- package/src/bundle/ReactLikeC4.tsx +148 -0
- package/src/bundle/ShadowRoot.tsx +60 -0
- package/src/bundle/ViewNotFound.tsx +25 -0
- package/src/bundle/font.css +251 -0
- package/src/bundle/index.ts +7 -0
- package/src/bundle/react-dom-server-mock.ts +3 -0
- package/src/bundle/styles.css.ts +168 -0
- package/src/components/Link.tsx +59 -6
- package/src/components/SearchControl.css.ts +52 -59
- package/src/components/SearchControl.tsx +2 -5
- package/src/context/ReduceGraphics.tsx +9 -47
- package/src/context/RootContainer.tsx +21 -5
- package/src/hooks/safeContext.tsx +2 -3
- package/src/hooks/useCurrentViewId.ts +4 -4
- package/src/hooks/useDiagram.ts +4 -3
- package/src/hooks/useOverlaysActor.ts +11 -0
- package/src/hooks/useReducedGraphics.ts +8 -1
- package/src/hooks/useXYFlow.ts +2 -2
- package/src/index.ts +1 -3
- package/src/likec4diagram/DiagramUI.tsx +2 -2
- package/src/likec4diagram/DiagramXYFlow.tsx +83 -27
- package/src/likec4diagram/custom/edges/NotePopover.css.ts +7 -13
- package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +108 -90
- package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.ts +23 -44
- package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +26 -24
- package/src/likec4diagram/custom/edges/edges.css.ts +25 -32
- package/src/likec4diagram/custom/nodes/nodeTypes.tsx +2 -2
- package/src/likec4diagram/custom/nodes/toolbar/Toolbar.tsx +10 -6
- package/src/likec4diagram/custom/nodes/toolbar/styles.css.ts +8 -4
- package/src/likec4diagram/ui/controls/LayoutDriftNotification.tsx +8 -4
- package/src/likec4diagram/ui/controls/styles.css.ts +46 -57
- package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.css.ts +38 -34
- package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +4 -4
- package/src/likec4diagram/ui/notation/NotationPanel.css.ts +44 -56
- package/src/likec4diagram/ui/notation/NotationPanel.tsx +17 -14
- package/src/likec4diagram/ui/search/ElementsColumn.css.ts +80 -85
- package/src/likec4diagram/ui/search/ElementsColumn.tsx +21 -14
- package/src/likec4diagram/ui/search/LikeC4Search.css.ts +50 -67
- package/src/likec4diagram/ui/search/LikeC4Search.tsx +1 -2
- package/src/likec4diagram/ui/search/SearchInput.tsx +2 -2
- package/src/likec4diagram/ui/search/ViewsColum.tsx +10 -7
- package/src/likec4diagram/ui/search/ViewsColumn.css.ts +29 -28
- package/src/likec4diagram/ui/search/_shared.css.ts +158 -74
- package/src/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.css.ts +31 -34
- package/src/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.tsx +6 -6
- package/src/likec4diagram/useLayoutConstraints.ts +84 -89
- package/src/likec4diagram/useViewToNodesEdges.ts +2 -1
- package/src/overlays/Overlays.tsx +7 -5
- package/src/overlays/element-details/ElementDetailsCard.css.ts +143 -177
- package/src/overlays/element-details/ElementDetailsCard.tsx +29 -29
- package/src/overlays/element-details/TabPanelDeployments.css.ts +49 -54
- package/src/overlays/element-details/TabPanelRelationships.css.ts +62 -66
- package/src/overlays/element-details/TabPanelRelationships.tsx +32 -3
- package/src/overlays/element-details/TabPanelStructure.css.ts +26 -26
- package/src/overlays/element-details/actor.ts +4 -2
- package/src/overlays/overlay/Overlay.css.ts +53 -47
- package/src/overlays/overlay/Overlay.tsx +102 -98
- package/src/overlays/overlaysActor.ts +1 -0
- package/src/overlays/relationship-details/RelationshipDetails.tsx +15 -3
- package/src/overlays/relationship-details/SelectEdge.css.ts +52 -71
- package/src/overlays/relationship-details/SelectEdge.tsx +1 -2
- package/src/overlays/relationship-details/custom/edgeTypes.tsx +35 -30
- package/src/overlays/relationship-details/custom/index.ts +2 -0
- package/src/overlays/relationship-details/custom/nodeTypes.tsx +20 -24
- package/src/overlays/relationship-details/custom/styles.css.ts +8 -8
- package/src/overlays/relationship-details/useLayoutedDetails.ts +1 -1
- package/src/overlays/relationships-browser/-useRelationshipsView.ts +55 -82
- package/src/overlays/relationships-browser/RelationshipsBrowser.tsx +39 -36
- package/src/overlays/relationships-browser/SelectElement.css.ts +9 -12
- package/src/overlays/relationships-browser/SelectElement.tsx +192 -105
- package/src/overlays/relationships-browser/_types.ts +4 -9
- package/src/overlays/relationships-browser/actor.ts +144 -123
- package/src/overlays/relationships-browser/const.ts +1 -1
- package/src/overlays/relationships-browser/custom/EmptyNode.tsx +2 -2
- package/src/overlays/relationships-browser/custom/edgeTypes.tsx +95 -59
- package/src/overlays/relationships-browser/custom/index.ts +2 -0
- package/src/overlays/relationships-browser/custom/nodeTypes.tsx +25 -26
- package/src/overlays/relationships-browser/custom/styles.css.ts +5 -6
- package/src/overlays/relationships-browser/hooks.ts +17 -3
- package/src/overlays/relationships-browser/useViewToNodesEdges.ts +4 -10
- package/src/state/DiagramActorProvider.tsx +37 -46
- package/src/state/assign.ts +2 -2
- package/src/state/diagram-machine.ts +477 -366
- package/src/state/inspector.ts +1 -1
- package/src/styles.css +3 -0
- package/dist/LikeC4Diagram.css.d.ts +0 -8
- package/dist/LikeC4Diagram.css.js +0 -11
- package/dist/base/example/RelationshipsBrowser.d.ts +0 -6
- package/dist/base/example/_types.d.ts +0 -20
- package/dist/base/example/custom.d.ts +0 -72
- package/dist/base/example/useViewToNodesEdges.d.ts +0 -6
- package/dist/base/primitives/compound/CompoundActionButton.css.d.ts +0 -2
- package/dist/base/primitives/compound/CompoundActionButton.css.js +0 -8
- package/dist/base/primitives/compound/CompoundDetailsButton.css.d.ts +0 -3
- package/dist/base/primitives/compound/CompoundDetailsButton.css.js +0 -8
- package/dist/base/primitives/compound/CompoundTitle.css.d.ts +0 -3
- package/dist/base/primitives/compound/CompoundTitle.css.js +0 -10
- package/dist/base/primitives/element/ElementActionButtons.css.d.ts +0 -3
- package/dist/base/primitives/element/ElementActionButtons.css.js +0 -10
- package/dist/base/primitives/element/ElementDetailsButton.css.d.ts +0 -3
- package/dist/base/primitives/element/ElementDetailsButton.css.js +0 -8
- package/dist/base/primitives/element/vars.css.d.ts +0 -3
- package/dist/base/primitives/element/vars.css.ts.vanilla.css.js +0 -1
- package/dist/components/Link.css.d.ts +0 -3
- package/dist/components/Link.css.js +0 -9
- package/dist/diagram.css +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Accordion/Accordion.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ActionIcon/ActionIcon.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Affix/Affix.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Alert/Alert.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Anchor/Anchor.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/AngleSlider/AngleSlider.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/AppShell/AppShell.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/AspectRatio/AspectRatio.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Avatar/Avatar.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/BackgroundImage/BackgroundImage.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Badge/Badge.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Blockquote/Blockquote.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Breadcrumbs/Breadcrumbs.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Burger/Burger.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Button/Button.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Card/Card.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Center/Center.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Checkbox/Checkbox.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Checkbox/CheckboxCard/CheckboxCard.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Checkbox/CheckboxIndicator/CheckboxIndicator.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Chip/Chip.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/CloseButton/CloseButton.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Code/Code.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ColorInput/ColorInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ColorPicker/ColorPicker.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ColorSwatch/ColorSwatch.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Combobox/Combobox.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Container/Container.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Dialog/Dialog.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Divider/Divider.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Drawer/Drawer.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Fieldset/Fieldset.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Flex/Flex.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/FloatingIndicator/FloatingIndicator.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Grid/Grid.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Group/Group.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Image/Image.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Indicator/Indicator.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/InlineInput/InlineInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Input/Input.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Kbd/Kbd.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/List/List.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Loader/Loader.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/LoadingOverlay/LoadingOverlay.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Mark/Mark.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Menu/Menu.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Modal/Modal.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ModalBase/ModalBase.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/NavLink/NavLink.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Notification/Notification.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/NumberInput/NumberInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Overlay/Overlay.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Pagination/Pagination.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Paper/Paper.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/PasswordInput/PasswordInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Pill/Pill.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/PillsInput/PillsInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/PinInput/PinInput.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Popover/Popover.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Progress/Progress.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Radio/Radio.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Radio/RadioCard/RadioCard.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Radio/RadioIndicator/RadioIndicator.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Rating/Rating.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/RingProgress/RingProgress.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ScrollArea/ScrollArea.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/SegmentedControl/SegmentedControl.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/SemiCircleProgress/SemiCircleProgress.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/SimpleGrid/SimpleGrid.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Skeleton/Skeleton.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Slider/Slider.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Spoiler/Spoiler.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Stack/Stack.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Stepper/Stepper.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Switch/Switch.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Table/Table.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/TableOfContents/TableOfContents.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Tabs/Tabs.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Text/Text.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/ThemeIcon/ThemeIcon.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Timeline/Timeline.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Title/Title.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Tooltip/Tooltip.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/Tree/Tree.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/TypographyStylesProvider/TypographyStylesProvider.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/UnstyledButton/UnstyledButton.module.css.mjs.vanilla.css.js +0 -1
- package/dist/node_modules/.pnpm/@mantine_core@7.17.1_@mantine_hooks@7.17.1_react@19.0.0__@types_react@19.0.10_react-dom_fbfa2b80048a2180882527b4a447e1ea/node_modules/@mantine/core/esm/components/VisuallyHidden/VisuallyHidden.module.css.mjs.vanilla.css.js +0 -1
- package/dist/theme-vars.css.d.ts +0 -63
- package/dist/theme-vars.css.js +0 -7
- package/dist/theme-vars.css.ts.vanilla.css.js +0 -1
- package/dist/theme-vars.d.ts +0 -16
- package/dist/theme-vars.js +0 -7
- package/dist/utils/css.js +0 -10
- package/src/LikeC4Diagram.css.ts +0 -198
- package/src/base/example/RelationshipsBrowser.tsx +0 -62
- package/src/base/example/_types.ts +0 -72
- package/src/base/example/custom.tsx +0 -58
- package/src/base/example/useViewToNodesEdges.ts +0 -194
- package/src/base/primitives/compound/CompoundActionButton.css.ts +0 -52
- package/src/base/primitives/compound/CompoundDetailsButton.css.ts +0 -58
- package/src/base/primitives/compound/CompoundTitle.css.ts +0 -65
- package/src/base/primitives/element/ElementActionButtons.css.ts +0 -52
- package/src/base/primitives/element/ElementDetailsButton.css.ts +0 -50
- package/src/base/primitives/element/vars.css.ts +0 -5
- package/src/components/Link.css.ts +0 -49
- package/src/overlays/relationship-details/custom/index.tsx +0 -2
- package/src/overlays/relationships-browser/custom/index.tsx +0 -2
- package/src/theme-vars.css.ts +0 -69
- package/src/theme-vars.ts +0 -25
|
@@ -1,35 +1,237 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
1
|
+
import { css } from '@likec4/styles/css';
|
|
2
|
+
|
|
3
|
+
const backdropBlur = "--_blur";
|
|
4
|
+
const backdropOpacity = "--_opacity";
|
|
5
|
+
const dialog = css({
|
|
6
|
+
boxSizing: "border-box",
|
|
7
|
+
margin: 0,
|
|
8
|
+
padding: 0,
|
|
9
|
+
position: "fixed",
|
|
10
|
+
inset: 0,
|
|
11
|
+
width: "100vw",
|
|
12
|
+
height: "100vh",
|
|
13
|
+
maxWidth: "100vw",
|
|
14
|
+
maxHeight: "100vh",
|
|
15
|
+
background: "[transparent]",
|
|
16
|
+
border: "transparent",
|
|
17
|
+
_backdrop: {
|
|
18
|
+
// WebkitBackdropFilter: `blur(${backdropBlur})`,
|
|
19
|
+
backdropFilter: "auto",
|
|
20
|
+
backdropBlur: `var(${backdropBlur})`,
|
|
21
|
+
backgroundColor: `[rgb(36 36 36 / var(${backdropOpacity}, 5%))]`
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const card = css({
|
|
25
|
+
position: "absolute",
|
|
26
|
+
pointerEvents: "all",
|
|
27
|
+
gap: "lg",
|
|
28
|
+
justifyContent: "stretch",
|
|
29
|
+
backgroundColor: "mantine.colors.body",
|
|
30
|
+
backgroundImage: `linear-gradient(180deg, {colors.likec4.palette.fill}, {colors.likec4.palette.fill} 4px, transparent 4px)`,
|
|
31
|
+
borderTopColor: "likec4.palette.fill",
|
|
32
|
+
_dark: {
|
|
33
|
+
backgroundColor: `mantine.colors.dark[6]`,
|
|
34
|
+
backgroundImage: `
|
|
35
|
+
linear-gradient(180deg, color-mix(in srgb, {colors.likec4.palette.fill} 15%, transparent), transparent 80px),
|
|
36
|
+
linear-gradient(180deg, {colors.likec4.palette.fill}, {colors.likec4.palette.fill} 4px, transparent 4px)
|
|
37
|
+
`
|
|
38
|
+
},
|
|
39
|
+
"& .react-flow__attribution": {
|
|
40
|
+
display: "none"
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const cardHeader = css({
|
|
44
|
+
flex: 0,
|
|
45
|
+
cursor: "move"
|
|
46
|
+
});
|
|
47
|
+
const title = css({
|
|
48
|
+
display: "block",
|
|
49
|
+
fontFamily: "likec4.element",
|
|
50
|
+
fontOpticalSizing: "auto",
|
|
51
|
+
fontStyle: "normal",
|
|
52
|
+
fontWeight: 600,
|
|
53
|
+
fontSize: "24px",
|
|
54
|
+
// lineHeight: 1.15,
|
|
55
|
+
lineHeight: "xs"
|
|
56
|
+
// color: vars.element.hiContrast
|
|
57
|
+
});
|
|
58
|
+
const iconSize = "40px";
|
|
59
|
+
const elementIcon = css({
|
|
60
|
+
flex: `0 0 ${iconSize}`,
|
|
61
|
+
height: iconSize,
|
|
62
|
+
width: iconSize,
|
|
63
|
+
display: "flex",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
justifyContent: "center",
|
|
66
|
+
alignSelf: "flex-start",
|
|
67
|
+
cursor: "move",
|
|
68
|
+
_dark: {
|
|
69
|
+
mixBlendMode: "hard-light"
|
|
70
|
+
},
|
|
71
|
+
"& :where(svg, img)": {
|
|
72
|
+
width: "100%",
|
|
73
|
+
height: "auto",
|
|
74
|
+
maxHeight: "100%",
|
|
75
|
+
pointerEvents: "none",
|
|
76
|
+
filter: `
|
|
77
|
+
drop-shadow(0 0 3px rgb(0 0 0 / 10%))
|
|
78
|
+
drop-shadow(0 1px 8px rgb(0 0 0 / 5%))
|
|
79
|
+
drop-shadow(1px 1px 16px rgb(0 0 0 / 2%))
|
|
80
|
+
`
|
|
81
|
+
},
|
|
82
|
+
"& img": {
|
|
83
|
+
objectFit: "contain"
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
const viewTitleColor = "--view-title-color";
|
|
87
|
+
const iconColor = "--icon-color";
|
|
88
|
+
const viewButton = css({
|
|
89
|
+
// display: 'flex',
|
|
90
|
+
width: "100%",
|
|
91
|
+
background: "mantine.colors.body",
|
|
92
|
+
borderRadius: "sm",
|
|
93
|
+
padding: `10px 8px`,
|
|
94
|
+
// gap: 6,
|
|
95
|
+
// alignItems: 'flex-start',
|
|
96
|
+
transition: "fast",
|
|
97
|
+
border: `1px dashed`,
|
|
98
|
+
borderColor: "mantine.colors.defaultBorder",
|
|
99
|
+
[viewTitleColor]: "{colors.mantine.colors.dark[1]}",
|
|
100
|
+
_hover: {
|
|
101
|
+
background: "mantine.colors.defaultHover",
|
|
102
|
+
[iconColor]: "{colors.mantine.colors.dark[1]}",
|
|
103
|
+
[viewTitleColor]: "{colors.mantine.colors.defaultColor}"
|
|
104
|
+
},
|
|
105
|
+
_dark: {
|
|
106
|
+
background: "mantine.colors.dark[6]"
|
|
107
|
+
},
|
|
108
|
+
_light: {
|
|
109
|
+
[iconColor]: "{colors.mantine.colors.gray[6]}",
|
|
110
|
+
[viewTitleColor]: "{colors.mantine.colors.gray[7]}",
|
|
111
|
+
_hover: {
|
|
112
|
+
[iconColor]: "{colors.mantine.colors.gray[7]}"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"& .mantine-ThemeIcon-root": {
|
|
116
|
+
transition: "fast",
|
|
117
|
+
// color: fallbackVar(iconColor, 'mantine.colors.dark[2])',
|
|
118
|
+
color: `[var(${iconColor}, {colors.mantine.colors.dark[2]})]`,
|
|
119
|
+
"--ti-size": "22px",
|
|
120
|
+
_hover: {
|
|
121
|
+
color: "mantine.colors.defaultColor"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"& > *": {
|
|
125
|
+
transition: `all 130ms {easings.inOut}`
|
|
126
|
+
},
|
|
127
|
+
"&:hover > *": {
|
|
128
|
+
transitionTimingFunction: "out",
|
|
129
|
+
transform: "translateX(1.6px)"
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
const viewButtonTitle = css({
|
|
133
|
+
transition: "fast",
|
|
134
|
+
color: `[var(${viewTitleColor}, {colors.mantine.colors.gray[7]})]`,
|
|
135
|
+
fontSize: "15px",
|
|
136
|
+
fontWeight: 500,
|
|
137
|
+
lineHeight: "1.4"
|
|
138
|
+
});
|
|
139
|
+
const tabsRoot = css({
|
|
140
|
+
flex: 1,
|
|
141
|
+
display: "flex",
|
|
142
|
+
flexDirection: "column",
|
|
143
|
+
justifyContent: "stretch",
|
|
144
|
+
overflow: "hidden",
|
|
145
|
+
gap: "sm"
|
|
146
|
+
});
|
|
147
|
+
const tabsList = css({
|
|
148
|
+
// flex: '0',
|
|
149
|
+
background: "mantine.colors.gray[1]",
|
|
150
|
+
borderRadius: "sm",
|
|
151
|
+
flexWrap: "nowrap",
|
|
152
|
+
gap: "6px",
|
|
153
|
+
padding: "4px",
|
|
154
|
+
_dark: {
|
|
155
|
+
background: "mantine.colors.dark[7]"
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
const tabsTab = css({
|
|
159
|
+
fontSize: "xs",
|
|
160
|
+
fontWeight: 500,
|
|
161
|
+
flexGrow: 1,
|
|
162
|
+
padding: "6px 8px",
|
|
163
|
+
transition: "fast",
|
|
164
|
+
borderRadius: "sm",
|
|
165
|
+
color: "mantine.colors.gray[7]",
|
|
166
|
+
_hover: {
|
|
167
|
+
transitionTimingFunction: "out",
|
|
168
|
+
color: "mantine.colors.defaultColor",
|
|
169
|
+
background: "mantine.colors.gray[3]"
|
|
170
|
+
},
|
|
171
|
+
["&[data-active]"]: {
|
|
172
|
+
transition: "none",
|
|
173
|
+
background: "mantine.colors.white",
|
|
174
|
+
shadow: "xs",
|
|
175
|
+
color: "mantine.colors.defaultColor"
|
|
176
|
+
},
|
|
177
|
+
_dark: {
|
|
178
|
+
color: "mantine.colors.dark[1]",
|
|
179
|
+
_hover: {
|
|
180
|
+
color: "mantine.colors.white",
|
|
181
|
+
background: "mantine.colors.dark[6]"
|
|
182
|
+
},
|
|
183
|
+
[`&:is([data-active])`]: {
|
|
184
|
+
color: "mantine.colors.white",
|
|
185
|
+
background: "mantine.colors.dark[5]"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
const tabsPanel = css({
|
|
190
|
+
flex: 1,
|
|
191
|
+
overflow: "hidden",
|
|
192
|
+
position: "relative",
|
|
193
|
+
"&:not(:has(.mantine-ScrollArea-root))": {
|
|
194
|
+
paddingLeft: "4px",
|
|
195
|
+
paddingRight: "4px"
|
|
196
|
+
},
|
|
197
|
+
"& .mantine-ScrollArea-root": {
|
|
198
|
+
width: "100%",
|
|
199
|
+
height: "100%",
|
|
200
|
+
"& > div": {
|
|
201
|
+
paddingLeft: "4px",
|
|
202
|
+
paddingRight: "4px"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
const propertiesGrid = css({
|
|
207
|
+
flex: 1,
|
|
208
|
+
display: "grid",
|
|
209
|
+
gridTemplateColumns: "min-content 1fr",
|
|
210
|
+
gridAutoRows: "min-content max-content",
|
|
211
|
+
gap: `[20px 16px]`,
|
|
212
|
+
alignItems: "baseline",
|
|
213
|
+
justifyItems: "stretch"
|
|
214
|
+
});
|
|
215
|
+
const propertyLabel = css({
|
|
216
|
+
justifySelf: "end"
|
|
217
|
+
});
|
|
218
|
+
const resizeHandle = css({
|
|
219
|
+
position: "absolute",
|
|
220
|
+
width: "14px",
|
|
221
|
+
height: "14px",
|
|
222
|
+
border: `3.5px solid`,
|
|
223
|
+
borderColor: "mantine.colors.dark[3]",
|
|
224
|
+
borderTop: "none",
|
|
225
|
+
borderLeft: "none",
|
|
226
|
+
borderRadius: "2px",
|
|
227
|
+
bottom: "2px",
|
|
228
|
+
right: "2px",
|
|
229
|
+
transition: "fast",
|
|
230
|
+
cursor: "se-resize",
|
|
231
|
+
_hover: {
|
|
232
|
+
borderWidth: "4px",
|
|
233
|
+
borderColor: "mantine.colors.dark[1]"
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
export { backdropBlur, backdropOpacity, card, cardHeader, dialog, elementIcon, propertiesGrid, propertyLabel, resizeHandle, tabsList, tabsPanel, tabsRoot, tabsTab, title, viewButton, viewButtonTitle };
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from
|
|
2
|
-
import { isScopedElementView, isDeploymentView } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import { useDragControls, useMotionValue, m } from
|
|
9
|
-
import { useState, useCallback, useRef } from
|
|
10
|
-
import { pipe, map, partition, only, clamp, isNullish } from
|
|
11
|
-
import { Link } from
|
|
12
|
-
import { useDiagram } from
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
const backdropBlur = getVarName(backdropBlur$1);
|
|
24
|
-
const backdropOpacity = getVarName(backdropOpacity$1);
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { isScopedElementView, isDeploymentView } from '@likec4/core';
|
|
3
|
+
import { cx, css } from '@likec4/styles/css';
|
|
4
|
+
import { RemoveScroll, Card, Box, Group, Text, CloseButton, Badge, Flex, ActionIconGroup, ActionIcon, Tooltip as Tooltip$1, Tabs, TabsList, TabsTab, TabsPanel, ScrollArea, Stack, Divider as Divider$1, Code, UnstyledButton, ThemeIcon } from '@mantine/core';
|
|
5
|
+
import { useViewportSize, useSessionStorage } from '@mantine/hooks';
|
|
6
|
+
import { useSyncedRef, useDebouncedCallback, useTimeoutEffect } from '@react-hookz/web';
|
|
7
|
+
import { IconExternalLink, IconFileSymlink, IconZoomScan, IconStack2 } from '@tabler/icons-react';
|
|
8
|
+
import { useDragControls, useMotionValue, m } from 'framer-motion';
|
|
9
|
+
import { useState, useCallback, useRef } from 'react';
|
|
10
|
+
import { pipe, map, partition, only, clamp, isNullish } from 'remeda';
|
|
11
|
+
import { Link } from '../../components/Link.js';
|
|
12
|
+
import { useDiagram } from '../../hooks/useDiagram.js';
|
|
13
|
+
import { elementIcon, cardHeader, title, tabsPanel, tabsTab, tabsList, tabsRoot, propertiesGrid, resizeHandle, card, backdropOpacity, backdropBlur, dialog, propertyLabel, viewButton, viewButtonTitle } from './ElementDetailsCard.css.js';
|
|
14
|
+
import { TabPanelDeployments } from './TabPanelDeployments.js';
|
|
15
|
+
import { TabPanelRelationships } from './TabPanelRelationships.js';
|
|
16
|
+
import { TabPanelStructure } from './TabPanelStructure.js';
|
|
17
|
+
import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
|
|
18
|
+
import { useUpdateEffect } from '../../hooks/useUpdateEffect.js';
|
|
19
|
+
import { IconRenderer } from '../../context/IconRenderer.js';
|
|
20
|
+
import { stopPropagation } from '../../utils/xyflow.js';
|
|
21
|
+
import { IfEnabled, DiagramFeatures } from '../../context/DiagramFeatures.js';
|
|
22
|
+
|
|
25
23
|
const Divider = Divider$1.withProps({
|
|
26
24
|
mb: 8,
|
|
27
25
|
labelPosition: "left",
|
|
@@ -58,7 +56,6 @@ function ElementDetailsCard({
|
|
|
58
56
|
fqn,
|
|
59
57
|
onClose
|
|
60
58
|
}) {
|
|
61
|
-
var _a, _b, _c;
|
|
62
59
|
const [opened, setOpened] = useState(false);
|
|
63
60
|
const windowSize = useViewportSize();
|
|
64
61
|
const windowWidth = windowSize.width || window.innerWidth || 1200, windowHeight = windowSize.height || window.innerHeight || 800;
|
|
@@ -79,13 +76,13 @@ function ElementDetailsCard({
|
|
|
79
76
|
return isScopedElementView(v) && v.viewOf === fqn;
|
|
80
77
|
})
|
|
81
78
|
);
|
|
82
|
-
let defaultView =
|
|
83
|
-
if (
|
|
79
|
+
let defaultView = nodeModel?.navigateTo?.$view ?? elementModel.defaultView?.$view ?? null;
|
|
80
|
+
if (defaultView?.id === viewId) {
|
|
84
81
|
defaultView = null;
|
|
85
82
|
}
|
|
86
83
|
const defaultLink = only(elementModel.links);
|
|
87
84
|
const controls = useDragControls();
|
|
88
|
-
const isCompound = (
|
|
85
|
+
const isCompound = (nodeModel?.$node.children?.length ?? 0) > 0;
|
|
89
86
|
const _width = Math.min(700, windowWidth - MIN_PADDING * 2);
|
|
90
87
|
const _height = Math.min(650, windowHeight - MIN_PADDING * 2);
|
|
91
88
|
const fromPositon = rectFromNode ? {
|
|
@@ -135,19 +132,18 @@ function ElementDetailsCard({
|
|
|
135
132
|
[],
|
|
136
133
|
50
|
|
137
134
|
);
|
|
138
|
-
const notation =
|
|
135
|
+
const notation = nodeModel?.$node.notation ?? null;
|
|
139
136
|
const elementIcon$1 = IconRenderer({
|
|
140
137
|
element: {
|
|
141
138
|
id: fqn,
|
|
142
139
|
title: elementModel.title,
|
|
143
|
-
icon:
|
|
140
|
+
icon: nodeModel?.icon ?? elementModel.icon
|
|
144
141
|
},
|
|
145
142
|
className: elementIcon
|
|
146
143
|
});
|
|
147
144
|
useTimeoutEffect(() => {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
(_b2 = ref.current) == null ? void 0 : _b2.showModal();
|
|
145
|
+
if (!ref.current?.open) {
|
|
146
|
+
ref.current?.showModal();
|
|
151
147
|
}
|
|
152
148
|
}, 20);
|
|
153
149
|
useTimeoutEffect(() => {
|
|
@@ -157,12 +153,12 @@ function ElementDetailsCard({
|
|
|
157
153
|
m.dialog,
|
|
158
154
|
{
|
|
159
155
|
ref,
|
|
160
|
-
className:
|
|
156
|
+
className: cx(dialog, RemoveScroll.classNames.fullWidth),
|
|
161
157
|
layout: true,
|
|
162
158
|
layoutRoot: true,
|
|
163
159
|
initial: {
|
|
164
160
|
[backdropBlur]: "0px",
|
|
165
|
-
[backdropOpacity]: "
|
|
161
|
+
[backdropOpacity]: "5%"
|
|
166
162
|
},
|
|
167
163
|
animate: {
|
|
168
164
|
[backdropBlur]: "3px",
|
|
@@ -176,10 +172,9 @@ function ElementDetailsCard({
|
|
|
176
172
|
}
|
|
177
173
|
},
|
|
178
174
|
onClick: (e) => {
|
|
179
|
-
var _a2, _b2, _c2;
|
|
180
175
|
e.stopPropagation();
|
|
181
|
-
if (
|
|
182
|
-
|
|
176
|
+
if (e.target?.nodeName?.toUpperCase() === "DIALOG") {
|
|
177
|
+
ref.current?.close();
|
|
183
178
|
}
|
|
184
179
|
},
|
|
185
180
|
onDoubleClick: stopPropagation,
|
|
@@ -199,7 +194,12 @@ function ElementDetailsCard({
|
|
|
199
194
|
withBorder: true,
|
|
200
195
|
shadow: "md",
|
|
201
196
|
component: m.div,
|
|
202
|
-
className:
|
|
197
|
+
className: cx(
|
|
198
|
+
css({
|
|
199
|
+
likec4Palette: nodeModel?.color ?? elementModel.color
|
|
200
|
+
}),
|
|
201
|
+
card
|
|
202
|
+
),
|
|
203
203
|
initial: {
|
|
204
204
|
top,
|
|
205
205
|
left,
|
|
@@ -208,7 +208,7 @@ function ElementDetailsCard({
|
|
|
208
208
|
opacity: 0,
|
|
209
209
|
originX,
|
|
210
210
|
originY,
|
|
211
|
-
scale: Math.max(fromScale, 0.
|
|
211
|
+
scale: Math.max(fromScale, 0.65)
|
|
212
212
|
},
|
|
213
213
|
animate: {
|
|
214
214
|
opacity: 1,
|
|
@@ -227,7 +227,6 @@ function ElementDetailsCard({
|
|
|
227
227
|
width,
|
|
228
228
|
height
|
|
229
229
|
},
|
|
230
|
-
"data-likec4-color": (nodeModel == null ? void 0 : nodeModel.color) ?? elementModel.color,
|
|
231
230
|
children: [
|
|
232
231
|
/* @__PURE__ */ jsxs(
|
|
233
232
|
Box,
|
|
@@ -425,14 +424,14 @@ const ViewButton = ({
|
|
|
425
424
|
] }) });
|
|
426
425
|
};
|
|
427
426
|
function ElementProperty({
|
|
428
|
-
title
|
|
427
|
+
title,
|
|
429
428
|
emptyValue = `undefined`,
|
|
430
429
|
children,
|
|
431
430
|
style,
|
|
432
431
|
...props
|
|
433
432
|
}) {
|
|
434
433
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
435
|
-
/* @__PURE__ */ jsx(PropertyLabel, { children:
|
|
434
|
+
/* @__PURE__ */ jsx(PropertyLabel, { children: title }),
|
|
436
435
|
/* @__PURE__ */ jsx(
|
|
437
436
|
Text,
|
|
438
437
|
{
|
|
@@ -457,6 +456,5 @@ function ElementMetata({
|
|
|
457
456
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Code, { block: true, children: JSON.stringify(value, null, 2) }) })
|
|
458
457
|
] });
|
|
459
458
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
};
|
|
459
|
+
|
|
460
|
+
export { ElementDetailsCard };
|
|
@@ -1,11 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { css, cx } from '@likec4/styles/css';
|
|
2
|
+
|
|
3
|
+
const treeNode = css({
|
|
4
|
+
[`&[data-level='1']`]: {
|
|
5
|
+
marginBottom: "sm"
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
const treeNodeLabel = css({
|
|
9
|
+
cursor: "default",
|
|
10
|
+
marginTop: 0,
|
|
11
|
+
marginBottom: 0
|
|
12
|
+
});
|
|
13
|
+
const label = css({
|
|
14
|
+
transition: "fast",
|
|
15
|
+
color: "mantine.colors.gray[7]",
|
|
16
|
+
_dark: {
|
|
17
|
+
color: "mantine.colors.dark[1]"
|
|
18
|
+
},
|
|
19
|
+
"& > *": {
|
|
20
|
+
transition: "fast"
|
|
21
|
+
},
|
|
22
|
+
_hover: {
|
|
23
|
+
transitionTimingFunction: "out",
|
|
24
|
+
"& > :not([data-no-transform])": {
|
|
25
|
+
transitionTimingFunction: "out",
|
|
26
|
+
transform: "translateX(1px)"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// '.mantine-Button-root:hover & > :not([data-no-transform])': {
|
|
30
|
+
// transitionTimingFunction: 'out',
|
|
31
|
+
// transform: 'translateX(1px)',
|
|
32
|
+
// },
|
|
33
|
+
});
|
|
34
|
+
const nodeLabel = cx(label);
|
|
35
|
+
const instanceLabel = cx(
|
|
36
|
+
label,
|
|
37
|
+
css({
|
|
38
|
+
cursor: "pointer",
|
|
39
|
+
width: "100%",
|
|
40
|
+
justifyContent: "stretch",
|
|
41
|
+
flexWrap: "nowrap",
|
|
42
|
+
height: "36px",
|
|
43
|
+
paddingInlineStart: "16px",
|
|
44
|
+
paddingInlineEnd: "10px",
|
|
45
|
+
borderRadius: "sm",
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
color: "mantine.colors.gray[7]",
|
|
48
|
+
_dark: {
|
|
49
|
+
color: "mantine.colors.gray.lightColor"
|
|
50
|
+
},
|
|
51
|
+
_hover: {
|
|
52
|
+
background: "mantine.colors.gray.lightHover"
|
|
53
|
+
},
|
|
54
|
+
"& .tabler-icon": {
|
|
55
|
+
transition: "fast",
|
|
56
|
+
width: "90%",
|
|
57
|
+
opacity: 0.65
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
export { instanceLabel, nodeLabel, treeNode, treeNodeLabel };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx, jsxs } from
|
|
2
|
-
import { useTree, Alert, Tree, Box, rem, Button, Group, Text, ThemeIcon, Menu } from
|
|
3
|
-
import { IconInfoCircle, IconTarget, IconZoomScan } from
|
|
4
|
-
import { memo, useMemo, useEffect } from
|
|
5
|
-
import { useDiagram } from
|
|
6
|
-
import { useLikeC4Model } from
|
|
7
|
-
import { treeNodeLabel, treeNode, nodeLabel, instanceLabel } from
|
|
8
|
-
import { stopPropagation } from
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useTree, Alert, Tree, Box, rem, Button, Group, Text, ThemeIcon, Menu } from '@mantine/core';
|
|
3
|
+
import { IconInfoCircle, IconTarget, IconZoomScan } from '@tabler/icons-react';
|
|
4
|
+
import { memo, useMemo, useEffect } from 'react';
|
|
5
|
+
import { useDiagram } from '../../hooks/useDiagram.js';
|
|
6
|
+
import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
|
|
7
|
+
import { treeNodeLabel, treeNode, nodeLabel, instanceLabel } from './TabPanelDeployments.css.js';
|
|
8
|
+
import { stopPropagation } from '../../utils/xyflow.js';
|
|
9
|
+
|
|
9
10
|
const DeploymentNodeRenderer = ({
|
|
10
11
|
node
|
|
11
12
|
}) => /* @__PURE__ */ jsxs(Group, { className: nodeLabel, gap: 6, align: "baseline", wrap: "nowrap", children: [
|
|
@@ -167,6 +168,5 @@ const TabPanelDeployments = memo(({ elementFqn }) => {
|
|
|
167
168
|
)
|
|
168
169
|
);
|
|
169
170
|
});
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
};
|
|
171
|
+
|
|
172
|
+
export { TabPanelDeployments };
|
|
@@ -1,9 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { css } from '@likec4/styles/css';
|
|
2
|
+
|
|
3
|
+
const fqn = css({
|
|
4
|
+
display: "inline-block",
|
|
5
|
+
fontSize: "sm",
|
|
6
|
+
fontWeight: 500,
|
|
7
|
+
whiteSpace: "nowrap",
|
|
8
|
+
padding: "3px 6px",
|
|
9
|
+
borderRadius: 3,
|
|
10
|
+
background: `likec4.palette.fill/75`,
|
|
11
|
+
lineHeight: 1.2,
|
|
12
|
+
color: "likec4.palette.hiContrast"
|
|
13
|
+
// selectors: {
|
|
14
|
+
// [`${whereDark} &`]: {
|
|
15
|
+
// }
|
|
16
|
+
// }
|
|
17
|
+
});
|
|
18
|
+
const relationshipStat = css({
|
|
19
|
+
_light: {
|
|
20
|
+
background: "mantine.colors.gray[1]",
|
|
21
|
+
"&[data-missing": {}
|
|
22
|
+
},
|
|
23
|
+
// [`&[data-zero]`]: {
|
|
24
|
+
// color: mantine.colors.dimmed
|
|
25
|
+
// },
|
|
26
|
+
// [`${whereLight} &[data-zero]`]: {
|
|
27
|
+
// background: mantine.colors.gray[3]
|
|
28
|
+
// },
|
|
29
|
+
[`&[data-missing]`]: {
|
|
30
|
+
color: "mantine.colors.orange[4]",
|
|
31
|
+
background: `mantine.colors.orange[8]/15`,
|
|
32
|
+
borderColor: `mantine.colors.orange[5]/20`,
|
|
33
|
+
_light: {
|
|
34
|
+
color: "mantine.colors.orange[8]"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const xyflow = css({
|
|
39
|
+
flex: "1 1 100%",
|
|
40
|
+
position: "relative",
|
|
41
|
+
width: "100%",
|
|
42
|
+
height: "100%",
|
|
43
|
+
background: "mantine.colors.body",
|
|
44
|
+
border: `1px solid {colors.mantine.colors.defaultBorder}`,
|
|
45
|
+
borderRadius: "sm",
|
|
46
|
+
_light: {
|
|
47
|
+
borderColor: "mantine.colors.gray[3]",
|
|
48
|
+
background: "mantine.colors.gray[1]"
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
css({
|
|
52
|
+
_before: {
|
|
53
|
+
content: '"scope:"',
|
|
54
|
+
position: "absolute",
|
|
55
|
+
top: 0,
|
|
56
|
+
left: 8,
|
|
57
|
+
fontSize: "2xs",
|
|
58
|
+
fontWeight: 500,
|
|
59
|
+
lineHeight: "1",
|
|
60
|
+
color: "mantine.colors.dimmed",
|
|
61
|
+
opacity: 0.85,
|
|
62
|
+
transform: "translateY(-100%) translateY(-2px)"
|
|
63
|
+
},
|
|
64
|
+
_light: {
|
|
65
|
+
"& .mantine-SegmentedControl-root": {
|
|
66
|
+
background: "mantine.colors.gray[3]"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
css({
|
|
71
|
+
display: "inline-block",
|
|
72
|
+
fontSize: "xl",
|
|
73
|
+
fontWeight: 600,
|
|
74
|
+
padding: "1px 5px",
|
|
75
|
+
minWidth: 24,
|
|
76
|
+
textAlign: "center",
|
|
77
|
+
borderRadius: "sm",
|
|
78
|
+
background: "mantine.colors.dark[7]",
|
|
79
|
+
color: "mantine.colors.defaultColor",
|
|
80
|
+
[`&[data-zero]`]: {
|
|
81
|
+
color: "mantine.colors.dimmed"
|
|
82
|
+
},
|
|
83
|
+
[`&[data-missing]`]: {
|
|
84
|
+
color: "mantine.colors.orange[4]",
|
|
85
|
+
background: `mantine.colors.orange[8]/20`
|
|
86
|
+
}
|
|
87
|
+
// _light: {
|
|
88
|
+
// background: 'mantine.colors.gray[4]',
|
|
89
|
+
// color: 'mantine.colors.dark[6]',
|
|
90
|
+
// [`&[data-zero]`]: {
|
|
91
|
+
// background: 'mantine.colors.gray[3]',
|
|
92
|
+
// },
|
|
93
|
+
// [`&[data-missing]`]: {
|
|
94
|
+
// color: 'mantine.colors.orange[8]',
|
|
95
|
+
// },
|
|
96
|
+
// },
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export { fqn, relationshipStat, xyflow };
|