@likec4/diagram 1.22.1 → 1.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
@@ -1,29 +1,17 @@
|
|
|
1
|
-
import { nonNullable, invariant, nonexhaustive, getBBoxCenter, getParallelStepsPrefix
|
|
1
|
+
import { nonNullable, invariant, nonexhaustive, DiagramNode, getBBoxCenter, getParallelStepsPrefix } from "@likec4/core";
|
|
2
2
|
import { getViewportForBounds, applyEdgeChanges, applyNodeChanges } from "@xyflow/react";
|
|
3
3
|
import { nodeToRect } from "@xyflow/system";
|
|
4
4
|
import { hasAtLeast, prop, clamp, first } from "remeda";
|
|
5
|
-
import { setup,
|
|
6
|
-
import { MinZoom } from "
|
|
7
|
-
import { AllDisabled } from "
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { createLayoutConstraints } from "../useLayoutConstraints.js";
|
|
5
|
+
import { setup, enqueueActions, assertEvent, stopChild, assign, sendTo, cancel, raise, spawnChild, and, or } from "xstate";
|
|
6
|
+
import { MinZoom } from "../base/const.js";
|
|
7
|
+
import { AllDisabled } from "../context/DiagramFeatures.js";
|
|
8
|
+
import { createLayoutConstraints } from "../likec4diagram/useLayoutConstraints.js";
|
|
9
|
+
import { overlaysActorLogic } from "../overlays/overlaysActor.js";
|
|
11
10
|
import { getAligner, toNodeRect } from "./aligners.js";
|
|
12
11
|
import { resetEdgeControlPoints, updateEdgeData, updateNodeData, updateNavigationHistory, mergeXYNodesEdges, navigateForward, navigateBack, unfocusNodesEdges, updateActiveWalkthrough, focusNodesEdges, lastClickedNode } from "./assign.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { focusedBounds } from "./utils.js";
|
|
16
|
-
var DiagramContext;
|
|
17
|
-
((DiagramContext2) => {
|
|
18
|
-
function findDiagramNode(ctx, xynodeId) {
|
|
19
|
-
return ctx.view.nodes.find((n) => n.id === xynodeId) ?? null;
|
|
20
|
-
}
|
|
21
|
-
DiagramContext2.findDiagramNode = findDiagramNode;
|
|
22
|
-
function findDiagramEdge(ctx, xyedgeId) {
|
|
23
|
-
return ctx.view.edges.find((e) => e.id === xyedgeId) ?? null;
|
|
24
|
-
}
|
|
25
|
-
DiagramContext2.findDiagramEdge = findDiagramEdge;
|
|
26
|
-
})(DiagramContext || (DiagramContext = {}));
|
|
12
|
+
import { hotkeyActorLogic } from "./hotkeyActor.js";
|
|
13
|
+
import { syncManualLayoutActorLogic } from "./syncManualLayoutActor.js";
|
|
14
|
+
import { typedSystem, focusedBounds } from "./utils.js";
|
|
27
15
|
const diagramMachine = setup({
|
|
28
16
|
types: {
|
|
29
17
|
context: {},
|
|
@@ -32,10 +20,9 @@ const diagramMachine = setup({
|
|
|
32
20
|
events: {}
|
|
33
21
|
},
|
|
34
22
|
actors: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
relationshipDetailsActor
|
|
23
|
+
syncManualLayoutActorLogic,
|
|
24
|
+
hotkeyActorLogic,
|
|
25
|
+
overlaysActorLogic
|
|
39
26
|
},
|
|
40
27
|
guards: {
|
|
41
28
|
"enabled: FitView": ({ context }) => context.features.enableFitView,
|
|
@@ -144,13 +131,34 @@ const diagramMachine = setup({
|
|
|
144
131
|
});
|
|
145
132
|
});
|
|
146
133
|
},
|
|
147
|
-
"updateFeatures":
|
|
134
|
+
"updateFeatures": enqueueActions(({ enqueue, system, event }) => {
|
|
148
135
|
assertEvent(event, "update.features");
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
136
|
+
const { features } = event;
|
|
137
|
+
enqueue.assign({
|
|
138
|
+
features: { ...features }
|
|
139
|
+
});
|
|
140
|
+
const enableOverlays = features.enableElementDetails || features.enableRelationshipDetails || features.enableRelationshipBrowser;
|
|
141
|
+
const hasRunning = typedSystem(system).overlaysActorRef;
|
|
142
|
+
if (enableOverlays && !hasRunning) {
|
|
143
|
+
enqueue.spawnChild("overlaysActorLogic", { id: "overlays", systemId: "overlays" });
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (!enableOverlays && hasRunning) {
|
|
147
|
+
enqueue.stopChild("overlays");
|
|
148
|
+
}
|
|
149
|
+
}),
|
|
150
|
+
"closeAllOverlays": enqueueActions(({ system, enqueue }) => {
|
|
151
|
+
const overlays = typedSystem(system).overlaysActorRef;
|
|
152
|
+
if (overlays) {
|
|
153
|
+
enqueue.sendTo(overlays, { type: "close.all" });
|
|
154
|
+
}
|
|
155
|
+
}),
|
|
156
|
+
"stopSyncLayout": enqueueActions(({ context, enqueue }) => {
|
|
157
|
+
enqueue.sendTo(context.syncLayoutActorRef, { type: "stop" });
|
|
158
|
+
enqueue.stopChild(context.syncLayoutActorRef);
|
|
159
|
+
enqueue.assign({
|
|
160
|
+
syncLayoutActorRef: null
|
|
161
|
+
});
|
|
154
162
|
})
|
|
155
163
|
}
|
|
156
164
|
}).createMachine({
|
|
@@ -174,7 +182,7 @@ const diagramMachine = setup({
|
|
|
174
182
|
},
|
|
175
183
|
viewport: { x: 0, y: 0, zoom: 1 },
|
|
176
184
|
xyflow: null,
|
|
177
|
-
syncLayoutActorRef: spawn("
|
|
185
|
+
syncLayoutActorRef: spawn("syncManualLayoutActorLogic", {
|
|
178
186
|
id: "syncLayout",
|
|
179
187
|
input: { parent: self, viewId: input.view.id }
|
|
180
188
|
}),
|
|
@@ -276,12 +284,25 @@ const diagramMachine = setup({
|
|
|
276
284
|
...focusNodesEdges(s),
|
|
277
285
|
viewportBeforeFocus: { ...s.context.viewport }
|
|
278
286
|
})),
|
|
279
|
-
spawnChild("
|
|
287
|
+
spawnChild("hotkeyActorLogic", { id: "hotkey" }),
|
|
280
288
|
{
|
|
281
289
|
type: "xyflow:fitDiagram",
|
|
282
290
|
params: focusedBounds
|
|
283
291
|
}
|
|
284
292
|
],
|
|
293
|
+
exit: enqueueActions(({ enqueue, context }) => {
|
|
294
|
+
enqueue.stopChild("hotkey");
|
|
295
|
+
if (context.viewportBeforeFocus) {
|
|
296
|
+
enqueue({ type: "xyflow:setViewport", params: { viewport: context.viewportBeforeFocus } });
|
|
297
|
+
} else {
|
|
298
|
+
enqueue({ type: "xyflow:fitDiagram" });
|
|
299
|
+
}
|
|
300
|
+
enqueue.assign((s) => ({
|
|
301
|
+
...unfocusNodesEdges(s),
|
|
302
|
+
viewportBeforeFocus: null,
|
|
303
|
+
focusedNode: null
|
|
304
|
+
}));
|
|
305
|
+
}),
|
|
285
306
|
on: {
|
|
286
307
|
"xyflow.nodeClick": [
|
|
287
308
|
{
|
|
@@ -335,145 +356,7 @@ const diagramMachine = setup({
|
|
|
335
356
|
nonexhaustive(event);
|
|
336
357
|
})
|
|
337
358
|
}
|
|
338
|
-
}
|
|
339
|
-
exit: [
|
|
340
|
-
stopChild("hotkey"),
|
|
341
|
-
enqueueActions(({ enqueue, context }) => {
|
|
342
|
-
if (context.viewportBeforeFocus) {
|
|
343
|
-
enqueue({ type: "xyflow:setViewport", params: { viewport: context.viewportBeforeFocus } });
|
|
344
|
-
} else {
|
|
345
|
-
enqueue({ type: "xyflow:fitDiagram" });
|
|
346
|
-
}
|
|
347
|
-
enqueue.assign((s) => ({
|
|
348
|
-
...unfocusNodesEdges(s),
|
|
349
|
-
viewportBeforeFocus: null,
|
|
350
|
-
focusedNode: null
|
|
351
|
-
}));
|
|
352
|
-
})
|
|
353
|
-
]
|
|
354
|
-
},
|
|
355
|
-
overlay: {
|
|
356
|
-
entry: spawnChild("hotkeyActor", { id: "hotkey" }),
|
|
357
|
-
initial: "hole",
|
|
358
|
-
states: {
|
|
359
|
-
hole: {
|
|
360
|
-
target: "#idle"
|
|
361
|
-
},
|
|
362
|
-
elementDetails: {
|
|
363
|
-
guard: ({ context }) => context.activeElementDetails !== null,
|
|
364
|
-
entry: assign({
|
|
365
|
-
activeElementDetails: ({ context }) => {
|
|
366
|
-
const fqn = context.activeElementDetails.fqn;
|
|
367
|
-
const fromNode = context.activeElementDetails.fromNode;
|
|
368
|
-
if (fromNode) {
|
|
369
|
-
const internalNode = nonNullable(
|
|
370
|
-
context.xystore.getState().nodeLookup.get(fromNode),
|
|
371
|
-
"XY Internal Node not found"
|
|
372
|
-
);
|
|
373
|
-
const nodeRect = nodeToRect(internalNode);
|
|
374
|
-
const zoom = context.xyflow.getZoom();
|
|
375
|
-
const nodeRectScreen = {
|
|
376
|
-
...context.xyflow.flowToScreenPosition(nodeRect),
|
|
377
|
-
width: nodeRect.width * zoom,
|
|
378
|
-
height: nodeRect.height * zoom
|
|
379
|
-
};
|
|
380
|
-
return { fqn, fromNode, nodeRect, nodeRectScreen };
|
|
381
|
-
} else {
|
|
382
|
-
return { fqn, fromNode };
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}),
|
|
386
|
-
on: {
|
|
387
|
-
// Catch event and do nothing
|
|
388
|
-
"open.elementDetails": {
|
|
389
|
-
actions: assign({
|
|
390
|
-
activeElementDetails: ({ event, context }) => {
|
|
391
|
-
var _a;
|
|
392
|
-
return {
|
|
393
|
-
...context.activeElementDetails,
|
|
394
|
-
fqn: event.fqn,
|
|
395
|
-
fromNode: ((_a = context.activeElementDetails) == null ? void 0 : _a.fromNode) ?? null
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
})
|
|
399
|
-
},
|
|
400
|
-
"close.overlay": {
|
|
401
|
-
target: "#idle"
|
|
402
|
-
},
|
|
403
|
-
"key.esc": {
|
|
404
|
-
target: "#idle"
|
|
405
|
-
}
|
|
406
|
-
},
|
|
407
|
-
exit: assign({
|
|
408
|
-
activeElementDetails: null
|
|
409
|
-
})
|
|
410
|
-
},
|
|
411
|
-
relationshipsBrowser: {
|
|
412
|
-
invoke: {
|
|
413
|
-
id: "relationshipsBrowser",
|
|
414
|
-
src: "relationshipsBrowserActor",
|
|
415
|
-
input: ({ context, event }) => {
|
|
416
|
-
assertEvent(event, "open.relationshipsBrowser");
|
|
417
|
-
return {
|
|
418
|
-
subject: event.fqn,
|
|
419
|
-
scope: context.view
|
|
420
|
-
};
|
|
421
|
-
},
|
|
422
|
-
onDone: {
|
|
423
|
-
target: "#idle"
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
on: {
|
|
427
|
-
"open.relationshipsBrowser": {
|
|
428
|
-
actions: sendTo("relationshipsBrowser", ({ event }) => ({
|
|
429
|
-
type: "navigate.to",
|
|
430
|
-
subject: event.fqn
|
|
431
|
-
}))
|
|
432
|
-
},
|
|
433
|
-
"close.overlay": {
|
|
434
|
-
actions: sendTo("relationshipsBrowser", { type: "close" })
|
|
435
|
-
},
|
|
436
|
-
"key.esc": {
|
|
437
|
-
actions: sendTo("relationshipsBrowser", { type: "close" })
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
},
|
|
441
|
-
relationshipDetails: {
|
|
442
|
-
invoke: {
|
|
443
|
-
id: "relationshipDetails",
|
|
444
|
-
src: "relationshipDetailsActor",
|
|
445
|
-
input: ({ event, context }) => {
|
|
446
|
-
assertEvent(event, "open.relationshipDetails");
|
|
447
|
-
return {
|
|
448
|
-
edgeId: event.edgeId,
|
|
449
|
-
view: context.view
|
|
450
|
-
};
|
|
451
|
-
},
|
|
452
|
-
onDone: {
|
|
453
|
-
target: "#idle"
|
|
454
|
-
}
|
|
455
|
-
},
|
|
456
|
-
on: {
|
|
457
|
-
"close.overlay": {
|
|
458
|
-
actions: sendTo("relationshipDetails", { type: "close" })
|
|
459
|
-
},
|
|
460
|
-
"key.esc": {
|
|
461
|
-
actions: sendTo("relationshipDetails", { type: "close" })
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
},
|
|
466
|
-
on: {
|
|
467
|
-
// We received another view, close overlay and process event again
|
|
468
|
-
"update.view": {
|
|
469
|
-
guard: "is another view",
|
|
470
|
-
actions: raise(({ event }) => event, { delay: 50 }),
|
|
471
|
-
target: "#idle"
|
|
472
|
-
}
|
|
473
|
-
},
|
|
474
|
-
exit: [
|
|
475
|
-
stopChild("hotkey")
|
|
476
|
-
]
|
|
359
|
+
}
|
|
477
360
|
},
|
|
478
361
|
// Navigating to another view (after `navigateTo` event)
|
|
479
362
|
navigating: {
|
|
@@ -482,8 +365,8 @@ const diagramMachine = setup({
|
|
|
482
365
|
states: {
|
|
483
366
|
pending: {
|
|
484
367
|
entry: enqueueActions(({ enqueue }) => {
|
|
485
|
-
enqueue
|
|
486
|
-
enqueue
|
|
368
|
+
enqueue("closeAllOverlays");
|
|
369
|
+
enqueue("stopSyncLayout");
|
|
487
370
|
enqueue({
|
|
488
371
|
type: "trigger:NavigateTo",
|
|
489
372
|
params: ({ context }) => ({
|
|
@@ -529,13 +412,17 @@ const diagramMachine = setup({
|
|
|
529
412
|
target: "idle"
|
|
530
413
|
},
|
|
531
414
|
exit: assign({
|
|
532
|
-
syncLayoutActorRef: ({ self, context, spawn }) => spawn("
|
|
415
|
+
syncLayoutActorRef: ({ self, context, spawn }) => spawn("syncManualLayoutActorLogic", {
|
|
416
|
+
id: "syncLayout",
|
|
417
|
+
systemId: "syncLayout",
|
|
418
|
+
input: { parent: self, viewId: context.view.id }
|
|
419
|
+
}),
|
|
533
420
|
lastOnNavigate: null
|
|
534
421
|
})
|
|
535
422
|
},
|
|
536
423
|
walkthrough: {
|
|
537
424
|
entry: [
|
|
538
|
-
spawnChild(
|
|
425
|
+
// spawnChild('hotkeyActor', { id: 'hotkey' }),
|
|
539
426
|
assign({
|
|
540
427
|
viewportBeforeFocus: ({ context }) => context.viewport,
|
|
541
428
|
activeWalkthrough: ({ context, event }) => {
|
|
@@ -667,11 +554,14 @@ const diagramMachine = setup({
|
|
|
667
554
|
const isAnotherView = check("is another view");
|
|
668
555
|
if (isAnotherView) {
|
|
669
556
|
const viewId = event.view.id;
|
|
670
|
-
enqueue
|
|
671
|
-
enqueue
|
|
557
|
+
enqueue("closeAllOverlays");
|
|
558
|
+
enqueue("stopSyncLayout");
|
|
672
559
|
enqueue.assign({
|
|
673
560
|
focusedNode: null,
|
|
674
|
-
syncLayoutActorRef: ({ self, spawn }) => spawn("
|
|
561
|
+
syncLayoutActorRef: ({ self, spawn }) => spawn("syncManualLayoutActorLogic", {
|
|
562
|
+
id: "syncLayout",
|
|
563
|
+
input: { parent: self, viewId }
|
|
564
|
+
})
|
|
675
565
|
});
|
|
676
566
|
const { fromNode, toNode } = findCorrespondingNode(context, event);
|
|
677
567
|
if (fromNode && toNode) {
|
|
@@ -740,23 +630,45 @@ const diagramMachine = setup({
|
|
|
740
630
|
]
|
|
741
631
|
},
|
|
742
632
|
"open.elementDetails": {
|
|
743
|
-
actions:
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
633
|
+
actions: enqueueActions(({ context, enqueue, system, event }) => {
|
|
634
|
+
var _a;
|
|
635
|
+
let initiatedFrom = null;
|
|
636
|
+
const fromNodeId = event.fromNode ?? ((_a = context.view.nodes.find((n) => DiagramNode.modelRef(n) === event.fqn)) == null ? void 0 : _a.id);
|
|
637
|
+
const internalNode = fromNodeId ? context.xystore.getState().nodeLookup.get(fromNodeId) : null;
|
|
638
|
+
if (fromNodeId && internalNode) {
|
|
639
|
+
const nodeRect = nodeToRect(internalNode);
|
|
640
|
+
const zoom = context.xyflow.getZoom();
|
|
641
|
+
const clientRect = {
|
|
642
|
+
...context.xyflow.flowToScreenPosition(nodeRect),
|
|
643
|
+
width: nodeRect.width * zoom,
|
|
644
|
+
height: nodeRect.height * zoom
|
|
645
|
+
};
|
|
646
|
+
initiatedFrom = {
|
|
647
|
+
node: fromNodeId,
|
|
648
|
+
clientRect
|
|
750
649
|
};
|
|
751
650
|
}
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
651
|
+
enqueue.sendTo(typedSystem(system).overlaysActorRef, {
|
|
652
|
+
type: "open.elementDetails",
|
|
653
|
+
subject: event.fqn,
|
|
654
|
+
currentView: context.view,
|
|
655
|
+
...initiatedFrom && { initiatedFrom }
|
|
656
|
+
});
|
|
657
|
+
})
|
|
757
658
|
},
|
|
758
659
|
"open.relationshipsBrowser": {
|
|
759
|
-
|
|
660
|
+
actions: sendTo(({ system }) => typedSystem(system).overlaysActorRef, ({ context, event }) => ({
|
|
661
|
+
type: "open.relationshipsBrowser",
|
|
662
|
+
subject: event.fqn,
|
|
663
|
+
scope: context.view
|
|
664
|
+
}))
|
|
665
|
+
},
|
|
666
|
+
"open.relationshipDetails": {
|
|
667
|
+
actions: sendTo(({ system }) => typedSystem(system).overlaysActorRef, ({ context, event }) => ({
|
|
668
|
+
type: "open.relationshipDetails",
|
|
669
|
+
view: context.view,
|
|
670
|
+
edgeId: event.edgeId
|
|
671
|
+
}))
|
|
760
672
|
},
|
|
761
673
|
"open.source": {
|
|
762
674
|
actions: {
|
|
@@ -778,7 +690,7 @@ const diagramMachine = setup({
|
|
|
778
690
|
}
|
|
779
691
|
},
|
|
780
692
|
exit: [
|
|
781
|
-
|
|
693
|
+
"stopSyncLayout",
|
|
782
694
|
stopChild("hotkey"),
|
|
783
695
|
assign({
|
|
784
696
|
xyflow: null,
|
|
@@ -798,6 +710,5 @@ function findCorrespondingNode(context, event) {
|
|
|
798
710
|
return { fromNode, toNode };
|
|
799
711
|
}
|
|
800
712
|
export {
|
|
801
|
-
DiagramContext,
|
|
802
713
|
diagramMachine
|
|
803
714
|
};
|
|
@@ -2,4 +2,4 @@ import { AnyEventObject, NonReducibleUnknown, CallbackActorLogic } from 'xstate'
|
|
|
2
2
|
export type HotKeyEvent = {
|
|
3
3
|
type: 'key.esc' | `key.arrow.${'left' | 'right'}`;
|
|
4
4
|
};
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const hotkeyActorLogic: CallbackActorLogic<AnyEventObject, NonReducibleUnknown, HotKeyEvent>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getHotkeyHandler } from "@mantine/hooks";
|
|
2
|
+
import { fromCallback } from "xstate";
|
|
3
|
+
const hotkeyActorLogic = fromCallback(({ sendBack }) => {
|
|
4
|
+
const escHandler = getHotkeyHandler([
|
|
5
|
+
["Escape", () => sendBack({ type: "key.esc" }), {
|
|
6
|
+
preventDefault: true
|
|
7
|
+
}]
|
|
8
|
+
]);
|
|
9
|
+
const arrowshandler = getHotkeyHandler([
|
|
10
|
+
["ArrowLeft", () => sendBack({ type: "key.arrow.left" }), {
|
|
11
|
+
preventDefault: true
|
|
12
|
+
}],
|
|
13
|
+
["ArrowRight", () => sendBack({ type: "key.arrow.right" }), {
|
|
14
|
+
preventDefault: true
|
|
15
|
+
}]
|
|
16
|
+
]);
|
|
17
|
+
document.body.addEventListener("keydown", escHandler);
|
|
18
|
+
document.body.addEventListener("keydown", arrowshandler, { capture: true });
|
|
19
|
+
return () => {
|
|
20
|
+
document.body.removeEventListener("keydown", escHandler);
|
|
21
|
+
document.body.removeEventListener("keydown", arrowshandler, { capture: true });
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
hotkeyActorLogic
|
|
26
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ViewChange, ViewId } from '@likec4/core';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { ActorLogicFrom, ActorRef, MachineSnapshot, StateMachine, NonReducibleUnknown, EventObject, MetaObject, ActorRefFromLogic, AnyActorLogic, ConditionalRequired, InputFrom, RequiredLogicInput, IsNotNever, AnyActorRef, StateValue, AnyEventObject, ActionFunction } from 'xstate';
|
|
3
|
+
import { Context as DiagramContext, Events as DiagramEvents } from './diagram-machine';
|
|
4
4
|
export type Input = {
|
|
5
|
-
parent: ActorRef<MachineSnapshot<
|
|
5
|
+
parent: ActorRef<MachineSnapshot<DiagramContext, DiagramEvents, any, any, any, any, any, any>, DiagramEvents, any>;
|
|
6
6
|
viewId: ViewId;
|
|
7
7
|
};
|
|
8
8
|
export type Context = Readonly<Input & {}>;
|
|
@@ -15,7 +15,7 @@ export type Events = {
|
|
|
15
15
|
} | {
|
|
16
16
|
type: 'stop';
|
|
17
17
|
};
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const syncManualLayoutActorLogic: StateMachine<Readonly<Input>, Events, {}, never, {
|
|
19
19
|
type: "trigger:OnChange";
|
|
20
20
|
params: {
|
|
21
21
|
change: ViewChange;
|
|
@@ -23,7 +23,7 @@ export declare const syncManualLayoutActor: StateMachine<Readonly<Input>, Events
|
|
|
23
23
|
}, {
|
|
24
24
|
type: "same view";
|
|
25
25
|
params: unknown;
|
|
26
|
-
}, "timeout", "
|
|
26
|
+
}, "timeout", "paused" | "stopped" | "idle" | "synced" | "pending", "pending" | "ready", Input, NonReducibleUnknown, EventObject, MetaObject, {
|
|
27
27
|
readonly initial: "idle";
|
|
28
28
|
readonly context: ({ input }: {
|
|
29
29
|
spawn: {
|
|
@@ -38,7 +38,7 @@ export declare const syncManualLayoutActor: StateMachine<Readonly<Input>, Events
|
|
|
38
38
|
input: Input;
|
|
39
39
|
self: ActorRef<MachineSnapshot<Readonly<Input>, Events, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, Events, AnyEventObject>;
|
|
40
40
|
}) => {
|
|
41
|
-
parent: ActorRef<MachineSnapshot<
|
|
41
|
+
parent: ActorRef<MachineSnapshot<DiagramContext, DiagramEvents, any, any, any, any, any, any>, DiagramEvents, any>;
|
|
42
42
|
viewId: ViewId;
|
|
43
43
|
};
|
|
44
44
|
readonly states: {
|
|
@@ -109,5 +109,4 @@ export declare const syncManualLayoutActor: StateMachine<Readonly<Input>, Events
|
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
}>;
|
|
112
|
-
export type
|
|
113
|
-
export type SyncLayoutActorSnapshot = SnapshotFrom<typeof syncManualLayoutActor>;
|
|
112
|
+
export type SyncLayoutActorLogic = ActorLogicFrom<typeof syncManualLayoutActorLogic>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getNodeDimensions, getBoundsOfRects, boxToRect } from "@xyflow/system";
|
|
2
2
|
import { reduce, hasAtLeast } from "remeda";
|
|
3
3
|
import { setup, assign } from "xstate";
|
|
4
|
-
import { isSamePoint, bezierControlPoints } from "
|
|
5
|
-
const
|
|
4
|
+
import { isSamePoint, bezierControlPoints } from "../utils/xyflow.js";
|
|
5
|
+
const syncManualLayoutActorLogic = setup({
|
|
6
6
|
types: {
|
|
7
7
|
context: {},
|
|
8
8
|
input: {},
|
|
@@ -23,8 +23,6 @@ const syncManualLayoutActor = setup({
|
|
|
23
23
|
initial: "idle",
|
|
24
24
|
context: ({ input }) => ({
|
|
25
25
|
...input
|
|
26
|
-
// parent: input.parent,
|
|
27
|
-
// viewId: input.parent.getSnapshot().context.view.id,
|
|
28
26
|
}),
|
|
29
27
|
states: {
|
|
30
28
|
idle: {
|
|
@@ -170,5 +168,5 @@ function createViewChange(parentContext) {
|
|
|
170
168
|
};
|
|
171
169
|
}
|
|
172
170
|
export {
|
|
173
|
-
|
|
171
|
+
syncManualLayoutActorLogic
|
|
174
172
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActorRefFromLogic, ActorSystem, SnapshotFrom } from 'xstate';
|
|
2
|
+
import { OverlaysActorRef } from '../overlays/overlaysActor';
|
|
3
|
+
import { DiagramMachineLogic } from './diagram-machine';
|
|
4
|
+
import { SyncLayoutActorLogic } from './syncManualLayoutActor';
|
|
5
|
+
export type System = ActorSystem<{
|
|
6
|
+
actors: {
|
|
7
|
+
diagram: DiagramActorRef;
|
|
8
|
+
overlays: OverlaysActorRef;
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export type DiagramActorRef = Omit<ActorRefFromLogic<DiagramMachineLogic>, 'system'> & {
|
|
12
|
+
system: System;
|
|
13
|
+
};
|
|
14
|
+
export type DiagramActorSnapshot = SnapshotFrom<DiagramMachineLogic>;
|
|
15
|
+
export type { Context as DiagramContext } from './diagram-machine';
|
|
16
|
+
export type SyncLayoutActorRef = Omit<ActorRefFromLogic<SyncLayoutActorLogic>, 'system'> & {
|
|
17
|
+
system: System;
|
|
18
|
+
};
|
|
19
|
+
export type SyncLayoutActorSnapshot = SnapshotFrom<SyncLayoutActorLogic>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BBox, DiagramNode, DiagramEdge } from '@likec4/core';
|
|
2
|
+
import { ActorSystem } from 'xstate';
|
|
3
|
+
import { OverlaysActorRef } from '../overlays/overlaysActor';
|
|
4
|
+
import { Context } from './diagram-machine';
|
|
5
|
+
import { DiagramActorRef } from './types';
|
|
6
|
+
export declare function typedSystem(system: ActorSystem<any>): {
|
|
7
|
+
readonly overlaysActorRef: OverlaysActorRef | null;
|
|
8
|
+
readonly diagramActorRef: DiagramActorRef | null;
|
|
9
|
+
};
|
|
10
|
+
export declare function findDiagramNode(ctx: Context, xynodeId: string): DiagramNode | null;
|
|
11
|
+
export declare function findDiagramEdge(ctx: Context, xyedgeId: string): DiagramEdge | null;
|
|
12
|
+
export declare function focusedBounds(params: {
|
|
13
|
+
context: Context;
|
|
14
|
+
}): {
|
|
15
|
+
bounds: BBox;
|
|
16
|
+
duration?: number;
|
|
17
|
+
};
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
function typedSystem(system) {
|
|
2
|
+
return {
|
|
3
|
+
get overlaysActorRef() {
|
|
4
|
+
return system.get("overlays") ?? null;
|
|
5
|
+
},
|
|
6
|
+
get diagramActorRef() {
|
|
7
|
+
return system.get("diagram") ?? null;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function findDiagramNode(ctx, xynodeId) {
|
|
12
|
+
return ctx.view.nodes.find((n) => n.id === xynodeId) ?? null;
|
|
13
|
+
}
|
|
14
|
+
function findDiagramEdge(ctx, xyedgeId) {
|
|
15
|
+
return ctx.view.edges.find((e) => e.id === xyedgeId) ?? null;
|
|
16
|
+
}
|
|
1
17
|
function focusedBounds(params) {
|
|
2
18
|
const knownAbsolutes = /* @__PURE__ */ new Map();
|
|
3
19
|
const b = params.context.xynodes.reduce((acc, node) => {
|
|
@@ -44,5 +60,8 @@ function focusedBounds(params) {
|
|
|
44
60
|
};
|
|
45
61
|
}
|
|
46
62
|
export {
|
|
47
|
-
|
|
63
|
+
findDiagramEdge,
|
|
64
|
+
findDiagramNode,
|
|
65
|
+
focusedBounds,
|
|
66
|
+
typedSystem
|
|
48
67
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/diagram",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
6
6
|
"homepage": "https://likec4.dev",
|
|
@@ -29,18 +29,9 @@
|
|
|
29
29
|
},
|
|
30
30
|
"./style.css": "./dist/style.css"
|
|
31
31
|
},
|
|
32
|
-
"packageManager": "yarn@4.6.0",
|
|
33
|
-
"scripts": {
|
|
34
|
-
"typecheck": "tsc --noEmit",
|
|
35
|
-
"build": "vite build",
|
|
36
|
-
"lint": "run -T eslint src/ --fix",
|
|
37
|
-
"clean": "rm -r -f -g 'dist/*' .tsbuildinfo",
|
|
38
|
-
"test": "vitest run --no-isolate"
|
|
39
|
-
},
|
|
40
32
|
"dependencies": {
|
|
41
33
|
"@dagrejs/dagre": "1.1.4",
|
|
42
|
-
"@
|
|
43
|
-
"@mantine/vanilla-extract": "7.16.3",
|
|
34
|
+
"@mantine/vanilla-extract": "7.17.0",
|
|
44
35
|
"@nanostores/react": "0.8.4",
|
|
45
36
|
"@react-hookz/web": "^25.0.1",
|
|
46
37
|
"@tabler/icons-react": "3.29.0",
|
|
@@ -59,18 +50,16 @@
|
|
|
59
50
|
"react-error-boundary": "^5.0.0",
|
|
60
51
|
"remeda": "^2.20.1",
|
|
61
52
|
"type-fest": "4.34.1",
|
|
62
|
-
"xstate": "^5.19.2"
|
|
53
|
+
"xstate": "^5.19.2",
|
|
54
|
+
"@likec4/core": "1.23.1"
|
|
63
55
|
},
|
|
64
56
|
"peerDependencies": {
|
|
65
|
-
"@mantine/core": "
|
|
66
|
-
"@mantine/hooks": "
|
|
67
|
-
"react": "
|
|
68
|
-
"react-dom": "
|
|
57
|
+
"@mantine/core": "7.17.0",
|
|
58
|
+
"@mantine/hooks": "7.17.0",
|
|
59
|
+
"react": "~19.0.0",
|
|
60
|
+
"react-dom": "~19.0.0"
|
|
69
61
|
},
|
|
70
62
|
"devDependencies": {
|
|
71
|
-
"@likec4/tsconfig": "1.22.1",
|
|
72
|
-
"@mantine/core": "7.16.3",
|
|
73
|
-
"@mantine/hooks": "7.16.3",
|
|
74
63
|
"@statelyai/inspect": "^0.4.0",
|
|
75
64
|
"@types/bezier-js": "^4.1.3",
|
|
76
65
|
"@types/d3-shape": "^3.1.7",
|
|
@@ -78,12 +67,19 @@
|
|
|
78
67
|
"@types/react-dom": "~19.0.3",
|
|
79
68
|
"@vanilla-extract/css": "^1.17.1",
|
|
80
69
|
"@vanilla-extract/css-utils": "^0.1.4",
|
|
70
|
+
"@vanilla-extract/vite-plugin": "^5.0.1",
|
|
81
71
|
"@vitejs/plugin-react": "4.3.4",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"typescript": "^5.7.3",
|
|
85
|
-
"vite": "5.4.14",
|
|
72
|
+
"typescript": "5.7.3",
|
|
73
|
+
"vite": "6.1.0",
|
|
86
74
|
"vite-plugin-dts": "^4.5.0",
|
|
87
|
-
"vitest": "^3.0.4"
|
|
75
|
+
"vitest": "^3.0.4",
|
|
76
|
+
"@likec4/tsconfig": "1.23.1"
|
|
77
|
+
},
|
|
78
|
+
"scripts": {
|
|
79
|
+
"typecheck": "tsc --noEmit",
|
|
80
|
+
"build": "vite build",
|
|
81
|
+
"lint": "run -T eslint src/ --fix",
|
|
82
|
+
"clean": "rm -r -f -g 'dist/*' .tsbuildinfo",
|
|
83
|
+
"test": "vitest run --no-isolate"
|
|
88
84
|
}
|
|
89
85
|
}
|