@likec4/diagram 1.22.1 → 1.23.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 +2 -3
- package/dist/base/BaseXYFlow.js +0 -1
- package/dist/base/example/custom.d.ts +1 -1
- package/dist/base/primitives/customEdge.d.ts +1 -1
- package/dist/base/primitives/edge/EdgePath.d.ts +1 -1
- package/dist/context/DiagramEventHandlers.d.ts +6 -2
- package/dist/context/DiagramEventHandlers.js +25 -20
- package/dist/context/DiagramFeatures.js +9 -22
- package/dist/{style.css → diagram.css} +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/safeContext.d.ts +7 -0
- package/dist/hooks/safeContext.js +14 -0
- package/dist/hooks/useCurrentViewId.js +1 -1
- package/dist/hooks/useDiagram.d.ts +6587 -5969
- package/dist/hooks/useDiagram.js +26 -14
- package/dist/index.js +1 -1
- package/dist/likec4diagram/DiagramUI.js +12 -5
- package/dist/likec4diagram/XYFlow.js +3 -4
- package/dist/likec4diagram/custom/edges/NotePopover.js +1 -2
- package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +1 -1
- package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +6 -7
- package/dist/likec4diagram/custom/index.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +1 -1
- package/dist/likec4diagram/ui/controls/ChangeAutoLayoutButton.js +1 -2
- package/dist/likec4diagram/ui/controls/Controls.js +3 -13
- package/dist/likec4diagram/ui/controls/NavigationButtons.js +1 -2
- package/dist/likec4diagram/ui/controls/ToggleReadonly.js +1 -2
- package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +8 -9
- package/dist/likec4diagram/ui/notation/NotationPanel.js +1 -2
- package/dist/likec4diagram/ui/search/LikeC4Search.js +2 -4
- package/dist/likec4diagram/ui/search/ViewsColum.js +1 -1
- package/dist/likec4diagram/ui/search/state.js +1 -1
- package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.js +1 -2
- package/dist/likec4diagram/useViewToNodesEdges.d.ts +0 -1
- package/dist/likec4diagram/useViewToNodesEdges.js +0 -2
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Accordion/Accordion.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/ActionIcon/ActionIcon.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Affix/Affix.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Alert/Alert.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Anchor/Anchor.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/AngleSlider/AngleSlider.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/AppShell/AppShell.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/AspectRatio/AspectRatio.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Avatar/Avatar.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/BackgroundImage/BackgroundImage.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Badge/Badge.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Blockquote/Blockquote.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Breadcrumbs/Breadcrumbs.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Burger/Burger.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Button/Button.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Card/Card.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Center/Center.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Checkbox/Checkbox.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Checkbox/CheckboxCard/CheckboxCard.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Checkbox/CheckboxIndicator/CheckboxIndicator.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Chip/Chip.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/CloseButton/CloseButton.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Code/Code.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/ColorInput/ColorInput.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/ColorPicker/ColorPicker.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/ColorSwatch/ColorSwatch.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Combobox/Combobox.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Container/Container.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Dialog/Dialog.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Divider/Divider.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Drawer/Drawer.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Fieldset/Fieldset.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Flex/Flex.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/FloatingIndicator/FloatingIndicator.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Grid/Grid.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Group/Group.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Image/Image.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Indicator/Indicator.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/InlineInput/InlineInput.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Input/Input.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Kbd/Kbd.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/List/List.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Loader/Loader.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/LoadingOverlay/LoadingOverlay.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Mark/Mark.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Menu/Menu.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Modal/Modal.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/ModalBase/ModalBase.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/NavLink/NavLink.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Notification/Notification.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/NumberInput/NumberInput.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Overlay/Overlay.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Pagination/Pagination.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Paper/Paper.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/PasswordInput/PasswordInput.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Pill/Pill.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/PillsInput/PillsInput.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/PinInput/PinInput.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Popover/Popover.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Progress/Progress.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Radio/Radio.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Radio/RadioCard/RadioCard.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Radio/RadioIndicator/RadioIndicator.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Rating/Rating.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/RingProgress/RingProgress.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/ScrollArea/ScrollArea.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/SegmentedControl/SegmentedControl.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/SemiCircleProgress/SemiCircleProgress.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/SimpleGrid/SimpleGrid.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Skeleton/Skeleton.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Slider/Slider.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Spoiler/Spoiler.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Stack/Stack.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Stepper/Stepper.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Switch/Switch.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Table/Table.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/TableOfContents/TableOfContents.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Tabs/Tabs.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Text/Text.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/ThemeIcon/ThemeIcon.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Timeline/Timeline.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Title/Title.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Tooltip/Tooltip.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/Tree/Tree.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/TypographyStylesProvider/TypographyStylesProvider.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/UnstyledButton/UnstyledButton.module.css.mjs.vanilla.css.js +1 -0
- package/dist/node_modules/.pnpm/@mantine_core@7.17.0_@mantine_hooks@7.17.0_react@19.0.0__@types_react@19.0.8_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/@mantine/core/esm/components/VisuallyHidden/VisuallyHidden.module.css.mjs.vanilla.css.js +1 -0
- package/dist/overlays/Overlays.d.ts +4 -1
- package/dist/overlays/Overlays.js +72 -60
- package/dist/overlays/element-details/ElementDetails.d.ts +6 -0
- package/dist/overlays/element-details/ElementDetails.js +31 -0
- package/dist/overlays/element-details/ElementDetailsCard.js +4 -9
- package/dist/overlays/element-details/TabPanelDeployments.js +1 -1
- package/dist/overlays/element-details/TabPanelRelationships.d.ts +3 -4
- package/dist/overlays/element-details/TabPanelRelationships.js +20 -20
- package/dist/overlays/element-details/actor.d.ts +20626 -0
- package/dist/overlays/element-details/actor.js +68 -0
- package/dist/overlays/element-details/actorContext.d.ts +7 -0
- package/dist/overlays/element-details/actorContext.js +14 -0
- package/dist/overlays/overlay/Overlay.css.js +87 -87
- package/dist/overlays/overlay/Overlay.js +16 -1
- package/dist/overlays/overlaysActor.d.ts +190 -0
- package/dist/overlays/overlaysActor.js +233 -0
- package/dist/overlays/relationship-details/actor.d.ts +130 -4
- package/dist/overlays/relationship-details/actor.js +2 -2
- package/dist/overlays/relationship-details/custom/edgeTypes.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.js +17 -0
- package/dist/overlays/relationships-browser/RelationshipsBrowser.js +17 -19
- package/dist/overlays/relationships-browser/actor.d.ts +1095 -8
- package/dist/overlays/relationships-browser/actor.js +181 -173
- package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -2
- package/dist/overlays/relationships-browser/custom/edgeTypes.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +17 -0
- package/dist/overlays/relationships-browser/hooks.d.ts +1 -1
- package/dist/overlays/relationships-browser/hooks.js +7 -5
- package/dist/overlays/types.d.ts +29 -0
- package/dist/{likec4diagram/DiagramActor.d.ts → state/DiagramActorProvider.d.ts} +2 -2
- package/dist/state/DiagramActorProvider.js +77 -0
- package/dist/{likec4diagram/state → state}/assign.d.ts +2 -2
- package/dist/{likec4diagram/state → state}/assign.js +2 -2
- package/dist/state/diagram-machine.d.ts +11680 -0
- package/dist/{likec4diagram/state/machine.js → state/diagram-machine.js} +105 -194
- package/dist/{likec4diagram/state → state}/hotkeyActor.d.ts +1 -1
- package/dist/state/hotkeyActor.js +26 -0
- package/dist/state/inspector.d.ts +4 -0
- package/dist/{likec4diagram/state → state}/syncManualLayoutActor.d.ts +7 -8
- package/dist/{likec4diagram/state → state}/syncManualLayoutActor.js +3 -5
- package/dist/state/types.d.ts +19 -0
- package/dist/state/utils.d.ts +17 -0
- package/dist/{likec4diagram/state → state}/utils.js +20 -1
- package/package.json +20 -24
- package/src/LikeC4Diagram.tsx +3 -5
- package/src/base/BaseXYFlow.tsx +2 -1
- package/src/base/primitives/compound/CompoundTitle.css.ts +0 -5
- package/src/context/DiagramEventHandlers.tsx +27 -13
- package/src/context/DiagramFeatures.tsx +8 -21
- package/src/hooks/index.ts +0 -1
- package/src/hooks/safeContext.tsx +16 -0
- package/src/hooks/useCurrentViewId.ts +2 -2
- package/src/hooks/useDiagram.ts +42 -15
- package/src/likec4diagram/DiagramUI.tsx +14 -11
- package/src/likec4diagram/XYFlow.tsx +4 -5
- package/src/likec4diagram/custom/edges/NotePopover.tsx +1 -2
- package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +1 -1
- package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +6 -7
- package/src/likec4diagram/custom/nodes/toolbar/Toolbar.tsx +1 -1
- package/src/likec4diagram/ui/controls/ChangeAutoLayoutButton.tsx +2 -3
- package/src/likec4diagram/ui/controls/Controls.tsx +2 -4
- package/src/likec4diagram/ui/controls/NavigationButtons.tsx +1 -2
- package/src/likec4diagram/ui/controls/ToggleReadonly.tsx +2 -3
- package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +8 -11
- package/src/likec4diagram/ui/notation/NotationPanel.tsx +2 -3
- package/src/likec4diagram/ui/search/LikeC4Search.tsx +1 -4
- package/src/likec4diagram/ui/search/ViewsColum.tsx +1 -1
- package/src/likec4diagram/ui/search/state.ts +1 -1
- package/src/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.tsx +1 -2
- package/src/likec4diagram/useViewToNodesEdges.ts +0 -4
- package/src/overlays/Overlays.tsx +81 -71
- package/src/overlays/element-details/ElementDetails.tsx +33 -0
- package/src/overlays/element-details/ElementDetailsCard.tsx +8 -18
- package/src/overlays/element-details/TabPanelDeployments.tsx +1 -1
- package/src/overlays/element-details/TabPanelRelationships.tsx +33 -32
- package/src/overlays/element-details/actor.ts +102 -0
- package/src/overlays/element-details/actorContext.tsx +16 -0
- package/src/overlays/overlay/Overlay.tsx +14 -11
- package/src/overlays/overlaysActor.ts +278 -0
- package/src/overlays/relationship-details/actor.ts +8 -11
- package/src/overlays/relationship-details/custom/nodeTypes.tsx +18 -0
- package/src/overlays/relationships-browser/RelationshipsBrowser.tsx +23 -29
- package/src/overlays/relationships-browser/actor.ts +216 -220
- package/src/overlays/relationships-browser/custom/ElementActions.tsx +3 -2
- package/src/overlays/relationships-browser/custom/nodeTypes.tsx +20 -0
- package/src/overlays/relationships-browser/hooks.ts +7 -5
- package/src/overlays/types.ts +39 -0
- package/src/state/DiagramActorProvider.tsx +97 -0
- package/src/{likec4diagram/state → state}/assign.ts +4 -4
- package/src/{likec4diagram/state/machine.ts → state/diagram-machine.ts} +130 -205
- package/src/state/hotkeyActor.ts +29 -0
- package/src/state/inspector.ts +5 -0
- package/src/{likec4diagram/state → state}/syncManualLayoutActor.ts +8 -12
- package/src/state/types.ts +23 -0
- package/src/{likec4diagram/state → state}/utils.ts +24 -2
- package/dist/hooks/useDiagramActor.d.ts +0 -5
- package/dist/hooks/useDiagramActor.js +0 -21
- package/dist/hooks/useDiagramContext.d.ts +0 -3
- package/dist/hooks/useDiagramContext.js +0 -10
- package/dist/likec4diagram/DiagramActor.js +0 -82
- package/dist/likec4diagram/state/actorContext.d.ts +0 -52075
- package/dist/likec4diagram/state/actorContext.js +0 -12
- package/dist/likec4diagram/state/hotkeyActor.js +0 -18
- package/dist/likec4diagram/state/inspector.d.ts +0 -5
- package/dist/likec4diagram/state/machine.d.ts +0 -11025
- package/dist/likec4diagram/state/utils.d.ts +0 -8
- package/src/hooks/useDiagramActor.ts +0 -27
- package/src/hooks/useDiagramContext.ts +0 -14
- package/src/likec4diagram/DiagramActor.tsx +0 -92
- package/src/likec4diagram/state/actorContext.ts +0 -8
- package/src/likec4diagram/state/hotkeyActor.ts +0 -20
- package/src/likec4diagram/state/inspector.ts +0 -23
- /package/dist/{likec4diagram/state → state}/aligners.d.ts +0 -0
- /package/dist/{likec4diagram/state → state}/aligners.js +0 -0
- /package/src/{likec4diagram/state → state}/aligners.ts +0 -0
|
@@ -10,18 +10,17 @@ import {
|
|
|
10
10
|
import { type InternalNodeUpdate, getNodeDimensions, getViewportForBounds } from '@xyflow/system'
|
|
11
11
|
import { isNullish, omit, prop } from 'remeda'
|
|
12
12
|
import {
|
|
13
|
-
type
|
|
13
|
+
type ActorLogicFrom,
|
|
14
14
|
type ActorRefFromLogic,
|
|
15
15
|
type BaseActorRef,
|
|
16
|
-
type MachineSnapshot,
|
|
17
16
|
type SnapshotFrom,
|
|
17
|
+
assertEvent,
|
|
18
18
|
assign,
|
|
19
19
|
cancel,
|
|
20
20
|
enqueueActions,
|
|
21
21
|
fromPromise,
|
|
22
22
|
raise,
|
|
23
23
|
setup,
|
|
24
|
-
stopChild,
|
|
25
24
|
} from 'xstate'
|
|
26
25
|
import { Base } from '../../base'
|
|
27
26
|
import { MinZoom, ZIndexes } from '../../base/const'
|
|
@@ -60,7 +59,6 @@ export type Context = Readonly<
|
|
|
60
59
|
// parentRef: AnyActorRef | null
|
|
61
60
|
xyflow: XYFLowInstance | null
|
|
62
61
|
xystore: XYStoreApi | null
|
|
63
|
-
initialized: boolean
|
|
64
62
|
layouted: LayoutRelationshipsViewResult | null
|
|
65
63
|
navigateFromNode: string | null
|
|
66
64
|
xynodes: RelationshipsBrowserTypes.Node[]
|
|
@@ -80,6 +78,7 @@ export type Events =
|
|
|
80
78
|
| { type: 'xyflow.edgeMouseEnter'; edge: RelationshipsBrowserTypes.Edge }
|
|
81
79
|
| { type: 'xyflow.edgeMouseLeave'; edge: RelationshipsBrowserTypes.Edge }
|
|
82
80
|
| { type: 'xyflow.updateNodeInternals' }
|
|
81
|
+
| { type: 'xyflow.unmount' }
|
|
83
82
|
| { type: 'fitDiagram'; duration?: number; bounds?: BBox }
|
|
84
83
|
| { type: 'navigate.to'; subject: Fqn; fromNode?: string | undefined }
|
|
85
84
|
| {
|
|
@@ -90,14 +89,173 @@ export type Events =
|
|
|
90
89
|
| { type: 'update.view'; layouted: LayoutRelationshipsViewResult }
|
|
91
90
|
| { type: 'close' }
|
|
92
91
|
|
|
93
|
-
export const
|
|
92
|
+
export const layouter = fromPromise<{
|
|
93
|
+
xyedges: RelationshipsBrowserTypes.Edge[]
|
|
94
|
+
xynodes: RelationshipsBrowserTypes.Node[]
|
|
95
|
+
}, {
|
|
96
|
+
subjectId: Fqn
|
|
97
|
+
navigateFromNode: string | null
|
|
98
|
+
xyflow: XYFLowInstance
|
|
99
|
+
xystore: XYStoreApi
|
|
100
|
+
update: LayoutRelationshipsViewResult
|
|
101
|
+
}>(async ({ input, self, signal }) => {
|
|
102
|
+
const {
|
|
103
|
+
subjectId,
|
|
104
|
+
navigateFromNode,
|
|
105
|
+
xyflow,
|
|
106
|
+
xystore,
|
|
107
|
+
update,
|
|
108
|
+
} = input
|
|
109
|
+
let {
|
|
110
|
+
nodes: currentNodes,
|
|
111
|
+
width,
|
|
112
|
+
height,
|
|
113
|
+
} = xystore.getState()
|
|
114
|
+
const next = viewToNodesEdge(update)
|
|
115
|
+
|
|
116
|
+
const updateXYData = () => {
|
|
117
|
+
const { nodes, edges } = xystore.getState()
|
|
118
|
+
return {
|
|
119
|
+
xynodes: updateNodes(nodes, next.xynodes),
|
|
120
|
+
xyedges: updateEdges(edges, next.xyedges),
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const parent = nonNullable(self._parent) as BaseActorRef<Events>
|
|
124
|
+
|
|
125
|
+
let zoom = xyflow.getZoom()
|
|
126
|
+
const maxZoom = Math.max(zoom, 1)
|
|
127
|
+
const nextviewport = getViewportForBounds(update.bounds, width, height, MinZoom, maxZoom, ViewPadding)
|
|
128
|
+
|
|
129
|
+
const nextSubjectNode = next.xynodes.find(n =>
|
|
130
|
+
n.type !== 'empty' && n.data.column === 'subjects' && n.data.fqn === subjectId
|
|
131
|
+
) ?? findRootSubject(next.xynodes)
|
|
132
|
+
const currentSubjectNode = findRootSubject(currentNodes)
|
|
133
|
+
|
|
134
|
+
const existingNode = navigateFromNode
|
|
135
|
+
? currentNodes.find(n => n.id === navigateFromNode)
|
|
136
|
+
: currentNodes.find(n => n.type !== 'empty' && n.data.column !== 'subjects' && n.data.fqn === subjectId)
|
|
137
|
+
|
|
138
|
+
if (
|
|
139
|
+
!nextSubjectNode || !existingNode || nextSubjectNode.type === 'empty' || !currentSubjectNode ||
|
|
140
|
+
nextSubjectNode.data.fqn === currentSubjectNode.data.fqn
|
|
141
|
+
) {
|
|
142
|
+
await xyflow.setViewport(nextviewport)
|
|
143
|
+
return updateXYData()
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const nextSubjectCenter = {
|
|
147
|
+
x: nextSubjectNode.position.x + (nextSubjectNode.initialWidth ?? 0) / 2,
|
|
148
|
+
y: nextSubjectNode.position.y + (nextSubjectNode.initialHeight ?? 0) / 2,
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Center of current subject
|
|
152
|
+
const currentSubjectInternalNode = xyflow.getInternalNode(currentSubjectNode.id)!
|
|
153
|
+
const currentSubjectCenter = centerXYInternalNode(currentSubjectInternalNode)
|
|
154
|
+
|
|
155
|
+
// Move to center of existing node
|
|
156
|
+
const existingInternalNode = xyflow.getInternalNode(existingNode.id)!
|
|
157
|
+
const existingDimensions = getNodeDimensions(existingInternalNode)
|
|
158
|
+
|
|
159
|
+
// Dim all nodes except the existing node
|
|
160
|
+
// Hide nested nodes
|
|
161
|
+
const nested = new Set<string>()
|
|
162
|
+
currentNodes.forEach(n => {
|
|
163
|
+
if (n.id === existingNode.id) {
|
|
164
|
+
return
|
|
165
|
+
}
|
|
166
|
+
if (n.data.column === 'subjects') {
|
|
167
|
+
nested.add(n.id)
|
|
168
|
+
return
|
|
169
|
+
}
|
|
170
|
+
if (n.parentId && (n.parentId === existingNode.id || nested.has(n.parentId))) {
|
|
171
|
+
nested.add(n.id)
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
currentNodes = updateNodes(
|
|
175
|
+
currentNodes,
|
|
176
|
+
currentNodes.flatMap(n => {
|
|
177
|
+
if (nested.has(n.id)) {
|
|
178
|
+
return []
|
|
179
|
+
}
|
|
180
|
+
if (n.id !== existingNode.id) {
|
|
181
|
+
return {
|
|
182
|
+
...n,
|
|
183
|
+
data: {
|
|
184
|
+
...n.data,
|
|
185
|
+
dimmed: n.data.column === 'subjects' ? 'immediate' : true,
|
|
186
|
+
},
|
|
187
|
+
} as RelationshipsBrowserTypes.Node
|
|
188
|
+
}
|
|
189
|
+
// Move existing node
|
|
190
|
+
return {
|
|
191
|
+
...omit(n, ['parentId']),
|
|
192
|
+
position: {
|
|
193
|
+
x: currentSubjectCenter.x - existingDimensions.width / 2,
|
|
194
|
+
y: currentSubjectCenter.y - existingDimensions.height / 2,
|
|
195
|
+
},
|
|
196
|
+
zIndex: ZIndexes.Max,
|
|
197
|
+
hidden: false,
|
|
198
|
+
data: {
|
|
199
|
+
...n.data,
|
|
200
|
+
dimmed: false,
|
|
201
|
+
},
|
|
202
|
+
} as RelationshipsBrowserTypes.Node
|
|
203
|
+
}),
|
|
204
|
+
)
|
|
205
|
+
parent.send({
|
|
206
|
+
type: 'update.xydata',
|
|
207
|
+
xynodes: currentNodes,
|
|
208
|
+
xyedges: [],
|
|
209
|
+
})
|
|
210
|
+
|
|
211
|
+
// Pick the smaller zoom level
|
|
212
|
+
zoom = Math.min(
|
|
213
|
+
zoom,
|
|
214
|
+
nextviewport.zoom,
|
|
215
|
+
)
|
|
216
|
+
// allow framer to render
|
|
217
|
+
await delay(175)
|
|
218
|
+
next.xynodes = next.xynodes.map(Base.setDimmed(false))
|
|
219
|
+
|
|
220
|
+
if (signal.aborted) {
|
|
221
|
+
return updateXYData()
|
|
222
|
+
}
|
|
223
|
+
await xyflow.setCenter(currentSubjectCenter.x, currentSubjectCenter.y, { zoom, duration: 350 })
|
|
224
|
+
await xyflow.setCenter(nextSubjectCenter.x, nextSubjectCenter.y, { zoom })
|
|
225
|
+
return updateXYData()
|
|
226
|
+
})
|
|
227
|
+
|
|
228
|
+
export const relationshipsBrowserLogic = setup({
|
|
94
229
|
types: {
|
|
95
230
|
context: {} as Context,
|
|
96
231
|
tags: '' as 'active',
|
|
232
|
+
children: {} as {
|
|
233
|
+
layouter: 'layouter'
|
|
234
|
+
},
|
|
97
235
|
input: {} as Input,
|
|
98
236
|
events: {} as Events,
|
|
99
237
|
},
|
|
238
|
+
actors: {
|
|
239
|
+
layouter,
|
|
240
|
+
},
|
|
241
|
+
guards: {
|
|
242
|
+
isReady: ({ context }) => context.xyflow !== null && context.xystore !== null && context.layouted !== null,
|
|
243
|
+
},
|
|
100
244
|
actions: {
|
|
245
|
+
'xyflow.init': assign(({ event }) => {
|
|
246
|
+
assertEvent(event, 'xyflow.init')
|
|
247
|
+
return {
|
|
248
|
+
xyflow: event.instance,
|
|
249
|
+
xystore: event.store,
|
|
250
|
+
}
|
|
251
|
+
}),
|
|
252
|
+
'update.view': assign(({ event }) => {
|
|
253
|
+
assertEvent(event, 'update.view')
|
|
254
|
+
return {
|
|
255
|
+
layouted: event.layouted,
|
|
256
|
+
...viewToNodesEdge(event.layouted),
|
|
257
|
+
}
|
|
258
|
+
}),
|
|
101
259
|
'xyflow:updateNodeInternals': ({ context }) => {
|
|
102
260
|
invariant(context.xystore, 'xystore is not initialized')
|
|
103
261
|
const { domNode, updateNodeInternals } = context.xystore.getState()
|
|
@@ -144,153 +302,12 @@ export const relationshipsBrowserActor = setup({
|
|
|
144
302
|
}
|
|
145
303
|
},
|
|
146
304
|
},
|
|
147
|
-
guards: {
|
|
148
|
-
'enable: navigate.to': () => true,
|
|
149
|
-
},
|
|
150
|
-
actors: {
|
|
151
|
-
layouter: fromPromise<{
|
|
152
|
-
xyedges: RelationshipsBrowserTypes.Edge[]
|
|
153
|
-
xynodes: RelationshipsBrowserTypes.Node[]
|
|
154
|
-
}, {
|
|
155
|
-
subjectId: Fqn
|
|
156
|
-
navigateFromNode: string | null
|
|
157
|
-
xyflow: XYFLowInstance
|
|
158
|
-
xystore: XYStoreApi
|
|
159
|
-
update: LayoutRelationshipsViewResult
|
|
160
|
-
}>(async ({ input, self, signal }) => {
|
|
161
|
-
const {
|
|
162
|
-
subjectId,
|
|
163
|
-
navigateFromNode,
|
|
164
|
-
xyflow,
|
|
165
|
-
xystore,
|
|
166
|
-
update,
|
|
167
|
-
} = input
|
|
168
|
-
let {
|
|
169
|
-
nodes: currentNodes,
|
|
170
|
-
width,
|
|
171
|
-
height,
|
|
172
|
-
} = xystore.getState()
|
|
173
|
-
const next = viewToNodesEdge(update)
|
|
174
|
-
|
|
175
|
-
const updateXYData = () => {
|
|
176
|
-
const { nodes, edges } = xystore.getState()
|
|
177
|
-
return {
|
|
178
|
-
xynodes: updateNodes(nodes, next.xynodes),
|
|
179
|
-
xyedges: updateEdges(edges, next.xyedges),
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
const parent = nonNullable(self._parent) as BaseActorRef<Events>
|
|
183
|
-
|
|
184
|
-
let zoom = xyflow.getZoom()
|
|
185
|
-
const maxZoom = Math.max(zoom, 1)
|
|
186
|
-
const nextviewport = getViewportForBounds(update.bounds, width, height, MinZoom, maxZoom, ViewPadding)
|
|
187
|
-
|
|
188
|
-
const nextSubjectNode = next.xynodes.find(n =>
|
|
189
|
-
n.type !== 'empty' && n.data.column === 'subjects' && n.data.fqn === subjectId
|
|
190
|
-
) ?? findRootSubject(next.xynodes)
|
|
191
|
-
const currentSubjectNode = findRootSubject(currentNodes)
|
|
192
|
-
|
|
193
|
-
const existingNode = navigateFromNode
|
|
194
|
-
? currentNodes.find(n => n.id === navigateFromNode)
|
|
195
|
-
: currentNodes.find(n => n.type !== 'empty' && n.data.column !== 'subjects' && n.data.fqn === subjectId)
|
|
196
|
-
|
|
197
|
-
if (
|
|
198
|
-
!nextSubjectNode || !existingNode || nextSubjectNode.type === 'empty' || !currentSubjectNode ||
|
|
199
|
-
nextSubjectNode.data.fqn === currentSubjectNode.data.fqn
|
|
200
|
-
) {
|
|
201
|
-
await xyflow.setViewport(nextviewport)
|
|
202
|
-
return updateXYData()
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
const nextSubjectCenter = {
|
|
206
|
-
x: nextSubjectNode.position.x + (nextSubjectNode.initialWidth ?? 0) / 2,
|
|
207
|
-
y: nextSubjectNode.position.y + (nextSubjectNode.initialHeight ?? 0) / 2,
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
// Center of current subject
|
|
211
|
-
const currentSubjectInternalNode = xyflow.getInternalNode(currentSubjectNode.id)!
|
|
212
|
-
const currentSubjectCenter = centerXYInternalNode(currentSubjectInternalNode)
|
|
213
|
-
|
|
214
|
-
// Move to center of existing node
|
|
215
|
-
const existingInternalNode = xyflow.getInternalNode(existingNode.id)!
|
|
216
|
-
const existingDimensions = getNodeDimensions(existingInternalNode)
|
|
217
|
-
|
|
218
|
-
// Dim all nodes except the existing node
|
|
219
|
-
// Hide nested nodes
|
|
220
|
-
const nested = new Set<string>()
|
|
221
|
-
currentNodes.forEach(n => {
|
|
222
|
-
if (n.id === existingNode.id) {
|
|
223
|
-
return
|
|
224
|
-
}
|
|
225
|
-
if (n.data.column === 'subjects') {
|
|
226
|
-
nested.add(n.id)
|
|
227
|
-
return
|
|
228
|
-
}
|
|
229
|
-
if (n.parentId && (n.parentId === existingNode.id || nested.has(n.parentId))) {
|
|
230
|
-
nested.add(n.id)
|
|
231
|
-
}
|
|
232
|
-
})
|
|
233
|
-
currentNodes = updateNodes(
|
|
234
|
-
currentNodes,
|
|
235
|
-
currentNodes.flatMap(n => {
|
|
236
|
-
if (nested.has(n.id)) {
|
|
237
|
-
return []
|
|
238
|
-
}
|
|
239
|
-
if (n.id !== existingNode.id) {
|
|
240
|
-
return {
|
|
241
|
-
...n,
|
|
242
|
-
data: {
|
|
243
|
-
...n.data,
|
|
244
|
-
dimmed: n.data.column === 'subjects' ? 'immediate' : true,
|
|
245
|
-
},
|
|
246
|
-
} as RelationshipsBrowserTypes.Node
|
|
247
|
-
}
|
|
248
|
-
// Move existing node
|
|
249
|
-
return {
|
|
250
|
-
...omit(n, ['parentId']),
|
|
251
|
-
position: {
|
|
252
|
-
x: currentSubjectCenter.x - existingDimensions.width / 2,
|
|
253
|
-
y: currentSubjectCenter.y - existingDimensions.height / 2,
|
|
254
|
-
},
|
|
255
|
-
zIndex: ZIndexes.Max,
|
|
256
|
-
hidden: false,
|
|
257
|
-
data: {
|
|
258
|
-
...n.data,
|
|
259
|
-
dimmed: false,
|
|
260
|
-
},
|
|
261
|
-
} as RelationshipsBrowserTypes.Node
|
|
262
|
-
}),
|
|
263
|
-
)
|
|
264
|
-
parent.send({
|
|
265
|
-
type: 'update.xydata',
|
|
266
|
-
xynodes: currentNodes,
|
|
267
|
-
xyedges: [],
|
|
268
|
-
})
|
|
269
|
-
|
|
270
|
-
// Pick the smaller zoom level
|
|
271
|
-
zoom = Math.min(
|
|
272
|
-
zoom,
|
|
273
|
-
nextviewport.zoom,
|
|
274
|
-
)
|
|
275
|
-
// allow framer to render
|
|
276
|
-
await delay(175)
|
|
277
|
-
next.xynodes = next.xynodes.map(Base.setDimmed(false))
|
|
278
|
-
|
|
279
|
-
if (signal.aborted) {
|
|
280
|
-
return updateXYData()
|
|
281
|
-
}
|
|
282
|
-
await xyflow.setCenter(currentSubjectCenter.x, currentSubjectCenter.y, { zoom, duration: 350 })
|
|
283
|
-
await xyflow.setCenter(nextSubjectCenter.x, nextSubjectCenter.y, { zoom })
|
|
284
|
-
return updateXYData()
|
|
285
|
-
}),
|
|
286
|
-
},
|
|
287
305
|
}).createMachine({
|
|
288
|
-
|
|
306
|
+
id: 'relationships-browser',
|
|
289
307
|
context: ({ input }) => ({
|
|
290
308
|
...input,
|
|
291
309
|
closeable: input.closeable ?? true,
|
|
292
310
|
enableNavigationMenu: input.enableNavigationMenu ?? true,
|
|
293
|
-
initialized: false,
|
|
294
311
|
xyflow: null,
|
|
295
312
|
xystore: null,
|
|
296
313
|
layouted: null,
|
|
@@ -298,40 +315,47 @@ export const relationshipsBrowserActor = setup({
|
|
|
298
315
|
xynodes: [],
|
|
299
316
|
xyedges: [],
|
|
300
317
|
}),
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
initialized: true,
|
|
308
|
-
xyflow: ({ event }) => event.instance,
|
|
309
|
-
xystore: ({ event }) => event.store,
|
|
310
|
-
}),
|
|
311
|
-
],
|
|
312
|
-
target: 'waiting-data',
|
|
318
|
+
initial: 'initializing',
|
|
319
|
+
on: {
|
|
320
|
+
'xyflow.applyNodeChanges': {
|
|
321
|
+
actions: assign({
|
|
322
|
+
xynodes: ({ context, event }) => {
|
|
323
|
+
return applyNodeChanges(event.changes, context.xynodes)
|
|
313
324
|
},
|
|
314
|
-
|
|
315
|
-
|
|
325
|
+
}),
|
|
326
|
+
},
|
|
327
|
+
'xyflow.applyEdgeChanges': {
|
|
328
|
+
actions: assign({
|
|
329
|
+
xyedges: ({ context, event }) => {
|
|
330
|
+
return applyEdgeChanges(event.changes, context.xyedges)
|
|
316
331
|
},
|
|
317
|
-
},
|
|
332
|
+
}),
|
|
318
333
|
},
|
|
319
|
-
|
|
334
|
+
},
|
|
335
|
+
states: {
|
|
336
|
+
initializing: {
|
|
320
337
|
on: {
|
|
338
|
+
'xyflow.init': {
|
|
339
|
+
actions: 'xyflow.init',
|
|
340
|
+
target: 'isReady',
|
|
341
|
+
},
|
|
321
342
|
'update.view': {
|
|
322
|
-
actions:
|
|
323
|
-
|
|
324
|
-
return {
|
|
325
|
-
layouted: event.layouted,
|
|
326
|
-
...viewToNodesEdge(event.layouted),
|
|
327
|
-
}
|
|
328
|
-
}),
|
|
329
|
-
raise({ type: 'fitDiagram', duration: 0 }),
|
|
330
|
-
],
|
|
331
|
-
target: 'active',
|
|
343
|
+
actions: 'update.view',
|
|
344
|
+
target: 'isReady',
|
|
332
345
|
},
|
|
346
|
+
'stop': 'closed',
|
|
347
|
+
'close': 'closed',
|
|
333
348
|
},
|
|
334
349
|
},
|
|
350
|
+
'isReady': {
|
|
351
|
+
always: [{
|
|
352
|
+
guard: 'isReady',
|
|
353
|
+
actions: raise({ type: 'fitDiagram', duration: 0 }),
|
|
354
|
+
target: 'active',
|
|
355
|
+
}, {
|
|
356
|
+
target: 'initializing',
|
|
357
|
+
}],
|
|
358
|
+
},
|
|
335
359
|
'active': {
|
|
336
360
|
initial: 'idle',
|
|
337
361
|
tags: ['active'],
|
|
@@ -383,7 +407,6 @@ export const relationshipsBrowserActor = setup({
|
|
|
383
407
|
},
|
|
384
408
|
on: {
|
|
385
409
|
'xyflow.nodeClick': {
|
|
386
|
-
guard: 'enable: navigate.to',
|
|
387
410
|
actions: enqueueActions(({ event, enqueue }) => {
|
|
388
411
|
if ('fqn' in event.node.data) {
|
|
389
412
|
const fqn = event.node.data.fqn
|
|
@@ -396,7 +419,6 @@ export const relationshipsBrowserActor = setup({
|
|
|
396
419
|
}),
|
|
397
420
|
},
|
|
398
421
|
'navigate.to': {
|
|
399
|
-
guard: 'enable: navigate.to',
|
|
400
422
|
actions: [
|
|
401
423
|
assign({
|
|
402
424
|
subject: ({ event }) => event.subject,
|
|
@@ -428,57 +450,31 @@ export const relationshipsBrowserActor = setup({
|
|
|
428
450
|
raise({ type: 'fitDiagram' }, { id: 'fitDiagram', delay: 300 }),
|
|
429
451
|
],
|
|
430
452
|
},
|
|
431
|
-
'
|
|
432
|
-
|
|
453
|
+
'xyflow.init': {
|
|
454
|
+
actions: 'xyflow.init',
|
|
455
|
+
},
|
|
456
|
+
'xyflow.unmount': {
|
|
457
|
+
target: 'initializing',
|
|
433
458
|
},
|
|
459
|
+
'close': 'closed',
|
|
434
460
|
},
|
|
435
461
|
},
|
|
436
|
-
|
|
462
|
+
closed: {
|
|
437
463
|
id: 'closed',
|
|
438
464
|
type: 'final',
|
|
439
|
-
entry: [
|
|
440
|
-
stopChild('layouter'),
|
|
441
|
-
assign({
|
|
442
|
-
initialized: false,
|
|
443
|
-
xyflow: null,
|
|
444
|
-
xystore: null,
|
|
445
|
-
}),
|
|
446
|
-
],
|
|
447
|
-
},
|
|
448
|
-
},
|
|
449
|
-
on: {
|
|
450
|
-
'xyflow.applyNodeChanges': {
|
|
451
|
-
actions: assign({
|
|
452
|
-
xynodes: ({ context, event }) => {
|
|
453
|
-
return applyNodeChanges(event.changes, context.xynodes)
|
|
454
|
-
},
|
|
455
|
-
}),
|
|
456
|
-
},
|
|
457
|
-
'xyflow.applyEdgeChanges': {
|
|
458
|
-
actions: assign({
|
|
459
|
-
xyedges: ({ context, event }) => {
|
|
460
|
-
return applyEdgeChanges(event.changes, context.xyedges)
|
|
461
|
-
},
|
|
462
|
-
}),
|
|
463
465
|
},
|
|
464
466
|
},
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
any,
|
|
474
|
-
any
|
|
475
|
-
>,
|
|
476
|
-
Events,
|
|
477
|
-
Input,
|
|
478
|
-
any,
|
|
479
|
-
any
|
|
480
|
-
> // TODO reduce type inference by forcing the types
|
|
467
|
+
exit: assign({
|
|
468
|
+
xyflow: null,
|
|
469
|
+
layouted: null,
|
|
470
|
+
xystore: null,
|
|
471
|
+
xyedges: [],
|
|
472
|
+
xynodes: [],
|
|
473
|
+
}),
|
|
474
|
+
})
|
|
481
475
|
|
|
482
|
-
export
|
|
483
|
-
|
|
476
|
+
export interface RelationshipsBrowserLogic extends ActorLogicFrom<typeof relationshipsBrowserLogic> {
|
|
477
|
+
}
|
|
478
|
+
export interface RelationshipsBrowserActorRef extends ActorRefFromLogic<RelationshipsBrowserLogic> {
|
|
479
|
+
}
|
|
484
480
|
export type RelationshipsBrowserSnapshot = SnapshotFrom<RelationshipsBrowserActorRef>
|
|
@@ -4,13 +4,14 @@ import type { NodeProps } from '../../../base/types'
|
|
|
4
4
|
import { useEnabledFeature } from '../../../context/DiagramFeatures'
|
|
5
5
|
import { useDiagram } from '../../../hooks/useDiagram'
|
|
6
6
|
import type { RelationshipsBrowserTypes as Types } from '../_types'
|
|
7
|
-
import { useRelationshipsBrowser } from '../hooks'
|
|
7
|
+
import { useRelationshipsBrowser, useRelationshipsBrowserState } from '../hooks'
|
|
8
8
|
|
|
9
9
|
type ElementActionsProps = NodeProps<Types.ElementNodeData>
|
|
10
10
|
export const ElementActions = (props: ElementActionsProps) => {
|
|
11
11
|
const { enableNavigateTo, enableVscode } = useEnabledFeature('NavigateTo', 'Vscode')
|
|
12
12
|
const diagram = useDiagram()
|
|
13
13
|
const browser = useRelationshipsBrowser()
|
|
14
|
+
const subject = useRelationshipsBrowserState(s => s.context.subject)
|
|
14
15
|
|
|
15
16
|
const buttons = [] as ElementActionButtons.Item[]
|
|
16
17
|
|
|
@@ -25,7 +26,7 @@ export const ElementActions = (props: ElementActionsProps) => {
|
|
|
25
26
|
},
|
|
26
27
|
})
|
|
27
28
|
}
|
|
28
|
-
if (fqn !==
|
|
29
|
+
if (fqn !== subject) {
|
|
29
30
|
buttons.push({
|
|
30
31
|
key: 'relationships',
|
|
31
32
|
icon: <IconTransform />,
|
|
@@ -6,20 +6,39 @@ import {
|
|
|
6
6
|
CompoundNodeContainer,
|
|
7
7
|
CompoundTitle,
|
|
8
8
|
customNode,
|
|
9
|
+
ElementDetailsButton,
|
|
9
10
|
ElementNodeContainer,
|
|
10
11
|
ElementShape,
|
|
11
12
|
ElementTitle,
|
|
12
13
|
} from '../../../base/primitives'
|
|
14
|
+
import { useDiagram } from '../../../hooks/useDiagram'
|
|
13
15
|
import type { RelationshipsBrowserTypes } from '../_types'
|
|
14
16
|
import { ElementActions } from './ElementActions'
|
|
15
17
|
import { EmptyNode } from './EmptyNode'
|
|
16
18
|
|
|
19
|
+
const ElementDetailsButtonWithHandler = (
|
|
20
|
+
props: NodeProps<RelationshipsBrowserTypes.ElementNodeData | RelationshipsBrowserTypes.CompoundNodeData>,
|
|
21
|
+
) => {
|
|
22
|
+
const diagram = useDiagram()
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<ElementDetailsButton
|
|
26
|
+
{...props}
|
|
27
|
+
onClick={e => {
|
|
28
|
+
e.stopPropagation()
|
|
29
|
+
diagram.openElementDetails(props.data.fqn)
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
17
35
|
export const nodeTypes = {
|
|
18
36
|
element: customNode<RelationshipsBrowserTypes.ElementNodeData>((props) => {
|
|
19
37
|
return (
|
|
20
38
|
<ElementNodeContainer key={props.id} component={m.div} layoutId={props.id} nodeProps={props}>
|
|
21
39
|
<ElementShape {...props} />
|
|
22
40
|
<ElementTitle {...props} iconSize={40} />
|
|
41
|
+
<ElementDetailsButtonWithHandler {...props} />
|
|
23
42
|
<ElementActions {...props} />
|
|
24
43
|
<ElementPorts {...props} />
|
|
25
44
|
</ElementNodeContainer>
|
|
@@ -29,6 +48,7 @@ export const nodeTypes = {
|
|
|
29
48
|
compound: customNode<RelationshipsBrowserTypes.CompoundNodeData>((props) => {
|
|
30
49
|
return (
|
|
31
50
|
<CompoundNodeContainer key={props.id} component={m.div} layoutId={props.id} nodeProps={props}>
|
|
51
|
+
<ElementDetailsButtonWithHandler {...props} />
|
|
32
52
|
<CompoundTitle {...props} />
|
|
33
53
|
<CompoundPorts {...props} />
|
|
34
54
|
</CompoundNodeContainer>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type Fqn, nonNullable } from '@likec4/core'
|
|
2
2
|
import { useCallbackRef } from '@mantine/hooks'
|
|
3
3
|
import { useSelector } from '@xstate/react'
|
|
4
|
-
import { useStoreApi } from '@xyflow/react'
|
|
5
4
|
import { shallowEqual } from 'fast-equals'
|
|
6
5
|
import { createContext, useContext, useMemo, useTransition } from 'react'
|
|
6
|
+
import type { OverlaysActorRef } from '../overlaysActor'
|
|
7
7
|
import type { RelationshipsBrowserActorRef, RelationshipsBrowserSnapshot } from './actor'
|
|
8
8
|
|
|
9
9
|
export const RelationshipsBrowserActorContext = createContext<RelationshipsBrowserActorRef | null>(null)
|
|
@@ -16,15 +16,15 @@ export function useRelationshipsBrowserState<T>(
|
|
|
16
16
|
selector: (state: RelationshipsBrowserSnapshot) => T,
|
|
17
17
|
compare: (a: T, b: T) => boolean = shallowEqual,
|
|
18
18
|
) {
|
|
19
|
-
const select = useCallbackRef(selector)
|
|
20
19
|
const actor = useRelationshipsBrowserActor()
|
|
21
|
-
return useSelector(actor,
|
|
20
|
+
return useSelector(actor, useCallbackRef(selector), compare)
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
export function useRelationshipsBrowser() {
|
|
25
24
|
const actor = useRelationshipsBrowserActor()
|
|
26
25
|
const [, startTransition] = useTransition()
|
|
27
26
|
return useMemo(() => ({
|
|
27
|
+
actor,
|
|
28
28
|
getState: () => actor.getSnapshot().context,
|
|
29
29
|
send: actor.send,
|
|
30
30
|
navigateTo: (subject: Fqn, fromNode?: string) => {
|
|
@@ -42,9 +42,11 @@ export function useRelationshipsBrowser() {
|
|
|
42
42
|
})
|
|
43
43
|
},
|
|
44
44
|
close: () => {
|
|
45
|
-
|
|
45
|
+
if (actor._parent) {
|
|
46
|
+
;(actor._parent as OverlaysActorRef)?.send({ type: 'close', actorId: actor.id })
|
|
47
|
+
} else {
|
|
46
48
|
actor.send({ type: 'close' })
|
|
47
|
-
}
|
|
49
|
+
}
|
|
48
50
|
},
|
|
49
51
|
}), [actor])
|
|
50
52
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ActorRefFrom } from 'xstate'
|
|
2
|
+
import type {
|
|
3
|
+
ElementDetailsLogic,
|
|
4
|
+
Events as ElementDetailsEvents,
|
|
5
|
+
Input as ElementDetailsInput,
|
|
6
|
+
} from './element-details/actor'
|
|
7
|
+
import type {
|
|
8
|
+
Events as RelationshipDetailsEvents,
|
|
9
|
+
Input as RelationshipDetailsInput,
|
|
10
|
+
RelationshipDetailsLogic,
|
|
11
|
+
} from './relationship-details/actor'
|
|
12
|
+
import type {
|
|
13
|
+
Events as RelationshipsBrowserEvents,
|
|
14
|
+
Input as RelationshipsBrowserInput,
|
|
15
|
+
RelationshipsBrowserLogic,
|
|
16
|
+
} from './relationships-browser/actor'
|
|
17
|
+
|
|
18
|
+
export namespace Overlays {
|
|
19
|
+
export namespace ElementDetails {
|
|
20
|
+
export type Events = ElementDetailsEvents
|
|
21
|
+
export type Input = ElementDetailsInput
|
|
22
|
+
export type Logic = ElementDetailsLogic
|
|
23
|
+
export interface ActorRef extends ActorRefFrom<ElementDetailsLogic> {}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export namespace RelationshipDetails {
|
|
27
|
+
export type Events = RelationshipDetailsEvents
|
|
28
|
+
export type Input = RelationshipDetailsInput
|
|
29
|
+
export interface Logic extends RelationshipDetailsLogic {}
|
|
30
|
+
export interface ActorRef extends ActorRefFrom<RelationshipDetailsLogic> {}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export namespace RelationshipsBrowser {
|
|
34
|
+
export type Events = RelationshipsBrowserEvents
|
|
35
|
+
export type Input = RelationshipsBrowserInput
|
|
36
|
+
export interface Logic extends RelationshipsBrowserLogic {}
|
|
37
|
+
export interface ActorRef extends ActorRefFrom<RelationshipsBrowserLogic> {}
|
|
38
|
+
}
|
|
39
|
+
}
|