@odigos/ui-kit 0.0.19 → 0.0.21

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/lib/components.js +7 -7
  3. package/lib/constants.js +3 -3
  4. package/lib/containers.js +679 -778
  5. package/lib/functions.js +12 -6
  6. package/lib/hooks.js +5 -5
  7. package/lib/icons/destinations/alauda-logo/index.d.ts +2 -0
  8. package/lib/icons/destinations/alibaba-cloud-logo/index.d.ts +2 -0
  9. package/lib/icons/destinations/bonree-logo/index.d.ts +2 -0
  10. package/lib/icons/destinations/checkly-logo/index.d.ts +2 -0
  11. package/lib/icons/destinations/greptime-logo/index.d.ts +2 -0
  12. package/lib/icons/destinations/index.d.ts +12 -0
  13. package/lib/icons/destinations/observe-logo/index.d.ts +2 -0
  14. package/lib/icons/destinations/one-uptime-logo/index.d.ts +2 -0
  15. package/lib/icons/destinations/open-observe-logo/index.d.ts +2 -0
  16. package/lib/icons/destinations/oracle-logo/index.d.ts +2 -0
  17. package/lib/icons/destinations/seq-logo/index.d.ts +2 -0
  18. package/lib/icons/destinations/telemetry-hub-logo/index.d.ts +2 -0
  19. package/lib/icons/destinations/tingyun-logo/index.d.ts +2 -0
  20. package/lib/icons.js +2 -2
  21. package/lib/{index-WSle42rz.js → index-BfUUVS8N.js} +1 -1
  22. package/lib/{index-DSzybApb.js → index-C48Fe7Pl.js} +15 -3
  23. package/lib/{index-CD_BQJCD.js → index-C7Y1tYdc.js} +1 -1
  24. package/lib/{index-DB8Djrsy.js → index-CksKgOxY.js} +161 -1
  25. package/lib/{index-BFRz3l_w.js → index-D3sp5Hx7.js} +2 -2
  26. package/lib/{index-CvuVOtkr.js → index-Dboulcny.js} +5 -5
  27. package/lib/{index-BazfJyRh.js → index-DiTtXTRm.js} +6 -10
  28. package/lib/store.js +1 -1
  29. package/lib/theme.js +1 -1
  30. package/lib/types/destinations/index.d.ts +12 -0
  31. package/lib/types.js +12 -0
  32. package/lib/{useSourceSelectionFormData-_2PggiXn.js → useSourceSelectionFormData-CrKof314.js} +3 -3
  33. package/lib/{useTransition-bXMKBfST.js → useTransition-D0ykOLrk.js} +2 -2
  34. package/package.json +19 -19
package/lib/containers.js CHANGED
@@ -1,23 +1,23 @@
1
1
  import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, useMemo, memo, useContext, createContext, useCallback, useLayoutEffect, Fragment } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
- import { A as ACTION_OPTIONS, M as MONITORS_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS } from './index-BFRz3l_w.js';
3
+ import { A as ACTION_OPTIONS, M as MONITORS_OPTIONS, I as INSTRUMENTATION_RULE_OPTIONS } from './index-D3sp5Hx7.js';
4
4
  import { D as DISPLAY_TITLES, F as FORM_ALERTS } from './index-C_0J5P9M.js';
5
5
  import { ActionType, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, AddNodeTypes, EdgeTypes, FieldTypes, SignalType, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType } from './types.js';
6
- import { f as DataCardFieldTypes, p as FieldLabel, b as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, V as Text, P as Segment, O as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, W as TextArea, k as Drawer, h as DeleteWarning, C as CancelWarning, d as ConditionDetails, D as DataCard, M as Modal, N as NavigationButtons, a3 as ModalBody, A as AutocompleteInput, i as Divider, R as Status, $ as FlexRow, Y as Tooltip, s as IconWrapped, G as MonitorsIcons, a4 as TableContainer, a5 as TableTitleWrap, r as IconTitleBadge, a6 as TableWrap, y as InteractiveTable, a1 as CenterThis, J as NoDataFound, a0 as FlexColumn, Z as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a7 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, Q as SkeletonLoader, X as Toggle, L as NotificationNote, U as Stepper, I as IconButton, e as DataCardFields, t as IconsNav, q as IconGroup } from './index-CvuVOtkr.js';
7
- import { g as usePendingStore, f as useNotificationStore, a as useDrawerStore, b as useEntityStore, e as useModalStore, c as useFilterStore, s as styleInject, h as useSelectedStore, d as useInstrumentStore, j as getEntityId, i as useSetupStore, u as useDarkMode } from './index-BazfJyRh.js';
6
+ import { f as DataCardFieldTypes, p as FieldLabel, b as Checkbox, o as FieldError, v as Input, x as InputTable, K as KeyValueInputsList, w as InputList, V as Text, P as Segment, O as SectionTitle, j as DocsButton, z as MonitorsCheckboxes, W as TextArea, k as Drawer, h as DeleteWarning, C as CancelWarning, d as ConditionDetails, D as DataCard, M as Modal, N as NavigationButtons, a3 as ModalBody, A as AutocompleteInput, i as Divider, R as Status, $ as FlexRow, Y as Tooltip, s as IconWrapped, G as MonitorsIcons, a4 as TableContainer, a5 as TableTitleWrap, r as IconTitleBadge, a6 as TableWrap, y as InteractiveTable, a1 as CenterThis, J as NoDataFound, a0 as FlexColumn, Z as TraceLoader, a as Badge, B as Button, E as ExtendArrow, n as Dropdown, a7 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, Q as SkeletonLoader, X as Toggle, L as NotificationNote, U as Stepper, I as IconButton, e as DataCardFields, t as IconsNav, q as IconGroup } from './index-Dboulcny.js';
7
+ import { g as usePendingStore, f as useNotificationStore, a as useDrawerStore, b as useEntityStore, e as useModalStore, c as useFilterStore, s as styleInject, h as useSelectedStore, d as useInstrumentStore, k as getEntityId, i as useSetupStore, u as useDarkMode } from './index-DiTtXTRm.js';
8
8
  import Theme from './theme.js';
9
9
  import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
10
10
  import { i as CheckCircledIcon, O as OdigosLogo } from './index-BsH_egEe.js';
11
11
  import { C as CrossCircledIcon, E as EditIcon, O as OdigosLogoText, a as OverviewIcon, F as FilterIcon, N as NotificationIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon } from './index-KOMAv-TS.js';
12
- import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-CD_BQJCD.js';
13
- import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-_2PggiXn.js';
14
- import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-bXMKBfST.js';
12
+ import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-C7Y1tYdc.js';
13
+ import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-CrKof314.js';
14
+ import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-D0ykOLrk.js';
15
15
  import { T as TrashIcon, S as SearchIcon, P as PlusIcon$1, A as ArrowIcon, a as CopyIcon, f as CheckIcon, g as CrossIcon } from './index-BJxaoI0G.js';
16
- import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-WSle42rz.js';
17
- import { f as filterActions, g as getConditionsBooleans, k as getEntityLabel, j as getEntityIcon, s as sleep$1, m as getPlatformIcon, n as getPlatformLabel, d as formatBytes, h as getContainersIcons, o as getValueForRange, i as getDestinationIcon, b as filterSources, a as filterDestinations, c as compareCondition, l as getMetricForEntity, p as getWorkloadId, e as getContainersInstrumentedCount, q as isOverTime } from './index-DSzybApb.js';
16
+ import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-BfUUVS8N.js';
17
+ import { f as filterActions, g as getConditionsBooleans, k as getEntityLabel, j as getEntityIcon, s as sleep$1, m as getPlatformIcon, n as getPlatformLabel, d as formatBytes, h as getContainersIcons, o as getValueForRange, i as getDestinationIcon, b as filterSources, a as filterDestinations, c as compareCondition, l as getMetricForEntity, p as getWorkloadId, e as getContainersInstrumentedCount, q as isOverTime } from './index-C48Fe7Pl.js';
18
18
  import require$$1 from 'use-sync-external-store/shim';
19
19
  import { createPortal } from 'react-dom';
20
- import { R as RulesIcon, W as SourcesIcon, y as ActionsIcon, z as DestinationsIcon } from './index-DB8Djrsy.js';
20
+ import { a5 as RulesIcon, a6 as SourcesIcon, a2 as ActionsIcon, a3 as DestinationsIcon } from './index-CksKgOxY.js';
21
21
  import './index-DGel4E-Z.js';
22
22
  import 'babel-runtime/helpers/extends';
23
23
  import 'babel-runtime/core-js/object/get-prototype-of';
@@ -1092,7 +1092,7 @@ const ComputePlatformsActionsMenu = ({ connections }) => {
1092
1092
  React.createElement(ConnectionStatusDropdown, { connections: connections, value: statuses, onSelect: (val) => setStatuses([...(statuses || []), val]), onDeselect: (val) => setStatuses((statuses || []).filter((opt) => opt.id !== val.id)), showSearch: true, required: true, isMulti: true })))));
1093
1093
  };
1094
1094
 
1095
- var css_248z = "/* this gets exported as style.css and can be used for the default theming */\n/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */\n.react-flow {\n direction: ltr;\n\n --xy-edge-stroke-default: #b1b1b7;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #555;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);\n\n --xy-minimap-background-color-default: #fff;\n --xy-minimap-mask-background-color-default: rgb(240, 240, 240, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #e2e2e2;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: transparent;\n --xy-background-pattern-dots-color-default: #91919a;\n --xy-background-pattern-lines-color-default: #eee;\n --xy-background-pattern-cross-color-default: #e2e2e2;\n background-color: var(--xy-background-color, var(--xy-background-color-default));\n --xy-node-color-default: inherit;\n --xy-node-border-default: 1px solid #1a192b;\n --xy-node-background-color-default: #fff;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;\n --xy-node-border-radius-default: 3px;\n\n --xy-handle-background-color-default: #1a192b;\n --xy-handle-border-color-default: #fff;\n\n --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);\n\n --xy-controls-button-background-color-default: #fefefe;\n --xy-controls-button-background-color-hover-default: #f4f4f4;\n --xy-controls-button-color-default: inherit;\n --xy-controls-button-color-hover-default: inherit;\n --xy-controls-button-border-color-default: #eee;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #ffffff;\n --xy-edge-label-color-default: inherit;\n --xy-resize-background-color-default: #3367d9;\n}\n.react-flow.dark {\n --xy-edge-stroke-default: #3e3e3e;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #727272;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);\n\n --xy-minimap-background-color-default: #141414;\n --xy-minimap-mask-background-color-default: rgb(60, 60, 60, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #2b2b2b;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: #141414;\n --xy-background-pattern-dots-color-default: #777;\n --xy-background-pattern-lines-color-default: #777;\n --xy-background-pattern-cross-color-default: #777;\n --xy-node-color-default: #f8f8f8;\n --xy-node-border-default: 1px solid #3c3c3c;\n --xy-node-background-color-default: #1e1e1e;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;\n\n --xy-handle-background-color-default: #bebebe;\n --xy-handle-border-color-default: #1e1e1e;\n\n --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);\n\n --xy-controls-button-background-color-default: #2b2b2b;\n --xy-controls-button-background-color-hover-default: #3e3e3e;\n --xy-controls-button-color-default: #f8f8f8;\n --xy-controls-button-color-hover-default: #fff;\n --xy-controls-button-border-color-default: #5b5b5b;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #141414;\n --xy-edge-label-color-default: #f8f8f8;\n}\n.react-flow__background {\n background-color: var(--xy-background-color, var(--xy-background-color-props, var(--xy-background-color-default)));\n pointer-events: none;\n z-index: -1;\n}\n.react-flow__container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.react-flow__pane {\n z-index: 1;\n}\n.react-flow__pane.draggable {\n cursor: grab;\n }\n.react-flow__pane.dragging {\n cursor: grabbing;\n }\n.react-flow__pane.selection {\n cursor: pointer;\n }\n.react-flow__viewport {\n transform-origin: 0 0;\n z-index: 2;\n pointer-events: none;\n}\n.react-flow__renderer {\n z-index: 4;\n}\n.react-flow__selection {\n z-index: 6;\n}\n.react-flow__nodesselection-rect:focus,\n.react-flow__nodesselection-rect:focus-visible {\n outline: none;\n}\n.react-flow__edge-path {\n stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));\n stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));\n fill: none;\n}\n.react-flow__connection-path {\n stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));\n stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));\n fill: none;\n}\n.react-flow .react-flow__edges {\n position: absolute;\n}\n.react-flow .react-flow__edges svg {\n overflow: visible;\n position: absolute;\n pointer-events: none;\n }\n.react-flow__edge {\n pointer-events: visibleStroke;\n}\n.react-flow__edge.selectable {\n cursor: pointer;\n }\n.react-flow__edge.animated path {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\n.react-flow__edge.animated path.react-flow__edge-interaction {\n stroke-dasharray: none;\n animation: none;\n }\n.react-flow__edge.inactive {\n pointer-events: none;\n }\n.react-flow__edge.selected,\n .react-flow__edge:focus,\n .react-flow__edge:focus-visible {\n outline: none;\n }\n.react-flow__edge.selected .react-flow__edge-path,\n .react-flow__edge.selectable:focus .react-flow__edge-path,\n .react-flow__edge.selectable:focus-visible .react-flow__edge-path {\n stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));\n }\n.react-flow__edge-textwrapper {\n pointer-events: all;\n }\n.react-flow__edge .react-flow__edge-text {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__connection {\n pointer-events: none;\n}\n.react-flow__connection .animated {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\nsvg.react-flow__connectionline {\n z-index: 1001;\n overflow: visible;\n position: absolute;\n}\n.react-flow__nodes {\n pointer-events: none;\n transform-origin: 0 0;\n}\n.react-flow__node {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: all;\n transform-origin: 0 0;\n box-sizing: border-box;\n cursor: default;\n}\n.react-flow__node.selectable {\n cursor: pointer;\n }\n.react-flow__node.draggable {\n cursor: grab;\n pointer-events: all;\n }\n.react-flow__node.draggable.dragging {\n cursor: grabbing;\n }\n.react-flow__nodesselection {\n z-index: 3;\n transform-origin: left top;\n pointer-events: none;\n}\n.react-flow__nodesselection-rect {\n position: absolute;\n pointer-events: all;\n cursor: grab;\n }\n.react-flow__handle {\n position: absolute;\n pointer-events: none;\n min-width: 5px;\n min-height: 5px;\n width: 6px;\n height: 6px;\n background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));\n border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));\n border-radius: 100%;\n}\n.react-flow__handle.connectingfrom {\n pointer-events: all;\n }\n.react-flow__handle.connectionindicator {\n pointer-events: all;\n cursor: crosshair;\n }\n.react-flow__handle-bottom {\n top: auto;\n left: 50%;\n bottom: 0;\n transform: translate(-50%, 50%);\n }\n.react-flow__handle-top {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-left {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-right {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n }\n.react-flow__edgeupdater {\n cursor: move;\n pointer-events: all;\n}\n.react-flow__panel {\n position: absolute;\n z-index: 5;\n margin: 15px;\n}\n.react-flow__panel.top {\n top: 0;\n }\n.react-flow__panel.bottom {\n bottom: 0;\n }\n.react-flow__panel.left {\n left: 0;\n }\n.react-flow__panel.right {\n right: 0;\n }\n.react-flow__panel.center {\n left: 50%;\n transform: translateX(-50%);\n }\n.react-flow__attribution {\n font-size: 10px;\n background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));\n padding: 2px 3px;\n margin: 0;\n}\n.react-flow__attribution a {\n text-decoration: none;\n color: #999;\n }\n@keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n}\n.react-flow__edgelabel-renderer {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n left: 0;\n top: 0;\n}\n.react-flow__viewport-portal {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-flow__minimap {\n background: var(\n --xy-minimap-background-color-props,\n var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))\n );\n}\n.react-flow__minimap-svg {\n display: block;\n }\n.react-flow__minimap-mask {\n fill: var(\n --xy-minimap-mask-background-color-props,\n var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))\n );\n stroke: var(\n --xy-minimap-mask-stroke-color-props,\n var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-mask-stroke-width-props,\n var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))\n );\n }\n.react-flow__minimap-node {\n fill: var(\n --xy-minimap-node-background-color-props,\n var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))\n );\n stroke: var(\n --xy-minimap-node-stroke-color-props,\n var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-node-stroke-width-props,\n var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))\n );\n }\n.react-flow__background-pattern.dots {\n fill: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))\n );\n }\n.react-flow__background-pattern.lines {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))\n );\n }\n.react-flow__background-pattern.cross {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))\n );\n }\n.react-flow__controls {\n display: flex;\n flex-direction: column;\n box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));\n}\n.react-flow__controls.horizontal {\n flex-direction: row;\n }\n.react-flow__controls-button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 26px;\n width: 26px;\n padding: 4px;\n border: none;\n background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));\n border-bottom: 1px solid\n var(\n --xy-controls-button-border-color-props,\n var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))\n );\n color: var(\n --xy-controls-button-color-props,\n var(--xy-controls-button-color, var(--xy-controls-button-color-default))\n );\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__controls-button svg {\n width: 100%;\n max-width: 12px;\n max-height: 12px;\n fill: currentColor;\n }\n.react-flow__edge.updating .react-flow__edge-path {\n stroke: #777;\n }\n.react-flow__edge-text {\n font-size: 10px;\n }\n.react-flow__node.selectable:focus,\n .react-flow__node.selectable:focus-visible {\n outline: none;\n }\n.react-flow__node-input,\n.react-flow__node-default,\n.react-flow__node-output,\n.react-flow__node-group {\n padding: 10px;\n border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));\n width: 150px;\n font-size: 12px;\n color: var(--xy-node-color, var(--xy-node-color-default));\n text-align: center;\n border: var(--xy-node-border, var(--xy-node-border-default));\n background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));\n}\n.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {\n box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));\n }\n.react-flow__node-input.selectable.selected,\n .react-flow__node-input.selectable:focus,\n .react-flow__node-input.selectable:focus-visible,\n .react-flow__node-default.selectable.selected,\n .react-flow__node-default.selectable:focus,\n .react-flow__node-default.selectable:focus-visible,\n .react-flow__node-output.selectable.selected,\n .react-flow__node-output.selectable:focus,\n .react-flow__node-output.selectable:focus-visible,\n .react-flow__node-group.selectable.selected,\n .react-flow__node-group.selectable:focus,\n .react-flow__node-group.selectable:focus-visible {\n box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));\n }\n.react-flow__node-group {\n background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));\n}\n.react-flow__nodesselection-rect,\n.react-flow__selection {\n background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));\n border: var(--xy-selection-border, var(--xy-selection-border-default));\n}\n.react-flow__nodesselection-rect:focus,\n .react-flow__nodesselection-rect:focus-visible,\n .react-flow__selection:focus,\n .react-flow__selection:focus-visible {\n outline: none;\n }\n.react-flow__controls-button:hover {\n background: var(\n --xy-controls-button-background-color-hover-props,\n var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))\n );\n color: var(\n --xy-controls-button-color-hover-props,\n var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))\n );\n }\n.react-flow__controls-button:disabled {\n pointer-events: none;\n }\n.react-flow__controls-button:disabled svg {\n fill-opacity: 0.4;\n }\n.react-flow__controls-button:last-child {\n border-bottom: none;\n }\n.react-flow__resize-control {\n position: absolute;\n}\n.react-flow__resize-control.left,\n.react-flow__resize-control.right {\n cursor: ew-resize;\n}\n.react-flow__resize-control.top,\n.react-flow__resize-control.bottom {\n cursor: ns-resize;\n}\n.react-flow__resize-control.top.left,\n.react-flow__resize-control.bottom.right {\n cursor: nwse-resize;\n}\n.react-flow__resize-control.bottom.left,\n.react-flow__resize-control.top.right {\n cursor: nesw-resize;\n}\n/* handle styles */\n.react-flow__resize-control.handle {\n width: 4px;\n height: 4px;\n border: 1px solid #fff;\n border-radius: 1px;\n background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n transform: translate(-50%, -50%);\n}\n.react-flow__resize-control.handle.left {\n left: 0;\n top: 50%;\n}\n.react-flow__resize-control.handle.right {\n left: 100%;\n top: 50%;\n}\n.react-flow__resize-control.handle.top {\n left: 50%;\n top: 0;\n}\n.react-flow__resize-control.handle.bottom {\n left: 50%;\n top: 100%;\n}\n.react-flow__resize-control.handle.top.left {\n left: 0;\n}\n.react-flow__resize-control.handle.bottom.left {\n left: 0;\n}\n.react-flow__resize-control.handle.top.right {\n left: 100%;\n}\n.react-flow__resize-control.handle.bottom.right {\n left: 100%;\n}\n/* line styles */\n.react-flow__resize-control.line {\n border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n border-width: 0;\n border-style: solid;\n}\n.react-flow__resize-control.line.left,\n.react-flow__resize-control.line.right {\n width: 1px;\n transform: translate(-50%, 0);\n top: 0;\n height: 100%;\n}\n.react-flow__resize-control.line.left {\n left: 0;\n border-left-width: 1px;\n}\n.react-flow__resize-control.line.right {\n left: 100%;\n border-right-width: 1px;\n}\n.react-flow__resize-control.line.top,\n.react-flow__resize-control.line.bottom {\n height: 1px;\n transform: translate(0, -50%);\n left: 0;\n width: 100%;\n}\n.react-flow__resize-control.line.top {\n top: 0;\n border-top-width: 1px;\n}\n.react-flow__resize-control.line.bottom {\n border-bottom-width: 1px;\n top: 100%;\n}\n.react-flow__edge-textbg {\n fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));\n}\n.react-flow__edge-text {\n fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));\n}\n";
1095
+ var css_248z = "/* this gets exported as style.css and can be used for the default theming */\n/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */\n.react-flow {\n direction: ltr;\n\n --xy-edge-stroke-default: #b1b1b7;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #555;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);\n\n --xy-minimap-background-color-default: #fff;\n --xy-minimap-mask-background-color-default: rgb(240, 240, 240, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #e2e2e2;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: transparent;\n --xy-background-pattern-dots-color-default: #91919a;\n --xy-background-pattern-lines-color-default: #eee;\n --xy-background-pattern-cross-color-default: #e2e2e2;\n background-color: var(--xy-background-color, var(--xy-background-color-default));\n --xy-node-color-default: inherit;\n --xy-node-border-default: 1px solid #1a192b;\n --xy-node-background-color-default: #fff;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;\n --xy-node-border-radius-default: 3px;\n\n --xy-handle-background-color-default: #1a192b;\n --xy-handle-border-color-default: #fff;\n\n --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);\n\n --xy-controls-button-background-color-default: #fefefe;\n --xy-controls-button-background-color-hover-default: #f4f4f4;\n --xy-controls-button-color-default: inherit;\n --xy-controls-button-color-hover-default: inherit;\n --xy-controls-button-border-color-default: #eee;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #ffffff;\n --xy-edge-label-color-default: inherit;\n --xy-resize-background-color-default: #3367d9;\n}\n.react-flow.dark {\n --xy-edge-stroke-default: #3e3e3e;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #727272;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);\n\n --xy-minimap-background-color-default: #141414;\n --xy-minimap-mask-background-color-default: rgb(60, 60, 60, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #2b2b2b;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: #141414;\n --xy-background-pattern-dots-color-default: #777;\n --xy-background-pattern-lines-color-default: #777;\n --xy-background-pattern-cross-color-default: #777;\n --xy-node-color-default: #f8f8f8;\n --xy-node-border-default: 1px solid #3c3c3c;\n --xy-node-background-color-default: #1e1e1e;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;\n\n --xy-handle-background-color-default: #bebebe;\n --xy-handle-border-color-default: #1e1e1e;\n\n --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);\n\n --xy-controls-button-background-color-default: #2b2b2b;\n --xy-controls-button-background-color-hover-default: #3e3e3e;\n --xy-controls-button-color-default: #f8f8f8;\n --xy-controls-button-color-hover-default: #fff;\n --xy-controls-button-border-color-default: #5b5b5b;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #141414;\n --xy-edge-label-color-default: #f8f8f8;\n}\n.react-flow__background {\n background-color: var(--xy-background-color, var(--xy-background-color-props, var(--xy-background-color-default)));\n pointer-events: none;\n z-index: -1;\n}\n.react-flow__container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.react-flow__pane {\n z-index: 1;\n}\n.react-flow__pane.draggable {\n cursor: grab;\n }\n.react-flow__pane.dragging {\n cursor: grabbing;\n }\n.react-flow__pane.selection {\n cursor: pointer;\n }\n.react-flow__viewport {\n transform-origin: 0 0;\n z-index: 2;\n pointer-events: none;\n}\n.react-flow__renderer {\n z-index: 4;\n}\n.react-flow__selection {\n z-index: 6;\n}\n.react-flow__nodesselection-rect:focus,\n.react-flow__nodesselection-rect:focus-visible {\n outline: none;\n}\n.react-flow__edge-path {\n stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));\n stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));\n fill: none;\n}\n.react-flow__connection-path {\n stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));\n stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));\n fill: none;\n}\n.react-flow .react-flow__edges {\n position: absolute;\n}\n.react-flow .react-flow__edges svg {\n overflow: visible;\n position: absolute;\n pointer-events: none;\n }\n.react-flow__edge {\n pointer-events: visibleStroke;\n}\n.react-flow__edge.selectable {\n cursor: pointer;\n }\n.react-flow__edge.animated path {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\n.react-flow__edge.animated path.react-flow__edge-interaction {\n stroke-dasharray: none;\n animation: none;\n }\n.react-flow__edge.inactive {\n pointer-events: none;\n }\n.react-flow__edge.selected,\n .react-flow__edge:focus,\n .react-flow__edge:focus-visible {\n outline: none;\n }\n.react-flow__edge.selected .react-flow__edge-path,\n .react-flow__edge.selectable:focus .react-flow__edge-path,\n .react-flow__edge.selectable:focus-visible .react-flow__edge-path {\n stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));\n }\n.react-flow__edge-textwrapper {\n pointer-events: all;\n }\n.react-flow__edge .react-flow__edge-text {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__connection {\n pointer-events: none;\n}\n.react-flow__connection .animated {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\nsvg.react-flow__connectionline {\n z-index: 1001;\n overflow: visible;\n position: absolute;\n}\n.react-flow__nodes {\n pointer-events: none;\n transform-origin: 0 0;\n}\n.react-flow__node {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: all;\n transform-origin: 0 0;\n box-sizing: border-box;\n cursor: default;\n}\n.react-flow__node.selectable {\n cursor: pointer;\n }\n.react-flow__node.draggable {\n cursor: grab;\n pointer-events: all;\n }\n.react-flow__node.draggable.dragging {\n cursor: grabbing;\n }\n.react-flow__nodesselection {\n z-index: 3;\n transform-origin: left top;\n pointer-events: none;\n}\n.react-flow__nodesselection-rect {\n position: absolute;\n pointer-events: all;\n cursor: grab;\n }\n.react-flow__handle {\n position: absolute;\n pointer-events: none;\n min-width: 5px;\n min-height: 5px;\n width: 6px;\n height: 6px;\n background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));\n border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));\n border-radius: 100%;\n}\n.react-flow__handle.connectingfrom {\n pointer-events: all;\n }\n.react-flow__handle.connectionindicator {\n pointer-events: all;\n cursor: crosshair;\n }\n.react-flow__handle-bottom {\n top: auto;\n left: 50%;\n bottom: 0;\n transform: translate(-50%, 50%);\n }\n.react-flow__handle-top {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-left {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-right {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n }\n.react-flow__edgeupdater {\n cursor: move;\n pointer-events: all;\n}\n.react-flow__panel {\n position: absolute;\n z-index: 5;\n margin: 15px;\n}\n.react-flow__panel.top {\n top: 0;\n }\n.react-flow__panel.bottom {\n bottom: 0;\n }\n.react-flow__panel.top.center, .react-flow__panel.bottom.center {\n left: 50%;\n transform: translateX(-50%);\n }\n.react-flow__panel.left {\n left: 0;\n }\n.react-flow__panel.right {\n right: 0;\n }\n.react-flow__panel.left.center, .react-flow__panel.right.center {\n top: 50%;\n transform: translateY(-50%);\n }\n.react-flow__attribution {\n font-size: 10px;\n background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));\n padding: 2px 3px;\n margin: 0;\n}\n.react-flow__attribution a {\n text-decoration: none;\n color: #999;\n }\n@keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n}\n.react-flow__edgelabel-renderer {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n left: 0;\n top: 0;\n}\n.react-flow__viewport-portal {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-flow__minimap {\n background: var(\n --xy-minimap-background-color-props,\n var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))\n );\n}\n.react-flow__minimap-svg {\n display: block;\n }\n.react-flow__minimap-mask {\n fill: var(\n --xy-minimap-mask-background-color-props,\n var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))\n );\n stroke: var(\n --xy-minimap-mask-stroke-color-props,\n var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-mask-stroke-width-props,\n var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))\n );\n }\n.react-flow__minimap-node {\n fill: var(\n --xy-minimap-node-background-color-props,\n var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))\n );\n stroke: var(\n --xy-minimap-node-stroke-color-props,\n var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-node-stroke-width-props,\n var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))\n );\n }\n.react-flow__background-pattern.dots {\n fill: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))\n );\n }\n.react-flow__background-pattern.lines {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))\n );\n }\n.react-flow__background-pattern.cross {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))\n );\n }\n.react-flow__controls {\n display: flex;\n flex-direction: column;\n box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));\n}\n.react-flow__controls.horizontal {\n flex-direction: row;\n }\n.react-flow__controls-button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 26px;\n width: 26px;\n padding: 4px;\n border: none;\n background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));\n border-bottom: 1px solid\n var(\n --xy-controls-button-border-color-props,\n var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))\n );\n color: var(\n --xy-controls-button-color-props,\n var(--xy-controls-button-color, var(--xy-controls-button-color-default))\n );\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__controls-button svg {\n width: 100%;\n max-width: 12px;\n max-height: 12px;\n fill: currentColor;\n }\n.react-flow__edge.updating .react-flow__edge-path {\n stroke: #777;\n }\n.react-flow__edge-text {\n font-size: 10px;\n }\n.react-flow__node.selectable:focus,\n .react-flow__node.selectable:focus-visible {\n outline: none;\n }\n.react-flow__node-input,\n.react-flow__node-default,\n.react-flow__node-output,\n.react-flow__node-group {\n padding: 10px;\n border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));\n width: 150px;\n font-size: 12px;\n color: var(--xy-node-color, var(--xy-node-color-default));\n text-align: center;\n border: var(--xy-node-border, var(--xy-node-border-default));\n background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));\n}\n.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {\n box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));\n }\n.react-flow__node-input.selectable.selected,\n .react-flow__node-input.selectable:focus,\n .react-flow__node-input.selectable:focus-visible,\n .react-flow__node-default.selectable.selected,\n .react-flow__node-default.selectable:focus,\n .react-flow__node-default.selectable:focus-visible,\n .react-flow__node-output.selectable.selected,\n .react-flow__node-output.selectable:focus,\n .react-flow__node-output.selectable:focus-visible,\n .react-flow__node-group.selectable.selected,\n .react-flow__node-group.selectable:focus,\n .react-flow__node-group.selectable:focus-visible {\n box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));\n }\n.react-flow__node-group {\n background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));\n}\n.react-flow__nodesselection-rect,\n.react-flow__selection {\n background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));\n border: var(--xy-selection-border, var(--xy-selection-border-default));\n}\n.react-flow__nodesselection-rect:focus,\n .react-flow__nodesselection-rect:focus-visible,\n .react-flow__selection:focus,\n .react-flow__selection:focus-visible {\n outline: none;\n }\n.react-flow__controls-button:hover {\n background: var(\n --xy-controls-button-background-color-hover-props,\n var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))\n );\n color: var(\n --xy-controls-button-color-hover-props,\n var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))\n );\n }\n.react-flow__controls-button:disabled {\n pointer-events: none;\n }\n.react-flow__controls-button:disabled svg {\n fill-opacity: 0.4;\n }\n.react-flow__controls-button:last-child {\n border-bottom: none;\n }\n.react-flow__resize-control {\n position: absolute;\n}\n.react-flow__resize-control.left,\n.react-flow__resize-control.right {\n cursor: ew-resize;\n}\n.react-flow__resize-control.top,\n.react-flow__resize-control.bottom {\n cursor: ns-resize;\n}\n.react-flow__resize-control.top.left,\n.react-flow__resize-control.bottom.right {\n cursor: nwse-resize;\n}\n.react-flow__resize-control.bottom.left,\n.react-flow__resize-control.top.right {\n cursor: nesw-resize;\n}\n/* handle styles */\n.react-flow__resize-control.handle {\n width: 4px;\n height: 4px;\n border: 1px solid #fff;\n border-radius: 1px;\n background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n transform: translate(-50%, -50%);\n}\n.react-flow__resize-control.handle.left {\n left: 0;\n top: 50%;\n}\n.react-flow__resize-control.handle.right {\n left: 100%;\n top: 50%;\n}\n.react-flow__resize-control.handle.top {\n left: 50%;\n top: 0;\n}\n.react-flow__resize-control.handle.bottom {\n left: 50%;\n top: 100%;\n}\n.react-flow__resize-control.handle.top.left {\n left: 0;\n}\n.react-flow__resize-control.handle.bottom.left {\n left: 0;\n}\n.react-flow__resize-control.handle.top.right {\n left: 100%;\n}\n.react-flow__resize-control.handle.bottom.right {\n left: 100%;\n}\n/* line styles */\n.react-flow__resize-control.line {\n border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n border-width: 0;\n border-style: solid;\n}\n.react-flow__resize-control.line.left,\n.react-flow__resize-control.line.right {\n width: 1px;\n transform: translate(-50%, 0);\n top: 0;\n height: 100%;\n}\n.react-flow__resize-control.line.left {\n left: 0;\n border-left-width: 1px;\n}\n.react-flow__resize-control.line.right {\n left: 100%;\n border-right-width: 1px;\n}\n.react-flow__resize-control.line.top,\n.react-flow__resize-control.line.bottom {\n height: 1px;\n transform: translate(0, -50%);\n left: 0;\n width: 100%;\n}\n.react-flow__resize-control.line.top {\n top: 0;\n border-top-width: 1px;\n}\n.react-flow__resize-control.line.bottom {\n border-bottom-width: 1px;\n top: 100%;\n}\n.react-flow__edge-textbg {\n fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));\n}\n.react-flow__edge-text {\n fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));\n}\n";
1096
1096
  styleInject(css_248z);
1097
1097
 
1098
1098
  var jsxRuntime = {exports: {}};
@@ -1162,15 +1162,13 @@ function requireReactJsxRuntime_development () {
1162
1162
  function getComponentNameFromType(type) {
1163
1163
  if (null == type) return null;
1164
1164
  if ("function" === typeof type)
1165
- return type.$$typeof === REACT_CLIENT_REFERENCE$2
1165
+ return type.$$typeof === REACT_CLIENT_REFERENCE
1166
1166
  ? null
1167
1167
  : type.displayName || type.name || null;
1168
1168
  if ("string" === typeof type) return type;
1169
1169
  switch (type) {
1170
1170
  case REACT_FRAGMENT_TYPE:
1171
1171
  return "Fragment";
1172
- case REACT_PORTAL_TYPE:
1173
- return "Portal";
1174
1172
  case REACT_PROFILER_TYPE:
1175
1173
  return "Profiler";
1176
1174
  case REACT_STRICT_MODE_TYPE:
@@ -1179,6 +1177,8 @@ function requireReactJsxRuntime_development () {
1179
1177
  return "Suspense";
1180
1178
  case REACT_SUSPENSE_LIST_TYPE:
1181
1179
  return "SuspenseList";
1180
+ case REACT_ACTIVITY_TYPE:
1181
+ return "Activity";
1182
1182
  }
1183
1183
  if ("object" === typeof type)
1184
1184
  switch (
@@ -1188,6 +1188,8 @@ function requireReactJsxRuntime_development () {
1188
1188
  ),
1189
1189
  type.$$typeof)
1190
1190
  ) {
1191
+ case REACT_PORTAL_TYPE:
1192
+ return "Portal";
1191
1193
  case REACT_CONTEXT_TYPE:
1192
1194
  return (type.displayName || "Context") + ".Provider";
1193
1195
  case REACT_CONSUMER_TYPE:
@@ -1242,260 +1244,28 @@ function requireReactJsxRuntime_development () {
1242
1244
  return testStringCoercion(value);
1243
1245
  }
1244
1246
  }
1245
- function disabledLog() {}
1246
- function disableLogs() {
1247
- if (0 === disabledDepth) {
1248
- prevLog = console.log;
1249
- prevInfo = console.info;
1250
- prevWarn = console.warn;
1251
- prevError = console.error;
1252
- prevGroup = console.group;
1253
- prevGroupCollapsed = console.groupCollapsed;
1254
- prevGroupEnd = console.groupEnd;
1255
- var props = {
1256
- configurable: true,
1257
- enumerable: true,
1258
- value: disabledLog,
1259
- writable: true
1260
- };
1261
- Object.defineProperties(console, {
1262
- info: props,
1263
- log: props,
1264
- warn: props,
1265
- error: props,
1266
- group: props,
1267
- groupCollapsed: props,
1268
- groupEnd: props
1269
- });
1270
- }
1271
- disabledDepth++;
1272
- }
1273
- function reenableLogs() {
1274
- disabledDepth--;
1275
- if (0 === disabledDepth) {
1276
- var props = { configurable: true, enumerable: true, writable: true };
1277
- Object.defineProperties(console, {
1278
- log: assign({}, props, { value: prevLog }),
1279
- info: assign({}, props, { value: prevInfo }),
1280
- warn: assign({}, props, { value: prevWarn }),
1281
- error: assign({}, props, { value: prevError }),
1282
- group: assign({}, props, { value: prevGroup }),
1283
- groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
1284
- groupEnd: assign({}, props, { value: prevGroupEnd })
1285
- });
1286
- }
1287
- 0 > disabledDepth &&
1288
- console.error(
1289
- "disabledDepth fell below zero. This is a bug in React. Please file an issue."
1290
- );
1291
- }
1292
- function describeBuiltInComponentFrame(name) {
1293
- if (void 0 === prefix)
1294
- try {
1295
- throw Error();
1296
- } catch (x) {
1297
- var match = x.stack.trim().match(/\n( *(at )?)/);
1298
- prefix = (match && match[1]) || "";
1299
- suffix =
1300
- -1 < x.stack.indexOf("\n at")
1301
- ? " (<anonymous>)"
1302
- : -1 < x.stack.indexOf("@")
1303
- ? "@unknown:0:0"
1304
- : "";
1305
- }
1306
- return "\n" + prefix + name + suffix;
1307
- }
1308
- function describeNativeComponentFrame(fn, construct) {
1309
- if (!fn || reentry) return "";
1310
- var frame = componentFrameCache.get(fn);
1311
- if (void 0 !== frame) return frame;
1312
- reentry = true;
1313
- frame = Error.prepareStackTrace;
1314
- Error.prepareStackTrace = void 0;
1315
- var previousDispatcher = null;
1316
- previousDispatcher = ReactSharedInternals.H;
1317
- ReactSharedInternals.H = null;
1318
- disableLogs();
1247
+ function getTaskName(type) {
1248
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
1249
+ if (
1250
+ "object" === typeof type &&
1251
+ null !== type &&
1252
+ type.$$typeof === REACT_LAZY_TYPE
1253
+ )
1254
+ return "<...>";
1319
1255
  try {
1320
- var RunInRootFrame = {
1321
- DetermineComponentFrameRoot: function () {
1322
- try {
1323
- if (construct) {
1324
- var Fake = function () {
1325
- throw Error();
1326
- };
1327
- Object.defineProperty(Fake.prototype, "props", {
1328
- set: function () {
1329
- throw Error();
1330
- }
1331
- });
1332
- if ("object" === typeof Reflect && Reflect.construct) {
1333
- try {
1334
- Reflect.construct(Fake, []);
1335
- } catch (x) {
1336
- var control = x;
1337
- }
1338
- Reflect.construct(fn, [], Fake);
1339
- } else {
1340
- try {
1341
- Fake.call();
1342
- } catch (x$0) {
1343
- control = x$0;
1344
- }
1345
- fn.call(Fake.prototype);
1346
- }
1347
- } else {
1348
- try {
1349
- throw Error();
1350
- } catch (x$1) {
1351
- control = x$1;
1352
- }
1353
- (Fake = fn()) &&
1354
- "function" === typeof Fake.catch &&
1355
- Fake.catch(function () {});
1356
- }
1357
- } catch (sample) {
1358
- if (sample && control && "string" === typeof sample.stack)
1359
- return [sample.stack, control.stack];
1360
- }
1361
- return [null, null];
1362
- }
1363
- };
1364
- RunInRootFrame.DetermineComponentFrameRoot.displayName =
1365
- "DetermineComponentFrameRoot";
1366
- var namePropDescriptor = Object.getOwnPropertyDescriptor(
1367
- RunInRootFrame.DetermineComponentFrameRoot,
1368
- "name"
1369
- );
1370
- namePropDescriptor &&
1371
- namePropDescriptor.configurable &&
1372
- Object.defineProperty(
1373
- RunInRootFrame.DetermineComponentFrameRoot,
1374
- "name",
1375
- { value: "DetermineComponentFrameRoot" }
1376
- );
1377
- var _RunInRootFrame$Deter =
1378
- RunInRootFrame.DetermineComponentFrameRoot(),
1379
- sampleStack = _RunInRootFrame$Deter[0],
1380
- controlStack = _RunInRootFrame$Deter[1];
1381
- if (sampleStack && controlStack) {
1382
- var sampleLines = sampleStack.split("\n"),
1383
- controlLines = controlStack.split("\n");
1384
- for (
1385
- _RunInRootFrame$Deter = namePropDescriptor = 0;
1386
- namePropDescriptor < sampleLines.length &&
1387
- !sampleLines[namePropDescriptor].includes(
1388
- "DetermineComponentFrameRoot"
1389
- );
1390
-
1391
- )
1392
- namePropDescriptor++;
1393
- for (
1394
- ;
1395
- _RunInRootFrame$Deter < controlLines.length &&
1396
- !controlLines[_RunInRootFrame$Deter].includes(
1397
- "DetermineComponentFrameRoot"
1398
- );
1399
-
1400
- )
1401
- _RunInRootFrame$Deter++;
1402
- if (
1403
- namePropDescriptor === sampleLines.length ||
1404
- _RunInRootFrame$Deter === controlLines.length
1405
- )
1406
- for (
1407
- namePropDescriptor = sampleLines.length - 1,
1408
- _RunInRootFrame$Deter = controlLines.length - 1;
1409
- 1 <= namePropDescriptor &&
1410
- 0 <= _RunInRootFrame$Deter &&
1411
- sampleLines[namePropDescriptor] !==
1412
- controlLines[_RunInRootFrame$Deter];
1413
-
1414
- )
1415
- _RunInRootFrame$Deter--;
1416
- for (
1417
- ;
1418
- 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;
1419
- namePropDescriptor--, _RunInRootFrame$Deter--
1420
- )
1421
- if (
1422
- sampleLines[namePropDescriptor] !==
1423
- controlLines[_RunInRootFrame$Deter]
1424
- ) {
1425
- if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
1426
- do
1427
- if (
1428
- (namePropDescriptor--,
1429
- _RunInRootFrame$Deter--,
1430
- 0 > _RunInRootFrame$Deter ||
1431
- sampleLines[namePropDescriptor] !==
1432
- controlLines[_RunInRootFrame$Deter])
1433
- ) {
1434
- var _frame =
1435
- "\n" +
1436
- sampleLines[namePropDescriptor].replace(
1437
- " at new ",
1438
- " at "
1439
- );
1440
- fn.displayName &&
1441
- _frame.includes("<anonymous>") &&
1442
- (_frame = _frame.replace("<anonymous>", fn.displayName));
1443
- "function" === typeof fn &&
1444
- componentFrameCache.set(fn, _frame);
1445
- return _frame;
1446
- }
1447
- while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
1448
- }
1449
- break;
1450
- }
1451
- }
1452
- } finally {
1453
- (reentry = false),
1454
- (ReactSharedInternals.H = previousDispatcher),
1455
- reenableLogs(),
1456
- (Error.prepareStackTrace = frame);
1256
+ var name = getComponentNameFromType(type);
1257
+ return name ? "<" + name + ">" : "<...>";
1258
+ } catch (x) {
1259
+ return "<...>";
1457
1260
  }
1458
- sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "")
1459
- ? describeBuiltInComponentFrame(sampleLines)
1460
- : "";
1461
- "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
1462
- return sampleLines;
1463
- }
1464
- function describeUnknownElementTypeFrameInDEV(type) {
1465
- if (null == type) return "";
1466
- if ("function" === typeof type) {
1467
- var prototype = type.prototype;
1468
- return describeNativeComponentFrame(
1469
- type,
1470
- !(!prototype || !prototype.isReactComponent)
1471
- );
1472
- }
1473
- if ("string" === typeof type) return describeBuiltInComponentFrame(type);
1474
- switch (type) {
1475
- case REACT_SUSPENSE_TYPE:
1476
- return describeBuiltInComponentFrame("Suspense");
1477
- case REACT_SUSPENSE_LIST_TYPE:
1478
- return describeBuiltInComponentFrame("SuspenseList");
1479
- }
1480
- if ("object" === typeof type)
1481
- switch (type.$$typeof) {
1482
- case REACT_FORWARD_REF_TYPE:
1483
- return (type = describeNativeComponentFrame(type.render, false)), type;
1484
- case REACT_MEMO_TYPE:
1485
- return describeUnknownElementTypeFrameInDEV(type.type);
1486
- case REACT_LAZY_TYPE:
1487
- prototype = type._payload;
1488
- type = type._init;
1489
- try {
1490
- return describeUnknownElementTypeFrameInDEV(type(prototype));
1491
- } catch (x) {}
1492
- }
1493
- return "";
1494
1261
  }
1495
1262
  function getOwner() {
1496
1263
  var dispatcher = ReactSharedInternals.A;
1497
1264
  return null === dispatcher ? null : dispatcher.getOwner();
1498
1265
  }
1266
+ function UnknownOwner() {
1267
+ return Error("react-stack-top-frame");
1268
+ }
1499
1269
  function hasValidKey(config) {
1500
1270
  if (hasOwnProperty.call(config, "key")) {
1501
1271
  var getter = Object.getOwnPropertyDescriptor(config, "key").get;
@@ -1528,7 +1298,16 @@ function requireReactJsxRuntime_development () {
1528
1298
  componentName = this.props.ref;
1529
1299
  return void 0 !== componentName ? componentName : null;
1530
1300
  }
1531
- function ReactElement(type, key, self, source, owner, props) {
1301
+ function ReactElement(
1302
+ type,
1303
+ key,
1304
+ self,
1305
+ source,
1306
+ owner,
1307
+ props,
1308
+ debugStack,
1309
+ debugTask
1310
+ ) {
1532
1311
  self = props.ref;
1533
1312
  type = {
1534
1313
  $$typeof: REACT_ELEMENT_TYPE,
@@ -1556,6 +1335,18 @@ function requireReactJsxRuntime_development () {
1556
1335
  writable: true,
1557
1336
  value: null
1558
1337
  });
1338
+ Object.defineProperty(type, "_debugStack", {
1339
+ configurable: false,
1340
+ enumerable: false,
1341
+ writable: true,
1342
+ value: debugStack
1343
+ });
1344
+ Object.defineProperty(type, "_debugTask", {
1345
+ configurable: false,
1346
+ enumerable: false,
1347
+ writable: true,
1348
+ value: debugTask
1349
+ });
1559
1350
  Object.freeze && (Object.freeze(type.props), Object.freeze(type));
1560
1351
  return type;
1561
1352
  }
@@ -1565,71 +1356,26 @@ function requireReactJsxRuntime_development () {
1565
1356
  maybeKey,
1566
1357
  isStaticChildren,
1567
1358
  source,
1568
- self
1359
+ self,
1360
+ debugStack,
1361
+ debugTask
1569
1362
  ) {
1570
- if (
1571
- "string" === typeof type ||
1572
- "function" === typeof type ||
1573
- type === REACT_FRAGMENT_TYPE ||
1574
- type === REACT_PROFILER_TYPE ||
1575
- type === REACT_STRICT_MODE_TYPE ||
1576
- type === REACT_SUSPENSE_TYPE ||
1577
- type === REACT_SUSPENSE_LIST_TYPE ||
1578
- type === REACT_OFFSCREEN_TYPE ||
1579
- ("object" === typeof type &&
1580
- null !== type &&
1581
- (type.$$typeof === REACT_LAZY_TYPE ||
1582
- type.$$typeof === REACT_MEMO_TYPE ||
1583
- type.$$typeof === REACT_CONTEXT_TYPE ||
1584
- type.$$typeof === REACT_CONSUMER_TYPE ||
1585
- type.$$typeof === REACT_FORWARD_REF_TYPE ||
1586
- type.$$typeof === REACT_CLIENT_REFERENCE$1 ||
1587
- void 0 !== type.getModuleId))
1588
- ) {
1589
- var children = config.children;
1590
- if (void 0 !== children)
1591
- if (isStaticChildren)
1592
- if (isArrayImpl(children)) {
1593
- for (
1594
- isStaticChildren = 0;
1595
- isStaticChildren < children.length;
1596
- isStaticChildren++
1597
- )
1598
- validateChildKeys(children[isStaticChildren], type);
1599
- Object.freeze && Object.freeze(children);
1600
- } else
1601
- console.error(
1602
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
1603
- );
1604
- else validateChildKeys(children, type);
1605
- } else {
1606
- children = "";
1607
- if (
1608
- void 0 === type ||
1609
- ("object" === typeof type &&
1610
- null !== type &&
1611
- 0 === Object.keys(type).length)
1612
- )
1613
- children +=
1614
- " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
1615
- null === type
1616
- ? (isStaticChildren = "null")
1617
- : isArrayImpl(type)
1618
- ? (isStaticChildren = "array")
1619
- : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE
1620
- ? ((isStaticChildren =
1621
- "<" +
1622
- (getComponentNameFromType(type.type) || "Unknown") +
1623
- " />"),
1624
- (children =
1625
- " Did you accidentally export a JSX literal instead of a component?"))
1626
- : (isStaticChildren = typeof type);
1627
- console.error(
1628
- "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
1629
- isStaticChildren,
1630
- children
1631
- );
1632
- }
1363
+ var children = config.children;
1364
+ if (void 0 !== children)
1365
+ if (isStaticChildren)
1366
+ if (isArrayImpl(children)) {
1367
+ for (
1368
+ isStaticChildren = 0;
1369
+ isStaticChildren < children.length;
1370
+ isStaticChildren++
1371
+ )
1372
+ validateChildKeys(children[isStaticChildren]);
1373
+ Object.freeze && Object.freeze(children);
1374
+ } else
1375
+ console.error(
1376
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
1377
+ );
1378
+ else validateChildKeys(children);
1633
1379
  if (hasOwnProperty.call(config, "key")) {
1634
1380
  children = getComponentNameFromType(type);
1635
1381
  var keys = Object.keys(config).filter(function (k) {
@@ -1668,88 +1414,23 @@ function requireReactJsxRuntime_development () {
1668
1414
  ? type.displayName || type.name || "Unknown"
1669
1415
  : type
1670
1416
  );
1671
- return ReactElement(type, children, self, source, getOwner(), maybeKey);
1672
- }
1673
- function validateChildKeys(node, parentType) {
1674
- if (
1675
- "object" === typeof node &&
1676
- node &&
1677
- node.$$typeof !== REACT_CLIENT_REFERENCE
1678
- )
1679
- if (isArrayImpl(node))
1680
- for (var i = 0; i < node.length; i++) {
1681
- var child = node[i];
1682
- isValidElement(child) && validateExplicitKey(child, parentType);
1683
- }
1684
- else if (isValidElement(node))
1685
- node._store && (node._store.validated = 1);
1686
- else if (
1687
- (null === node || "object" !== typeof node
1688
- ? (i = null)
1689
- : ((i =
1690
- (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
1691
- node["@@iterator"]),
1692
- (i = "function" === typeof i ? i : null)),
1693
- "function" === typeof i &&
1694
- i !== node.entries &&
1695
- ((i = i.call(node)), i !== node))
1696
- )
1697
- for (; !(node = i.next()).done; )
1698
- isValidElement(node.value) &&
1699
- validateExplicitKey(node.value, parentType);
1700
- }
1701
- function isValidElement(object) {
1702
- return (
1703
- "object" === typeof object &&
1704
- null !== object &&
1705
- object.$$typeof === REACT_ELEMENT_TYPE
1417
+ return ReactElement(
1418
+ type,
1419
+ children,
1420
+ self,
1421
+ source,
1422
+ getOwner(),
1423
+ maybeKey,
1424
+ debugStack,
1425
+ debugTask
1706
1426
  );
1707
1427
  }
1708
- function validateExplicitKey(element, parentType) {
1709
- if (
1710
- element._store &&
1711
- !element._store.validated &&
1712
- null == element.key &&
1713
- ((element._store.validated = 1),
1714
- (parentType = getCurrentComponentErrorInfo(parentType)),
1715
- !ownerHasKeyUseWarning[parentType])
1716
- ) {
1717
- ownerHasKeyUseWarning[parentType] = true;
1718
- var childOwner = "";
1719
- element &&
1720
- null != element._owner &&
1721
- element._owner !== getOwner() &&
1722
- ((childOwner = null),
1723
- "number" === typeof element._owner.tag
1724
- ? (childOwner = getComponentNameFromType(element._owner.type))
1725
- : "string" === typeof element._owner.name &&
1726
- (childOwner = element._owner.name),
1727
- (childOwner = " It was passed a child from " + childOwner + "."));
1728
- var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
1729
- ReactSharedInternals.getCurrentStack = function () {
1730
- var stack = describeUnknownElementTypeFrameInDEV(element.type);
1731
- prevGetCurrentStack && (stack += prevGetCurrentStack() || "");
1732
- return stack;
1733
- };
1734
- console.error(
1735
- 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
1736
- parentType,
1737
- childOwner
1738
- );
1739
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
1740
- }
1741
- }
1742
- function getCurrentComponentErrorInfo(parentType) {
1743
- var info = "",
1744
- owner = getOwner();
1745
- owner &&
1746
- (owner = getComponentNameFromType(owner.type)) &&
1747
- (info = "\n\nCheck the render method of `" + owner + "`.");
1748
- info ||
1749
- ((parentType = getComponentNameFromType(parentType)) &&
1750
- (info =
1751
- "\n\nCheck the top-level render call using <" + parentType + ">."));
1752
- return info;
1428
+ function validateChildKeys(node) {
1429
+ "object" === typeof node &&
1430
+ null !== node &&
1431
+ node.$$typeof === REACT_ELEMENT_TYPE &&
1432
+ node._store &&
1433
+ (node._store.validated = 1);
1753
1434
  }
1754
1435
  var React$1 = React,
1755
1436
  REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
@@ -1764,41 +1445,62 @@ function requireReactJsxRuntime_development () {
1764
1445
  REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
1765
1446
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
1766
1447
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
1767
- REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
1768
- MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
1769
- REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"),
1448
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
1449
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
1770
1450
  ReactSharedInternals =
1771
1451
  React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
1772
1452
  hasOwnProperty = Object.prototype.hasOwnProperty,
1773
- assign = Object.assign,
1774
- REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"),
1775
1453
  isArrayImpl = Array.isArray,
1776
- disabledDepth = 0,
1777
- prevLog,
1778
- prevInfo,
1779
- prevWarn,
1780
- prevError,
1781
- prevGroup,
1782
- prevGroupCollapsed,
1783
- prevGroupEnd;
1784
- disabledLog.__reactDisabledLog = true;
1785
- var prefix,
1786
- suffix,
1787
- reentry = false;
1788
- var componentFrameCache = new (
1789
- "function" === typeof WeakMap ? WeakMap : Map
1790
- )();
1791
- var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
1792
- specialPropKeyWarningShown;
1454
+ createTask = console.createTask
1455
+ ? console.createTask
1456
+ : function () {
1457
+ return null;
1458
+ };
1459
+ React$1 = {
1460
+ "react-stack-bottom-frame": function (callStackForError) {
1461
+ return callStackForError();
1462
+ }
1463
+ };
1464
+ var specialPropKeyWarningShown;
1793
1465
  var didWarnAboutElementRef = {};
1794
- var didWarnAboutKeySpread = {},
1795
- ownerHasKeyUseWarning = {};
1466
+ var unknownOwnerDebugStack = React$1["react-stack-bottom-frame"].bind(
1467
+ React$1,
1468
+ UnknownOwner
1469
+ )();
1470
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1471
+ var didWarnAboutKeySpread = {};
1796
1472
  reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
1797
1473
  reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
1798
- return jsxDEVImpl(type, config, maybeKey, false, source, self);
1474
+ var trackActualOwner =
1475
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1476
+ return jsxDEVImpl(
1477
+ type,
1478
+ config,
1479
+ maybeKey,
1480
+ false,
1481
+ source,
1482
+ self,
1483
+ trackActualOwner
1484
+ ? Error("react-stack-top-frame")
1485
+ : unknownOwnerDebugStack,
1486
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1487
+ );
1799
1488
  };
1800
1489
  reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
1801
- return jsxDEVImpl(type, config, maybeKey, true, source, self);
1490
+ var trackActualOwner =
1491
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1492
+ return jsxDEVImpl(
1493
+ type,
1494
+ config,
1495
+ maybeKey,
1496
+ true,
1497
+ source,
1498
+ self,
1499
+ trackActualOwner
1500
+ ? Error("react-stack-top-frame")
1501
+ : unknownOwnerDebugStack,
1502
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1503
+ );
1802
1504
  };
1803
1505
  })();
1804
1506
  return reactJsxRuntime_development;
@@ -5628,11 +5330,12 @@ function getFitViewNodes(nodeLookup, options) {
5628
5330
  });
5629
5331
  return fitViewNodes;
5630
5332
  }
5631
- async function fitView({ nodes, width, height, panZoom, minZoom, maxZoom }, options) {
5333
+ async function fitViewport({ nodes, width, height, panZoom, minZoom, maxZoom }, options) {
5632
5334
  if (nodes.size === 0) {
5633
- return Promise.resolve(false);
5335
+ return Promise.resolve(true);
5634
5336
  }
5635
- const bounds = getInternalNodesBounds(nodes);
5337
+ const nodesToFit = getFitViewNodes(nodes, options);
5338
+ const bounds = getInternalNodesBounds(nodesToFit);
5636
5339
  const viewport = getViewportForBounds(bounds, width, height, options?.minZoom ?? minZoom, options?.maxZoom ?? maxZoom, options?.padding ?? 0.1);
5637
5340
  await panZoom.setViewport(viewport, { duration: options?.duration });
5638
5341
  return Promise.resolve(true);
@@ -5843,6 +5546,85 @@ const rendererPointToPoint = ({ x, y }, [tx, ty, tScale]) => {
5843
5546
  y: y * tScale + ty,
5844
5547
  };
5845
5548
  };
5549
+ /**
5550
+ * Parses a single padding value to a number
5551
+ * @internal
5552
+ * @param padding - Padding to parse
5553
+ * @param viewport - Width or height of the viewport
5554
+ * @returns The padding in pixels
5555
+ */
5556
+ function parsePadding(padding, viewport) {
5557
+ if (typeof padding === 'number') {
5558
+ return Math.floor(viewport - viewport / (1 + padding));
5559
+ }
5560
+ if (typeof padding === 'string' && padding.endsWith('px')) {
5561
+ const paddingValue = parseFloat(padding);
5562
+ if (!Number.isNaN(paddingValue)) {
5563
+ return Math.floor(paddingValue);
5564
+ }
5565
+ }
5566
+ if (typeof padding === 'string' && padding.endsWith('%')) {
5567
+ const paddingValue = parseFloat(padding);
5568
+ if (!Number.isNaN(paddingValue)) {
5569
+ return Math.floor(viewport * paddingValue * 0.01);
5570
+ }
5571
+ }
5572
+ console.error(`[React Flow] The padding value "${padding}" is invalid. Please provide a number or a string with a valid unit (px or %).`);
5573
+ return 0;
5574
+ }
5575
+ /**
5576
+ * Parses the paddings to an object with top, right, bottom, left, x and y paddings
5577
+ * @internal
5578
+ * @param padding - Padding to parse
5579
+ * @param width - Width of the viewport
5580
+ * @param height - Height of the viewport
5581
+ * @returns An object with the paddings in pixels
5582
+ */
5583
+ function parsePaddings(padding, width, height) {
5584
+ if (typeof padding === 'string' || typeof padding === 'number') {
5585
+ const paddingY = parsePadding(padding, height);
5586
+ const paddingX = parsePadding(padding, width);
5587
+ return {
5588
+ top: paddingY,
5589
+ right: paddingX,
5590
+ bottom: paddingY,
5591
+ left: paddingX,
5592
+ x: paddingX * 2,
5593
+ y: paddingY * 2,
5594
+ };
5595
+ }
5596
+ if (typeof padding === 'object') {
5597
+ const top = parsePadding(padding.top ?? padding.y ?? 0, height);
5598
+ const bottom = parsePadding(padding.bottom ?? padding.y ?? 0, height);
5599
+ const left = parsePadding(padding.left ?? padding.x ?? 0, width);
5600
+ const right = parsePadding(padding.right ?? padding.x ?? 0, width);
5601
+ return { top, right, bottom, left, x: left + right, y: top + bottom };
5602
+ }
5603
+ return { top: 0, right: 0, bottom: 0, left: 0, x: 0, y: 0 };
5604
+ }
5605
+ /**
5606
+ * Calculates the resulting paddings if the new viewport is applied
5607
+ * @internal
5608
+ * @param bounds - Bounds to fit inside viewport
5609
+ * @param x - X position of the viewport
5610
+ * @param y - Y position of the viewport
5611
+ * @param zoom - Zoom level of the viewport
5612
+ * @param width - Width of the viewport
5613
+ * @param height - Height of the viewport
5614
+ * @returns An object with the minimum padding required to fit the bounds inside the viewport
5615
+ */
5616
+ function calculateAppliedPaddings(bounds, x, y, zoom, width, height) {
5617
+ const { x: left, y: top } = rendererPointToPoint(bounds, [x, y, zoom]);
5618
+ const { x: boundRight, y: boundBottom } = rendererPointToPoint({ x: bounds.x + bounds.width, y: bounds.y + bounds.height }, [x, y, zoom]);
5619
+ const right = width - boundRight;
5620
+ const bottom = height - boundBottom;
5621
+ return {
5622
+ left: Math.floor(left),
5623
+ top: Math.floor(top),
5624
+ right: Math.floor(right),
5625
+ bottom: Math.floor(bottom),
5626
+ };
5627
+ }
5846
5628
  /**
5847
5629
  * Returns a viewport that encloses the given bounds with optional padding.
5848
5630
  * @public
@@ -5856,19 +5638,35 @@ const rendererPointToPoint = ({ x, y }, [tx, ty, tScale]) => {
5856
5638
  * @returns A transforned {@link Viewport} that encloses the given bounds which you can pass to e.g. {@link setViewport}
5857
5639
  * @example
5858
5640
  * const { x, y, zoom } = getViewportForBounds(
5859
- *{ x: 0, y: 0, width: 100, height: 100},
5860
- *1200, 800, 0.5, 2);
5641
+ * { x: 0, y: 0, width: 100, height: 100},
5642
+ * 1200, 800, 0.5, 2);
5861
5643
  */
5862
5644
  const getViewportForBounds = (bounds, width, height, minZoom, maxZoom, padding) => {
5863
- const xZoom = width / (bounds.width * (1 + padding));
5864
- const yZoom = height / (bounds.height * (1 + padding));
5645
+ // First we resolve all the paddings to actual pixel values
5646
+ const p = parsePaddings(padding, width, height);
5647
+ const xZoom = (width - p.x) / bounds.width;
5648
+ const yZoom = (height - p.y) / bounds.height;
5649
+ // We calculate the new x, y, zoom for a centered view
5865
5650
  const zoom = Math.min(xZoom, yZoom);
5866
5651
  const clampedZoom = clamp(zoom, minZoom, maxZoom);
5867
5652
  const boundsCenterX = bounds.x + bounds.width / 2;
5868
5653
  const boundsCenterY = bounds.y + bounds.height / 2;
5869
5654
  const x = width / 2 - boundsCenterX * clampedZoom;
5870
5655
  const y = height / 2 - boundsCenterY * clampedZoom;
5871
- return { x, y, zoom: clampedZoom };
5656
+ // Then we calculate the minimum padding, to respect asymmetric paddings
5657
+ const newPadding = calculateAppliedPaddings(bounds, x, y, clampedZoom, width, height);
5658
+ // We only want to have an offset if the newPadding is smaller than the required padding
5659
+ const offset = {
5660
+ left: Math.min(newPadding.left - p.left, 0),
5661
+ top: Math.min(newPadding.top - p.top, 0),
5662
+ right: Math.min(newPadding.right - p.right, 0),
5663
+ bottom: Math.min(newPadding.bottom - p.bottom, 0),
5664
+ };
5665
+ return {
5666
+ x: x - offset.left + offset.right,
5667
+ y: y - offset.top + offset.bottom,
5668
+ zoom: clampedZoom,
5669
+ };
5872
5670
  };
5873
5671
  const isMacOs = () => typeof navigator !== 'undefined' && navigator?.userAgent?.indexOf('Mac') >= 0;
5874
5672
  function isCoordinateExtent(extent) {
@@ -6532,6 +6330,7 @@ function updateAbsolutePositions(nodeLookup, parentLookup, options) {
6532
6330
  }
6533
6331
  function adoptUserNodes(nodes, nodeLookup, parentLookup, options) {
6534
6332
  const _options = mergeObjects(adoptUserNodesDefaultOptions, options);
6333
+ let nodesInitialized = true;
6535
6334
  const tmpLookup = new Map(nodeLookup);
6536
6335
  const selectedNodeZ = _options?.elevateNodesOnSelect ? 1000 : 0;
6537
6336
  nodeLookup.clear();
@@ -6562,10 +6361,15 @@ function adoptUserNodes(nodes, nodeLookup, parentLookup, options) {
6562
6361
  };
6563
6362
  nodeLookup.set(userNode.id, internalNode);
6564
6363
  }
6364
+ if ((!internalNode.measured || !internalNode.measured.width || !internalNode.measured.height) &&
6365
+ !internalNode.hidden) {
6366
+ nodesInitialized = false;
6367
+ }
6565
6368
  if (userNode.parentId) {
6566
6369
  updateChildNode(internalNode, nodeLookup, parentLookup, options);
6567
6370
  }
6568
6371
  }
6372
+ return nodesInitialized;
6569
6373
  }
6570
6374
  function updateParentLookup(node, parentLookup) {
6571
6375
  if (!node.parentId) {
@@ -8907,9 +8711,9 @@ function StoreUpdater(props) {
8907
8711
  setPaneClickDistance(fieldValue);
8908
8712
  // Renamed fields
8909
8713
  else if (fieldName === 'fitView')
8910
- store.setState({ fitViewOnInit: fieldValue });
8714
+ store.setState({ fitViewQueued: fieldValue });
8911
8715
  else if (fieldName === 'fitViewOptions')
8912
- store.setState({ fitViewOnInitOptions: fieldValue });
8716
+ store.setState({ fitViewOptions: fieldValue });
8913
8717
  // General case
8914
8718
  else
8915
8719
  store.setState({ [fieldName]: fieldValue });
@@ -9019,7 +8823,7 @@ keyCode = null, options = { target: defaultDoc, actInsideInputWithModifier: true
9019
8823
  const target = options?.target || defaultDoc;
9020
8824
  if (keyCode !== null) {
9021
8825
  const downHandler = (event) => {
9022
- modifierPressed.current = event.ctrlKey || event.metaKey || event.shiftKey;
8826
+ modifierPressed.current = event.ctrlKey || event.metaKey || event.shiftKey || event.altKey;
9023
8827
  const preventAction = (!modifierPressed.current || (modifierPressed.current && !options.actInsideInputWithModifier)) &&
9024
8828
  isInputDOMNode(event);
9025
8829
  if (preventAction) {
@@ -9028,16 +8832,15 @@ keyCode = null, options = { target: defaultDoc, actInsideInputWithModifier: true
9028
8832
  const keyOrCode = useKeyOrCode(event.code, keysToWatch);
9029
8833
  pressedKeys.current.add(event[keyOrCode]);
9030
8834
  if (isMatchingKey(keyCodes, pressedKeys.current, false)) {
9031
- event.preventDefault();
8835
+ const target = (event.composedPath?.()?.[0] || event.target);
8836
+ const isInteractiveElement = target?.nodeName === 'BUTTON' || target?.nodeName === 'A';
8837
+ if (options.preventDefault !== false && (modifierPressed.current || !isInteractiveElement)) {
8838
+ event.preventDefault();
8839
+ }
9032
8840
  setKeyPressed(true);
9033
8841
  }
9034
8842
  };
9035
8843
  const upHandler = (event) => {
9036
- const preventAction = (!modifierPressed.current || (modifierPressed.current && !options.actInsideInputWithModifier)) &&
9037
- isInputDOMNode(event);
9038
- if (preventAction) {
9039
- return false;
9040
- }
9041
8844
  const keyOrCode = useKeyOrCode(event.code, keysToWatch);
9042
8845
  if (isMatchingKey(keyCodes, pressedKeys.current, true)) {
9043
8846
  setKeyPressed(false);
@@ -9128,22 +8931,6 @@ const useViewportHelper = () => {
9128
8931
  const [x, y, zoom] = store.getState().transform;
9129
8932
  return { x, y, zoom };
9130
8933
  },
9131
- fitView: (options) => {
9132
- const { nodeLookup, minZoom, maxZoom, panZoom, domNode } = store.getState();
9133
- if (!panZoom || !domNode) {
9134
- return Promise.resolve(false);
9135
- }
9136
- const fitViewNodes = getFitViewNodes(nodeLookup, options);
9137
- const { width, height } = getDimensions(domNode);
9138
- return fitView({
9139
- nodes: fitViewNodes,
9140
- width,
9141
- height,
9142
- minZoom,
9143
- maxZoom,
9144
- panZoom,
9145
- }, options);
9146
- },
9147
8934
  setCenter: async (x, y, options) => {
9148
8935
  const { width, height, maxZoom, panZoom } = store.getState();
9149
8936
  const nextZoom = typeof options?.zoom !== 'undefined' ? options.zoom : maxZoom;
@@ -9547,7 +9334,7 @@ const BatchContext = createContext(null);
9547
9334
  function BatchProvider({ children, }) {
9548
9335
  const store = useStoreApi();
9549
9336
  const nodeQueueHandler = useCallback((queueItems) => {
9550
- const { nodes = [], setNodes, hasDefaultNodes, onNodesChange, nodeLookup } = store.getState();
9337
+ const { nodes = [], setNodes, hasDefaultNodes, onNodesChange, nodeLookup, fitViewQueued } = store.getState();
9551
9338
  /*
9552
9339
  * This is essentially an `Array.reduce` in imperative clothing. Processing
9553
9340
  * this queue is a relatively hot path so we'd like to avoid the overhead of
@@ -9560,11 +9347,26 @@ function BatchProvider({ children, }) {
9560
9347
  if (hasDefaultNodes) {
9561
9348
  setNodes(next);
9562
9349
  }
9563
- else if (onNodesChange) {
9564
- onNodesChange(getElementsDiffChanges({
9350
+ else {
9351
+ // When a controlled flow is used we need to collect the changes
9352
+ const changes = getElementsDiffChanges({
9565
9353
  items: next,
9566
9354
  lookup: nodeLookup,
9567
- }));
9355
+ });
9356
+ // We only want to fire onNodesChange if there are changes to the nodes
9357
+ if (changes.length > 0) {
9358
+ onNodesChange?.(changes);
9359
+ }
9360
+ else if (fitViewQueued) {
9361
+ // If there are no changes to the nodes, we still need to call setNodes
9362
+ // to trigger a re-render and fitView.
9363
+ window.requestAnimationFrame(() => {
9364
+ const { fitViewQueued, nodes, setNodes } = store.getState();
9365
+ if (fitViewQueued) {
9366
+ setNodes(nodes);
9367
+ }
9368
+ });
9369
+ }
9568
9370
  }
9569
9371
  }, []);
9570
9372
  const nodeQueue = useQueue(nodeQueueHandler);
@@ -9783,6 +9585,15 @@ function useReactFlow() {
9783
9585
  .getState()
9784
9586
  .connectionLookup.get(`${nodeId}${type ? (handleId ? `-${type}-${handleId}` : `-${type}`) : ''}`)
9785
9587
  ?.values() ?? []),
9588
+ fitView: async (options) => {
9589
+ // We either create a new Promise or reuse the existing one
9590
+ // Even if fitView is called multiple times in a row, we only end up with a single Promise
9591
+ const fitViewResolver = store.getState().fitViewResolver ?? Promise.withResolvers();
9592
+ // We schedule a fitView by setting fitViewQueued and triggering a setNodes
9593
+ store.setState({ fitViewQueued: true, fitViewOptions: options, fitViewResolver });
9594
+ batchContext.nodeQueue.push((nodes) => [...nodes]);
9595
+ return fitViewResolver.promise;
9596
+ },
9786
9597
  };
9787
9598
  }, []);
9788
9599
  return useMemo(() => {
@@ -9980,11 +9791,12 @@ const wrapHandler = (handler, containerRef) => {
9980
9791
  const selector$h = (s) => ({
9981
9792
  userSelectionActive: s.userSelectionActive,
9982
9793
  elementsSelectable: s.elementsSelectable,
9794
+ connectionInProgress: s.connection.inProgress,
9983
9795
  dragging: s.paneDragging,
9984
9796
  });
9985
9797
  function Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.Full, panOnDrag, selectionOnDrag, onSelectionStart, onSelectionEnd, onPaneClick, onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, children, }) {
9986
9798
  const store = useStoreApi();
9987
- const { userSelectionActive, elementsSelectable, dragging } = useStore(selector$h, shallow$1);
9799
+ const { userSelectionActive, elementsSelectable, dragging, connectionInProgress } = useStore(selector$h, shallow$1);
9988
9800
  const hasActiveSelection = elementsSelectable && (isSelecting || userSelectionActive);
9989
9801
  const container = useRef(null);
9990
9802
  const containerBounds = useRef();
@@ -9995,7 +9807,8 @@ function Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.
9995
9807
  const selectionStarted = useRef(false);
9996
9808
  const onClick = (event) => {
9997
9809
  // We prevent click events when the user let go of the selectionKey during a selection
9998
- if (selectionInProgress.current) {
9810
+ // We also prevent click events when a connection is in progress
9811
+ if (selectionInProgress.current || connectionInProgress) {
9999
9812
  selectionInProgress.current = false;
10000
9813
  return;
10001
9814
  }
@@ -10919,7 +10732,7 @@ const MarkerDefinitions = ({ defaultColor, rfId }) => {
10919
10732
  MarkerDefinitions.displayName = 'MarkerDefinitions';
10920
10733
  var MarkerDefinitions$1 = memo(MarkerDefinitions);
10921
10734
 
10922
- function EdgeTextComponent({ x, y, label, labelStyle = {}, labelShowBg = true, labelBgStyle = {}, labelBgPadding = [2, 4], labelBgBorderRadius = 2, children, className, ...rest }) {
10735
+ function EdgeTextComponent({ x, y, label, labelStyle, labelShowBg = true, labelBgStyle, labelBgPadding = [2, 4], labelBgBorderRadius = 2, children, className, ...rest }) {
10923
10736
  const [edgeTextBbox, setEdgeTextBbox] = useState({ x: 1, y: 0, width: 0, height: 0 });
10924
10737
  const edgeTextClasses = cc(['react-flow__edge-textwrapper', className]);
10925
10738
  const edgeTextRef = useRef(null);
@@ -10934,7 +10747,7 @@ function EdgeTextComponent({ x, y, label, labelStyle = {}, labelShowBg = true, l
10934
10747
  });
10935
10748
  }
10936
10749
  }, [label]);
10937
- if (typeof label === 'undefined' || !label) {
10750
+ if (!label) {
10938
10751
  return null;
10939
10752
  }
10940
10753
  return (jsxRuntimeExports.jsxs("g", { transform: `translate(${x - edgeTextBbox.width / 2} ${y - edgeTextBbox.height / 2})`, className: edgeTextClasses, visibility: edgeTextBbox.width ? 'visible' : 'hidden', ...rest, children: [labelShowBg && (jsxRuntimeExports.jsx("rect", { width: edgeTextBbox.width + 2 * labelBgPadding[0], x: -labelBgPadding[0], y: -labelBgPadding[1], height: edgeTextBbox.height + 2 * labelBgPadding[1], className: "react-flow__edge-textbg", style: labelBgStyle, rx: labelBgBorderRadius, ry: labelBgBorderRadius })), jsxRuntimeExports.jsx("text", { className: "react-flow__edge-text", y: edgeTextBbox.height / 2, dy: "0.3em", ref: edgeTextRef, style: labelStyle, children: label }), children] }));
@@ -10944,26 +10757,26 @@ EdgeTextComponent.displayName = 'EdgeText';
10944
10757
  * You can use the `<EdgeText />` component as a helper component to display text
10945
10758
  * within your custom edges.
10946
10759
  *
10947
- *@public
10760
+ * @public
10948
10761
  *
10949
- *@example
10950
- *```jsx
10951
- *import { EdgeText } from '@xyflow/react';
10762
+ * @example
10763
+ * ```jsx
10764
+ * import { EdgeText } from '@xyflow/react';
10952
10765
  *
10953
- *export function CustomEdgeLabel({ label }) {
10954
- * return (
10955
- * <EdgeText
10956
- * x={100}
10957
- * y={100}
10958
- * label={label}
10959
- * labelStyle={{ fill: 'white' }}
10960
- * labelShowBg
10961
- * labelBgStyle={{ fill: 'red' }}
10962
- * labelBgPadding={[2, 4]}
10963
- * labelBgBorderRadius={2}
10964
- * />
10965
- * );
10966
- *}
10766
+ * export function CustomEdgeLabel({ label }) {
10767
+ * return (
10768
+ * <EdgeText
10769
+ * x={100}
10770
+ * y={100}
10771
+ * label={label}
10772
+ * labelStyle={{ fill: 'white' }}
10773
+ * labelShowBg
10774
+ * labelBgStyle={{ fill: 'red' }}
10775
+ * labelBgPadding={[2, 4]}
10776
+ * labelBgBorderRadius={2}
10777
+ * />
10778
+ * );
10779
+ * }
10967
10780
  *```
10968
10781
  */
10969
10782
  const EdgeText = memo(EdgeTextComponent);
@@ -11080,7 +10893,33 @@ function createSmoothStepEdge(params) {
11080
10893
  return (jsxRuntimeExports.jsx(BaseEdge, { id: _id, path: path, labelX: labelX, labelY: labelY, label: label, labelStyle: labelStyle, labelShowBg: labelShowBg, labelBgStyle: labelBgStyle, labelBgPadding: labelBgPadding, labelBgBorderRadius: labelBgBorderRadius, style: style, markerEnd: markerEnd, markerStart: markerStart, interactionWidth: interactionWidth }));
11081
10894
  });
11082
10895
  }
10896
+ /**
10897
+ * Component that can be used inside a custom edge to render a smooth step edge.
10898
+ *
10899
+ * @public
10900
+ * @example
10901
+ *
10902
+ * ```tsx
10903
+ * import { SmoothStepEdge } from '@xyflow/react';
10904
+ *
10905
+ * function CustomEdge({ sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition }) {
10906
+ * return (
10907
+ * <SmoothStepEdge
10908
+ * sourceX={sourceX}
10909
+ * sourceY={sourceY}
10910
+ * targetX={targetX}
10911
+ * targetY={targetY}
10912
+ * sourcePosition={sourcePosition}
10913
+ * targetPosition={targetPosition}
10914
+ * />
10915
+ * );
10916
+ * }
10917
+ * ```
10918
+ */
11083
10919
  const SmoothStepEdge = createSmoothStepEdge({ isInternal: false });
10920
+ /**
10921
+ * @internal
10922
+ */
11084
10923
  const SmoothStepEdgeInternal = createSmoothStepEdge({ isInternal: true });
11085
10924
  SmoothStepEdge.displayName = 'SmoothStepEdge';
11086
10925
  SmoothStepEdgeInternal.displayName = 'SmoothStepEdgeInternal';
@@ -11092,7 +10931,33 @@ function createStepEdge(params) {
11092
10931
  return (jsxRuntimeExports.jsx(SmoothStepEdge, { ...props, id: _id, pathOptions: useMemo(() => ({ borderRadius: 0, offset: props.pathOptions?.offset }), [props.pathOptions?.offset]) }));
11093
10932
  });
11094
10933
  }
10934
+ /**
10935
+ * Component that can be used inside a custom edge to render a step edge.
10936
+ *
10937
+ * @public
10938
+ * @example
10939
+ *
10940
+ * ```tsx
10941
+ * import { StepEdge } from '@xyflow/react';
10942
+ *
10943
+ * function CustomEdge({ sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition }) {
10944
+ * return (
10945
+ * <StepEdge
10946
+ * sourceX={sourceX}
10947
+ * sourceY={sourceY}
10948
+ * targetX={targetX}
10949
+ * targetY={targetY}
10950
+ * sourcePosition={sourcePosition}
10951
+ * targetPosition={targetPosition}
10952
+ * />
10953
+ * );
10954
+ * }
10955
+ * ```
10956
+ */
11095
10957
  const StepEdge = createStepEdge({ isInternal: false });
10958
+ /**
10959
+ * @internal
10960
+ */
11096
10961
  const StepEdgeInternal = createStepEdge({ isInternal: true });
11097
10962
  StepEdge.displayName = 'StepEdge';
11098
10963
  StepEdgeInternal.displayName = 'StepEdgeInternal';
@@ -11105,7 +10970,31 @@ function createStraightEdge(params) {
11105
10970
  return (jsxRuntimeExports.jsx(BaseEdge, { id: _id, path: path, labelX: labelX, labelY: labelY, label: label, labelStyle: labelStyle, labelShowBg: labelShowBg, labelBgStyle: labelBgStyle, labelBgPadding: labelBgPadding, labelBgBorderRadius: labelBgBorderRadius, style: style, markerEnd: markerEnd, markerStart: markerStart, interactionWidth: interactionWidth }));
11106
10971
  });
11107
10972
  }
10973
+ /**
10974
+ * Component that can be used inside a custom edge to render a straight line.
10975
+ *
10976
+ * @public
10977
+ * @example
10978
+ *
10979
+ * ```tsx
10980
+ * import { StraightEdge } from '@xyflow/react';
10981
+ *
10982
+ * function CustomEdge({ sourceX, sourceY, targetX, targetY }) {
10983
+ * return (
10984
+ * <StraightEdge
10985
+ * sourceX={sourceX}
10986
+ * sourceY={sourceY}
10987
+ * targetX={targetX}
10988
+ * targetY={targetY}
10989
+ * />
10990
+ * );
10991
+ * }
10992
+ * ```
10993
+ */
11108
10994
  const StraightEdge = createStraightEdge({ isInternal: false });
10995
+ /**
10996
+ * @internal
10997
+ */
11109
10998
  const StraightEdgeInternal = createStraightEdge({ isInternal: true });
11110
10999
  StraightEdge.displayName = 'StraightEdge';
11111
11000
  StraightEdgeInternal.displayName = 'StraightEdgeInternal';
@@ -11126,7 +11015,33 @@ function createBezierEdge(params) {
11126
11015
  return (jsxRuntimeExports.jsx(BaseEdge, { id: _id, path: path, labelX: labelX, labelY: labelY, label: label, labelStyle: labelStyle, labelShowBg: labelShowBg, labelBgStyle: labelBgStyle, labelBgPadding: labelBgPadding, labelBgBorderRadius: labelBgBorderRadius, style: style, markerEnd: markerEnd, markerStart: markerStart, interactionWidth: interactionWidth }));
11127
11016
  });
11128
11017
  }
11018
+ /**
11019
+ * Component that can be used inside a custom edge to render a bezier curve.
11020
+ *
11021
+ * @public
11022
+ * @example
11023
+ *
11024
+ * ```tsx
11025
+ * import { BezierEdge } from '@xyflow/react';
11026
+ *
11027
+ * function CustomEdge({ sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition }) {
11028
+ * return (
11029
+ * <BezierEdge
11030
+ * sourceX={sourceX}
11031
+ * sourceY={sourceY}
11032
+ * targetX={targetX}
11033
+ * targetY={targetY}
11034
+ * sourcePosition={sourcePosition}
11035
+ * targetPosition={targetPosition}
11036
+ * />
11037
+ * );
11038
+ * }
11039
+ * ```
11040
+ */
11129
11041
  const BezierEdge = createBezierEdge({ isInternal: false });
11042
+ /**
11043
+ * @internal
11044
+ */
11130
11045
  const BezierEdgeInternal = createBezierEdge({ isInternal: true });
11131
11046
  BezierEdge.displayName = 'BezierEdge';
11132
11047
  BezierEdgeInternal.displayName = 'BezierEdgeInternal';
@@ -11162,6 +11077,9 @@ const shiftY = (y, shift, position) => {
11162
11077
  return y;
11163
11078
  };
11164
11079
  const EdgeUpdaterClassName = 'react-flow__edgeupdater';
11080
+ /**
11081
+ * @internal
11082
+ */
11165
11083
  function EdgeAnchor({ position, centerX, centerY, radius = 10, onMouseDown, onMouseEnter, onMouseOut, type, }) {
11166
11084
  return (jsxRuntimeExports.jsx("circle", { onMouseDown: onMouseDown, onMouseEnter: onMouseEnter, onMouseOut: onMouseOut, className: cc([EdgeUpdaterClassName, `${EdgeUpdaterClassName}-${type}`]), cx: shiftX(centerX, radius, position), cy: shiftY(centerY, radius, position), r: radius, stroke: "transparent", fill: "transparent" }));
11167
11085
  }
@@ -11595,11 +11513,11 @@ const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, heig
11595
11513
  elementsSelectable: true,
11596
11514
  elevateNodesOnSelect: true,
11597
11515
  elevateEdgesOnSelect: false,
11598
- fitViewOnInit: false,
11599
- fitViewDone: false,
11600
- fitViewOnInitOptions: undefined,
11601
11516
  selectNodesOnDrag: true,
11602
11517
  multiSelectionActive: false,
11518
+ fitViewQueued: fitView ?? false,
11519
+ fitViewOptions: undefined,
11520
+ fitViewResolver: null,
11603
11521
  connection: { ...initialConnection },
11604
11522
  connectionClickStartHandle: null,
11605
11523
  connectOnClick: true,
@@ -11616,277 +11534,256 @@ const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, heig
11616
11534
  };
11617
11535
  };
11618
11536
 
11619
- const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView: fitView$1, nodeOrigin, nodeExtent, }) => createWithEqualityFn((set, get) => ({
11620
- ...getInitialState({ nodes, edges, width, height, fitView: fitView$1, nodeOrigin, nodeExtent, defaultNodes, defaultEdges }),
11621
- setNodes: (nodes) => {
11622
- const { nodeLookup, parentLookup, nodeOrigin, elevateNodesOnSelect } = get();
11623
- /*
11624
- * setNodes() is called exclusively in response to user actions:
11625
- * - either when the `<ReactFlow nodes>` prop is updated in the controlled ReactFlow setup,
11626
- * - or when the user calls something like `reactFlowInstance.setNodes()` in an uncontrolled ReactFlow setup.
11627
- *
11628
- * When this happens, we take the note objects passed by the user and extend them with fields
11629
- * relevant for internal React Flow operations.
11630
- */
11631
- adoptUserNodes(nodes, nodeLookup, parentLookup, {
11632
- nodeOrigin,
11633
- nodeExtent,
11634
- elevateNodesOnSelect,
11635
- checkEquality: true,
11636
- });
11637
- set({ nodes });
11638
- },
11639
- setEdges: (edges) => {
11640
- const { connectionLookup, edgeLookup } = get();
11641
- updateConnectionLookup(connectionLookup, edgeLookup, edges);
11642
- set({ edges });
11643
- },
11644
- setDefaultNodesAndEdges: (nodes, edges) => {
11645
- if (nodes) {
11646
- const { setNodes } = get();
11647
- setNodes(nodes);
11648
- set({ hasDefaultNodes: true });
11649
- }
11650
- if (edges) {
11651
- const { setEdges } = get();
11652
- setEdges(edges);
11653
- set({ hasDefaultEdges: true });
11654
- }
11655
- },
11656
- /*
11657
- * Every node gets registerd at a ResizeObserver. Whenever a node
11658
- * changes its dimensions, this function is called to measure the
11659
- * new dimensions and update the nodes.
11660
- */
11661
- updateNodeInternals: (updates, params = { triggerFitView: true }) => {
11662
- const { triggerNodeChanges, nodeLookup, parentLookup, fitViewOnInit, fitViewDone, fitViewOnInitOptions, domNode, nodeOrigin, nodeExtent, debug, fitViewSync, } = get();
11663
- const { changes, updatedInternals } = updateNodeInternals(updates, nodeLookup, parentLookup, domNode, nodeOrigin, nodeExtent);
11664
- if (!updatedInternals) {
11537
+ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView, nodeOrigin, nodeExtent, }) => createWithEqualityFn((set, get) => {
11538
+ async function resolveFitView() {
11539
+ const { nodeLookup, panZoom, fitViewOptions, fitViewResolver, width, height, minZoom, maxZoom } = get();
11540
+ if (!panZoom) {
11665
11541
  return;
11666
11542
  }
11667
- updateAbsolutePositions(nodeLookup, parentLookup, { nodeOrigin, nodeExtent });
11668
- if (params.triggerFitView) {
11669
- // we call fitView once initially after all dimensions are set
11670
- let nextFitViewDone = fitViewDone;
11671
- if (!fitViewDone && fitViewOnInit) {
11672
- nextFitViewDone = fitViewSync({
11673
- ...fitViewOnInitOptions,
11674
- nodes: fitViewOnInitOptions?.nodes,
11675
- });
11676
- }
11543
+ await fitViewport({
11544
+ nodes: nodeLookup,
11545
+ width,
11546
+ height,
11547
+ panZoom,
11548
+ minZoom,
11549
+ maxZoom,
11550
+ }, fitViewOptions);
11551
+ fitViewResolver?.resolve(true);
11552
+ /**
11553
+ * wait for the fitViewport to resolve before deleting the resolver,
11554
+ * we want to reuse the old resolver if the user calls fitView again in the mean time
11555
+ */
11556
+ set({ fitViewResolver: null });
11557
+ }
11558
+ return {
11559
+ ...getInitialState({ nodes, edges, width, height, fitView, nodeOrigin, nodeExtent, defaultNodes, defaultEdges }),
11560
+ setNodes: (nodes) => {
11561
+ const { nodeLookup, parentLookup, nodeOrigin, elevateNodesOnSelect, fitViewQueued } = get();
11677
11562
  /*
11678
- * here we are cirmumventing the onNodesChange handler
11679
- * in order to be able to display nodes even if the user
11680
- * has not provided an onNodesChange handler.
11681
- * Nodes are only rendered if they have a width and height
11682
- * attribute which they get from this handler.
11563
+ * setNodes() is called exclusively in response to user actions:
11564
+ * - either when the `<ReactFlow nodes>` prop is updated in the controlled ReactFlow setup,
11565
+ * - or when the user calls something like `reactFlowInstance.setNodes()` in an uncontrolled ReactFlow setup.
11566
+ *
11567
+ * When this happens, we take the note objects passed by the user and extend them with fields
11568
+ * relevant for internal React Flow operations.
11683
11569
  */
11684
- set({ fitViewDone: nextFitViewDone });
11685
- }
11686
- else {
11687
- // we always want to trigger useStore calls whenever updateNodeInternals is called
11688
- set({});
11689
- }
11690
- if (changes?.length > 0) {
11691
- if (debug) {
11692
- console.log('React Flow: trigger node changes', changes);
11570
+ const nodesInitialized = adoptUserNodes(nodes, nodeLookup, parentLookup, {
11571
+ nodeOrigin,
11572
+ nodeExtent,
11573
+ elevateNodesOnSelect,
11574
+ checkEquality: true,
11575
+ });
11576
+ if (fitViewQueued && nodesInitialized) {
11577
+ resolveFitView();
11578
+ set({ nodes, fitViewQueued: false, fitViewOptions: undefined });
11693
11579
  }
11694
- triggerNodeChanges?.(changes);
11695
- }
11696
- },
11697
- updateNodePositions: (nodeDragItems, dragging = false) => {
11698
- const parentExpandChildren = [];
11699
- const changes = [];
11700
- const { nodeLookup, triggerNodeChanges } = get();
11701
- for (const [id, dragItem] of nodeDragItems) {
11702
- // we are using the nodelookup to be sure to use the current expandParent and parentId value
11703
- const node = nodeLookup.get(id);
11704
- const expandParent = !!(node?.expandParent && node?.parentId && dragItem?.position);
11705
- const change = {
11706
- id,
11707
- type: 'position',
11708
- position: expandParent
11709
- ? {
11710
- x: Math.max(0, dragItem.position.x),
11711
- y: Math.max(0, dragItem.position.y),
11712
- }
11713
- : dragItem.position,
11714
- dragging,
11715
- };
11716
- if (expandParent && node.parentId) {
11717
- parentExpandChildren.push({
11580
+ else {
11581
+ set({ nodes });
11582
+ }
11583
+ },
11584
+ setEdges: (edges) => {
11585
+ const { connectionLookup, edgeLookup } = get();
11586
+ updateConnectionLookup(connectionLookup, edgeLookup, edges);
11587
+ set({ edges });
11588
+ },
11589
+ setDefaultNodesAndEdges: (nodes, edges) => {
11590
+ if (nodes) {
11591
+ const { setNodes } = get();
11592
+ setNodes(nodes);
11593
+ set({ hasDefaultNodes: true });
11594
+ }
11595
+ if (edges) {
11596
+ const { setEdges } = get();
11597
+ setEdges(edges);
11598
+ set({ hasDefaultEdges: true });
11599
+ }
11600
+ },
11601
+ /*
11602
+ * Every node gets registerd at a ResizeObserver. Whenever a node
11603
+ * changes its dimensions, this function is called to measure the
11604
+ * new dimensions and update the nodes.
11605
+ */
11606
+ updateNodeInternals: (updates) => {
11607
+ const { triggerNodeChanges, nodeLookup, parentLookup, domNode, nodeOrigin, nodeExtent, debug, fitViewQueued } = get();
11608
+ const { changes, updatedInternals } = updateNodeInternals(updates, nodeLookup, parentLookup, domNode, nodeOrigin, nodeExtent);
11609
+ if (!updatedInternals) {
11610
+ return;
11611
+ }
11612
+ updateAbsolutePositions(nodeLookup, parentLookup, { nodeOrigin, nodeExtent });
11613
+ if (fitViewQueued) {
11614
+ resolveFitView();
11615
+ set({ fitViewQueued: false, fitViewOptions: undefined });
11616
+ }
11617
+ else {
11618
+ // we always want to trigger useStore calls whenever updateNodeInternals is called
11619
+ set({});
11620
+ }
11621
+ if (changes?.length > 0) {
11622
+ if (debug) {
11623
+ console.log('React Flow: trigger node changes', changes);
11624
+ }
11625
+ triggerNodeChanges?.(changes);
11626
+ }
11627
+ },
11628
+ updateNodePositions: (nodeDragItems, dragging = false) => {
11629
+ const parentExpandChildren = [];
11630
+ const changes = [];
11631
+ const { nodeLookup, triggerNodeChanges } = get();
11632
+ for (const [id, dragItem] of nodeDragItems) {
11633
+ // we are using the nodelookup to be sure to use the current expandParent and parentId value
11634
+ const node = nodeLookup.get(id);
11635
+ const expandParent = !!(node?.expandParent && node?.parentId && dragItem?.position);
11636
+ const change = {
11718
11637
  id,
11719
- parentId: node.parentId,
11720
- rect: {
11721
- ...dragItem.internals.positionAbsolute,
11722
- width: dragItem.measured.width ?? 0,
11723
- height: dragItem.measured.height ?? 0,
11724
- },
11725
- });
11638
+ type: 'position',
11639
+ position: expandParent
11640
+ ? {
11641
+ x: Math.max(0, dragItem.position.x),
11642
+ y: Math.max(0, dragItem.position.y),
11643
+ }
11644
+ : dragItem.position,
11645
+ dragging,
11646
+ };
11647
+ if (expandParent && node.parentId) {
11648
+ parentExpandChildren.push({
11649
+ id,
11650
+ parentId: node.parentId,
11651
+ rect: {
11652
+ ...dragItem.internals.positionAbsolute,
11653
+ width: dragItem.measured.width ?? 0,
11654
+ height: dragItem.measured.height ?? 0,
11655
+ },
11656
+ });
11657
+ }
11658
+ changes.push(change);
11726
11659
  }
11727
- changes.push(change);
11728
- }
11729
- if (parentExpandChildren.length > 0) {
11730
- const { parentLookup, nodeOrigin } = get();
11731
- const parentExpandChanges = handleExpandParent(parentExpandChildren, nodeLookup, parentLookup, nodeOrigin);
11732
- changes.push(...parentExpandChanges);
11733
- }
11734
- triggerNodeChanges(changes);
11735
- },
11736
- triggerNodeChanges: (changes) => {
11737
- const { onNodesChange, setNodes, nodes, hasDefaultNodes, debug } = get();
11738
- if (changes?.length) {
11739
- if (hasDefaultNodes) {
11740
- const updatedNodes = applyNodeChanges(changes, nodes);
11741
- setNodes(updatedNodes);
11660
+ if (parentExpandChildren.length > 0) {
11661
+ const { parentLookup, nodeOrigin } = get();
11662
+ const parentExpandChanges = handleExpandParent(parentExpandChildren, nodeLookup, parentLookup, nodeOrigin);
11663
+ changes.push(...parentExpandChanges);
11742
11664
  }
11743
- if (debug) {
11744
- console.log('React Flow: trigger node changes', changes);
11665
+ triggerNodeChanges(changes);
11666
+ },
11667
+ triggerNodeChanges: (changes) => {
11668
+ const { onNodesChange, setNodes, nodes, hasDefaultNodes, debug } = get();
11669
+ if (changes?.length) {
11670
+ if (hasDefaultNodes) {
11671
+ const updatedNodes = applyNodeChanges(changes, nodes);
11672
+ setNodes(updatedNodes);
11673
+ }
11674
+ if (debug) {
11675
+ console.log('React Flow: trigger node changes', changes);
11676
+ }
11677
+ onNodesChange?.(changes);
11745
11678
  }
11746
- onNodesChange?.(changes);
11747
- }
11748
- },
11749
- triggerEdgeChanges: (changes) => {
11750
- const { onEdgesChange, setEdges, edges, hasDefaultEdges, debug } = get();
11751
- if (changes?.length) {
11752
- if (hasDefaultEdges) {
11753
- const updatedEdges = applyEdgeChanges(changes, edges);
11754
- setEdges(updatedEdges);
11679
+ },
11680
+ triggerEdgeChanges: (changes) => {
11681
+ const { onEdgesChange, setEdges, edges, hasDefaultEdges, debug } = get();
11682
+ if (changes?.length) {
11683
+ if (hasDefaultEdges) {
11684
+ const updatedEdges = applyEdgeChanges(changes, edges);
11685
+ setEdges(updatedEdges);
11686
+ }
11687
+ if (debug) {
11688
+ console.log('React Flow: trigger edge changes', changes);
11689
+ }
11690
+ onEdgesChange?.(changes);
11755
11691
  }
11756
- if (debug) {
11757
- console.log('React Flow: trigger edge changes', changes);
11692
+ },
11693
+ addSelectedNodes: (selectedNodeIds) => {
11694
+ const { multiSelectionActive, edgeLookup, nodeLookup, triggerNodeChanges, triggerEdgeChanges } = get();
11695
+ if (multiSelectionActive) {
11696
+ const nodeChanges = selectedNodeIds.map((nodeId) => createSelectionChange(nodeId, true));
11697
+ triggerNodeChanges(nodeChanges);
11698
+ return;
11758
11699
  }
11759
- onEdgesChange?.(changes);
11760
- }
11761
- },
11762
- addSelectedNodes: (selectedNodeIds) => {
11763
- const { multiSelectionActive, edgeLookup, nodeLookup, triggerNodeChanges, triggerEdgeChanges } = get();
11764
- if (multiSelectionActive) {
11765
- const nodeChanges = selectedNodeIds.map((nodeId) => createSelectionChange(nodeId, true));
11700
+ triggerNodeChanges(getSelectionChanges(nodeLookup, new Set([...selectedNodeIds]), true));
11701
+ triggerEdgeChanges(getSelectionChanges(edgeLookup));
11702
+ },
11703
+ addSelectedEdges: (selectedEdgeIds) => {
11704
+ const { multiSelectionActive, edgeLookup, nodeLookup, triggerNodeChanges, triggerEdgeChanges } = get();
11705
+ if (multiSelectionActive) {
11706
+ const changedEdges = selectedEdgeIds.map((edgeId) => createSelectionChange(edgeId, true));
11707
+ triggerEdgeChanges(changedEdges);
11708
+ return;
11709
+ }
11710
+ triggerEdgeChanges(getSelectionChanges(edgeLookup, new Set([...selectedEdgeIds])));
11711
+ triggerNodeChanges(getSelectionChanges(nodeLookup, new Set(), true));
11712
+ },
11713
+ unselectNodesAndEdges: ({ nodes, edges } = {}) => {
11714
+ const { edges: storeEdges, nodes: storeNodes, nodeLookup, triggerNodeChanges, triggerEdgeChanges } = get();
11715
+ const nodesToUnselect = nodes ? nodes : storeNodes;
11716
+ const edgesToUnselect = edges ? edges : storeEdges;
11717
+ const nodeChanges = nodesToUnselect.map((n) => {
11718
+ const internalNode = nodeLookup.get(n.id);
11719
+ if (internalNode) {
11720
+ /*
11721
+ * we need to unselect the internal node that was selected previously before we
11722
+ * send the change to the user to prevent it to be selected while dragging the new node
11723
+ */
11724
+ internalNode.selected = false;
11725
+ }
11726
+ return createSelectionChange(n.id, false);
11727
+ });
11728
+ const edgeChanges = edgesToUnselect.map((edge) => createSelectionChange(edge.id, false));
11766
11729
  triggerNodeChanges(nodeChanges);
11767
- return;
11768
- }
11769
- triggerNodeChanges(getSelectionChanges(nodeLookup, new Set([...selectedNodeIds]), true));
11770
- triggerEdgeChanges(getSelectionChanges(edgeLookup));
11771
- },
11772
- addSelectedEdges: (selectedEdgeIds) => {
11773
- const { multiSelectionActive, edgeLookup, nodeLookup, triggerNodeChanges, triggerEdgeChanges } = get();
11774
- if (multiSelectionActive) {
11775
- const changedEdges = selectedEdgeIds.map((edgeId) => createSelectionChange(edgeId, true));
11776
- triggerEdgeChanges(changedEdges);
11777
- return;
11778
- }
11779
- triggerEdgeChanges(getSelectionChanges(edgeLookup, new Set([...selectedEdgeIds])));
11780
- triggerNodeChanges(getSelectionChanges(nodeLookup, new Set(), true));
11781
- },
11782
- unselectNodesAndEdges: ({ nodes, edges } = {}) => {
11783
- const { edges: storeEdges, nodes: storeNodes, nodeLookup, triggerNodeChanges, triggerEdgeChanges } = get();
11784
- const nodesToUnselect = nodes ? nodes : storeNodes;
11785
- const edgesToUnselect = edges ? edges : storeEdges;
11786
- const nodeChanges = nodesToUnselect.map((n) => {
11787
- const internalNode = nodeLookup.get(n.id);
11788
- if (internalNode) {
11789
- /*
11790
- * we need to unselect the internal node that was selected previously before we
11791
- * send the change to the user to prevent it to be selected while dragging the new node
11792
- */
11793
- internalNode.selected = false;
11730
+ triggerEdgeChanges(edgeChanges);
11731
+ },
11732
+ setMinZoom: (minZoom) => {
11733
+ const { panZoom, maxZoom } = get();
11734
+ panZoom?.setScaleExtent([minZoom, maxZoom]);
11735
+ set({ minZoom });
11736
+ },
11737
+ setMaxZoom: (maxZoom) => {
11738
+ const { panZoom, minZoom } = get();
11739
+ panZoom?.setScaleExtent([minZoom, maxZoom]);
11740
+ set({ maxZoom });
11741
+ },
11742
+ setTranslateExtent: (translateExtent) => {
11743
+ get().panZoom?.setTranslateExtent(translateExtent);
11744
+ set({ translateExtent });
11745
+ },
11746
+ setPaneClickDistance: (clickDistance) => {
11747
+ get().panZoom?.setClickDistance(clickDistance);
11748
+ },
11749
+ resetSelectedElements: () => {
11750
+ const { edges, nodes, triggerNodeChanges, triggerEdgeChanges } = get();
11751
+ const nodeChanges = nodes.reduce((res, node) => (node.selected ? [...res, createSelectionChange(node.id, false)] : res), []);
11752
+ const edgeChanges = edges.reduce((res, edge) => (edge.selected ? [...res, createSelectionChange(edge.id, false)] : res), []);
11753
+ triggerNodeChanges(nodeChanges);
11754
+ triggerEdgeChanges(edgeChanges);
11755
+ },
11756
+ setNodeExtent: (nextNodeExtent) => {
11757
+ const { nodes, nodeLookup, parentLookup, nodeOrigin, elevateNodesOnSelect, nodeExtent } = get();
11758
+ if (nextNodeExtent[0][0] === nodeExtent[0][0] &&
11759
+ nextNodeExtent[0][1] === nodeExtent[0][1] &&
11760
+ nextNodeExtent[1][0] === nodeExtent[1][0] &&
11761
+ nextNodeExtent[1][1] === nodeExtent[1][1]) {
11762
+ return;
11794
11763
  }
11795
- return createSelectionChange(n.id, false);
11796
- });
11797
- const edgeChanges = edgesToUnselect.map((edge) => createSelectionChange(edge.id, false));
11798
- triggerNodeChanges(nodeChanges);
11799
- triggerEdgeChanges(edgeChanges);
11800
- },
11801
- setMinZoom: (minZoom) => {
11802
- const { panZoom, maxZoom } = get();
11803
- panZoom?.setScaleExtent([minZoom, maxZoom]);
11804
- set({ minZoom });
11805
- },
11806
- setMaxZoom: (maxZoom) => {
11807
- const { panZoom, minZoom } = get();
11808
- panZoom?.setScaleExtent([minZoom, maxZoom]);
11809
- set({ maxZoom });
11810
- },
11811
- setTranslateExtent: (translateExtent) => {
11812
- get().panZoom?.setTranslateExtent(translateExtent);
11813
- set({ translateExtent });
11814
- },
11815
- setPaneClickDistance: (clickDistance) => {
11816
- get().panZoom?.setClickDistance(clickDistance);
11817
- },
11818
- resetSelectedElements: () => {
11819
- const { edges, nodes, triggerNodeChanges, triggerEdgeChanges } = get();
11820
- const nodeChanges = nodes.reduce((res, node) => (node.selected ? [...res, createSelectionChange(node.id, false)] : res), []);
11821
- const edgeChanges = edges.reduce((res, edge) => (edge.selected ? [...res, createSelectionChange(edge.id, false)] : res), []);
11822
- triggerNodeChanges(nodeChanges);
11823
- triggerEdgeChanges(edgeChanges);
11824
- },
11825
- setNodeExtent: (nextNodeExtent) => {
11826
- const { nodes, nodeLookup, parentLookup, nodeOrigin, elevateNodesOnSelect, nodeExtent } = get();
11827
- if (nextNodeExtent[0][0] === nodeExtent[0][0] &&
11828
- nextNodeExtent[0][1] === nodeExtent[0][1] &&
11829
- nextNodeExtent[1][0] === nodeExtent[1][0] &&
11830
- nextNodeExtent[1][1] === nodeExtent[1][1]) {
11831
- return;
11832
- }
11833
- adoptUserNodes(nodes, nodeLookup, parentLookup, {
11834
- nodeOrigin,
11835
- nodeExtent: nextNodeExtent,
11836
- elevateNodesOnSelect,
11837
- checkEquality: false,
11838
- });
11839
- set({ nodeExtent: nextNodeExtent });
11840
- },
11841
- panBy: (delta) => {
11842
- const { transform, width, height, panZoom, translateExtent } = get();
11843
- return panBy({ delta, panZoom, transform, translateExtent, width, height });
11844
- },
11845
- fitView: (options) => {
11846
- const { panZoom, width, height, minZoom, maxZoom, nodeLookup } = get();
11847
- if (!panZoom) {
11848
- return Promise.resolve(false);
11849
- }
11850
- const fitViewNodes = getFitViewNodes(nodeLookup, options);
11851
- return fitView({
11852
- nodes: fitViewNodes,
11853
- width,
11854
- height,
11855
- panZoom,
11856
- minZoom,
11857
- maxZoom,
11858
- }, options);
11859
- },
11860
- /*
11861
- * we can't call an asnychronous function in updateNodeInternals
11862
- * for that we created this sync version of fitView
11863
- */
11864
- fitViewSync: (options) => {
11865
- const { panZoom, width, height, minZoom, maxZoom, nodeLookup } = get();
11866
- if (!panZoom) {
11867
- return false;
11868
- }
11869
- const fitViewNodes = getFitViewNodes(nodeLookup, options);
11870
- fitView({
11871
- nodes: fitViewNodes,
11872
- width,
11873
- height,
11874
- panZoom,
11875
- minZoom,
11876
- maxZoom,
11877
- }, options);
11878
- return fitViewNodes.size > 0;
11879
- },
11880
- cancelConnection: () => {
11881
- set({
11882
- connection: { ...initialConnection },
11883
- });
11884
- },
11885
- updateConnection: (connection) => {
11886
- set({ connection });
11887
- },
11888
- reset: () => set({ ...getInitialState() }),
11889
- }), Object.is);
11764
+ adoptUserNodes(nodes, nodeLookup, parentLookup, {
11765
+ nodeOrigin,
11766
+ nodeExtent: nextNodeExtent,
11767
+ elevateNodesOnSelect,
11768
+ checkEquality: false,
11769
+ });
11770
+ set({ nodeExtent: nextNodeExtent });
11771
+ },
11772
+ panBy: (delta) => {
11773
+ const { transform, width, height, panZoom, translateExtent } = get();
11774
+ return panBy({ delta, panZoom, transform, translateExtent, width, height });
11775
+ },
11776
+ cancelConnection: () => {
11777
+ set({
11778
+ connection: { ...initialConnection },
11779
+ });
11780
+ },
11781
+ updateConnection: (connection) => {
11782
+ set({ connection });
11783
+ },
11784
+ reset: () => set({ ...getInitialState() }),
11785
+ };
11786
+ }, Object.is);
11890
11787
 
11891
11788
  /**
11892
11789
  * The `<ReactFlowProvider />` component is a [context provider](https://react.dev/learn/passing-data-deeply-with-context#)
@@ -11993,37 +11890,38 @@ const selector$6 = (s) => s.domNode?.querySelector('.react-flow__edgelabel-rende
11993
11890
  * Edges are SVG-based. If you want to render more complex labels you can use the
11994
11891
  * `<EdgeLabelRenderer />` component to access a div based renderer. This component
11995
11892
  * is a portal that renders the label in a `<div />` that is positioned on top of
11996
- * the edges. You can see an example usage of the component in the [edge label renderer](/examples/edges/edge-label-renderer) example.
11893
+ * the edges. You can see an example usage of the component in the
11894
+ * [edge label renderer example](/examples/edges/edge-label-renderer).
11997
11895
  * @public
11998
11896
  *
11999
11897
  * @example
12000
- *```jsx
12001
- *import React from 'react';
12002
- *import { getBezierPath, EdgeLabelRenderer, BaseEdge } from '@xyflow/react';
11898
+ * ```jsx
11899
+ * import React from 'react';
11900
+ * import { getBezierPath, EdgeLabelRenderer, BaseEdge } from '@xyflow/react';
12003
11901
  *
12004
- *export function CustomEdge({ id, data, ...props }) {
12005
- * const [edgePath, labelX, labelY] = getBezierPath(props);
11902
+ * export function CustomEdge({ id, data, ...props }) {
11903
+ * const [edgePath, labelX, labelY] = getBezierPath(props);
12006
11904
  *
12007
- * return (
12008
- * <>
12009
- * <BaseEdge id={id} path={edgePath} />
12010
- * <EdgeLabelRenderer>
12011
- * <div
12012
- * style={{
12013
- * position: 'absolute',
12014
- * transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
12015
- * background: '#ffcc00',
12016
- * padding: 10,
12017
- * }}
12018
- * className="nodrag nopan"
12019
- * >
12020
- * {data.label}
12021
- * </div>
12022
- * </EdgeLabelRenderer>
12023
- * </>
12024
- * );
12025
- *};
12026
- *```
11905
+ * return (
11906
+ * <>
11907
+ * <BaseEdge id={id} path={edgePath} />
11908
+ * <EdgeLabelRenderer>
11909
+ * <div
11910
+ * style={{
11911
+ * position: 'absolute',
11912
+ * transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
11913
+ * background: '#ffcc00',
11914
+ * padding: 10,
11915
+ * }}
11916
+ * className="nodrag nopan"
11917
+ * >
11918
+ * {data.label}
11919
+ * </div>
11920
+ * </EdgeLabelRenderer>
11921
+ * </>
11922
+ * );
11923
+ * };
11924
+ * ```
12027
11925
  *
12028
11926
  * @remarks The `<EdgeLabelRenderer />` has no pointer events by default. If you want to
12029
11927
  * add mouse interactions you need to set the style `pointerEvents: all` and add
@@ -12391,6 +12289,7 @@ var MiniMapNodes$1 = memo(MiniMapNodes);
12391
12289
 
12392
12290
  const defaultWidth = 200;
12393
12291
  const defaultHeight = 150;
12292
+ const filterHidden = (node) => !node.hidden;
12394
12293
  const selector$1 = (s) => {
12395
12294
  const viewBB = {
12396
12295
  x: -s.transform[0] / s.transform[2],
@@ -12400,7 +12299,9 @@ const selector$1 = (s) => {
12400
12299
  };
12401
12300
  return {
12402
12301
  viewBB,
12403
- boundingRect: s.nodeLookup.size > 0 ? getBoundsOfRects(getInternalNodesBounds(s.nodeLookup), viewBB) : viewBB,
12302
+ boundingRect: s.nodeLookup.size > 0
12303
+ ? getBoundsOfRects(getInternalNodesBounds(s.nodeLookup, { filter: filterHidden }), viewBB)
12304
+ : viewBB,
12404
12305
  rfId: s.rfId,
12405
12306
  panZoom: s.panZoom,
12406
12307
  translateExtent: s.translateExtent,