@likec4/diagram 1.57.0 → 1.59.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/dist/LikeC4Diagram.js +1 -1
- package/dist/LikeC4Diagram.props.d.ts +1 -1
- package/dist/LikeC4Styles.js +1 -1
- package/dist/LikeC4View.js +2 -2
- package/dist/ReactLikeC4.d.ts +1 -1
- package/dist/base/Base.d.ts +3 -2
- package/dist/base/Base.js +14 -26
- package/dist/base/BaseXYFlow.d.ts +2 -1
- package/dist/base/BaseXYFlow.js +63 -4
- package/dist/base/keyboardZoom.d.ts +3 -0
- package/dist/base/keyboardZoom.js +20 -0
- package/dist/base/updateEdges.js +7 -16
- package/dist/base/updateNodes.js +3 -9
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +2 -1
- package/dist/base-primitives/compound/CompoundActionButton.js +5 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +2 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.js +5 -2
- package/dist/base-primitives/compound/CompoundNodeContainer.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundTitle.d.ts +7 -1
- package/dist/base-primitives/compound/CompoundTitle.js +2 -1
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +2 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +4 -2
- package/dist/base-primitives/edge/EdgeLabel.d.ts +2 -0
- package/dist/base-primitives/edge/EdgeLabel.js +2 -5
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeMarkers.d.ts +8 -8
- package/dist/base-primitives/element/ElementActionButtons.d.ts +2 -1
- package/dist/base-primitives/element/ElementActionButtons.js +4 -1
- package/dist/base-primitives/element/ElementData.d.ts +4 -2
- package/dist/base-primitives/element/ElementData.js +2 -1
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +2 -1
- package/dist/base-primitives/element/ElementDetailsButton.js +5 -2
- package/dist/base-primitives/element/ElementNodeContainer.js +1 -1
- package/dist/base-primitives/element/ElementShape.d.ts +1 -1
- package/dist/base-primitives/element/ElementShape.js +3 -0
- package/dist/base-primitives/element/ElementTags.d.ts +1 -1
- package/dist/base-primitives/element/ElementTags.js +1 -3
- package/dist/components/ErrorFallback.d.ts +2 -2
- package/dist/components/ErrorFallback.js +3 -5
- package/dist/components/Link.js +6 -6
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NavigationPanel.js +1 -1
- package/dist/components/PortalToContainer.d.ts +1 -1
- package/dist/components/RootContainer.d.ts +1 -1
- package/dist/components/SearchControl.css.js +11 -11
- package/dist/components/SearchControl.d.ts +2 -2
- package/dist/components/ViewNotFound.d.ts +2 -2
- package/dist/context/CurrentViewModelProvider.d.ts +1 -1
- package/dist/context/DefaultMantineProvider.d.ts +1 -1
- package/dist/context/DiagramEventHandlers.d.ts +1 -1
- package/dist/context/EnsureMantine.d.ts +1 -1
- package/dist/context/FramerMotionConfig.d.ts +3 -3
- package/dist/context/FramerMotionConfig.js +2 -2
- package/dist/context/IconRenderer.d.ts +2 -2
- package/dist/context/IconRenderer.js +32 -12
- package/dist/context/LikeC4ModelContext.d.ts +1 -1
- package/dist/context/TagStylesContext.d.ts +4 -3
- package/dist/context/TagStylesContext.js +20 -22
- package/dist/custom/index.d.ts +1 -0
- package/dist/custom/index.js +3 -2
- package/dist/editor/LikeC4EditorProvider.d.ts +2 -2
- package/dist/editor/actor/actions.d.ts +74 -15
- package/dist/editor/actor/actions.js +91 -25
- package/dist/editor/actor/hotkey.d.ts +1 -1
- package/dist/editor/actor/hotkey.js +7 -0
- package/dist/editor/actor/machine.d.ts +4 -6
- package/dist/editor/actor/machine.js +1 -0
- package/dist/editor/actor/setup.d.ts +25 -4
- package/dist/editor/actor/setup.js +8 -6
- package/dist/editor/actor/state.editor.d.ts +64 -14
- package/dist/editor/actor/state.editor.js +12 -11
- package/dist/editor/actor/state.sync-queue.d.ts +283 -91
- package/dist/editor/actor/state.sync-queue.js +93 -56
- package/dist/editor/actor/types.d.ts +6 -1
- package/dist/editor/actor/types.js +1 -1
- package/dist/editor/useEditorActorLogic.js +14 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/safeContext.d.ts +156 -3
- package/dist/hooks/safeContext.js +60 -12
- package/dist/hooks/useCurrentViewModel.js +1 -1
- package/dist/hooks/useDiagram.d.ts +8 -0
- package/dist/hooks/useDiagram.js +9 -2
- package/dist/hooks/useEditorActor.d.ts +5 -0
- package/dist/hooks/useEditorActor.js +4 -3
- package/dist/hooks/useLikeC4ElementsTree.js +1 -1
- package/dist/hooks/useLikeC4Model.js +1 -1
- package/dist/hooks/useXYFlow.d.ts +1 -0
- package/dist/hooks/useXYFlow.js +5 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -2
- package/dist/likec4diagram/DiagramUI.d.ts +1 -1
- package/dist/likec4diagram/DiagramUI.js +19 -6
- package/dist/likec4diagram/DiagramXYFlow.js +54 -17
- package/dist/likec4diagram/convert-to-xyflow.d.ts +3 -5
- package/dist/likec4diagram/convert-to-xyflow.js +29 -10
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +140 -18
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +11 -4
- package/dist/likec4diagram/custom/edges/edges.css.d.ts +1 -0
- package/dist/likec4diagram/custom/edges/edges.css.js +6 -2
- package/dist/likec4diagram/custom/index.d.ts +2 -1
- package/dist/likec4diagram/custom/index.js +5 -3
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +1 -0
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +4 -4
- package/dist/likec4diagram/custom/nodes/ElementActions.js +13 -3
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +0 -4
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +32 -19
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.ts +2 -0
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +234 -0
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +7 -7
- package/dist/likec4diagram/custom/nodes/nodes.js +20 -5
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +15 -14
- package/dist/likec4diagram/relationship-popover/components.d.ts +2 -2
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.js +11 -20
- package/dist/likec4diagram/state/aligners.js +1 -1
- package/dist/likec4diagram/state/assign.d.ts +1 -1
- package/dist/likec4diagram/state/assign.js +1 -1
- package/dist/likec4diagram/state/createViewChange.js +2 -1
- package/dist/likec4diagram/state/diagram-api.d.ts +18 -10
- package/dist/likec4diagram/state/diagram-api.js +333 -229
- package/dist/likec4diagram/state/machine.actions.d.ts +1026 -332
- package/dist/likec4diagram/state/machine.actions.js +118 -46
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +123 -51
- package/dist/likec4diagram/state/machine.actions.layout.js +40 -33
- package/dist/likec4diagram/state/machine.d.ts +154 -16
- package/dist/likec4diagram/state/machine.js +5 -41
- package/dist/likec4diagram/state/machine.setup.d.ts +84 -19
- package/dist/likec4diagram/state/machine.setup.js +65 -12
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +59 -33
- package/dist/likec4diagram/state/machine.state.navigating.js +7 -3
- package/dist/likec4diagram/state/machine.state.ready.d.ts +1540 -476
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +294 -53
- package/dist/likec4diagram/state/machine.state.ready.focused.js +3 -3
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +264 -73
- package/dist/likec4diagram/state/machine.state.ready.idle.js +31 -6
- package/dist/likec4diagram/state/machine.state.ready.js +22 -16
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +23 -9
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +288 -84
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +135 -66
- package/dist/likec4diagram/state/types.d.ts +4 -2
- package/dist/likec4diagram/state/utils.d.ts +7 -0
- package/dist/likec4diagram/state/utils.js +36 -34
- package/dist/likec4diagram/types.d.ts +49 -3
- package/dist/likec4diagram/ui/FloatingSequenceActors.d.ts +6 -0
- package/dist/likec4diagram/ui/FloatingSequenceActors.js +155 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +1 -1
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +2 -2
- package/dist/likec4diagram/ui/index.d.ts +2 -0
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -5
- package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +519 -0
- package/dist/likec4diagram/ui/sequence-outline/state.d.ts +36 -0
- package/dist/likec4diagram/ui/sequence-outline/state.js +55 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +1 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +116 -62
- package/dist/likec4diagram/xyflow-sequence/_types.d.ts +55 -5
- package/dist/likec4diagram/xyflow-sequence/const.d.ts +5 -5
- package/dist/likec4diagram/xyflow-sequence/const.js +4 -4
- package/dist/likec4diagram/xyflow-sequence/layouter.d.ts +30 -6
- package/dist/likec4diagram/xyflow-sequence/layouter.js +561 -0
- package/dist/likec4diagram/xyflow-sequence/{sequence-layout.d.ts → sequence-view-to-xy.d.ts} +8 -2
- package/dist/likec4diagram/xyflow-sequence/{sequence-layout.js → sequence-view-to-xy.js} +112 -14
- package/dist/likec4diagram/xyflow-sequence/sequence-view.d.ts +2 -7
- package/dist/likec4diagram/xyflow-sequence/sequence-view.js +144 -0
- package/dist/likec4diagram/xyflow-sequence/utils.d.ts +9 -1
- package/dist/likec4diagram/xyflow-sequence/utils.js +96 -0
- package/dist/navigationpanel/NavigationPanel.d.ts +5 -2
- package/dist/navigationpanel/NavigationPanel.js +58 -59
- package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +47 -40
- package/dist/navigationpanel/_common.d.ts +2 -2
- package/dist/navigationpanel/_common.js +2 -2
- package/dist/navigationpanel/actor.actions.d.ts +19 -0
- package/dist/navigationpanel/actor.actions.js +45 -0
- package/dist/navigationpanel/actor.d.ts +34 -96
- package/dist/navigationpanel/actor.js +21 -84
- package/dist/navigationpanel/actor.setup.d.ts +98 -0
- package/dist/navigationpanel/actor.setup.js +31 -0
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +4 -5
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +1 -1
- package/dist/navigationpanel/controls/DetailsControls.d.ts +1 -1
- package/dist/navigationpanel/controls/DetailsControls.js +7 -8
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +1 -1
- package/dist/navigationpanel/controls/LogoButton.d.ts +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
- package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/styles.js +8 -8
- package/dist/navigationpanel/hooks.d.ts +20 -5
- package/dist/navigationpanel/hooks.js +4 -18
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +2 -2
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +5 -5
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +23 -25
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +5 -5
- package/dist/overlays/Overlays.d.ts +4 -2
- package/dist/overlays/Overlays.js +10 -10
- package/dist/overlays/element-details/ElementDetails.d.ts +1 -1
- package/dist/overlays/element-details/ElementDetailsCard.css.js +17 -17
- package/dist/overlays/element-details/ElementDetailsCard.d.ts +1 -1
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -2
- package/dist/overlays/element-details/MetadataValue.js +15 -15
- package/dist/overlays/element-details/TabPanelDeployments.css.js +5 -5
- package/dist/overlays/element-details/TabPanelRelationships.css.js +11 -11
- package/dist/overlays/element-details/TabPanelRelationships.d.ts +1 -1
- package/dist/overlays/element-details/TabPanelRelationships.js +1 -1
- package/dist/overlays/element-details/TabPanelStructure.css.js +2 -2
- package/dist/overlays/element-details/TabPanelStructure.d.ts +2 -2
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +2 -3
- package/dist/overlays/hooks.d.ts +28 -0
- package/dist/overlays/hooks.js +5 -0
- package/dist/overlays/overlay/Overlay.js +34 -25
- package/dist/overlays/overlaysActor.js +0 -1
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +1 -1
- package/dist/overlays/relationship-details/SelectEdge.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +4 -4
- package/dist/overlays/relationship-details/custom/nodeTypes.js +1 -1
- package/dist/overlays/relationship-details/layout.js +1 -1
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +1 -1
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/SelectElement.d.ts +1 -1
- package/dist/overlays/relationships-browser/actor.js +79 -78
- package/dist/overlays/relationships-browser/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/EmptyNode.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +4 -4
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +1 -1
- package/dist/overlays/relationships-browser/hooks.js +1 -1
- package/dist/overlays/relationships-browser/layout.js +2 -2
- package/dist/projects-overview/ProjectsOverview.d.ts +1 -1
- package/dist/projects-overview/actor.js +4 -4
- package/dist/projects-overview/custom/nodeTypes.d.ts +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.d.ts +1 -1
- package/dist/search/Search.d.ts +1 -1
- package/dist/search/Search.js +1 -1
- package/dist/search/XStateSearchAdapter.d.ts +1 -1
- package/dist/search/components/ElementsColumn.css.js +2 -2
- package/dist/search/components/ElementsColumn.d.ts +1 -1
- package/dist/search/components/PickView.d.ts +1 -1
- package/dist/search/components/SearchByTags.d.ts +1 -1
- package/dist/search/components/SearchInput.d.ts +1 -1
- package/dist/search/components/ViewsColum.d.ts +3 -3
- package/dist/search/components/ViewsColum.js +1 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/components/_shared.css.js +23 -23
- package/dist/search/components/styles.css.js +4 -4
- package/dist/shadowroot/ShadowRoot.d.ts +2 -3
- package/dist/shadowroot/ShadowRoot.js +95 -41
- package/dist/shadowroot/index.d.ts +1 -0
- package/dist/styles2.js +1 -1
- package/dist/utils/defineActors.d.ts +21 -0
- package/dist/utils/defineActors.js +13 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +5 -4
- package/dist/utils/readableText.d.ts +11 -0
- package/dist/utils/readableText.js +18 -0
- package/package.json +30 -43
- package/panda.buildinfo.json +271 -295
- package/styles-min.css +1 -1
- package/styles-xyflow.css +1 -1
- package/styles.css +1 -1
- package/adhoc-editor/package.json +0 -4
- package/dist/adhoc-editor/EditorPanel.d.ts +0 -1
- package/dist/adhoc-editor/EditorPanel.js +0 -106
- package/dist/adhoc-editor/ElementsTree.d.ts +0 -2
- package/dist/adhoc-editor/ElementsTree.js +0 -112
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +0 -4
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +0 -83
- package/dist/adhoc-editor/components/Tree.d.ts +0 -48
- package/dist/adhoc-editor/components/Tree.js +0 -213
- package/dist/adhoc-editor/hooks.d.ts +0 -14
- package/dist/adhoc-editor/hooks.js +0 -34
- package/dist/adhoc-editor/index.d.ts +0 -2
- package/dist/adhoc-editor/index.js +0 -2
- package/dist/adhoc-editor/state/ActorProvider.d.ts +0 -5
- package/dist/adhoc-editor/state/ActorProvider.js +0 -37
- package/dist/adhoc-editor/state/actor.d.ts +0 -13
- package/dist/adhoc-editor/state/actor.editor.d.ts +0 -56
- package/dist/adhoc-editor/state/actor.editor.js +0 -167
- package/dist/adhoc-editor/state/actor.js +0 -14
- package/dist/adhoc-editor/state/actor.layouter.d.ts +0 -51
- package/dist/adhoc-editor/state/actor.layouter.js +0 -54
- package/dist/adhoc-editor/state/actor.types.d.ts +0 -63
- package/dist/adhoc-editor/state/actor.types.js +0 -25
- package/dist/adhoc-editor/state/panel.d.ts +0 -95
- package/dist/adhoc-editor/state/panel.js +0 -124
- package/dist/adhoc-editor/state/utils.d.ts +0 -17
- package/dist/adhoc-editor/state/utils.js +0 -25
- package/dist/adhoc-editor/useElementsTree.d.ts +0 -18
- package/dist/adhoc-editor/useElementsTree.js +0 -98
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +0 -6
- package/dist/shadowroot/styles.css.d.ts +0 -12
- package/dist/shadowroot/styles.css.js +0 -59
|
@@ -95,21 +95,21 @@ var viewButton = css({
|
|
|
95
95
|
transition: "fast",
|
|
96
96
|
border: `1px dashed`,
|
|
97
97
|
borderColor: "default.border",
|
|
98
|
-
[viewTitleColor]: "{colors.mantine.
|
|
98
|
+
[viewTitleColor]: "{colors.mantine.dark[1]}",
|
|
99
99
|
_hover: {
|
|
100
100
|
background: "default.hover",
|
|
101
|
-
[iconColor]: "{colors.mantine.
|
|
101
|
+
[iconColor]: "{colors.mantine.dark[1]}",
|
|
102
102
|
[viewTitleColor]: "{colors.default.color}"
|
|
103
103
|
},
|
|
104
|
-
_dark: { background: "mantine.
|
|
104
|
+
_dark: { background: "mantine.dark[6]" },
|
|
105
105
|
_light: {
|
|
106
|
-
[iconColor]: "{colors.mantine.
|
|
107
|
-
[viewTitleColor]: "{colors.mantine.
|
|
108
|
-
_hover: { [iconColor]: "{colors.mantine.
|
|
106
|
+
[iconColor]: "{colors.mantine.gray[6]}",
|
|
107
|
+
[viewTitleColor]: "{colors.mantine.gray[7]}",
|
|
108
|
+
_hover: { [iconColor]: "{colors.mantine.gray[7]}" }
|
|
109
109
|
},
|
|
110
110
|
"& .mantine-ThemeIcon-root": {
|
|
111
111
|
transition: "fast",
|
|
112
|
-
color: `[var(${iconColor}, {colors.mantine.
|
|
112
|
+
color: `[var(${iconColor}, {colors.mantine.dark[2]})]`,
|
|
113
113
|
"--ti-size": "22px",
|
|
114
114
|
_hover: { color: "default.color" }
|
|
115
115
|
},
|
|
@@ -121,7 +121,7 @@ var viewButton = css({
|
|
|
121
121
|
});
|
|
122
122
|
var viewButtonTitle = css({
|
|
123
123
|
transition: "fast",
|
|
124
|
-
color: `[var(${viewTitleColor}, {colors.mantine.
|
|
124
|
+
color: `[var(${viewTitleColor}, {colors.mantine.gray[7]})]`,
|
|
125
125
|
fontSize: "15px",
|
|
126
126
|
fontWeight: "medium",
|
|
127
127
|
lineHeight: "1.4"
|
|
@@ -135,12 +135,12 @@ var tabsRoot = css({
|
|
|
135
135
|
gap: "sm"
|
|
136
136
|
});
|
|
137
137
|
var tabsList = css({
|
|
138
|
-
background: "mantine.
|
|
138
|
+
background: "mantine.gray[1]",
|
|
139
139
|
borderRadius: "sm",
|
|
140
140
|
flexWrap: "nowrap",
|
|
141
141
|
gap: "1.5",
|
|
142
142
|
padding: "1",
|
|
143
|
-
_dark: { background: "mantine.
|
|
143
|
+
_dark: { background: "mantine.dark[7]" }
|
|
144
144
|
});
|
|
145
145
|
var tabsTab = css({
|
|
146
146
|
fontSize: "xs",
|
|
@@ -149,11 +149,11 @@ var tabsTab = css({
|
|
|
149
149
|
padding: "[6px 8px]",
|
|
150
150
|
transition: "fast",
|
|
151
151
|
borderRadius: "sm",
|
|
152
|
-
color: "mantine.
|
|
152
|
+
color: "mantine.gray[7]",
|
|
153
153
|
_hover: {
|
|
154
154
|
transitionTimingFunction: "out",
|
|
155
155
|
color: "default.color",
|
|
156
|
-
background: "mantine.
|
|
156
|
+
background: "mantine.gray[3]"
|
|
157
157
|
},
|
|
158
158
|
["&[data-active]"]: {
|
|
159
159
|
transition: "none",
|
|
@@ -162,14 +162,14 @@ var tabsTab = css({
|
|
|
162
162
|
color: "default.color"
|
|
163
163
|
},
|
|
164
164
|
_dark: {
|
|
165
|
-
color: "mantine.
|
|
165
|
+
color: "mantine.dark[1]",
|
|
166
166
|
_hover: {
|
|
167
167
|
color: "white",
|
|
168
|
-
background: "mantine.
|
|
168
|
+
background: "mantine.dark[6]"
|
|
169
169
|
},
|
|
170
170
|
[`&:is([data-active])`]: {
|
|
171
171
|
color: "white",
|
|
172
|
-
background: "mantine.
|
|
172
|
+
background: "mantine.dark[5]"
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
});
|
|
@@ -209,7 +209,7 @@ var resizeHandle = css({
|
|
|
209
209
|
width: "14px",
|
|
210
210
|
height: "14px",
|
|
211
211
|
border: `3.5px solid`,
|
|
212
|
-
borderColor: "mantine.
|
|
212
|
+
borderColor: "mantine.dark[3]",
|
|
213
213
|
borderTop: "none",
|
|
214
214
|
borderLeft: "none",
|
|
215
215
|
borderRadius: "xs",
|
|
@@ -219,7 +219,7 @@ var resizeHandle = css({
|
|
|
219
219
|
cursor: "se-resize",
|
|
220
220
|
_hover: {
|
|
221
221
|
borderWidth: "4px",
|
|
222
|
-
borderColor: "mantine.
|
|
222
|
+
borderColor: "mantine.dark[1]"
|
|
223
223
|
}
|
|
224
224
|
});
|
|
225
225
|
//#endregion
|
|
@@ -7,5 +7,5 @@ type ElementDetailsCardProps = {
|
|
|
7
7
|
onClose: () => void;
|
|
8
8
|
fqn: Fqn;
|
|
9
9
|
};
|
|
10
|
-
export declare function ElementDetailsCard({ viewId, fromNode, rectFromNode, fqn, onClose, }: ElementDetailsCardProps): import("react
|
|
10
|
+
export declare function ElementDetailsCard({ viewId, fromNode, rectFromNode, fqn, onClose, }: ElementDetailsCardProps): import("react").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export declare function MetadataProvider({ children }: {
|
|
3
3
|
children: ReactNode;
|
|
4
|
-
}): import("react
|
|
4
|
+
}): import("react").JSX.Element;
|
|
5
5
|
interface MetadataValueProps {
|
|
6
6
|
label: string;
|
|
7
7
|
value: string | string[];
|
|
8
8
|
}
|
|
9
|
-
export declare function MetadataValue({ label, value }: MetadataValueProps): import("react
|
|
9
|
+
export declare function MetadataValue({ label, value }: MetadataValueProps): import("react").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -48,10 +48,10 @@ function MultiValueDisplay({ values, isExpanded }) {
|
|
|
48
48
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
49
49
|
className: css({
|
|
50
50
|
fontSize: "xs",
|
|
51
|
-
color: "mantine.
|
|
51
|
+
color: "mantine.gray[5]",
|
|
52
52
|
fontWeight: "medium",
|
|
53
53
|
flexShrink: 0,
|
|
54
|
-
_dark: { color: "mantine.
|
|
54
|
+
_dark: { color: "mantine.dark[3]" }
|
|
55
55
|
}),
|
|
56
56
|
children: "•"
|
|
57
57
|
}), /* @__PURE__ */ jsx(Box, {
|
|
@@ -91,7 +91,7 @@ function MultiValueDisplay({ values, isExpanded }) {
|
|
|
91
91
|
color: "text",
|
|
92
92
|
borderRadius: "sm",
|
|
93
93
|
border: "1px solid",
|
|
94
|
-
borderColor: "mantine.
|
|
94
|
+
borderColor: "mantine.gray[3]",
|
|
95
95
|
whiteSpace: "nowrap",
|
|
96
96
|
overflow: "hidden",
|
|
97
97
|
textOverflow: "ellipsis",
|
|
@@ -100,8 +100,8 @@ function MultiValueDisplay({ values, isExpanded }) {
|
|
|
100
100
|
flex: "0 1 auto",
|
|
101
101
|
userSelect: "all",
|
|
102
102
|
_dark: {
|
|
103
|
-
backgroundColor: "mantine.
|
|
104
|
-
borderColor: "mantine.
|
|
103
|
+
backgroundColor: "mantine.dark[9]",
|
|
104
|
+
borderColor: "mantine.dark[4]"
|
|
105
105
|
}
|
|
106
106
|
}),
|
|
107
107
|
title: value,
|
|
@@ -109,10 +109,10 @@ function MultiValueDisplay({ values, isExpanded }) {
|
|
|
109
109
|
}), index < values.length - 1 && /* @__PURE__ */ jsx(Text, {
|
|
110
110
|
className: css({
|
|
111
111
|
fontSize: "xs",
|
|
112
|
-
color: "mantine.
|
|
112
|
+
color: "mantine.gray[5]",
|
|
113
113
|
fontWeight: "medium",
|
|
114
114
|
flexShrink: 0,
|
|
115
|
-
_dark: { color: "mantine.
|
|
115
|
+
_dark: { color: "mantine.dark[3]" }
|
|
116
116
|
}),
|
|
117
117
|
children: "•"
|
|
118
118
|
})]
|
|
@@ -143,11 +143,11 @@ function MetadataValue({ label, value }) {
|
|
|
143
143
|
whiteSpace: "nowrap",
|
|
144
144
|
transition: "all 150ms ease",
|
|
145
145
|
_hover: {
|
|
146
|
-
backgroundColor: "mantine.
|
|
147
|
-
color: "mantine.
|
|
146
|
+
backgroundColor: "mantine.gray[1]",
|
|
147
|
+
color: "mantine.primary[6]",
|
|
148
148
|
_dark: {
|
|
149
|
-
backgroundColor: "mantine.
|
|
150
|
-
color: "mantine.
|
|
149
|
+
backgroundColor: "mantine.dark[7]",
|
|
150
|
+
color: "mantine.primary[4]"
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
}),
|
|
@@ -166,13 +166,13 @@ function MetadataValue({ label, value }) {
|
|
|
166
166
|
className: css({
|
|
167
167
|
fontSize: "xs",
|
|
168
168
|
fontWeight: "medium",
|
|
169
|
-
color: "mantine.
|
|
170
|
-
backgroundColor: "mantine.
|
|
169
|
+
color: "mantine.gray[6]",
|
|
170
|
+
backgroundColor: "mantine.gray[1]",
|
|
171
171
|
padding: "[1px 4px]",
|
|
172
172
|
borderRadius: "xs",
|
|
173
173
|
_dark: {
|
|
174
|
-
color: "mantine.
|
|
175
|
-
backgroundColor: "mantine.
|
|
174
|
+
color: "mantine.dark[2]",
|
|
175
|
+
backgroundColor: "mantine.dark[6]"
|
|
176
176
|
}
|
|
177
177
|
}),
|
|
178
178
|
children: elements.length
|
|
@@ -8,8 +8,8 @@ var treeNodeLabel = css({
|
|
|
8
8
|
});
|
|
9
9
|
var label = css({
|
|
10
10
|
transition: "fast",
|
|
11
|
-
color: "mantine.
|
|
12
|
-
_dark: { color: "mantine.
|
|
11
|
+
color: "mantine.gray[7]",
|
|
12
|
+
_dark: { color: "mantine.dark[1]" },
|
|
13
13
|
"& > *": { transition: "fast" },
|
|
14
14
|
_hover: {
|
|
15
15
|
transitionTimingFunction: "out",
|
|
@@ -30,9 +30,9 @@ var instanceLabel = cx(label, css({
|
|
|
30
30
|
paddingInlineEnd: "2.5",
|
|
31
31
|
borderRadius: "sm",
|
|
32
32
|
alignItems: "center",
|
|
33
|
-
color: "mantine.
|
|
34
|
-
_dark: { color: "mantine.
|
|
35
|
-
_hover: { background: "mantine.
|
|
33
|
+
color: "mantine.gray[7]",
|
|
34
|
+
_dark: { color: "mantine.gray.lightColor" },
|
|
35
|
+
_hover: { background: "mantine.gray.lightHover" },
|
|
36
36
|
"& .tabler-icon": {
|
|
37
37
|
transition: "fast",
|
|
38
38
|
width: "90%",
|
|
@@ -13,14 +13,14 @@ var fqn = css({
|
|
|
13
13
|
});
|
|
14
14
|
var relationshipStat = css({
|
|
15
15
|
_light: {
|
|
16
|
-
background: "mantine.
|
|
16
|
+
background: "mantine.gray[1]",
|
|
17
17
|
"&[data-missing": {}
|
|
18
18
|
},
|
|
19
19
|
[`&[data-missing]`]: {
|
|
20
|
-
color: "mantine.
|
|
21
|
-
background: `mantine.
|
|
22
|
-
borderColor: `mantine.
|
|
23
|
-
_light: { color: "mantine.
|
|
20
|
+
color: "mantine.orange[4]",
|
|
21
|
+
background: `mantine.orange[8]/15`,
|
|
22
|
+
borderColor: `mantine.orange[5]/20`,
|
|
23
|
+
_light: { color: "mantine.orange[8]" }
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
var xyflow = css({
|
|
@@ -32,8 +32,8 @@ var xyflow = css({
|
|
|
32
32
|
border: "default",
|
|
33
33
|
borderRadius: "sm",
|
|
34
34
|
_light: {
|
|
35
|
-
borderColor: "mantine.
|
|
36
|
-
background: "mantine.
|
|
35
|
+
borderColor: "mantine.gray[3]",
|
|
36
|
+
background: "mantine.gray[1]"
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
css({
|
|
@@ -49,7 +49,7 @@ css({
|
|
|
49
49
|
opacity: .85,
|
|
50
50
|
transform: "translateY(-100%) translateY(-2px)"
|
|
51
51
|
},
|
|
52
|
-
_light: { "& .mantine-SegmentedControl-root": { background: "mantine.
|
|
52
|
+
_light: { "& .mantine-SegmentedControl-root": { background: "mantine.gray[3]" } }
|
|
53
53
|
});
|
|
54
54
|
css({
|
|
55
55
|
display: "inline-block",
|
|
@@ -59,12 +59,12 @@ css({
|
|
|
59
59
|
minWidth: "24px",
|
|
60
60
|
textAlign: "center",
|
|
61
61
|
borderRadius: "sm",
|
|
62
|
-
background: "mantine.
|
|
62
|
+
background: "mantine.dark[7]",
|
|
63
63
|
color: "default.color",
|
|
64
64
|
[`&[data-zero]`]: { color: "text.dimmed" },
|
|
65
65
|
[`&[data-missing]`]: {
|
|
66
|
-
color: "mantine.
|
|
67
|
-
background: `mantine.
|
|
66
|
+
color: "mantine.orange[4]",
|
|
67
|
+
background: `mantine.orange[8]/20`
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
//#endregion
|
|
@@ -3,5 +3,5 @@ type RelationshipsTabPanelProps = {
|
|
|
3
3
|
node: LikeC4Model.Node | null;
|
|
4
4
|
element: LikeC4Model.Element;
|
|
5
5
|
};
|
|
6
|
-
export declare function TabPanelRelationships({ node, element, }: RelationshipsTabPanelProps): import("react
|
|
6
|
+
export declare function TabPanelRelationships({ node, element, }: RelationshipsTabPanelProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { useDiagram } from "../../hooks/safeContext.js";
|
|
3
|
+
import { fqn, relationshipStat, xyflow } from "./TabPanelRelationships.css.js";
|
|
3
4
|
import { useElementDetailsActorRef } from "./actorContext.js";
|
|
4
5
|
import { RelationshipsBrowser } from "../relationships-browser/RelationshipsBrowser.js";
|
|
5
|
-
import { fqn, relationshipStat, xyflow } from "./TabPanelRelationships.css.js";
|
|
6
6
|
import { IconArrowRight, IconExternalLink, IconInfoCircle } from "@tabler/icons-react";
|
|
7
7
|
import { useCallback } from "react";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -14,8 +14,8 @@ var elementLabel = css({
|
|
|
14
14
|
py: "xs",
|
|
15
15
|
alignItems: "center",
|
|
16
16
|
cursor: "pointer",
|
|
17
|
-
color: "mantine.
|
|
18
|
-
_dark: { color: "mantine.
|
|
17
|
+
color: "mantine.gray[7]",
|
|
18
|
+
_dark: { color: "mantine.dark[1]" },
|
|
19
19
|
"& > *": { transition: "fast" },
|
|
20
20
|
_hover: {
|
|
21
21
|
transitionTimingFunction: "out",
|
|
@@ -20,6 +20,6 @@ type TabPanelStructureProps = {
|
|
|
20
20
|
export declare const ElementLabel: ({ element, }: {
|
|
21
21
|
element: LikeC4Model.Element;
|
|
22
22
|
type: "ancestor" | "current" | "descedant";
|
|
23
|
-
}) => import("react
|
|
24
|
-
export declare function TabPanelStructure({ element, }: TabPanelStructureProps): import("react
|
|
23
|
+
}) => import("react").JSX.Element;
|
|
24
|
+
export declare function TabPanelStructure({ element, }: TabPanelStructureProps): import("react").JSX.Element;
|
|
25
25
|
export {};
|
|
@@ -2,7 +2,7 @@ import { DiagramView, Fqn, NodeId } from '@likec4/core/types';
|
|
|
2
2
|
import { Rect } from '@xyflow/system';
|
|
3
3
|
import { ActorRef, SnapshotFrom, StateMachine } from 'xstate';
|
|
4
4
|
import { RelationshipsBrowserActorRef } from '../relationships-browser/actor';
|
|
5
|
-
export type
|
|
5
|
+
export type ElementDetailsInput = {
|
|
6
6
|
subject: Fqn;
|
|
7
7
|
currentView: DiagramView;
|
|
8
8
|
initiatedFrom?: {
|
|
@@ -26,10 +26,9 @@ export type Events = {
|
|
|
26
26
|
};
|
|
27
27
|
export interface ElementDetailsLogic extends StateMachine<Context, Events, {
|
|
28
28
|
[key: `${string}-relationships`]: RelationshipsBrowserActorRef | undefined;
|
|
29
|
-
}, any, any, any, any, any, never,
|
|
29
|
+
}, any, any, any, any, any, never, ElementDetailsInput, any, any, any, any> {
|
|
30
30
|
}
|
|
31
31
|
export declare const elementDetailsLogic: ElementDetailsLogic;
|
|
32
32
|
export type ElementDetailsSnapshot = SnapshotFrom<ElementDetailsLogic>;
|
|
33
33
|
export interface ElementDetailsActorRef extends ActorRef<ElementDetailsSnapshot, Events> {
|
|
34
34
|
}
|
|
35
|
-
export type { Input as ElementDetailsInput, };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OverlaysActorRef, OverlaysContext, OverlayActorEvent } from './overlaysActor';
|
|
2
|
+
import { Provider } from 'react';
|
|
3
|
+
import { MachineSnapshot } from 'xstate';
|
|
4
|
+
export declare const OverlaysActorContext: Provider<OverlaysActorRef>, selectOverlaysSnapshot: <T>(select: (state: MachineSnapshot<OverlaysContext, OverlayActorEvent, {
|
|
5
|
+
[key: `elementDetails-${number}`]: import("./types").Overlays.ElementDetails.ActorRef | undefined;
|
|
6
|
+
[key: `relationshipDetails-${number}`]: import("./types").Overlays.RelationshipDetails.ActorRef | undefined;
|
|
7
|
+
[key: `relationshipsBrowser-${number}`]: import("./types").Overlays.RelationshipsBrowser.ActorRef | undefined;
|
|
8
|
+
}, any, never, any, any, any>) => T, compare?: ((old: NoInfer<T>, next: NoInfer<T>) => boolean) | undefined) => [selector: (snapshot: MachineSnapshot<OverlaysContext, OverlayActorEvent, {
|
|
9
|
+
[key: `elementDetails-${number}`]: import("./types").Overlays.ElementDetails.ActorRef | undefined;
|
|
10
|
+
[key: `relationshipDetails-${number}`]: import("./types").Overlays.RelationshipDetails.ActorRef | undefined;
|
|
11
|
+
[key: `relationshipsBrowser-${number}`]: import("./types").Overlays.RelationshipsBrowser.ActorRef | undefined;
|
|
12
|
+
}, any, never, any, any, any>) => T, compare: (a: T, b: T) => boolean], useSelectOverlaysActor: {
|
|
13
|
+
<T>(select: (state: MachineSnapshot<OverlaysContext, OverlayActorEvent, {
|
|
14
|
+
[key: `elementDetails-${number}`]: import("./types").Overlays.ElementDetails.ActorRef | undefined;
|
|
15
|
+
[key: `relationshipDetails-${number}`]: import("./types").Overlays.RelationshipDetails.ActorRef | undefined;
|
|
16
|
+
[key: `relationshipsBrowser-${number}`]: import("./types").Overlays.RelationshipsBrowser.ActorRef | undefined;
|
|
17
|
+
}, any, never, any, any, any>) => T): T;
|
|
18
|
+
<T>(selectorCompare: [selector: (snapshot: MachineSnapshot<OverlaysContext, OverlayActorEvent, {
|
|
19
|
+
[key: `elementDetails-${number}`]: import("./types").Overlays.ElementDetails.ActorRef | undefined;
|
|
20
|
+
[key: `relationshipDetails-${number}`]: import("./types").Overlays.RelationshipDetails.ActorRef | undefined;
|
|
21
|
+
[key: `relationshipsBrowser-${number}`]: import("./types").Overlays.RelationshipsBrowser.ActorRef | undefined;
|
|
22
|
+
}, any, never, any, any, any>) => T, compare: (a: T, b: T) => boolean]): T;
|
|
23
|
+
<T>(selector: (snapshot: MachineSnapshot<OverlaysContext, OverlayActorEvent, {
|
|
24
|
+
[key: `elementDetails-${number}`]: import("./types").Overlays.ElementDetails.ActorRef | undefined;
|
|
25
|
+
[key: `relationshipDetails-${number}`]: import("./types").Overlays.RelationshipDetails.ActorRef | undefined;
|
|
26
|
+
[key: `relationshipsBrowser-${number}`]: import("./types").Overlays.RelationshipsBrowser.ActorRef | undefined;
|
|
27
|
+
}, any, never, any, any, any>) => T, compare: (a: T, b: T) => boolean): T;
|
|
28
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createSafeContextForActor } from "../hooks/safeContext.js";
|
|
2
|
+
//#region src/overlays/hooks.ts
|
|
3
|
+
var { ContextProvider: OverlaysActorContext, selectSnapshot: selectOverlaysSnapshot, useActorSelector: useSelectOverlaysActor } = createSafeContextForActor("Overlays");
|
|
4
|
+
//#endregion
|
|
5
|
+
export { OverlaysActorContext, selectOverlaysSnapshot, useSelectOverlaysActor };
|
|
@@ -12,35 +12,37 @@ import { overlay } from "@likec4/styles/recipes";
|
|
|
12
12
|
var backdropBlur = "--_blur";
|
|
13
13
|
var backdropOpacity = "--_opacity";
|
|
14
14
|
var cssVarLevel = "--_level";
|
|
15
|
-
var Overlay = forwardRef(({ onClose, className, classes, overlayLevel = 0, children, fullscreen = false, withBackdrop = true, backdrop, openDelay =
|
|
15
|
+
var Overlay = forwardRef(({ onClose, className, classes, overlayLevel = 0, children, fullscreen = false, withBackdrop = true, backdrop, openDelay = 120, ...rest }, ref) => {
|
|
16
16
|
const [opened, setOpened] = useState(false);
|
|
17
17
|
const focusTrapRef = useFocusTrap(opened);
|
|
18
18
|
const dialogRef = useRef(null);
|
|
19
|
-
const
|
|
19
|
+
const onCloseCalledRef = useRef(false);
|
|
20
20
|
const motionNotReduced = useReducedMotionConfig() !== true;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* This function is called when the overlay is closed by outside click or escape key.
|
|
23
|
+
* It ensures that the onClose callback is only called once.
|
|
23
24
|
*/
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const closeMe = () => {
|
|
26
|
+
if (!onCloseCalledRef.current) {
|
|
27
|
+
onCloseCalledRef.current = true;
|
|
28
|
+
onClose();
|
|
29
|
+
}
|
|
27
30
|
};
|
|
28
31
|
const isPresent = useIsPresent();
|
|
29
32
|
useEffect(() => {
|
|
30
33
|
if (isPresent) return;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
const dialog = dialogRef.current;
|
|
35
|
+
return () => {
|
|
36
|
+
onCloseCalledRef.current = true;
|
|
37
|
+
if (dialog?.open) dialog.close();
|
|
38
|
+
};
|
|
35
39
|
}, [isPresent]);
|
|
36
40
|
useLayoutEffect(() => {
|
|
37
41
|
const dialog = dialogRef.current;
|
|
38
42
|
if (dialog && !dialog.open) dialog.showModal();
|
|
39
43
|
if (openDelay === 0) setOpened(true);
|
|
40
44
|
}, []);
|
|
41
|
-
useTimeoutEffect(() =>
|
|
42
|
-
setOpened(true);
|
|
43
|
-
}, openDelay > 0 ? openDelay : void 0);
|
|
45
|
+
useTimeoutEffect(() => setOpened(true), openDelay > 0 ? openDelay : void 0);
|
|
44
46
|
const overlayRecipe = overlay({
|
|
45
47
|
fullscreen,
|
|
46
48
|
withBackdrop
|
|
@@ -49,22 +51,31 @@ var Overlay = forwardRef(({ onClose, className, classes, overlayLevel = 0, child
|
|
|
49
51
|
if (backdrop?.opacity !== void 0) targetBackdropOpacity = `${backdrop.opacity * 100}%`;
|
|
50
52
|
const motionProps = useMemo(() => ({
|
|
51
53
|
initial: {
|
|
52
|
-
[backdropBlur]: "
|
|
53
|
-
[backdropOpacity]: "
|
|
54
|
-
|
|
54
|
+
[backdropBlur]: "2px",
|
|
55
|
+
[backdropOpacity]: "20%",
|
|
56
|
+
scaleX: .95,
|
|
57
|
+
scaleY: .85,
|
|
58
|
+
originY: 0,
|
|
59
|
+
translateY: -8,
|
|
55
60
|
opacity: 0
|
|
56
61
|
},
|
|
57
62
|
animate: {
|
|
58
63
|
[backdropBlur]: overlayLevel > 0 ? "4px" : "8px",
|
|
59
64
|
[backdropOpacity]: targetBackdropOpacity,
|
|
60
|
-
|
|
65
|
+
scaleX: 1,
|
|
66
|
+
scaleY: 1,
|
|
67
|
+
originY: 0,
|
|
68
|
+
translateY: 0,
|
|
61
69
|
opacity: 1
|
|
62
70
|
},
|
|
63
71
|
exit: {
|
|
72
|
+
scaleX: .9,
|
|
73
|
+
scaleY: .8,
|
|
74
|
+
originY: 0,
|
|
75
|
+
translateY: -10,
|
|
64
76
|
opacity: 0,
|
|
65
|
-
|
|
66
|
-
[
|
|
67
|
-
[backdropOpacity]: "0%"
|
|
77
|
+
[backdropBlur]: "2px",
|
|
78
|
+
[backdropOpacity]: "20%"
|
|
68
79
|
}
|
|
69
80
|
}), [overlayLevel, targetBackdropOpacity]);
|
|
70
81
|
return /* @__PURE__ */ jsx(m.dialog, {
|
|
@@ -81,16 +92,14 @@ var Overlay = forwardRef(({ onClose, className, classes, overlayLevel = 0, child
|
|
|
81
92
|
...rest,
|
|
82
93
|
onClick: (e) => {
|
|
83
94
|
e.stopPropagation();
|
|
84
|
-
if (e.target === e.currentTarget)
|
|
95
|
+
if (e.target === e.currentTarget) closeMe();
|
|
85
96
|
},
|
|
86
97
|
onCancel: (e) => {
|
|
87
98
|
e.preventDefault();
|
|
88
99
|
e.stopPropagation();
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
onClose: () => {
|
|
92
|
-
onCloseRef.current?.();
|
|
100
|
+
closeMe();
|
|
93
101
|
},
|
|
102
|
+
onClose: closeMe,
|
|
94
103
|
children: /* @__PURE__ */ jsx(RemoveScroll, {
|
|
95
104
|
forwardProps: true,
|
|
96
105
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -5,7 +5,6 @@ import { relationshipDetailsLogic } from "./relationship-details/actor.js";
|
|
|
5
5
|
import { isString, last, reverse } from "remeda";
|
|
6
6
|
import { getHotkeyHandler } from "@mantine/hooks";
|
|
7
7
|
import { assertEvent, fromCallback, setup } from "xstate";
|
|
8
|
-
import "xstate/guards";
|
|
9
8
|
//#region src/overlays/overlaysActor.ts
|
|
10
9
|
var machine = setup({
|
|
11
10
|
types: {
|
|
@@ -2,4 +2,4 @@ import { RelationshipDetailsActorRef } from './actor';
|
|
|
2
2
|
export type RelationshipDetailsProps = {
|
|
3
3
|
actorRef: RelationshipDetailsActorRef;
|
|
4
4
|
};
|
|
5
|
-
export declare function RelationshipDetails({ actorRef }: RelationshipDetailsProps): import("react
|
|
5
|
+
export declare function RelationshipDetails({ actorRef }: RelationshipDetailsProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RelationshipDetailsTypes as Types } from '../_types';
|
|
2
|
-
export declare const ElementActions: (props: Types.NodeProps<"element">) => import("react
|
|
2
|
+
export declare const ElementActions: (props: Types.NodeProps<"element">) => import("react").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseNodePropsWithData } from '../../../base';
|
|
2
2
|
import { RelationshipDetailsTypes } from '../_types';
|
|
3
|
-
export declare function ElementNode(props: RelationshipDetailsTypes.NodeProps<'element'>): import("react
|
|
4
|
-
export declare function CompoundNode(props: RelationshipDetailsTypes.NodeProps<'compound'>): import("react
|
|
3
|
+
export declare function ElementNode(props: RelationshipDetailsTypes.NodeProps<'element'>): import("react").JSX.Element;
|
|
4
|
+
export declare function CompoundNode(props: RelationshipDetailsTypes.NodeProps<'compound'>): import("react").JSX.Element;
|
|
5
5
|
type ElementPortsProps = BaseNodePropsWithData<Pick<RelationshipDetailsTypes.ElementNodeData, 'ports' | 'height'>>;
|
|
6
|
-
export declare function ElementPorts({ data: { ports, height: h } }: ElementPortsProps): import("react
|
|
6
|
+
export declare function ElementPorts({ data: { ports, height: h } }: ElementPortsProps): import("react").JSX.Element;
|
|
7
7
|
type CompoundPortsProps = BaseNodePropsWithData<Pick<RelationshipDetailsTypes.CompoundNodeData, 'ports'>>;
|
|
8
|
-
export declare function CompoundPorts({ data }: CompoundPortsProps): import("react
|
|
8
|
+
export declare function CompoundPorts({ data }: CompoundPortsProps): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { filter, find, map, mapToObj, omit, pipe, prop, reduce, sortBy, tap } from "remeda";
|
|
3
3
|
import { DefaultMap, ifind, invariant } from "@likec4/core/utils";
|
|
4
|
+
import { exact, preferSummary } from "@likec4/core/types";
|
|
4
5
|
import { treeFromElements } from "@likec4/core/compute-view";
|
|
5
6
|
import dagre from "@dagrejs/dagre";
|
|
6
|
-
import { exact, preferSummary } from "@likec4/core/types";
|
|
7
7
|
//#region src/overlays/relationship-details/layout.ts
|
|
8
8
|
/**
|
|
9
9
|
* All constants related to the layout
|
|
@@ -2,4 +2,4 @@ import { RelationshipsBrowserActorRef } from './actor';
|
|
|
2
2
|
export type RelationshipsBrowserProps = {
|
|
3
3
|
actorRef: RelationshipsBrowserActorRef;
|
|
4
4
|
};
|
|
5
|
-
export declare function RelationshipsBrowser({ actorRef }: RelationshipsBrowserProps): import("react
|
|
5
|
+
export declare function RelationshipsBrowser({ actorRef }: RelationshipsBrowserProps): import("react").JSX.Element;
|
|
@@ -8,7 +8,7 @@ var SelectElement_css_exports = /* @__PURE__ */ __exportAll({
|
|
|
8
8
|
});
|
|
9
9
|
var node = css({ margin: "0" });
|
|
10
10
|
var label = css({ _hover: {
|
|
11
|
-
backgroundColor: "mantine.
|
|
11
|
+
backgroundColor: "mantine.gray[0]",
|
|
12
12
|
_dark: {
|
|
13
13
|
backgroundColor: "default.hover",
|
|
14
14
|
color: "white"
|
|
@@ -16,4 +16,4 @@ var label = css({ _hover: {
|
|
|
16
16
|
} });
|
|
17
17
|
var scrollArea = css({ maxHeight: ["70vh", "calc(100cqh - 70px)"] });
|
|
18
18
|
//#endregion
|
|
19
|
-
export { SelectElement_css_exports, scrollArea };
|
|
19
|
+
export { SelectElement_css_exports, label, node, scrollArea };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MemoExoticComponent } from 'react';
|
|
2
|
-
export declare const SelectElement: MemoExoticComponent<() => import("react
|
|
2
|
+
export declare const SelectElement: MemoExoticComponent<() => import("react").JSX.Element>;
|