@likec4/diagram 1.36.1 → 1.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/bundle/{chunk-DHvr-RGh.js → chunk-BZV0K82k.js} +870 -900
  2. package/bundle/custom.js +64 -56
  3. package/bundle/index.js +3565 -3327
  4. package/dist/LikeC4Diagram.props.d.ts +5 -5
  5. package/dist/LikeC4Styles.js +17 -15
  6. package/dist/StaticLikeC4Diagram.d.ts +1 -1
  7. package/dist/StaticLikeC4Diagram.js +3 -0
  8. package/dist/base/BaseXYFlow.d.ts +1 -1
  9. package/dist/base/BaseXYFlow.js +25 -27
  10. package/dist/base/const.d.ts +4 -4
  11. package/dist/base/const.js +5 -4
  12. package/dist/base/primitives/MarkdownBlock.js +4 -1
  13. package/dist/base/primitives/compound/CompoundActionButton.js +27 -42
  14. package/dist/base/primitives/compound/CompoundDetailsButton.js +23 -48
  15. package/dist/base/primitives/compound/CompoundNodeContainer.js +16 -48
  16. package/dist/base/primitives/compound/CompoundTitle.js +5 -80
  17. package/dist/base/primitives/compound/actionbtns.css.js +1 -13
  18. package/dist/base/primitives/customEdge.d.ts +1 -1
  19. package/dist/base/primitives/customNode.d.ts +4 -4
  20. package/dist/base/primitives/customNode.js +7 -7
  21. package/dist/base/primitives/edge/EdgeLabel.d.ts +5 -4
  22. package/dist/base/primitives/edge/EdgeLabel.js +39 -21
  23. package/dist/base/primitives/edge/EdgeLabelContainer.js +11 -23
  24. package/dist/base/primitives/edge/edge.css.js +19 -11
  25. package/dist/base/primitives/element/ElementShape.js +38 -18
  26. package/dist/base/primitives/element/ElementTags.js +7 -4
  27. package/dist/base/primitives/element/ElementTitle.js +10 -2
  28. package/dist/base/types.d.ts +17 -21
  29. package/dist/bundle/LikeC4View.d.ts +2 -2
  30. package/dist/bundle/LikeC4View.js +4 -1
  31. package/dist/bundle/LikeC4View.props.d.ts +2 -2
  32. package/dist/bundle/ReactLikeC4.d.ts +3 -3
  33. package/dist/bundle/custom.js +2 -1
  34. package/dist/bundle/index.js +2 -1
  35. package/dist/components/Link.js +3 -2
  36. package/dist/context/ReduceGraphics.js +2 -5
  37. package/dist/context/RootContainer.js +1 -5
  38. package/dist/custom/customNodes.d.ts +32 -26
  39. package/dist/custom/customNodes.js +12 -8
  40. package/dist/custom/hooks.d.ts +2 -1
  41. package/dist/custom/index.js +2 -1
  42. package/dist/globals.css.js +1 -1
  43. package/dist/hooks/index.d.ts +1 -1
  44. package/dist/hooks/useDiagram.d.ts +18 -1
  45. package/dist/hooks/useDiagram.js +18 -2
  46. package/dist/hooks/useXYFlow.d.ts +40 -21
  47. package/dist/index.d.ts +1 -1
  48. package/dist/index.js +2 -1
  49. package/dist/likec4diagram/DiagramUI.js +5 -2
  50. package/dist/likec4diagram/DiagramXYFlow.js +9 -9
  51. package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +3 -3
  52. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +27 -44
  53. package/dist/likec4diagram/custom/index.js +3 -3
  54. package/dist/likec4diagram/custom/nodes/nodes.d.ts +8 -6
  55. package/dist/likec4diagram/custom/nodes/nodes.js +13 -14
  56. package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +3 -2
  57. package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +2 -2
  58. package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +2 -0
  59. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +441 -0
  60. package/dist/likec4diagram/relationship-popover/actor.d.ts +177 -0
  61. package/dist/likec4diagram/relationship-popover/actor.js +155 -0
  62. package/dist/likec4diagram/relationship-popover/styles.css.d.ts +2 -0
  63. package/dist/likec4diagram/{custom/edges/RelationshipsDropdownMenu.css.js → relationship-popover/styles.css.js} +4 -17
  64. package/dist/likec4diagram/useLayoutConstraints.js +0 -1
  65. package/dist/likec4model/useLikeC4ElementsTree.js +1 -1
  66. package/dist/likec4model/useLikeC4Project.js +15 -1
  67. package/dist/navigationpanel/NavigationPanelDropdown.js +1 -2
  68. package/dist/navigationpanel/actor.js +1 -2
  69. package/dist/navigationpanel/controls/NavigationButtons.js +1 -5
  70. package/dist/navigationpanel/controls/ViewDetailsCard.js +2 -0
  71. package/dist/overlays/element-details/actor.d.ts +564 -8
  72. package/dist/overlays/overlay/Overlay.css.d.ts +1 -1
  73. package/dist/overlays/relationship-details/actor.d.ts +3 -1
  74. package/dist/overlays/relationship-details/hooks.d.ts +19 -1
  75. package/dist/overlays/relationship-details/layout-to-xyflow.js +0 -1
  76. package/dist/overlays/relationship-details/layout.js +1 -2
  77. package/dist/overlays/relationships-browser/actor.d.ts +26 -2
  78. package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +16 -0
  79. package/dist/overlays/relationships-browser/custom/nodeTypes.js +18 -8
  80. package/dist/overlays/relationships-browser/useViewToNodesEdges.js +0 -1
  81. package/dist/search/components/_shared.css.d.ts +1 -1
  82. package/dist/state/DiagramActorProvider.js +2 -19
  83. package/dist/state/assign.js +24 -10
  84. package/dist/state/diagram-machine.d.ts +149 -474
  85. package/dist/state/diagram-machine.js +94 -54
  86. package/dist/state/types.d.ts +1 -1
  87. package/dist/styles-min.css +1 -1
  88. package/dist/styles-xyflow.css +1 -1
  89. package/dist/styles.css +1 -1
  90. package/dist/styles.css2.js +1 -1
  91. package/dist/utils/index.d.ts +2 -1
  92. package/dist/utils/roundDpr.d.ts +1 -0
  93. package/dist/utils/roundDpr.js +20 -0
  94. package/dist/utils/xyflow.d.ts +0 -1
  95. package/dist/utils/xyflow.js +1 -7
  96. package/package.json +16 -15
  97. package/panda.buildinfo.json +91 -156
  98. package/src/LikeC4Diagram.props.ts +5 -5
  99. package/src/LikeC4Styles.tsx +22 -14
  100. package/src/StaticLikeC4Diagram.tsx +3 -0
  101. package/src/base/BaseXYFlow.tsx +26 -29
  102. package/src/base/const.ts +5 -4
  103. package/src/base/primitives/MarkdownBlock.tsx +6 -1
  104. package/src/base/primitives/compound/CompoundActionButton.tsx +31 -43
  105. package/src/base/primitives/compound/CompoundDetailsButton.tsx +26 -48
  106. package/src/base/primitives/compound/CompoundNodeContainer.tsx +15 -43
  107. package/src/base/primitives/compound/CompoundTitle.tsx +4 -76
  108. package/src/base/primitives/compound/actionbtns.css.ts +0 -12
  109. package/src/base/primitives/customEdge.ts +1 -1
  110. package/src/base/primitives/customNode.tsx +20 -24
  111. package/src/base/primitives/edge/EdgeLabel.tsx +23 -8
  112. package/src/base/primitives/edge/EdgeLabelContainer.tsx +9 -21
  113. package/src/base/primitives/edge/edge.css.ts +19 -11
  114. package/src/base/primitives/element/ElementShape.tsx +40 -18
  115. package/src/base/primitives/element/ElementTags.tsx +7 -4
  116. package/src/base/primitives/element/ElementTitle.tsx +23 -11
  117. package/src/base/types.ts +21 -25
  118. package/src/bundle/LikeC4View.props.ts +2 -2
  119. package/src/bundle/LikeC4View.tsx +8 -5
  120. package/src/bundle/ReactLikeC4.tsx +3 -3
  121. package/src/components/Link.tsx +3 -2
  122. package/src/context/RootContainer.tsx +1 -5
  123. package/src/context/TagStylesContext.tsx +2 -0
  124. package/src/custom/{customNodes.tsx → customNodes.ts} +58 -52
  125. package/src/custom/hooks.ts +7 -0
  126. package/src/globals.css +58 -5
  127. package/src/hooks/index.ts +1 -1
  128. package/src/hooks/useDiagram.ts +39 -5
  129. package/src/hooks/useXYFlow.ts +3 -1
  130. package/src/index.ts +1 -0
  131. package/src/likec4diagram/DiagramUI.tsx +3 -0
  132. package/src/likec4diagram/DiagramXYFlow.tsx +9 -11
  133. package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +25 -49
  134. package/src/likec4diagram/custom/index.ts +5 -4
  135. package/src/likec4diagram/custom/nodes/nodes.tsx +13 -11
  136. package/src/likec4diagram/custom/nodes/toolbar/CompoundToolbar.tsx +3 -2
  137. package/src/likec4diagram/relationship-popover/RelationshipPopover.tsx +535 -0
  138. package/src/likec4diagram/relationship-popover/actor.ts +192 -0
  139. package/src/likec4diagram/{custom/edges/RelationshipsDropdownMenu.css.ts → relationship-popover/styles.css.ts} +3 -19
  140. package/src/likec4diagram/useLayoutConstraints.ts +0 -1
  141. package/src/likec4model/useLikeC4ElementsTree.ts +1 -1
  142. package/src/navigationpanel/NavigationPanelDropdown.tsx +1 -2
  143. package/src/navigationpanel/actor.ts +2 -2
  144. package/src/navigationpanel/controls/NavigationButtons.tsx +1 -5
  145. package/src/navigationpanel/controls/ViewDetailsCard.tsx +2 -0
  146. package/src/overlays/relationship-details/layout-to-xyflow.ts +0 -1
  147. package/src/overlays/relationship-details/layout.ts +4 -3
  148. package/src/overlays/relationships-browser/custom/nodeTypes.tsx +22 -8
  149. package/src/overlays/relationships-browser/useViewToNodesEdges.ts +0 -1
  150. package/src/state/DiagramActorProvider.tsx +2 -20
  151. package/src/state/assign.ts +24 -10
  152. package/src/state/diagram-machine.ts +101 -53
  153. package/src/state/types.ts +4 -1
  154. package/src/utils/index.ts +2 -1
  155. package/src/utils/roundDpr.ts +27 -0
  156. package/src/utils/xyflow.ts +0 -7
  157. package/dist/base/primitives/compound/CompoundNodeContainer.css.d.ts +0 -35
  158. package/dist/base/primitives/compound/CompoundNodeContainer.css.js +0 -132
  159. package/dist/base/primitives/edge/EdgeLabel.css.d.ts +0 -7
  160. package/dist/base/primitives/edge/EdgeLabel.css.js +0 -57
  161. package/dist/base/primitives/element/ElementShape.css.d.ts +0 -6
  162. package/dist/base/primitives/element/ElementShape.css.js +0 -107
  163. package/dist/likec4diagram/custom/edges/NotePopover.css.js +0 -21
  164. package/dist/likec4diagram/custom/edges/NotePopover.js +0 -91
  165. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.css.d.ts +0 -5
  166. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.d.ts +0 -13
  167. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +0 -215
  168. package/dist/likec4diagram/custom/index.d.ts +0 -62
  169. package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +0 -10
  170. package/src/base/primitives/compound/CompoundNodeContainer.css.ts +0 -138
  171. package/src/base/primitives/edge/EdgeLabel.css.ts +0 -64
  172. package/src/base/primitives/element/ElementShape.css.ts +0 -112
  173. package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +0 -281
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import React__default, { useState, Fragment, createContext, useContext, useRef, useEffect, useMemo, useCallback, useLayoutEffect, useId as useId$2, forwardRef, cloneElement, Children, createElement, useInsertionEffect as useInsertionEffect$1, memo as memo$1, useSyncExternalStore, createRef } from "react";
2
+ import React__default, { useState, Fragment, createContext, useContext, useRef, useEffect, useMemo, useCallback, useLayoutEffect, useId as useId$2, forwardRef, cloneElement, Children, createElement, useInsertionEffect as useInsertionEffect$1, memo as memo$1, createRef } from "react";
3
3
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import ReactDOM__default, { createPortal } from "react-dom";
@@ -21,14 +21,12 @@ function toChar(code) {
21
21
  }
22
22
  function toName(code) {
23
23
  let name = "", x;
24
- for (x = Math.abs(code); x > 52; x = x / 52 | 0)
25
- name = toChar(x % 52) + name;
24
+ for (x = Math.abs(code); x > 52; x = x / 52 | 0) name = toChar(x % 52) + name;
26
25
  return toChar(x % 52) + name;
27
26
  }
28
27
  function toPhash(h, x) {
29
28
  let i2 = x.length;
30
- for (; i2; )
31
- h = h * 33 ^ x.charCodeAt(--i2);
29
+ for (; i2; ) h = h * 33 ^ x.charCodeAt(--i2);
32
30
  return h;
33
31
  }
34
32
  function toHash(value) {
@@ -56,8 +54,7 @@ var memo = (fn) => {
56
54
  }, MERGE_OMIT = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
57
55
  function mergeProps$1(...sources) {
58
56
  return sources.reduce((prev, obj) => (obj && Object.keys(obj).forEach((key) => {
59
- if (MERGE_OMIT.has(key))
60
- return;
57
+ if (MERGE_OMIT.has(key)) return;
61
58
  const prevValue = prev[key], value = obj[key];
62
59
  isObject$1(prevValue) && isObject$1(value) ? prev[key] = mergeProps$1(prevValue, value) : prev[key] = value;
63
60
  }), prev), {});
@@ -122,8 +119,7 @@ function createCss(context2) {
122
119
  return memo(({ base, ...styles } = {}) => {
123
120
  const styleObject = Object.assign(styles, base), normalizedObject = normalizeStyleObject(styleObject, context2), classNames = /* @__PURE__ */ new Set();
124
121
  return walkObject(normalizedObject, (value, paths) => {
125
- if (value == null)
126
- return;
122
+ if (value == null) return;
127
123
  const important = isImportant(value), [prop, ...allConditions] = conds.shift(paths), conditions2 = filterBaseConditions(allConditions), transformed = utility.transform(prop, withoutImportant(sanitize(value)));
128
124
  let className = hashFn(conditions2, transformed.className);
129
125
  important && (className = `${className}!`), classNames.add(className);
@@ -152,8 +148,7 @@ var wordRegex = /([A-Z])/g, msRegex = /^ms-/, hypenateProperty = memo((property)
152
148
  isCssVar,
153
149
  isCssUnit
154
150
  }, getPatternStyles = (pattern, styles) => {
155
- if (!pattern?.defaultValues)
156
- return styles;
151
+ if (!pattern?.defaultValues) return styles;
157
152
  const defaults2 = typeof pattern.defaultValues == "function" ? pattern.defaultValues(styles) : pattern.defaultValues;
158
153
  return Object.assign({}, defaults2, compact(styles));
159
154
  }, getSlotRecipes = (recipe = {}) => {
@@ -193,7 +188,7 @@ function normalizeHTMLProps(props) {
193
188
  return Object.fromEntries(Object.entries(props).map(([key, value]) => [convert(key), value]));
194
189
  }
195
190
  normalizeHTMLProps.keys = htmlProps;
196
- const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,base", conditions = new Set(conditionsStr.split(",")), conditionRegex = /^@|&|&$/;
191
+ const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,base", conditions = new Set(conditionsStr.split(",")), conditionRegex = /^@|&|&$/;
197
192
  function isCondition(value) {
198
193
  return conditions.has(value) || conditionRegex.test(value);
199
194
  }
@@ -207,7 +202,7 @@ function sortConditions(paths) {
207
202
  return aa && !bb ? 1 : !aa && bb ? -1 : 0;
208
203
  });
209
204
  }
210
- const utilities = "aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderBlockStartWidth:bd-bs-w,borderBlockEndWidth:bd-be-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:transition,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,cursor:cursor,textStyle:textStyle,layerStyle:layerStyle,animationStyle:animationStyle", classNameByProp = /* @__PURE__ */ new Map(), shorthands = /* @__PURE__ */ new Map();
205
+ const utilities = "aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,boxSize:size,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,backgroundLinear:bg-linear/bgLinear,backgroundRadial:bg-radial/bgRadial,backgroundConic:bg-conic/bgConic,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderBlockStartWidth:bd-bs-w,borderBlockEndWidth:bd-be-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:transition,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,cursor:cursor,textStyle:textStyle,layerStyle:layerStyle,animationStyle:animationStyle", classNameByProp = /* @__PURE__ */ new Map(), shorthands = /* @__PURE__ */ new Map();
211
206
  utilities.split(",").forEach((utility) => {
212
207
  const [prop, meta] = utility.split(":"), [className, ...shorthandList] = meta.split("/");
213
208
  classNameByProp.set(prop, className), shorthandList.length && shorthandList.forEach((shorthand) => {
@@ -295,11 +290,10 @@ function assertCompoundVariant(name, compoundVariants, variants, prop) {
295
290
  if (compoundVariants.length > 0 && typeof variants?.[prop] == "object")
296
291
  throw new Error(`[recipe:${name}:${prop}] Conditions are not supported when using compound variants.`);
297
292
  }
298
- const slotClass = (className, slot) => className + "__" + slot;
299
293
  function sva(config) {
300
- const slots = Object.entries(getSlotRecipes(config)).map(([slot, slotCva]) => [slot, cva(slotCva)]), defaultVariants = config.defaultVariants ?? {};
294
+ const slots = Object.entries(getSlotRecipes(config)).map(([slot, slotCva]) => [slot, cva(slotCva)]), defaultVariants = config.defaultVariants ?? {}, classNameMap = slots.reduce((acc, [slot, cvaFn]) => (config.className && (acc[slot] = cvaFn.config.className), acc), {});
301
295
  function svaFn(props) {
302
- const result = slots.map(([slot, cvaFn]) => [slot, cx(cvaFn(props), config.className && slotClass(config.className, slot))]);
296
+ const result = slots.map(([slot, cvaFn]) => [slot, cx(cvaFn(props), classNameMap[slot])]);
303
297
  return Object.fromEntries(result);
304
298
  }
305
299
  function raw(props) {
@@ -310,14 +304,16 @@ function sva(config) {
310
304
  function splitVariantProps(props) {
311
305
  return splitProps(props, variantKeys);
312
306
  }
313
- const getVariantProps2 = (variants2) => ({ ...defaultVariants || {}, ...compact(variants2) }), variantMap = Object.fromEntries(
307
+ const getVariantProps2 = (variants2) => ({ ...defaultVariants, ...compact(variants2) }), variantMap = Object.fromEntries(
314
308
  Object.entries(variants).map(([key, value]) => [key, Object.keys(value)])
315
309
  );
316
310
  return Object.assign(memo(svaFn), {
317
311
  __cva__: !1,
318
312
  raw,
313
+ config,
319
314
  variantMap,
320
315
  variantKeys,
316
+ classNameMap,
321
317
  splitVariantProps,
322
318
  getVariantProps: getVariantProps2
323
319
  });
@@ -790,8 +786,8 @@ var ReactRemoveScroll = React.forwardRef(function(props, ref) {
790
786
  return React.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: SideCar }));
791
787
  });
792
788
  ReactRemoveScroll.classNames = RemoveScroll.classNames;
793
- function keys$1(object) {
794
- return Object.keys(object);
789
+ function keys$1(object2) {
790
+ return Object.keys(object2);
795
791
  }
796
792
  function isObject(item) {
797
793
  return item && typeof item == "object" && !Array.isArray(item);
@@ -1241,7 +1237,7 @@ function useMove(onChange, handlers, dir = "ltr") {
1241
1237
  }
1242
1238
  });
1243
1239
  }, bindEvents = () => {
1244
- document.addEventListener("mousemove", onMouseMove), document.addEventListener("mouseup", stopScrubbing), document.addEventListener("touchmove", onTouchMove), document.addEventListener("touchend", stopScrubbing);
1240
+ document.addEventListener("mousemove", onMouseMove), document.addEventListener("mouseup", stopScrubbing), document.addEventListener("touchmove", onTouchMove, { passive: !1 }), document.addEventListener("touchend", stopScrubbing);
1245
1241
  }, unbindEvents = () => {
1246
1242
  document.removeEventListener("mousemove", onMouseMove), document.removeEventListener("mouseup", stopScrubbing), document.removeEventListener("touchmove", onTouchMove), document.removeEventListener("touchend", stopScrubbing);
1247
1243
  }, startScrubbing = () => {
@@ -2798,6 +2794,7 @@ function isHTMLElement(value) {
2798
2794
  function isShadowRoot(value) {
2799
2795
  return !hasWindow() || typeof ShadowRoot > "u" ? !1 : value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
2800
2796
  }
2797
+ const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
2801
2798
  function isOverflowElement(element) {
2802
2799
  const {
2803
2800
  overflow,
@@ -2805,13 +2802,15 @@ function isOverflowElement(element) {
2805
2802
  overflowY,
2806
2803
  display
2807
2804
  } = getComputedStyle(element);
2808
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
2805
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
2809
2806
  }
2807
+ const tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
2810
2808
  function isTableElement(element) {
2811
- return ["table", "td", "th"].includes(getNodeName(element));
2809
+ return tableElements.has(getNodeName(element));
2812
2810
  }
2811
+ const topLayerSelectors = [":popover-open", ":modal"];
2813
2812
  function isTopLayer(element) {
2814
- return [":popover-open", ":modal"].some((selector2) => {
2813
+ return topLayerSelectors.some((selector2) => {
2815
2814
  try {
2816
2815
  return element.matches(selector2);
2817
2816
  } catch {
@@ -2819,9 +2818,10 @@ function isTopLayer(element) {
2819
2818
  }
2820
2819
  });
2821
2820
  }
2821
+ const transformProperties = ["transform", "translate", "scale", "rotate", "perspective"], willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"], containValues = ["paint", "layout", "strict", "content"];
2822
2822
  function isContainingBlock(elementOrCss) {
2823
2823
  const webkit = isWebKit(), css2 = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
2824
- return ["transform", "translate", "scale", "rotate", "perspective"].some((value) => css2[value] ? css2[value] !== "none" : !1) || (css2.containerType ? css2.containerType !== "normal" : !1) || !webkit && (css2.backdropFilter ? css2.backdropFilter !== "none" : !1) || !webkit && (css2.filter ? css2.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((value) => (css2.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css2.contain || "").includes(value));
2824
+ return transformProperties.some((value) => css2[value] ? css2[value] !== "none" : !1) || (css2.containerType ? css2.containerType !== "normal" : !1) || !webkit && (css2.backdropFilter ? css2.backdropFilter !== "none" : !1) || !webkit && (css2.filter ? css2.filter !== "none" : !1) || willChangeValues.some((value) => (css2.willChange || "").includes(value)) || containValues.some((value) => (css2.contain || "").includes(value));
2825
2825
  }
2826
2826
  function getContainingBlock(element) {
2827
2827
  let currentNode = getParentNode(element);
@@ -2837,8 +2837,9 @@ function getContainingBlock(element) {
2837
2837
  function isWebKit() {
2838
2838
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
2839
2839
  }
2840
+ const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
2840
2841
  function isLastTraversableNode(node) {
2841
- return ["html", "body", "#document"].includes(getNodeName(node));
2842
+ return lastTraversableNodeNames.has(getNodeName(node));
2842
2843
  }
2843
2844
  function getComputedStyle(element) {
2844
2845
  return getWindow(element).getComputedStyle(element);
@@ -2964,7 +2965,7 @@ const TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contented
2964
2965
  function isTypeableElement(element) {
2965
2966
  return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);
2966
2967
  }
2967
- const sides = ["top", "right", "bottom", "left"], min$1 = Math.min, max$1 = Math.max, round = Math.round, floor = Math.floor, createCoords = (v) => ({
2968
+ const sides = ["top", "right", "bottom", "left"], alignments = ["start", "end"], placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []), min$1 = Math.min, max$1 = Math.max, round = Math.round, floor = Math.floor, createCoords = (v) => ({
2968
2969
  x: v,
2969
2970
  y: v
2970
2971
  }), oppositeSideMap = {
@@ -2994,8 +2995,9 @@ function getOppositeAxis(axis) {
2994
2995
  function getAxisLength(axis) {
2995
2996
  return axis === "y" ? "height" : "width";
2996
2997
  }
2998
+ const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
2997
2999
  function getSideAxis(placement) {
2998
- return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
3000
+ return yAxisSides.has(getSide(placement)) ? "y" : "x";
2999
3001
  }
3000
3002
  function getAlignmentAxis(placement) {
3001
3003
  return getOppositeAxis(getSideAxis(placement));
@@ -3013,15 +3015,15 @@ function getExpandedPlacements(placement) {
3013
3015
  function getOppositeAlignmentPlacement(placement) {
3014
3016
  return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
3015
3017
  }
3018
+ const lrPlacement = ["left", "right"], rlPlacement = ["right", "left"], tbPlacement = ["top", "bottom"], btPlacement = ["bottom", "top"];
3016
3019
  function getSideList(side, isStart, rtl) {
3017
- const lr = ["left", "right"], rl = ["right", "left"], tb = ["top", "bottom"], bt = ["bottom", "top"];
3018
3020
  switch (side) {
3019
3021
  case "top":
3020
3022
  case "bottom":
3021
- return rtl ? isStart ? rl : lr : isStart ? lr : rl;
3023
+ return rtl ? isStart ? rlPlacement : lrPlacement : isStart ? lrPlacement : rlPlacement;
3022
3024
  case "left":
3023
3025
  case "right":
3024
- return isStart ? tb : bt;
3026
+ return isStart ? tbPlacement : btPlacement;
3025
3027
  default:
3026
3028
  return [];
3027
3029
  }
@@ -3260,7 +3262,79 @@ const arrow$3 = (options) => ({
3260
3262
  reset: shouldAddOffset
3261
3263
  };
3262
3264
  }
3263
- }), flip$2 = function(options) {
3265
+ });
3266
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
3267
+ return (alignment ? [...allowedPlacements.filter((placement) => getAlignment(placement) === alignment), ...allowedPlacements.filter((placement) => getAlignment(placement) !== alignment)] : allowedPlacements.filter((placement) => getSide(placement) === placement)).filter((placement) => alignment ? getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : !1) : !0);
3268
+ }
3269
+ const autoPlacement$1 = function(options) {
3270
+ return options === void 0 && (options = {}), {
3271
+ name: "autoPlacement",
3272
+ options,
3273
+ async fn(state) {
3274
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
3275
+ const {
3276
+ rects,
3277
+ middlewareData,
3278
+ placement,
3279
+ platform: platform2,
3280
+ elements
3281
+ } = state, {
3282
+ crossAxis = !1,
3283
+ alignment,
3284
+ allowedPlacements = placements,
3285
+ autoAlignment = !0,
3286
+ ...detectOverflowOptions
3287
+ } = evaluate(options, state), placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements, overflow = await detectOverflow(state, detectOverflowOptions), currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0, currentPlacement = placements$1[currentIndex];
3288
+ if (currentPlacement == null)
3289
+ return {};
3290
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)));
3291
+ if (placement !== currentPlacement)
3292
+ return {
3293
+ reset: {
3294
+ placement: placements$1[0]
3295
+ }
3296
+ };
3297
+ const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]], allOverflows = [...((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || [], {
3298
+ placement: currentPlacement,
3299
+ overflows: currentOverflows
3300
+ }], nextPlacement = placements$1[currentIndex + 1];
3301
+ if (nextPlacement)
3302
+ return {
3303
+ data: {
3304
+ index: currentIndex + 1,
3305
+ overflows: allOverflows
3306
+ },
3307
+ reset: {
3308
+ placement: nextPlacement
3309
+ }
3310
+ };
3311
+ const placementsSortedByMostSpace = allOverflows.map((d2) => {
3312
+ const alignment2 = getAlignment(d2.placement);
3313
+ return [d2.placement, alignment2 && crossAxis ? (
3314
+ // Check along the mainAxis and main crossAxis side.
3315
+ d2.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0)
3316
+ ) : (
3317
+ // Check only the mainAxis.
3318
+ d2.overflows[0]
3319
+ ), d2.overflows];
3320
+ }).sort((a, b) => a[1] - b[1]), resetPlacement = ((_placementsThatFitOnE = placementsSortedByMostSpace.filter((d2) => d2[2].slice(
3321
+ 0,
3322
+ // Aligned placements should not check their opposite crossAxis
3323
+ // side.
3324
+ getAlignment(d2[0]) ? 2 : 3
3325
+ ).every((v) => v <= 0))[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
3326
+ return resetPlacement !== placement ? {
3327
+ data: {
3328
+ index: currentIndex + 1,
3329
+ overflows: allOverflows
3330
+ },
3331
+ reset: {
3332
+ placement: resetPlacement
3333
+ }
3334
+ } : {};
3335
+ }
3336
+ };
3337
+ }, flip$2 = function(options) {
3264
3338
  return options === void 0 && (options = {}), {
3265
3339
  name: "flip",
3266
3340
  options,
@@ -3286,7 +3360,7 @@ const arrow$3 = (options) => ({
3286
3360
  return {};
3287
3361
  const side = getSide(placement), initialSideAxis = getSideAxis(initialPlacement), isBasePlacement = getSide(initialPlacement) === initialPlacement, rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)), fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)), hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
3288
3362
  !specifiedFallbackPlacements && hasFallbackAxisSideDirection && fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3289
- const placements = [initialPlacement, ...fallbackPlacements], overflow = await detectOverflow(state, detectOverflowOptions), overflows = [];
3363
+ const placements2 = [initialPlacement, ...fallbackPlacements], overflow = await detectOverflow(state, detectOverflowOptions), overflows = [];
3290
3364
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3291
3365
  if (checkMainAxis && overflows.push(overflow[side]), checkCrossAxis) {
3292
3366
  const sides2 = getAlignmentSides(placement, rects, rtl);
@@ -3297,21 +3371,19 @@ const arrow$3 = (options) => ({
3297
3371
  overflows
3298
3372
  }], !overflows.every((side2) => side2 <= 0)) {
3299
3373
  var _middlewareData$flip2, _overflowsData$filter;
3300
- const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1, nextPlacement = placements[nextIndex];
3301
- if (nextPlacement) {
3302
- var _overflowsData$;
3303
- const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : !1, hasInitialMainAxisOverflow = ((_overflowsData$ = overflowsData[0]) == null ? void 0 : _overflowsData$.overflows[0]) > 0;
3304
- if (!ignoreCrossAxisOverflow || hasInitialMainAxisOverflow)
3305
- return {
3306
- data: {
3307
- index: nextIndex,
3308
- overflows: overflowsData
3309
- },
3310
- reset: {
3311
- placement: nextPlacement
3312
- }
3313
- };
3314
- }
3374
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1, nextPlacement = placements2[nextIndex];
3375
+ if (nextPlacement && (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : !1) || // We leave the current main axis only if every placement on that axis
3376
+ // overflows the main axis.
3377
+ overflowsData.every((d2) => getSideAxis(d2.placement) === initialSideAxis ? d2.overflows[0] > 0 : !0)))
3378
+ return {
3379
+ data: {
3380
+ index: nextIndex,
3381
+ overflows: overflowsData
3382
+ },
3383
+ reset: {
3384
+ placement: nextPlacement
3385
+ }
3386
+ };
3315
3387
  let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
3316
3388
  if (!resetPlacement)
3317
3389
  switch (fallbackStrategy) {
@@ -3476,13 +3548,13 @@ const inline$2 = function(options) {
3476
3548
  } : {};
3477
3549
  }
3478
3550
  };
3479
- };
3551
+ }, originSides = /* @__PURE__ */ new Set(["left", "top"]);
3480
3552
  async function convertValueToCoords(state, options) {
3481
3553
  const {
3482
3554
  placement,
3483
3555
  platform: platform2,
3484
3556
  elements
3485
- } = state, rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)), side = getSide(placement), alignment = getAlignment(placement), isVertical = getSideAxis(placement) === "y", mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1, crossAxisMulti = rtl && isVertical ? -1 : 1, rawValue = evaluate(options, state);
3557
+ } = state, rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)), side = getSide(placement), alignment = getAlignment(placement), isVertical = getSideAxis(placement) === "y", mainAxisMulti = originSides.has(side) ? -1 : 1, crossAxisMulti = rtl && isVertical ? -1 : 1, rawValue = evaluate(options, state);
3486
3558
  let {
3487
3559
  mainAxis,
3488
3560
  crossAxis,
@@ -3615,7 +3687,7 @@ const offset$3 = function(options) {
3615
3687
  }
3616
3688
  if (checkCrossAxis) {
3617
3689
  var _middlewareData$offse, _middlewareData$offse2;
3618
- const len = mainAxis === "y" ? "width" : "height", isOriginSide = ["top", "left"].includes(getSide(placement)), limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide && ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0) + (isOriginSide ? 0 : computedOffset.crossAxis), limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
3690
+ const len = mainAxis === "y" ? "width" : "height", isOriginSide = originSides.has(getSide(placement)), limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide && ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0) + (isOriginSide ? 0 : computedOffset.crossAxis), limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
3619
3691
  crossAxisCoord < limitMin ? crossAxisCoord = limitMin : crossAxisCoord > limitMax && (crossAxisCoord = limitMax);
3620
3692
  }
3621
3693
  return {
@@ -3797,6 +3869,7 @@ function getViewportRect(element, strategy) {
3797
3869
  y: y2
3798
3870
  };
3799
3871
  }
3872
+ const absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
3800
3873
  function getInnerBoundingClientRect(element, strategy) {
3801
3874
  const clientRect = getBoundingClientRect(element, !0, strategy === "fixed"), top = clientRect.top + element.clientTop, left = clientRect.left + element.clientLeft, scale2 = isHTMLElement(element) ? getScale(element) : createCoords(1), width = element.clientWidth * scale2.x, height = element.clientHeight * scale2.y, x = left * scale2.x, y2 = top * scale2.y;
3802
3875
  return {
@@ -3838,7 +3911,7 @@ function getClippingElementAncestors(element, cache) {
3838
3911
  let currentNode = elementIsFixed ? getParentNode(element) : element;
3839
3912
  for (; isElement(currentNode) && !isLastTraversableNode(currentNode); ) {
3840
3913
  const computedStyle = getComputedStyle(currentNode), currentNodeIsContaining = isContainingBlock(currentNode);
3841
- !currentNodeIsContaining && computedStyle.position === "fixed" && (currentContainingBlockComputedStyle = null), (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) ? result = result.filter((ancestor) => ancestor !== currentNode) : currentContainingBlockComputedStyle = computedStyle, currentNode = getParentNode(currentNode);
3914
+ !currentNodeIsContaining && computedStyle.position === "fixed" && (currentContainingBlockComputedStyle = null), (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) ? result = result.filter((ancestor) => ancestor !== currentNode) : currentContainingBlockComputedStyle = computedStyle, currentNode = getParentNode(currentNode);
3842
3915
  }
3843
3916
  return cache.set(element, result), result;
3844
3917
  }
@@ -4035,7 +4108,7 @@ function autoUpdate(reference, floating, update, options) {
4035
4108
  }), cleanupIo?.(), (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect(), resizeObserver = null, animationFrame && cancelAnimationFrame(frameId);
4036
4109
  };
4037
4110
  }
4038
- const offset$2 = offset$3, shift$1 = shift$2, flip$1 = flip$2, size$1 = size$2, hide$1 = hide$2, arrow$2 = arrow$3, inline$1 = inline$2, limitShift$1 = limitShift$2, computePosition = (reference, floating, options) => {
4111
+ const offset$2 = offset$3, autoPlacement = autoPlacement$1, shift$1 = shift$2, flip$1 = flip$2, size$1 = size$2, hide$1 = hide$2, arrow$2 = arrow$3, inline$1 = inline$2, limitShift$1 = limitShift$2, computePosition = (reference, floating, options) => {
4039
4112
  const cache = /* @__PURE__ */ new Map(), mergedOptions = {
4040
4113
  platform,
4041
4114
  ...options
@@ -6082,8 +6155,8 @@ Loader.displayName = "@mantine/core/Loader";
6082
6155
  var classes$c = { root: "m_8d3f4000", icon: "m_8d3afb97", loader: "m_302b9fb1", group: "m_1a0f1b21", groupSection: "m_437b6484" };
6083
6156
  const defaultProps$e = {
6084
6157
  orientation: "horizontal"
6085
- }, varsResolver$f = (_, { borderWidth: borderWidth2 }) => ({
6086
- group: { "--ai-border-width": rem(borderWidth2) }
6158
+ }, varsResolver$f = (_, { borderWidth }) => ({
6159
+ group: { "--ai-border-width": rem(borderWidth) }
6087
6160
  }), ActionIconGroup = factory((_props, ref) => {
6088
6161
  const props = useProps("ActionIconGroup", defaultProps$e, _props), {
6089
6162
  className,
@@ -6093,7 +6166,7 @@ const defaultProps$e = {
6093
6166
  unstyled,
6094
6167
  orientation,
6095
6168
  vars,
6096
- borderWidth: borderWidth2,
6169
+ borderWidth,
6097
6170
  variant,
6098
6171
  mod,
6099
6172
  attributes,
@@ -6244,7 +6317,7 @@ const varsResolver$d = (theme, { size: size2, radius, variant, gradient, color:
6244
6317
  ref,
6245
6318
  mod: [{ loading, disabled: disabled || dataDisabled }, mod],
6246
6319
  children: [
6247
- /* @__PURE__ */ jsx(Transition$1, { mounted: !!loading, transition: "slide-down", duration: 150, children: (transitionStyles) => /* @__PURE__ */ jsx(Box$1, { component: "span", ...getStyles2("loader", { style: transitionStyles }), "aria-hidden": !0, children: /* @__PURE__ */ jsx(Loader, { color: "var(--ai-color)", size: "calc(var(--ai-size) * 0.55)", ...loaderProps }) }) }),
6320
+ typeof loading == "boolean" && /* @__PURE__ */ jsx(Transition$1, { mounted: loading, transition: "slide-down", duration: 150, children: (transitionStyles) => /* @__PURE__ */ jsx(Box$1, { component: "span", ...getStyles2("loader", { style: transitionStyles }), "aria-hidden": !0, children: /* @__PURE__ */ jsx(Loader, { color: "var(--ai-color)", size: "calc(var(--ai-size) * 0.55)", ...loaderProps }) }) }),
6248
6321
  /* @__PURE__ */ jsx(Box$1, { component: "span", mod: { loading }, ...getStyles2("icon"), children: children2 })
6249
6322
  ]
6250
6323
  }
@@ -6625,8 +6698,8 @@ function CheckIcon({ size: size2, style: style2, ...others }) {
6625
6698
  var classes$7 = { root: "m_77c9d27d", inner: "m_80f1301b", label: "m_811560b9", section: "m_a74036a", loader: "m_a25b86ee", group: "m_80d6d844", groupSection: "m_70be2a01" };
6626
6699
  const defaultProps$b = {
6627
6700
  orientation: "horizontal"
6628
- }, varsResolver$9 = (_, { borderWidth: borderWidth2 }) => ({
6629
- group: { "--button-border-width": rem(borderWidth2) }
6701
+ }, varsResolver$9 = (_, { borderWidth }) => ({
6702
+ group: { "--button-border-width": rem(borderWidth) }
6630
6703
  }), ButtonGroup = factory((_props, ref) => {
6631
6704
  const props = useProps("ButtonGroup", defaultProps$b, _props), {
6632
6705
  className,
@@ -6636,7 +6709,7 @@ const defaultProps$b = {
6636
6709
  unstyled,
6637
6710
  orientation,
6638
6711
  vars,
6639
- borderWidth: borderWidth2,
6712
+ borderWidth,
6640
6713
  variant,
6641
6714
  mod,
6642
6715
  attributes,
@@ -6804,7 +6877,7 @@ const loaderTransition = {
6804
6877
  ],
6805
6878
  ...others,
6806
6879
  children: [
6807
- /* @__PURE__ */ jsx(Transition$1, { mounted: !!loading, transition: loaderTransition, duration: 150, children: (transitionStyles) => /* @__PURE__ */ jsx(Box$1, { component: "span", ...getStyles2("loader", { style: transitionStyles }), "aria-hidden": !0, children: /* @__PURE__ */ jsx(
6880
+ typeof loading == "boolean" && /* @__PURE__ */ jsx(Transition$1, { mounted: loading, transition: loaderTransition, duration: 150, children: (transitionStyles) => /* @__PURE__ */ jsx(Box$1, { component: "span", ...getStyles2("loader", { style: transitionStyles }), "aria-hidden": !0, children: /* @__PURE__ */ jsx(
6808
6881
  Loader,
6809
6882
  {
6810
6883
  color: "var(--button-color)",
@@ -9897,12 +9970,12 @@ function* selection_iterator() {
9897
9970
  for (var group = groups[j], i2 = 0, n2 = group.length, node; i2 < n2; ++i2)
9898
9971
  (node = group[i2]) && (yield node);
9899
9972
  }
9900
- var root$1 = [null];
9973
+ var root = [null];
9901
9974
  function Selection$1(groups, parents) {
9902
9975
  this._groups = groups, this._parents = parents;
9903
9976
  }
9904
9977
  function selection() {
9905
- return new Selection$1([[document.documentElement]], root$1);
9978
+ return new Selection$1([[document.documentElement]], root);
9906
9979
  }
9907
9980
  function selection_selection() {
9908
9981
  return this;
@@ -9946,7 +10019,7 @@ Selection$1.prototype = selection.prototype = {
9946
10019
  [Symbol.iterator]: selection_iterator
9947
10020
  };
9948
10021
  function select(selector2) {
9949
- return typeof selector2 == "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root$1);
10022
+ return typeof selector2 == "string" ? new Selection$1([[document.querySelector(selector2)]], [document.documentElement]) : new Selection$1([[selector2]], root);
9950
10023
  }
9951
10024
  function sourceEvent(event) {
9952
10025
  let sourceEvent2;
@@ -10458,11 +10531,47 @@ const interpolateRgb = function rgbGamma(y2) {
10458
10531
  }
10459
10532
  return rgb$1.gamma = rgbGamma, rgb$1;
10460
10533
  }(1);
10534
+ function numberArray(a, b) {
10535
+ b || (b = []);
10536
+ var n2 = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i2;
10537
+ return function(t2) {
10538
+ for (i2 = 0; i2 < n2; ++i2) c[i2] = a[i2] * (1 - t2) + b[i2] * t2;
10539
+ return c;
10540
+ };
10541
+ }
10542
+ function isNumberArray(x) {
10543
+ return ArrayBuffer.isView(x) && !(x instanceof DataView);
10544
+ }
10545
+ function genericArray(a, b) {
10546
+ var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i2;
10547
+ for (i2 = 0; i2 < na; ++i2) x[i2] = interpolate$1(a[i2], b[i2]);
10548
+ for (; i2 < nb; ++i2) c[i2] = b[i2];
10549
+ return function(t2) {
10550
+ for (i2 = 0; i2 < na; ++i2) c[i2] = x[i2](t2);
10551
+ return c;
10552
+ };
10553
+ }
10554
+ function date(a, b) {
10555
+ var d2 = /* @__PURE__ */ new Date();
10556
+ return a = +a, b = +b, function(t2) {
10557
+ return d2.setTime(a * (1 - t2) + b * t2), d2;
10558
+ };
10559
+ }
10461
10560
  function interpolateNumber(a, b) {
10462
10561
  return a = +a, b = +b, function(t2) {
10463
10562
  return a * (1 - t2) + b * t2;
10464
10563
  };
10465
10564
  }
10565
+ function object(a, b) {
10566
+ var i2 = {}, c = {}, k;
10567
+ (a === null || typeof a != "object") && (a = {}), (b === null || typeof b != "object") && (b = {});
10568
+ for (k in b)
10569
+ k in a ? i2[k] = interpolate$1(a[k], b[k]) : c[k] = b[k];
10570
+ return function(t2) {
10571
+ for (k in i2) c[k] = i2[k](t2);
10572
+ return c;
10573
+ };
10574
+ }
10466
10575
  var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, reB = new RegExp(reA.source, "g");
10467
10576
  function zero(b) {
10468
10577
  return function() {
@@ -10483,6 +10592,10 @@ function interpolateString(a, b) {
10483
10592
  return s2.join("");
10484
10593
  });
10485
10594
  }
10595
+ function interpolate$1(a, b) {
10596
+ var t2 = typeof b, c;
10597
+ return b == null || t2 === "boolean" ? constant$1(b) : (t2 === "number" ? interpolateNumber : t2 === "string" ? (c = color(b)) ? (b = c, interpolateRgb) : interpolateString : b instanceof color ? interpolateRgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf != "function" && typeof b.toString != "function" || isNaN(b) ? object : interpolateNumber)(a, b);
10598
+ }
10486
10599
  var degrees = 180 / Math.PI, identity$2 = {
10487
10600
  translateX: 0,
10488
10601
  translateY: 0,
@@ -11463,7 +11576,22 @@ const errorMessages = {
11463
11576
  }, infiniteExtent = [
11464
11577
  [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],
11465
11578
  [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]
11466
- ], elementSelectionKeys = ["Enter", " ", "Escape"];
11579
+ ], elementSelectionKeys = ["Enter", " ", "Escape"], defaultAriaLabelConfig = {
11580
+ "node.a11yDescription.default": "Press enter or space to select a node. Press delete to remove it and escape to cancel.",
11581
+ "node.a11yDescription.keyboardDisabled": "Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.",
11582
+ "node.a11yDescription.ariaLiveMessage": ({ direction, x, y: y2 }) => `Moved selected node ${direction}. New position, x: ${x}, y: ${y2}`,
11583
+ "edge.a11yDescription.default": "Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.",
11584
+ // Control elements
11585
+ "controls.ariaLabel": "Control Panel",
11586
+ "controls.zoomIn.ariaLabel": "Zoom In",
11587
+ "controls.zoomOut.ariaLabel": "Zoom Out",
11588
+ "controls.fitView.ariaLabel": "Fit View",
11589
+ "controls.interactive.ariaLabel": "Toggle Interactivity",
11590
+ // Mini map
11591
+ "minimap.ariaLabel": "Mini Map",
11592
+ // Handle
11593
+ "handle.ariaLabel": "Handle"
11594
+ };
11467
11595
  var ConnectionMode;
11468
11596
  (function(ConnectionMode2) {
11469
11597
  ConnectionMode2.Strict = "strict", ConnectionMode2.Loose = "loose";
@@ -11566,11 +11694,15 @@ async function fitViewport({ nodes, width, height, panZoom, minZoom, maxZoom },
11566
11694
  if (nodes.size === 0)
11567
11695
  return Promise.resolve(!0);
11568
11696
  const nodesToFit = getFitViewNodes(nodes, options), bounds = getInternalNodesBounds(nodesToFit), viewport = getViewportForBounds(bounds, width, height, options?.minZoom ?? minZoom, options?.maxZoom ?? maxZoom, options?.padding ?? 0.1);
11569
- return await panZoom.setViewport(viewport, { duration: options?.duration }), Promise.resolve(!0);
11697
+ return await panZoom.setViewport(viewport, {
11698
+ duration: options?.duration,
11699
+ ease: options?.ease,
11700
+ interpolate: options?.interpolate
11701
+ }), Promise.resolve(!0);
11570
11702
  }
11571
11703
  function calculateNodePosition({ nodeId, nextPosition, nodeLookup, nodeOrigin = [0, 0], nodeExtent, onError }) {
11572
11704
  const node = nodeLookup.get(nodeId), parentNode = node.parentId ? nodeLookup.get(node.parentId) : void 0, { x: parentX, y: parentY } = parentNode ? parentNode.internals.positionAbsolute : { x: 0, y: 0 }, origin = node.origin ?? nodeOrigin;
11573
- let extent = nodeExtent;
11705
+ let extent = node.extent || nodeExtent;
11574
11706
  if (node.extent === "parent" && !node.expandParent)
11575
11707
  if (!parentNode)
11576
11708
  onError?.("005", errorMessages.error005());
@@ -11767,6 +11899,9 @@ function withResolvers() {
11767
11899
  resolve = res, reject = rej;
11768
11900
  }), resolve, reject };
11769
11901
  }
11902
+ function mergeAriaLabelConfig(partial) {
11903
+ return { ...defaultAriaLabelConfig, ...partial || {} };
11904
+ }
11770
11905
  function getPointerPosition(event, { snapGrid = [0, 0], snapToGrid = !1, transform: transform2, containerBounds }) {
11771
11906
  const { x, y: y2 } = getEventPosition(event), pointerPos = pointToRendererPoint({ x: x - (containerBounds?.left ?? 0), y: y2 - (containerBounds?.top ?? 0) }, transform2), { x: xSnapped, y: ySnapped } = snapToGrid ? snapPosition(pointerPos, snapGrid) : pointerPos;
11772
11907
  return {
@@ -11860,11 +11995,11 @@ function getEdgeCenter({ sourceX, sourceY, targetX, targetY }) {
11860
11995
  const xOffset = Math.abs(targetX - sourceX) / 2, centerX = targetX < sourceX ? targetX + xOffset : targetX - xOffset, yOffset = Math.abs(targetY - sourceY) / 2, centerY = targetY < sourceY ? targetY + yOffset : targetY - yOffset;
11861
11996
  return [centerX, centerY, xOffset, yOffset];
11862
11997
  }
11863
- function getElevatedEdgeZIndex({ sourceNode, targetNode, selected: selected2 = !1, zIndex = 0, elevateOnSelect = !1 }) {
11864
- if (!elevateOnSelect)
11998
+ function getElevatedEdgeZIndex({ sourceNode, targetNode, selected: selected2 = !1, zIndex, elevateOnSelect = !1 }) {
11999
+ if (zIndex !== void 0)
11865
12000
  return zIndex;
11866
- const edgeOrConnectedNodeSelected = selected2 || targetNode.selected || sourceNode.selected, selectedZIndex = Math.max(sourceNode.internals.z || 0, targetNode.internals.z || 0, 1e3);
11867
- return zIndex + (edgeOrConnectedNodeSelected ? selectedZIndex : 0);
12001
+ const edgeZ = elevateOnSelect && selected2 ? 1e3 : 0, nodeZ = Math.max(sourceNode.parentId ? sourceNode.internals.z : 0, targetNode.parentId ? targetNode.internals.z : 0);
12002
+ return edgeZ + nodeZ;
11868
12003
  }
11869
12004
  function isEdgeVisible({ sourceNode, targetNode, width, height, transform: transform2 }) {
11870
12005
  const edgeBox = getBoundsOfBoxes(nodeToBox(sourceNode), nodeToBox(targetNode));
@@ -11901,21 +12036,21 @@ const handleDirections = {
11901
12036
  [Position.Top]: { x: 0, y: -1 },
11902
12037
  [Position.Bottom]: { x: 0, y: 1 }
11903
12038
  }, getDirection = ({ source, sourcePosition = Position.Bottom, target }) => sourcePosition === Position.Left || sourcePosition === Position.Right ? source.x < target.x ? { x: 1, y: 0 } : { x: -1, y: 0 } : source.y < target.y ? { x: 0, y: 1 } : { x: 0, y: -1 }, distance = (a, b) => Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2));
11904
- function getPoints({ source, sourcePosition = Position.Bottom, target, targetPosition = Position.Top, center, offset: offset2 }) {
12039
+ function getPoints({ source, sourcePosition = Position.Bottom, target, targetPosition = Position.Top, center, offset: offset2, stepPosition }) {
11905
12040
  const sourceDir = handleDirections[sourcePosition], targetDir = handleDirections[targetPosition], sourceGapped = { x: source.x + sourceDir.x * offset2, y: source.y + sourceDir.y * offset2 }, targetGapped = { x: target.x + targetDir.x * offset2, y: target.y + targetDir.y * offset2 }, dir = getDirection({
11906
12041
  source: sourceGapped,
11907
12042
  sourcePosition,
11908
12043
  target: targetGapped
11909
12044
  }), dirAccessor = dir.x !== 0 ? "x" : "y", currDir = dir[dirAccessor];
11910
12045
  let points = [], centerX, centerY;
11911
- const sourceGapOffset = { x: 0, y: 0 }, targetGapOffset = { x: 0, y: 0 }, [defaultCenterX, defaultCenterY, defaultOffsetX, defaultOffsetY] = getEdgeCenter({
12046
+ const sourceGapOffset = { x: 0, y: 0 }, targetGapOffset = { x: 0, y: 0 }, [, , defaultOffsetX, defaultOffsetY] = getEdgeCenter({
11912
12047
  sourceX: source.x,
11913
12048
  sourceY: source.y,
11914
12049
  targetX: target.x,
11915
12050
  targetY: target.y
11916
12051
  });
11917
12052
  if (sourceDir[dirAccessor] * targetDir[dirAccessor] === -1) {
11918
- centerX = center.x ?? defaultCenterX, centerY = center.y ?? defaultCenterY;
12053
+ dirAccessor === "x" ? (centerX = center.x ?? sourceGapped.x + (targetGapped.x - sourceGapped.x) * stepPosition, centerY = center.y ?? (sourceGapped.y + targetGapped.y) / 2) : (centerX = center.x ?? (sourceGapped.x + targetGapped.x) / 2, centerY = center.y ?? sourceGapped.y + (targetGapped.y - sourceGapped.y) * stepPosition);
11919
12054
  const verticalSplit = [
11920
12055
  { x: centerX, y: sourceGapped.y },
11921
12056
  { x: centerX, y: targetGapped.y }
@@ -11959,14 +12094,15 @@ function getBend(a, b, c, size2) {
11959
12094
  const xDir = a.x < c.x ? 1 : -1, yDir = a.y < c.y ? -1 : 1;
11960
12095
  return `L ${x},${y2 + bendSize * yDir}Q ${x},${y2} ${x + bendSize * xDir},${y2}`;
11961
12096
  }
11962
- function getSmoothStepPath({ sourceX, sourceY, sourcePosition = Position.Bottom, targetX, targetY, targetPosition = Position.Top, borderRadius: borderRadius2 = 5, centerX, centerY, offset: offset2 = 20 }) {
12097
+ function getSmoothStepPath({ sourceX, sourceY, sourcePosition = Position.Bottom, targetX, targetY, targetPosition = Position.Top, borderRadius: borderRadius2 = 5, centerX, centerY, offset: offset2 = 20, stepPosition = 0.5 }) {
11963
12098
  const [points, labelX, labelY, offsetX, offsetY] = getPoints({
11964
12099
  source: { x: sourceX, y: sourceY },
11965
12100
  sourcePosition,
11966
12101
  target: { x: targetX, y: targetY },
11967
12102
  targetPosition,
11968
12103
  center: { x: centerX, y: centerY },
11969
- offset: offset2
12104
+ offset: offset2,
12105
+ stepPosition
11970
12106
  });
11971
12107
  return [points.reduce((res, p, i2) => {
11972
12108
  let segment = "";
@@ -12158,7 +12294,7 @@ function calculateChildXYZ(childNode, parentNode, nodeOrigin, nodeExtent, select
12158
12294
  return {
12159
12295
  x: absolutePosition.x,
12160
12296
  y: absolutePosition.y,
12161
- z: parentZ > childZ ? parentZ : childZ
12297
+ z: parentZ >= childZ ? parentZ + 1 : childZ
12162
12298
  };
12163
12299
  }
12164
12300
  function handleExpandParent(children2, nodeLookup, parentLookup, nodeOrigin = [0, 0]) {
@@ -12350,28 +12486,43 @@ function getEventHandlerParams({ nodeId, dragItems, nodeLookup, dragging = !0 })
12350
12486
  nodesFromDragItems
12351
12487
  ];
12352
12488
  }
12489
+ function calculateSnapOffset({ dragItems, snapGrid, x, y: y2 }) {
12490
+ const refDragItem = dragItems.values().next().value;
12491
+ if (!refDragItem)
12492
+ return null;
12493
+ const refPos = {
12494
+ x: x - refDragItem.distance.x,
12495
+ y: y2 - refDragItem.distance.y
12496
+ }, refPosSnapped = snapPosition(refPos, snapGrid);
12497
+ return {
12498
+ x: refPosSnapped.x - refPos.x,
12499
+ y: refPosSnapped.y - refPos.y
12500
+ };
12501
+ }
12353
12502
  function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragStop }) {
12354
- let lastPos = { x: null, y: null }, autoPanId = 0, dragItems = /* @__PURE__ */ new Map(), autoPanStarted = !1, mousePosition = { x: 0, y: 0 }, containerBounds = null, dragStarted = !1, d3Selection = null, abortDrag = !1;
12503
+ let lastPos = { x: null, y: null }, autoPanId = 0, dragItems = /* @__PURE__ */ new Map(), autoPanStarted = !1, mousePosition = { x: 0, y: 0 }, containerBounds = null, dragStarted = !1, d3Selection = null, abortDrag = !1, nodePositionsChanged = !1, dragEvent = null;
12355
12504
  function update({ noDragClassName, handleSelector, domNode, isSelectable, nodeId, nodeClickDistance = 0 }) {
12356
12505
  d3Selection = select(domNode);
12357
- function updateNodes({ x, y: y2 }, dragEvent) {
12506
+ function updateNodes({ x, y: y2 }) {
12358
12507
  const { nodeLookup, nodeExtent, snapGrid, snapToGrid, nodeOrigin, onNodeDrag, onSelectionDrag, onError, updateNodePositions } = getStoreItems();
12359
12508
  lastPos = { x, y: y2 };
12360
- let hasChange = !1, nodesBox = { x: 0, y: 0, x2: 0, y2: 0 };
12361
- if (dragItems.size > 1 && nodeExtent) {
12362
- const rect = getInternalNodesBounds(dragItems);
12363
- nodesBox = rectToBox(rect);
12364
- }
12509
+ let hasChange = !1;
12510
+ const isMultiDrag = dragItems.size > 1, nodesBox = isMultiDrag && nodeExtent ? rectToBox(getInternalNodesBounds(dragItems)) : null, multiDragSnapOffset = isMultiDrag && snapToGrid ? calculateSnapOffset({
12511
+ dragItems,
12512
+ snapGrid,
12513
+ x,
12514
+ y: y2
12515
+ }) : null;
12365
12516
  for (const [id2, dragItem] of dragItems) {
12366
12517
  if (!nodeLookup.has(id2))
12367
12518
  continue;
12368
12519
  let nextPosition = { x: x - dragItem.distance.x, y: y2 - dragItem.distance.y };
12369
- snapToGrid && (nextPosition = snapPosition(nextPosition, snapGrid));
12370
- let adjustedNodeExtent = [
12371
- [nodeExtent[0][0], nodeExtent[0][1]],
12372
- [nodeExtent[1][0], nodeExtent[1][1]]
12373
- ];
12374
- if (dragItems.size > 1 && nodeExtent && !dragItem.extent) {
12520
+ snapToGrid && (nextPosition = multiDragSnapOffset ? {
12521
+ x: nextPosition.x + multiDragSnapOffset.x,
12522
+ y: nextPosition.y + multiDragSnapOffset.y
12523
+ } : snapPosition(nextPosition, snapGrid));
12524
+ let adjustedNodeExtent = null;
12525
+ if (isMultiDrag && nodeExtent && !dragItem.extent && nodesBox) {
12375
12526
  const { positionAbsolute: positionAbsolute2 } = dragItem.internals, x1 = positionAbsolute2.x - nodesBox.x + nodeExtent[0][0], x2 = positionAbsolute2.x + dragItem.measured.width - nodesBox.x2 + nodeExtent[1][0], y1 = positionAbsolute2.y - nodesBox.y + nodeExtent[0][1], y22 = positionAbsolute2.y + dragItem.measured.height - nodesBox.y2 + nodeExtent[1][1];
12376
12527
  adjustedNodeExtent = [
12377
12528
  [x1, y1],
@@ -12382,13 +12533,13 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
12382
12533
  nodeId: id2,
12383
12534
  nextPosition,
12384
12535
  nodeLookup,
12385
- nodeExtent: adjustedNodeExtent,
12536
+ nodeExtent: adjustedNodeExtent || nodeExtent,
12386
12537
  nodeOrigin,
12387
12538
  onError
12388
12539
  });
12389
12540
  hasChange = hasChange || dragItem.position.x !== position.x || dragItem.position.y !== position.y, dragItem.position = position, dragItem.internals.positionAbsolute = positionAbsolute;
12390
12541
  }
12391
- if (hasChange && (updateNodePositions(dragItems, !0), dragEvent && (onDrag || onNodeDrag || !nodeId && onSelectionDrag))) {
12542
+ if (nodePositionsChanged = nodePositionsChanged || hasChange, !!hasChange && (updateNodePositions(dragItems, !0), dragEvent && (onDrag || onNodeDrag || !nodeId && onSelectionDrag))) {
12392
12543
  const [currentNode, currentNodes] = getEventHandlerParams({
12393
12544
  nodeId,
12394
12545
  dragItems,
@@ -12406,7 +12557,7 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
12406
12557
  return;
12407
12558
  }
12408
12559
  const [xMovement, yMovement] = calcAutoPan(mousePosition, containerBounds, autoPanSpeed);
12409
- (xMovement !== 0 || yMovement !== 0) && (lastPos.x = (lastPos.x ?? 0) - xMovement / transform2[2], lastPos.y = (lastPos.y ?? 0) - yMovement / transform2[2], await panBy2({ x: xMovement, y: yMovement }) && updateNodes(lastPos, null)), autoPanId = requestAnimationFrame(autoPan);
12560
+ (xMovement !== 0 || yMovement !== 0) && (lastPos.x = (lastPos.x ?? 0) - xMovement / transform2[2], lastPos.y = (lastPos.y ?? 0) - yMovement / transform2[2], await panBy2({ x: xMovement, y: yMovement }) && updateNodes(lastPos)), autoPanId = requestAnimationFrame(autoPan);
12410
12561
  }
12411
12562
  function startDrag(event) {
12412
12563
  const { nodeLookup, multiSelectionActive, nodesDraggable, transform: transform2, snapGrid, snapToGrid, selectNodesOnDrag, onNodeDragStart, onSelectionDragStart, unselectNodesAndEdges } = getStoreItems();
@@ -12423,21 +12574,21 @@ function XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragSto
12423
12574
  }
12424
12575
  const d3DragInstance = drag().clickDistance(nodeClickDistance).on("start", (event) => {
12425
12576
  const { domNode: domNode2, nodeDragThreshold, transform: transform2, snapGrid, snapToGrid } = getStoreItems();
12426
- containerBounds = domNode2?.getBoundingClientRect() || null, abortDrag = !1, nodeDragThreshold === 0 && startDrag(event), lastPos = getPointerPosition(event.sourceEvent, { transform: transform2, snapGrid, snapToGrid, containerBounds }), mousePosition = getEventPosition(event.sourceEvent, containerBounds);
12577
+ containerBounds = domNode2?.getBoundingClientRect() || null, abortDrag = !1, nodePositionsChanged = !1, dragEvent = event.sourceEvent, nodeDragThreshold === 0 && startDrag(event), lastPos = getPointerPosition(event.sourceEvent, { transform: transform2, snapGrid, snapToGrid, containerBounds }), mousePosition = getEventPosition(event.sourceEvent, containerBounds);
12427
12578
  }).on("drag", (event) => {
12428
12579
  const { autoPanOnNodeDrag, transform: transform2, snapGrid, snapToGrid, nodeDragThreshold, nodeLookup } = getStoreItems(), pointerPos = getPointerPosition(event.sourceEvent, { transform: transform2, snapGrid, snapToGrid, containerBounds });
12429
- if ((event.sourceEvent.type === "touchmove" && event.sourceEvent.touches.length > 1 || // if user deletes a node while dragging, we need to abort the drag to prevent errors
12580
+ if (dragEvent = event.sourceEvent, (event.sourceEvent.type === "touchmove" && event.sourceEvent.touches.length > 1 || // if user deletes a node while dragging, we need to abort the drag to prevent errors
12430
12581
  nodeId && !nodeLookup.has(nodeId)) && (abortDrag = !0), !abortDrag) {
12431
12582
  if (!autoPanStarted && autoPanOnNodeDrag && dragStarted && (autoPanStarted = !0, autoPan()), !dragStarted) {
12432
12583
  const x = pointerPos.xSnapped - (lastPos.x ?? 0), y2 = pointerPos.ySnapped - (lastPos.y ?? 0);
12433
12584
  Math.sqrt(x * x + y2 * y2) > nodeDragThreshold && startDrag(event);
12434
12585
  }
12435
- (lastPos.x !== pointerPos.xSnapped || lastPos.y !== pointerPos.ySnapped) && dragItems && dragStarted && (mousePosition = getEventPosition(event.sourceEvent, containerBounds), updateNodes(pointerPos, event.sourceEvent));
12586
+ (lastPos.x !== pointerPos.xSnapped || lastPos.y !== pointerPos.ySnapped) && dragItems && dragStarted && (mousePosition = getEventPosition(event.sourceEvent, containerBounds), updateNodes(pointerPos));
12436
12587
  }
12437
12588
  }).on("end", (event) => {
12438
12589
  if (!(!dragStarted || abortDrag) && (autoPanStarted = !1, dragStarted = !1, cancelAnimationFrame(autoPanId), dragItems.size > 0)) {
12439
12590
  const { nodeLookup, updateNodePositions, onNodeDragStop, onSelectionDragStop } = getStoreItems();
12440
- if (updateNodePositions(dragItems, !1), onDragStop || onNodeDragStop || !nodeId && onSelectionDragStop) {
12591
+ if (nodePositionsChanged && (updateNodePositions(dragItems, !1), nodePositionsChanged = !1), onDragStop || onNodeDragStop || !nodeId && onSelectionDragStop) {
12441
12592
  const [currentNode, currentNodes] = getEventHandlerParams({
12442
12593
  nodeId,
12443
12594
  dragItems,
@@ -12508,16 +12659,17 @@ function isConnectionValid(isInsideConnectionRadius, isHandleValid) {
12508
12659
  return isHandleValid ? isValid = !0 : isInsideConnectionRadius && !isHandleValid && (isValid = !1), isValid;
12509
12660
  }
12510
12661
  const alwaysValid = () => !0;
12511
- function onPointerDown(event, { connectionMode, connectionRadius, handleId, nodeId, edgeUpdaterType, isTarget, domNode, nodeLookup, lib, autoPanOnConnect, flowId, panBy: panBy2, cancelConnection, onConnectStart, onConnect, onConnectEnd, isValidConnection = alwaysValid, onReconnectEnd, updateConnection, getTransform, getFromHandle, autoPanSpeed }) {
12662
+ function onPointerDown(event, { connectionMode, connectionRadius, handleId, nodeId, edgeUpdaterType, isTarget, domNode, nodeLookup, lib, autoPanOnConnect, flowId, panBy: panBy2, cancelConnection, onConnectStart, onConnect, onConnectEnd, isValidConnection = alwaysValid, onReconnectEnd, updateConnection, getTransform, getFromHandle, autoPanSpeed, dragThreshold = 1, handleDomNode }) {
12512
12663
  const doc = getHostForElement(event.target);
12513
12664
  let autoPanId = 0, closestHandle;
12514
- const { x, y: y2 } = getEventPosition(event), clickedHandle = doc?.elementFromPoint(x, y2), handleType = getHandleType(edgeUpdaterType, clickedHandle), containerBounds = domNode?.getBoundingClientRect();
12665
+ const { x, y: y2 } = getEventPosition(event), handleType = getHandleType(edgeUpdaterType, handleDomNode), containerBounds = domNode?.getBoundingClientRect();
12666
+ let connectionStarted = !1;
12515
12667
  if (!containerBounds || !handleType)
12516
12668
  return;
12517
12669
  const fromHandleInternal = getHandle(nodeId, handleType, handleId, nodeLookup, connectionMode);
12518
12670
  if (!fromHandleInternal)
12519
12671
  return;
12520
- let position = getEventPosition(event, containerBounds), autoPanStarted = !1, connection = null, isValid = !1, handleDomNode = null;
12672
+ let position = getEventPosition(event, containerBounds), autoPanStarted = !1, connection = null, isValid = !1, resultHandleDomNode = null;
12521
12673
  function autoPan() {
12522
12674
  if (!autoPanOnConnect || !containerBounds)
12523
12675
  return;
@@ -12529,7 +12681,8 @@ function onPointerDown(event, { connectionMode, connectionRadius, handleId, node
12529
12681
  nodeId,
12530
12682
  type: handleType,
12531
12683
  position: fromHandleInternal.position
12532
- }, fromNodeInternal = nodeLookup.get(nodeId), newConnection = {
12684
+ }, fromNodeInternal = nodeLookup.get(nodeId);
12685
+ let previousConnection = {
12533
12686
  inProgress: !0,
12534
12687
  isValid: null,
12535
12688
  from: getHandlePosition(fromNodeInternal, fromHandle, Position.Left, !0),
@@ -12541,10 +12694,17 @@ function onPointerDown(event, { connectionMode, connectionRadius, handleId, node
12541
12694
  toPosition: oppositePosition[fromHandle.position],
12542
12695
  toNode: null
12543
12696
  };
12544
- updateConnection(newConnection);
12545
- let previousConnection = newConnection;
12546
- onConnectStart?.(event, { nodeId, handleId, handleType });
12697
+ function startConnection() {
12698
+ connectionStarted = !0, updateConnection(previousConnection), onConnectStart?.(event, { nodeId, handleId, handleType });
12699
+ }
12700
+ dragThreshold === 0 && startConnection();
12547
12701
  function onPointerMove(event2) {
12702
+ if (!connectionStarted) {
12703
+ const { x: evtX, y: evtY } = getEventPosition(event2), dx = evtX - x, dy = evtY - y2;
12704
+ if (!(dx * dx + dy * dy > dragThreshold * dragThreshold))
12705
+ return;
12706
+ startConnection();
12707
+ }
12548
12708
  if (!getFromHandle() || !fromHandle) {
12549
12709
  onPointerUp(event2);
12550
12710
  return;
@@ -12563,8 +12723,8 @@ function onPointerDown(event, { connectionMode, connectionRadius, handleId, node
12563
12723
  flowId,
12564
12724
  nodeLookup
12565
12725
  });
12566
- handleDomNode = result.handleDomNode, connection = result.connection, isValid = isConnectionValid(!!closestHandle, result.isValid);
12567
- const newConnection2 = {
12726
+ resultHandleDomNode = result.handleDomNode, connection = result.connection, isValid = isConnectionValid(!!closestHandle, result.isValid);
12727
+ const newConnection = {
12568
12728
  // from stays the same
12569
12729
  ...previousConnection,
12570
12730
  isValid,
@@ -12573,15 +12733,18 @@ function onPointerDown(event, { connectionMode, connectionRadius, handleId, node
12573
12733
  toPosition: isValid && result.toHandle ? result.toHandle.position : oppositePosition[fromHandle.position],
12574
12734
  toNode: result.toHandle ? nodeLookup.get(result.toHandle.nodeId) : null
12575
12735
  };
12576
- isValid && closestHandle && previousConnection.toHandle && newConnection2.toHandle && previousConnection.toHandle.type === newConnection2.toHandle.type && previousConnection.toHandle.nodeId === newConnection2.toHandle.nodeId && previousConnection.toHandle.id === newConnection2.toHandle.id && previousConnection.to.x === newConnection2.to.x && previousConnection.to.y === newConnection2.to.y || (updateConnection(newConnection2), previousConnection = newConnection2);
12736
+ isValid && closestHandle && previousConnection.toHandle && newConnection.toHandle && previousConnection.toHandle.type === newConnection.toHandle.type && previousConnection.toHandle.nodeId === newConnection.toHandle.nodeId && previousConnection.toHandle.id === newConnection.toHandle.id && previousConnection.to.x === newConnection.to.x && previousConnection.to.y === newConnection.to.y || (updateConnection(newConnection), previousConnection = newConnection);
12577
12737
  }
12578
12738
  function onPointerUp(event2) {
12579
- (closestHandle || handleDomNode) && connection && isValid && onConnect?.(connection);
12580
- const { inProgress, ...connectionState } = previousConnection, finalConnectionState = {
12581
- ...connectionState,
12582
- toPosition: previousConnection.toHandle ? previousConnection.toPosition : null
12583
- };
12584
- onConnectEnd?.(event2, finalConnectionState), edgeUpdaterType && onReconnectEnd?.(event2, finalConnectionState), cancelConnection(), cancelAnimationFrame(autoPanId), autoPanStarted = !1, isValid = !1, connection = null, handleDomNode = null, doc.removeEventListener("mousemove", onPointerMove), doc.removeEventListener("mouseup", onPointerUp), doc.removeEventListener("touchmove", onPointerMove), doc.removeEventListener("touchend", onPointerUp);
12739
+ if (connectionStarted) {
12740
+ (closestHandle || resultHandleDomNode) && connection && isValid && onConnect?.(connection);
12741
+ const { inProgress, ...connectionState } = previousConnection, finalConnectionState = {
12742
+ ...connectionState,
12743
+ toPosition: previousConnection.toHandle ? previousConnection.toPosition : null
12744
+ };
12745
+ onConnectEnd?.(event2, finalConnectionState), edgeUpdaterType && onReconnectEnd?.(event2, finalConnectionState);
12746
+ }
12747
+ cancelConnection(), cancelAnimationFrame(autoPanId), autoPanStarted = !1, isValid = !1, connection = null, resultHandleDomNode = null, doc.removeEventListener("mousemove", onPointerMove), doc.removeEventListener("mouseup", onPointerUp), doc.removeEventListener("touchmove", onPointerMove), doc.removeEventListener("touchend", onPointerUp);
12585
12748
  }
12586
12749
  doc.addEventListener("mousemove", onPointerMove), doc.addEventListener("mouseup", onPointerUp), doc.addEventListener("touchmove", onPointerMove), doc.addEventListener("touchend", onPointerUp);
12587
12750
  }
@@ -12614,12 +12777,11 @@ const XYHandle = {
12614
12777
  };
12615
12778
  function XYMinimap({ domNode, panZoom, getTransform, getViewScale }) {
12616
12779
  const selection2 = select(domNode);
12617
- function update({ translateExtent, width, height, zoomStep = 10, pannable = !0, zoomable = !0, inversePan = !1 }) {
12780
+ function update({ translateExtent, width, height, zoomStep = 1, pannable = !0, zoomable = !0, inversePan = !1 }) {
12618
12781
  const zoomHandler = (event) => {
12619
- const transform2 = getTransform();
12620
12782
  if (event.sourceEvent.type !== "wheel" || !panZoom)
12621
12783
  return;
12622
- const pinchDelta = -event.sourceEvent.deltaY * (event.sourceEvent.deltaMode === 1 ? 0.05 : event.sourceEvent.deltaMode ? 1 : 2e-3) * zoomStep, nextZoom = transform2[2] * Math.pow(2, pinchDelta);
12784
+ const transform2 = getTransform(), factor = event.sourceEvent.ctrlKey && isMacOs() ? 10 : 1, pinchDelta = -event.sourceEvent.deltaY * (event.sourceEvent.deltaMode === 1 ? 0.05 : event.sourceEvent.deltaMode ? 1 : 2e-3) * zoomStep, nextZoom = transform2[2] * Math.pow(2, pinchDelta * factor);
12623
12785
  panZoom.scaleTo(nextZoom);
12624
12786
  };
12625
12787
  let panStart = [0, 0];
@@ -12665,10 +12827,10 @@ const viewChanged = (prevViewport, eventViewport) => prevViewport.x !== eventVie
12665
12827
  x: transform2.x,
12666
12828
  y: transform2.y,
12667
12829
  zoom: transform2.k
12668
- }), viewportToTransform = ({ x, y: y2, zoom: zoom2 }) => identity$1.translate(x, y2).scale(zoom2), isWrappedWithClass = (event, className) => event.target.closest(`.${className}`), isRightClickPan = (panOnDrag, usedButton) => usedButton === 2 && Array.isArray(panOnDrag) && panOnDrag.includes(2), getD3Transition = (selection2, duration = 0, onEnd = () => {
12830
+ }), viewportToTransform = ({ x, y: y2, zoom: zoom2 }) => identity$1.translate(x, y2).scale(zoom2), isWrappedWithClass = (event, className) => event.target.closest(`.${className}`), isRightClickPan = (panOnDrag, usedButton) => usedButton === 2 && Array.isArray(panOnDrag) && panOnDrag.includes(2), defaultEase = (t2) => ((t2 *= 2) <= 1 ? t2 * t2 * t2 : (t2 -= 2) * t2 * t2 + 2) / 2, getD3Transition = (selection2, duration = 0, ease = defaultEase, onEnd = () => {
12669
12831
  }) => {
12670
12832
  const hasDuration = typeof duration == "number" && duration > 0;
12671
- return hasDuration || onEnd(), hasDuration ? selection2.transition().duration(duration).on("end", onEnd) : selection2;
12833
+ return hasDuration || onEnd(), hasDuration ? selection2.transition().duration(duration).ease(ease).on("end", onEnd) : selection2;
12672
12834
  }, wheelDelta = (event) => {
12673
12835
  const factor = event.ctrlKey && isMacOs() ? 10 : 1;
12674
12836
  return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 2e-3) * factor;
@@ -12771,7 +12933,7 @@ function XYPanZoom({ domNode, minZoom, maxZoom, paneClickDistance, translateExte
12771
12933
  d3ZoomInstance.wheelDelta(wheelDelta);
12772
12934
  function setTransform(transform2, options) {
12773
12935
  return d3Selection ? new Promise((resolve) => {
12774
- d3ZoomInstance?.transform(getD3Transition(d3Selection, options?.duration, () => resolve(!0)), transform2);
12936
+ d3ZoomInstance?.interpolate(options?.interpolate === "linear" ? interpolate$1 : interpolateZoom).transform(getD3Transition(d3Selection, options?.duration, options?.ease, () => resolve(!0)), transform2);
12775
12937
  }) : Promise.resolve(!1);
12776
12938
  }
12777
12939
  function update({ noWheelClassName, noPanClassName, onPaneContextMenu, userSelectionActive, panOnScroll, panOnDrag, panOnScrollMode, panOnScrollSpeed, preventScrolling, zoomOnPinch, zoomOnScroll, zoomOnDoubleClick, zoomActivationKeyPressed, lib, onTransformChange }) {
@@ -12854,12 +13016,12 @@ function XYPanZoom({ domNode, minZoom, maxZoom, paneClickDistance, translateExte
12854
13016
  }
12855
13017
  function scaleTo(zoom2, options) {
12856
13018
  return d3Selection ? new Promise((resolve) => {
12857
- d3ZoomInstance?.scaleTo(getD3Transition(d3Selection, options?.duration, () => resolve(!0)), zoom2);
13019
+ d3ZoomInstance?.interpolate(options?.interpolate === "linear" ? interpolate$1 : interpolateZoom).scaleTo(getD3Transition(d3Selection, options?.duration, options?.ease, () => resolve(!0)), zoom2);
12858
13020
  }) : Promise.resolve(!1);
12859
13021
  }
12860
13022
  function scaleBy(factor, options) {
12861
13023
  return d3Selection ? new Promise((resolve) => {
12862
- d3ZoomInstance?.scaleBy(getD3Transition(d3Selection, options?.duration, () => resolve(!0)), factor);
13024
+ d3ZoomInstance?.interpolate(options?.interpolate === "linear" ? interpolate$1 : interpolateZoom).scaleBy(getD3Transition(d3Selection, options?.duration, options?.ease, () => resolve(!0)), factor);
12863
13025
  }) : Promise.resolve(!1);
12864
13026
  }
12865
13027
  function setScaleExtent(scaleExtent) {
@@ -13145,7 +13307,7 @@ function requireWithSelector_production() {
13145
13307
  function is(x, y2) {
13146
13308
  return x === y2 && (x !== 0 || 1 / x === 1 / y2) || x !== x && y2 !== y2;
13147
13309
  }
13148
- var objectIs = typeof Object.is == "function" ? Object.is : is, useSyncExternalStore2 = shim2.useSyncExternalStore, useRef2 = React2.useRef, useEffect2 = React2.useEffect, useMemo2 = React2.useMemo, useDebugValue2 = React2.useDebugValue;
13310
+ var objectIs = typeof Object.is == "function" ? Object.is : is, useSyncExternalStore = shim2.useSyncExternalStore, useRef2 = React2.useRef, useEffect2 = React2.useEffect, useMemo2 = React2.useMemo, useDebugValue2 = React2.useDebugValue;
13149
13311
  return withSelector_production.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector2, isEqual2) {
13150
13312
  var instRef = useRef2(null);
13151
13313
  if (instRef.current === null) {
@@ -13179,7 +13341,7 @@ function requireWithSelector_production() {
13179
13341
  },
13180
13342
  [getSnapshot, getServerSnapshot, selector2, isEqual2]
13181
13343
  );
13182
- var value = useSyncExternalStore2(subscribe, instRef[0], instRef[1]);
13344
+ var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
13183
13345
  return useEffect2(
13184
13346
  function() {
13185
13347
  inst.hasValue = !0, inst.value = value;
@@ -13250,7 +13412,7 @@ function shallow$1(objA, objB) {
13250
13412
  return !0;
13251
13413
  }
13252
13414
  const StoreContext = createContext(null), Provider$1 = StoreContext.Provider, zustandErrorMessage = errorMessages.error001();
13253
- function useStore$1(selector2, equalityFn) {
13415
+ function useStore(selector2, equalityFn) {
13254
13416
  const store = useContext(StoreContext);
13255
13417
  if (store === null)
13256
13418
  throw new Error(zustandErrorMessage);
@@ -13276,17 +13438,18 @@ const style$1 = { display: "none" }, ariaLiveStyle = {
13276
13438
  overflow: "hidden",
13277
13439
  clip: "rect(0px, 0px, 0px, 0px)",
13278
13440
  clipPath: "inset(100%)"
13279
- }, ARIA_NODE_DESC_KEY = "react-flow__node-desc", ARIA_EDGE_DESC_KEY = "react-flow__edge-desc", ARIA_LIVE_MESSAGE = "react-flow__aria-live", selector$o = (s2) => s2.ariaLiveMessage;
13441
+ }, ARIA_NODE_DESC_KEY = "react-flow__node-desc", ARIA_EDGE_DESC_KEY = "react-flow__edge-desc", ARIA_LIVE_MESSAGE = "react-flow__aria-live", ariaLiveSelector = (s2) => s2.ariaLiveMessage, ariaLabelConfigSelector = (s2) => s2.ariaLabelConfig;
13280
13442
  function AriaLiveMessage({ rfId }) {
13281
- const ariaLiveMessage = useStore$1(selector$o);
13443
+ const ariaLiveMessage = useStore(ariaLiveSelector);
13282
13444
  return jsx("div", { id: `${ARIA_LIVE_MESSAGE}-${rfId}`, "aria-live": "assertive", "aria-atomic": "true", style: ariaLiveStyle, children: ariaLiveMessage });
13283
13445
  }
13284
13446
  function A11yDescriptions({ rfId, disableKeyboardA11y }) {
13285
- return jsxs(Fragment$1, { children: [jsxs("div", { id: `${ARIA_NODE_DESC_KEY}-${rfId}`, style: style$1, children: ["Press enter or space to select a node.", !disableKeyboardA11y && "You can then use the arrow keys to move the node around.", " Press delete to remove it and escape to cancel.", " "] }), jsx("div", { id: `${ARIA_EDGE_DESC_KEY}-${rfId}`, style: style$1, children: "Press enter or space to select an edge. You can then press delete to remove it or escape to cancel." }), !disableKeyboardA11y && jsx(AriaLiveMessage, { rfId })] });
13447
+ const ariaLabelConfig = useStore(ariaLabelConfigSelector);
13448
+ return jsxs(Fragment$1, { children: [jsx("div", { id: `${ARIA_NODE_DESC_KEY}-${rfId}`, style: style$1, children: disableKeyboardA11y ? ariaLabelConfig["node.a11yDescription.default"] : ariaLabelConfig["node.a11yDescription.keyboardDisabled"] }), jsx("div", { id: `${ARIA_EDGE_DESC_KEY}-${rfId}`, style: style$1, children: ariaLabelConfig["edge.a11yDescription.default"] }), !disableKeyboardA11y && jsx(AriaLiveMessage, { rfId })] });
13286
13449
  }
13287
- const selector$n = (s2) => s2.userSelectionActive ? "none" : "all", Panel = forwardRef(({ position = "top-left", children: children2, className, style: style2, ...rest }, ref) => {
13288
- const pointerEvents = useStore$1(selector$n), positionClasses = `${position}`.split("-");
13289
- return jsx("div", { className: cc(["react-flow__panel", className, ...positionClasses]), style: { ...style2, pointerEvents }, ref, ...rest, children: children2 });
13450
+ const Panel = forwardRef(({ position = "top-left", children: children2, className, style: style2, ...rest }, ref) => {
13451
+ const positionClasses = `${position}`.split("-");
13452
+ return jsx("div", { className: cc(["react-flow__panel", className, ...positionClasses]), style: style2, ref, ...rest, children: children2 });
13290
13453
  });
13291
13454
  Panel.displayName = "Panel";
13292
13455
  function Attribution({ proOptions, position = "bottom-right" }) {
@@ -13304,7 +13467,7 @@ function areEqual(a, b) {
13304
13467
  return shallow$1(a.selectedNodes.map(selectId), b.selectedNodes.map(selectId)) && shallow$1(a.selectedEdges.map(selectId), b.selectedEdges.map(selectId));
13305
13468
  }
13306
13469
  function SelectionListenerInner({ onSelectionChange }) {
13307
- const store = useStoreApi(), { selectedNodes, selectedEdges } = useStore$1(selector$m, areEqual);
13470
+ const store = useStoreApi(), { selectedNodes, selectedEdges } = useStore(selector$m, areEqual);
13308
13471
  return useEffect(() => {
13309
13472
  const params = { nodes: selectedNodes, edges: selectedEdges };
13310
13473
  onSelectionChange?.(params), store.getState().onSelectionChangeHandlers.forEach((fn) => fn(params));
@@ -13312,7 +13475,7 @@ function SelectionListenerInner({ onSelectionChange }) {
13312
13475
  }
13313
13476
  const changeSelector = (s2) => !!s2.onSelectionChangeHandlers;
13314
13477
  function SelectionListener({ onSelectionChange }) {
13315
- const storeHasSelectionChangeHandlers = useStore$1(changeSelector);
13478
+ const storeHasSelectionChangeHandlers = useStore(changeSelector);
13316
13479
  return onSelectionChange || storeHasSelectionChangeHandlers ? jsx(SelectionListenerInner, { onSelectionChange }) : null;
13317
13480
  }
13318
13481
  const defaultNodeOrigin = [0, 0], defaultViewport = { x: 0, y: 0, zoom: 1 }, reactFlowFieldsToTrack = [
@@ -13326,6 +13489,7 @@ const defaultNodeOrigin = [0, 0], defaultViewport = { x: 0, y: 0, zoom: 1 }, rea
13326
13489
  "onClickConnectStart",
13327
13490
  "onClickConnectEnd",
13328
13491
  "nodesDraggable",
13492
+ "autoPanOnNodeFocus",
13329
13493
  "nodesConnectable",
13330
13494
  "nodesFocusable",
13331
13495
  "edgesFocusable",
@@ -13367,10 +13531,12 @@ const defaultNodeOrigin = [0, 0], defaultViewport = { x: 0, y: 0, zoom: 1 }, rea
13367
13531
  "isValidConnection",
13368
13532
  "selectNodesOnDrag",
13369
13533
  "nodeDragThreshold",
13534
+ "connectionDragThreshold",
13370
13535
  "onBeforeDelete",
13371
13536
  "debug",
13372
13537
  "autoPanSpeed",
13373
- "paneClickDistance"
13538
+ "paneClickDistance",
13539
+ "ariaLabelConfig"
13374
13540
  ], fieldsToTrack = [...reactFlowFieldsToTrack, "rfId"], selector$l = (s2) => ({
13375
13541
  setNodes: s2.setNodes,
13376
13542
  setEdges: s2.setEdges,
@@ -13397,7 +13563,7 @@ const defaultNodeOrigin = [0, 0], defaultViewport = { x: 0, y: 0, zoom: 1 }, rea
13397
13563
  paneClickDistance: 0
13398
13564
  };
13399
13565
  function StoreUpdater(props) {
13400
- const { setNodes, setEdges, setMinZoom, setMaxZoom, setTranslateExtent, setNodeExtent, reset, setDefaultNodesAndEdges, setPaneClickDistance } = useStore$1(selector$l, shallow$1), store = useStoreApi();
13566
+ const { setNodes, setEdges, setMinZoom, setMaxZoom, setTranslateExtent, setNodeExtent, reset, setDefaultNodesAndEdges, setPaneClickDistance } = useStore(selector$l, shallow$1), store = useStoreApi();
13401
13567
  useEffect(() => (setDefaultNodesAndEdges(props.defaultNodes, props.defaultEdges), () => {
13402
13568
  previousFields.current = initPrevValues, reset();
13403
13569
  }), []);
@@ -13406,7 +13572,7 @@ function StoreUpdater(props) {
13406
13572
  () => {
13407
13573
  for (const fieldName of fieldsToTrack) {
13408
13574
  const fieldValue = props[fieldName], previousFieldValue = previousFields.current[fieldName];
13409
- fieldValue !== previousFieldValue && (typeof props[fieldName] > "u" || (fieldName === "nodes" ? setNodes(fieldValue) : fieldName === "edges" ? setEdges(fieldValue) : fieldName === "minZoom" ? setMinZoom(fieldValue) : fieldName === "maxZoom" ? setMaxZoom(fieldValue) : fieldName === "translateExtent" ? setTranslateExtent(fieldValue) : fieldName === "nodeExtent" ? setNodeExtent(fieldValue) : fieldName === "paneClickDistance" ? setPaneClickDistance(fieldValue) : fieldName === "fitView" ? store.setState({ fitViewQueued: fieldValue }) : fieldName === "fitViewOptions" ? store.setState({ fitViewOptions: fieldValue }) : store.setState({ [fieldName]: fieldValue })));
13575
+ fieldValue !== previousFieldValue && (typeof props[fieldName] > "u" || (fieldName === "nodes" ? setNodes(fieldValue) : fieldName === "edges" ? setEdges(fieldValue) : fieldName === "minZoom" ? setMinZoom(fieldValue) : fieldName === "maxZoom" ? setMaxZoom(fieldValue) : fieldName === "translateExtent" ? setTranslateExtent(fieldValue) : fieldName === "nodeExtent" ? setNodeExtent(fieldValue) : fieldName === "paneClickDistance" ? setPaneClickDistance(fieldValue) : fieldName === "ariaLabelConfig" ? store.setState({ ariaLabelConfig: mergeAriaLabelConfig(fieldValue) }) : fieldName === "fitView" ? store.setState({ fitViewQueued: fieldValue }) : fieldName === "fitViewOptions" ? store.setState({ fitViewOptions: fieldValue }) : store.setState({ [fieldName]: fieldValue })));
13410
13576
  }
13411
13577
  previousFields.current = props;
13412
13578
  },
@@ -13495,23 +13661,20 @@ const useViewportHelper = () => {
13495
13661
  x: viewport.x ?? tX,
13496
13662
  y: viewport.y ?? tY,
13497
13663
  zoom: viewport.zoom ?? tZoom
13498
- }, { duration: options?.duration }), Promise.resolve(!0)) : Promise.resolve(!1);
13664
+ }, options), Promise.resolve(!0)) : Promise.resolve(!1);
13499
13665
  },
13500
13666
  getViewport: () => {
13501
13667
  const [x, y2, zoom2] = store.getState().transform;
13502
13668
  return { x, y: y2, zoom: zoom2 };
13503
13669
  },
13504
- setCenter: async (x, y2, options) => {
13505
- const { width, height, maxZoom, panZoom } = store.getState(), nextZoom = typeof options?.zoom < "u" ? options.zoom : maxZoom, centerX = width / 2 - x * nextZoom, centerY = height / 2 - y2 * nextZoom;
13506
- return panZoom ? (await panZoom.setViewport({
13507
- x: centerX,
13508
- y: centerY,
13509
- zoom: nextZoom
13510
- }, { duration: options?.duration }), Promise.resolve(!0)) : Promise.resolve(!1);
13511
- },
13670
+ setCenter: async (x, y2, options) => store.getState().setCenter(x, y2, options),
13512
13671
  fitBounds: async (bounds, options) => {
13513
13672
  const { width, height, minZoom, maxZoom, panZoom } = store.getState(), viewport = getViewportForBounds(bounds, width, height, minZoom, maxZoom, options?.padding ?? 0.1);
13514
- return panZoom ? (await panZoom.setViewport(viewport, { duration: options?.duration }), Promise.resolve(!0)) : Promise.resolve(!1);
13673
+ return panZoom ? (await panZoom.setViewport(viewport, {
13674
+ duration: options?.duration,
13675
+ ease: options?.ease,
13676
+ interpolate: options?.interpolate
13677
+ }), Promise.resolve(!0)) : Promise.resolve(!1);
13515
13678
  },
13516
13679
  screenToFlowPosition: (clientPosition, options = {}) => {
13517
13680
  const { transform: transform2, snapGrid, snapToGrid, domNode } = store.getState();
@@ -13680,7 +13843,7 @@ function useBatchContext() {
13680
13843
  }
13681
13844
  const selector$k = (s2) => !!s2.panZoom;
13682
13845
  function useReactFlow() {
13683
- const viewportHelper = useViewportHelper(), store = useStoreApi(), batchContext = useBatchContext(), viewportInitialized = useStore$1(selector$k), generalHelper = useMemo(() => {
13846
+ const viewportHelper = useViewportHelper(), store = useStoreApi(), batchContext = useBatchContext(), viewportInitialized = useStore(selector$k), generalHelper = useMemo(() => {
13684
13847
  const getInternalNode = (id2) => store.getState().nodeLookup.get(id2), setNodes = (payload) => {
13685
13848
  batchContext.nodeQueue.push(payload);
13686
13849
  }, setEdges = (payload) => {
@@ -13766,7 +13929,7 @@ function useReactFlow() {
13766
13929
  if (internalNode && !isRect && (n2.id === nodeOrRect.id || !internalNode.internals.positionAbsolute))
13767
13930
  return !1;
13768
13931
  const currNodeRect = nodeToRect(hasNodesOption ? n2 : internalNode), overlappingArea = getOverlappingArea(currNodeRect, nodeRect);
13769
- return partially && overlappingArea > 0 || overlappingArea >= nodeRect.width * nodeRect.height;
13932
+ return partially && overlappingArea > 0 || overlappingArea >= currNodeRect.width * currNodeRect.height || overlappingArea >= nodeRect.width * nodeRect.height;
13770
13933
  }) : [];
13771
13934
  },
13772
13935
  isNodeIntersecting: (nodeOrRect, area, partially = !0) => {
@@ -13849,7 +14012,7 @@ const containerStyle = {
13849
14012
  lib: s2.lib
13850
14013
  });
13851
14014
  function ZoomPane({ onPaneContextMenu, zoomOnScroll = !0, zoomOnPinch = !0, panOnScroll = !1, panOnScrollSpeed = 0.5, panOnScrollMode = PanOnScrollMode.Free, zoomOnDoubleClick = !0, panOnDrag = !0, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, zoomActivationKeyCode, preventScrolling = !0, children: children2, noWheelClassName, noPanClassName, onViewportChange, isControlledViewport, paneClickDistance }) {
13852
- const store = useStoreApi(), zoomPane = useRef(null), { userSelectionActive, lib } = useStore$1(selector$j, shallow$1), zoomActivationKeyPressed = useKeyPress(zoomActivationKeyCode), panZoom = useRef();
14015
+ const store = useStoreApi(), zoomPane = useRef(null), { userSelectionActive, lib } = useStore(selector$j, shallow$1), zoomActivationKeyPressed = useKeyPress(zoomActivationKeyCode), panZoom = useRef();
13853
14016
  useResizeHandler(zoomPane);
13854
14017
  const onTransformChange = useCallback((transform2) => {
13855
14018
  onViewportChange?.({ x: transform2[0], y: transform2[1], zoom: transform2[2] }), isControlledViewport || store.setState({ transform: transform2 });
@@ -13927,7 +14090,7 @@ const selector$i = (s2) => ({
13927
14090
  userSelectionRect: s2.userSelectionRect
13928
14091
  });
13929
14092
  function UserSelection() {
13930
- const { userSelectionActive, userSelectionRect } = useStore$1(selector$i, shallow$1);
14093
+ const { userSelectionActive, userSelectionRect } = useStore(selector$i, shallow$1);
13931
14094
  return userSelectionActive && userSelectionRect ? jsx("div", { className: "react-flow__selection react-flow__container", style: {
13932
14095
  width: userSelectionRect.width,
13933
14096
  height: userSelectionRect.height,
@@ -13943,7 +14106,7 @@ const wrapHandler = (handler, containerRef) => (event) => {
13943
14106
  dragging: s2.paneDragging
13944
14107
  });
13945
14108
  function Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.Full, panOnDrag, selectionOnDrag, onSelectionStart, onSelectionEnd, onPaneClick, onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, children: children2 }) {
13946
- const store = useStoreApi(), { userSelectionActive, elementsSelectable, dragging, connectionInProgress } = useStore$1(selector$h, shallow$1), hasActiveSelection = elementsSelectable && (isSelecting || userSelectionActive), container2 = useRef(null), containerBounds = useRef(), selectedNodeIds = useRef(/* @__PURE__ */ new Set()), selectedEdgeIds = useRef(/* @__PURE__ */ new Set()), selectionInProgress = useRef(!1), selectionStarted = useRef(!1), onClick = (event) => {
14109
+ const store = useStoreApi(), { userSelectionActive, elementsSelectable, dragging, connectionInProgress } = useStore(selector$h, shallow$1), hasActiveSelection = elementsSelectable && (isSelecting || userSelectionActive), container2 = useRef(null), containerBounds = useRef(), selectedNodeIds = useRef(/* @__PURE__ */ new Set()), selectedEdgeIds = useRef(/* @__PURE__ */ new Set()), selectionInProgress = useRef(!1), selectionStarted = useRef(!1), onClick = (event) => {
13947
14110
  if (selectionInProgress.current || connectionInProgress) {
13948
14111
  selectionInProgress.current = !1;
13949
14112
  return;
@@ -14108,7 +14271,7 @@ const useNodeId = () => useContext(NodeIdContext), selector$g = (s2) => ({
14108
14271
  };
14109
14272
  };
14110
14273
  function HandleComponent({ type = "source", position = Position.Top, isValidConnection, isConnectable = !0, isConnectableStart = !0, isConnectableEnd = !0, id: id2, onConnect, children: children2, className, onMouseDown, onTouchStart, ...rest }, ref) {
14111
- const handleId = id2 || null, isTarget = type === "target", store = useStoreApi(), nodeId = useNodeId(), { connectOnClick, noPanClassName, rfId } = useStore$1(selector$g, shallow$1), { connectingFrom, connectingTo, clickConnecting, isPossibleEndHandle, connectionInProcess, clickConnectionInProcess, valid } = useStore$1(connectingSelector(nodeId, handleId, type), shallow$1);
14274
+ const handleId = id2 || null, isTarget = type === "target", store = useStoreApi(), nodeId = useNodeId(), { connectOnClick, noPanClassName, rfId } = useStore(selector$g, shallow$1), { connectingFrom, connectingTo, clickConnecting, isPossibleEndHandle, connectionInProcess, clickConnectionInProcess, valid } = useStore(connectingSelector(nodeId, handleId, type), shallow$1);
14112
14275
  nodeId || store.getState().onError?.("010", errorMessages.error010());
14113
14276
  const onConnectExtended = (params) => {
14114
14277
  const { defaultEdgeOptions, onConnect: onConnectAction, hasDefaultEdges } = store.getState(), edgeParams = {
@@ -14127,6 +14290,7 @@ function HandleComponent({ type = "source", position = Position.Top, isValidConn
14127
14290
  if (isConnectableStart && (isMouseTriggered && event.button === 0 || !isMouseTriggered)) {
14128
14291
  const currentStore = store.getState();
14129
14292
  XYHandle.onPointerDown(event.nativeEvent, {
14293
+ handleDomNode: event.currentTarget,
14130
14294
  autoPanOnConnect: currentStore.autoPanOnConnect,
14131
14295
  connectionMode: currentStore.connectionMode,
14132
14296
  connectionRadius: currentStore.connectionRadius,
@@ -14146,7 +14310,8 @@ function HandleComponent({ type = "source", position = Position.Top, isValidConn
14146
14310
  isValidConnection: isValidConnection || currentStore.isValidConnection,
14147
14311
  getTransform: () => store.getState().transform,
14148
14312
  getFromHandle: () => store.getState().connection.fromHandle,
14149
- autoPanSpeed: currentStore.autoPanSpeed
14313
+ autoPanSpeed: currentStore.autoPanSpeed,
14314
+ dragThreshold: currentStore.connectionDragThreshold
14150
14315
  });
14151
14316
  }
14152
14317
  isMouseTriggered ? onMouseDown?.(event) : onTouchStart?.(event);
@@ -14247,7 +14412,7 @@ const selector$f = (s2) => {
14247
14412
  };
14248
14413
  };
14249
14414
  function NodesSelection({ onSelectionContextMenu, noPanClassName, disableKeyboardA11y }) {
14250
- const store = useStoreApi(), { width, height, transformString, userSelectionActive } = useStore$1(selector$f, shallow$1), moveSelectedNodes = useMoveSelectedNodes(), nodeRef = useRef(null);
14415
+ const store = useStoreApi(), { width, height, transformString, userSelectionActive } = useStore(selector$f, shallow$1), moveSelectedNodes = useMoveSelectedNodes(), nodeRef = useRef(null);
14251
14416
  if (useEffect(() => {
14252
14417
  disableKeyboardA11y || nodeRef.current?.focus({
14253
14418
  preventScroll: !0
@@ -14274,17 +14439,17 @@ function NodesSelection({ onSelectionContextMenu, noPanClassName, disableKeyboar
14274
14439
  }
14275
14440
  const win = typeof window < "u" ? window : void 0, selector$e = (s2) => ({ nodesSelectionActive: s2.nodesSelectionActive, userSelectionActive: s2.userSelectionActive });
14276
14441
  function FlowRendererComponent({ children: children2, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, paneClickDistance, deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll: _panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: _panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, preventScrolling, onSelectionContextMenu, noWheelClassName, noPanClassName, disableKeyboardA11y, onViewportChange, isControlledViewport }) {
14277
- const { nodesSelectionActive, userSelectionActive } = useStore$1(selector$e), selectionKeyPressed = useKeyPress(selectionKeyCode, { target: win }), panActivationKeyPressed = useKeyPress(panActivationKeyCode, { target: win }), panOnDrag = panActivationKeyPressed || _panOnDrag, panOnScroll = panActivationKeyPressed || _panOnScroll, _selectionOnDrag = selectionOnDrag && panOnDrag !== !0, isSelecting = selectionKeyPressed || userSelectionActive || _selectionOnDrag;
14442
+ const { nodesSelectionActive, userSelectionActive } = useStore(selector$e), selectionKeyPressed = useKeyPress(selectionKeyCode, { target: win }), panActivationKeyPressed = useKeyPress(panActivationKeyCode, { target: win }), panOnDrag = panActivationKeyPressed || _panOnDrag, panOnScroll = panActivationKeyPressed || _panOnScroll, _selectionOnDrag = selectionOnDrag && panOnDrag !== !0, isSelecting = selectionKeyPressed || userSelectionActive || _selectionOnDrag;
14278
14443
  return useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode }), jsx(ZoomPane, { onPaneContextMenu, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: !selectionKeyPressed && panOnDrag, defaultViewport: defaultViewport2, translateExtent, minZoom, maxZoom, zoomActivationKeyCode, preventScrolling, noWheelClassName, noPanClassName, onViewportChange, isControlledViewport, paneClickDistance, children: jsxs(Pane, { onSelectionStart, onSelectionEnd, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, panOnDrag, isSelecting: !!isSelecting, selectionMode, selectionKeyPressed, selectionOnDrag: _selectionOnDrag, children: [children2, nodesSelectionActive && jsx(NodesSelection, { onSelectionContextMenu, noPanClassName, disableKeyboardA11y })] }) });
14279
14444
  }
14280
14445
  FlowRendererComponent.displayName = "FlowRenderer";
14281
14446
  const FlowRenderer = memo$1(FlowRendererComponent), selector$d = (onlyRenderVisible) => (s2) => onlyRenderVisible ? getNodesInside(s2.nodeLookup, { x: 0, y: 0, width: s2.width, height: s2.height }, s2.transform, !0).map((node) => node.id) : Array.from(s2.nodeLookup.keys());
14282
14447
  function useVisibleNodeIds(onlyRenderVisible) {
14283
- return useStore$1(useCallback(selector$d(onlyRenderVisible), [onlyRenderVisible]), shallow$1);
14448
+ return useStore(useCallback(selector$d(onlyRenderVisible), [onlyRenderVisible]), shallow$1);
14284
14449
  }
14285
14450
  const selector$c = (s2) => s2.updateNodeInternals;
14286
14451
  function useResizeObserver() {
14287
- const updateNodeInternals2 = useStore$1(selector$c), [resizeObserver] = useState(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((entries) => {
14452
+ const updateNodeInternals2 = useStore(selector$c), [resizeObserver] = useState(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((entries) => {
14288
14453
  const updates = /* @__PURE__ */ new Map();
14289
14454
  entries.forEach((entry) => {
14290
14455
  const id2 = entry.target.getAttribute("data-id");
@@ -14313,7 +14478,7 @@ function useNodeObserver({ node, nodeType, hasDimensions, resizeObserver }) {
14313
14478
  }, [node.id, nodeType, node.sourcePosition, node.targetPosition]), nodeRef;
14314
14479
  }
14315
14480
  function NodeWrapper({ id: id2, onClick, onMouseEnter, onMouseMove, onMouseLeave, onContextMenu, onDoubleClick, nodesDraggable, elementsSelectable, nodesConnectable, nodesFocusable, resizeObserver, noDragClassName, noPanClassName, disableKeyboardA11y, rfId, nodeTypes, nodeClickDistance, onError }) {
14316
- const { node, internals, isParent: isParent2 } = useStore$1((s2) => {
14481
+ const { node, internals, isParent: isParent2 } = useStore((s2) => {
14317
14482
  const node2 = s2.nodeLookup.get(id2), isParent22 = s2.parentLookup.has(id2);
14318
14483
  return {
14319
14484
  node: node2,
@@ -14322,7 +14487,7 @@ function NodeWrapper({ id: id2, onClick, onMouseEnter, onMouseMove, onMouseLeave
14322
14487
  };
14323
14488
  }, shallow$1);
14324
14489
  let nodeType = node.type || "default", NodeComponent = nodeTypes?.[nodeType] || builtinNodeTypes[nodeType];
14325
- NodeComponent === void 0 && (onError?.("003", errorMessages.error003(nodeType)), nodeType = "default", NodeComponent = builtinNodeTypes.default);
14490
+ NodeComponent === void 0 && (onError?.("003", errorMessages.error003(nodeType)), nodeType = "default", NodeComponent = nodeTypes?.default || builtinNodeTypes.default);
14326
14491
  const isDraggable = !!(node.draggable || nodesDraggable && typeof node.draggable > "u"), isSelectable = !!(node.selectable || elementsSelectable && typeof node.selectable > "u"), isConnectable = !!(node.connectable || nodesConnectable && typeof node.connectable > "u"), isFocusable = !!(node.focusable || nodesFocusable && typeof node.focusable > "u"), store = useStoreApi(), hasDimensions = nodeHasDimensions(node), nodeRef = useNodeObserver({ node, nodeType, hasDimensions, resizeObserver }), dragging = useDrag({
14327
14492
  nodeRef,
14328
14493
  disabled: node.hidden || !isDraggable,
@@ -14342,7 +14507,7 @@ function NodeWrapper({ id: id2, onClick, onMouseEnter, onMouseMove, onMouseLeave
14342
14507
  nodeRef
14343
14508
  }), onClick && onClick(event, { ...internals.userNode });
14344
14509
  }, onKeyDown = (event) => {
14345
- if (!(isInputDOMNode(event.nativeEvent) || disableKeyboardA11y))
14510
+ if (!(isInputDOMNode(event.nativeEvent) || disableKeyboardA11y)) {
14346
14511
  if (elementSelectionKeys.includes(event.key) && isSelectable) {
14347
14512
  const unselect = event.key === "Escape";
14348
14513
  handleNodeClick({
@@ -14351,12 +14516,30 @@ function NodeWrapper({ id: id2, onClick, onMouseEnter, onMouseMove, onMouseLeave
14351
14516
  unselect,
14352
14517
  nodeRef
14353
14518
  });
14354
- } else isDraggable && node.selected && Object.prototype.hasOwnProperty.call(arrowKeyDiffs, event.key) && (event.preventDefault(), store.setState({
14355
- ariaLiveMessage: `Moved selected node ${event.key.replace("Arrow", "").toLowerCase()}. New position, x: ${~~internals.positionAbsolute.x}, y: ${~~internals.positionAbsolute.y}`
14356
- }), moveSelectedNodes({
14357
- direction: arrowKeyDiffs[event.key],
14358
- factor: event.shiftKey ? 4 : 1
14359
- }));
14519
+ } else if (isDraggable && node.selected && Object.prototype.hasOwnProperty.call(arrowKeyDiffs, event.key)) {
14520
+ event.preventDefault();
14521
+ const { ariaLabelConfig } = store.getState();
14522
+ store.setState({
14523
+ ariaLiveMessage: ariaLabelConfig["node.a11yDescription.ariaLiveMessage"]({
14524
+ direction: event.key.replace("Arrow", "").toLowerCase(),
14525
+ x: ~~internals.positionAbsolute.x,
14526
+ y: ~~internals.positionAbsolute.y
14527
+ })
14528
+ }), moveSelectedNodes({
14529
+ direction: arrowKeyDiffs[event.key],
14530
+ factor: event.shiftKey ? 4 : 1
14531
+ });
14532
+ }
14533
+ }
14534
+ }, onFocus = () => {
14535
+ if (disableKeyboardA11y || !nodeRef.current?.matches(":focus-visible"))
14536
+ return;
14537
+ const { transform: transform2, width, height, autoPanOnNodeFocus, setCenter } = store.getState();
14538
+ if (!autoPanOnNodeFocus)
14539
+ return;
14540
+ getNodesInside(/* @__PURE__ */ new Map([[id2, node]]), { x: 0, y: 0, width, height }, transform2, !0).length > 0 || setCenter(node.position.x + nodeDimensions.width / 2, node.position.y + nodeDimensions.height / 2, {
14541
+ zoom: transform2[2]
14542
+ });
14360
14543
  };
14361
14544
  return jsx("div", { className: cc([
14362
14545
  "react-flow__node",
@@ -14380,7 +14563,7 @@ function NodeWrapper({ id: id2, onClick, onMouseEnter, onMouseMove, onMouseLeave
14380
14563
  visibility: hasDimensions ? "visible" : "hidden",
14381
14564
  ...node.style,
14382
14565
  ...inlineDimensions
14383
- }, "data-id": id2, "data-testid": `rf__node-${id2}`, onMouseEnter: onMouseEnterHandler, onMouseMove: onMouseMoveHandler, onMouseLeave: onMouseLeaveHandler, onContextMenu: onContextMenuHandler, onClick: onSelectNodeHandler, onDoubleClick: onDoubleClickHandler, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, role: isFocusable ? "button" : void 0, "aria-describedby": disableKeyboardA11y ? void 0 : `${ARIA_NODE_DESC_KEY}-${rfId}`, "aria-label": node.ariaLabel, children: jsx(Provider, { value: id2, children: jsx(NodeComponent, { id: id2, data: node.data, type: nodeType, positionAbsoluteX: internals.positionAbsolute.x, positionAbsoluteY: internals.positionAbsolute.y, selected: node.selected ?? !1, selectable: isSelectable, draggable: isDraggable, deletable: node.deletable ?? !0, isConnectable, sourcePosition: node.sourcePosition, targetPosition: node.targetPosition, dragging, dragHandle: node.dragHandle, zIndex: internals.z, parentId: node.parentId, ...nodeDimensions }) }) });
14566
+ }, "data-id": id2, "data-testid": `rf__node-${id2}`, onMouseEnter: onMouseEnterHandler, onMouseMove: onMouseMoveHandler, onMouseLeave: onMouseLeaveHandler, onContextMenu: onContextMenuHandler, onClick: onSelectNodeHandler, onDoubleClick: onDoubleClickHandler, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, onFocus: isFocusable ? onFocus : void 0, role: node.ariaRole ?? (isFocusable ? "group" : void 0), "aria-roledescription": "node", "aria-describedby": disableKeyboardA11y ? void 0 : `${ARIA_NODE_DESC_KEY}-${rfId}`, "aria-label": node.ariaLabel, ...node.domAttributes, children: jsx(Provider, { value: id2, children: jsx(NodeComponent, { id: id2, data: node.data, type: nodeType, positionAbsoluteX: internals.positionAbsolute.x, positionAbsoluteY: internals.positionAbsolute.y, selected: node.selected ?? !1, selectable: isSelectable, draggable: isDraggable, deletable: node.deletable ?? !0, isConnectable, sourcePosition: node.sourcePosition, targetPosition: node.targetPosition, dragging, dragHandle: node.dragHandle, zIndex: internals.z, parentId: node.parentId, ...nodeDimensions }) }) });
14384
14567
  }
14385
14568
  const selector$b = (s2) => ({
14386
14569
  nodesDraggable: s2.nodesDraggable,
@@ -14390,7 +14573,7 @@ const selector$b = (s2) => ({
14390
14573
  onError: s2.onError
14391
14574
  });
14392
14575
  function NodeRendererComponent(props) {
14393
- const { nodesDraggable, nodesConnectable, nodesFocusable, elementsSelectable, onError } = useStore$1(selector$b, shallow$1), nodeIds = useVisibleNodeIds(props.onlyRenderVisibleElements), resizeObserver = useResizeObserver();
14576
+ const { nodesDraggable, nodesConnectable, nodesFocusable, elementsSelectable, onError } = useStore(selector$b, shallow$1), nodeIds = useVisibleNodeIds(props.onlyRenderVisibleElements), resizeObserver = useResizeObserver();
14394
14577
  return jsx("div", { className: "react-flow__nodes", style: containerStyle, children: nodeIds.map((nodeId) => (
14395
14578
  /*
14396
14579
  * The split of responsibilities between NodeRenderer and
@@ -14423,7 +14606,7 @@ function NodeRendererComponent(props) {
14423
14606
  NodeRendererComponent.displayName = "NodeRenderer";
14424
14607
  const NodeRenderer = memo$1(NodeRendererComponent);
14425
14608
  function useVisibleEdgeIds(onlyRenderVisible) {
14426
- return useStore$1(useCallback((s2) => {
14609
+ return useStore(useCallback((s2) => {
14427
14610
  if (!onlyRenderVisible)
14428
14611
  return s2.edges.map((edge) => edge.id);
14429
14612
  const visibleEdgeIds = [];
@@ -14441,14 +14624,19 @@ function useVisibleEdgeIds(onlyRenderVisible) {
14441
14624
  return visibleEdgeIds;
14442
14625
  }, [onlyRenderVisible]), shallow$1);
14443
14626
  }
14444
- const ArrowSymbol = ({ color: color2 = "none", strokeWidth = 1 }) => jsx("polyline", { style: {
14445
- stroke: color2,
14446
- strokeWidth
14447
- }, strokeLinecap: "round", strokeLinejoin: "round", fill: "none", points: "-5,-4 0,0 -5,4" }), ArrowClosedSymbol = ({ color: color2 = "none", strokeWidth = 1 }) => jsx("polyline", { style: {
14448
- stroke: color2,
14449
- fill: color2,
14450
- strokeWidth
14451
- }, strokeLinecap: "round", strokeLinejoin: "round", points: "-5,-4 0,0 -5,4 -5,-4" }), MarkerSymbols = {
14627
+ const ArrowSymbol = ({ color: color2 = "none", strokeWidth = 1 }) => {
14628
+ const style2 = {
14629
+ strokeWidth,
14630
+ ...color2 && { stroke: color2 }
14631
+ };
14632
+ return jsx("polyline", { style: style2, strokeLinecap: "round", strokeLinejoin: "round", fill: "none", points: "-5,-4 0,0 -5,4" });
14633
+ }, ArrowClosedSymbol = ({ color: color2 = "none", strokeWidth = 1 }) => {
14634
+ const style2 = {
14635
+ strokeWidth,
14636
+ ...color2 && { stroke: color2, fill: color2 }
14637
+ };
14638
+ return jsx("polyline", { style: style2, strokeLinecap: "round", strokeLinejoin: "round", points: "-5,-4 0,0 -5,4 -5,-4" });
14639
+ }, MarkerSymbols = {
14452
14640
  [MarkerType.Arrow]: ArrowSymbol,
14453
14641
  [MarkerType.ArrowClosed]: ArrowClosedSymbol
14454
14642
  };
@@ -14460,7 +14648,7 @@ const Marker = ({ id: id2, type, color: color2, width = 12.5, height = 12.5, mar
14460
14648
  const Symbol2 = useMarkerSymbol(type);
14461
14649
  return Symbol2 ? jsx("marker", { className: "react-flow__arrowhead", id: id2, markerWidth: `${width}`, markerHeight: `${height}`, viewBox: "-10 -10 20 20", markerUnits, orient, refX: "0", refY: "0", children: jsx(Symbol2, { color: color2, strokeWidth }) }) : null;
14462
14650
  }, MarkerDefinitions = ({ defaultColor, rfId }) => {
14463
- const edges = useStore$1((s2) => s2.edges), defaultEdgeOptions = useStore$1((s2) => s2.defaultEdgeOptions), markers = useMemo(() => createMarkerIds(edges, {
14651
+ const edges = useStore((s2) => s2.edges), defaultEdgeOptions = useStore((s2) => s2.defaultEdgeOptions), markers = useMemo(() => createMarkerIds(edges, {
14464
14652
  id: rfId,
14465
14653
  defaultColor,
14466
14654
  defaultMarkerStart: defaultEdgeOptions?.markerStart,
@@ -14487,7 +14675,7 @@ function EdgeTextComponent({ x, y: y2, label, labelStyle, labelShowBg = !0, labe
14487
14675
  EdgeTextComponent.displayName = "EdgeText";
14488
14676
  const EdgeText = memo$1(EdgeTextComponent);
14489
14677
  function BaseEdge({ path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, interactionWidth = 20, ...props }) {
14490
- return jsxs(Fragment$1, { children: [jsx("path", { ...props, d: path, fill: "none", className: cc(["react-flow__edge-path", props.className]) }), interactionWidth && jsx("path", { d: path, fill: "none", strokeOpacity: 0, strokeWidth: interactionWidth, className: "react-flow__edge-interaction" }), label && isNumeric(labelX) && isNumeric(labelY) ? jsx(EdgeText, { x: labelX, y: labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius }) : null] });
14678
+ return jsxs(Fragment$1, { children: [jsx("path", { ...props, d: path, fill: "none", className: cc(["react-flow__edge-path", props.className]) }), interactionWidth ? jsx("path", { d: path, fill: "none", strokeOpacity: 0, strokeWidth: interactionWidth, className: "react-flow__edge-interaction" }) : null, label && isNumeric(labelX) && isNumeric(labelY) ? jsx(EdgeText, { x: labelX, y: labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius }) : null] });
14491
14679
  }
14492
14680
  function getControl({ pos, x1, y1, x2, y2 }) {
14493
14681
  return pos === Position.Left || pos === Position.Right ? [0.5 * (x1 + x2), y1] : [x1, 0.5 * (y1 + y2)];
@@ -14549,7 +14737,8 @@ function createSmoothStepEdge(params) {
14549
14737
  targetY,
14550
14738
  targetPosition,
14551
14739
  borderRadius: pathOptions?.borderRadius,
14552
- offset: pathOptions?.offset
14740
+ offset: pathOptions?.offset,
14741
+ stepPosition: pathOptions?.stepPosition
14553
14742
  }), _id = params.isInternal ? void 0 : id2;
14554
14743
  return jsx(BaseEdge, { id: _id, path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style: style2, markerEnd, markerStart, interactionWidth });
14555
14744
  });
@@ -14613,11 +14802,11 @@ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, sourceX, so
14613
14802
  const store = useStoreApi(), handleEdgeUpdater = (event, oppositeHandle) => {
14614
14803
  if (event.button !== 0)
14615
14804
  return;
14616
- const { autoPanOnConnect, domNode, isValidConnection, connectionMode, connectionRadius, lib, onConnectStart, onConnectEnd, cancelConnection, nodeLookup, rfId: flowId, panBy: panBy2, updateConnection } = store.getState(), isTarget = oppositeHandle.type === "target";
14617
- setReconnecting(!0), onReconnectStart?.(event, edge, oppositeHandle.type);
14618
- const _onReconnectEnd = (evt, connectionState) => {
14805
+ const { autoPanOnConnect, domNode, isValidConnection, connectionMode, connectionRadius, lib, onConnectStart, onConnectEnd, cancelConnection, nodeLookup, rfId: flowId, panBy: panBy2, updateConnection } = store.getState(), isTarget = oppositeHandle.type === "target", _onReconnectEnd = (evt, connectionState) => {
14619
14806
  setReconnecting(!1), onReconnectEnd?.(evt, edge, oppositeHandle.type, connectionState);
14620
- }, onConnectEdge = (connection) => onReconnect?.(edge, connection);
14807
+ }, onConnectEdge = (connection) => onReconnect?.(edge, connection), _onConnectStart = (_event, params) => {
14808
+ setReconnecting(!0), onReconnectStart?.(event, edge, oppositeHandle.type), onConnectStart?.(_event, params);
14809
+ };
14621
14810
  XYHandle.onPointerDown(event.nativeEvent, {
14622
14811
  autoPanOnConnect,
14623
14812
  connectionMode,
@@ -14634,23 +14823,25 @@ function EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, sourceX, so
14634
14823
  panBy: panBy2,
14635
14824
  isValidConnection,
14636
14825
  onConnect: onConnectEdge,
14637
- onConnectStart,
14826
+ onConnectStart: _onConnectStart,
14638
14827
  onConnectEnd,
14639
14828
  onReconnectEnd: _onReconnectEnd,
14640
14829
  updateConnection,
14641
14830
  getTransform: () => store.getState().transform,
14642
- getFromHandle: () => store.getState().connection.fromHandle
14831
+ getFromHandle: () => store.getState().connection.fromHandle,
14832
+ dragThreshold: store.getState().connectionDragThreshold,
14833
+ handleDomNode: event.currentTarget
14643
14834
  });
14644
14835
  }, onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.target, id: edge.targetHandle ?? null, type: "target" }), onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.source, id: edge.sourceHandle ?? null, type: "source" }), onReconnectMouseEnter = () => setUpdateHover(!0), onReconnectMouseOut = () => setUpdateHover(!1);
14645
14836
  return jsxs(Fragment$1, { children: [(isReconnectable === !0 || isReconnectable === "source") && jsx(EdgeAnchor, { position: sourcePosition, centerX: sourceX, centerY: sourceY, radius: reconnectRadius, onMouseDown: onReconnectSourceMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "source" }), (isReconnectable === !0 || isReconnectable === "target") && jsx(EdgeAnchor, { position: targetPosition, centerX: targetX, centerY: targetY, radius: reconnectRadius, onMouseDown: onReconnectTargetMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: "target" })] });
14646
14837
  }
14647
14838
  function EdgeWrapper({ id: id2, edgesFocusable, edgesReconnectable, elementsSelectable, onClick, onDoubleClick, onContextMenu, onMouseEnter, onMouseMove, onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rfId, edgeTypes, noPanClassName, onError, disableKeyboardA11y }) {
14648
- let edge = useStore$1((s2) => s2.edgeLookup.get(id2));
14649
- const defaultEdgeOptions = useStore$1((s2) => s2.defaultEdgeOptions);
14839
+ let edge = useStore((s2) => s2.edgeLookup.get(id2));
14840
+ const defaultEdgeOptions = useStore((s2) => s2.defaultEdgeOptions);
14650
14841
  edge = defaultEdgeOptions ? { ...defaultEdgeOptions, ...edge } : edge;
14651
14842
  let edgeType = edge.type || "default", EdgeComponent = edgeTypes?.[edgeType] || builtinEdgeTypes[edgeType];
14652
- EdgeComponent === void 0 && (onError?.("011", errorMessages.error011(edgeType)), edgeType = "default", EdgeComponent = builtinEdgeTypes.default);
14653
- const isFocusable = !!(edge.focusable || edgesFocusable && typeof edge.focusable > "u"), isReconnectable = typeof onReconnect < "u" && (edge.reconnectable || edgesReconnectable && typeof edge.reconnectable > "u"), isSelectable = !!(edge.selectable || elementsSelectable && typeof edge.selectable > "u"), edgeRef = useRef(null), [updateHover, setUpdateHover] = useState(!1), [reconnecting, setReconnecting] = useState(!1), store = useStoreApi(), { zIndex, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition } = useStore$1(useCallback((store2) => {
14843
+ EdgeComponent === void 0 && (onError?.("011", errorMessages.error011(edgeType)), edgeType = "default", EdgeComponent = edgeTypes?.default || builtinEdgeTypes.default);
14844
+ const isFocusable = !!(edge.focusable || edgesFocusable && typeof edge.focusable > "u"), isReconnectable = typeof onReconnect < "u" && (edge.reconnectable || edgesReconnectable && typeof edge.reconnectable > "u"), isSelectable = !!(edge.selectable || elementsSelectable && typeof edge.selectable > "u"), edgeRef = useRef(null), [updateHover, setUpdateHover] = useState(!1), [reconnecting, setReconnecting] = useState(!1), store = useStoreApi(), { zIndex, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition } = useStore(useCallback((store2) => {
14654
14845
  const sourceNode = store2.nodeLookup.get(edge.source), targetNode = store2.nodeLookup.get(edge.target);
14655
14846
  if (!sourceNode || !targetNode)
14656
14847
  return {
@@ -14710,7 +14901,7 @@ function EdgeWrapper({ id: id2, edgesFocusable, edgesReconnectable, elementsSele
14710
14901
  updating: updateHover,
14711
14902
  selectable: isSelectable
14712
14903
  }
14713
- ]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, role: isFocusable ? "button" : "img", "data-id": id2, "data-testid": `rf__edge-${id2}`, "aria-label": edge.ariaLabel === null ? void 0 : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : void 0, ref: edgeRef, children: [!reconnecting && jsx(EdgeComponent, { id: id2, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.deletable ?? !0, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, data: edge.data, style: edge.style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: "pathOptions" in edge ? edge.pathOptions : void 0, interactionWidth: edge.interactionWidth }), isReconnectable && jsx(EdgeUpdateAnchors, { edge, isReconnectable, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, setUpdateHover, setReconnecting })] }) });
14904
+ ]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : void 0, tabIndex: isFocusable ? 0 : void 0, role: edge.ariaRole ?? (isFocusable ? "group" : "img"), "aria-roledescription": "edge", "data-id": id2, "data-testid": `rf__edge-${id2}`, "aria-label": edge.ariaLabel === null ? void 0 : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, "aria-describedby": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : void 0, ref: edgeRef, ...edge.domAttributes, children: [!reconnecting && jsx(EdgeComponent, { id: id2, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.deletable ?? !0, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, data: edge.data, style: edge.style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: "pathOptions" in edge ? edge.pathOptions : void 0, interactionWidth: edge.interactionWidth }), isReconnectable && jsx(EdgeUpdateAnchors, { edge, isReconnectable, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, setUpdateHover, setReconnecting })] }) });
14714
14905
  }
14715
14906
  const selector$a = (s2) => ({
14716
14907
  edgesFocusable: s2.edgesFocusable,
@@ -14720,13 +14911,13 @@ const selector$a = (s2) => ({
14720
14911
  onError: s2.onError
14721
14912
  });
14722
14913
  function EdgeRendererComponent({ defaultMarkerColor, onlyRenderVisibleElements, rfId, edgeTypes, noPanClassName, onReconnect, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeClick, reconnectRadius, onEdgeDoubleClick, onReconnectStart, onReconnectEnd, disableKeyboardA11y }) {
14723
- const { edgesFocusable, edgesReconnectable, elementsSelectable, onError } = useStore$1(selector$a, shallow$1), edgeIds = useVisibleEdgeIds(onlyRenderVisibleElements);
14914
+ const { edgesFocusable, edgesReconnectable, elementsSelectable, onError } = useStore(selector$a, shallow$1), edgeIds = useVisibleEdgeIds(onlyRenderVisibleElements);
14724
14915
  return jsxs("div", { className: "react-flow__edges", children: [jsx(MarkerDefinitions$1, { defaultColor: defaultMarkerColor, rfId }), edgeIds.map((id2) => jsx(EdgeWrapper, { id: id2, edgesFocusable, edgesReconnectable, elementsSelectable, noPanClassName, onReconnect, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onClick: onEdgeClick, reconnectRadius, onDoubleClick: onEdgeDoubleClick, onReconnectStart, onReconnectEnd, rfId, onError, edgeTypes, disableKeyboardA11y }, id2))] });
14725
14916
  }
14726
14917
  EdgeRendererComponent.displayName = "EdgeRenderer";
14727
14918
  const EdgeRenderer = memo$1(EdgeRendererComponent), selector$9 = (s2) => `translate(${s2.transform[0]}px,${s2.transform[1]}px) scale(${s2.transform[2]})`;
14728
14919
  function Viewport({ children: children2 }) {
14729
- const transform2 = useStore$1(selector$9);
14920
+ const transform2 = useStore(selector$9);
14730
14921
  return jsx("div", { className: "react-flow__viewport xyflow__viewport react-flow__container", style: { transform: transform2 }, children: children2 });
14731
14922
  }
14732
14923
  function useOnInitHandler(onInit) {
@@ -14737,7 +14928,7 @@ function useOnInitHandler(onInit) {
14737
14928
  }
14738
14929
  const selector$8 = (state) => state.panZoom?.syncViewport;
14739
14930
  function useViewportSync(viewport) {
14740
- const syncViewport = useStore$1(selector$8), store = useStoreApi();
14931
+ const syncViewport = useStore(selector$8), store = useStoreApi();
14741
14932
  return useEffect(() => {
14742
14933
  viewport && (syncViewport?.(viewport), store.setState({ transform: [viewport.x, viewport.y, viewport.zoom] }));
14743
14934
  }, [viewport, syncViewport]), null;
@@ -14750,7 +14941,7 @@ function getSelector(connectionSelector) {
14750
14941
  }
14751
14942
  function useConnection(connectionSelector) {
14752
14943
  const combinedSelector = getSelector();
14753
- return useStore$1(combinedSelector, shallow$1);
14944
+ return useStore(combinedSelector, shallow$1);
14754
14945
  }
14755
14946
  const selector$7 = (s2) => ({
14756
14947
  nodesConnectable: s2.nodesConnectable,
@@ -14760,7 +14951,7 @@ const selector$7 = (s2) => ({
14760
14951
  height: s2.height
14761
14952
  });
14762
14953
  function ConnectionLineWrapper({ containerStyle: containerStyle2, style: style2, type, component }) {
14763
- const { nodesConnectable, width, height, isValid, inProgress } = useStore$1(selector$7, shallow$1);
14954
+ const { nodesConnectable, width, height, isValid, inProgress } = useStore(selector$7, shallow$1);
14764
14955
  return !(width && nodesConnectable && inProgress) ? null : jsx("svg", { style: containerStyle2, width, height, className: "react-flow__connectionline react-flow__container", children: jsx("g", { className: cc(["react-flow__connection", getConnectionStatus(isValid)]), children: jsx(ConnectionLine, { style: style2, type, CustomComponent: component, isValid }) }) });
14765
14956
  }
14766
14957
  const ConnectionLine = ({ style: style2, type = ConnectionLineType.Bezier, CustomComponent, isValid }) => {
@@ -14858,6 +15049,7 @@ const GraphView = memo$1(GraphViewComponent), getInitialState = ({ nodes, edges,
14858
15049
  noPanClassName: "nopan",
14859
15050
  nodeOrigin: storeNodeOrigin,
14860
15051
  nodeDragThreshold: 1,
15052
+ connectionDragThreshold: 1,
14861
15053
  snapGrid: [15, 15],
14862
15054
  snapToGrid: !1,
14863
15055
  nodesDraggable: !0,
@@ -14879,13 +15071,15 @@ const GraphView = memo$1(GraphViewComponent), getInitialState = ({ nodes, edges,
14879
15071
  ariaLiveMessage: "",
14880
15072
  autoPanOnConnect: !0,
14881
15073
  autoPanOnNodeDrag: !0,
15074
+ autoPanOnNodeFocus: !0,
14882
15075
  autoPanSpeed: 15,
14883
15076
  connectionRadius: 20,
14884
15077
  onError: devWarn,
14885
15078
  isValidConnection: void 0,
14886
15079
  onSelectionChangeHandlers: [],
14887
15080
  lib: "react",
14888
- debug: !1
15081
+ debug: !1,
15082
+ ariaLabelConfig: defaultAriaLabelConfig
14889
15083
  };
14890
15084
  }, createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView, fitViewOptions, minZoom, maxZoom, nodeOrigin, nodeExtent }) => createWithEqualityFn((set2, get2) => {
14891
15085
  async function resolveFitView() {
@@ -15053,6 +15247,17 @@ const GraphView = memo$1(GraphViewComponent), getInitialState = ({ nodes, edges,
15053
15247
  const { transform: transform2, width: width2, height: height2, panZoom, translateExtent } = get2();
15054
15248
  return panBy({ delta, panZoom, transform: transform2, translateExtent, width: width2, height: height2 });
15055
15249
  },
15250
+ setCenter: async (x, y2, options) => {
15251
+ const { width: width2, height: height2, maxZoom: maxZoom2, panZoom } = get2();
15252
+ if (!panZoom)
15253
+ return Promise.resolve(!1);
15254
+ const nextZoom = typeof options?.zoom < "u" ? options.zoom : maxZoom2;
15255
+ return await panZoom.setViewport({
15256
+ x: width2 / 2 - x * nextZoom,
15257
+ y: height2 / 2 - y2 * nextZoom,
15258
+ zoom: nextZoom
15259
+ }, { duration: options?.duration, ease: options?.ease, interpolate: options?.interpolate }), Promise.resolve(!0);
15260
+ },
15056
15261
  cancelConnection: () => {
15057
15262
  set2({
15058
15263
  connection: { ...initialConnection }
@@ -15091,20 +15296,20 @@ const wrapperStyle = {
15091
15296
  position: "relative",
15092
15297
  zIndex: 0
15093
15298
  };
15094
- function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTypes, edgeTypes, onNodeClick, onEdgeClick, onInit, onMove, onMoveStart, onMoveEnd, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, onNodeDragStart, onNodeDrag, onNodeDragStop, onNodesDelete, onEdgesDelete, onDelete, onSelectionChange, onSelectionDragStart, onSelectionDrag, onSelectionDragStop, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onBeforeDelete, connectionMode, connectionLineType = ConnectionLineType.Bezier, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, deleteKeyCode = "Backspace", selectionKeyCode = "Shift", selectionOnDrag = !1, selectionMode = SelectionMode.Full, panActivationKeyCode = "Space", multiSelectionKeyCode = isMacOs() ? "Meta" : "Control", zoomActivationKeyCode = isMacOs() ? "Meta" : "Control", snapToGrid, snapGrid, onlyRenderVisibleElements = !1, selectNodesOnDrag, nodesDraggable, nodesConnectable, nodesFocusable, nodeOrigin = defaultNodeOrigin, edgesFocusable, edgesReconnectable, elementsSelectable = !0, defaultViewport: defaultViewport$1 = defaultViewport, minZoom = 0.5, maxZoom = 2, translateExtent = infiniteExtent, preventScrolling = !0, nodeExtent, defaultMarkerColor = "#b1b1b7", zoomOnScroll = !0, zoomOnPinch = !0, panOnScroll = !1, panOnScrollSpeed = 0.5, panOnScrollMode = PanOnScrollMode.Free, zoomOnDoubleClick = !0, panOnDrag = !0, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance = 0, nodeClickDistance = 0, children: children2, onReconnect, onReconnectStart, onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius = 10, onNodesChange, onEdgesChange, noDragClassName = "nodrag", noWheelClassName = "nowheel", noPanClassName = "nopan", fitView, fitViewOptions, connectOnClick, attributionPosition, proOptions, defaultEdgeOptions, elevateNodesOnSelect, elevateEdgesOnSelect, disableKeyboardA11y = !1, autoPanOnConnect, autoPanOnNodeDrag, autoPanSpeed, connectionRadius, isValidConnection, onError, style: style2, id: id2, nodeDragThreshold, viewport, onViewportChange, width, height, colorMode = "light", debug, onScroll, ...rest }, ref) {
15299
+ function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTypes, edgeTypes, onNodeClick, onEdgeClick, onInit, onMove, onMoveStart, onMoveEnd, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, onNodeDragStart, onNodeDrag, onNodeDragStop, onNodesDelete, onEdgesDelete, onDelete, onSelectionChange, onSelectionDragStart, onSelectionDrag, onSelectionDragStop, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onBeforeDelete, connectionMode, connectionLineType = ConnectionLineType.Bezier, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, deleteKeyCode = "Backspace", selectionKeyCode = "Shift", selectionOnDrag = !1, selectionMode = SelectionMode.Full, panActivationKeyCode = "Space", multiSelectionKeyCode = isMacOs() ? "Meta" : "Control", zoomActivationKeyCode = isMacOs() ? "Meta" : "Control", snapToGrid, snapGrid, onlyRenderVisibleElements = !1, selectNodesOnDrag, nodesDraggable, autoPanOnNodeFocus, nodesConnectable, nodesFocusable, nodeOrigin = defaultNodeOrigin, edgesFocusable, edgesReconnectable, elementsSelectable = !0, defaultViewport: defaultViewport$1 = defaultViewport, minZoom = 0.5, maxZoom = 2, translateExtent = infiniteExtent, preventScrolling = !0, nodeExtent, defaultMarkerColor = "#b1b1b7", zoomOnScroll = !0, zoomOnPinch = !0, panOnScroll = !1, panOnScrollSpeed = 0.5, panOnScrollMode = PanOnScrollMode.Free, zoomOnDoubleClick = !0, panOnDrag = !0, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance = 0, nodeClickDistance = 0, children: children2, onReconnect, onReconnectStart, onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius = 10, onNodesChange, onEdgesChange, noDragClassName = "nodrag", noWheelClassName = "nowheel", noPanClassName = "nopan", fitView, fitViewOptions, connectOnClick, attributionPosition, proOptions, defaultEdgeOptions, elevateNodesOnSelect, elevateEdgesOnSelect, disableKeyboardA11y = !1, autoPanOnConnect, autoPanOnNodeDrag, autoPanSpeed, connectionRadius, isValidConnection, onError, style: style2, id: id2, nodeDragThreshold, connectionDragThreshold, viewport, onViewportChange, width, height, colorMode = "light", debug, onScroll, ariaLabelConfig, ...rest }, ref) {
15095
15300
  const rfId = id2 || "1", colorModeClassName = useColorModeClass(colorMode), wrapperOnScroll = useCallback((e2) => {
15096
15301
  e2.currentTarget.scrollTo({ top: 0, left: 0, behavior: "instant" }), onScroll?.(e2);
15097
15302
  }, [onScroll]);
15098
- return jsx("div", { "data-testid": "rf__wrapper", ...rest, onScroll: wrapperOnScroll, style: { ...style2, ...wrapperStyle }, ref, className: cc(["react-flow", className, colorModeClassName]), id: id2, children: jsxs(Wrapper, { nodes, edges, width, height, fitView, fitViewOptions, minZoom, maxZoom, nodeOrigin, nodeExtent, children: [jsx(GraphView, { onInit, onNodeClick, onEdgeClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, nodeTypes, edgeTypes, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, deleteKeyCode, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, onlyRenderVisibleElements, defaultViewport: defaultViewport$1, translateExtent, minZoom, maxZoom, preventScrolling, zoomOnScroll, zoomOnPinch, zoomOnDoubleClick, panOnScroll, panOnScrollSpeed, panOnScrollMode, panOnDrag, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance, nodeClickDistance, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onReconnect, onReconnectStart, onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius, defaultMarkerColor, noDragClassName, noWheelClassName, noPanClassName, rfId, disableKeyboardA11y, nodeExtent, viewport, onViewportChange }), jsx(StoreUpdater, { nodes, edges, defaultNodes, defaultEdges, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, nodesDraggable, nodesConnectable, nodesFocusable, edgesFocusable, edgesReconnectable, elementsSelectable, elevateNodesOnSelect, elevateEdgesOnSelect, minZoom, maxZoom, nodeExtent, onNodesChange, onEdgesChange, snapToGrid, snapGrid, connectionMode, translateExtent, connectOnClick, defaultEdgeOptions, fitView, fitViewOptions, onNodesDelete, onEdgesDelete, onDelete, onNodeDragStart, onNodeDrag, onNodeDragStop, onSelectionDrag, onSelectionDragStart, onSelectionDragStop, onMove, onMoveStart, onMoveEnd, noPanClassName, nodeOrigin, rfId, autoPanOnConnect, autoPanOnNodeDrag, autoPanSpeed, onError, connectionRadius, isValidConnection, selectNodesOnDrag, nodeDragThreshold, onBeforeDelete, paneClickDistance, debug }), jsx(SelectionListener, { onSelectionChange }), children2, jsx(Attribution, { proOptions, position: attributionPosition }), jsx(A11yDescriptions, { rfId, disableKeyboardA11y })] }) });
15303
+ return jsx("div", { "data-testid": "rf__wrapper", ...rest, onScroll: wrapperOnScroll, style: { ...style2, ...wrapperStyle }, ref, className: cc(["react-flow", className, colorModeClassName]), id: id2, role: "application", children: jsxs(Wrapper, { nodes, edges, width, height, fitView, fitViewOptions, minZoom, maxZoom, nodeOrigin, nodeExtent, children: [jsx(GraphView, { onInit, onNodeClick, onEdgeClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, nodeTypes, edgeTypes, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, deleteKeyCode, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, onlyRenderVisibleElements, defaultViewport: defaultViewport$1, translateExtent, minZoom, maxZoom, preventScrolling, zoomOnScroll, zoomOnPinch, zoomOnDoubleClick, panOnScroll, panOnScrollSpeed, panOnScrollMode, panOnDrag, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance, nodeClickDistance, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onReconnect, onReconnectStart, onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius, defaultMarkerColor, noDragClassName, noWheelClassName, noPanClassName, rfId, disableKeyboardA11y, nodeExtent, viewport, onViewportChange }), jsx(StoreUpdater, { nodes, edges, defaultNodes, defaultEdges, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, nodesDraggable, autoPanOnNodeFocus, nodesConnectable, nodesFocusable, edgesFocusable, edgesReconnectable, elementsSelectable, elevateNodesOnSelect, elevateEdgesOnSelect, minZoom, maxZoom, nodeExtent, onNodesChange, onEdgesChange, snapToGrid, snapGrid, connectionMode, translateExtent, connectOnClick, defaultEdgeOptions, fitView, fitViewOptions, onNodesDelete, onEdgesDelete, onDelete, onNodeDragStart, onNodeDrag, onNodeDragStop, onSelectionDrag, onSelectionDragStart, onSelectionDragStop, onMove, onMoveStart, onMoveEnd, noPanClassName, nodeOrigin, rfId, autoPanOnConnect, autoPanOnNodeDrag, autoPanSpeed, onError, connectionRadius, isValidConnection, selectNodesOnDrag, nodeDragThreshold, connectionDragThreshold, onBeforeDelete, paneClickDistance, debug, ariaLabelConfig }), jsx(SelectionListener, { onSelectionChange }), children2, jsx(Attribution, { proOptions, position: attributionPosition }), jsx(A11yDescriptions, { rfId, disableKeyboardA11y })] }) });
15099
15304
  }
15100
15305
  var index = fixedForwardRef(ReactFlow);
15101
15306
  const selector$6 = (s2) => s2.domNode?.querySelector(".react-flow__edgelabel-renderer");
15102
15307
  function EdgeLabelRenderer({ children: children2 }) {
15103
- const edgeLabelRenderer = useStore$1(selector$6);
15308
+ const edgeLabelRenderer = useStore(selector$6);
15104
15309
  return edgeLabelRenderer ? createPortal(children2, edgeLabelRenderer) : null;
15105
15310
  }
15106
15311
  function useInternalNode(id2) {
15107
- return useStore$1(useCallback((s2) => s2.nodeLookup.get(id2), [id2]), shallow$1);
15312
+ return useStore(useCallback((s2) => s2.nodeLookup.get(id2), [id2]), shallow$1);
15108
15313
  }
15109
15314
  function LinePattern({ dimensions, lineWidth, variant, className }) {
15110
15315
  return jsx("path", { strokeWidth: lineWidth, d: `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}`, className: cc(["react-flow__background-pattern", variant, className]) });
@@ -15136,7 +15341,7 @@ function BackgroundComponent({
15136
15341
  className,
15137
15342
  patternClassName
15138
15343
  }) {
15139
- const ref = useRef(null), { transform: transform2, patternId } = useStore$1(selector$3, shallow$1), patternSize = size2 || defaultSize[variant], isDots = variant === BackgroundVariant.Dots, isCross = variant === BackgroundVariant.Cross, gapXY = Array.isArray(gap) ? gap : [gap, gap], scaledGap = [gapXY[0] * transform2[2] || 1, gapXY[1] * transform2[2] || 1], scaledSize = patternSize * transform2[2], offsetXY = Array.isArray(offset2) ? offset2 : [offset2, offset2], patternDimensions = isCross ? [scaledSize, scaledSize] : scaledGap, scaledOffset = [
15344
+ const ref = useRef(null), { transform: transform2, patternId } = useStore(selector$3, shallow$1), patternSize = size2 || defaultSize[variant], isDots = variant === BackgroundVariant.Dots, isCross = variant === BackgroundVariant.Cross, gapXY = Array.isArray(gap) ? gap : [gap, gap], scaledGap = [gapXY[0] * transform2[2] || 1, gapXY[1] * transform2[2] || 1], scaledSize = patternSize * transform2[2], offsetXY = Array.isArray(offset2) ? offset2 : [offset2, offset2], patternDimensions = isCross ? [scaledSize, scaledSize] : scaledGap, scaledOffset = [
15140
15345
  offsetXY[0] * transform2[2] || 1 + patternDimensions[0] / 2,
15141
15346
  offsetXY[1] * transform2[2] || 1 + patternDimensions[1] / 2
15142
15347
  ], _patternId = `${patternId}${id2 || ""}`;
@@ -15170,10 +15375,11 @@ function ControlButton({ children: children2, className, ...rest }) {
15170
15375
  const selector$2 = (s2) => ({
15171
15376
  isInteractive: s2.nodesDraggable || s2.nodesConnectable || s2.elementsSelectable,
15172
15377
  minZoomReached: s2.transform[2] <= s2.minZoom,
15173
- maxZoomReached: s2.transform[2] >= s2.maxZoom
15378
+ maxZoomReached: s2.transform[2] >= s2.maxZoom,
15379
+ ariaLabelConfig: s2.ariaLabelConfig
15174
15380
  });
15175
- function ControlsComponent({ style: style2, showZoom = !0, showFitView = !0, showInteractive = !0, fitViewOptions, onZoomIn, onZoomOut, onFitView, onInteractiveChange, className, children: children2, position = "bottom-left", orientation = "vertical", "aria-label": ariaLabel = "React Flow controls" }) {
15176
- const store = useStoreApi(), { isInteractive, minZoomReached, maxZoomReached } = useStore$1(selector$2, shallow$1), { zoomIn, zoomOut, fitView } = useReactFlow(), onZoomInHandler = () => {
15381
+ function ControlsComponent({ style: style2, showZoom = !0, showFitView = !0, showInteractive = !0, fitViewOptions, onZoomIn, onZoomOut, onFitView, onInteractiveChange, className, children: children2, position = "bottom-left", orientation = "vertical", "aria-label": ariaLabel }) {
15382
+ const store = useStoreApi(), { isInteractive, minZoomReached, maxZoomReached, ariaLabelConfig } = useStore(selector$2, shallow$1), { zoomIn, zoomOut, fitView } = useReactFlow(), onZoomInHandler = () => {
15177
15383
  zoomIn(), onZoomIn?.();
15178
15384
  }, onZoomOutHandler = () => {
15179
15385
  zoomOut(), onZoomOut?.();
@@ -15186,7 +15392,7 @@ function ControlsComponent({ style: style2, showZoom = !0, showFitView = !0, sho
15186
15392
  elementsSelectable: !isInteractive
15187
15393
  }), onInteractiveChange?.(!isInteractive);
15188
15394
  };
15189
- return jsxs(Panel, { className: cc(["react-flow__controls", orientation === "horizontal" ? "horizontal" : "vertical", className]), position, style: style2, "data-testid": "rf__controls", "aria-label": ariaLabel, children: [showZoom && jsxs(Fragment$1, { children: [jsx(ControlButton, { onClick: onZoomInHandler, className: "react-flow__controls-zoomin", title: "zoom in", "aria-label": "zoom in", disabled: maxZoomReached, children: jsx(PlusIcon, {}) }), jsx(ControlButton, { onClick: onZoomOutHandler, className: "react-flow__controls-zoomout", title: "zoom out", "aria-label": "zoom out", disabled: minZoomReached, children: jsx(MinusIcon, {}) })] }), showFitView && jsx(ControlButton, { className: "react-flow__controls-fitview", onClick: onFitViewHandler, title: "fit view", "aria-label": "fit view", children: jsx(FitViewIcon, {}) }), showInteractive && jsx(ControlButton, { className: "react-flow__controls-interactive", onClick: onToggleInteractivity, title: "toggle interactivity", "aria-label": "toggle interactivity", children: isInteractive ? jsx(UnlockIcon, {}) : jsx(LockIcon, {}) }), children2] });
15395
+ return jsxs(Panel, { className: cc(["react-flow__controls", orientation === "horizontal" ? "horizontal" : "vertical", className]), position, style: style2, "data-testid": "rf__controls", "aria-label": ariaLabel ?? ariaLabelConfig["controls.ariaLabel"], children: [showZoom && jsxs(Fragment$1, { children: [jsx(ControlButton, { onClick: onZoomInHandler, className: "react-flow__controls-zoomin", title: ariaLabelConfig["controls.zoomIn.ariaLabel"], "aria-label": ariaLabelConfig["controls.zoomIn.ariaLabel"], disabled: maxZoomReached, children: jsx(PlusIcon, {}) }), jsx(ControlButton, { onClick: onZoomOutHandler, className: "react-flow__controls-zoomout", title: ariaLabelConfig["controls.zoomOut.ariaLabel"], "aria-label": ariaLabelConfig["controls.zoomOut.ariaLabel"], disabled: minZoomReached, children: jsx(MinusIcon, {}) })] }), showFitView && jsx(ControlButton, { className: "react-flow__controls-fitview", onClick: onFitViewHandler, title: ariaLabelConfig["controls.fitView.ariaLabel"], "aria-label": ariaLabelConfig["controls.fitView.ariaLabel"], children: jsx(FitViewIcon, {}) }), showInteractive && jsx(ControlButton, { className: "react-flow__controls-interactive", onClick: onToggleInteractivity, title: ariaLabelConfig["controls.interactive.ariaLabel"], "aria-label": ariaLabelConfig["controls.interactive.ariaLabel"], children: isInteractive ? jsx(UnlockIcon, {}) : jsx(LockIcon, {}) }), children2] });
15190
15396
  }
15191
15397
  ControlsComponent.displayName = "Controls";
15192
15398
  memo$1(ControlsComponent);
@@ -15212,7 +15418,7 @@ function MiniMapNodes({
15212
15418
  nodeComponent: NodeComponent = MiniMapNode,
15213
15419
  onClick
15214
15420
  }) {
15215
- const nodeIds = useStore$1(selectorNodeIds, shallow$1), nodeColorFunc = getAttrFunction(nodeColor), nodeStrokeColorFunc = getAttrFunction(nodeStrokeColor), nodeClassNameFunc = getAttrFunction(nodeClassName), shapeRendering = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
15421
+ const nodeIds = useStore(selectorNodeIds, shallow$1), nodeColorFunc = getAttrFunction(nodeColor), nodeStrokeColorFunc = getAttrFunction(nodeStrokeColor), nodeClassNameFunc = getAttrFunction(nodeClassName), shapeRendering = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
15216
15422
  return jsx(Fragment$1, { children: nodeIds.map((nodeId) => (
15217
15423
  /*
15218
15424
  * The split of responsibilities between MiniMapNodes and
@@ -15225,7 +15431,7 @@ function MiniMapNodes({
15225
15431
  )) });
15226
15432
  }
15227
15433
  function NodeComponentWrapperInner({ id: id2, nodeColorFunc, nodeStrokeColorFunc, nodeClassNameFunc, nodeBorderRadius, nodeStrokeWidth, shapeRendering, NodeComponent, onClick }) {
15228
- const { node, x, y: y2, width, height } = useStore$1((s2) => {
15434
+ const { node, x, y: y2, width, height } = useStore((s2) => {
15229
15435
  const { internals } = s2.nodeLookup.get(id2), node2 = internals.userNode, { x: x2, y: y22 } = internals.positionAbsolute, { width: width2, height: height2 } = getNodeDimensions(node2);
15230
15436
  return {
15231
15437
  node: node2,
@@ -15253,7 +15459,8 @@ const defaultWidth = 200, defaultHeight = 150, filterHidden = (node) => !node.hi
15253
15459
  panZoom: s2.panZoom,
15254
15460
  translateExtent: s2.translateExtent,
15255
15461
  flowWidth: s2.width,
15256
- flowHeight: s2.height
15462
+ flowHeight: s2.height,
15463
+ ariaLabelConfig: s2.ariaLabelConfig
15257
15464
  };
15258
15465
  }, ARIA_LABEL_KEY = "react-flow__minimap-desc";
15259
15466
  function MiniMapComponent({
@@ -15278,12 +15485,12 @@ function MiniMapComponent({
15278
15485
  onNodeClick,
15279
15486
  pannable = !1,
15280
15487
  zoomable = !1,
15281
- ariaLabel = "React Flow mini map",
15488
+ ariaLabel,
15282
15489
  inversePan,
15283
- zoomStep = 10,
15490
+ zoomStep = 1,
15284
15491
  offsetScale = 5
15285
15492
  }) {
15286
- const store = useStoreApi(), svg = useRef(null), { boundingRect, viewBB, rfId, panZoom, translateExtent, flowWidth, flowHeight } = useStore$1(selector$1, shallow$1), elementWidth = style2?.width ?? defaultWidth, elementHeight = style2?.height ?? defaultHeight, scaledWidth = boundingRect.width / elementWidth, scaledHeight = boundingRect.height / elementHeight, viewScale = Math.max(scaledWidth, scaledHeight), viewWidth = viewScale * elementWidth, viewHeight = viewScale * elementHeight, offset2 = offsetScale * viewScale, x = boundingRect.x - (viewWidth - boundingRect.width) / 2 - offset2, y2 = boundingRect.y - (viewHeight - boundingRect.height) / 2 - offset2, width = viewWidth + offset2 * 2, height = viewHeight + offset2 * 2, labelledBy = `${ARIA_LABEL_KEY}-${rfId}`, viewScaleRef = useRef(0), minimapInstance = useRef();
15493
+ const store = useStoreApi(), svg = useRef(null), { boundingRect, viewBB, rfId, panZoom, translateExtent, flowWidth, flowHeight, ariaLabelConfig } = useStore(selector$1, shallow$1), elementWidth = style2?.width ?? defaultWidth, elementHeight = style2?.height ?? defaultHeight, scaledWidth = boundingRect.width / elementWidth, scaledHeight = boundingRect.height / elementHeight, viewScale = Math.max(scaledWidth, scaledHeight), viewWidth = viewScale * elementWidth, viewHeight = viewScale * elementHeight, offset2 = offsetScale * viewScale, x = boundingRect.x - (viewWidth - boundingRect.width) / 2 - offset2, y2 = boundingRect.y - (viewHeight - boundingRect.height) / 2 - offset2, width = viewWidth + offset2 * 2, height = viewHeight + offset2 * 2, labelledBy = `${ARIA_LABEL_KEY}-${rfId}`, viewScaleRef = useRef(0), minimapInstance = useRef();
15287
15494
  viewScaleRef.current = viewScale, useEffect(() => {
15288
15495
  if (svg.current && panZoom)
15289
15496
  return minimapInstance.current = XYMinimap({
@@ -15311,7 +15518,7 @@ function MiniMapComponent({
15311
15518
  } : void 0, onSvgNodeClick = onNodeClick ? useCallback((event, nodeId) => {
15312
15519
  const node = store.getState().nodeLookup.get(nodeId).internals.userNode;
15313
15520
  onNodeClick(event, node);
15314
- }, []) : void 0;
15521
+ }, []) : void 0, _ariaLabel = ariaLabel ?? ariaLabelConfig["minimap.ariaLabel"];
15315
15522
  return jsx(Panel, { position, style: {
15316
15523
  ...style2,
15317
15524
  "--xy-minimap-background-color-props": typeof bgColor == "string" ? bgColor : void 0,
@@ -15321,13 +15528,17 @@ function MiniMapComponent({
15321
15528
  "--xy-minimap-node-background-color-props": typeof nodeColor == "string" ? nodeColor : void 0,
15322
15529
  "--xy-minimap-node-stroke-color-props": typeof nodeStrokeColor == "string" ? nodeStrokeColor : void 0,
15323
15530
  "--xy-minimap-node-stroke-width-props": typeof nodeStrokeWidth == "number" ? nodeStrokeWidth : void 0
15324
- }, className: cc(["react-flow__minimap", className]), "data-testid": "rf__minimap", children: jsxs("svg", { width: elementWidth, height: elementHeight, viewBox: `${x} ${y2} ${width} ${height}`, className: "react-flow__minimap-svg", role: "img", "aria-labelledby": labelledBy, ref: svg, onClick: onSvgClick, children: [ariaLabel && jsx("title", { id: labelledBy, children: ariaLabel }), jsx(MiniMapNodes$1, { onClick: onSvgNodeClick, nodeColor, nodeStrokeColor, nodeBorderRadius, nodeClassName, nodeStrokeWidth, nodeComponent }), jsx("path", { className: "react-flow__minimap-mask", d: `M${x - offset2},${y2 - offset2}h${width + offset2 * 2}v${height + offset2 * 2}h${-width - offset2 * 2}z
15531
+ }, className: cc(["react-flow__minimap", className]), "data-testid": "rf__minimap", children: jsxs("svg", { width: elementWidth, height: elementHeight, viewBox: `${x} ${y2} ${width} ${height}`, className: "react-flow__minimap-svg", role: "img", "aria-labelledby": labelledBy, ref: svg, onClick: onSvgClick, children: [_ariaLabel && jsx("title", { id: labelledBy, children: _ariaLabel }), jsx(MiniMapNodes$1, { onClick: onSvgNodeClick, nodeColor, nodeStrokeColor, nodeBorderRadius, nodeClassName, nodeStrokeWidth, nodeComponent }), jsx("path", { className: "react-flow__minimap-mask", d: `M${x - offset2},${y2 - offset2}h${width + offset2 * 2}v${height + offset2 * 2}h${-width - offset2 * 2}z
15325
15532
  M${viewBB.x},${viewBB.y}h${viewBB.width}v${viewBB.height}h${-viewBB.width}z`, fillRule: "evenodd", pointerEvents: "none" })] }) });
15326
15533
  }
15327
15534
  MiniMapComponent.displayName = "MiniMap";
15328
15535
  memo$1(MiniMapComponent);
15329
- function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle, className, style: style2 = {}, children: children2, color: color2, minWidth = 10, minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepAspectRatio = !1, resizeDirection, shouldResize, onResizeStart, onResize, onResizeEnd }) {
15330
- const contextNodeId = useNodeId(), id2 = typeof nodeId == "string" ? nodeId : contextNodeId, store = useStoreApi(), resizeControlRef = useRef(null), defaultPosition = variant === ResizeControlVariant.Line ? "right" : "bottom-right", controlPosition = position ?? defaultPosition, resizer = useRef(null);
15536
+ const scaleSelector = (calculateScale) => (store) => calculateScale ? `${Math.max(1 / store.transform[2], 1)}` : void 0, defaultPositions = {
15537
+ [ResizeControlVariant.Line]: "right",
15538
+ [ResizeControlVariant.Handle]: "bottom-right"
15539
+ };
15540
+ function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle, className, style: style2 = void 0, children: children2, color: color2, minWidth = 10, minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepAspectRatio = !1, resizeDirection, autoScale = !0, shouldResize, onResizeStart, onResize, onResizeEnd }) {
15541
+ const contextNodeId = useNodeId(), id2 = typeof nodeId == "string" ? nodeId : contextNodeId, store = useStoreApi(), resizeControlRef = useRef(null), isHandleControl = variant === ResizeControlVariant.Handle, scale2 = useStore(useCallback(scaleSelector(isHandleControl && autoScale), [isHandleControl, autoScale]), shallow$1), resizer = useRef(null), controlPosition = position ?? defaultPositions[variant];
15331
15542
  useEffect(() => {
15332
15543
  if (!(!resizeControlRef.current || !id2))
15333
15544
  return resizer.current || (resizer.current = XYResizer({
@@ -15432,13 +15643,17 @@ function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle
15432
15643
  onResizeEnd,
15433
15644
  shouldResize
15434
15645
  ]);
15435
- const positionClassNames = controlPosition.split("-"), colorStyleProp = variant === ResizeControlVariant.Line ? "borderColor" : "backgroundColor", controlStyle = color2 ? { ...style2, [colorStyleProp]: color2 } : style2;
15436
- return jsx("div", { className: cc(["react-flow__resize-control", "nodrag", ...positionClassNames, variant, className]), ref: resizeControlRef, style: controlStyle, children: children2 });
15646
+ const positionClassNames = controlPosition.split("-");
15647
+ return jsx("div", { className: cc(["react-flow__resize-control", "nodrag", ...positionClassNames, variant, className]), ref: resizeControlRef, style: {
15648
+ ...style2,
15649
+ scale: scale2,
15650
+ ...color2 && { [isHandleControl ? "backgroundColor" : "borderColor"]: color2 }
15651
+ }, children: children2 });
15437
15652
  }
15438
15653
  memo$1(ResizeControl);
15439
15654
  const selector = (state) => state.domNode?.querySelector(".react-flow__renderer");
15440
15655
  function NodeToolbarPortal({ children: children2 }) {
15441
- const wrapperRef = useStore$1(selector);
15656
+ const wrapperRef = useStore(selector);
15442
15657
  return wrapperRef ? createPortal(children2, wrapperRef) : null;
15443
15658
  }
15444
15659
  const nodeEqualityFn = (a, b) => a?.internals.positionAbsolute.x !== b?.internals.positionAbsolute.x || a?.internals.positionAbsolute.y !== b?.internals.positionAbsolute.y || a?.measured.width !== b?.measured.width || a?.measured.height !== b?.measured.height || a?.selected !== b?.selected || a?.internals.z !== b?.internals.z, nodesEqualityFn = (a, b) => {
@@ -15458,7 +15673,7 @@ function NodeToolbar({ nodeId, children: children2, className, style: style2, is
15458
15673
  const contextNodeId = useNodeId(), nodesSelector2 = useCallback((state) => (Array.isArray(nodeId) ? nodeId : [nodeId || contextNodeId || ""]).reduce((res, id2) => {
15459
15674
  const node = state.nodeLookup.get(id2);
15460
15675
  return node && res.set(node.id, node), res;
15461
- }, /* @__PURE__ */ new Map()), [nodeId, contextNodeId]), nodes = useStore$1(nodesSelector2, nodesEqualityFn), { x, y: y2, zoom: zoom2, selectedNodesCount } = useStore$1(storeSelector, shallow$1);
15676
+ }, /* @__PURE__ */ new Map()), [nodeId, contextNodeId]), nodes = useStore(nodesSelector2, nodesEqualityFn), { x, y: y2, zoom: zoom2, selectedNodesCount } = useStore(storeSelector, shallow$1);
15462
15677
  if (!(typeof isVisible == "boolean" ? isVisible : nodes.size === 1 && nodes.values().next().value?.selected && selectedNodesCount === 1) || !nodes.size)
15463
15678
  return null;
15464
15679
  const nodeRect = getInternalNodesBounds(nodes), nodesArray = Array.from(nodes.values()), zIndex = Math.max(...nodesArray.map((node) => node.internals.z + 1)), wrapperStyle2 = {
@@ -15662,11 +15877,11 @@ function createIsCircular(areItemsEqual) {
15662
15877
  return cache.delete(a), cache.delete(b), result;
15663
15878
  };
15664
15879
  }
15665
- function getStrictProperties(object) {
15666
- return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
15880
+ function getStrictProperties(object2) {
15881
+ return getOwnPropertyNames(object2).concat(getOwnPropertySymbols(object2));
15667
15882
  }
15668
- var hasOwn = Object.hasOwn || function(object, property) {
15669
- return hasOwnProperty.call(object, property);
15883
+ var hasOwn = Object.hasOwn || function(object2, property) {
15884
+ return hasOwnProperty.call(object2, property);
15670
15885
  };
15671
15886
  function sameValueZeroEqual(a, b) {
15672
15887
  return a === b || !a && !b && a !== a && b !== b;
@@ -16046,7 +16261,7 @@ function IconOrShapeRenderer({
16046
16261
  }
16047
16262
  );
16048
16263
  }
16049
- var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,textStyle,layerStyle,animationStyle", userGenerated = userGeneratedStr.split(","), cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical", allCssProperties = cssPropertiesStr.split(",").concat(userGenerated), properties = new Map(allCssProperties.map((prop) => [prop, !0])), cssPropertySelectorRegex = /&|@/, isCssProperty = /* @__PURE__ */ memo((prop) => properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop));
16264
+ var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,textStyle,layerStyle,animationStyle", userGenerated = userGeneratedStr.split(","), cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical", allCssProperties = cssPropertiesStr.split(",").concat(userGenerated), properties = new Map(allCssProperties.map((prop) => [prop, !0])), cssPropertySelectorRegex = /&|@/, isCssProperty = /* @__PURE__ */ memo((prop) => properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop));
16050
16265
  const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(prop) && !isCssProperty(prop), composeShouldForwardProps = (tag, shouldForwardProp) => tag.__shouldForwardProps__ && shouldForwardProp ? (propName) => tag.__shouldForwardProps__(propName) && shouldForwardProp(propName) : shouldForwardProp, composeCvaFn = (cvaA, cvaB) => {
16051
16266
  if (cvaA && !cvaB) return cvaA;
16052
16267
  if (!cvaA && cvaB) return cvaB;
@@ -16055,7 +16270,7 @@ const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(pr
16055
16270
  throw TypeError.captureStackTrace?.(error), error;
16056
16271
  }, getDisplayName = (Component) => typeof Component == "string" ? Component : Component?.displayName || Component?.name || "Component";
16057
16272
  function styledFn(Dynamic, configOrCva = {}, options = {}) {
16058
- const cvaFn = configOrCva.__cva__ || configOrCva.__recipe__ ? configOrCva : cva(configOrCva), forwardFn = options.shouldForwardProp || defaultShouldForwardProp, shouldForwardProp = (prop) => forwardFn(prop, cvaFn.variantKeys), defaultProps2 = Object.assign(
16273
+ const cvaFn = configOrCva.__cva__ || configOrCva.__recipe__ ? configOrCva : cva(configOrCva), forwardFn = options.shouldForwardProp || defaultShouldForwardProp, shouldForwardProp = (prop) => options.forwardProps?.includes(prop) ? !0 : forwardFn(prop, cvaFn.variantKeys), defaultProps2 = Object.assign(
16059
16274
  options.dataAttr && configOrCva.__name__ ? { "data-recipe": configOrCva.__name__ } : {},
16060
16275
  options.defaultProps
16061
16276
  ), __cvaFn__ = composeCvaFn(Dynamic.__cva__, cvaFn), __shouldForwardProps__ = composeShouldForwardProps(Dynamic, shouldForwardProp), __base__ = Dynamic.__base__ || Dynamic, StyledComponent = /* @__PURE__ */ forwardRef(function(props, ref) {
@@ -16169,21 +16384,6 @@ let atom = (initialValue) => {
16169
16384
  };
16170
16385
  return $atom;
16171
16386
  };
16172
- function listenKeys($store, keys2, listener) {
16173
- let keysSet = new Set(keys2).add(void 0);
16174
- return $store.listen((value, oldValue, changed) => {
16175
- keysSet.has(changed) && listener(value, oldValue, changed);
16176
- });
16177
- }
16178
- let emit = (snapshotRef, onChange) => (value) => {
16179
- snapshotRef.current !== value && (snapshotRef.current = value, onChange());
16180
- };
16181
- function useStore(store, { keys: keys2, deps = [store, keys2] } = {}) {
16182
- let snapshotRef = useRef();
16183
- snapshotRef.current = store.get();
16184
- let subscribe = useCallback((onChange) => (emit(snapshotRef, onChange)(store.value), keys2?.length > 0 ? listenKeys(store, keys2, emit(snapshotRef, onChange)) : store.listen(emit(snapshotRef, onChange))), deps), get2 = () => snapshotRef.current;
16185
- return useSyncExternalStore(subscribe, get2, get2);
16186
- }
16187
16387
  const ReduceGraphicsModeCtx = createContext(null);
16188
16388
  function useIsReducedGraphics() {
16189
16389
  const isReduced = useContext(ReduceGraphicsModeCtx);
@@ -16196,9 +16396,6 @@ function ReduceGraphicsContext({ reduceGraphics, children: children2 }) {
16196
16396
  const $isPanningRef = useRef(null);
16197
16397
  return $isPanningRef.current || ($isPanningRef.current = atom(reduceGraphics)), /* @__PURE__ */ jsx(PanningAtomSafeCtx, { value: $isPanningRef.current, children: /* @__PURE__ */ jsx(ReduceGraphicsModeCtx.Provider, { value: reduceGraphics, children: children2 }) });
16198
16398
  }
16199
- function useIsPanning() {
16200
- return useStore(usePanningAtom());
16201
- }
16202
16399
  const LikeC4ModelContext = createContext(null), CurrentViewModelContext = createContext(null);
16203
16400
  function EnsureCurrentViewModel({ children: children2 }) {
16204
16401
  return useContext(CurrentViewModelContext) ? /* @__PURE__ */ jsx(Fragment$1, { children: children2 }) : null;
@@ -16288,7 +16485,7 @@ function RootContainer({
16288
16485
  }) {
16289
16486
  const id2 = useId$1(), ref = useRef(null), $isPanning = usePanningAtom();
16290
16487
  return useEffect(() => $isPanning.listen((isPanning) => {
16291
- isPanning ? ref.current?.setAttribute("data-likec4-diagram-panning", "true") : ref.current?.removeAttribute("data-likec4-diagram-panning");
16488
+ ref.current?.setAttribute("data-likec4-diagram-panning", isPanning ? "true" : "false");
16292
16489
  }), [$isPanning]), /* @__PURE__ */ jsx(
16293
16490
  Box,
16294
16491
  {
@@ -16327,18 +16524,29 @@ function useUpdateEffect(callback, deps, equalityFn, effectHook) {
16327
16524
  }
16328
16525
  const useXYFlow = useReactFlow;
16329
16526
  function useXYStore(selector2, equalityFn) {
16330
- return useStore$1(
16527
+ return useStore(
16331
16528
  useCallbackRef(selector2),
16332
16529
  equalityFn ?? shallowEqual
16333
16530
  );
16334
16531
  }
16335
16532
  const useXYStoreApi = useStoreApi, useXYInternalNode = useInternalNode, selectCurrentZoom = (state) => Math.round(state.transform[2] * 100) / 100;
16336
16533
  function useCurrentZoom() {
16337
- return useStore$1(selectCurrentZoom);
16534
+ return useStore(selectCurrentZoom);
16338
16535
  }
16339
16536
  const selectZoom = (state) => state.transform[2] < 0.2;
16340
16537
  function useIsZoomTooSmall() {
16341
- return useStore$1(selectZoom);
16538
+ return useStore(selectZoom);
16539
+ }
16540
+ function getDevicePixelRatio() {
16541
+ const dpr = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : 1;
16542
+ return u(Math.floor(dpr), {
16543
+ min: 1,
16544
+ max: 4
16545
+ });
16546
+ }
16547
+ let knownDpr;
16548
+ function roundDpr(v) {
16549
+ return knownDpr ??= getDevicePixelRatio(), knownDpr < 2 ? Math.round(v) : Math.round(v * knownDpr) / knownDpr;
16342
16550
  }
16343
16551
  const { abs: abs$1, cos: cos$1, sin: sin$1, acos: acos$1, atan2, sqrt: sqrt$1, pow } = Math;
16344
16552
  function crt(v) {
@@ -17273,9 +17481,6 @@ class Bezier {
17273
17481
  return circles;
17274
17482
  }
17275
17483
  }
17276
- function toDomPrecision(v) {
17277
- return v === null ? 0.01 : Math.round(v * 100) / 100;
17278
- }
17279
17484
  function bezierControlPoints(diagramEdge) {
17280
17485
  let [start2, ...bezierPoints] = diagramEdge.points;
17281
17486
  invariant(start2, "start should be defined");
@@ -17684,7 +17889,11 @@ class Actor {
17684
17889
  return;
17685
17890
  const allListeners = [...listeners ? listeners.values() : [], ...wildcardListener ? wildcardListener.values() : []];
17686
17891
  for (const handler of allListeners)
17687
- handler(emittedEvent);
17892
+ try {
17893
+ handler(emittedEvent);
17894
+ } catch (err) {
17895
+ reportUnhandledError(err);
17896
+ }
17688
17897
  },
17689
17898
  actionExecutor: (action) => {
17690
17899
  const exec = () => {
@@ -19199,6 +19408,7 @@ function useDiagram() {
19199
19408
  * @warning Do not use in render phase
19200
19409
  */
19201
19410
  findDiagramNode: (xynodeId) => findDiagramNode(actor.getSnapshot().context, xynodeId),
19411
+ findEdge: (xyedgeId) => actor.getSnapshot().context.xyedges.find((e2) => e2.data.id === xyedgeId) ?? null,
19202
19412
  /**
19203
19413
  * @warning Do not use in render phase
19204
19414
  */
@@ -19234,6 +19444,17 @@ function useDiagramContext(selector2, compare = shallowEqual, deps) {
19234
19444
  const actorRef = useDiagramActorRef(), select2 = useCallback((s2) => selector2(s2.context), deps ?? []);
19235
19445
  return useSelector(actorRef, select2, compare);
19236
19446
  }
19447
+ function useOnDiagramEvent(event, callback) {
19448
+ const actorRef = useDiagramActorRef(), callbackRef = useRef(callback);
19449
+ callbackRef.current = callback, useEffect(() => {
19450
+ const subscription = actorRef.on(event, (event2) => {
19451
+ callbackRef.current(event2);
19452
+ });
19453
+ return () => {
19454
+ subscription.unsubscribe();
19455
+ };
19456
+ }, [actorRef]);
19457
+ }
19237
19458
  const createRecipe = (name, defaultVariants, compoundVariants) => {
19238
19459
  const getVariantProps2 = (variants) => ({
19239
19460
  [name]: "__ignore__",
@@ -19307,6 +19528,35 @@ const createRecipe = (name, defaultVariants, compoundVariants) => {
19307
19528
  return splitProps(props, actionBtnVariantKeys);
19308
19529
  },
19309
19530
  getVariantProps: actionBtnFn.getVariantProps
19531
+ }), compoundNodeFn = /* @__PURE__ */ createRecipe("likec4-compound-node", {}, []), compoundNodeVariantMap = {
19532
+ isTransparent: [
19533
+ "false",
19534
+ "true"
19535
+ ],
19536
+ inverseColor: [
19537
+ "true",
19538
+ "false"
19539
+ ],
19540
+ borderStyle: [
19541
+ "solid",
19542
+ "dashed",
19543
+ "dotted",
19544
+ "none"
19545
+ ]
19546
+ }, compoundNodeVariantKeys = Object.keys(compoundNodeVariantMap), compoundNode = /* @__PURE__ */ Object.assign(memo(compoundNodeFn.recipeFn), {
19547
+ __recipe__: !0,
19548
+ __name__: "compoundNode",
19549
+ __getCompoundVariantCss__: compoundNodeFn.__getCompoundVariantCss__,
19550
+ raw: (props) => props,
19551
+ variantKeys: compoundNodeVariantKeys,
19552
+ variantMap: compoundNodeVariantMap,
19553
+ merge(recipe) {
19554
+ return mergeRecipes(this, recipe);
19555
+ },
19556
+ splitVariantProps(props) {
19557
+ return splitProps(props, compoundNodeVariantKeys);
19558
+ },
19559
+ getVariantProps: compoundNodeFn.getVariantProps
19310
19560
  }), elementNodeIconFn = /* @__PURE__ */ createRecipe("likec4-element-node-icon", {}, []), elementNodeIconVariantMap = {}, elementNodeIconVariantKeys = Object.keys(elementNodeIconVariantMap), elementNodeIcon = /* @__PURE__ */ Object.assign(memo(elementNodeIconFn.recipeFn), {
19311
19561
  __recipe__: !0,
19312
19562
  __name__: "elementNodeIcon",
@@ -19321,6 +19571,25 @@ const createRecipe = (name, defaultVariants, compoundVariants) => {
19321
19571
  return splitProps(props, elementNodeIconVariantKeys);
19322
19572
  },
19323
19573
  getVariantProps: elementNodeIconFn.getVariantProps
19574
+ }), elementShapeRecipeFn = /* @__PURE__ */ createRecipe("likec4-element-shape", {}, []), elementShapeRecipeVariantMap = {
19575
+ shapetype: [
19576
+ "html",
19577
+ "svg"
19578
+ ]
19579
+ }, elementShapeRecipeVariantKeys = Object.keys(elementShapeRecipeVariantMap), elementShapeRecipe = /* @__PURE__ */ Object.assign(memo(elementShapeRecipeFn.recipeFn), {
19580
+ __recipe__: !0,
19581
+ __name__: "elementShapeRecipe",
19582
+ __getCompoundVariantCss__: elementShapeRecipeFn.__getCompoundVariantCss__,
19583
+ raw: (props) => props,
19584
+ variantKeys: elementShapeRecipeVariantKeys,
19585
+ variantMap: elementShapeRecipeVariantMap,
19586
+ merge(recipe) {
19587
+ return mergeRecipes(this, recipe);
19588
+ },
19589
+ splitVariantProps(props) {
19590
+ return splitProps(props, elementShapeRecipeVariantKeys);
19591
+ },
19592
+ getVariantProps: elementShapeRecipeFn.getVariantProps
19324
19593
  }), likec4tagFn = /* @__PURE__ */ createRecipe("likec4-tag", {
19325
19594
  autoTextColor: !1
19326
19595
  }, []), likec4tagVariantMap = {
@@ -19408,6 +19677,7 @@ const createRecipe = (name, defaultVariants, compoundVariants) => {
19408
19677
  __recipe__: !1,
19409
19678
  __name__: "elementNodeData",
19410
19679
  raw: (props) => props,
19680
+ classNameMap: {},
19411
19681
  variantKeys: elementNodeDataVariantKeys,
19412
19682
  variantMap: {
19413
19683
  hasIcon: [
@@ -19433,19 +19703,7 @@ function createMinimalMotionComponent(Component, options) {
19433
19703
  }
19434
19704
  const MotionButton = /* @__PURE__ */ createMinimalMotionComponent("button"), MotionDiv = /* @__PURE__ */ createMinimalMotionComponent("div"), MotionSpan = /* @__PURE__ */ createMinimalMotionComponent("span"), compoundActionBtn = cva({
19435
19705
  base: {
19436
- transitionDuration: "normal",
19437
- "[data-compound-title-inverse] &": {
19438
- _dark: {
19439
- "--actionbtn-color": "color-mix(in srgb, var(--likec4-palette-loContrast) 60%, var(--likec4-palette-fill))"
19440
- },
19441
- _light: {
19442
- "--actionbtn-color": "var(--likec4-palette-stroke)",
19443
- "--actionbtn-color-hovered": "var(--likec4-palette-stroke)",
19444
- "--actionbtn-color-hovered-btn": "var(--likec4-palette-hiContrast)",
19445
- "--actionbtn-bg-hovered": "var(--likec4-palette-fill)/50",
19446
- "--actionbtn-bg-hovered-btn": "var(--likec4-palette-fill)"
19447
- }
19448
- }
19706
+ transitionDuration: "normal"
19449
19707
  },
19450
19708
  variants: {
19451
19709
  delay: {
@@ -19468,49 +19726,35 @@ function CompoundActionButton({
19468
19726
  }) {
19469
19727
  const isHoverDebounced = useDebouncedValue(isHovered, isHovered ? 130 : 0)[0] && isHovered;
19470
19728
  return /* @__PURE__ */ jsx(
19471
- Box,
19729
+ MotionDiv,
19472
19730
  {
19473
- className: cx(
19474
- css({
19475
- position: "absolute",
19476
- top: "[5px]",
19477
- left: "[4px]",
19478
- _smallZoom: {
19479
- display: "none"
19480
- }
19481
- }),
19482
- "compound-action"
19483
- ),
19731
+ initial: !1,
19732
+ animate: {
19733
+ scale: isHoverDebounced ? 1.2 : 1,
19734
+ x: isHoverDebounced ? -1 : 0,
19735
+ y: isHoverDebounced ? -1 : 0
19736
+ },
19737
+ whileHover: {
19738
+ scale: 1.4,
19739
+ x: -3,
19740
+ y: -1
19741
+ },
19742
+ className: "likec4-compound-navigation compound-action",
19743
+ whileTap: { scale: 1 },
19744
+ onClick: stopPropagation,
19484
19745
  children: /* @__PURE__ */ jsx(
19485
- MotionDiv,
19746
+ ActionIcon,
19486
19747
  {
19487
- initial: !1,
19488
- animate: {
19489
- scale: isHoverDebounced ? 1.2 : 1,
19490
- x: isHoverDebounced ? -1 : 0,
19491
- y: isHoverDebounced ? -1 : 0
19492
- },
19493
- whileHover: {
19494
- scale: 1.4,
19495
- x: -2,
19496
- y: -2
19497
- },
19498
- whileTap: { scale: 1 },
19499
- children: /* @__PURE__ */ jsx(
19500
- ActionIcon,
19501
- {
19502
- className: cx(
19503
- "nodrag nopan",
19504
- compoundActionBtn({
19505
- delay: isHovered && !isHoverDebounced
19506
- }),
19507
- actionBtn()
19508
- ),
19509
- onClick,
19510
- onDoubleClick: stopPropagation,
19511
- children: icon ?? /* @__PURE__ */ jsx(IconZoomScan, { stroke: 2 })
19512
- }
19513
- )
19748
+ className: cx(
19749
+ "nodrag nopan",
19750
+ compoundActionBtn({
19751
+ delay: isHovered && !isHoverDebounced
19752
+ }),
19753
+ actionBtn({ variant: "transparent" })
19754
+ ),
19755
+ onClick,
19756
+ onDoubleClick: stopPropagation,
19757
+ children: icon ?? /* @__PURE__ */ jsx(IconZoomScan, { stroke: 2 })
19514
19758
  }
19515
19759
  )
19516
19760
  }
@@ -19525,180 +19769,36 @@ function CompoundDetailsButton({
19525
19769
  }) {
19526
19770
  const isHoverDebounced = useDebouncedValue(isHovered, isHovered ? 130 : 0)[0] && isHovered;
19527
19771
  return /* @__PURE__ */ jsx(
19528
- Box,
19772
+ MotionDiv,
19529
19773
  {
19530
- className: cx(
19531
- css({
19532
- position: "absolute",
19533
- top: "0.5",
19534
- right: "0.5",
19535
- _smallZoom: {
19536
- display: "none"
19537
- }
19538
- }),
19539
- "details-button"
19540
- ),
19541
- onClick: stopPropagation,
19774
+ initial: !1,
19775
+ animate: {
19776
+ scale: isHoverDebounced ? 1.2 : 1
19777
+ // opacity: isHoverDebounced ? 1 : 0.6,
19778
+ },
19779
+ whileHover: {
19780
+ scale: 1.4
19781
+ },
19782
+ whileTap: { scale: 1 },
19783
+ className: "likec4-compound-details details-button",
19542
19784
  children: /* @__PURE__ */ jsx(
19543
- MotionDiv,
19785
+ ActionIcon,
19544
19786
  {
19545
- initial: !1,
19546
- animate: {
19547
- scale: isHoverDebounced ? 1.2 : 1,
19548
- opacity: isHoverDebounced ? 1 : 0.6
19549
- },
19550
- whileHover: {
19551
- scale: 1.4
19552
- },
19553
- whileTap: { scale: 1 },
19554
- children: /* @__PURE__ */ jsx(
19555
- ActionIcon,
19556
- {
19557
- className: cx(
19558
- "nodrag nopan",
19559
- compoundActionBtn({
19560
- delay: isHovered && !isHoverDebounced
19561
- }),
19562
- css({
19563
- _whenHovered: {
19564
- opacity: 0.75
19565
- },
19566
- _hover: {
19567
- opacity: 1
19568
- }
19569
- }),
19570
- actionBtn({ variant: "transparent" })
19571
- ),
19572
- onClick,
19573
- onDoubleClick: stopPropagation,
19574
- children: icon ?? /* @__PURE__ */ jsx(IconId, { stroke: 1.8, style: { width: "75%" } })
19575
- }
19576
- )
19787
+ className: cx(
19788
+ "nodrag nopan",
19789
+ compoundActionBtn({
19790
+ delay: isHovered && !isHoverDebounced
19791
+ }),
19792
+ actionBtn({ variant: "transparent" })
19793
+ ),
19794
+ onClick,
19795
+ onDoubleClick: stopPropagation,
19796
+ children: icon ?? /* @__PURE__ */ jsx(IconId, { stroke: 1.8, style: { width: "75%" } })
19577
19797
  }
19578
19798
  )
19579
19799
  }
19580
19800
  );
19581
19801
  }
19582
- const borderWidth = {
19583
- var: "--_border-width",
19584
- ref: "var(--_border-width, 2px)"
19585
- }, borderRadius$1 = {
19586
- var: "--_border-radius",
19587
- ref: "var(--_border-radius, 4px)"
19588
- }, compoundOpacity = {
19589
- var: "--_compound-opacity",
19590
- ref: "var(--_compound-opacity, 1)"
19591
- }, borderOpacityPercent = {
19592
- var: "--_border-opacity-percent",
19593
- ref: "var(--_border-opacity-percent, 100%)"
19594
- }, root = css.raw({
19595
- position: "relative",
19596
- width: "100%",
19597
- height: "100%",
19598
- padding: "0",
19599
- margin: "0",
19600
- border: "transparent",
19601
- pointerEvents: "none",
19602
- _before: {
19603
- borderRadius: borderRadius$1.ref,
19604
- content: '" "',
19605
- position: "absolute",
19606
- top: "0",
19607
- left: "0",
19608
- width: "100%",
19609
- height: "100%",
19610
- border: "transparent",
19611
- background: "var(--likec4-palette-fill)",
19612
- backgroundClip: "padding-box",
19613
- transitionDelay: ".075ms"
19614
- },
19615
- _noReduceGraphics: {
19616
- _before: {
19617
- transition: "all {durations.slow} {easings.inOut}"
19618
- },
19619
- "&[data-likec4-hovered='true']": {
19620
- _before: {
19621
- transitionDelay: ".2s",
19622
- transitionTimingFunction: "in"
19623
- }
19624
- }
19625
- },
19626
- "&:is([data-compound-transparent])": {
19627
- _before: {
19628
- opacity: compoundOpacity.ref,
19629
- borderWidth: `calc(${borderWidth.ref} - 1px)`
19630
- }
19631
- }
19632
- }), compoundBorder = css.raw({
19633
- borderRadius: borderRadius$1.ref,
19634
- padding: "0",
19635
- margin: "0",
19636
- transition: "all 250ms {easings.inOut}",
19637
- cursor: "default",
19638
- position: "absolute",
19639
- top: "0",
19640
- left: "0",
19641
- width: "100%",
19642
- height: "100%",
19643
- pointerEvents: "none",
19644
- background: "transparent",
19645
- borderStyle: "dashed",
19646
- borderWidth: `[${borderWidth.ref}]`,
19647
- borderColor: `[color-mix(in srgb, var(--likec4-palette-stroke) ${borderOpacityPercent.ref}, transparent)]`
19648
- }), indicatorSvg = css.raw({
19649
- position: "absolute",
19650
- top: "0",
19651
- left: "0",
19652
- width: "100%",
19653
- height: "100%",
19654
- pointerEvents: "none",
19655
- overflow: "visible",
19656
- visibility: "hidden",
19657
- _whenFocused: {
19658
- visibility: "visible"
19659
- },
19660
- _whenSelected: {
19661
- visibility: "visible"
19662
- },
19663
- _whenPanning: {
19664
- display: "none"
19665
- }
19666
- }), indicatorRect = css.raw({
19667
- stroke: "[color-mix(in srgb, var(--likec4-palette-stroke) 60%, var(--likec4-palette-hiContrast))]",
19668
- strokeWidth: "4",
19669
- fill: "[none]",
19670
- animationStyle: "indicator",
19671
- _light: {
19672
- stroke: "[color-mix(in srgb, var(--likec4-palette-stroke) 80%, var(--likec4-palette-hiContrast))]"
19673
- }
19674
- }), compound = sva({
19675
- slots: ["root", "compoundBorder", "indicatorSvg", "indicatorRect"],
19676
- className: "compound-container",
19677
- base: {
19678
- root,
19679
- compoundBorder,
19680
- indicatorSvg,
19681
- indicatorRect
19682
- },
19683
- variants: {
19684
- isTransparent: {
19685
- false: {
19686
- root: {
19687
- _before: {
19688
- boxShadow: {
19689
- _noReduceGraphics: "0 4px 10px 0.5px rgba(0,0,0,0.1) , 0 2px 2px -1px rgba(0,0,0,0.4)",
19690
- _whenSelected: "none",
19691
- _whenPanning: "none !important"
19692
- }
19693
- }
19694
- }
19695
- },
19696
- true: {
19697
- root: {}
19698
- }
19699
- }
19700
- }
19701
- });
19702
19802
  function CompoundNodeContainer({
19703
19803
  nodeProps: {
19704
19804
  selected: isSelected = !1,
@@ -19713,136 +19813,46 @@ function CompoundNodeContainer({
19713
19813
  style: style2,
19714
19814
  ...rest
19715
19815
  }) {
19716
- const isReducedGraphics = useIsReducedGraphics(), isTransparent = e(data.style.opacity) && data.style.opacity < 99;
19717
- let opacity = u((data.style.opacity ?? 100) / 100, {
19816
+ let opacity = u(data.style.opacity ?? 100, {
19718
19817
  min: 0,
19719
- max: 1
19818
+ max: 100
19720
19819
  });
19721
- isTransparent && isHovered && !isReducedGraphics && (opacity = Math.min(opacity + 0.08, 1));
19722
- const MIN_OPACITY = 65, borderOpacity = MIN_OPACITY + u((100 - MIN_OPACITY) * opacity, {
19820
+ const isTransparent = opacity < 99, MIN_OPACITY = 65, borderOpacity = MIN_OPACITY + u((100 - MIN_OPACITY) * (opacity / 100), {
19723
19821
  min: 0,
19724
19822
  max: 100 - MIN_OPACITY
19725
- }), classes2 = compound({
19726
- isTransparent
19823
+ }), compoundClass = compoundNode({
19824
+ isTransparent,
19825
+ inverseColor: opacity < 60,
19826
+ borderStyle: data.style.border ?? (isTransparent ? "dashed" : "none")
19727
19827
  }), depth = u(data.depth ?? 1, {
19728
19828
  min: 1,
19729
19829
  max: 5
19730
19830
  });
19731
- return /* @__PURE__ */ jsxs(
19831
+ return /* @__PURE__ */ jsx(
19732
19832
  m.div,
19733
19833
  {
19734
19834
  className: cx(
19735
- classes2.root,
19736
- "likec4-compound-node",
19835
+ compoundClass,
19737
19836
  className
19738
19837
  ),
19739
19838
  initial: !1,
19740
19839
  "data-likec4-hovered": isHovered,
19741
19840
  "data-likec4-color": data.color,
19742
19841
  "data-compound-depth": depth,
19743
- ...isTransparent && {
19744
- "data-compound-transparent": !0,
19745
- "data-compound-title-inverse": opacity < 0.5
19746
- },
19747
19842
  ...isDimmed !== !1 && {
19748
19843
  "data-likec4-dimmed": isDimmed
19749
19844
  },
19750
19845
  style: {
19751
19846
  ...style2,
19752
19847
  // @ts-expect-error
19753
- [compoundOpacity.var]: opacity,
19754
- [borderWidth.var]: "3px",
19755
- [borderRadius$1.var]: "6px",
19756
- [borderOpacityPercent.var]: `${borderOpacity}%`
19848
+ "--_border-transparency": `${borderOpacity}%`,
19849
+ "--_compound-transparency": `${opacity}%`
19757
19850
  },
19758
19851
  ...rest,
19759
- children: [
19760
- isTransparent && data.style.border !== "none" && /* @__PURE__ */ jsx(
19761
- "div",
19762
- {
19763
- className: classes2.compoundBorder,
19764
- style: {
19765
- borderStyle: data.style.border ?? "dashed"
19766
- }
19767
- }
19768
- ),
19769
- /* @__PURE__ */ jsx("svg", { className: classes2.indicatorSvg, children: /* @__PURE__ */ jsx(
19770
- "rect",
19771
- {
19772
- className: classes2.indicatorRect,
19773
- x: 0,
19774
- y: 0,
19775
- width: "100%",
19776
- height: "100%",
19777
- rx: 6
19778
- }
19779
- ) }),
19780
- children2
19781
- ]
19852
+ children: children2
19782
19853
  }
19783
19854
  );
19784
19855
  }
19785
- const titleContainer = css({
19786
- position: "absolute",
19787
- display: "flex",
19788
- alignItems: "center",
19789
- gap: "1.5",
19790
- // 6px
19791
- left: "[14px]",
19792
- top: "[4px]",
19793
- right: "[30px]",
19794
- width: "auto",
19795
- minHeight: "30px",
19796
- ":where(.react-flow__node.draggable) &": {
19797
- pointerEvents: "all",
19798
- cursor: "grab"
19799
- },
19800
- ".likec4-compound-node:has(.compound-action) &": {
19801
- paddingLeft: "[22px]"
19802
- }
19803
- }), titleText = css({
19804
- flex: "1",
19805
- fontFamily: "likec4.compound",
19806
- fontWeight: 600,
19807
- fontSize: "15px",
19808
- textTransform: "uppercase",
19809
- letterSpacing: "0.2px",
19810
- color: "var(--likec4-palette-loContrast)",
19811
- "[data-compound-title-inverse] &": {
19812
- color: {
19813
- base: "[color-mix(in srgb, var(--likec4-palette-loContrast) 60%, var(--likec4-palette-fill))]",
19814
- _light: "var(--likec4-palette-stroke)"
19815
- }
19816
- }
19817
- }), iconSize = "20px", cssIcon = css({
19818
- flex: `0 0 ${iconSize}`,
19819
- height: `${iconSize}`,
19820
- width: `${iconSize}`,
19821
- display: "flex",
19822
- alignItems: "center",
19823
- justifyContent: "center",
19824
- mixBlendMode: {
19825
- base: "hard-light",
19826
- _reduceGraphicsOnPan: "normal"
19827
- },
19828
- "& svg, & img": {
19829
- width: "100%",
19830
- height: "auto",
19831
- maxHeight: "100%",
19832
- pointerEvents: "none",
19833
- filter: {
19834
- base: [
19835
- "drop-shadow(0 0 3px rgb(0 0 0 / 12%))",
19836
- "drop-shadow(0 1px 8px rgb(0 0 0 / 8%))",
19837
- "drop-shadow(1px 1px 16px rgb(0 0 0 / 3%))"
19838
- ],
19839
- _reduceGraphicsOnPan: "none"
19840
- }
19841
- },
19842
- "& img": {
19843
- objectFit: "contain"
19844
- }
19845
- });
19846
19856
  function CompoundTitle({ id: id2, data }) {
19847
19857
  const elementIcon = IconRenderer({
19848
19858
  element: {
@@ -19850,35 +19860,21 @@ function CompoundTitle({ id: id2, data }) {
19850
19860
  title: data.title,
19851
19861
  icon: data.icon
19852
19862
  },
19853
- className: cssIcon
19863
+ className: "likec4-compound-icon"
19854
19864
  });
19855
- return /* @__PURE__ */ jsxs(
19856
- Box,
19857
- {
19858
- className: cx(
19859
- titleContainer,
19860
- "likec4-compound-title"
19861
- ),
19862
- children: [
19863
- elementIcon,
19864
- /* @__PURE__ */ jsx(Text, { className: titleText, truncate: "end", children: data.title })
19865
- ]
19866
- }
19867
- );
19865
+ return /* @__PURE__ */ jsxs("div", { className: "likec4-compound-title-container", children: [
19866
+ elementIcon,
19867
+ /* @__PURE__ */ jsx(Text, { component: "h3", className: "likec4-compound-title", truncate: "end", children: data.title })
19868
+ ] });
19869
+ }
19870
+ function nodePropsEqual(prev, next) {
19871
+ return prev.id === next.id && deepEqual(prev.selected ?? !1, next.selected ?? !1) && deepEqual(prev.dragging ?? !1, next.dragging ?? !1) && deepEqual(prev.width ?? 0, next.width ?? 0) && deepEqual(prev.height ?? 0, next.height ?? 0) && deepEqual(prev.zIndex ?? 0, next.zIndex ?? 0) && deepEqual(prev.data, next.data);
19868
19872
  }
19869
- const style = {
19870
- top: "50%",
19871
- left: "50%",
19872
- visibility: "hidden"
19873
- }, DefaultHandles = () => /* @__PURE__ */ jsxs(Fragment$1, { children: [
19874
- /* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Top, style }),
19875
- /* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Bottom, style })
19876
- ] }), nodePropsEqual = (prev, next) => prev.id === next.id && deepEqual(prev.selected ?? !1, next.selected ?? !1) && deepEqual(prev.dragging ?? !1, next.dragging ?? !1) && deepEqual(prev.width ?? 0, next.width ?? 0) && deepEqual(prev.height ?? 0, next.height ?? 0) && deepEqual(prev.zIndex ?? 0, next.zIndex ?? 0) && deepEqual(prev.data, next.data);
19877
19873
  function customNode(Node2) {
19878
- const NodeComponent = memo$1((props) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
19879
- /* @__PURE__ */ jsx(Node2, { ...props }),
19880
- /* @__PURE__ */ jsx(DefaultHandles, {})
19881
- ] }), nodePropsEqual);
19874
+ const NodeComponent = memo$1(
19875
+ Node2,
19876
+ (prev, next) => nodePropsEqual(prev, next)
19877
+ );
19882
19878
  return NodeComponent.displayName = "Node", NodeComponent;
19883
19879
  }
19884
19880
  const container$2 = css({
@@ -20127,107 +20123,8 @@ const ElementNodeContainer = forwardRef(({
20127
20123
  );
20128
20124
  });
20129
20125
  ElementNodeContainer.displayName = "ElementNodeContainer";
20130
- const indicator = css({
20131
- _smallZoom: {
20132
- visibility: "hidden"
20133
- },
20134
- stroke: "var(--likec4-palette-loContrast)",
20135
- fill: "[none]",
20136
- strokeWidth: 8,
20137
- strokeOpacity: 0.8,
20138
- visibility: "hidden",
20139
- pointerEvents: "none",
20140
- _light: {
20141
- stroke: "[color-mix(in srgb, var(--likec4-palette-fill) 50%,rgb(121, 121, 121))]"
20142
- },
20143
- _whenFocused: {
20144
- visibility: "visible"
20145
- },
20146
- _groupFocusVisible: {
20147
- visibility: "visible"
20148
- },
20149
- _whenSelected: {
20150
- animationStyle: "indicator",
20151
- visibility: "visible"
20152
- }
20153
- }), fillElementFill = css({
20154
- fill: "var(--likec4-palette-fill)"
20155
- });
20156
- css({
20157
- fill: "var(--likec4-palette-stroke)"
20158
- });
20159
- const fillMixStroke = css({
20160
- fill: "[color-mix(in srgb, var(--likec4-palette-stroke) 90%, var(--likec4-palette-fill))]",
20161
- ".shape-svg-multiple &": {
20162
- fill: "var(--likec4-palette-fill)"
20163
- }
20164
- }), shapeBase = css.raw({
20165
- top: "0",
20166
- left: "0",
20167
- position: "absolute",
20168
- width: "100%",
20169
- height: "100%",
20170
- pointerEvents: "none",
20171
- fill: "var(--likec4-palette-fill)",
20172
- stroke: "var(--likec4-palette-stroke)",
20173
- overflow: "visible"
20174
- // zIndex is removed to improve rendering performance
20175
- // this forces to keep shape in the same layer as the node
20176
- // zIndex: -1,
20177
- }), shapeSvgMultiple = cx(
20178
- "shape-svg-multiple",
20179
- css(shapeBase, {
20180
- transformOrigin: {
20181
- base: "50% 50%",
20182
- _shapeQueue: "75% 25%",
20183
- _shapeCylinder: "50% 100%",
20184
- _shapeStorage: "50% 100%"
20185
- },
20186
- transform: "translate(14px, 14px) perspective(300px) translateZ(-8px)",
20187
- filter: "brightness(0.65) saturate(0.8)",
20188
- stroke: "[none]",
20189
- display: {
20190
- _smallZoom: "none",
20191
- _reduceGraphicsOnPan: "none",
20192
- _whenSelected: "none",
20193
- _whenFocused: "none"
20194
- }
20195
- })
20196
- ), shapeSvg = css(shapeBase, {
20197
- transition: "fill 120ms linear, filter 130ms {easings.inOut}",
20198
- transitionDelay: "0ms",
20199
- filter: `
20200
- drop-shadow(0 2px 1px rgba(0, 0, 0, 0.21))
20201
- drop-shadow(0 1px 1px color-mix(in srgb, var(--likec4-palette-stroke) 40%, transparent))
20202
- drop-shadow(0 5px 3px rgba(0, 0, 0, 0.1))
20203
- `,
20204
- _whenHovered: {
20205
- filter: `
20206
- drop-shadow(0 2px 1px rgba(0, 0, 0, 0.25))
20207
- drop-shadow(0 8px 3px rgba(0, 0, 0, 0.1))
20208
- drop-shadow(0 10px 10px rgba(0, 0, 0, 0.05))
20209
- `
20210
- },
20211
- ":where([data-likec4-level='true']) &": {
20212
- filter: `
20213
- drop-shadow(0 2px 1px rgba(0, 0, 0, 0.25))
20214
- drop-shadow(0 8px 3px rgba(0, 0, 0, 0.1))
20215
- drop-shadow(0 10px 10px rgba(0, 0, 0, 0.05))
20216
- `
20217
- },
20218
- _whenSelected: {
20219
- filter: "none"
20220
- },
20221
- _smallZoom: {
20222
- filter: "none"
20223
- },
20224
- _whenPanning: {
20225
- transition: "none",
20226
- filter: "none"
20227
- }
20228
- });
20229
20126
  function cylinderSVGPath(diameter, height, tilt = 0.065) {
20230
- const radius = Math.round(diameter / 2), rx = radius, ry = toDomPrecision(tilt * radius), tiltAdjustedHeight = height - 2 * ry;
20127
+ const radius = Math.round(diameter / 2), rx = radius, ry = roundDpr(tilt * radius), tiltAdjustedHeight = height - 2 * ry;
20231
20128
  return {
20232
20129
  path: ` M ${diameter},${ry}
20233
20130
  a ${rx},${ry} 0,0,0 ${-diameter} 0
@@ -20241,7 +20138,7 @@ function cylinderSVGPath(diameter, height, tilt = 0.065) {
20241
20138
  };
20242
20139
  }
20243
20140
  function queueSVGPath(width, height, tilt = 0.185) {
20244
- const diameter = height, ry = Math.round(diameter / 2), rx = toDomPrecision(diameter / 2 * tilt), tiltAdjustedWidth = width - 2 * rx;
20141
+ const diameter = height, ry = Math.round(diameter / 2), rx = roundDpr(diameter / 2 * tilt), tiltAdjustedWidth = width - 2 * rx;
20245
20142
  return {
20246
20143
  path: `
20247
20144
  M ${rx},0
@@ -20258,7 +20155,7 @@ const PersonIcon = {
20258
20155
  height: 120,
20259
20156
  path: "M57.9197 0C10.9124 0 33.5766 54.75 33.5766 54.75C38.6131 62.25 45.3285 60.75 45.3285 66C45.3285 70.5 39.4526 72 33.5766 72.75C24.3431 72.75 15.9489 71.25 7.55474 84.75C2.51825 93 0 120 0 120H115C115 120 112.482 93 108.285 84.75C99.8905 70.5 91.4963 72.75 82.2628 72C76.3869 71.25 70.5109 69.75 70.5109 65.25C70.5109 60.75 77.2263 62.25 82.2628 54C82.2628 54.75 104.927 0 57.9197 0V0Z"
20260
20157
  };
20261
- function ElementShapeSvg({ shape, w, h }) {
20158
+ function ShapeSvg({ shape, w, h }) {
20262
20159
  switch (shape) {
20263
20160
  case "mobile":
20264
20161
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
@@ -20268,11 +20165,11 @@ function ElementShapeSvg({ shape, w, h }) {
20268
20165
  width: w,
20269
20166
  height: h,
20270
20167
  rx: 6,
20271
- className: fillMixStroke,
20168
+ "data-likec4-fill": "mix-stroke",
20272
20169
  strokeWidth: 0
20273
20170
  }
20274
20171
  ),
20275
- /* @__PURE__ */ jsxs("g", { className: fillElementFill, strokeWidth: 0, children: [
20172
+ /* @__PURE__ */ jsxs("g", { "data-likec4-fill": "fill", strokeWidth: 0, children: [
20276
20173
  /* @__PURE__ */ jsx("circle", { cx: 17, cy: h / 2, r: 12 }),
20277
20174
  /* @__PURE__ */ jsx("rect", { x: 33, y: 12, width: w - 44, height: h - 24, rx: 5 })
20278
20175
  ] })
@@ -20285,11 +20182,11 @@ function ElementShapeSvg({ shape, w, h }) {
20285
20182
  width: w,
20286
20183
  height: h,
20287
20184
  rx: 6,
20288
- className: fillMixStroke,
20185
+ "data-likec4-fill": "mix-stroke",
20289
20186
  strokeWidth: 0
20290
20187
  }
20291
20188
  ),
20292
- /* @__PURE__ */ jsxs("g", { className: fillElementFill, strokeWidth: 0, children: [
20189
+ /* @__PURE__ */ jsxs("g", { "data-likec4-fill": "fill", strokeWidth: 0, children: [
20293
20190
  /* @__PURE__ */ jsx("circle", { cx: 16, cy: 17, r: 7 }),
20294
20191
  /* @__PURE__ */ jsx("circle", { cx: 36, cy: 17, r: 7 }),
20295
20192
  /* @__PURE__ */ jsx("circle", { cx: 56, cy: 17, r: 7 }),
@@ -20316,7 +20213,7 @@ function ElementShapeSvg({ shape, w, h }) {
20316
20213
  width: PersonIcon.width,
20317
20214
  height: PersonIcon.height,
20318
20215
  viewBox: `0 0 ${PersonIcon.width} ${PersonIcon.height}`,
20319
- className: fillMixStroke,
20216
+ "data-likec4-fill": "mix-stroke",
20320
20217
  children: /* @__PURE__ */ jsx(
20321
20218
  "path",
20322
20219
  {
@@ -20331,7 +20228,7 @@ function ElementShapeSvg({ shape, w, h }) {
20331
20228
  const { path, rx, ry } = queueSVGPath(w, h);
20332
20229
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
20333
20230
  /* @__PURE__ */ jsx("path", { d: path, strokeWidth: 2 }),
20334
- /* @__PURE__ */ jsx("ellipse", { cx: rx, cy: ry, ry: ry - 0.75, rx, className: fillMixStroke, strokeWidth: 2 })
20231
+ /* @__PURE__ */ jsx("ellipse", { cx: rx, cy: ry, ry: ry - 0.75, rx, "data-likec4-fill": "mix-stroke", strokeWidth: 2 })
20335
20232
  ] });
20336
20233
  }
20337
20234
  case "storage":
@@ -20339,7 +20236,7 @@ function ElementShapeSvg({ shape, w, h }) {
20339
20236
  const { path, rx, ry } = cylinderSVGPath(w, h);
20340
20237
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
20341
20238
  /* @__PURE__ */ jsx("path", { d: path, strokeWidth: 2 }),
20342
- /* @__PURE__ */ jsx("ellipse", { cx: rx, cy: ry, ry, rx: rx - 0.75, className: fillMixStroke, strokeWidth: 2 })
20239
+ /* @__PURE__ */ jsx("ellipse", { cx: rx, cy: ry, ry, rx: rx - 0.75, "data-likec4-fill": "mix-stroke", strokeWidth: 2 })
20343
20240
  ] });
20344
20241
  }
20345
20242
  case "rectangle":
@@ -20356,14 +20253,33 @@ function ElementShapeSvg({ shape, w, h }) {
20356
20253
  return nonexhaustive(shape);
20357
20254
  }
20358
20255
  }
20256
+ function ShapeHtml({ multiple, withOutLine }) {
20257
+ return /* @__PURE__ */ jsxs(
20258
+ Box,
20259
+ {
20260
+ className: elementShapeRecipe({
20261
+ shapetype: "html"
20262
+ }),
20263
+ children: [
20264
+ multiple && /* @__PURE__ */ jsx("div", { className: "likec4-shape-multiple" }),
20265
+ withOutLine && /* @__PURE__ */ jsx("div", { className: "likec4-shape-outline" })
20266
+ ]
20267
+ }
20268
+ );
20269
+ }
20359
20270
  function ElementShape({ data, width, height, withSelectedIndicator = !0 }) {
20360
20271
  let w = width && width > 10 ? width : data.width, h = height && height > 10 ? height : data.height;
20361
20272
  const isMultiple = data.style?.multiple ?? !1;
20273
+ if (data.shape === "rectangle")
20274
+ return /* @__PURE__ */ jsx(ShapeHtml, { multiple: isMultiple, withOutLine: withSelectedIndicator });
20275
+ const className = elementShapeRecipe({
20276
+ shapetype: "svg"
20277
+ });
20362
20278
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
20363
- isMultiple && /* @__PURE__ */ jsx("svg", { className: cx(shapeSvgMultiple), viewBox: `0 0 ${w} ${h}`, children: /* @__PURE__ */ jsx(ElementShapeSvg, { shape: data.shape, w, h }) }),
20364
- /* @__PURE__ */ jsxs("svg", { className: shapeSvg, viewBox: `0 0 ${w} ${h}`, children: [
20279
+ isMultiple && /* @__PURE__ */ jsx("svg", { className, "data-likec4-shape-multiple": "true", viewBox: `0 0 ${w} ${h}`, children: /* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, w, h }) }),
20280
+ /* @__PURE__ */ jsxs("svg", { className, viewBox: `0 0 ${w} ${h}`, children: [
20365
20281
  withSelectedIndicator && /* @__PURE__ */ jsx(SelectedIndicator, { shape: data.shape, w, h }),
20366
- /* @__PURE__ */ jsx(ElementShapeSvg, { shape: data.shape, w, h })
20282
+ /* @__PURE__ */ jsx(ShapeSvg, { shape: data.shape, w, h })
20367
20283
  ] })
20368
20284
  ] });
20369
20285
  }
@@ -20392,10 +20308,10 @@ function SelectedIndicator({ shape, w, h }) {
20392
20308
  break;
20393
20309
  }
20394
20310
  }
20395
- return /* @__PURE__ */ jsx("g", { className: indicator, children: svg });
20311
+ return /* @__PURE__ */ jsx("g", { className: "likec4-shape-outline", children: svg });
20396
20312
  }
20397
20313
  const ElementTag = forwardRef(
20398
- ({ tag, cursor = "default", className, ...props }, ref) => {
20314
+ ({ tag, cursor, className, style: style2, ...props }, ref) => {
20399
20315
  const spec = useTagSpecification(tag);
20400
20316
  return /* @__PURE__ */ jsxs(
20401
20317
  Box,
@@ -20409,7 +20325,10 @@ const ElementTag = forwardRef(
20409
20325
  className
20410
20326
  ),
20411
20327
  ...props,
20412
- style: { cursor },
20328
+ style: {
20329
+ cursor,
20330
+ ...style2
20331
+ },
20413
20332
  children: [
20414
20333
  /* @__PURE__ */ jsx("span", { children: "#" }),
20415
20334
  /* @__PURE__ */ jsx("span", { children: tag })
@@ -20472,7 +20391,7 @@ const ElementTag = forwardRef(
20472
20391
  "data-likec4-tag": tag,
20473
20392
  className: css({
20474
20393
  layerStyle: "likec4.tag",
20475
- flex: 1,
20394
+ flex: "1",
20476
20395
  display: "flex",
20477
20396
  alignItems: "center",
20478
20397
  justifyContent: "center",
@@ -20507,9 +20426,9 @@ const ElementTag = forwardRef(
20507
20426
  ElementTag,
20508
20427
  {
20509
20428
  tag,
20429
+ cursor: "pointer",
20510
20430
  className: css({
20511
20431
  userSelect: "none",
20512
- cursor: "pointer",
20513
20432
  ...zoomIsLargeEnough && {
20514
20433
  fontSize: "lg",
20515
20434
  borderRadius: "[4px]",
@@ -20541,7 +20460,7 @@ const MarkdownBlock = forwardRef(({
20541
20460
  }, ref) => {
20542
20461
  if (value.isEmpty && hideIfEmpty)
20543
20462
  return null;
20544
- const content = value.nonEmpty ? { dangerouslySetInnerHTML: { __html: value.html } } : { children: /* @__PURE__ */ jsx(Text, { component: "span", fz: "xs", c: "dimmed", style: { userSelect: "none" }, children: emptyText }) };
20463
+ const content = value.nonEmpty ? value.isMarkdown ? { dangerouslySetInnerHTML: { __html: value.html } } : { children: /* @__PURE__ */ jsx("p", { children: value.text }) } : { children: /* @__PURE__ */ jsx(Text, { component: "span", fz: "xs", c: "dimmed", style: { userSelect: "none" }, children: emptyText }) };
20545
20464
  return /* @__PURE__ */ jsx(
20546
20465
  Box,
20547
20466
  {
@@ -20554,6 +20473,9 @@ const MarkdownBlock = forwardRef(({
20554
20473
  className
20555
20474
  ),
20556
20475
  style: {
20476
+ ...props.fontSize && {
20477
+ "--text-fz": `var(--font-sizes-${props.fontSize}, var(--font-sizes-md))`
20478
+ },
20557
20479
  // @ts-expect-error
20558
20480
  "--mantine-scale": textScale
20559
20481
  },
@@ -20562,7 +20484,7 @@ const MarkdownBlock = forwardRef(({
20562
20484
  );
20563
20485
  });
20564
20486
  MarkdownBlock.displayName = "MarkdownBlock";
20565
- function ElementTitle({ id: id2, data, iconSize: iconSize2 }) {
20487
+ function ElementTitle({ id: id2, data, iconSize }) {
20566
20488
  const elementIcon = IconRenderer({
20567
20489
  element: {
20568
20490
  id: id2,
@@ -20582,9 +20504,9 @@ function ElementTitle({ id: id2, data, iconSize: iconSize2 }) {
20582
20504
  classes2.root,
20583
20505
  "likec4-element"
20584
20506
  ),
20585
- style: e(iconSize2) ? {
20507
+ style: e(iconSize) ? {
20586
20508
  // @ts-ignore
20587
- "--likec4-icon-size": `${iconSize2}px`
20509
+ "--likec4-icon-size": `${iconSize}px`
20588
20510
  } : void 0,
20589
20511
  children: [
20590
20512
  elementIcon,
@@ -20606,7 +20528,7 @@ function ElementTitle({ id: id2, data, iconSize: iconSize2 }) {
20606
20528
  children: data.technology
20607
20529
  }
20608
20530
  ),
20609
- data.description && /* @__PURE__ */ jsx(
20531
+ data.description?.nonEmpty && (data.description.isMarkdown ? /* @__PURE__ */ jsx(
20610
20532
  MarkdownBlock,
20611
20533
  {
20612
20534
  className: cx(classes2.description, "likec4-element-description"),
@@ -20616,22 +20538,28 @@ function ElementTitle({ id: id2, data, iconSize: iconSize2 }) {
20616
20538
  maxHeight: data.description.isMarkdown ? "8rem" : void 0,
20617
20539
  lineClamp: isSmOrXs ? 3 : 5
20618
20540
  }
20619
- )
20541
+ ) : /* @__PURE__ */ jsx(
20542
+ Text,
20543
+ {
20544
+ component: "div",
20545
+ className: cx(classes2.description, "likec4-element-description"),
20546
+ lineClamp: isSmOrXs ? 3 : 5,
20547
+ children: data.description.text
20548
+ }
20549
+ ))
20620
20550
  ] })
20621
20551
  ]
20622
20552
  }
20623
20553
  );
20624
20554
  }
20625
- function useOptionalCurrentViewModel() {
20626
- return useContext(CurrentViewModelContext);
20627
- }
20628
- function useCurrentViewModel() {
20629
- const vm = useContext(CurrentViewModelContext);
20630
- if (!vm)
20631
- throw new Error("No LikeC4ViewModel in context found");
20632
- return vm;
20633
- }
20634
- const CompoundActions = (props) => {
20555
+ const style = {
20556
+ top: "50%",
20557
+ left: "50%",
20558
+ visibility: "hidden"
20559
+ }, DefaultHandles = () => /* @__PURE__ */ jsxs(Fragment$1, { children: [
20560
+ /* @__PURE__ */ jsx(Handle, { type: "target", position: Position.Top, style }),
20561
+ /* @__PURE__ */ jsx(Handle, { type: "source", position: Position.Bottom, style })
20562
+ ] }), CompoundActions = (props) => {
20635
20563
  const { enableNavigateTo } = useEnabledFeatures(), diagram = useDiagram(), { navigateTo } = props.data;
20636
20564
  return navigateTo && enableNavigateTo ? /* @__PURE__ */ jsx(
20637
20565
  CompoundActionButton,
@@ -20981,7 +20909,7 @@ function CompoundElementToolbar(props) {
20981
20909
  style: style2,
20982
20910
  modelFqn
20983
20911
  }
20984
- } = props, { elementColor, onColorPreview, onChange } = useHandlers(modelFqn, props);
20912
+ } = props, { elementColor, onColorPreview, onChange } = useHandlers(modelFqn, props), opacity = style2?.opacity ?? 100;
20985
20913
  return /* @__PURE__ */ jsxs(
20986
20914
  Toolbar,
20987
20915
  {
@@ -20995,7 +20923,7 @@ function CompoundElementToolbar(props) {
20995
20923
  elementColor,
20996
20924
  onColorPreview,
20997
20925
  isOpacityEditable: !0,
20998
- elementOpacity: style2?.opacity,
20926
+ elementOpacity: opacity,
20999
20927
  onChange,
21000
20928
  position: "left-start"
21001
20929
  }
@@ -21003,7 +20931,7 @@ function CompoundElementToolbar(props) {
21003
20931
  /* @__PURE__ */ jsx(
21004
20932
  BorderStyleOption,
21005
20933
  {
21006
- elementBorderStyle: style2?.border,
20934
+ elementBorderStyle: style2?.border ?? (opacity < 99 ? "dashed" : "none"),
21007
20935
  onChange
21008
20936
  }
21009
20937
  ),
@@ -21240,7 +21168,7 @@ function CompoundDetailsButtonWithHandler(props) {
21240
21168
  }
21241
21169
  );
21242
21170
  }
21243
- const ElementNode = customNode((props) => {
21171
+ const ElementNode = (props) => {
21244
21172
  const { enableElementTags, enableReadOnly } = useEnabledFeatures();
21245
21173
  return /* @__PURE__ */ jsxs(ElementNodeContainer, { nodeProps: props, children: [
21246
21174
  /* @__PURE__ */ jsx(ElementShape, { ...props }),
@@ -21251,9 +21179,9 @@ const ElementNode = customNode((props) => {
21251
21179
  !enableReadOnly && /* @__PURE__ */ jsx(ElementToolbar, { ...props }),
21252
21180
  /* @__PURE__ */ jsx(DefaultHandles, {})
21253
21181
  ] });
21254
- });
21182
+ };
21255
21183
  ElementNode.displayName = "ElementNode";
21256
- const DeploymentNode = customNode((props) => {
21184
+ const DeploymentNode = (props) => {
21257
21185
  const { enableElementTags, enableReadOnly } = useEnabledFeatures();
21258
21186
  return /* @__PURE__ */ jsxs(ElementNodeContainer, { nodeProps: props, children: [
21259
21187
  /* @__PURE__ */ jsx(ElementShape, { ...props }),
@@ -21264,9 +21192,9 @@ const DeploymentNode = customNode((props) => {
21264
21192
  !enableReadOnly && /* @__PURE__ */ jsx(DeploymentElementToolbar, { ...props }),
21265
21193
  /* @__PURE__ */ jsx(DefaultHandles, {})
21266
21194
  ] });
21267
- });
21195
+ };
21268
21196
  DeploymentNode.displayName = "DeploymentNode";
21269
- const CompoundElementNode = customNode((props) => {
21197
+ const CompoundElementNode = (props) => {
21270
21198
  const { enableElementDetails, enableReadOnly } = useEnabledFeatures();
21271
21199
  return /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
21272
21200
  /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
@@ -21275,9 +21203,9 @@ const CompoundElementNode = customNode((props) => {
21275
21203
  !enableReadOnly && /* @__PURE__ */ jsx(CompoundElementToolbar, { ...props }),
21276
21204
  /* @__PURE__ */ jsx(DefaultHandles, {})
21277
21205
  ] });
21278
- });
21206
+ };
21279
21207
  CompoundElementNode.displayName = "CompoundElementNode";
21280
- const CompoundDeploymentNode = customNode((props) => {
21208
+ const CompoundDeploymentNode = (props) => {
21281
21209
  const { enableElementDetails, enableReadOnly } = useEnabledFeatures();
21282
21210
  return /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
21283
21211
  /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
@@ -21286,18 +21214,50 @@ const CompoundDeploymentNode = customNode((props) => {
21286
21214
  !enableReadOnly && /* @__PURE__ */ jsx(CompoundDeploymentToolbar, { ...props }),
21287
21215
  /* @__PURE__ */ jsx(DefaultHandles, {})
21288
21216
  ] });
21289
- });
21217
+ };
21290
21218
  CompoundDeploymentNode.displayName = "CompoundDeploymentNode";
21291
- const ViewGroupNode = customNode((props) => /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
21219
+ const ViewGroupNode = (props) => /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
21292
21220
  /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
21293
21221
  /* @__PURE__ */ jsx(DefaultHandles, {})
21294
- ] }));
21222
+ ] });
21295
21223
  ViewGroupNode.displayName = "ViewGroupNode";
21224
+ function useOptionalCurrentViewModel() {
21225
+ return useContext(CurrentViewModelContext);
21226
+ }
21227
+ function useCurrentViewModel() {
21228
+ const vm = useContext(CurrentViewModelContext);
21229
+ if (!vm)
21230
+ throw new Error("No LikeC4ViewModel in context found");
21231
+ return vm;
21232
+ }
21296
21233
  const selectViewId = (s2) => s2.context.view.id;
21297
21234
  function useCurrentViewId() {
21298
21235
  const actorRef = useDiagramActorRef();
21299
21236
  return useSelector(actorRef, selectViewId);
21300
21237
  }
21238
+ const LikeC4ProjectsContext = createContext(null), emptyProjects = [];
21239
+ function useLikeC4Projects() {
21240
+ const ctx = useContext(LikeC4ProjectsContext);
21241
+ return ctx ? ctx.projects : emptyProjects;
21242
+ }
21243
+ const emptyOnProjectChange = () => {
21244
+ }, emptyContext = {
21245
+ projects: emptyProjects,
21246
+ onProjectChange: emptyOnProjectChange
21247
+ };
21248
+ function useLikeC4ProjectsContext() {
21249
+ return useContext(LikeC4ProjectsContext) ?? emptyContext;
21250
+ }
21251
+ function useHasProjects() {
21252
+ const ctx = useContext(LikeC4ProjectsContext);
21253
+ return ctx ? ctx.projects.length > 1 : !1;
21254
+ }
21255
+ function useLikeC4ProjectId() {
21256
+ const ctx = useContext(LikeC4ModelContext);
21257
+ if (!ctx)
21258
+ throw new Error("No LikeC4ModelContext found");
21259
+ return ctx.projectId;
21260
+ }
21301
21261
  const backdropBlur = "--_blur", backdropOpacity = "--_opacity", level = "--_level", offset = "--_offset", inset = "--_inset", borderRadius = "--_border-radius", dialog = css.raw({
21302
21262
  boxSizing: "border-box",
21303
21263
  margin: "0",
@@ -21617,7 +21577,7 @@ export {
21617
21577
  loadExternalIsValidProp as ay,
21618
21578
  isMotionValue as az,
21619
21579
  useMantineTheme as b,
21620
- n$1 as b$,
21580
+ Box as b$,
21621
21581
  css as b0,
21622
21582
  getPatternStyles as b1,
21623
21583
  patternFns as b2,
@@ -21654,11 +21614,11 @@ export {
21654
21614
  deepEqual as bX,
21655
21615
  ActionIcon as bY,
21656
21616
  IconZoomScan as bZ,
21657
- Box as b_,
21617
+ MotionDiv as b_,
21658
21618
  stopPropagation as ba,
21659
21619
  cx as bb,
21660
- cva as bc,
21661
- useStore$1 as bd,
21620
+ roundDpr as bc,
21621
+ useStore as bd,
21662
21622
  useUpdateEffect as be,
21663
21623
  XSTATE_STOP as bf,
21664
21624
  cloneMachineSnapshot as bg,
@@ -21682,161 +21642,171 @@ export {
21682
21642
  getPersistedSnapshot as by,
21683
21643
  $$ACTOR_TYPE as bz,
21684
21644
  useMantineStyleNonce as c,
21685
- useCurrentViewModel as c$,
21686
- EdgeLabelRenderer as c0,
21687
- e as c1,
21688
- useDiagramContext as c2,
21689
- useDiagram as c3,
21690
- useMantinePortalProps as c4,
21691
- PopoverTarget as c5,
21692
- PopoverDropdown as c6,
21693
- Stack as c7,
21694
- Group as c8,
21695
- Button as c9,
21696
- ViewGroupNode as cA,
21697
- CompoundDeploymentNode as cB,
21698
- CompoundElementNode as cC,
21699
- DeploymentNode as cD,
21700
- ElementNode as cE,
21701
- n as cF,
21702
- MotionButton as cG,
21703
- useHover$1 as cH,
21704
- FloatingIndicator as cI,
21705
- Flex as cJ,
21706
- clampUseMovePosition as cK,
21707
- useMove as cL,
21708
- hstack as cM,
21709
- MotionDiv as cN,
21710
- shallowEqual as cO,
21711
- useSelector as cP,
21712
- useCurrentViewId as cQ,
21713
- isMacOs as cR,
21714
- IconId as cS,
21715
- HStack as cT,
21716
- ElementTag as cU,
21717
- MarkdownBlock as cV,
21718
- MotionSpan as cW,
21719
- Portal as cX,
21720
- Divider as cY,
21721
- o$1 as cZ,
21722
- useDiagramActorRef as c_,
21723
- IconCheck as ca,
21724
- useLikeC4Model as cb,
21725
- LikeC4ModelContext as cc,
21726
- findDiagramNode as cd,
21727
- findDiagramEdge as ce,
21728
- Menu as cf,
21729
- MenuTarget as cg,
21730
- MenuDropdown as ch,
21731
- MenuLabel as ci,
21732
- MenuDivider as cj,
21733
- MenuItem as ck,
21734
- useEnabledFeatures as cl,
21735
- useDiagramEventHandlers as cm,
21736
- TooltipGroup as cn,
21737
- Space as co,
21738
- Tooltip$1 as cp,
21739
- IfEnabled as cq,
21740
- IconFileSymlink as cr,
21741
- getNodeDimensions as cs,
21742
- useIsPanning as ct,
21743
- useXYFlow as cu,
21744
- useDiagramActorSnapshot as cv,
21745
- useXYInternalNode as cw,
21746
- isSamePoint as cx,
21747
- bezierControlPoints as cy,
21748
- bezierPath as cz,
21645
+ CompoundNodeContainer as c$,
21646
+ n$1 as c0,
21647
+ EdgeLabelRenderer as c1,
21648
+ e as c2,
21649
+ getNodeDimensions as c3,
21650
+ useXYFlow as c4,
21651
+ useDiagram as c5,
21652
+ useEnabledFeatures as c6,
21653
+ useXYInternalNode as c7,
21654
+ isSamePoint as c8,
21655
+ bezierControlPoints as c9,
21656
+ isMacOs as cA,
21657
+ IconCheck as cB,
21658
+ IconId as cC,
21659
+ HStack as cD,
21660
+ ElementTag as cE,
21661
+ MarkdownBlock as cF,
21662
+ cva as cG,
21663
+ Button as cH,
21664
+ MotionSpan as cI,
21665
+ Portal as cJ,
21666
+ useLikeC4ProjectsContext as cK,
21667
+ useLikeC4ProjectId as cL,
21668
+ Menu as cM,
21669
+ MenuTarget as cN,
21670
+ MenuDropdown as cO,
21671
+ MenuItem as cP,
21672
+ useLikeC4Model as cQ,
21673
+ Divider as cR,
21674
+ o$1 as cS,
21675
+ useDiagramActorRef as cT,
21676
+ useCurrentViewModel as cU,
21677
+ useActorRef as cV,
21678
+ useUpdateEffect$1 as cW,
21679
+ Group as cX,
21680
+ getBezierPath as cY,
21681
+ ElementActionButtons as cZ,
21682
+ IconTransform as c_,
21683
+ bezierPath as ca,
21684
+ ViewGroupNode as cb,
21685
+ CompoundDeploymentNode as cc,
21686
+ CompoundElementNode as cd,
21687
+ DeploymentNode as ce,
21688
+ ElementNode as cf,
21689
+ useDiagramActorSnapshot as cg,
21690
+ n as ch,
21691
+ MotionButton as ci,
21692
+ Tooltip$1 as cj,
21693
+ useDiagramEventHandlers as ck,
21694
+ useDiagramContext as cl,
21695
+ useHover$1 as cm,
21696
+ PopoverTarget as cn,
21697
+ PopoverDropdown as co,
21698
+ FloatingIndicator as cp,
21699
+ Flex as cq,
21700
+ clampUseMovePosition as cr,
21701
+ useMove as cs,
21702
+ useMantinePortalProps as ct,
21703
+ hstack as cu,
21704
+ TooltipGroup as cv,
21705
+ shallowEqual as cw,
21706
+ useSelector as cx,
21707
+ useCurrentViewId as cy,
21708
+ IconFileSymlink as cz,
21749
21709
  alpha$1 as d,
21750
- useCustomCompareEffect as d$,
21751
- useActorRef as d0,
21752
- useUpdateEffect$1 as d1,
21753
- getBezierPath as d2,
21754
- ElementActionButtons as d3,
21755
- IconTransform as d4,
21756
- customNode as d5,
21757
- CompoundNodeContainer as d6,
21758
- CompoundTitle as d7,
21759
- ElementNodeContainer as d8,
21760
- ElementShape as d9,
21761
- sva as dA,
21762
- t$2 as dB,
21763
- VisuallyHidden as dC,
21764
- IconOrShapeRenderer as dD,
21765
- FocusTrap as dE,
21766
- t$3 as dF,
21767
- useOptionalCurrentViewModel as dG,
21768
- ButtonGroup as dH,
21769
- EnsureCurrentViewModel as dI,
21770
- useIsReducedGraphics as dJ,
21771
- usePanningAtom as dK,
21772
- useTimeout as dL,
21773
- useCustomCompareMemo as dM,
21774
- useLikeC4Specification as dN,
21775
- r as dO,
21776
- applyEdgeChanges as dP,
21777
- applyNodeChanges as dQ,
21778
- getViewportForBounds as dR,
21779
- typedSystem as dS,
21780
- centerXYInternalNode as dT,
21781
- getBoundsOfRects as dU,
21782
- boxToRect as dV,
21783
- and as dW,
21784
- AllDisabled as dX,
21785
- focusedBounds as dY,
21786
- or as dZ,
21787
- nodeToRect as d_,
21788
- ElementTitle as da,
21789
- ElementTags as db,
21790
- ElementDetailsButton as dc,
21791
- Handle as dd,
21792
- Position as de,
21793
- getDefaultExportFromCjs as df,
21794
- l$1 as dg,
21795
- IconSelector as dh,
21796
- SegmentedControl as di,
21797
- ReactFlowProvider as dj,
21798
- useStoreApi as dk,
21799
- useReactFlow as dl,
21800
- Panel as dm,
21801
- m as dn,
21802
- u as dp,
21803
- useSyncedRef as dq,
21804
- IconRenderer as dr,
21805
- useTimeoutEffect as ds,
21806
- ReactRemoveScroll as dt,
21807
- ActionIconGroup as du,
21808
- DiagramFeatures as dv,
21809
- t$1 as dw,
21810
- useXYStore as dx,
21811
- useReducedMotionConfig as dy,
21812
- Overlay as dz,
21710
+ getBoundsOfRects as d$,
21711
+ CompoundTitle as d0,
21712
+ CompoundDetailsButton as d1,
21713
+ ElementNodeContainer as d2,
21714
+ ElementShape as d3,
21715
+ ElementTitle as d4,
21716
+ ElementTags as d5,
21717
+ Handle as d6,
21718
+ Position as d7,
21719
+ ElementDetailsButton as d8,
21720
+ getDefaultExportFromCjs as d9,
21721
+ IconOrShapeRenderer as dA,
21722
+ FocusTrap as dB,
21723
+ t$3 as dC,
21724
+ useOnDiagramEvent as dD,
21725
+ findDiagramEdge as dE,
21726
+ findDiagramNode as dF,
21727
+ autoUpdate as dG,
21728
+ Space as dH,
21729
+ computePosition as dI,
21730
+ offset$2 as dJ,
21731
+ autoPlacement as dK,
21732
+ size$1 as dL,
21733
+ hide$1 as dM,
21734
+ useOptionalCurrentViewModel as dN,
21735
+ ButtonGroup as dO,
21736
+ EnsureCurrentViewModel as dP,
21737
+ useIsReducedGraphics as dQ,
21738
+ usePanningAtom as dR,
21739
+ useTimeout as dS,
21740
+ useCustomCompareMemo as dT,
21741
+ useLikeC4Specification as dU,
21742
+ r as dV,
21743
+ applyEdgeChanges as dW,
21744
+ applyNodeChanges as dX,
21745
+ getViewportForBounds as dY,
21746
+ typedSystem as dZ,
21747
+ centerXYInternalNode as d_,
21748
+ l$1 as da,
21749
+ IconSelector as db,
21750
+ SegmentedControl as dc,
21751
+ ReactFlowProvider as dd,
21752
+ useStoreApi as de,
21753
+ useReactFlow as df,
21754
+ Panel as dg,
21755
+ m as dh,
21756
+ Stack as di,
21757
+ u as dj,
21758
+ useSyncedRef as dk,
21759
+ IconRenderer as dl,
21760
+ useTimeoutEffect as dm,
21761
+ ReactRemoveScroll as dn,
21762
+ ActionIconGroup as dp,
21763
+ IfEnabled as dq,
21764
+ DiagramFeatures as dr,
21765
+ t$1 as ds,
21766
+ customNode as dt,
21767
+ useXYStore as du,
21768
+ useReducedMotionConfig as dv,
21769
+ Overlay as dw,
21770
+ sva as dx,
21771
+ t$2 as dy,
21772
+ VisuallyHidden as dz,
21813
21773
  em as e,
21814
- DiagramActorContextProvider as e0,
21815
- CurrentViewModelContext as e1,
21816
- IconRendererProvider as e2,
21817
- DiagramEventHandlers as e3,
21818
- ReduceGraphicsContext as e4,
21819
- RootContainer as e5,
21820
- useMutationObserver as e6,
21821
- shallowEqual$1 as e7,
21822
- useLikeC4ViewModel as e8,
21823
- useSetState as e9,
21824
- CompoundActionButton as ea,
21825
- CompoundDetailsButton as eb,
21826
- DefaultHandles as ec,
21827
- CompoundActions as ed,
21828
- CompoundDeploymentToolbar as ee,
21829
- CompoundDetailsButtonWithHandler as ef,
21830
- CompoundElementToolbar as eg,
21831
- DeploymentElementActions as eh,
21832
- DeploymentElementToolbar as ei,
21833
- ElementActions as ej,
21834
- ElementDetailsButtonWithHandler as ek,
21835
- ElementToolbar as el,
21836
- Toolbar as em,
21837
- IfNotEnabled as en,
21838
- IfNotReadOnly as eo,
21839
- IfReadOnly as ep,
21774
+ boxToRect as e0,
21775
+ and as e1,
21776
+ AllDisabled as e2,
21777
+ focusedBounds as e3,
21778
+ or as e4,
21779
+ nodeToRect as e5,
21780
+ useCustomCompareEffect as e6,
21781
+ DiagramActorContextProvider as e7,
21782
+ CurrentViewModelContext as e8,
21783
+ IconRendererProvider as e9,
21784
+ DiagramEventHandlers as ea,
21785
+ ReduceGraphicsContext as eb,
21786
+ RootContainer as ec,
21787
+ useMutationObserver as ed,
21788
+ shallowEqual$1 as ee,
21789
+ LikeC4ProjectsContext as ef,
21790
+ LikeC4ModelContext as eg,
21791
+ useLikeC4ViewModel as eh,
21792
+ useHasProjects as ei,
21793
+ useLikeC4Projects as ej,
21794
+ useSetState as ek,
21795
+ CompoundActionButton as el,
21796
+ DefaultHandles as em,
21797
+ CompoundActions as en,
21798
+ CompoundDeploymentToolbar as eo,
21799
+ CompoundDetailsButtonWithHandler as ep,
21800
+ CompoundElementToolbar as eq,
21801
+ DeploymentElementActions as er,
21802
+ DeploymentElementToolbar as es,
21803
+ ElementActions as et,
21804
+ ElementDetailsButtonWithHandler as eu,
21805
+ ElementToolbar as ev,
21806
+ Toolbar as ew,
21807
+ IfNotEnabled as ex,
21808
+ IfNotReadOnly as ey,
21809
+ IfReadOnly as ez,
21840
21810
  getPrimaryContrastColor as f,
21841
21811
  getPrimaryShade as g,
21842
21812
  deepMerge as h,