@likec4/diagram 1.26.2 → 1.27.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/README.md +1 -1
- package/bundle/index.js +48891 -0
- package/dist/LikeC4CustomColors.js +27 -23
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +37 -36
- 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 +133 -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 +17 -29
- package/dist/base/primitives/edge/edge.css.d.ts +2 -2
- package/dist/base/primitives/edge/edge.css.js +123 -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 +50 -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 +118 -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 +195 -19
- package/dist/base/primitives/element/ElementTitle.js +25 -24
- package/dist/base/primitives/index.d.ts +1 -0
- package/dist/base/types.js +4 -4
- 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 +61 -12
- 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 +5020 -4373
- 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 +81 -36
- 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 +99 -83
- 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 +10 -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 +8 -9
- 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.js +39 -46
- 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 +21 -21
- 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 +57 -98
- package/dist/overlays/overlay/Overlay.d.ts +2 -2
- package/dist/overlays/overlay/Overlay.js +96 -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 +16 -18
- 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.js +26 -27
- package/dist/state/aligners.js +22 -31
- package/dist/state/assign.js +11 -21
- package/dist/state/diagram-machine.d.ts +5155 -4470
- package/dist/state/diagram-machine.js +407 -337
- 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 +16 -14
- 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 +113 -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 +31 -37
- package/src/base/primitives/edge/edge.css.ts +105 -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 +43 -70
- package/src/base/primitives/element/ElementNodeContainer.tsx +18 -8
- package/src/base/primitives/element/ElementShape.css.ts +80 -113
- package/src/base/primitives/element/ElementShape.tsx +0 -1
- package/src/base/primitives/element/ElementTitle.css.ts +168 -124
- package/src/base/primitives/element/ElementTitle.tsx +16 -16
- package/src/base/primitives/index.ts +1 -0
- package/src/base/types.ts +5 -0
- 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 +56 -5
- 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 +80 -26
- package/src/likec4diagram/custom/edges/NotePopover.css.ts +7 -13
- package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +69 -42
- 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 +9 -5
- package/src/likec4diagram/custom/nodes/toolbar/styles.css.ts +3 -4
- package/src/likec4diagram/ui/controls/LayoutDriftNotification.tsx +2 -2
- 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/useViewToNodesEdges.ts +2 -1
- package/src/overlays/Overlays.tsx +6 -4
- 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 +34 -46
- package/src/overlays/overlay/Overlay.tsx +95 -97
- 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/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 +17 -16
- package/src/state/diagram-machine.ts +395 -315
- 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,155 +1,199 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createVar, globalStyle, style } from '@vanilla-extract/css'
|
|
3
|
-
import { calc } from '@vanilla-extract/css-utils'
|
|
4
|
-
import { vars } from '../../../theme-vars'
|
|
5
|
-
import { iconSize, paddingSize, textSize } from './vars.css'
|
|
1
|
+
import { css, sva } from '@likec4/styles/css'
|
|
6
2
|
|
|
7
|
-
export const
|
|
3
|
+
export const iconSize = '--icon-size'
|
|
8
4
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
export { iconSize, paddingSize, textSize }
|
|
12
|
-
|
|
13
|
-
export const title = style({
|
|
5
|
+
const title = css.raw({
|
|
6
|
+
textStyle: 'likec4.node.primary',
|
|
14
7
|
flex: '0 0 auto',
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
fontStyle: 'normal',
|
|
18
|
-
textAlign: textAlign,
|
|
19
|
-
fontWeight: 500,
|
|
20
|
-
fontSize: textSize,
|
|
21
|
-
lineHeight: 1.15,
|
|
22
|
-
textWrap: 'balance',
|
|
23
|
-
color: vars.element.hiContrast,
|
|
24
|
-
whiteSpaceCollapse: 'preserve-breaks',
|
|
8
|
+
textAlign: 'center',
|
|
9
|
+
color: 'likec4.palette.hiContrast',
|
|
25
10
|
})
|
|
26
11
|
|
|
27
|
-
|
|
12
|
+
const description = css.raw({
|
|
28
13
|
flex: '0 1 auto',
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
fontWeight: 400,
|
|
33
|
-
fontSize: calc(textSize).multiply(0.74).toString(),
|
|
34
|
-
lineHeight: 1.2,
|
|
35
|
-
textAlign: textAlign,
|
|
36
|
-
textWrap: 'pretty',
|
|
37
|
-
color: vars.element.loContrast,
|
|
38
|
-
whiteSpaceCollapse: 'preserve-breaks',
|
|
14
|
+
textStyle: 'likec4.node.secondary',
|
|
15
|
+
color: 'likec4.palette.loContrast',
|
|
16
|
+
textAlign: 'center',
|
|
39
17
|
textOverflow: 'ellipsis',
|
|
40
18
|
overflow: 'hidden',
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
19
|
+
_shapeSizeXs: {
|
|
20
|
+
display: 'none',
|
|
21
|
+
},
|
|
22
|
+
_smallZoom: {
|
|
23
|
+
visibility: 'hidden',
|
|
45
24
|
},
|
|
46
25
|
})
|
|
47
26
|
|
|
48
|
-
|
|
27
|
+
const technology = css.raw({
|
|
49
28
|
flex: '0 0 auto',
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
fontWeight: 400,
|
|
54
|
-
fontSize: calc(textSize).multiply(0.635).toString(),
|
|
29
|
+
textStyle: 'likec4.node.secondary',
|
|
30
|
+
color: 'likec4.palette.loContrast',
|
|
31
|
+
fontSize: `calc(var(--likec4-text-size) * 0.635)`,
|
|
55
32
|
lineHeight: 1.125,
|
|
56
|
-
textAlign:
|
|
33
|
+
textAlign: 'center',
|
|
57
34
|
textWrap: 'balance',
|
|
58
35
|
opacity: 0.92,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
36
|
+
_whenHovered: {
|
|
37
|
+
opacity: 1,
|
|
38
|
+
},
|
|
39
|
+
_shapeSizeXs: {
|
|
40
|
+
display: 'none',
|
|
41
|
+
},
|
|
42
|
+
_shapeSizeSm: {
|
|
43
|
+
display: 'none',
|
|
44
|
+
},
|
|
45
|
+
_smallZoom: {
|
|
46
|
+
visibility: 'hidden',
|
|
67
47
|
},
|
|
68
48
|
})
|
|
69
49
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
flex:
|
|
73
|
-
height:
|
|
74
|
-
width:
|
|
75
|
-
margin: '0 auto',
|
|
50
|
+
const varIconSize = `var(${iconSize})`
|
|
51
|
+
export const elementIcon = css({
|
|
52
|
+
flex: `0 0 ${varIconSize}`,
|
|
53
|
+
height: varIconSize,
|
|
54
|
+
width: varIconSize,
|
|
76
55
|
display: 'flex',
|
|
56
|
+
alignSelf: 'flex-start',
|
|
77
57
|
alignItems: 'center',
|
|
78
58
|
justifyContent: 'center',
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
paddingTop: 32,
|
|
96
|
-
paddingBottom: 28,
|
|
59
|
+
mixBlendMode: {
|
|
60
|
+
base: 'hard-light',
|
|
61
|
+
_reduceGraphicsOnPan: 'normal',
|
|
62
|
+
},
|
|
63
|
+
[`& svg, & img`]: {
|
|
64
|
+
width: '100%',
|
|
65
|
+
height: 'auto',
|
|
66
|
+
maxHeight: '100%',
|
|
67
|
+
pointerEvents: 'none',
|
|
68
|
+
filter: {
|
|
69
|
+
base: [
|
|
70
|
+
'drop-shadow(0 0 3px rgb(0 0 0 / 12%))',
|
|
71
|
+
'drop-shadow(0 1px 8px rgb(0 0 0 / 8%))',
|
|
72
|
+
'drop-shadow(1px 1px 16px rgb(0 0 0 / 3%))',
|
|
73
|
+
],
|
|
74
|
+
_reduceGraphicsOnPan: 'none',
|
|
97
75
|
},
|
|
98
76
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
77
|
+
[`& img`]: {
|
|
78
|
+
objectFit: 'contain',
|
|
79
|
+
},
|
|
102
80
|
})
|
|
103
81
|
|
|
104
|
-
export const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
82
|
+
export const elementTitle = sva({
|
|
83
|
+
slots: ['root', 'textContainer', 'title', 'description', 'technology'],
|
|
84
|
+
base: {
|
|
85
|
+
root: {
|
|
86
|
+
position: 'relative',
|
|
87
|
+
flex: '1',
|
|
88
|
+
height: 'fit-content',
|
|
89
|
+
width: 'fit-content',
|
|
90
|
+
margin: '0 auto',
|
|
91
|
+
display: 'flex',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
justifyContent: 'center',
|
|
94
|
+
flexDirection: 'row',
|
|
95
|
+
paddingTop: 'var(--likec4-spacing)',
|
|
96
|
+
paddingBottom: 'var(--likec4-spacing)',
|
|
97
|
+
paddingLeft: 'calc(var(--likec4-spacing) + 8px)',
|
|
98
|
+
paddingRight: 'calc(var(--likec4-spacing) + 8px)',
|
|
99
|
+
overflow: 'hidden',
|
|
100
|
+
gap: '12px',
|
|
101
|
+
_shapeQueue: {
|
|
102
|
+
paddingLeft: '46px',
|
|
103
|
+
paddingRight: '16px',
|
|
104
|
+
},
|
|
105
|
+
_shapeMobile: {
|
|
106
|
+
paddingLeft: '46px',
|
|
107
|
+
paddingRight: '16px',
|
|
108
|
+
},
|
|
109
|
+
_shapeCylinder: {
|
|
110
|
+
paddingTop: '30px',
|
|
111
|
+
},
|
|
112
|
+
_shapeStorage: {
|
|
113
|
+
paddingTop: '30px',
|
|
114
|
+
},
|
|
115
|
+
_shapeBrowser: {
|
|
116
|
+
paddingTop: '32px',
|
|
117
|
+
paddingBottom: '28px',
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
_shapeSizeXs: {
|
|
121
|
+
[iconSize]: '24px',
|
|
122
|
+
},
|
|
123
|
+
_shapeSizeSm: {
|
|
124
|
+
[iconSize]: '36px',
|
|
125
|
+
},
|
|
126
|
+
_shapeSizeMd: {
|
|
127
|
+
[iconSize]: '60px',
|
|
128
|
+
},
|
|
129
|
+
_shapeSizeLg: {
|
|
130
|
+
[iconSize]: '82px',
|
|
131
|
+
gap: '16px',
|
|
132
|
+
},
|
|
133
|
+
_shapeSizeXl: {
|
|
134
|
+
[iconSize]: '90px',
|
|
135
|
+
gap: '16px',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
textContainer: {
|
|
139
|
+
height: 'fit-content',
|
|
140
|
+
width: 'fit-content',
|
|
141
|
+
flex: '0 1 auto',
|
|
142
|
+
display: 'flex',
|
|
143
|
+
flexDirection: 'column',
|
|
144
|
+
alignItems: 'stretch',
|
|
145
|
+
justifyContent: 'center',
|
|
146
|
+
flexWrap: 'nowrap',
|
|
147
|
+
overflow: 'hidden',
|
|
148
|
+
gap: '8px',
|
|
149
|
+
},
|
|
150
|
+
title,
|
|
151
|
+
description,
|
|
152
|
+
technology,
|
|
117
153
|
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
154
|
+
variants: {
|
|
155
|
+
hasIcon: {
|
|
156
|
+
false: {},
|
|
157
|
+
true: {
|
|
158
|
+
root: {
|
|
159
|
+
gap: '16px',
|
|
160
|
+
},
|
|
161
|
+
textContainer: {
|
|
162
|
+
minWidth: `calc(50% + ${varIconSize})`,
|
|
163
|
+
alignItems: 'flex-start',
|
|
164
|
+
},
|
|
165
|
+
title: {
|
|
166
|
+
textAlign: 'left',
|
|
167
|
+
},
|
|
168
|
+
description: {
|
|
169
|
+
textAlign: 'left',
|
|
170
|
+
},
|
|
171
|
+
technology: {
|
|
172
|
+
textAlign: 'left',
|
|
173
|
+
},
|
|
174
|
+
},
|
|
121
175
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
176
|
+
hasDescription: {
|
|
177
|
+
false: {},
|
|
178
|
+
true: {},
|
|
179
|
+
},
|
|
180
|
+
hasTechnology: {
|
|
181
|
+
false: {},
|
|
182
|
+
true: {},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
compoundVariants: [
|
|
186
|
+
{
|
|
187
|
+
hasDescription: true,
|
|
188
|
+
hasTechnology: true,
|
|
189
|
+
css: {
|
|
190
|
+
textContainer: {
|
|
191
|
+
gap: '6px',
|
|
192
|
+
},
|
|
127
193
|
},
|
|
128
194
|
},
|
|
195
|
+
],
|
|
196
|
+
defaultVariants: {
|
|
197
|
+
hasIcon: false,
|
|
129
198
|
},
|
|
130
199
|
})
|
|
131
|
-
|
|
132
|
-
export const elementIcon = style({
|
|
133
|
-
flex: `0 0 ${iconSize}`,
|
|
134
|
-
height: iconSize,
|
|
135
|
-
width: iconSize,
|
|
136
|
-
display: 'flex',
|
|
137
|
-
alignItems: 'center',
|
|
138
|
-
justifyContent: 'center',
|
|
139
|
-
mixBlendMode: 'hard-light',
|
|
140
|
-
alignSelf: 'flex-start',
|
|
141
|
-
})
|
|
142
|
-
globalStyle(`${elementIcon} svg, ${elementIcon} img`, {
|
|
143
|
-
width: '100%',
|
|
144
|
-
height: 'auto',
|
|
145
|
-
maxHeight: '100%',
|
|
146
|
-
pointerEvents: 'none',
|
|
147
|
-
filter: `
|
|
148
|
-
drop-shadow(0 0 3px rgb(0 0 0 / 12%))
|
|
149
|
-
drop-shadow(0 1px 8px rgb(0 0 0 / 8%))
|
|
150
|
-
drop-shadow(1px 1px 16px rgb(0 0 0 / 3%))
|
|
151
|
-
`,
|
|
152
|
-
})
|
|
153
|
-
globalStyle(`${elementIcon} img`, {
|
|
154
|
-
objectFit: 'contain',
|
|
155
|
-
})
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { type DiagramNode } from '@likec4/core'
|
|
2
|
+
import { cx } from '@likec4/styles/css'
|
|
2
3
|
import { Box, Text } from '@mantine/core'
|
|
3
|
-
import
|
|
4
|
-
import { isNumber, isTruthy } from 'remeda'
|
|
4
|
+
import { isEmpty, isNumber, isTruthy } from 'remeda'
|
|
5
5
|
import { IconRenderer } from '../../../context/IconRenderer'
|
|
6
|
-
import { hiddenIfZoomTooSmall } from '../../../LikeC4Diagram.css'
|
|
7
|
-
import { getVarName } from '../../../utils/css'
|
|
8
6
|
import type { NodeProps } from '../../types'
|
|
9
7
|
import { nodeSizes } from './ElementNodeContainer'
|
|
10
|
-
import * as
|
|
8
|
+
import * as styles from './ElementTitle.css'
|
|
11
9
|
|
|
12
10
|
type Data =
|
|
13
11
|
& Pick<
|
|
@@ -26,8 +24,6 @@ type ElementTitleProps = NodeProps<Data> & {
|
|
|
26
24
|
iconSize?: number
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
const varIconSize = getVarName(css.iconSize)
|
|
30
|
-
|
|
31
27
|
export function ElementTitle({ id, data, iconSize }: ElementTitleProps) {
|
|
32
28
|
const elementIcon = IconRenderer({
|
|
33
29
|
element: {
|
|
@@ -35,29 +31,33 @@ export function ElementTitle({ id, data, iconSize }: ElementTitleProps) {
|
|
|
35
31
|
title: data.title,
|
|
36
32
|
icon: data.icon,
|
|
37
33
|
},
|
|
38
|
-
className:
|
|
34
|
+
className: styles.elementIcon,
|
|
35
|
+
})
|
|
36
|
+
const classes = styles.elementTitle({
|
|
37
|
+
hasIcon: isTruthy(elementIcon),
|
|
38
|
+
hasDescription: !isEmpty(data.description ?? ''),
|
|
39
|
+
hasTechnology: !isEmpty(data.technology ?? ''),
|
|
39
40
|
})
|
|
40
41
|
const size = nodeSizes(data.style).size
|
|
41
42
|
const isSm = size === 'sm'
|
|
42
43
|
const isSmOrXs = isSm || size === 'xs'
|
|
43
44
|
return (
|
|
44
45
|
<Box
|
|
45
|
-
className={
|
|
46
|
-
|
|
47
|
-
isTruthy(elementIcon) && css.hasIcon,
|
|
46
|
+
className={cx(
|
|
47
|
+
classes.root,
|
|
48
48
|
'likec4-element',
|
|
49
49
|
)}
|
|
50
50
|
style={{
|
|
51
51
|
...isNumber(iconSize) && {
|
|
52
|
-
[
|
|
52
|
+
[styles.iconSize]: `${iconSize}px`,
|
|
53
53
|
},
|
|
54
54
|
}}
|
|
55
55
|
>
|
|
56
56
|
{elementIcon}
|
|
57
|
-
<Box className={
|
|
57
|
+
<Box className={cx(classes.textContainer, 'likec4-element-main-props')}>
|
|
58
58
|
<Text
|
|
59
59
|
component="h3"
|
|
60
|
-
className={
|
|
60
|
+
className={cx(classes.title, 'likec4-element-title')}
|
|
61
61
|
lineClamp={isSmOrXs ? 2 : 3}>
|
|
62
62
|
{data.title}
|
|
63
63
|
</Text>
|
|
@@ -65,7 +65,7 @@ export function ElementTitle({ id, data, iconSize }: ElementTitleProps) {
|
|
|
65
65
|
{data.technology && (
|
|
66
66
|
<Text
|
|
67
67
|
component="div"
|
|
68
|
-
className={
|
|
68
|
+
className={cx(classes.technology, 'likec4-element-technology')}>
|
|
69
69
|
{data.technology}
|
|
70
70
|
</Text>
|
|
71
71
|
)}
|
|
@@ -73,7 +73,7 @@ export function ElementTitle({ id, data, iconSize }: ElementTitleProps) {
|
|
|
73
73
|
{data.description && (
|
|
74
74
|
<Text
|
|
75
75
|
component="div"
|
|
76
|
-
className={
|
|
76
|
+
className={cx(classes.description, 'likec4-element-description')}
|
|
77
77
|
lineClamp={isSmOrXs ? 3 : 5}>
|
|
78
78
|
{data.description}
|
|
79
79
|
</Text>
|
|
@@ -7,6 +7,7 @@ export { customNode } from './customNode'
|
|
|
7
7
|
export { EdgeActionButton } from './edge/EdgeActionButton'
|
|
8
8
|
export { EdgeContainer } from './edge/EdgeContainer'
|
|
9
9
|
export { EdgeLabel } from './edge/EdgeLabel'
|
|
10
|
+
export { EdgeLabelContainer } from './edge/EdgeLabelContainer'
|
|
10
11
|
export { arrowTypeToMarker, EdgeMarkers, type EdgeMarkerType } from './edge/EdgeMarkers'
|
|
11
12
|
export { EdgePath } from './edge/EdgePath'
|
|
12
13
|
export { ElementActionButtons } from './element/ElementActionButtons'
|
package/src/base/types.ts
CHANGED
|
@@ -167,3 +167,8 @@ export namespace Base {
|
|
|
167
167
|
return (edge: E) => _setData(edge, arg1 as Partial<EdgeData>)
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
+
|
|
171
|
+
// import type { ThemeColor } from '@likec4/core'
|
|
172
|
+
// import type { ColorPalette as AllColorPalette } from '@likec4/styles/tokens'
|
|
173
|
+
|
|
174
|
+
// export type ColorPalette = Extract<AllColorPalette, `likec4.${ThemeColor}` | `likec4.compound${number}.${ThemeColor}`>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { JSX, PropsWithChildren } from 'react'
|
|
2
|
+
import { LikeC4ModelProvider as LikeC4ModelProviderLib } from '../LikeC4ModelProvider'
|
|
3
|
+
|
|
4
|
+
export type LikeC4ModelProviderProps = PropsWithChildren<{
|
|
5
|
+
/**
|
|
6
|
+
* The LikeC4 model to be provided to the context.
|
|
7
|
+
* TODO: refer to 'likec4/model'
|
|
8
|
+
*/
|
|
9
|
+
likec4model: any
|
|
10
|
+
}>
|
|
11
|
+
|
|
12
|
+
export const LikeC4ModelProvider: (props: LikeC4ModelProviderProps) => JSX.Element = LikeC4ModelProviderLib
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import type { WhereOperator } from '@likec4/core'
|
|
2
|
+
import type { CSSProperties } from 'react'
|
|
3
|
+
import type { ElementIconRenderer, OverrideReactFlowProps } from '../LikeC4Diagram.props'
|
|
4
|
+
|
|
5
|
+
export interface LikeC4ViewProps<ViewId = string, Tag = string, Kind = string> {
|
|
6
|
+
/**
|
|
7
|
+
* View to display.
|
|
8
|
+
*/
|
|
9
|
+
viewId: ViewId
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Enable/disable panning
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
pannable?: boolean | undefined
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Enable/disable zooming
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
zoomable?: boolean | undefined
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
keepAspectRatio?: boolean | undefined
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Background pattern
|
|
30
|
+
* @default 'transparent'
|
|
31
|
+
*/
|
|
32
|
+
background?: 'dots' | 'lines' | 'cross' | 'transparent' | 'solid' | undefined
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Click on the view opens a modal with browser.
|
|
36
|
+
* You can customize or disable the browser.
|
|
37
|
+
*
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
browser?: boolean | LikeC4BrowserProps | undefined
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @default - determined by the user's system preferences.
|
|
44
|
+
*/
|
|
45
|
+
colorScheme?: 'light' | 'dark' | undefined
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* LikeC4 views are using 'IBM Plex Sans' font.
|
|
49
|
+
* By default, component injects the CSS to document head.
|
|
50
|
+
* Set to false if you want to handle the font yourself.
|
|
51
|
+
*
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
injectFontCss?: boolean | undefined
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Show/hide panel with top left controls,
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
controls?: boolean | undefined
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* If set, initial viewport will show all nodes & edges
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
fitView?: boolean | undefined
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Seems like this is percentage of the view size
|
|
70
|
+
* @default 0.1
|
|
71
|
+
*/
|
|
72
|
+
fitViewPadding?: number | undefined
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Display diagram title / description
|
|
76
|
+
*
|
|
77
|
+
* @default false
|
|
78
|
+
*/
|
|
79
|
+
showDiagramTitle?: boolean | undefined
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Show back/forward navigation buttons
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
showNavigationButtons?: undefined | boolean
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Display notations of the view
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
showNotations?: boolean | undefined
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges
|
|
95
|
+
* Conflicts with `browser` prop
|
|
96
|
+
*
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
99
|
+
enableFocusMode?: boolean | undefined
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* If Walkthrough for dynamic views should be enabled
|
|
103
|
+
* @default enableFocusMode
|
|
104
|
+
*/
|
|
105
|
+
enableDynamicViewWalkthrough?: boolean | undefined
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Enable popup with element details
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
enableElementDetails?: boolean | undefined
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Experimental feature to browse relationships
|
|
115
|
+
*
|
|
116
|
+
* @default enableElementDetails
|
|
117
|
+
*/
|
|
118
|
+
enableRelationshipBrowser?: boolean | undefined
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Display dropdown with details on relationship's label click
|
|
122
|
+
* @default enableRelationshipBrowser
|
|
123
|
+
*/
|
|
124
|
+
enableRelationshipDetails?: boolean | undefined
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
|
|
128
|
+
*
|
|
129
|
+
* @default 'auto' - will be set to true if view is pannable and has more than 3000 * 2000 pixels
|
|
130
|
+
*/
|
|
131
|
+
reduceGraphics?: 'auto' | boolean | undefined
|
|
132
|
+
|
|
133
|
+
where?: WhereOperator<Tag, Kind> | undefined
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Override some react flow props
|
|
137
|
+
*/
|
|
138
|
+
reactFlowProps?: OverrideReactFlowProps | undefined
|
|
139
|
+
|
|
140
|
+
className?: string | undefined
|
|
141
|
+
style?: CSSProperties | undefined
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Override Mantine theme
|
|
145
|
+
*/
|
|
146
|
+
mantineTheme?: any
|
|
147
|
+
|
|
148
|
+
/** Function to generate nonce attribute added to all generated `<style />` tags */
|
|
149
|
+
styleNonce?: string | (() => string) | undefined
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Render custom icon for a node
|
|
153
|
+
* By default, if icon is http:// or https://, it will be rendered as an image
|
|
154
|
+
*/
|
|
155
|
+
renderIcon?: ElementIconRenderer | undefined
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface LikeC4BrowserProps {
|
|
159
|
+
/**
|
|
160
|
+
* Background pattern for the browser view.
|
|
161
|
+
* @default 'dots'
|
|
162
|
+
*/
|
|
163
|
+
background?: 'dots' | 'lines' | 'cross' | 'transparent' | 'solid' | undefined
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Seems like this is percentage of the view size
|
|
167
|
+
* @default 0.1
|
|
168
|
+
*/
|
|
169
|
+
fitViewPadding?: number | undefined
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Show/hide panel with top left controls,
|
|
173
|
+
* @default true
|
|
174
|
+
*/
|
|
175
|
+
controls?: boolean | undefined
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Display diagram title / description
|
|
179
|
+
*
|
|
180
|
+
* @default true
|
|
181
|
+
*/
|
|
182
|
+
showDiagramTitle?: boolean | undefined
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Show back/forward navigation buttons
|
|
186
|
+
* @default true
|
|
187
|
+
*/
|
|
188
|
+
showNavigationButtons?: undefined | boolean
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Enable search popup for elements and views
|
|
192
|
+
* @default true
|
|
193
|
+
*/
|
|
194
|
+
enableSearch?: boolean | undefined
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* If double click on a node should enable focus mode
|
|
198
|
+
*
|
|
199
|
+
* @default true
|
|
200
|
+
*/
|
|
201
|
+
enableFocusMode?: boolean | undefined
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* If Walkthrough for dynamic views should be enabled
|
|
205
|
+
* @default true
|
|
206
|
+
*/
|
|
207
|
+
enableDynamicViewWalkthrough?: boolean | undefined
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Enable popup with element details
|
|
211
|
+
* @default true
|
|
212
|
+
*/
|
|
213
|
+
enableElementDetails?: boolean | undefined
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Experimental feature to browse relationships
|
|
217
|
+
*
|
|
218
|
+
* @default enableElementDetails
|
|
219
|
+
*/
|
|
220
|
+
enableRelationshipBrowser?: boolean | undefined
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Display dropdown with details on relationship's label click
|
|
224
|
+
* @default enableRelationshipBrowser
|
|
225
|
+
*/
|
|
226
|
+
enableRelationshipDetails?: boolean | undefined
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Display notations of the view
|
|
230
|
+
* @default true
|
|
231
|
+
*/
|
|
232
|
+
showNotations?: boolean | undefined
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
|
|
236
|
+
*
|
|
237
|
+
* @default 'auto' - will be set to true if view is pannable and has more than 3000 * 2000 pixels
|
|
238
|
+
*/
|
|
239
|
+
reduceGraphics?: 'auto' | boolean | undefined
|
|
240
|
+
|
|
241
|
+
className?: string | undefined
|
|
242
|
+
|
|
243
|
+
style?: CSSProperties | undefined
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Override some react flow props
|
|
247
|
+
*/
|
|
248
|
+
reactFlowProps?: OverrideReactFlowProps | undefined
|
|
249
|
+
}
|