@likec4/diagram 1.43.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/index.js +14727 -13166
- package/dist/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.js +14 -9
- package/dist/LikeC4Diagram.props.d.ts +25 -15
- package/dist/LikeC4ProjectsProvider.js +1 -1
- package/dist/LikeC4Styles.js +0 -3
- package/dist/LikeC4View.d.ts +8 -3
- package/dist/LikeC4View.js +29 -14
- package/dist/ReactLikeC4.d.ts +2 -2
- package/dist/ReactLikeC4.js +2 -2
- package/dist/StaticLikeC4Diagram.js +1 -1
- package/dist/_virtual/_commonjsHelpers.js +3 -0
- package/dist/_virtual/assign-dea9f7c8.cjs.js +3 -0
- package/dist/_virtual/log-ec8d4df4.cjs.js +3 -0
- package/dist/_virtual/raise-da5b247f.cjs.js +3 -0
- package/dist/_virtual/xstate-actions.cjs.js +5 -0
- package/dist/_virtual/xstate-actions.cjs2.js +3 -0
- package/dist/_virtual/xstate-dev.cjs.js +3 -0
- package/dist/_virtual/xstate-guards.cjs.js +5 -0
- package/dist/_virtual/xstate-guards.cjs2.js +3 -0
- package/dist/base/Background.d.ts +2 -1
- package/dist/base/Background.js +11 -2
- package/dist/base/Base.d.ts +28 -0
- package/dist/base/BaseXYFlow.d.ts +5 -5
- package/dist/base/BaseXYFlow.js +38 -44
- package/dist/base/index.d.ts +6 -2
- package/dist/base/types.d.ts +1 -28
- package/dist/base/updateEdges.js +25 -14
- package/dist/base/updateNodes.d.ts +14 -0
- package/dist/base/updateNodes.js +51 -17
- package/dist/base-primitives/Markdown.d.ts +30 -4
- package/dist/base-primitives/Markdown.js +3 -2
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +3 -2
- package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +3 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +3 -2
- package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +8 -1
- package/dist/base-primitives/edge/EdgeLabel.d.ts +3 -2
- package/dist/base-primitives/edge/EdgeLabel.js +2 -0
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.js +4 -0
- package/dist/base-primitives/edge/EdgePath.d.ts +4 -0
- package/dist/base-primitives/edge/EdgePath.js +29 -5
- package/dist/base-primitives/element/ElementActionButtons.d.ts +6 -4
- package/dist/base-primitives/element/ElementActionButtons.js +3 -3
- package/dist/base-primitives/element/ElementData.d.ts +3 -3
- package/dist/base-primitives/element/ElementData.js +13 -7
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +3 -2
- package/dist/base-primitives/element/ElementDetailsButton.js +5 -5
- package/dist/base-primitives/element/ElementNodeContainer.css.js +15 -27
- package/dist/base-primitives/element/ElementShape.js +5 -5
- package/dist/base-primitives/element/ElementTags.d.ts +6 -4
- package/dist/base-primitives/element/ElementTags.js +2 -1
- package/dist/base-primitives/memoEdge.js +4 -2
- package/dist/base-primitives/memoNode.d.ts +1 -1
- package/dist/base-primitives/memoNode.js +3 -3
- package/dist/components/ErrorFallback.js +52 -35
- package/dist/components/Link.js +2 -2
- package/dist/context/DiagramEventHandlers.js +2 -1
- package/dist/context/DiagramFeatures.d.ts +25 -6
- package/dist/context/DiagramFeatures.js +28 -56
- package/dist/context/IconRenderer.js +6 -6
- package/dist/context/LikeC4ModelContext.js +3 -10
- package/dist/context/TagStylesContext.js +3 -19
- package/dist/context/index.d.ts +1 -1
- package/dist/custom/customNodes.js +3 -2
- package/dist/custom/hooks.d.ts +3 -3
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +5 -5
- package/dist/editor/LikeC4EditorContext.d.ts +21 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +4 -2
- package/dist/hooks/safeContext.d.ts +6 -3
- package/dist/hooks/safeContext.js +10 -3
- package/dist/hooks/useCallbackRef.d.ts +1 -0
- package/dist/hooks/useCallbackRef.js +13 -0
- package/dist/hooks/useCurrentView.d.ts +11 -0
- package/dist/hooks/{useCurrentViewId.js → useCurrentView.js} +7 -3
- package/dist/hooks/useCurrentViewModel.js +4 -1
- package/dist/hooks/useDiagram.d.ts +7 -113
- package/dist/hooks/useDiagram.js +7 -127
- package/dist/hooks/useDiagramCompareLayout.d.ts +35 -0
- package/dist/hooks/useDiagramCompareLayout.js +65 -0
- package/dist/hooks/useLikeC4Project.d.ts +6 -1
- package/dist/hooks/useLikeC4Project.js +14 -2
- package/dist/hooks/useMediaPrint.d.ts +6 -0
- package/dist/hooks/useUpdateEffect.js +2 -4
- package/dist/hooks/useXYFlow.d.ts +1 -0
- package/dist/hooks/useXYFlow.js +4 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/likec4diagram/DiagramUI.js +14 -7
- package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -2
- package/dist/likec4diagram/DiagramXYFlow.js +60 -52
- package/dist/likec4diagram/convert-to-xyflow.d.ts +0 -1
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/edges/EdgeDrifts.js +38 -0
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +256 -217
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +9 -2
- package/dist/likec4diagram/custom/edges/edges.css.js +3 -4
- package/dist/likec4diagram/custom/edges/useControlPoints.d.ts +8 -0
- package/dist/likec4diagram/custom/edges/useControlPoints.js +58 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +7 -0
- package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +60 -0
- package/dist/likec4diagram/custom/edges/utils.d.ts +0 -12
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +4 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.js +15 -10
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +6 -0
- package/dist/likec4diagram/custom/nodes/NodeDrifts.js +50 -0
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +7 -2
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +9 -1
- package/dist/likec4diagram/custom/nodes/nodes.js +74 -29
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +2 -1
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +4 -3
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +1 -11
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +7 -51
- package/dist/likec4diagram/custom/nodes/toolbar/types.d.ts +5 -0
- package/dist/likec4diagram/custom/nodes/toolbar/types.js +7 -0
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.d.ts +8 -0
- package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.js +44 -0
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +8 -10
- package/dist/likec4diagram/relationship-popover/actor.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
- package/dist/likec4diagram/state/DiagramActorProvider.js +95 -70
- package/dist/likec4diagram/state/assign.d.ts +13 -7
- package/dist/likec4diagram/state/assign.js +43 -282
- package/dist/likec4diagram/state/createViewChange.d.ts +3 -0
- package/dist/likec4diagram/state/createViewChange.js +79 -0
- package/dist/likec4diagram/state/diagram-api.d.ts +109 -0
- package/dist/likec4diagram/state/diagram-api.js +126 -0
- package/dist/likec4diagram/state/machine.actions.d.ts +1783 -0
- package/dist/likec4diagram/state/machine.actions.js +644 -0
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +579 -0
- package/dist/likec4diagram/state/machine.actions.layout.js +129 -0
- package/dist/likec4diagram/state/machine.d.ts +22 -0
- package/dist/likec4diagram/state/machine.js +127 -0
- package/dist/likec4diagram/state/machine.setup.d.ts +327 -0
- package/dist/likec4diagram/state/machine.setup.js +93 -0
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +208 -0
- package/dist/likec4diagram/state/machine.state.initializing.js +55 -0
- package/dist/likec4diagram/state/machine.state.navigating.d.ts +14 -0
- package/dist/likec4diagram/state/machine.state.navigating.js +178 -0
- package/dist/likec4diagram/state/machine.state.ready.d.ts +3131 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +386 -0
- package/dist/likec4diagram/state/machine.state.ready.focused.js +85 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +474 -0
- package/dist/likec4diagram/state/machine.state.ready.idle.js +96 -0
- package/dist/likec4diagram/state/machine.state.ready.js +262 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +128 -0
- package/dist/likec4diagram/state/machine.state.ready.printing.js +40 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +511 -0
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +177 -0
- package/dist/likec4diagram/state/mediaPrintActor.d.ts +12 -0
- package/dist/likec4diagram/state/mediaPrintActor.js +18 -0
- package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +31 -108
- package/dist/likec4diagram/state/syncManualLayoutActor.js +278 -142
- package/dist/likec4diagram/state/types.d.ts +7 -12
- package/dist/likec4diagram/state/utils.d.ts +19 -4
- package/dist/likec4diagram/state/utils.js +47 -4
- package/dist/likec4diagram/types.d.ts +8 -8
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +2 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +66 -0
- package/dist/likec4diagram/ui/index.d.ts +1 -0
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -2
- package/dist/likec4diagram/ui/notation/NotationPanel.js +5 -4
- package/dist/likec4diagram/useLayoutConstraints.d.ts +10 -5
- package/dist/likec4diagram/useLayoutConstraints.js +237 -61
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +0 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +14 -17
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +11 -8
- package/dist/navigationpanel/NavigationPanel.js +16 -8
- package/dist/navigationpanel/NavigationPanelControls.d.ts +2 -1
- package/dist/navigationpanel/NavigationPanelControls.js +23 -17
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +2 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +62 -42
- package/dist/navigationpanel/_common.d.ts +1 -1
- package/dist/navigationpanel/_common.js +4 -2
- package/dist/navigationpanel/actor.d.ts +9 -205
- package/dist/navigationpanel/actor.js +6 -5
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -0
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +59 -0
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +2 -0
- package/dist/navigationpanel/comparepanel/ComparePanel.js +42 -0
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -0
- package/dist/navigationpanel/comparepanel/ComparePanelControls.js +60 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +5 -0
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +38 -0
- package/dist/navigationpanel/comparepanel/index.d.ts +1 -0
- package/dist/navigationpanel/controls/{ViewDetailsCard.d.ts → DetailsControls.d.ts} +1 -1
- package/dist/navigationpanel/controls/{ViewDetailsCard.js → DetailsControls.js} +18 -14
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +2 -0
- package/dist/navigationpanel/controls/LayoutWarning.js +102 -0
- package/dist/navigationpanel/controls/NavigationButtons.js +4 -3
- package/dist/navigationpanel/controls/OpenSource.js +2 -2
- package/dist/navigationpanel/controls/SearchControl.d.ts +2 -1
- package/dist/navigationpanel/controls/SearchControl.js +15 -17
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +26 -18
- package/dist/navigationpanel/controls/index.d.ts +2 -1
- package/dist/navigationpanel/dropdown/ProjectsMenu.d.ts +2 -2
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +5 -5
- package/dist/navigationpanel/editorpanel/CenterCamera.js +5 -2
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +21 -20
- package/dist/navigationpanel/editorpanel/EditorPanel.js +3 -3
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +2 -2
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +16 -13
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -0
- package/dist/navigationpanel/editorpanel/ToggleReadonly.js +15 -0
- package/dist/navigationpanel/styles.css.d.ts +2 -2
- package/dist/navigationpanel/styles.css.js +4 -4
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +14 -8
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +66 -66
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +31 -14
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +2 -1
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +68 -50
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/actions/dist/xstate-actions.cjs.js +37 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dev/dist/xstate-dev.cjs.js +59 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/assign-dea9f7c8.cjs.js +140 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/log-ec8d4df4.cjs.js +401 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/raise-da5b247f.cjs.js +2716 -0
- package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/guards/dist/xstate-guards.cjs.js +26 -0
- package/dist/overlays/element-details/ElementDetails.js +7 -7
- package/dist/overlays/element-details/ElementDetailsCard.css.js +3 -3
- package/dist/overlays/element-details/ElementDetailsCard.js +7 -5
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -1
- package/dist/overlays/element-details/MetadataValue.js +2 -2
- package/dist/overlays/element-details/TabPanelDeployments.js +6 -4
- package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +8 -82
- package/dist/overlays/element-details/actor.js +0 -8
- package/dist/overlays/overlay/Overlay.js +10 -10
- package/dist/overlays/overlaysActor.d.ts +7 -150
- package/dist/overlays/overlaysActor.js +183 -161
- package/dist/overlays/relationship-details/RelationshipDetails.js +4 -3
- package/dist/overlays/relationship-details/SelectEdge.js +2 -2
- package/dist/overlays/relationship-details/_types.d.ts +3 -4
- package/dist/overlays/relationship-details/actor.d.ts +6 -550
- package/dist/overlays/relationship-details/actor.js +18 -3
- package/dist/overlays/relationship-details/custom/ElementActions.js +8 -5
- package/dist/overlays/relationship-details/custom/edgeTypes.js +4 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.js +4 -1
- package/dist/overlays/relationship-details/hooks.js +1 -1
- package/dist/overlays/relationship-details/layout-to-xyflow.js +3 -5
- package/dist/overlays/relationship-details/layout.d.ts +3 -3
- package/dist/overlays/relationship-details/layout.js +4 -4
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -4
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/_types.d.ts +2 -3
- package/dist/overlays/relationships-browser/actor.d.ts +7 -673
- package/dist/overlays/relationships-browser/actor.js +132 -110
- package/dist/overlays/relationships-browser/custom/ElementActions.js +44 -37
- package/dist/overlays/relationships-browser/custom/edgeTypes.js +4 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +4 -1
- package/dist/overlays/relationships-browser/hooks.js +7 -6
- package/dist/overlays/relationships-browser/layout.d.ts +2 -2
- package/dist/overlays/relationships-browser/layout.js +3 -3
- package/dist/overlays/relationships-browser/useViewToNodesEdges.js +0 -3
- package/dist/overlays/types.d.ts +12 -13
- package/dist/search/Search.js +2 -1
- package/dist/search/components/ElementsColumn.js +5 -3
- package/dist/search/components/PickView.js +1 -1
- package/dist/search/components/SearchByTags.js +21 -44
- package/dist/search/components/SearchInput.js +1 -1
- package/dist/search/components/ViewsColum.js +6 -4
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/searchActor.d.ts +3 -66
- package/dist/shadowroot/ShadowRoot.d.ts +5 -7
- package/dist/shadowroot/ShadowRoot.js +8 -6
- package/dist/styles.css2.js +1 -1
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/vector.d.ts +83 -21
- package/dist/utils/vector.js +98 -24
- package/dist/utils/view-bounds.d.ts +8 -0
- package/dist/utils/view-bounds.js +58 -0
- package/dist/utils/xyflow.d.ts +52 -8
- package/dist/utils/xyflow.js +31 -11
- package/package.json +26 -24
- package/panda.buildinfo.json +124 -71
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/dist/hooks/useCurrentViewId.d.ts +0 -6
- package/dist/likec4diagram/custom/edges/utils.js +0 -23
- package/dist/likec4diagram/state/diagram-machine.d.ts +0 -2590
- package/dist/likec4diagram/state/diagram-machine.js +0 -1180
- package/dist/navigationpanel/editorpanel/LayoutDriftNotification.d.ts +0 -1
- package/dist/navigationpanel/editorpanel/LayoutDriftNotification.js +0 -56
- package/dist/utils/get-view-bounds.d.ts +0 -3
- package/dist/utils/get-view-bounds.js +0 -14
- /package/dist/base/{types.js → Base.js} +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -0
- /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { getHotkeyHandler } from '@mantine/hooks';
|
|
2
2
|
import { last, isString, reverse } from 'remeda';
|
|
3
|
-
import { setup,
|
|
3
|
+
import { setup, fromCallback, assertEvent } from 'xstate';
|
|
4
4
|
import { elementDetailsLogic } from './element-details/actor.js';
|
|
5
5
|
import { relationshipDetailsLogic } from './relationship-details/actor.js';
|
|
6
6
|
import { relationshipsBrowserLogic } from './relationships-browser/actor.js';
|
|
7
|
+
import { x as xstateGuards_cjsExports } from '../_virtual/xstate-guards.cjs.js';
|
|
7
8
|
|
|
8
9
|
const hotkeyLogic = fromCallback(({ sendBack }) => {
|
|
9
10
|
const handler = getHotkeyHandler([
|
|
@@ -19,7 +20,7 @@ const hotkeyLogic = fromCallback(({ sendBack }) => {
|
|
|
19
20
|
document.body.removeEventListener("keydown", handler, { capture: true });
|
|
20
21
|
};
|
|
21
22
|
});
|
|
22
|
-
const
|
|
23
|
+
const machine = setup({
|
|
23
24
|
types: {
|
|
24
25
|
context: {},
|
|
25
26
|
events: {},
|
|
@@ -32,119 +33,6 @@ const _overlaysActorLogic = setup({
|
|
|
32
33
|
relationshipsBrowser: relationshipsBrowserLogic,
|
|
33
34
|
hotkey: hotkeyLogic
|
|
34
35
|
},
|
|
35
|
-
actions: {
|
|
36
|
-
"closeLastOverlay": enqueueActions(({ context, enqueue }) => {
|
|
37
|
-
if (context.overlays.length === 0) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
const lastOverlay = last(context.overlays)?.id;
|
|
41
|
-
if (!lastOverlay) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
enqueue.sendTo(lastOverlay, { type: "close" });
|
|
45
|
-
enqueue.stopChild(lastOverlay);
|
|
46
|
-
enqueue.assign({
|
|
47
|
-
overlays: context.overlays.filter((o) => o.id !== lastOverlay)
|
|
48
|
-
});
|
|
49
|
-
}),
|
|
50
|
-
"closeSpecificOverlay": enqueueActions(({ context, enqueue }, params) => {
|
|
51
|
-
const toClose = context.overlays.find((o) => o.id === params.actorId)?.id;
|
|
52
|
-
if (toClose) {
|
|
53
|
-
enqueue.sendTo(toClose, { type: "close" });
|
|
54
|
-
enqueue.stopChild(toClose);
|
|
55
|
-
enqueue.assign({
|
|
56
|
-
overlays: context.overlays.filter((o) => o.id !== toClose)
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}),
|
|
60
|
-
"closeAllOverlays": enqueueActions(({ context, enqueue }) => {
|
|
61
|
-
for (const { id } of reverse(context.overlays)) {
|
|
62
|
-
enqueue.sendTo(id, { type: "close" });
|
|
63
|
-
enqueue.stopChild(id);
|
|
64
|
-
}
|
|
65
|
-
enqueue.assign({ overlays: [] });
|
|
66
|
-
}),
|
|
67
|
-
"openElementDetails": enqueueActions(({ context, enqueue, event }) => {
|
|
68
|
-
assertEvent(event, "open.elementDetails");
|
|
69
|
-
if (context.overlays.some((o) => o.type === "elementDetails" && o.subject === event.subject)) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const id = `elementDetails-${context.seq}`;
|
|
73
|
-
enqueue.spawnChild("elementDetails", {
|
|
74
|
-
id,
|
|
75
|
-
input: event
|
|
76
|
-
});
|
|
77
|
-
enqueue.assign({
|
|
78
|
-
seq: context.seq + 1,
|
|
79
|
-
overlays: [
|
|
80
|
-
...context.overlays,
|
|
81
|
-
{
|
|
82
|
-
type: "elementDetails",
|
|
83
|
-
id,
|
|
84
|
-
subject: event.subject
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
});
|
|
88
|
-
}),
|
|
89
|
-
"openRelationshipDetails": enqueueActions(({ context, enqueue, event }) => {
|
|
90
|
-
assertEvent(event, "open.relationshipDetails");
|
|
91
|
-
const currentOverlay = last(context.overlays);
|
|
92
|
-
if (currentOverlay?.type === "relationshipDetails") {
|
|
93
|
-
enqueue.sendTo(currentOverlay.id, {
|
|
94
|
-
...event,
|
|
95
|
-
type: "navigate.to"
|
|
96
|
-
});
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const id = `relationshipDetails-${context.seq}`;
|
|
100
|
-
enqueue.spawnChild("relationshipDetails", {
|
|
101
|
-
id,
|
|
102
|
-
input: event
|
|
103
|
-
});
|
|
104
|
-
enqueue.assign({
|
|
105
|
-
seq: context.seq + 1,
|
|
106
|
-
overlays: [
|
|
107
|
-
...context.overlays,
|
|
108
|
-
{
|
|
109
|
-
type: "relationshipDetails",
|
|
110
|
-
id
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
});
|
|
114
|
-
}),
|
|
115
|
-
"openRelationshipsBrowser": enqueueActions(({ context, enqueue, event }) => {
|
|
116
|
-
assertEvent(event, "open.relationshipsBrowser");
|
|
117
|
-
const currentOverlay = last(context.overlays);
|
|
118
|
-
if (currentOverlay?.type === "relationshipsBrowser") {
|
|
119
|
-
enqueue.sendTo(currentOverlay.id, {
|
|
120
|
-
type: "navigate.to",
|
|
121
|
-
subject: event.subject,
|
|
122
|
-
viewId: event.viewId
|
|
123
|
-
});
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
const id = `relationshipsBrowser-${context.seq}`;
|
|
127
|
-
enqueue.spawnChild("relationshipsBrowser", {
|
|
128
|
-
id,
|
|
129
|
-
input: event
|
|
130
|
-
});
|
|
131
|
-
enqueue.assign({
|
|
132
|
-
seq: context.seq + 1,
|
|
133
|
-
overlays: [
|
|
134
|
-
...context.overlays,
|
|
135
|
-
{
|
|
136
|
-
type: "relationshipsBrowser",
|
|
137
|
-
id,
|
|
138
|
-
subject: event.subject
|
|
139
|
-
}
|
|
140
|
-
]
|
|
141
|
-
});
|
|
142
|
-
}),
|
|
143
|
-
"listenToEsc": spawnChild("hotkey", {
|
|
144
|
-
id: "hotkey"
|
|
145
|
-
}),
|
|
146
|
-
"stopListeningToEsc": stopChild("hotkey")
|
|
147
|
-
},
|
|
148
36
|
guards: {
|
|
149
37
|
"has overlays?": ({ context }) => context.overlays.length > 0,
|
|
150
38
|
"close specific overlay?": ({ context, event }) => {
|
|
@@ -160,76 +48,210 @@ const _overlaysActorLogic = setup({
|
|
|
160
48
|
return lastOverlay?.type === "relationshipsBrowser";
|
|
161
49
|
}
|
|
162
50
|
}
|
|
163
|
-
})
|
|
51
|
+
});
|
|
52
|
+
const closeLastOverlay = () => machine.enqueueActions(({ context, enqueue }) => {
|
|
53
|
+
if (context.overlays.length === 0) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const lastOverlay = last(context.overlays)?.id;
|
|
57
|
+
if (!lastOverlay) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
enqueue.sendTo(lastOverlay, { type: "close" });
|
|
61
|
+
enqueue.stopChild(lastOverlay);
|
|
62
|
+
enqueue.assign({
|
|
63
|
+
overlays: context.overlays.filter((o) => o.id !== lastOverlay)
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
const closeSpecificOverlay = () => machine.enqueueActions(({ context, enqueue, event }) => {
|
|
67
|
+
assertEvent(event, "close");
|
|
68
|
+
const actorId = event.actorId;
|
|
69
|
+
if (!isString(actorId)) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const toClose = context.overlays.find((o) => o.id === actorId)?.id;
|
|
73
|
+
if (toClose) {
|
|
74
|
+
enqueue.sendTo(toClose, { type: "close" });
|
|
75
|
+
enqueue.stopChild(toClose);
|
|
76
|
+
enqueue.assign({
|
|
77
|
+
overlays: context.overlays.filter((o) => o.id !== toClose)
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
const closeAllOverlays = () => machine.enqueueActions(({ context, enqueue }) => {
|
|
82
|
+
for (const { id } of reverse(context.overlays)) {
|
|
83
|
+
enqueue.sendTo(id, { type: "close" });
|
|
84
|
+
enqueue.stopChild(id);
|
|
85
|
+
}
|
|
86
|
+
enqueue.assign({ overlays: [] });
|
|
87
|
+
});
|
|
88
|
+
const openElementDetails = () => machine.enqueueActions(({ context, enqueue, event }) => {
|
|
89
|
+
assertEvent(event, "open.elementDetails");
|
|
90
|
+
if (context.overlays.some((o) => o.type === "elementDetails" && o.subject === event.subject)) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const id = `elementDetails-${context.seq}`;
|
|
94
|
+
enqueue.spawnChild("elementDetails", {
|
|
95
|
+
id,
|
|
96
|
+
input: event
|
|
97
|
+
});
|
|
98
|
+
enqueue.assign({
|
|
99
|
+
seq: context.seq + 1,
|
|
100
|
+
overlays: [
|
|
101
|
+
...context.overlays,
|
|
102
|
+
{
|
|
103
|
+
id,
|
|
104
|
+
type: "elementDetails",
|
|
105
|
+
subject: event.subject
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
const openRelationshipDetails = () => machine.enqueueActions(({ context, enqueue, event }) => {
|
|
111
|
+
assertEvent(event, "open.relationshipDetails");
|
|
112
|
+
const currentOverlay = last(context.overlays);
|
|
113
|
+
if (currentOverlay?.type === "relationshipDetails") {
|
|
114
|
+
enqueue.sendTo(currentOverlay.id, {
|
|
115
|
+
...event,
|
|
116
|
+
type: "navigate.to"
|
|
117
|
+
});
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const id = `relationshipDetails-${context.seq}`;
|
|
121
|
+
enqueue.spawnChild("relationshipDetails", {
|
|
122
|
+
id,
|
|
123
|
+
input: event
|
|
124
|
+
});
|
|
125
|
+
enqueue.assign({
|
|
126
|
+
seq: context.seq + 1,
|
|
127
|
+
overlays: [
|
|
128
|
+
...context.overlays,
|
|
129
|
+
{
|
|
130
|
+
id,
|
|
131
|
+
type: "relationshipDetails"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
const openRelationshipsBrowser = () => machine.enqueueActions(({ context, enqueue, event }) => {
|
|
137
|
+
assertEvent(event, "open.relationshipsBrowser");
|
|
138
|
+
const currentOverlay = last(context.overlays);
|
|
139
|
+
if (currentOverlay?.type === "relationshipsBrowser") {
|
|
140
|
+
enqueue.sendTo(currentOverlay.id, {
|
|
141
|
+
type: "navigate.to",
|
|
142
|
+
subject: event.subject,
|
|
143
|
+
viewId: event.viewId
|
|
144
|
+
});
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const id = `relationshipsBrowser-${context.seq}`;
|
|
148
|
+
enqueue.spawnChild("relationshipsBrowser", {
|
|
149
|
+
id,
|
|
150
|
+
input: event
|
|
151
|
+
});
|
|
152
|
+
enqueue.assign({
|
|
153
|
+
seq: context.seq + 1,
|
|
154
|
+
overlays: [
|
|
155
|
+
...context.overlays,
|
|
156
|
+
{
|
|
157
|
+
id,
|
|
158
|
+
type: "relationshipsBrowser",
|
|
159
|
+
subject: event.subject
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
const openOverlay = () => machine.enqueueActions(({ enqueue, event }) => {
|
|
165
|
+
console.log("openOverlay event", event);
|
|
166
|
+
assertEvent(event, [
|
|
167
|
+
"open.elementDetails",
|
|
168
|
+
"open.relationshipDetails",
|
|
169
|
+
"open.relationshipsBrowser"
|
|
170
|
+
]);
|
|
171
|
+
switch (event.type) {
|
|
172
|
+
case "open.elementDetails":
|
|
173
|
+
enqueue(openElementDetails());
|
|
174
|
+
break;
|
|
175
|
+
case "open.relationshipDetails":
|
|
176
|
+
enqueue(openRelationshipDetails());
|
|
177
|
+
break;
|
|
178
|
+
case "open.relationshipsBrowser":
|
|
179
|
+
enqueue(openRelationshipsBrowser());
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
const listenToEsc = () => machine.spawnChild("hotkey", {
|
|
184
|
+
id: "hotkey"
|
|
185
|
+
});
|
|
186
|
+
const stopListeningToEsc = () => machine.stopChild("hotkey");
|
|
187
|
+
const checkState = () => machine.enqueueActions(({ enqueue, context }) => {
|
|
188
|
+
if (context.overlays.length === 0) {
|
|
189
|
+
console.log("No overlays left, raising close event");
|
|
190
|
+
enqueue.raise({ type: "close" });
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
const _overlaysActorLogic = machine.createMachine({
|
|
164
194
|
id: "overlays",
|
|
165
195
|
context: () => ({
|
|
166
196
|
seq: 1,
|
|
167
197
|
overlays: []
|
|
168
198
|
}),
|
|
169
199
|
initial: "idle",
|
|
170
|
-
on: {
|
|
171
|
-
"open.elementDetails": {
|
|
172
|
-
actions: "openElementDetails",
|
|
173
|
-
target: ".active",
|
|
174
|
-
reenter: false
|
|
175
|
-
},
|
|
176
|
-
"open.relationshipDetails": {
|
|
177
|
-
actions: "openRelationshipDetails",
|
|
178
|
-
target: ".active",
|
|
179
|
-
reenter: false
|
|
180
|
-
},
|
|
181
|
-
"open.relationshipsBrowser": {
|
|
182
|
-
actions: "openRelationshipsBrowser",
|
|
183
|
-
target: ".active",
|
|
184
|
-
reenter: false
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
200
|
states: {
|
|
188
|
-
idle: {
|
|
201
|
+
idle: {
|
|
202
|
+
on: {
|
|
203
|
+
"open.*": {
|
|
204
|
+
actions: openOverlay(),
|
|
205
|
+
target: "active"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
189
209
|
active: {
|
|
190
|
-
entry:
|
|
191
|
-
|
|
210
|
+
entry: [
|
|
211
|
+
listenToEsc()
|
|
212
|
+
],
|
|
213
|
+
exit: [
|
|
214
|
+
stopListeningToEsc()
|
|
215
|
+
],
|
|
192
216
|
on: {
|
|
217
|
+
"open.*": {
|
|
218
|
+
actions: openOverlay()
|
|
219
|
+
},
|
|
193
220
|
"close": [
|
|
221
|
+
{
|
|
222
|
+
guard: xstateGuards_cjsExports.not("has overlays?"),
|
|
223
|
+
target: "idle"
|
|
224
|
+
},
|
|
194
225
|
{
|
|
195
226
|
guard: "close specific overlay?",
|
|
196
|
-
actions:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
target: "closing"
|
|
227
|
+
actions: [
|
|
228
|
+
closeSpecificOverlay(),
|
|
229
|
+
checkState()
|
|
230
|
+
]
|
|
201
231
|
},
|
|
202
232
|
{
|
|
203
|
-
actions:
|
|
204
|
-
|
|
233
|
+
actions: [
|
|
234
|
+
closeLastOverlay(),
|
|
235
|
+
checkState()
|
|
236
|
+
]
|
|
205
237
|
}
|
|
206
238
|
],
|
|
207
239
|
"close.all": {
|
|
208
240
|
actions: [
|
|
209
|
-
|
|
210
|
-
"stopListeningToEsc"
|
|
241
|
+
closeAllOverlays()
|
|
211
242
|
],
|
|
212
243
|
target: "idle"
|
|
213
244
|
}
|
|
214
245
|
}
|
|
215
246
|
},
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
{
|
|
223
|
-
actions: "stopListeningToEsc",
|
|
224
|
-
target: "idle"
|
|
225
|
-
}
|
|
226
|
-
]
|
|
247
|
+
final: {
|
|
248
|
+
entry: [
|
|
249
|
+
closeAllOverlays(),
|
|
250
|
+
stopListeningToEsc()
|
|
251
|
+
],
|
|
252
|
+
type: "final"
|
|
227
253
|
}
|
|
228
|
-
}
|
|
229
|
-
exit: [
|
|
230
|
-
"stopListeningToEsc",
|
|
231
|
-
"closeAllOverlays"
|
|
232
|
-
]
|
|
254
|
+
}
|
|
233
255
|
});
|
|
234
256
|
const overlaysActorLogic = _overlaysActorLogic;
|
|
235
257
|
|
|
@@ -17,9 +17,9 @@ import { layoutRelationshipDetails } from './layout.js';
|
|
|
17
17
|
import { SelectEdge } from './SelectEdge.js';
|
|
18
18
|
import { RelationshipEdge } from './custom/edgeTypes.js';
|
|
19
19
|
import { CompoundNode, ElementNode } from './custom/nodeTypes.js';
|
|
20
|
-
import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
21
|
-
import IconChevronLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
22
|
-
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
20
|
+
import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
|
|
21
|
+
import IconChevronLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js';
|
|
22
|
+
import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
23
23
|
|
|
24
24
|
const nodeTypes = {
|
|
25
25
|
element: ElementNode,
|
|
@@ -148,6 +148,7 @@ const RelationshipDetailsInner = memo(() => {
|
|
|
148
148
|
browser.send({ type: "xyflow.selectionChange", ...params });
|
|
149
149
|
}),
|
|
150
150
|
nodesDraggable: false,
|
|
151
|
+
nodesSelectable: true,
|
|
151
152
|
fitView: false,
|
|
152
153
|
pannable: true,
|
|
153
154
|
zoomable: true,
|
|
@@ -3,8 +3,8 @@ import { Popover, PopoverTarget, Button, Box, Text, ThemeIcon, PopoverDropdown,
|
|
|
3
3
|
import { useRef } from 'react';
|
|
4
4
|
import { useRelationshipDetails } from './hooks.js';
|
|
5
5
|
import { edgeSource, edgeTarget, scrollArea, edgeGrid, edgeRow, edgeArrow, edgeLabel } from './SelectEdge.css.js';
|
|
6
|
-
import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
7
|
-
import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.
|
|
6
|
+
import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
|
|
7
|
+
import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
|
|
8
8
|
|
|
9
9
|
const SelectEdge = ({
|
|
10
10
|
edge,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color, DiagramNode, ExclusiveUnion, Fqn, IconUrl, RelationId, RelationshipArrowType, RelationshipLineType,
|
|
1
|
+
import { Color, DiagramNode, ExclusiveUnion, Fqn, IconUrl, MarkdownOrString, RelationId, RelationshipArrowType, RelationshipLineType, ViewId } from '@likec4/core/types';
|
|
2
2
|
import { FunctionComponent } from 'react';
|
|
3
3
|
import { Simplify } from 'type-fest';
|
|
4
4
|
import { BaseEdge, BaseEdgeData, BaseEdgeProps, BaseNode, BaseNodeData, BaseNodeProps, NonOptional } from '../../base/types';
|
|
@@ -11,12 +11,11 @@ export declare namespace RelationshipDetailsTypes {
|
|
|
11
11
|
in: string[];
|
|
12
12
|
out: string[];
|
|
13
13
|
};
|
|
14
|
-
type ElementNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'technology' | 'color' | 'shape' | 'width' | 'height' | 'navigateTo' | 'style' | 'tags'>> & {
|
|
14
|
+
type ElementNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'technology' | 'description' | 'color' | 'shape' | 'width' | 'height' | 'navigateTo' | 'style' | 'tags'>> & {
|
|
15
15
|
column: Column;
|
|
16
16
|
fqn: Fqn;
|
|
17
17
|
icon: IconUrl;
|
|
18
18
|
ports: Ports;
|
|
19
|
-
description: RichTextOrEmpty;
|
|
20
19
|
}>;
|
|
21
20
|
type CompoundNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'color' | 'style'>> & {
|
|
22
21
|
column: Column;
|
|
@@ -51,7 +50,7 @@ export declare namespace RelationshipDetailsTypes {
|
|
|
51
50
|
line: RelationshipLineType;
|
|
52
51
|
head?: RelationshipArrowType;
|
|
53
52
|
tail?: RelationshipArrowType;
|
|
54
|
-
description:
|
|
53
|
+
description: MarkdownOrString | null;
|
|
55
54
|
}>;
|
|
56
55
|
type Edge = BaseEdge<EdgeData, 'relationship'>;
|
|
57
56
|
type EdgeProps = BaseEdgeProps<Edge>;
|