@epilot/zenith-react 0.1.0-next.0 → 0.1.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 (142) hide show
  1. package/README.md +95 -15
  2. package/dist/components/appearance-boundary/appearance-boundary.js +32 -34
  3. package/dist/components/appearance-boundary/appearance-boundary.js.map +1 -1
  4. package/dist/components/badge/badge.js +1 -1
  5. package/dist/components/badge/badge.js.map +1 -1
  6. package/dist/components/breadcrumb/breadcrumb.js +10 -10
  7. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  8. package/dist/components/button/button.js +28 -28
  9. package/dist/components/button/button.js.map +1 -1
  10. package/dist/components/button-group/button-group.js.map +1 -1
  11. package/dist/components/callout/callout.js +13 -13
  12. package/dist/components/callout/callout.js.map +1 -1
  13. package/dist/components/card/card.js.map +1 -1
  14. package/dist/components/checkbox/checkbox.js +13 -13
  15. package/dist/components/checkbox/checkbox.js.map +1 -1
  16. package/dist/components/code-block/code-block.js +6 -6
  17. package/dist/components/code-block/code-block.js.map +1 -1
  18. package/dist/components/code-editor/code-editor.js +1 -1
  19. package/dist/components/code-editor/code-editor.js.map +1 -1
  20. package/dist/components/code-editor/indent.js.map +1 -1
  21. package/dist/components/command/command.js +7 -13
  22. package/dist/components/command/command.js.map +1 -1
  23. package/dist/components/data-table/data-table-body.js +120 -66
  24. package/dist/components/data-table/data-table-body.js.map +1 -1
  25. package/dist/components/data-table/data-table-column-header.js +7 -7
  26. package/dist/components/data-table/data-table-column-header.js.map +1 -1
  27. package/dist/components/data-table/data-table-column-order.js +277 -0
  28. package/dist/components/data-table/data-table-column-order.js.map +1 -0
  29. package/dist/components/data-table/data-table-content.js +72 -58
  30. package/dist/components/data-table/data-table-content.js.map +1 -1
  31. package/dist/components/data-table/data-table-context.js +8 -4
  32. package/dist/components/data-table/data-table-context.js.map +1 -1
  33. package/dist/components/data-table/data-table-footer.js +31 -0
  34. package/dist/components/data-table/data-table-footer.js.map +1 -0
  35. package/dist/components/data-table/data-table-header-draggable.js +151 -0
  36. package/dist/components/data-table/data-table-header-draggable.js.map +1 -0
  37. package/dist/components/data-table/data-table-header.js +130 -57
  38. package/dist/components/data-table/data-table-header.js.map +1 -1
  39. package/dist/components/data-table/data-table-resize-handle.js +137 -0
  40. package/dist/components/data-table/data-table-resize-handle.js.map +1 -0
  41. package/dist/components/data-table/data-table.js +184 -156
  42. package/dist/components/data-table/data-table.js.map +1 -1
  43. package/dist/components/data-table/hooks/use-data-table-virtualizer.js +9 -0
  44. package/dist/components/data-table/hooks/use-data-table-virtualizer.js.map +1 -0
  45. package/dist/components/date-range-picker/date-range-picker.js +197 -195
  46. package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
  47. package/dist/components/date-time-picker/calendar.js +29 -29
  48. package/dist/components/date-time-picker/calendar.js.map +1 -1
  49. package/dist/components/date-time-picker/time-picker.js +55 -55
  50. package/dist/components/date-time-picker/time-picker.js.map +1 -1
  51. package/dist/components/density-provider/density-provider.js.map +1 -1
  52. package/dist/components/dialog/dialog.js +1 -1
  53. package/dist/components/dialog/dialog.js.map +1 -1
  54. package/dist/components/drawer/drawer.js +5 -5
  55. package/dist/components/drawer/drawer.js.map +1 -1
  56. package/dist/components/dropdown-menu/dropdown-menu.js +36 -36
  57. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
  58. package/dist/components/field/field-combobox.js +4 -4
  59. package/dist/components/field/field-combobox.js.map +1 -1
  60. package/dist/components/field/field.js +40 -40
  61. package/dist/components/field/field.js.map +1 -1
  62. package/dist/components/label/label.js +0 -28
  63. package/dist/components/label/label.js.map +1 -1
  64. package/dist/components/list/list.js +42 -52
  65. package/dist/components/list/list.js.map +1 -1
  66. package/dist/components/option-card/option-card.js +27 -25
  67. package/dist/components/option-card/option-card.js.map +1 -1
  68. package/dist/components/pill/pill.js +9 -9
  69. package/dist/components/pill/pill.js.map +1 -1
  70. package/dist/components/radio/radio.js +14 -14
  71. package/dist/components/radio/radio.js.map +1 -1
  72. package/dist/components/scroll-area/scroll-area.js +9 -9
  73. package/dist/components/scroll-area/scroll-area.js.map +1 -1
  74. package/dist/components/segmented-control/segmented-control.js +1 -1
  75. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  76. package/dist/components/select/select.js +11 -11
  77. package/dist/components/select/select.js.map +1 -1
  78. package/dist/components/separator/separator.js.map +1 -1
  79. package/dist/components/skeleton/skeleton.js.map +1 -1
  80. package/dist/components/slot/compose-as-child.js.map +1 -1
  81. package/dist/components/spinner/spinner.js.map +1 -1
  82. package/dist/components/switch/switch.js +11 -11
  83. package/dist/components/switch/switch.js.map +1 -1
  84. package/dist/components/table/table-pagination.js +1 -1
  85. package/dist/components/table/table-pagination.js.map +1 -1
  86. package/dist/components/table/table.js +15 -15
  87. package/dist/components/table/table.js.map +1 -1
  88. package/dist/components/text/text.js +10 -1
  89. package/dist/components/text/text.js.map +1 -1
  90. package/dist/components/toast/toast.js +30 -32
  91. package/dist/components/toast/toast.js.map +1 -1
  92. package/dist/components/toggle/toggle.js +20 -20
  93. package/dist/components/toggle/toggle.js.map +1 -1
  94. package/dist/delivery/index.d.ts +10 -44
  95. package/dist/delivery/index.js +5 -9
  96. package/dist/index.d.ts +1994 -2272
  97. package/dist/index.js +133 -121
  98. package/dist/index.js.map +1 -1
  99. package/dist/lib/clear-button.js.map +1 -1
  100. package/dist/lib/code-highlight.js.map +1 -1
  101. package/dist/lib/code-tokens.js.map +1 -1
  102. package/dist/lib/pagination.js.map +1 -1
  103. package/dist/packages/tokens/dist/delivery/index.js +18 -48
  104. package/dist/packages/tokens/dist/delivery/index.js.map +1 -1
  105. package/dist/packages/tokens/dist/generated/core.generated.js +18 -0
  106. package/dist/packages/tokens/dist/generated/core.generated.js.map +1 -0
  107. package/dist/packages/tokens/dist/generated/palette.generated.js +5 -5
  108. package/dist/packages/tokens/dist/generated/palette.generated.js.map +1 -1
  109. package/dist/packages/tokens/dist/install.js +9 -9
  110. package/dist/packages/tokens/dist/install.js.map +1 -1
  111. package/dist/styles/document-context.js.map +1 -1
  112. package/dist/styles/make-styles.js.map +1 -1
  113. package/dist/tokens/core.meta.generated.js +2 -2
  114. package/dist/tokens/core.meta.generated.js.map +1 -1
  115. package/dist/tokens/index.d.ts +1029 -1104
  116. package/dist/tokens/index.js +1031 -1106
  117. package/dist/tokens/index.js.map +1 -1
  118. package/dist/tokens/palette.generated.js +2 -2
  119. package/dist/tokens/palette.generated.js.map +1 -1
  120. package/dist/tokens/use-palette-tokens.js.map +1 -1
  121. package/dist/tokens.json +605 -755
  122. package/dist/vendor/.bun/@dnd-kit_core@6.3.1_6f4b9a1cfb20c0ae/vendor/@dnd-kit/core/dist/core.esm.js +385 -340
  123. package/dist/vendor/.bun/@dnd-kit_core@6.3.1_6f4b9a1cfb20c0ae/vendor/@dnd-kit/core/dist/core.esm.js.map +1 -1
  124. package/dist/vendor/.bun/@dnd-kit_sortable@10.0.0_1d291640e1250bbe/vendor/@dnd-kit/sortable/dist/sortable.esm.js +344 -229
  125. package/dist/vendor/.bun/@dnd-kit_sortable@10.0.0_1d291640e1250bbe/vendor/@dnd-kit/sortable/dist/sortable.esm.js.map +1 -1
  126. package/dist/vendor/.bun/@dnd-kit_utilities@3.2.2_62547eec5a2188e3/vendor/@dnd-kit/utilities/dist/utilities.esm.js +1 -1
  127. package/dist/vendor/.bun/@tanstack_react-virtual@3.11.2_6f4b9a1cfb20c0ae/vendor/@tanstack/react-virtual/dist/esm/index.js +36 -0
  128. package/dist/vendor/.bun/@tanstack_react-virtual@3.11.2_6f4b9a1cfb20c0ae/vendor/@tanstack/react-virtual/dist/esm/index.js.map +1 -0
  129. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/index.js +450 -0
  130. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/index.js.map +1 -0
  131. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/utils.js +50 -0
  132. package/dist/vendor/.bun/@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/utils.js.map +1 -0
  133. package/package.json +5 -4
  134. package/scripts/migration-diagnostics-core.mjs +19 -90
  135. package/scripts/migration-diagnostics.mjs +1 -16
  136. package/scripts/migration-sweep.mjs +2 -12
  137. package/ADOPTING.md +0 -73
  138. package/dist/packages/tokens/dist/delivery/internal.js +0 -181
  139. package/dist/packages/tokens/dist/delivery/internal.js.map +0 -1
  140. package/dist/packages/tokens/dist/generated/core.meta.generated.js +0 -10
  141. package/dist/packages/tokens/dist/generated/core.meta.generated.js.map +0 -1
  142. package/dist/token-assets/core/5cd4072decf5df2a664f0b1d5f2ec250a3309101ded3056c1f87c8bbe3738d50.css +0 -22
@@ -1 +1 @@
1
- {"version":3,"file":"sortable.esm.js","sources":["../../../../../../../../../../node_modules/.bun/@dnd-kit+sortable@10.0.0+1d291640e1250bbe/node_modules/@dnd-kit/sortable/dist/sortable.esm.js"],"sourcesContent":["import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId != null && previous.current.activeId == null) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n"],"names":["arrayMove","array","from","to","newArray","getSortedRects","items","rects","accumulator","id","index","rect","isValidIndex","itemsEqual","a","b","i","normalizeDisabled","disabled","rectSortingStrategy","_ref","activeIndex","overIndex","newRects","oldRect","newRect","defaultScale$1","verticalListSortingStrategy","_rects$activeIndex","fallbackActiveRect","activeNodeRect","overIndexRect","itemGap","getItemGap$1","clientRects","currentRect","previousRect","nextRect","ID_PREFIX","Context","React","SortableContext","children","userDefinedItems","strategy","disabledProp","active","dragOverlay","droppableRects","over","measureDroppableContainers","useDndContext","containerId","useUniqueId","useDragOverlay","useMemo","item","isDragging","previousItemsRef","useRef","itemsHaveChanged","disableTransforms","useIsomorphicLayoutEffect","useEffect","contextValue","defaultNewIndexGetter","defaultAnimateLayoutChanges","_ref2","isSorting","wasDragging","newIndex","previousItems","previousContainerId","transition","defaultTransition","transitionProperty","disabledTransition","CSS","defaultAttributes","useDerivedTransform","node","derivedTransform","setDerivedtransform","useState","previousIndex","initial","current","getClientRect","delta","useSortable","animateLayoutChanges","userDefinedAttributes","localDisabled","customData","getNewIndex","localStrategy","resizeObserverConfig","globalDisabled","sortedRects","globalStrategy","useContext","normalizeLocalDisabled","data","itemsAfterCurrentSortable","isOver","setDroppableNodeRef","useDroppable","activatorEvent","attributes","setDraggableNodeRef","listeners","setActivatorNodeRef","transform","useDraggable","setNodeRef","useCombinedRefs","displaceItem","shouldDisplaceDragSource","dragSourceDisplacement","finalTransform","activeId","previous","shouldAnimateLayoutChanges","timeoutId","getTransition","isKeyboardEvent","_localDisabled$dragga","_localDisabled$droppa","KeyboardCode"],"mappings":";;;AAOA,SAASA,EAAUC,GAAOC,GAAMC,GAAI;AAClC,QAAMC,IAAWH,EAAM,MAAK;AAC5B,SAAAG,EAAS,OAAOD,IAAK,IAAIC,EAAS,SAASD,IAAKA,GAAI,GAAGC,EAAS,OAAOF,GAAM,CAAC,EAAE,CAAC,CAAC,GAC3EE;AACT;AAYA,SAASC,GAAeC,GAAOC,GAAO;AACpC,SAAOD,EAA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AAAA,MAClB,CAAO;AAAA,EAIL;AACF;AAEA,SAAS0B,GAAuBT,GAAeK,GAAgB;AAC7D,MAAI6B,GAAuBC;AAE3B,SAAI,OAAOnC,KAAkB,YACpB;AAAA,IACL,WAAWA;AAAA;AAAA,IAEX,WAAW;AAAA,EACjB,IAGS;AAAA,IACL,YAAYkC,IAAwBlC,KAAiB,OAAO,SAASA,EAAc,cAAc,OAAOkC,IAAwB7B,EAAe;AAAA,IAC/I,YAAY8B,IAAwBnC,KAAiB,OAAO,SAASA,EAAc,cAAc,OAAOmC,IAAwB9B,EAAe;AAAA,EACnJ;AACA;AAgBoB+B,EAAa,MAAMA,EAAa,OAAOA,EAAa,IAAIA,EAAa;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"sortable.esm.js","sources":["../../../../../../../../../../node_modules/.bun/@dnd-kit+sortable@10.0.0+1d291640e1250bbe/node_modules/@dnd-kit/sortable/dist/sortable.esm.js"],"sourcesContent":["import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId != null && previous.current.activeId == null) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n"],"names":["arrayMove","array","from","to","newArray","getSortedRects","items","rects","accumulator","id","index","rect","isValidIndex","itemsEqual","a","b","i","normalizeDisabled","disabled","defaultScale","horizontalListSortingStrategy","_ref","_rects$activeIndex","fallbackActiveRect","activeIndex","overIndex","activeNodeRect","itemGap","getItemGap","newIndexRect","currentRect","previousRect","nextRect","rectSortingStrategy","newRects","oldRect","newRect","defaultScale$1","verticalListSortingStrategy","overIndexRect","getItemGap$1","clientRects","ID_PREFIX","Context","React","SortableContext","children","userDefinedItems","strategy","disabledProp","active","dragOverlay","droppableRects","over","measureDroppableContainers","useDndContext","containerId","useUniqueId","useDragOverlay","useMemo","item","isDragging","previousItemsRef","useRef","itemsHaveChanged","disableTransforms","useIsomorphicLayoutEffect","useEffect","contextValue","defaultNewIndexGetter","defaultAnimateLayoutChanges","_ref2","isSorting","wasDragging","newIndex","previousItems","previousContainerId","transition","defaultTransition","transitionProperty","disabledTransition","CSS","defaultAttributes","useDerivedTransform","node","derivedTransform","setDerivedtransform","useState","previousIndex","initial","current","getClientRect","delta","useSortable","animateLayoutChanges","userDefinedAttributes","localDisabled","customData","getNewIndex","localStrategy","resizeObserverConfig","globalDisabled","sortedRects","globalStrategy","useContext","normalizeLocalDisabled","data","itemsAfterCurrentSortable","isOver","setDroppableNodeRef","useDroppable","activatorEvent","attributes","setDraggableNodeRef","listeners","setActivatorNodeRef","transform","useDraggable","setNodeRef","useCombinedRefs","displaceItem","shouldDisplaceDragSource","dragSourceDisplacement","finalTransform","activeId","previous","shouldAnimateLayoutChanges","timeoutId","getTransition","isKeyboardEvent","_localDisabled$dragga","_localDisabled$droppa","hasSortableData","entry","directions","KeyboardCode","sortableKeyboardCoordinates","event","collisionRect","droppableContainers","scrollableAncestors","filteredContainers","collisions","closestCorners","closestId","getFirstCollision","activeDroppable","newDroppable","newNode","hasDifferentScrollAncestors","getScrollableAncestors","element","hasSameContainer","isSameContainer","isAfterActive","isAfter","offset","rectCoordinates","subtract"],"mappings":";;;AAOA,SAASA,EAAUC,GAAOC,GAAMC,GAAI;AAClC,QAAMC,IA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O,EACF,KAAK,CAACG,GAAS7I,MAAUkI,EAAoBlI,CAAK,MAAM6I,CAAO,GAChHC,IAAmBC,GAAgBP,GAAiBC,CAAY,GAChEO,IAAgBC,GAAQT,GAAiBC,CAAY,GACrDS,IAASP,KAA+B,CAACG,IAAmB;AAAA,UAChE,GAAG;AAAA,UACH,GAAG;AAAA,QACb,IAAY;AAAA,UACF,GAAGE,IAAgBhB,EAAc,QAAQtG,EAAQ,QAAQ;AAAA,UACzD,GAAGsH,IAAgBhB,EAAc,SAAStG,EAAQ,SAAS;AAAA,QACrE,GACcyH,IAAkB;AAAA,UACtB,GAAGzH,EAAQ;AAAA,UACX,GAAGA,EAAQ;AAAA,QACrB;AAEQ,eADuBwH,EAAO,KAAKA,EAAO,IAAIC,IAAkBC,GAASD,GAAiBD,CAAM;AAAA,MAElG;AAAA,IACF;AAAA,EACF;AAGF;AAEA,SAASH,GAAgB3I,GAAGC,GAAG;AAC7B,SAAI,CAACqH,EAAgBtH,CAAC,KAAK,CAACsH,EAAgBrH,CAAC,IACpC,KAGFD,EAAE,KAAK,QAAQ,SAAS,gBAAgBC,EAAE,KAAK,QAAQ,SAAS;AACzE;AAEA,SAAS4I,GAAQ7I,GAAGC,GAAG;AAKrB,SAJI,CAACqH,EAAgBtH,CAAC,KAAK,CAACsH,EAAgBrH,CAAC,KAIzC,CAAC0I,GAAgB3I,GAAGC,CAAC,IAChB,KAGFD,EAAE,KAAK,QAAQ,SAAS,QAAQC,EAAE,KAAK,QAAQ,SAAS;AACjE;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { useRef as o, useMemo as l, useLayoutEffect as R, useEffect as g, useCallback as i } from "react";
1
+ import { useMemo as l, useLayoutEffect as R, useEffect as g, useRef as o, useCallback as i } from "react";
2
2
  function Y() {
3
3
  for (var n = arguments.length, t = new Array(n), e = 0; e < n; e++)
4
4
  t[e] = arguments[e];
@@ -0,0 +1,36 @@
1
+ import * as r from "react";
2
+ import { flushSync as c } from "react-dom";
3
+ import { Virtualizer as f, elementScroll as i, observeElementOffset as m, observeElementRect as d } from "../../../../../../@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/index.js";
4
+ import { defaultKeyExtractor as R, defaultRangeExtractor as g, measureElement as z } from "../../../../../../@tanstack_virtual-core@3.11.2/vendor/@tanstack/virtual-core/dist/esm/index.js";
5
+ const a = typeof document < "u" ? r.useLayoutEffect : r.useEffect;
6
+ function p(e) {
7
+ const n = r.useReducer(() => ({}), {})[1], o = {
8
+ ...e,
9
+ onChange: (l, u) => {
10
+ var s;
11
+ u ? c(n) : n(), (s = e.onChange) == null || s.call(e, l, u);
12
+ }
13
+ }, [t] = r.useState(
14
+ () => new f(o)
15
+ );
16
+ return t.setOptions(o), a(() => t._didMount(), []), a(() => t._willUpdate()), t;
17
+ }
18
+ function h(e) {
19
+ return p({
20
+ observeElementRect: d,
21
+ observeElementOffset: m,
22
+ scrollToFn: i,
23
+ ...e
24
+ });
25
+ }
26
+ export {
27
+ f as Virtualizer,
28
+ R as defaultKeyExtractor,
29
+ g as defaultRangeExtractor,
30
+ i as elementScroll,
31
+ z as measureElement,
32
+ m as observeElementOffset,
33
+ d as observeElementRect,
34
+ h as useVirtualizer
35
+ };
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../../../../node_modules/.bun/@tanstack+react-virtual@3.11.2+6f4b9a1cfb20c0ae/node_modules/@tanstack/react-virtual/dist/esm/index.js"],"sourcesContent":["import * as React from \"react\";\nimport { flushSync } from \"react-dom\";\nimport { observeElementRect, observeElementOffset, elementScroll, observeWindowRect, observeWindowOffset, windowScroll, Virtualizer } from \"@tanstack/virtual-core\";\nexport * from \"@tanstack/virtual-core\";\nconst useIsomorphicLayoutEffect = typeof document !== \"undefined\" ? React.useLayoutEffect : React.useEffect;\nfunction useVirtualizerBase(options) {\n const rerender = React.useReducer(() => ({}), {})[1];\n const resolvedOptions = {\n ...options,\n onChange: (instance2, sync) => {\n var _a;\n if (sync) {\n flushSync(rerender);\n } else {\n rerender();\n }\n (_a = options.onChange) == null ? void 0 : _a.call(options, instance2, sync);\n }\n };\n const [instance] = React.useState(\n () => new Virtualizer(resolvedOptions)\n );\n instance.setOptions(resolvedOptions);\n useIsomorphicLayoutEffect(() => {\n return instance._didMount();\n }, []);\n useIsomorphicLayoutEffect(() => {\n return instance._willUpdate();\n });\n return instance;\n}\nfunction useVirtualizer(options) {\n return useVirtualizerBase({\n observeElementRect,\n observeElementOffset,\n scrollToFn: elementScroll,\n ...options\n });\n}\nfunction useWindowVirtualizer(options) {\n return useVirtualizerBase({\n getScrollElement: () => typeof document !== \"undefined\" ? window : null,\n observeElementRect: observeWindowRect,\n observeElementOffset: observeWindowOffset,\n scrollToFn: windowScroll,\n initialOffset: () => typeof document !== \"undefined\" ? window.scrollY : 0,\n ...options\n });\n}\nexport {\n useVirtualizer,\n useWindowVirtualizer\n};\n//# sourceMappingURL=index.js.map\n"],"names":["useIsomorphicLayoutEffect","React","useVirtualizerBase","options","rerender","resolvedOptions","instance2","sync","_a","flushSync","instance","Virtualizer","useVirtualizer","observeElementRect","observeElementOffset","elementScroll"],"mappings":";;;;AAIA,MAAMA,IAA4B,OAAO,WAAa,MAAcC,EAAM,kBAAkBA,EAAM;AAClG,SAASC,EAAmBC,GAAS;AACnC,QAAMC,IAAWH,EAAM,WAAW,OAAO,CAAA,IAAK,CAAA,CAAE,EAAE,CAAC,GAC7CI,IAAkB;AAAA,IACtB,GAAGF;AAAA,IACH,UAAU,CAACG,GAAWC,MAAS;AAC7B,UAAIC;AACJ,MAAID,IACFE,EAAUL,CAAQ,IAElBA,EAAQ,IAETI,IAAKL,EAAQ,aAAa,QAAgBK,EAAG,KAAKL,GAASG,GAAWC,CAAI;AAAA,IAC7E;AAAA,EACJ,GACQ,CAACG,CAAQ,IAAIT,EAAM;AAAA,IACvB,MAAM,IAAIU,EAAYN,CAAe;AAAA,EACzC;AACE,SAAAK,EAAS,WAAWL,CAAe,GACnCL,EAA0B,MACjBU,EAAS,UAAS,GACxB,CAAA,CAAE,GACLV,EAA0B,MACjBU,EAAS,YAAW,CAC5B,GACMA;AACT;AACA,SAASE,EAAeT,GAAS;AAC/B,SAAOD,EAAmB;AAAA,IACxB,oBAAAW;AAAA,IACA,sBAAAC;AAAA,IACA,YAAYC;AAAA,IACZ,GAAGZ;AAAA,EACP,CAAG;AACH;","x_google_ignoreList":[0]}